Package1Version Constructor - Class to be used with 1st generation package versions
Queries the org for the package version with the given ID
StaticcreateWill create a PackageUploadRequest object based on the options provided, will poll for completion if pollingOptions are provided
StaticgetReturns the status of a PackageUploadRequest
Connection to the target org
0HD Id of the PackageUploadRequest
StaticlistLists package versions available in the org. If package ID is supplied, only list versions of that package,
otherwise, list all package versions, up to 10,000. If more records are needed use the SF_ORG_MAX_QUERY_LIMIT env var.
Connection to the org
Optionalid: stringArray of package version results
Provides the ability to get, list, and create 1st generation package versions.
Examples
List all 1GP package versions in the org:
const pkgList = await Package1Version.list(connection);Create a new 1GP package version in the org:
const myPkg = await Package1Version.create(connection, options, pollingOptions);More implementation examples are in the plugin here: https://github.com/salesforcecli/plugin-packaging/tree/main/src/commands/force/package1/