@pexlify/booker-sfdx-plugin
v1.0.0
Published
Helper commands and extra utilities for Salesforce Development
Downloads
127
Maintainers
Readme
@pexlify/booker-sfdx-plugin
Helper CLI for Salefsorce DX commands and extra utilities for Salesforce Development
$ sfdx plugins:install @pexlify/booker-sfdx-plugin
$ sfdx booker:COMMAND
running command...
$ sfdx --help booker:[COMMAND]
sfdx booker:bitbucket:auth:store -u <string> -k <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:pipeline:disable [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:pipeline:enable [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:repository:create [-w <string>] [-r <string>] [-d <string>] [--forkpolicy <string>] [-p <string>] [--ispublic] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:reviewer:add -R <array> [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:reviewer:delete -R <array> [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:reviewer:list [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:variable:create -n <string> -v <string> [-w <string>] [-r <string>] [-s] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:variable:delete -n <string> [-w <string>] [-r <string>] [-p] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:variable:list [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:workspace:member:list [-w <string>] [-r <string>] [--limit <number>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:cert:create [-p <directory>] [-s <number>] [-d <number>] [-a sha256|sha1] [--commonname <string>] [--countryname <string>] [--localityname <string>] [--stateorprovincename <string>] [--organizationname <string>] [--organizationalunitname <string>] [-e <email>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:cert:decrypt --key <string> --iv <string> [--in <filepath>] [--out <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:connectedapp:create -e <email> -n <string> [-c <string>] [-d <string>] [-g | -f <filepath>] [-l <string>] [--refreshtokenpolicy zero|infinite|specific_lifetime|specific_inactivity] [--generatepermissionset [--permissionsetname <string> --isadminapproved]] [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:project:set -w <string> [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx booker:bitbucket:auth:store -u <string> -k <string> [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
authorize an user using an AppPassword
USAGE
$ sfdx booker:bitbucket:auth:store -u <string> -k <string> [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-k, --password=password (required) bitbucket app password
-u, --username=username (required) bitbucket username
--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 booker:bitbucket:auth:store -u myBitbucketUser -k MyAppPassword
sfdx booker:bitbucket:pipeline:disable [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
disable pipelines in the given repository
USAGE
$ sfdx booker:bitbucket:pipeline:disable [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:pipeline:disable
$ sfdx booker:bitbucket:pipeline:disable -w myBitbucketUser -r demo-repo
sfdx booker:bitbucket:pipeline:enable [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
enable pipelines in the given repository
USAGE
$ sfdx booker:bitbucket:pipeline:enable [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:pipeline:enable
$ sfdx booker:bitbucket:pipeline:enable -w myBitbucketUser -r demo-repo
sfdx booker:bitbucket:repository:create [-w <string>] [-r <string>] [-d <string>] [--forkpolicy <string>] [-p <string>] [--ispublic] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
creates a new repository
USAGE
$ sfdx booker:bitbucket:repository:create [-w <string>] [-r <string>] [-d <string>] [--forkpolicy <string>] [-p
<string>] [--ispublic] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --description=description repository description
-p, --project=project related project of the repository.
This is mandatory if associated to
an Organization workspace
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--forkpolicy=allow_forks|no_public_forks|no_forks [default: no_forks] specify the fork
policy for this repository
--ispublic marks the repository as public
(private by default)
--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 booker:bitbucket:repository:create
$ sfdx booker:bitbucket:repository:create -w MyOrganizationSlug
$ sfdx booker:bitbucket:repository:create --project KEY
sfdx booker:bitbucket:reviewer:add -R <array> [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
add default reviewers to a repository
USAGE
$ sfdx booker:bitbucket:reviewer:add -R <array> [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-R, --reviewers=reviewers (required) comma-separated list of
usernames
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:reviewer:add -R john_doe
$ sfdx booker:bitbucket:reviewer:add -w myBitbucketUser -r demo-repo -R "john_doe,jane_doe"
sfdx booker:bitbucket:reviewer:delete -R <array> [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
delete default reviewers in a repository
USAGE
$ sfdx booker:bitbucket:reviewer:delete -R <array> [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-R, --reviewers=reviewers (required) comma-separated list of
usernames
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:reviewer:delete -R john_doe
$ sfdx booker:bitbucket:reviewer:delete -w myBitbucketUser -r demo-repo -R "john_doe,jane_doe"
sfdx booker:bitbucket:reviewer:list [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
display repository default reviewers
USAGE
$ sfdx booker:bitbucket:reviewer:list [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:reviewer:list
$ sfdx booker:bitbucket:reviewer:list -w myBitbucketUser -r demo-repo
sfdx booker:bitbucket:variable:create -n <string> -v <string> [-w <string>] [-r <string>] [-s] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
creates a repository level variable
USAGE
$ sfdx booker:bitbucket:variable:create -n <string> -v <string> [-w <string>] [-r <string>] [-s] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-n, --name=name (required) unique name of the
variable
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-s, --secured if true, this variable will be
treated as secured. The value will
never be exposed in the logs or the
REST API
-v, --value=value (required) value of the variable
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:variable:create -n MY_VAR -v VAR_VALUE
$ sfdx booker:bitbucket:variable:create --name var_name --value var_value --secured
$ sfdx booker:bitbucket:variable:create -r repo_slug -w workspace_name -n MY_VAR -v VAR_VALUE
sfdx booker:bitbucket:variable:delete -n <string> [-w <string>] [-r <string>] [-p] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
delete a repository level variable
USAGE
$ sfdx booker:bitbucket:variable:delete -n <string> [-w <string>] [-r <string>] [-p] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-n, --name=name (required) unique name of the
variable
-p, --noprompt do not prompt for delete
confirmation
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:variable:delete -n MY_VAR
$ sfdx booker:bitbucket:variable:delete -r repo_slug -w workspace_name -n MY_VAR
sfdx booker:bitbucket:variable:list [-w <string>] [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
find repository level variables
USAGE
$ sfdx booker:bitbucket:variable:list [-w <string>] [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--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 booker:bitbucket:variable:list
$ sfdx booker:bitbucket:variable:list -w myBitbucketUser -r demo-repo
sfdx booker:bitbucket:workspace:member:list [-w <string>] [-r <string>] [--limit <number>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
list members of a workspace
USAGE
$ sfdx booker:bitbucket:workspace:member:list [-w <string>] [-r <string>] [--limit <number>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --reposlug=reposlug target repository slug (name on
url); overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
-w, --workspace=workspace target bitbucket workspace/account;
overrides config on
`sfdx-project.json>plugins>bookerSfd
xPlugin`
--json format output as json
--limit=limit [default: 100] number of elements
returned
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
EXAMPLES
$ sfdx booker:bitbucket:workspace:member:list
$ sfdx booker:bitbucket:workspace:member:list -r repository -w workspaceName
sfdx booker:cert:create [-p <directory>] [-s <number>] [-d <number>] [-a sha256|sha1] [--commonname <string>] [--countryname <string>] [--localityname <string>] [--stateorprovincename <string>] [--organizationname <string>] [--organizationalunitname <string>] [-e <email>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
creates selfsigned certificates for your connected app
USAGE
$ sfdx booker:cert:create [-p <directory>] [-s <number>] [-d <number>] [-a sha256|sha1] [--commonname <string>]
[--countryname <string>] [--localityname <string>] [--stateorprovincename <string>] [--organizationname <string>]
[--organizationalunitname <string>] [-e <email>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-a, --algorithm=(sha256|sha1) [default: sha256] sign the
certificate with specified algorithm
-d, --days=days [default: 365] how long till expiry
of the signed certificate
-e, --emailaddress=emailaddress client certificate's email name
-p, --directory=directory [default: assets/] path to directory
to store generated credential files
-s, --keysize=keysize [default: 4096] the size for the
private key in bits
--commonname=commonname client certificate's common name
--countryname=countryname client certificate's country name
--json format output as json
--localityname=localityname client certificate's locality name
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
--organizationalunitname=organizationalunitname client certificate's organizational
unit name
--organizationname=organizationname client certificate's organization
name
--stateorprovincename=stateorprovincename client certificate's state or
province name
EXAMPLES
$ sfdx booker:cert:create --emailaddress [email protected]
$ sfdx booker:cert:create -e [email protected] -o .certs/
sfdx booker:cert:decrypt --key <string> --iv <string> [--in <filepath>] [--out <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
decrypts a file given key and iv values
USAGE
$ sfdx booker:cert:decrypt --key <string> --iv <string> [--in <filepath>] [--out <filepath>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
--in=in [default: assets/server.key.enc]
file path to decrypt
--iv=iv (required) iv decryption value
--json format output as json
--key=key (required) key decryption value
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
--out=out [default: assets/server.key] file
path to store the decrypted file
EXAMPLES
$ sfdx booker:cert:decrypt --key $SECRET_KEY --iv $SECRET_IV
$ sfdx booker:cert:decrypt --in assets/server.key.enc --out assest/server.key --key $SECRET_KEY --iv $SECRET_IV
sfdx booker:connectedapp:create -e <email> -n <string> [-c <string>] [-d <string>] [-g | -f <filepath>] [-l <string>] [--refreshtokenpolicy zero|infinite|specific_lifetime|specific_inactivity] [--generatepermissionset [--permissionsetname <string> --isadminapproved]] [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
creates a connected app in the target org
USAGE
$ sfdx booker:connectedapp:create -e <email> -n <string> [-c <string>] [-d <string>] [-g | -f <filepath>] [-l
<string>] [--refreshtokenpolicy zero|infinite|specific_lifetime|specific_inactivity] [--generatepermissionset
[--permissionsetname <string> --isadminapproved]] [-s <array>] [-u <string>] [--apiversion <string>] [--json]
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-c, --callbackurl=callbackurl
[default: http://localhost:1717/OauthRedirect] callback url for your oauth app
-d, --description=description
[default: Generated via booker-sfdx-plugin] optional description for your app
-e, --contactemail=contactemail
(required) email address Salesforce uses for contacting you or your support team.
-f, --certificatefile=certificatefile
path to a file containing the public key
-g, --generatecertificate
specifies if you want to create a new certificate on the go
-l, --label=label
the name of the app
-n, --name=name
(required) API name of the app
-s, --scopes=scopes
[default: Api,Web,OfflineAccess,RefreshToken] scopes refer to permissions given by the user running the connected
app. See accepted values on:
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_connectedapp.htm
-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
--generatepermissionset
creates a new permission set given the name on --permissionsetname
--isadminapproved
if set to false, anyone in the org can authorize the app. if set to true, only users with the appropriate profile or
permission set can access the app
--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
--permissionsetname=permissionsetname
specifies the permissions required to perform different functions with the connected app.
--refreshtokenpolicy=(zero|infinite|specific_lifetime|specific_inactivity)
[default: infinite] specifies how long a refresh token is valid for
EXAMPLES
sfdx booker:connectedapp:create --targetusername myhuborg --name MyAwesomeApp --certificatefile ./server.crt
--contactemail [email protected]
sfdx booker:connectedapp:create -u myhuborg -n MyAwesomeApp --generatecertificate -e [email protected]
--isadminapproved --permissionsetname CI_Deployer
sfdx booker:connectedapp:create -u myhuborg -n MyAwesomeApp --generatecertificate -e [email protected]
sfdx booker:project:set -w <string> [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sets workspace and repository values in sfdx-project.json
USAGE
$ sfdx booker:project:set -w <string> [-r <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-r, --repository=repository git repository name. if not provided
context folder is used as default
value
-w, --workspace=workspace (required) git
workspace/organization name of the
repository
--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 booker:project:set --workspace MyCompany --repository repositorySlug
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:
- Start the inspector
If you linked your plugin to the sfdx cli, call your command with the dev-suspend
switch:
$ sfdx hello:org -u [email protected] --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 [email protected]
- Set some breakpoints in your command code
- Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
- In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen.
- 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.
- 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!