API version of the package
the package directory, either package or an empty string
Readonly
apiAPI version of the package
Private
Readonly
componentMap package components to one or more source files from which they were loaded.
apexclass.myclass
) to lower casePrivate
Readonly
destructiveAccess the pre or post destructive changes in this package
Readonly
manifestGet the metadata mainfest for this package
Private
Readonly
packageDefines 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
Readonly
packagethe package directory, either package or an empty string
Private
Readonly
sourceMaps 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 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
Optional
type: 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
Private
buildPrivate
buildPrivate
buildGet a list of all components in the package optionally filtered by component type.
Optional
componentType: stringComponent type to filter by or undefined to get all components
Array of components in the package and their respective files
Private
filterOptional
fs: undefinedBuilds the ZipArchive from the current package and returns the package archive
Optional
options: { Optional
fs?: FileSystemGet 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:
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 list of all destructive changes in the package for the specified component type.
Optional
componentType: stringComponent type to filter by
Array of destructive changes matching the specified component type
Private
getOptional
options: { Optional
fs?: FileSystemGets a new package manifest with just the specified metadata types. If no metadata types are specified a copy of the current manifest is returned.
Optional
metadataTypes: string[]Metadata types to filter by or undefined (default) to get all metadata types
Try to read the metadata associated to the specified component.
Type of the component
Name of the component
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 get {@see getPackageData} to get the actual data for the package path at the specified path.
Component to get package paths for
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.
Merge this package with another package and returns this
Package to merge
Private
normalizeRemoves all package data from the package for the specified component.
The component to remove.
Get a list of paths to files included in this package and the respective files on the file system from which they were generated.
Create a new metadata package