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

ci-sfdx-plugin

v0.5.3

Published

Set of commands making CI and dev's life easier.

Downloads

111

Readme

ci-sfdx-plugin

Set of commands making CI and dev's life easier.

Version CircleCI Appveyor CI Greenkeeper Known Vulnerabilities Downloads/week License

Intro
Commands
Configuration

Intro

# installation
$ sf plugins install ci-sfdx-plugin

# get info
$ sf plugins inspect ci-sfdx-plugin
$ sf (-h|--help) [COMMAND]

Commands

ci:apex:execute

Executes Apex in an org. Either 'prepush' or 'postpush' flag must be provided.

USAGE
  $ sfdx ci:apex:execute [--prepush] [--postpush] [-x <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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

  -x, --ciconfigfile=ciconfigfile                                                   [default: ciconfig.json] path to a 'ciconfig.json' 
                                                                                    file with 'apexPrePush' or 'apexPostPush' property

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

  --postpush                                                                        executes post-push scripts.

  --prepush                                                                         executes pre-push scripts.

EXAMPLES
  sfdx ci:apex:execute -u orgAlias --prePush
  sfdx ci:apex:execute --postPush

ci:apex:test:run

Run unit tests in an org.

USAGE
  $ sfdx ci:apex:test:run [-l <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -l, --testlevel=RunLocalTests|RunAllTestsInOrg                                    [default: RunLocalTests] specifies which tests to 
                                                                                    run

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

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

EXAMPLES
  sfdx ci:apex:test:run -u orgAlias
  sfdx ci:apex:test:run -u orgAlias --testlevel=RunLocalTests

ci:limits:api:display

Display org's limits.

USAGE
  $ sfdx ci:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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

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

EXAMPLE
  sfdx ci:limits:api:limits -u orgAlias

ci:org:create

Creates a scratch org from your default dev hub. User can be also notified about possibly needed post-org-create manual steps together with instructions how to continue. Different behaviour can be configured for CI environment.

USAGE
  $ sfdx ci:org:create [-a <string>] [-d <number>] [-f <string>] [--ci] [-t <number>] [-x <filepath>] [-v <string>] [--apiversion 
  <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -a, --setalias=setalias                                                           alias for the created org

  -d, --durationdays=durationdays                                                   [default: 30] duration of the scratch org (in days) 
                                                                                    (min:1, max:30)

  -f, --definitionfile=definitionfile                                               [default: config/project-scratch-def.json] path to 
                                                                                    an org definition file

  -t, --validationtimeout=validationtimeout                                         [default: 30] timeout in seconds before org 
                                                                                    validation happens

  -v, --targetdevhubusername=targetdevhubusername                                   username or alias for the dev hub org; overrides 
                                                                                    default dev hub org

  -x, --ciconfigfile=ciconfigfile                                                   [default: ciconfig.json] path to a 'ciconfig.json' 
                                                                                    file with 'projectName' property

  --apiversion=apiversion                                                           override the api version used for api requests made 
                                                                                    by this command

  --ci                                                                              set for CI environment

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

EXAMPLES
  sfdx ci:org:create -a orgAlias
  sfdx ci:org:create --setalias orgAlias --definitionfile config/project-scratch-def.json
  sfdx ci:org:create --setalias orgAlias --ci -validationtimeout 60

ci:org:delete

Delete a scratch org. Either explicitly specified org or the default one, if any.

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

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

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

EXAMPLE
  sfdx ci:org:delete -u orgAlias

ci:org:printurl

Display navigation URL for either specified org or the default one, if any, but don’t launch browser.

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

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

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

EXAMPLE
  sfdx ci:org:printurl -u orgAlias

ci:package:install

Installs packages into an org.

USAGE
  $ sfdx ci:package:install [-s <string>] [-p <string>] [-x <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -p, --package=package                                                             ID (starts with 04t) or alias of the package version 
                                                                                    to install, overrides 'ciconfig.json' configuration

  -s, --securitytype=AllUsers|AdminsOnly                                            [default: AdminsOnly] security access type for the 
                                                                                    installed package

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

  -x, --ciconfigfile=ciconfigfile                                                   [default: ciconfig.json] path to a 'ciconfig.json' 
                                                                                    file with 'packageIds' array property

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

EXAMPLES
  sfdx ci:package:install -u orgAlias
  sfdx ci:package:install --targetusername orgAlias --package 04t0W000001MRQIQA4

ci:source:push

Pushes DX source into an org.

USAGE
  $ sfdx ci:source:push [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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

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

EXAMPLE
  sfdx ci:source:push -u orgAlias

ci:source:sort

Sort selected metadata. Profiles, permission sets, muting permission sets and permission set groups are sorted by default.

USAGE
  $ sfdx ci:source:sort [-d <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -d, --directory=directory                                                         [default: src/main/default] relative path to the 
                                                                                    parent folder of metadata ('profiles' etc. folders 
                                                                                    inside)

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

EXAMPLES
  sfdx ci:source:sort
  sfdx ci:source:sort -d '~/projects/project-dx/src/main/default'

ci:user:assign:permsetgroup

Assigns permission set groups to an authenticated user.

USAGE
  $ sfdx ci:user:assign:permsetgroup [-n <string>] [-x <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -n, --permsetgroupname=permsetgroupname                                           permission set group name to assign

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

  -x, --ciconfigfile=ciconfigfile                                                   [default: ciconfig.json] path to a 'ciconfig.json' 
                                                                                    file with 'permsetGroups' array property

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

EXAMPLES
  sfdx ci:user:assign:permsetgroup -u orgAlias
  sfdx ci:user:assign:permsetgroup --targetusername orgAlias --permsetgroupname PermsetGroup_DevName

ci:user:assign:profile

Assigns profile to the currently authenticated user.

USAGE
  $ sfdx ci:user:assign:profile [-n <string>] [-x <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -n, --profilename=profilename                                                     profile name to assign

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

  -x, --ciconfigfile=ciconfigfile                                                   [default: ciconfig.json] path to a 'ciconfig.json' 
                                                                                    file with 'profile' property

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

EXAMPLES
  sfdx ci:user:assign:profile -u orgAlias
  sfdx ci:user:assign:profile --targetusername orgAlias --profilename "Custom Admin Profile"

Configuration

  • Complete example of ciconfig.json file which should be placed in the root of your DX project.
    {
        "projectName": "my-project",
        "packageIds": [
            {
                "id": "04t1W000000aaa4QAK"
            },
            {
                "id": "04t2E000000bbbxQAA",
                "name": "name of this package",
                "versionNumber": "2.14"
            }
        ],
        "apexPrePush": [
            "scripts/anonymous-apex/enableMarketingUser.apex"
        ],
        "apexPostPush": [
            "scripts/anonymous-apex/insertCustomSettings.apex"
        ],
        "profile": "My Admin Profile",
        "permsetGroups": [
            "Admin_Application_Access",
            "Admin_Accounts_Access"
        ],
        "postCreateManualSteps": {
            "apexOrgVerification": "scripts/anonymous-apex/verifyOrgFeatures.apex",
            "continueInstruction": "Please, continue by running '...' command.",
            "features": [
                {
                    "name": "ContactsToMultipleAccounts",
                    "manualStepDescription": "Open the new scratch org, go to Setup/Account Settings and enable 'Allow users to relate a contact to multiple accounts'."
                },
                {
                    "manualStepDescription": "Open the new scratch org, go to Setup/Asset Settings and turn on 'Enable Asset Sharing'."
                }
            ],
            "settings": {
                "accountSettings": {
                    "enableRelateContactToMultipleAccounts": true
                }
            }
        }
    }