New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@salesforce/plugin-signups

Package Overview
Dependencies
Maintainers
52
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/plugin-signups

Commands to interact with org shapes

  • 1.4.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
52
Created
Source

plugin-signups

NPM Downloads/week License

Learn about the plugin-signups

Salesforce CLI plugins are based on the oclif plugin framework. Read the plugin developer guide to learn about Salesforce CLI plugin development.

This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the node developer packages used by Salesforce. There is also a default circleci config using the release management orb standards.

Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the posttest script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.

Everything past here is only a suggestion as to what should be in your specific plugin's description

This plugin is bundled with the Salesforce CLI. For more information on the CLI, read the getting started guide.

We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.

Install

sfdx plugins:install signups@x.y.z

Issues

Please report any issues at https://github.com/forcedotcom/cli/issues

Contributing

  1. Please read our Code of Conduct
  2. 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.
  3. Fork this repository.
  4. Build the plugin locally
  5. Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
  6. Edit the code in your fork.
  7. 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.
  8. Sign CLA (see CLA below).
  9. 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:

# Clone the repository
git clone git@github.com:salesforcecli/plugin-signups

# Install the dependencies and compile
yarn install
yarn build

To use your plugin, run using the local ./bin/dev or ./bin/dev.cmd file.

# Run using local run file.
./bin/dev force:org:shape

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.

# Link your plugin to the sfdx cli
sfdx plugins:link .
# To verify
sfdx plugins

Commands

