What is @salesforce/plugin-packaging?
@salesforce/plugin-packaging is an npm package designed to help Salesforce developers manage and automate the packaging of Salesforce applications. It provides a set of CLI commands that facilitate the creation, versioning, and deployment of Salesforce packages.
What are @salesforce/plugin-packaging's main functionalities?
Create a Package
This command creates a new Salesforce package with the specified name, description, type, path, and target DevHub username.
sfdx force:package:create --name 'MyPackage' --description 'My new package' --packagetype 'Unlocked' --path 'force-app' --targetdevhubusername 'DevHub'
List Packages
This command lists all the packages available in the specified DevHub.
sfdx force:package:list --targetdevhubusername 'DevHub'
Create a Package Version
This command creates a new version of the specified package with an installation key and waits for the specified duration.
sfdx force:package:version:create --package 'MyPackage' --installationkey 'mykey' --wait 10 --targetdevhubusername 'DevHub'
Promote a Package Version
This command promotes a specified package version to released status without prompting for confirmation.
sfdx force:package:version:promote --package 'MyPackage@1.0.0-1' --noprompt --targetdevhubusername 'DevHub'
Install a Package
This command installs a specified package version into a target Salesforce org, with specified wait times for installation and publishing.
sfdx force:package:install --package 'MyPackage@1.0.0-1' --targetusername 'MyOrg' --wait 10 --publishwait 10
Other packages similar to @salesforce/plugin-packaging
sfdx-cli
The sfdx-cli package is the official Salesforce CLI tool that provides a wide range of commands for Salesforce development, including packaging, metadata management, and org management. While it includes some packaging functionalities, it is broader in scope compared to @salesforce/plugin-packaging.
jsforce
The jsforce package is a powerful library for interacting with Salesforce APIs, including metadata and tooling APIs. While it can be used to manage packages programmatically, it is more general-purpose and not specifically focused on packaging like @salesforce/plugin-packaging.
plugin-packaging;
:warning: This module is under heavy development, please do not use in production.
This plugin provides the sfdx cli commands that support Salesforce Packaging Platform
Learn about the plugin-packaging
Install
sfdx plugins:install @salesforce/plugin-packaging@x.y.z
Issues
Please report any issues at https://github.com/forcedotcom/cli/issues
Contributing
- Please read our Code of Conduct
- Create a new issue before starting your project so that we can keep track of
what you are trying to add/fix. That way, we can also offer suggestions or
let you know if there is already an effort in progress.
- Fork this repository.
- Build the plugin locally
- Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
- Edit the code in your fork.
- Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
- Sign CLA (see CLA below).
- Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
CLA
External contributors will be required to sign a Contributor's License
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
Build
To build the plugin locally, make sure to have yarn installed and run the following commands:
git clone git@github.com:salesforcecli/plugin-packaging.git
yarn install
yarn build
To use your plugin, run using the local ./bin/run
or ./bin/run.cmd
file.
./bin/run package:create --help
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
sfdx plugins:link .
sfdx plugins
Commands
sfdx force:package:placeholder [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
USAGE
$ sfdx force:package:placeholder [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
--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
See code: src/commands/force/package/placeholder.ts