Deletes the package.
Returns the package ID of the package.
package ID (0Ho)
Returns the package data for the package.
force a refresh of the package data
Returns the list of package versions for the package. See PackageVersionListOptions for list options
Optionaloptions: PackageVersionListOptionsReturns the package type of the package.
Un-Deletes the package.
Updates the package using the values defined in the options. See PackageUpdateOptions for update options.
OptionalskipAncestorCheck: booleanStaticconvertConvert a 1st generation package to a 2nd generation package. See ConvertPackageOptions for conversion options.
the 1GP package ID (033) of the package to convert
Optionalproject: SfProjectStaticcreateCreate a new package.
instance of Connection
instance of SfProject
options for creating a package - see PackageCreateOptions
Package
StaticdownloadDownload the metadata files for a previously published package version, convert them to source format, and put them into a new project folder within the sfdx project.
Staticgetcreate a PackageAncestry instance
to get version information for
SfProject instance
Hub Org Connection
Staticgetcreate a PackageVersionDependency instance
to get version information for
SfProject instance
Hub Org Connection
Optionaloptions: {flags for the command line
StaticlistReturns all the packages that are available in the org, up to 10,000. If more records are
needed use the SF_ORG_MAX_QUERY_LIMIT env var.
StaticlistReturns the package versions in the org. See PackageVersionListOptions for list options
connection to the org
Optionalproject: SfProject
instance of SfProject
Optionaloptions: PackageVersionListOptions
Provides the ability to list, create, update, delete, convert, and get version ancestry for a 2nd generation package.
Examples
Create a new instance and get the ID (0Ho):
const id = new Package({connection, project, packageOrAliasId}).getId();Create a new package in the org:
const myPkg = await Package.create(connection, project, options);List all packages in the org:
const pkgList = await Package.list(connection);