@dx-cli-toolbox/sfdx-toolbox-project-utils

0.0.9 • Public • Published

@dx-cli-toolbox/sfdx-toolbox-project-utils

Various commands to aid with building of SFDX projects

Version CircleCI Appveyor CI Codecov Greenkeeper Known Vulnerabilities Downloads/week License

$ npm install -g @dx-cli-toolbox/sfdx-toolbox-project-utils
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
@dx-cli-toolbox/sfdx-toolbox-project-utils/0.0.9 darwin-x64 node-v17.0.1
$ sfdx --help [COMMAND]
USAGE
  $ sfdx COMMAND
...

sfdx toolbox:project:build -s -a <string> [-p] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-w <number>] [-d <integer>] [-a all|package] [-b <string>] [--dryrun] [-k <string>] [--noprecheck] [-p] [-s AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project build command description

USAGE
  $ sfdx toolbox:project:build -s -a <string> [-p] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-w 
  <number>] [-d <integer>] [-a all|package] [-b <string>] [--dryrun] [-k <string>] [--noprecheck] [-p] [-s 
  AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-v <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -a, --apexcompile=(all|package)
      [default: all] compile all Apex in the org and package, or only Apex in the package

  -a, --setalias=setalias
      (required) alias for the created org

  -b, --branch=branch
      For dependencies specified by package/versionNumber combination, you can specify the branch group of builds to work
      from by entering the branch build name.  If not specified, the builds from NULL branch will be considered.

  -c, --noancestors
      do not include second-generation package ancestors in the scratch org

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

  -f, --definitionfile=definitionfile
      path to an org definition file

  -i, --clientid=clientid
      connected app consumer key; not supported for sandbox org creation

  -k, --installationkeys=installationkeys
      Installation key for key-protected packages (format is 1:MyPackage1Key 2: 3:MyPackage3Key... to allow some packages
      without installation key)

  -n, --nonamespace
      create the scratch org with no namespace

  -p, --noprompt
      no prompt to confirm deletion

  -p, --prompt
      Require approval to allow Remote Site Settings and Content Security Policy websites to send or receive data

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

  -s, --setdefaultusername
      (required) set the created org as the default username

  -t, --type=(scratch|sandbox)
      [default: scratch] type of org to create

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

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

  -w, --wait=wait
      Number of minutes to wait for installation status (also used for publishwait). Default is 10

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

  --dryrun
      Allows the command to execute and display result information without actually performing the package installations.
      Useful if debugging.

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

  --noprecheck
      Allows the command to bypass the pre-check of the target org and force install all packages even if they are already
      installed.

EXAMPLE
  TODO toolbox project build examples description

See code: src/commands/toolbox/project/build.ts

sfdx toolbox:project:build:configure [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project build configure command description

USAGE
  $ sfdx toolbox:project:build:configure [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  --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
  TODO toolbox project build configure examples description

See code: src/commands/toolbox/project/build/configure.ts

sfdx toolbox:project:dataload [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project dataload command description

USAGE
  $ sfdx toolbox:project:dataload [-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
  TODO toolbox project dataload examples description

See code: src/commands/toolbox/project/dataload.ts

sfdx toolbox:project:postpackage:deploy [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project postpackage deploy command description

USAGE
  $ sfdx toolbox:project:postpackage:deploy [-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
  TODO toolbox project postpackage deploy examples description

See code: src/commands/toolbox/project/postpackage/deploy.ts

sfdx toolbox:project:stage:compilation [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project stage compilation command description

USAGE
  $ sfdx toolbox:project:stage:compilation [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-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

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

  --scope=(BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY)                               [default: BASIC] Which scope the
                                                                                    command will execute under.

EXAMPLE
  TODO toolbox project stage compilation examples description

See code: src/commands/toolbox/project/stage/compilation.ts

sfdx toolbox:project:stage:initialization -s -a <string> [-p] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i <string>] [-w <minutes>] [-d <integer>] [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project stage initialization command description

USAGE
  $ sfdx toolbox:project:stage:initialization -s -a <string> [-p] [-t scratch|sandbox] [-f <filepath>] [-n] [-c] [-i 
  <string>] [-w <minutes>] [-d <integer>] [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u 
  <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -a, --setalias=setalias                                                           (required) alias for the created org

  -c, --noancestors                                                                 do not include second-generation
                                                                                    package ancestors in the scratch org

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

  -f, --definitionfile=definitionfile                                               path to an org definition file

  -i, --clientid=clientid                                                           connected app consumer key; not
                                                                                    supported for sandbox org creation

  -n, --nonamespace                                                                 create the scratch org with no
                                                                                    namespace

  -p, --noprompt                                                                    no prompt to confirm deletion

  -s, --setdefaultusername                                                          (required) set the created org as
                                                                                    the default username

  -t, --type=(scratch|sandbox)                                                      [default: scratch] type of org to
                                                                                    create

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

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

  -w, --wait=wait                                                                   [default: [object Object]] the
                                                                                    streaming client socket timeout (in
                                                                                    minutes)

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

  --scope=(BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY)                               [default: BASIC] Which scope the
                                                                                    command will execute under.

EXAMPLE
  TODO toolbox project stage initialization examples description

See code: src/commands/toolbox/project/stage/initialization.ts

sfdx toolbox:project:stage:processresources [-a all|package] [-b <string>] [--dryrun] [-k <string>] [--noprecheck] [-p] [-s AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-w <number>] [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project stage processresources command description

USAGE
  $ sfdx toolbox:project:stage:processresources [-a all|package] [-b <string>] [--dryrun] [-k <string>] [--noprecheck] 
  [-p] [-s AllUsers|AdminsOnly] [-t DeprecateOnly|Mixed|Delete] [-w <number>] [--scope 
  BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

OPTIONS
  -a, --apexcompile=(all|package)
      [default: all] compile all Apex in the org and package, or only Apex in the package

  -b, --branch=branch
      For dependencies specified by package/versionNumber combination, you can specify the branch group of builds to work
      from by entering the branch build name.  If not specified, the builds from NULL branch will be considered.

  -k, --installationkeys=installationkeys
      Installation key for key-protected packages (format is 1:MyPackage1Key 2: 3:MyPackage3Key... to allow some packages
      without installation key)

  -p, --prompt
      Require approval to allow Remote Site Settings and Content Security Policy websites to send or receive data

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

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

  -w, --wait=wait
      Number of minutes to wait for installation status (also used for publishwait). Default is 10

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

  --dryrun
      Allows the command to execute and display result information without actually performing the package installations.
      Useful if debugging.

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

  --noprecheck
      Allows the command to bypass the pre-check of the target org and force install all packages even if they are already
      installed.

  --scope=(BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY)
      [default: BASIC] Which scope the command will execute under.

EXAMPLE
  TODO toolbox project stage processresources examples description

See code: src/commands/toolbox/project/stage/processresources.ts

sfdx toolbox:project:stage:test [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project stage testing command description

USAGE
  $ sfdx toolbox:project:stage:test [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [-v <string>] [-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

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

  --scope=(BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY)                               [default: BASIC] Which scope the
                                                                                    command will execute under.

EXAMPLE
  TODO toolbox project stage testing examples description

See code: src/commands/toolbox/project/stage/test.ts

sfdx toolbox:project:stage:validation [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

TODO: toolbox project stage validation command description

USAGE
  $ sfdx toolbox:project:stage:validation [--scope BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

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

  --scope=(BASIC|COMPLETE|DATALOAD|POSTPACKAGEDEPLOY)                               [default: BASIC] Which scope the
                                                                                    command will execute under.

EXAMPLE
  TODO toolbox project stage validation examples description

See code: src/commands/toolbox/project/stage/validation.ts

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 hello:org command:

  1. Start the inspector

If you linked your plugin to the sfdx cli, call your command with the dev-suspend switch:

$ sfdx hello:org -u myOrg@example.com --dev-suspend

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

$ NODE_OPTIONS=--inspect-brk bin/run hello:org -u myOrg@example.com
  1. Set some breakpoints in your command code
  2. Click on the 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 to Remote" launch configuration has been chosen.
  4. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program.
  5. Hit the green 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!

Readme

Keywords

Package Sidebar

Install

npm i @dx-cli-toolbox/sfdx-toolbox-project-utils

Weekly Downloads

10

Version

0.0.9

License

MIT

Unpacked Size

209 kB

Total Files

118

Last publish

Collaborators

  • imjohnmdaniel