Returns the list of package versions for the package. See PackageVersionListOptions for list options
Optional
options: PackageVersionListOptionsReturns the package type of the package.
Updates the package using the values defined in the options. See PackageUpdateOptions for update options.
Static
convertConvert a 1st generation package to a 2nd generation package. See ConvertPackageOptions for conversion options.
the 1GP package ID (033) of the package to convert
Optional
project: SfProjectStatic
createCreate a new package.
instance of Connection
instance of SfProject
options for creating a package - see PackageCreateOptions
Package
Static
downloadDownload 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.
Static
getcreate a PackageAncestry instance
to get version information for
SfProject instance
Hub Org Connection
Static
getcreate a PackageVersionDependency instance
to get version information for
SfProject instance
Hub Org Connection
Optional
options: { flags for the command line
Optional
edgeOptional
verbose?: booleanStatic
listStatic
listReturns the package versions in the org. See PackageVersionListOptions for list options
connection to the org
Optional
project: SfProjectinstance of SfProject
Optional
options: 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);