Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMetadataFilePaths ¶
func GenerateMetadataFilePaths(dirName, baseName, metaExt, codeExt string, xmlContent, codeContent []byte) map[string][]byte
GenerateMetadataFilePaths generates the file paths for metadata and companion files.
Parameters:
- dirName: The canonical directory name (e.g., "classes")
- baseName: The base file name without extension (e.g., "MyClass")
- metaExt: The metadata file extension (e.g., ".cls-meta.xml")
- codeExt: The code file extension (e.g., ".cls")
- xmlContent: The marshalled XML content
- codeContent: The code content (can be nil)
Returns a map of file paths to content.
func LoadBundleFiles ¶
LoadBundleFiles loads all files from a bundle directory (like LWC or Aura).
Parameters:
- sourcePath: The path to the metadata file (e.g., "myComponent.js-meta.xml")
- skipPatterns: Patterns to skip (e.g., "__tests__", "-meta.xml")
Returns a map of relative path to file content.
func LoadCompanionFile ¶
LoadCompanionFile loads a companion file for metadata that has separate code files. For example, ApexClass has .cls-meta.xml (metadata) and .cls (code).
Parameters:
- sourcePath: The path to the metadata file (e.g., "MyClass.cls-meta.xml")
- metaSuffix: The metadata suffix to remove (e.g., "-meta.xml")
- fileExt: The companion file extension (e.g., ".cls")
Returns the file content or nil if the file doesn't exist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.