API version of the package
the package directory, either package or an empty string
ReadonlyapiAPI version of the package
Private ReadonlycomponentMap package components to one or more source files from which they were loaded.
apexclass.myclass) to lower casePrivate ReadonlydestructiveAccess the pre or post destructive changes in this package
ReadonlymanifestGet the metadata mainfest for this package
Private ReadonlypackageDefines the structure of the metadata package, where the key is the package path in the package zip file and the value contains the info about the component as well as the data.
Private Readonlypackagethe package directory, either package or an empty string
Private ReadonlysourceMaps source files by file system path to the package metadata entries.
Get printable name of the package components for use in the UI. Returns the name of the component in the package if there is only a single component in the package; otherwise returns the component count:
Checl if this package has any destructive changes.
true if the package has destructive changes otherwise false
Check if this package is empty; a package is empty if it does not contain any metadata and does not contain any destructive changes.
true if the package is empty otherwise false
Adds one or more components to the package and updates the package manifest.
Package data entry to add
Adds one or more a destructive change to the package.
Destructive change to add
By default, deletions are processed before component additions (pre)
XML Name of the component to delete
Name of the component to delete; cannot be a wild card
Optionaltype: DestructiveChangeTypeType of change can be pre or post, default is pre.
Add a manifest entry without adding the actual file to the package. You should use setPackageData to add the actual file, or use add to add both the file and the manifest entry.
A component to add to the manifest
Add a manifest entry without adding the actual file to the package. You should use setPackageData to add the actual file, or use add to add both the file and the manifest entry.
XML name
Component name
PrivatebuildPrivatebuildOptionaldata: anyPrivatebuildGet a list of all components in the package optionally filtered by component type.
OptionalcomponentType: stringComponent type to filter by or undefined to get all components
Array of components in the package and their respective files
List of paths from the disk from which this package is composed, contains the source files and composed source files.
Array of paths to files included in this package
PrivatefilterOptionalfs: undefinedBuilds the ZipArchive from the current package and returns the package archive
Optionaloptions: { fs?: FileSystem }Generates missing -meta.xml files for APEX classes using the package specified API version.
Generate a nodejs buffer with compressed package zip that can be uploaded to Salesforce.
levle of compression
Get a component in the package filtered by component name getting the first component that matches the name ignore the component type.
If the specified component name is a full name the type will be extracted from the full name (format:
Name of the component
Component matching the specified component name in the package and it's respective files
Get a component in the package filtered by component type and name. If the component does not exist in the package the files property will be an empty array.
Type of the component
Name of the component
Component matching the specified component type and name in the package and it's respective files
Get a component in the package filtered by component type and name. If the component does not exist in the package the files property will be an empty array.
Component to get specified by type and name
Component matching the specified component type and name in the package and it's respective files
Get all files related to the specified component in the package
Component specification for which to get the files
Get a flat array with the names of the components in this package prefixed with their type separated by a slash.
Array of component names in the format
Get the sources files associated with the specified component.
Component containing componentType and componentName to find sources for
*
FS path from which the component was loaded or undefined when not loaded or not in the current package
Get the types of the components in this package.
Get a list of all destructive changes in the package for the specified component type.
OptionalcomponentType: stringComponent type to filter by
Array of destructive changes matching the specified component type
PrivategetOptionaloptions: { fs?: FileSystem }Gets a new package manifest with just the specified metadata types. If no metadata types are specified a copy of the current manifest is returned.
OptionalmetadataTypes: string[]Metadata types to filter by or undefined (default) to get all metadata types
Get the currently packaged data for the specified path in the package.
Package path
Try to read the metadata associated to the specified component by type and name.
Parsed XML metadata associated to the component as defined in the package
Try to read the metadata associated to the specified component by type and name.
Parsed XML metadata associated to the component as defined in the package
Get all package paths for the specified component. Use this method to get all files in the package for a specific component. * Use getPackageData to get the actual data for the package path at the specified path.
Component to get package paths for
Get the source file for any package path in the package.
package path
Source file FS path
Returns source file info such as the detected component type as well as package path for each source file.
Source file path
Retrieves the source files associated with a specific package path.
The path to the package whose source files are to be retrieved.
The source files mapped to the component identified by the package entry,
or undefined if the package entry does not exist.
Get source folder containing the specified component.
Type of the component
Name of the component, or its full name in the form <type>/<name>
Source file folder or undefined when not found
Get a list of all unit test classes that have been added to the current package. Detects test classes based on class and test method annotations.
When a file system is specified the file system is used to read the file contents if the file is not already loaded. In this case the method will return a promise. Otherwise the method will return a string array with the names of the test classes.
Get a list of all unit test classes that have been added to the current package. Detects test classes based on class and test method annotations.
When a file system is specified the file system is used to read the file contents if the file is not already loaded. In this case the method will return a promise. Otherwise the method will return a string array with the names of the test classes.
Determine if a file exists in the current packahge
Path of file in package
Merge this package with another package and returns this
Package to merge
Merge an existing destructive changes XML into the package as pre or post change.
Source file
Type of changes
PrivatenormalizeRemoves all package data from the package for the specified component.
The component to remove.
Merges or set the package data for the file at the specified package path.
Package path to override
Data to set
Counts the number of unique components in this package.
Get a list of paths to files included in this package and the respective files on the file system from which they were generated.
Writes the package content to a file at the specified path with optional compression
The path where the file will be written
The level of compression to apply (0-9, where 0 is no compression and 9 is maximum compression), default is 4
A Promise that resolves when the file has been successfully written
Create a new metadata package