npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

prodlysfcli

v1.2.1

Published

A plugin which provides Prodly application commands on top of the Salesforce CLI.

Downloads

197

Readme

prodlysfcli

NPM Downloads/week License

Install

sf plugins install [email protected]

Issues

Please report any issues at https://github.com/prodly/prodly-sf-cli/issues

Build

To build the plugin locally, make sure to have yarn installed and run the following commands:

# Clone the repository
git clone https://github.com/prodly/prodly-sf-cli.git

# Install the dependencies and compile
yarn && yarn build
# Run using local run file.
./bin/run.js prodly:manage -l -p

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 sf cli
sf plugins link .
# To verify
sf plugins

Commands

sf prodly:checkin

USAGE
  $ sf prodly:checkin -v <value> -o <value> [--json] [-b <value>] [-c <value>] [-t <value>] [-i <value>] [-z
    <value>] [-p <value>]

FLAGS
  -b, --branch=<value>          branch name for deployment
  -c, --comment=<value>         (required) comment for the command versioning commit
  -i, --instance=<value>        managed instance ID on which to perform the action
  -o, --target-org=<value>      (required) Username or alias of the target org. Not
                                required if the `target-org` configuration variable is already set.
  -p, --plan=<value>            name or record ID of the deployment plan to deploy
  -q, --filter=<value>          query filter override for a data set deployment
  -t, --dataset=<value>         name or record ID of the data set to deploy
  -v, --target-dev-hub=<value>  (required) Username or alias of the Dev Hub org. Not
                                required if the `target-dev-hub` configuration variable is already set.
  -z, --notes=<value>           notes for the deployment

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  prodly:checkin command

  Save data from a Salesforce environment to a VCS repository branch.

EXAMPLES
  $ sf prodly:checkin --target-org [email protected] --target-dev-hub [email protected]
  Save managed data to the branch associated with the managed instance identified by the target username.
  The instance should be managed by the Prodly account associated with the provided DevHub control org.

  $ sf prodly:checkin -u [email protected]
  Save managed data to the branch associated with the managed instance identified by the target username.
  The instance should be managed by the Prodly account associated with the default DevHub control org.

  $ sf prodly:checkin -i f50616b6-57b1-4941-802f-ee0e2506f217
  Save managed data to the branch associated with the managed instance identified by the provided ID.
  The instance should be managed by the Prodly account associated with the default DevHub control org.

sf prodly:checkout

USAGE
  $ sf prodly:checkout -v <value> -o <value> [--json] [-b <value>] [-t <value>] [-e] [-i <value>] [-n <value>] [-z
    <value>] [-p <value>]

FLAGS
  -b, --branch=<value>          branch name for deployment
  -e, --deactivate              deactivate all events for the deployment
  -i, --instance=<value>        managed instance ID on which to perform the action
  -n, --name=<value>            name for the deployment
  -o, --target-org=<value>      (required) Username or alias of the target org. Not
                                required if the `target-org` configuration variable is already set.
  -p, --plan=<value>            name or record ID of the deployment plan to deploy
  -q, --filter=<value>          query filter override for a data set deployment
  -t, --dataset=<value>         name or record ID of the data set to deploy
  -v, --target-dev-hub=<value>  (required) Username or alias of the Dev Hub org. Not
                                required if the `target-dev-hub` configuration variable is already set.
  -z, --notes=<value>           notes for the deployment

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  prodly:checkout command

  Deploy data from a VCS repository branch to a Salesforce environment.

EXAMPLES
  $ sf prodly:checkin --target-org [email protected] --target-dev-hub [email protected]
  Save managed data to the branch associated with the managed instance identified by the target username.
  The instance should be managed by the Prodly account associated with the provided DevHub control org.

  $ sf prodly:checkin -u [email protected]
  Save managed data to the branch associated with the managed instance identified by the target username.
  The instance should be managed by the Prodly account associated with the default DevHub control org.

  $ sf prodly:checkin -i f50616b6-57b1-4941-802f-ee0e2506f217
  Save managed data to the branch associated with the managed instance identified by the provided ID.
  The instance should be managed by the Prodly account associated with the default DevHub control org.

sf prodly:deploy

USAGE
  $ sf prodly:deploy -v <value> -o <value> [--json] [-t <value>] [-e] [-d <value>] [-q <value>] [-b <value>] [-n
    <value>] [-z <value>] [-p <value>] [-l] [-s <value>]

FLAGS
  -b, --label=<value>           connection and managed instance name
  -d, --destination=<value>     destination managed instance ID
  -e, --deactivate              deactivate all events for the deployment
  -l, --simulation              perform a data simulation
  -n, --name=<value>            name for the deployment
  -o, --target-org=<value>      (required) Username or alias of the target org. Not
                                required if the `target-org` configuration variable is already set.
  -p, --plan=<value>            name or record ID of the deployment plan to deploy
  -q, --filter=<value>          query filter override for a data set deployment
  -s, --source=<value>          source managed instance ID
  -t, --dataset=<value>         name or record ID of the data set to deploy
  -v, --target-dev-hub=<value>  (required) Username or alias of the Dev Hub org. Not
                                required if the `target-dev-hub` configuration variable is already set.
  -z, --notes=<value>           notes for the deployment

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  prodly:deploy command

  Deploy data from one Salesforce environment directly to another Salesforce environment.

