diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index a02e0549..75eb79c5 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -34,6 +34,6 @@ _Feel free to attach a screenshot_. **VS Code Version**: -**SFDX CLI Version**: +**SF CLI Version**: **OS and version**: diff --git a/DEVELOPING.md b/DEVELOPING.md index 95c5c60f..78f0d3e2 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -69,12 +69,12 @@ To run your modified plugin commands locally, use `./bin/dev` or `./bin/dev.cmd` There should be no differences when running via the Salesforce CLI or using the local scripts. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine. ```bash -# Link your plugin to the sfdx cli -sfdx plugins:link . +# Link your plugin to the sf cli +sf plugins:link . # To verify -sfdx plugins +sf plugins # To run -sfdx force:package:create --help +sf force package create --help ``` ## Useful yarn commands diff --git a/README.md b/README.md index 68f40979..81a22f1d 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ [![NPM](https://img.shields.io/npm/v/@salesforce/plugin-packaging.svg?label=@salesforce/plugin-packaging)](https://www.npmjs.com/package/@salesforce/plugin-packaging) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-packaging.svg)](https://npmjs.org/package/@salesforce/plugin-packaging) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-packaging/main/LICENSE.txt) -### This plugin provides the sfdx cli commands that support the Salesforce Packaging Platform. +### This plugin provides the sf cli commands that support the Salesforce Packaging Platform. ## Install This plugin is bundled with the Salesforce CLI, so you typically don't need to install it. However, if you want to install a specific version of the plugin you can run: ```bash -sfdx plugins:install @salesforce/plugin-packaging@x.y.z +sf plugins:install @salesforce/plugin-packaging@x.y.z ``` _NOTE: If you install a specific version of a bundled plugin you will not get an updated packaging plugin when the CLI updates. You must either update to the packaging plugin version you want manually, or uninstall the version of the plugin you have to go back to the CLI bundled version._ @@ -30,777 +30,2310 @@ See [DEVELOPING.md](DEVELOPING.md) -- [`sfdx force:package1:beta:version:create -i -n [-d ] [-v ] [-m] [-r ] [-p ] [-k ] [-w ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackage1betaversioncreate--i-id--n-string--d-string--v-string--m--r-url--p-url--k-string--w-minutes--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package1:beta:version:create:get -i [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackage1betaversioncreateget--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package1:beta:version:display -i [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackage1betaversiondisplay--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package1:beta:version:list [-i ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackage1betaversionlist--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:create -n -t Managed|Unlocked -r [-d ] [-e] [--orgdependent] [-o ] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetacreate--n-string--t-managedunlocked--r-directory--d-string--e---orgdependent--o-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:delete -p [-n] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetadelete--p-string--n--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:install -p [-w ] [-k ] [-b ] [-r] [-a all|package] [-s AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetainstall--p-string--w-minutes--k-string--b-minutes--r--a-allpackage--s-allusersadminsonly--t-deprecateonlymixeddelete--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:install:report -i [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetainstallreport--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:installed:list [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetainstalledlist--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:list [-v ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetalist--v-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:uninstall [-w ] [-p ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetauninstall--w-minutes--p-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:uninstall:report -i [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetauninstallreport--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:update -p [-n ] [-d ] [-o ] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaupdate--p-string--n-string--d-string--o-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:create [-p ] [-d ] [-f ] [-b ] [-t ] [-k ] [-x] [-w ] [-a ] [-n ] [-e ] [-c] [--releasenotesurl ] [--postinstallurl ] [--postinstallscript ] [--uninstallscript ] [--skipvalidation] [--skipancestorcheck] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversioncreate--p-string--d-directory--f-filepath--b-string--t-string--k-string--x--w-minutes--a-string--n-string--e-string--c---releasenotesurl-url---postinstallurl-url---postinstallscript-string---uninstallscript-string---skipvalidation---skipancestorcheck--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:create:list [-c ] [-s Queued|InProgress|Success|Error] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversioncreatelist--c-number--s-queuedinprogresssuccesserror--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:create:report -i [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversioncreatereport--i-id--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:delete -p [-n] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversiondelete--p-string--n--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:displayancestry -p [--dotcode] [-v ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversiondisplayancestry--p-string---dotcode--v-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:list [-c ] [-m ] [-p ] [-r] [-o ] [-v ] [--apiversion ] [--concise] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversionlist--c-number--m-number--p-array--r--o-array--v-string---apiversion-string---concise---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:promote -p [-n] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversionpromote--p-string--n--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:report -p [-v ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversionreport--p-string--v-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx force:package:beta:version:update -p [-a ] [-e ] [-b ] [-t ] [-k ] [-v ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcepackagebetaversionupdate--p-string--a-string--e-string--b-string--t-string--k-string--v-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -- [`sfdx version`](#sfdx-version) - -## `sfdx force:package1:beta:version:create -i -n [-d ] [-v ] [-m] [-r ] [-p ] [-k ] [-w ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` - -create a first-generation package version in the release org - -``` -USAGE - $ sfdx force:package1:beta:version:create -i -n [-d ] [-v ] [-m] [-r ] [-p ] [-k ] [-w - ] [-u ] [--apiversion ] [--json] [--loglevel - trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] - -FLAGS - -d, --description= package version description - -i, --packageid= (required) ID of the metadata - package (starts with 033) of which - you’re creating a new version - -k, --installationkey= installation key for key-protected - package (default: null) - -m, --managedreleased create a managed package version - -n, --name= (required) package version name - -p, --postinstallurl= post install URL - -r, --releasenotesurl= release notes URL - -u, --targetusername= username or alias for the target - org; overrides default target org - -v, --version= package version in major.minor - format, for example, 3.2 - -w, --wait= minutes to wait for the package - version to be created (default: 2 - minutes) - --apiversion= override the api version used for - api requests made by this command - --json format output as json - --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for - this command invocation +- [`sf force:package1:version:create`](#sf-forcepackage1versioncreate) +- [`sf force:package1:version:create:get`](#sf-forcepackage1versioncreateget) +- [`sf force:package1:version:display`](#sf-forcepackage1versiondisplay) +- [`sf force:package1:version:list`](#sf-forcepackage1versionlist) +- [`sf force:package:create`](#sf-forcepackagecreate) +- [`sf force:package:delete`](#sf-forcepackagedelete) +- [`sf force:package:install`](#sf-forcepackageinstall) +- [`sf force:package:install:report`](#sf-forcepackageinstallreport) +- [`sf force:package:installed:list`](#sf-forcepackageinstalledlist) +- [`sf force:package:list`](#sf-forcepackagelist) +- [`sf force:package:uninstall`](#sf-forcepackageuninstall) +- [`sf force:package:uninstall:report`](#sf-forcepackageuninstallreport) +- [`sf force:package:update`](#sf-forcepackageupdate) +- [`sf force:package:version:create`](#sf-forcepackageversioncreate) +- [`sf force:package:version:create:list`](#sf-forcepackageversioncreatelist) +- [`sf force:package:version:create:report`](#sf-forcepackageversioncreatereport) +- [`sf force:package:version:delete`](#sf-forcepackageversiondelete) +- [`sf force:package:version:displayancestry`](#sf-forcepackageversiondisplayancestry) +- [`sf force:package:version:list`](#sf-forcepackageversionlist) +- [`sf force:package:version:promote`](#sf-forcepackageversionpromote) +- [`sf force:package:version:report`](#sf-forcepackageversionreport) +- [`sf force:package:version:update`](#sf-forcepackageversionupdate) +- [`sf package1:version:create`](#sf-package1versioncreate) +- [`sf package1:version:create:get`](#sf-package1versioncreateget) +- [`sf package1:version:display`](#sf-package1versiondisplay) +- [`sf package1:version:list`](#sf-package1versionlist) +- [`sf package:create`](#sf-packagecreate) +- [`sf package:delete`](#sf-packagedelete) +- [`sf package:install`](#sf-packageinstall) +- [`sf package:install:report`](#sf-packageinstallreport) +- [`sf package:installed:list`](#sf-packageinstalledlist) +- [`sf package:list`](#sf-packagelist) +- [`sf package:uninstall`](#sf-packageuninstall) +- [`sf package:uninstall:report`](#sf-packageuninstallreport) +- [`sf package:update`](#sf-packageupdate) +- [`sf package:version:create`](#sf-packageversioncreate) +- [`sf package:version:create:list`](#sf-packageversioncreatelist) +- [`sf package:version:create:report`](#sf-packageversioncreatereport) +- [`sf package:version:delete`](#sf-packageversiondelete) +- [`sf package:version:displayancestry`](#sf-packageversiondisplayancestry) +- [`sf package:version:list`](#sf-packageversionlist) +- [`sf package:version:promote`](#sf-packageversionpromote) +- [`sf package:version:report`](#sf-packageversionreport) +- [`sf package:version:update`](#sf-packageversionupdate) + +## `sf force:package1:version:create` + +Create a first-generation package version in the release org. + +``` +USAGE + $ sf force:package1:version:create -o -i -n [--json] [--api-version ] [-d ] [-v ] + [-m] [-r ] [-p ] [-k ] [-w ] + +FLAGS + -d, --description= Package version description. + -i, --package-id= (required) ID of the metadata package (starts with 033) of which you’re creating a + new version. + -k, --installation-key= Installation key for key-protected package (default: null). + -m, --managed-released Create a managed package version. + -n, --name= (required) Package version name. + -o, --target-org= (required) Username or alias of the target org. + -p, --post-install-url= Post install URL. + -r, --release-notes-url= Release notes URL. + -v, --version= Package version in major.minor format, for example, 3.2. + -w, --wait= Minutes to wait for the package version to be created (default: 2 minutes). + --api-version= Override the api version used for api requests made by this command + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Create a first-generation package version in the release org. + + The package version is based on the contents of the specified metadata package. Omit --managed-released if you want to + create an unmanaged package version. + +ALIASES + $ sf force:package1:version:create + +EXAMPLES + Create a first-generation package version from the package with the specified ID and name the package version + "example"; use your default org: + + $ sf force:package1:version:create --package-id 033... --name example + + Same as previous example, but provide a description and wait for 30 minutes for the package version to be created; + use the specified org: + + $ sf force:package1:version:create --package-id 033... --name example --description "example description" --wait \ + 30 --target-org myorg@example.com + +FLAG DESCRIPTIONS + -m, --managed-released Create a managed package version. + + To create a beta version, don’t include this parameter. + + -p, --post-install-url= Post install URL. + + The contents of the post-installation instructions URL are displayed in the UI after installation of the package + version. + + -r, --release-notes-url= Release notes URL. + + This link is displayed in the package installation UI to provide release notes for this package version to + subscribers. +``` + +## `sf force:package1:version:create:get` + +Retrieve the status of a package version creation request. + +``` +USAGE + $ sf force:package1:version:create:get -o -i [--json] [--api-version ] + +FLAGS + -i, --request-id= (required) ID of the PackageUploadRequest (starts with 0HD). + -o, --target-org= (required) Username or alias of the target org. + --api-version= Override the api version used for api requests made by this command + +GLOBAL FLAGS + --json Format output as json. + +ALIASES + $ sf force:package1:version:create:get + +EXAMPLES + Get the status of the creation request for the package version with the specified ID in your default org: + + $ sf force:package1:version:create:get --request-id 0HD... + + Same as previous example, but use the specified org: + + $ sf force:package1:version:create:get --request-id 0HD... --target-org myorg@example.com +``` + +## `sf force:package1:version:display` + +Display details about a first-generation package version. + +``` +USAGE + $ sf force:package1:version:display -o -i [--json] [--api-version ] + +FLAGS + -i, --package-version-id= (required) ID (starts with 04t) of the metadata package version whose details you + want to display. + -o, --target-org= (required) Username or alias of the target org. + --api-version= Override the api version used for api requests made by this command + +GLOBAL FLAGS + --json Format output as json. + +ALIASES + $ sf force:package1:version:display + +EXAMPLES + Display details about the first-generation package version with the specified ID in your default org: + + $ sf force:package1:version:display --package-version-id 04t... + + Same as previous example, but use the specified org: + + $ sf force:package1:version:display --package-version-id 04t... --target-org myorg@example.com +``` + +## `sf force:package1:version:list` + +List package versions for the specified first-generation package or for the org. + +``` +USAGE + $ sf force:package1:version:list -o [--json] [--api-version ] [-i ] + +FLAGS + -i, --package-id= Metadata package ID (starts with 033) whose package versions you want to list. + -o, --target-org= (required) Username or alias of the target org. + --api-version= Override the api version used for api requests made by this command + +GLOBAL FLAGS + --json Format output as json. + +ALIASES + $ sf force:package1:version:list + +EXAMPLES + List all first-generation package versions in your default org: + + $ sf force:package1:version:list + + List package versions for the specified first-generation package in the specifief org: + + $ sf force:package1:version:list --package-id 033... --target-org myorg@example.com + +FLAG DESCRIPTIONS + -i, --package-id= Metadata package ID (starts with 033) whose package versions you want to list. + + If not specified, shows all versions for all packages (managed and unmanaged) in the org. +``` + +## `sf force:package:create` + +Create a package. + +``` +USAGE + $ sf force:package:create -v -n -t Managed|Unlocked -r [--json] [--api-version ] [-d + ] [-e] [--org-dependent] [-o ] + +FLAGS + -d, --description= Description of the package. + -e, --no-namespace Create the package with no namespace; available only for unlocked packages. + -n, --name= (required) Name of the package to create. + -o, --error-notification-username= Active Dev Hub user designated to receive email notifications for package + errors. + -r, --path= (required) Path to directory that contains the contents of the package. + -t, --package-type=