Returns the list of package versions for the package. See PackageVersionListOptions for list options
Optionaloptions: PackageVersionListOptionsReturns the package type of 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
OptionaledgeOptionalverbose?: booleanStaticlistStaticlistReturns the package versions in the org. See PackageVersionListOptions for list options
connection to the org
Optionalproject: SfProjectinstance 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);