DEPRECATED: All the functionality has been moved to commerce-on-lightning repository.
This is 1 of 3 plugins to help setup a store.
This plugin will create and auth a scratchorg as the primary purpose then calls the commerce-on-lightning plugin to create a store.
commerce-on-lightning-orchestration - commerce-orchestration <---- THIS PLUGIN
- scratchorgs
commerce-on-lightning - @salesforce/commerce
- store
sfdx-1commerce-plugin - 1commerce
- API calls for product import and search index
Intended for most users
First install the Salesforce CLI. Next install the commerce orchestration plugin
echo y | sfdx plugins:install git+ssh://[email protected]:forcedotcom/commerce-on-lightning-orchestration.git
Now, you can run the commerce commands.
sfdx commerce:setup
See below for the full list of commands.
Intended for plugin developers or people trying out a workaround and don't want to override their commerce sfdx plugin.
$ yarn install
$ bin/run commerce
When you’re ready to test-drive your plug-in from local git repo, link your git repo to Salesforce CLI.
Intended for plugin developers or people trying out a workaround and want this to be their default for sfdx commerce commands from inside the root of the git repo
sfdx plugins:link
sfdx commerce:devhub:auth [-c <filepath>] [-F <filepath>] [-J] [-i <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]sfdx commerce:open:devhubconfig [-e <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]sfdx commerce:scratchorg:create [-c <filepath>] [-a <string>] [-v <string>] [-u <string>] [-n <number>] [-p] [-g <string>] [-t <string>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]sfdx commerce:setup [-c <filepath>] [-u <string>] [-s <string>] [-t <string>] [-n <integer>] [-m <integer>] [-o <string>] [-f <filepath>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx commerce:devhub:auth [-c <filepath>] [-F <filepath>] [-J] [-i <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Authorize a devhub
USAGE
$ sfdx commerce:devhub:auth [-c <filepath>] [-F <filepath>] [-J] [-i <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-F, --server-cert=server-cert [default: ~/.commerce
/.certs/server.crt] Server Cert file
-J, --use-jwt Use JWT to auth
-c, --configuration=configuration [default: ~/.commerce
/devhub-configuration.json] Pass in
config to override default
-i, --client-id=client-id Client Id for auth:web:login
--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 commerce:devhub:auth --configuration devhub-configuration.json
See code: src/commands/commerce/devhub/auth.ts
sfdx commerce:open:devhubconfig [-e <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Open devhub-configuration.json file
USAGE
$ sfdx commerce:open:devhubconfig [-e <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-e, --editor=editor [default: vi] Editor to open file
with
--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 commerce:open:devhubconfig -e atom
See code: src/commands/commerce/open/devhubconfig.ts
sfdx commerce:scratchorg:create [-c <filepath>] [-a <string>] [-v <string>] [-u <string>] [-n <number>] [-p] [-g <string>] [-t <string>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Create a scratch org
USAGE
$ sfdx commerce:scratchorg:create [-c <filepath>] [-a <string>] [-v <string>] [-u <string>] [-n <number>] [-p] [-g
<string>] [-t <string>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-a, --hub-org-admin-username=hub-org-admin-username [default: [email protected]] username
of the hub org admin
-c, --configuration=configuration [default: ~/.commerce
/devhub-configuration.json] Pass in
config to override default
-g, --scratch-org-alias=scratch-org-alias [default: devhub] Alias name for
this scratch org
-n, --scratch-org-number=scratch-org-number [default: 0] Which store to create
from config file scratchOrgs list -1
for all stores
-p, --is-b2c-lite-access-perm-needed Should the script run sfdx
force:org:open and wait for you to
save B2CLiteAccessPerm?
-t, --type=type [default: b2c] b2b or b2c
-u, --scratch-org-admin-username=scratch-org-admin-username [default: [email protected]]
username of the admin to associate
with the scratch org.
-v, --api-version=api-version [default: 52.0] Version of current
Salesforce
-y, --prompt If there is a file difference
detected in example files, prompt
before overwriting file
--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 commerce:scratchorg:create --configuration devhub-configuration.json
See code: src/commands/commerce/scratchorg/create.ts
sfdx commerce:setup [-c <filepath>] [-u <string>] [-s <string>] [-t <string>] [-n <integer>] [-m <integer>] [-o <string>] [-f <filepath>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Setup a devhub and scratch org from start to finish with one command
USAGE
$ sfdx commerce:setup [-c <filepath>] [-u <string>] [-s <string>] [-t <string>] [-n <integer>] [-m <integer>] [-o
<string>] [-f <filepath>] [-y] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-c, --configuration=configuration [default: ~/.commerce
/devhub-configuration.json] Pass in
config to override default
-f, --definitionfile=definitionfile [default: ~/.commerce
/config/store-scratch-def.json]
store scratch def
-m, --store-number=store-number [default: -1] Index number for the
store to be created
-n, --scratch-org-number=scratch-org-number [default: -1] Which store to create
from config file scratchOrgs list -1
for all stores
-o, --type=b2c|b2b|both [default: both] The type of store
you want to create
-s, --scratch-org-store-name=scratch-org-store-name [default: 1commerce] Name of scratch
org store
-t, --templatename=templatename [default: b2c-lite-storefront]
template to use to create a site
-u, --scratch-org-admin-username=scratch-org-admin-username [default: [email protected]]
username of the admin to associate
with the scratch org.
-y, --prompt If there is a file difference
detected in example files, prompt
before overwriting file
--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 commerce:setup --configuration devhub-configuration.json
sfdx commerce:setup
See code: src/commands/commerce/setup.ts
Please see our CONTRIBUTING doc.