sfdx force:org:shape:create [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Create a scratch org configuration (shape) based on the specified source org

USAGE
  $ sfdx force:org:shape:create [-u <string>] [--apiversion <string>] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -u, --targetusername=<value>                                                      username or alias for the target
                                                                                    org; overrides default target org
  --apiversion=<value>                                                              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

DESCRIPTION
  Create a scratch org configuration (shape) based on the specified source org

EXAMPLES
  $ sfdx force:org:shape:create -u me@my.org

  $ sfdx force:org:shape:create -u me@my.org --json --loglevel debug

See code: src/commands/force/org/shape/create.ts

sfdx force:org:shape:delete [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Delete all org shapes for a target org

USAGE
  $ sfdx force:org:shape:delete [-p] [-u <string>] [--apiversion <string>] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -p, --noprompt                                                                    do not prompt for confirmation
  -u, --targetusername=<value>                                                      username or alias for the target
                                                                                    org; overrides default target org
  --apiversion=<value>                                                              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

DESCRIPTION
  Delete all org shapes for a target org

EXAMPLES
  $ sfdx force:org:shape:delete -u me@my.org

  $ sfdx force:org:shape:delete -u MyOrgAlias -p

  $ sfdx force:org:shape:delete -u me@my.org --json

  $ sfdx force:org:shape:delete -u me@my.org -p --json > tmp/MyOrgShapeDelete.json

See code: src/commands/force/org/shape/delete.ts

sfdx force:org:shape:list [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

List all org shapes you’ve created

USAGE
  $ sfdx force:org:shape:list [--verbose] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  --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
  --verbose                                                                         list more information about each org
                                                                                    shape

DESCRIPTION
  List all org shapes you’ve created

EXAMPLES
  $ sfdx force:org:shape:list

  $ sfdx force:org:shape:list --json

  $ sfdx force:org:shape:list --json > tmp/MyOrgShapeList.json

See code: src/commands/force/org/shape/list.ts

sfdx force:org:snapshot:create -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

create a snapshot of a scratch org

USAGE
  $ sfdx force:org:snapshot:create -o <string> -n <string> [-d <string>] [-v <string>] [--apiversion <string>] [--json]
    [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -d, --description=<value>                                                         description of snapshot
  -n, --snapshotname=<value>                                                        (required) unique name of snapshot
  -o, --sourceorg=<value>                                                           (required) ID or locally
                                                                                    authenticated username or alias of
                                                                                    scratch org to snapshot
  -v, --targetdevhubusername=<value>                                                username or alias for the dev hub
                                                                                    org; overrides default dev hub org
  --apiversion=<value>                                                              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

DESCRIPTION
  create a snapshot of a scratch org

  A snapshot is a point-in-time copy of a scratch org. The copy is stored in Salesforce and referenced by its unique
  name in a scratch org definition file.

  Use "sfdx force:org:snapshot:get" to get details, including status, about a snapshot creation request.

  To create a scratch org from a snapshot, include the "snapshot" entry (instead of "edition") in the scratch org
  definition file and set it to the name of the snapshot. Then use "sfdx force:org:create" to create the scratch org.

EXAMPLES
  Create a snapshot called "Dependencies" using the source scratch org ID:

  $ sfdx force:org:snapshot:create --sourceorg 00Dxx0000000000 --snapshotname Dependencies --description 'Contains PackageA v1.1.0'

  Create a snapshot called "NightlyBranch" using the source scratch org username:

  $ sfdx force:org:snapshot:create -o myuser@myorg -n NightlyBranch -d 'Contains PkgA v2.1.0 and PkgB 3.3.0'

See code: src/commands/force/org/snapshot/create.ts

sfdx force:org:snapshot:delete -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

delete a scratch org snapshot

USAGE
  $ sfdx force:org:snapshot:delete -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -s, --snapshot=<value>                                                            (required) name or ID of snapshot to
                                                                                    delete
  -v, --targetdevhubusername=<value>                                                username or alias for the dev hub
                                                                                    org; overrides default dev hub org
  --apiversion=<value>                                                              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

DESCRIPTION
  delete a scratch org snapshot

  Dev Hub admins can delete any snapshot, while users can delete only theirs unless a Dev Hub admin gives the user
  Modify All permissions.

EXAMPLES
  Delete a snapshot from the default Dev Hub using the snapshot ID:

  $ sfdx force:org:snapshot:delete --snapshot 0Oo...

  Delete a snapshot from the specified Dev Hub using the snapshot name:

  $ sfdx force:org:snapshot:delete -s BaseSnapshot -v SnapshotDevHub

See code: src/commands/force/org/snapshot/delete.ts

sfdx force:org:snapshot:get -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

get details about a scratch org snapshot

USAGE
  $ sfdx force:org:snapshot:get -s <string> [-v <string>] [--apiversion <string>] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -s, --snapshot=<value>                                                            (required) name or ID of snapshot to
                                                                                    retrieve
  -v, --targetdevhubusername=<value>                                                username or alias for the dev hub
                                                                                    org; overrides default dev hub org
  --apiversion=<value>                                                              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

DESCRIPTION
  get details about a scratch org snapshot

  Snapshot creation can take a while. Use this command with the snapshot name or ID to check its creation status. Once
  the status changes to Active, you can use the snapshot to create scratch orgs.

  To create a snapshot, use the "sfdx force:org:snapshot:create" command. To retrieve a list of all snapshots, use "sfdx
  force:org:snapshot:list".

EXAMPLES
  Get snapshot details using its ID:

  $ sfdx force:org:snapshot:get --snapshot 0Oo...

  Get snapshot details using its name:

  $ sfdx force:org:snapshot:get -s Dependencies

See code: src/commands/force/org/snapshot/get.ts

sfdx force:org:snapshot:list [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

list scratch org snapshots

USAGE
  $ sfdx force:org:snapshot:list [-v <string>] [--apiversion <string>] [--json] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -v, --targetdevhubusername=<value>                                                username or alias for the dev hub
                                                                                    org; overrides default dev hub org
  --apiversion=<value>                                                              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

DESCRIPTION
  list scratch org snapshots

  You can view all the snapshots in a Dev Hub that you have access to. If you’re an admin, you can see all snapshots
  associated with the Dev Hub org. If you’re a user, you can see only your snapshots unless a Dev Hub admin gives you
  View All permissions.

  To create a snapshot, use the "sfdx force:org:snapshot:create" command. To get details about a snapshot request, use
  "sfdx force:org:snapshot:get".

EXAMPLES
  List snapshots in the default Dev Hub:

  $ sfdx force:org:snapshot:list

  List snapshots in the Dev Hub with the specified username:

  $ sfdx force:org:snapshot:list -v OtherDevHub@example.com

See code: src/commands/force/org/snapshot/list.ts

Keywords

FAQs

Package last updated on 25 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc