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

spm-plugin

v1.0.8

Published

A Salesforce CLI plugin for interacting with the Salesforce Package Manager (SPM) registry

Downloads

55

Readme

npm

Salesforce Package Manager (SPM) Plugin

A Salesforce CLI plugin for interacting with the unofficial Salesforce Package Manager (SPM) registry.

In short: this plugin provides a user-friendly way to install Salesforce packages using a package name instead fo the package version ID. Moving from sfdx force:package:install -p 04t1t000003DLAL ...to sfdx spm:install -n 'Streaming Monitor'.

Plugin installation

Install the plugin by running this command in a terminal:

sfdx plugins:install spm-plugin

Overview

As the saying goes "a picture is worth a thousand words" so here's how the Salesforce Package Manager (SPM) works:

Installing a package

Installing a package

Publishing a package

Note You do not need to own a package in order to publish it. You just need to know the package version ID.

Publishing a package

Setting up a Private Registry

You can set up a private registry by following these instructions:

  1. Install the SPM Registry server
  2. Use the SPM plugin with the -z or --registryurl flag:
    sfdx spm:install -n 'Streaming Monitor' --registryurl http://localhost:3002/

Command Reference

This doc section is auto generated.

$ npm install -g spm-plugin
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
spm-plugin/1.0.7 darwin-x64 node-v14.17.3
$ sfdx --help [COMMAND]
USAGE
  $ sfdx COMMAND
...

sfdx spm:install -n <string> [-v <string>] [-i] [-z <url>] [-a all|package] [-b <minutes>] [-k <string>] [-r] [-s AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

installs a package from the SPM registry

USAGE
  $ sfdx spm:install -n <string> [-v <string>] [-i] [-z <url>] [-a all|package] [-b <minutes>] [-k <string>] [-r] [-s 
  AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-w <minutes>] [-u <string>] [--apiversion <string>] [--json] 
  [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -a, --apexcompile=(all|package)
      compile all Apex in the org and package, or only Apex in the package; unlocked packages only

  -b, --publishwait=publishwait
      number of minutes to wait for subscriber package version ID to become available in the target org

  -i, --includebeta
      whether beta versions are included when searching for the latest versions

  -k, --installationkey=installationkey
      installation key for key-protected package

  -n, --name=name
      (required) name of the package as specified in the SPM registry

  -r, --noprompt
      do not prompt for confirmation

  -s, --securitytype=(AllUsers|AdminsOnly)
      [default: AdminsOnly] security access type for the installed package (deprecation notice: The default --securitytype
      value will change from AllUsers to AdminsOnly in v47.0 or later.)

  -t, --upgradetype=(DeprecateOnly|Mixed|Delete)
      [default: Mixed] the upgrade type for the package installation; available only for unlocked packages

  -u, --targetusername=targetusername
      username or alias for the target org; overrides default target org

  -v, --version=version
      [default: latest] version of the package as specified in the SPM registry

  -w, --wait=wait
      number of minutes to wait for installation status

  -z, --registryurl=registryurl
      the URL for a private SPM registry. If not specified, the public SPM registry is used.

  --apiversion=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

DESCRIPTION
  This commands locates the package version ID thanks to the SPM registry and uses 'force:package:install' to install 
  it.
  All 'force:package:install' options are supported appart from '-p, --package'.
  The following flags are specific to this command:
       -n, --name=name
       -v, --version=version
       -i, --includebeta
       -z, --registryurl

EXAMPLES
  $ sfdx spm:install -n 'Streaming Monitor' -u myOrg
      Querying SPM registry... done
      Found package 'Streaming [email protected]' with ID 04t1t000003DLAL

      sfdx force:package:install --package 04t1t000003DLAL --targetusername myOrg --loglevel warn

      PackageInstallRequest is currently InProgress. You can continue to query the status using
      sfdx force:package:install:report -i 0Hf3F0000005lG0SAI -u [email protected]


  $ sfdx spm:install -n Quiz -i -u quizOrg -w 10
      Querying SPM registry... done
      Found package '[email protected]' with ID 04t5p000001BloG

      sfdx force:package:install --package 04t5p000001BloG --targetusername quizOrg --wait 10 --loglevel warn

      This package might send or receive data from these third-party websites:

      https://chart.googleapis.com

      Grant access (y/n)?: y

      Waiting for the package install request to complete. Status = IN_PROGRESS
      Waiting for the package install request to complete. Status = IN_PROGRESS
      Successfully installed package [04t5p000001BloG]

See code: src/commands/spm/install.ts

sfdx spm:publish -v <string> [-z <url>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

publishes a package to the SPM registry

USAGE
  $ sfdx spm:publish -v <string> [-z <url>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -v, --version=version                                                             (required) Salesforce package
                                                                                    version ID. A 15 or 18 character
                                                                                    string that starts with '04t'

  -z, --registryurl=registryurl                                                     the URL for a private SPM registry.
                                                                                    If not specified, the public SPM
                                                                                    registry is used.

  --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

EXAMPLE
  $ sfdx spm:publish -v 04t1t000003DLAL
      Updating SPM registry... done
      Published package version:
      description:   Developer/Admin tool that lets you monitor streaming events (PushTopic, generic, standard/custom 
  platform events, CDC and monitoring events)
      id:            04t1t000003DLAL
      name:          Streaming Monitor
      publisher:     Salesforce Labs*
      versionName:   Fixed custom CDC detection
      versionNumber: 3.2

See code: src/commands/spm/publish.ts