EXAMPLES
  $ sf prodly:deploy -n scratchorg -u FixesScratchOrg -v MainDevHub
  Command output... deploying from the dev hub, the control org, to the scratch org, auto managed with provided name.
  Command output...

  $ sf prodly:deploy --target-org [email protected] --target-dev-hub [email protected]
  Command output... deploying from the dev hub, the control org, to the scratch org. Long param names.

  $ sf prodly:deploy -u [email protected] -v [email protected] -d "UAT Sandbox Connection"
  Command output... deploying from the scratch org to the UAT sandbox, using the named connection record in the dev hub, control org.

  $ sf prodly:deploy --target-org [email protected] --target-dev-hub [email protected] --source "UAT Sandbox Connection"
  Command output... deploying to the scratch org from the UAT sandbox, using the named connection record in the dev hub, control org. Long param names.

sf prodly:manage

USAGE
  $ sf prodly:manage -v <value> -o <value> [--json] [-c <value>] [-n <value>] [-i <value>] [-b <value>] [-l] [-m]
    [-p] [-x] [-s]

FLAGS
  -b, --label=<value>           connection and managed instance name
  -c, --comment=<value>         comment for the command versioning commit
  -i, --instance=<value>        managed instance ID on which to perform the action
  -l, --list                    list all managed instances
  -m, --manage                  manage a new instance
  -n, --connection=<value>      connection to use for the managed instance
  -o, --target-org=<value>      (required) Username or alias of the target org. Not
                                required if the `target-org` configuration variable is already set.
  -p, --print                   print the managed instances in a standard format in addition to returning structured
                                data
  -s, --version                 version the new managed instance, branch created and data deployed to the org
  -v, --target-dev-hub=<value>  (required) Username or alias of the Dev Hub org. Not
                                required if the `target-dev-hub` configuration variable is already set.
  -x, --unmanage                unmanage the specified instance

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  prodly:manage command

  Authorize (or unauthorize) a Salesforce environment (not already added to the Environments page in Release tab) for use by the plugin.

EXAMPLES
  $ sf prodly:manage -l -p
  List and print all of the managed instances for the Prodly account associated with the default DevHub control org.

  $ sf prodly:manage -m --target-org [email protected] --target-dev-hub [email protected]
  Manage the org associated with the target username under the Prodly account associated with the provided DevHub control org.

  $ sf prodly:manage -m -u [email protected] -n dev7sbx
  Manage and version the org associated with the target username under the Prodly account associated with the default DevHub control org.

sf prodly:jobs

USAGE
  $ sf prodly:jobs -v <value> -j <value> [--json]

FLAGS
  -j, --job=<value>             (required) Prodly Job ID
  -v, --target-dev-hub=<value>  (required) Username or alias of the Dev Hub org.
                                Not required if the `target-dev-hub` configuration variable is already set.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  prodly:jobs command

  Check the job status.

EXAMPLES
  $ sf prodly:jobs -j jobId -v MainDevHub
  Print the job status for the provided job Id.

sf prodly:version

USAGE
  $ sf prodly:version -s <value> -v <value> -o <value> [--json] [-b <value>] [-i <value>]

FLAGS
  -b, --new-branch=<value>      if provided it creates a new branch based on the source branch that will be used for
                                version control
  -i, --instance=<value>        managed instance ID on which to perform the action
  -o, --target-org=<value>      (required) [default: [email protected]] Username or alias of the target org.
                                Not required if the `target-org` configuration variable is already set.
  -s, --source-branch=<value>   (required) the version control branch or the base for the new branch (if provided)
  -v, --target-dev-hub=<value>  (required) [default: [email protected]] Username or alias of the Dev Hub org.
                                Not required if the `target-dev-hub` configuration variable is already set.

GLOBAL FLAGS
  --json               Format output as json.

DESCRIPTION
  prodly:version command

  Adds version control to a managed environment.

EXAMPLES
  $ sf prodly:version -s main
  Add version control to the managed instance identified by the target org. Use the "main" branch.
  The instance should be managed by the Prodly account associated with the default DevHub control org.

  $ sf prodly:version -s main -b cli-branch -i f50616b6-57b1-4941-802f-ee0e2506f217
  Add version control to the managed instance identified by the provided ID. Use the "main" branch as a base for a new branch called "cli-branch"
  The instance should be managed by the Prodly account associated with the default DevHub control org.

Debugging your plugin

We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the .vscode directory of this plugin is a launch.json config file, which allows you to attach a debugger to the node process when running your commands.

To debug the prodly:manage -l -p command:

  1. Start the inspector

Call your command using the bin/run.js script, set the NODE_OPTIONS environment variable to --inspect-brk when starting the debugger:

$ NODE_OPTIONS=--inspect-brk bin/run.js prodly:manage -l -p
  1. Set some breakpoints in your command code
  2. Click on the Run and Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
  3. In the upper left hand corner of VS Code, verify that the "Attach" launch configuration has been chosen.
  4. Hit the green play button to the left of the "Attach" launch configuration window. The debugger should now be suspended on the first line of the program.
  5. Hit the blue play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5). Congrats, you are debugging!