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 🙏

© 2026 – Pkg Stats / Ryan Hefner

plugin-switch

v0.0.3

Published

Before you generate a new Salesforce plugin, set up these prerequisites.

Readme

Set Up Your Dev Environment

Before you generate a new Salesforce plugin, set up these prerequisites.

Install or update Node.js.

To build a Salesforce CLI plugin, you need the latest long-term support (LTS) version of Node.js. If you’re new to Node.js development, we suggest that you use nvm (Node Version Manager) to install Node.js. See this installation script to install or update nvm.

To check your Node.js version, run:

node --version
If your node version is earlier than 8 (or if you don’t have Node.js installed), run this command to install LTS:
sudo npm install -g yarn
Install TypeScript (target es2017.)

```bash
npm install -g typescript

Salesforce CLI plugins can use JavaScript instead of TypeScript, but the classes in the Salesforce DX core library are written in TypeScript.

Install or update Salesforce CLI.

If you don’t have Salesforce CLI installed on your computer, see Install the Salesforce CLI in the Salesforce CLI Setup Guide to install both the sfdx and sf executables. After installing, update Salesforce CLI to ensure you’re on the latest version; this command updates both executables.

sfdx update
We recommend you use Visual Studio Code with Salesforce Extensions as your IDE, because it includes tools for developing on the Salesforce platform.

Install(not ready)

sf plugins install @salesforce/[email protected]

Build(use git)

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

# Clone the repository
git clone https://github.com/nphan-sts/plugin-switch.git

# Install the dependencies and compile
cd plugin-switch
yarn && yarn build
# Link your plugin to the sf cli
sf plugins link .
# To verify
sf plugins
# Create SFDX project with manifest
cd ../
sfdx force:project:create --projectname "plugin-switch-sfdx" --manifest
cd plugin-switch-sfdx
git init

Copy package.xml in LPC-830 to package.xml file

Commands

SFDX project is required

  • [sf switch retrieve']

sf switch retrieve'

USAGE
  $ sf switch retrieve -x <value> [--json]

FLAGS
  -x, --package=<value>  (required) Retrieve Flows, Validation Rules, Apex triggers, Process builders defined in package.xml.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION

  Retrieve Flows, Validation Rules, Apex triggers, Process builders defined in package.xml.

EXAMPLES
  '$ sf switch:retrieve --package path/to/package.xml'
  • [sf switch switchOff']

sf switch switchOff'

USAGE $ sf switch switchOff -x [--json]

FLAGS -x, --package= (required) Change Flows,Process builders activeVersionNumber to 0, Validation Rules active to false, Apex triggers status to Inactive. then deploy to the org.

GLOBAL FLAGS --json Format output as json.

DESCRIPTION

Change Flows,Process builders activeVersionNumber to 0, Validation Rules active to false, Apex triggers status to Inactive. then deploy to the org.

EXAMPLES $ sf switch switchOff --package path/to/package.xml

  • [sf switch switchOn']

sf switch switchOn'

Change Flows, Validation Rules, Apex triggers, Process builders to original version.

USAGE $ sf switch switchOn -x [--json]

FLAGS -x, --package= (required) Change Flows, Validation Rules, Apex triggers, Process builders to original version. then deploy to the org.

GLOBAL FLAGS --json Format output as json.

DESCRIPTION

Change Flows, Validation Rules, Apex triggers, Process builders to original version. then deploy to the org.

EXAMPLES $ sf switch switchOn --package path/to/package.xml