项目作者: forcedotcom

项目描述 :
An SFDX Plugin to setup a B2C or B2B Store
高级语言: TypeScript
项目地址: git://github.com/forcedotcom/commerce-on-lightning.git
创建时间: 2021-06-14T16:55:59Z
项目社区:https://github.com/forcedotcom/commerce-on-lightning

开源协议:BSD 3-Clause "New" or "Revised" License

下载


commerce-on-lightning

@salesforce/commerce"">Version
Appveyor CI
Codecov
Known Vulnerabilities
@salesforce/commerce"">Downloads/week
License

Commerce commands for Salesforce CLI.

If you want a store, for test or any other purposes, then use this plugin to automate all steps required.
It has built in automation to help if any steps fail. This plugin is designed to be as hands off as possible.

This plugin is used to create and setup either a B2B or a B2C store with data with as little effort as possible.

This plugin requires the Salesforce CLI. For more information on the CLI, read the getting started guide.

We always recommend using the latest version of these commands, however, you can install a specific version or tag if needed.

Introduction

This plugin is designed to setup a test store either B2B or B2C within a scratch org. It will add products and
users, a guest user, admin user and buyer user.
This plugin assumes your devhub and scratchorg are already setup.

This repo also contains example components for your store you can load after the fact.

For B2C examples components please see:
B2B2C Advanced Reference Components

For B2B examples components please see:
B2B Advanced Reference Components

Usage

  1. $ npm install -g @salesforce/commerce
  2. $ sf COMMAND
  3. running command...
  4. $ sf (-v|--version|version)
  5. @salesforce/commerce/252.0.1 darwin-arm64 node-v18.20.1
  6. $ sf --help [COMMAND]
  7. USAGE
  8. $ sf COMMAND
  9. ...

Install

  1. sf plugins:install @salesforce/commerce

Issues

Please report any issues at https://github.com/forcedotcom/commerce-on-lightning/issues

Contributing

Please see our CONTRIBUTING guide.

Build

If you plan to help develop the plugin then these steps are for you.

To build the plugin locally, make sure to have yarn installed and run the following commands:

  1. # Clone the repository
  2. git clone git@github.com:forcedotcom/commerce-on-lightning.git
  3. # Install the dependencies and compile
  4. yarn install
  5. yarn build

To use your plugin, run using the local ./bin/run or ./bin/run.cmd file. This is helpful for mostly debugging
purposes as you can add this command to an IDE.

  1. # Run using local run file.
  2. ./bin/run commerce:store:create

There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.

  1. # Link your plugin to the sf cli
  2. sf plugins:link .
  3. # To verify
  4. sf plugins

Commands

sf commerce:examples:convert -f <filepath> -n <string> [-d <string>] [-p <string>] [-o <string>] [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Convert repo examples to SFDX scratch org

  1. USAGE
  2. $ sf commerce:examples:convert -f <filepath> -n <string> [-d <string>] [-p <string>] [-o <string>] [-y] [--json]
  3. [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -d, --outputdir=outputdir [default: ~/.commerc
  6. e/force-app] Directory to output the
  7. conversion
  8. -f, --definitionfile=definitionfile (required) config file
  9. -n, --store-name=store-name (required) [default: 1commerce]
  10. Store name
  11. -o, --type=b2c|b2b The type of store you want to create
  12. -p, --sourcepath=sourcepath Files to convert
  13. -y, --prompt If there is a file difference
  14. detected, prompt before overwriting
  15. file
  16. --json format output as json
  17. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  18. this command invocation
  19. EXAMPLE
  20. sf commerce:examples:convert -f store-scratch-def.json

See code: src/commands/commerce/examples/convert.ts

sf commerce:extension:map [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Maps an extension to a specific webstore

  1. USAGE
  2. $ sf commerce:extension:map [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>] [--json]
  3. [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -i, --store-id=store-id Optional webstore ID flag
  6. -n, --store-name=store-name The name of the webstore to map the
  7. extension
  8. -r, --registered-extension-name=registered-extension-name Unique name for extension
  9. -u, --targetusername=targetusername username or alias for the target
  10. org; overrides default target org
  11. --apiversion=apiversion override the api version used for
  12. api requests made by this command
  13. --json format output as json
  14. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  15. this command invocation
  16. EXAMPLES
  17. sf commerce:extension:map --registered-extension-name test-extension-name --store-name test-store-name
  18. sf commerce:extension:map --registered-extension-name test-extension-name --store-id test-store-id

See code: src/commands/commerce/extension/map.ts

sf commerce:extension:points:list [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Lists all EPN values

  1. USAGE
  2. $ sf commerce:extension:points:list [-u <string>] [--apiversion <string>] [--json] [--loglevel
  3. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -u, --targetusername=targetusername username or alias for the target
  6. org; overrides default target org
  7. --apiversion=apiversion override the api version used for
  8. api requests made by this command
  9. --json format output as json
  10. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  11. this command invocation
  12. EXAMPLE
  13. sf commerce:extension:getEPN

See code: src/commands/commerce/extension/points/list.ts

sf commerce:extension:register [-r <string>] [-e <string>] [-a <string>] [-m <string>] [-d <string>] [--icon-uri <string>] [--is-application] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Register an extension with one command

  1. USAGE
  2. $ sf commerce:extension:register [-r <string>] [-e <string>] [-a <string>] [-m <string>] [-d <string>] [--icon-uri
  3. <string>] [--is-application] [-u <string>] [--apiversion <string>] [--json] [--loglevel
  4. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  5. OPTIONS
  6. -a, --apex-class-name=apex-class-name
  7. Name of the Apex class that needs to be extended
  8. -d, --description=description
  9. A brief description of the extension
  10. -e, --extension-point-name=extension-point-name
  11. Means of identifying entry points within the domain code that are capable of being extended by partners.Takes the
  12. form domain_sub-domain_interface. E.g: checkout_summary_computeTax
  13. -m, --apex-namespace=apex-namespace
  14. Optional namespace for apex class
  15. -r, --registered-extension-name=registered-extension-name
  16. Unique name for extension
  17. -u, --targetusername=targetusername
  18. username or alias for the target org; overrides default target org
  19. --apiversion=apiversion
  20. override the api version used for api requests made by this command
  21. --icon-uri=icon-uri
  22. Where to find the icon representing the extension in URI form.
  23. --is-application
  24. A boolean that indicates if the extension provider is contained within a managed package
  25. --json
  26. format output as json
  27. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)
  28. [default: warn] logging level for this command invocation
  29. EXAMPLE
  30. sf commerce:extension:register --registered-extension-name test-extension-name --extension-point-name test-epn
  31. --apex-class-name test-apex-class

See code: src/commands/commerce/extension/register.ts

sf commerce:extension:unmap [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Unmaps an extension from a store

  1. USAGE
  2. $ sf commerce:extension:unmap [-r <string>] [-n <string>] [-i <string>] [-u <string>] [--apiversion <string>]
  3. [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -i, --store-id=store-id Optional webstore ID flag
  6. -n, --store-name=store-name The name of the webstore to map the
  7. extension
  8. -r, --registered-extension-name=registered-extension-name Unique name for extension
  9. -u, --targetusername=targetusername username or alias for the target
  10. org; overrides default target org
  11. --apiversion=apiversion override the api version used for
  12. api requests made by this command
  13. --json format output as json
  14. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  15. this command invocation
  16. EXAMPLES
  17. sf commerce:extension:unmap --registered-extension-name test-extension-name --store-name test-store-name
  18. sf commerce:extension:unmap --registered-extension-name test-extension-name --store-id test-store-id

See code: src/commands/commerce/extension/unmap.ts

sf commerce:files:copy [name=value...] --filestocopy <array> --dirstocopy <array> --copysourcepath <string> [-y] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Copy files from source to destination folder ~/.commerce

  1. USAGE
  2. $ sf commerce:files:copy [name=value...] --filestocopy <array> --dirstocopy <array> --copysourcepath <string> [-y]
  3. [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -y, --prompt If there is a file difference
  6. detected, prompt before overwriting
  7. file
  8. --copysourcepath=copysourcepath (required) Base path for files and
  9. directories to be copied from
  10. --dirstocopy=dirstocopy (required) Array of directories
  11. (including their contents) located
  12. in source directory to copy
  13. --filestocopy=filestocopy (required) Array of individual files
  14. to copy located directly in source
  15. directory
  16. --json format output as json
  17. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  18. this command invocation
  19. EXAMPLES
  20. sf commerce:files:copy -y --copySourcePath "~/myexamplefilesdirectory" --filestocopy "file1.txt,file2.txt"
  21. --dirstocopy "dir1,dir2,dir3"
  22. sf commerce:files:copy --prompt --copySourcePath "~/myexamplefilesdirectory" --filestocopy "file1.txt,file2.txt"
  23. --dirstocopy "dir1,dir2,dir3"
  24. sf commerce:files:copy --copySourcePath "~/myexamplefilesdirectory" --filestocopy "file1.txt,file2.txt" --dirstocopy
  25. "dir1,dir2,dir3"

See code: src/commands/commerce/files/copy.ts

sf commerce:ordermanagement:quickstart:setup [-y] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Set up order management

  1. USAGE
  2. $ sf commerce:ordermanagement:quickstart:setup [-y] [-u <string>] [--apiversion <string>] [--json] [--loglevel
  3. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -u, --targetusername=targetusername username or alias for the target
  6. org; overrides default target org
  7. -y, --prompt If there is a file difference
  8. detected, prompt before overwriting
  9. file
  10. --apiversion=apiversion override the api version used for
  11. api requests made by this command
  12. --json format output as json
  13. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  14. this command invocation
  15. EXAMPLE
  16. sf commerce:ordermanagement:quickstart:setup

See code: src/commands/commerce/ordermanagement/quickstart/setup.ts

sf commerce:payments:quickstart:setup -n <string> [-p <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Set up a new Payment Gateway

  1. USAGE
  2. $ sf commerce:payments:quickstart:setup -n <string> [-p <string>] [-u <string>] [--apiversion <string>] [--json]
  3. [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -n, --store-name=store-name (required) [default: 1commerce] name
  6. of the site to create
  7. -p, --payment-adapter=payment-adapter [default: Stripe] Payment Adapter
  8. -u, --targetusername=targetusername username or alias for the target
  9. org; overrides default target org
  10. --apiversion=apiversion override the api version used for
  11. api requests made by this command
  12. --json format output as json
  13. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  14. this command invocation
  15. EXAMPLE
  16. sf commerce:payments:quickstart:setup -p Stripe -n 1commerce

See code: src/commands/commerce/payments/quickstart/setup.ts

sf commerce:products:import -n <string> [-c <string>] [-f <filepath>] [-o <string>] [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Prepare product data files for import

  1. USAGE
  2. $ sf commerce:products:import -n <string> [-c <string>] [-f <filepath>] [-o <string>] [-y] [-v <string>] [-u
  3. <string>] [--apiversion <string>] [--json] [--loglevel
  4. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  5. OPTIONS
  6. -c, --products-file-csv=products-file-csv [default: ~/.commerc
  7. e/examples/csv/Alpine-small.csv] The
  8. csv file containing products to
  9. import. Pass in empty value to do
  10. product-less import
  11. -f, --definitionfile=definitionfile [default: ~/.commerc
  12. e/config/store-scratch-def.json]
  13. config file
  14. -n, --store-name=store-name (required) [default: 1commerce] name
  15. of the site to create
  16. -o, --type=b2c|b2b [default: b2c] The type of store you
  17. want to create
  18. -u, --targetusername=targetusername username or alias for the target
  19. org; overrides default target org
  20. -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
  21. org; overrides default dev hub org
  22. -y, --prompt If there is a file difference
  23. detected, prompt before overwriting
  24. file
  25. --apiversion=apiversion override the api version used for
  26. api requests made by this command
  27. --json format output as json
  28. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  29. this command invocation
  30. EXAMPLE
  31. sf commerce:products:import --store-name test-store

See code: src/commands/commerce/products/import.ts

sf commerce:scratchorg:create [-u <string>] [-a <string>] [-t <string>] [-w <number>] [-y] [-d <number>] [-v <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Create a scratch org

  1. USAGE
  2. $ sf commerce:scratchorg:create [-u <string>] [-a <string>] [-t <string>] [-w <number>] [-y] [-d <number>] [-v
  3. <string>] [--apiversion <string>] [--json] [--loglevel
  4. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  5. OPTIONS
  6. -a, --alias=alias Alias name for this scratch org
  7. -d, --duration=duration [default: 30] Duration of the
  8. scratch org (in days)
  9. -t, --type=type [default: both] b2b, b2c or both
  10. -u, --username=username username of the admin to associate
  11. with the scratch org.
  12. -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
  13. org; overrides default dev hub org
  14. -w, --wait=wait [default: 15] The streaming client
  15. socket timeout (in minutes)
  16. -y, --prompt If there is a file difference
  17. detected, prompt before overwriting
  18. file
  19. --apiversion=apiversion override the api version used for
  20. api requests made by this command
  21. --json format output as json
  22. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  23. this command invocation
  24. EXAMPLE
  25. sf commerce:scratchorg:create --username demo@1commerce.com --targetdevhubusername ceo@mydevhub.com

See code: src/commands/commerce/scratchorg/create.ts

sf commerce:search:start [-n <string> | -i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Start search indexing for a given webstore

  1. USAGE
  2. $ sf commerce:search:start [-n <string> | -i <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
  3. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -i, --store-id=store-id ID of webstore to index
  6. -n, --store-name=store-name name of webstore to index
  7. -u, --targetusername=targetusername username or alias for the target
  8. org; overrides default target org
  9. --apiversion=apiversion override the api version used for
  10. api requests made by this command
  11. --json format output as json
  12. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  13. this command invocation
  14. EXAMPLE
  15. sf commerce:store:search:start -n storeName
  16. // Finds a store and indexes it

See code: src/commands/commerce/search/start.ts

sf commerce:store:create [name=value...] -n <string> [-t <string>] [-f <filepath>] [-o <string>] [-b <string>] [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Comprehensive create and set up a store. This will create your community/store push store sources, create buyer user, import products, create search index.

  1. USAGE
  2. $ sf commerce:store:create [name=value...] -n <string> [-t <string>] [-f <filepath>] [-o <string>] [-b <string>]
  3. [-y] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
  4. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  5. OPTIONS
  6. -b, --buyer-username=buyer-username
  7. [default: buyer@1commerce.com] buyer's username
  8. -f, --definitionfile=definitionfile
  9. The store config file. By default it will be either of ~/.commerce/config/b2c-store-scratch-def or
  10. ~/.commerce/config/b2b-store-scratch-def based on store type. Default store type is b2c.]
  11. -n, --store-name=store-name
  12. (required) [default: 1commerce] name of the site to create
  13. -o, --type=b2c|b2b
  14. [default: b2c] The type of store you want to create
  15. -t, --templatename=templatename
  16. Template to use to create a site. If not specified, the template is retrieved from the store config file based on
  17. the store type (b2b or b2c).
  18. -u, --targetusername=targetusername
  19. username or alias for the target org; overrides default target org
  20. -v, --targetdevhubusername=targetdevhubusername
  21. username or alias for the dev hub org; overrides default dev hub org
  22. -y, --prompt
  23. If there is a file difference detected, prompt before overwriting file
  24. --apiversion=apiversion
  25. override the api version used for api requests made by this command
  26. --json
  27. format output as json
  28. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)
  29. [default: warn] logging level for this command invocation
  30. EXAMPLE
  31. sf commerce:store:create --store-name test-store

See code: src/commands/commerce/store/create.ts

sf commerce:store:display -n <string> [-b <string>] [-p <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Display buyer info

  1. USAGE
  2. $ sf commerce:store:display -n <string> [-b <string>] [-p <string>] [-v <string>] [-u <string>] [--apiversion
  3. <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -b, --buyer-username=buyer-username [default: buyer@1commerce.com]
  6. buyer's username
  7. -n, --store-name=store-name (required) [default: 1commerce] name
  8. of the site to create
  9. -p, --urlpathprefix=urlpathprefix required if different from
  10. store-name URL to append to the
  11. domain created when Experiences was
  12. enabled for this org
  13. -u, --targetusername=targetusername username or alias for the target
  14. org; overrides default target org
  15. -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
  16. org; overrides default dev hub org
  17. --apiversion=apiversion override the api version used for
  18. api requests made by this command
  19. --json format output as json
  20. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  21. this command invocation
  22. EXAMPLE
  23. sf commerce:store:display --store-name test-store

See code: src/commands/commerce/store/display.ts

sf commerce:store:open -n <string> [--all] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Open store(s)

  1. USAGE
  2. $ sf commerce:store:open -n <string> [--all] [-v <string>] [-u <string>] [--apiversion <string>] [--json]
  3. [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -n, --store-name=store-name (required) [default: 1commerce] name
  6. of the site to create
  7. -u, --targetusername=targetusername username or alias for the target
  8. org; overrides default target org
  9. -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub
  10. org; overrides default dev hub org
  11. --all View All stores using sf org open
  12. _ui/networks/setup/SetupNetworksPage
  13. page
  14. --apiversion=apiversion override the api version used for
  15. api requests made by this command
  16. --json format output as json
  17. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
  18. this command invocation
  19. EXAMPLES
  20. sf commerce:store:open --store-name test-store
  21. sf commerce:store:open --all

See code: src/commands/commerce/store/open.ts

sf commerce:store:quickstart:create [name=value...] -n <string> [-t <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Use this command to just create a community. It will use sf community create until a community is created or failed.

  1. USAGE
  2. $ sf commerce:store:quickstart:create [name=value...] -n <string> [-t <string>] [-u <string>] [--apiversion
  3. <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  4. OPTIONS
  5. -n, --store-name=store-name
  6. (required) [default: 1commerce] name of the site to create
  7. -t, --templatename=templatename
  8. [default: b2c-lite-storefront] Template to use to create a site. If not specified, the template is retrieved from
  9. the store config file based on the store type (b2b or b2c).
  10. -u, --targetusername=targetusername
  11. username or alias for the target org; overrides default target org
  12. --apiversion=apiversion
  13. override the api version used for api requests made by this command
  14. --json
  15. format output as json
  16. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)
  17. [default: warn] logging level for this command invocation
  18. EXAMPLE
  19. sf commerce:store:quickstart:create --templatename 'b2c-lite-storefront'

See code: src/commands/commerce/store/quickstart/create.ts

sf commerce:store:quickstart:setup [name=value...] -n <string> [-f <filepath>] [-y] [-t <string>] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Set up a store

  1. USAGE
  2. $ sf commerce:store:quickstart:setup [name=value...] -n <string> [-f <filepath>] [-y] [-t <string>] [-v <string>]
  3. [-u <string>] [--apiversion <string>] [--json] [--loglevel
  4. trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
  5. OPTIONS
  6. -f, --definitionfile=definitionfile
  7. [default: ~/.commerce/config/store-scratch-def.json] config file
  8. -n, --store-name=store-name
  9. (required) [default: 1commerce] name of the site to create
  10. -t, --templatename=templatename
  11. [default: b2c-lite-storefront] Template to use to create a site. If not specified, the template is retrieved from
  12. the store config file based on the store type (b2b or b2c).
  13. -u, --targetusername=targetusername
  14. username or alias for the target org; overrides default target org
  15. -v, --targetdevhubusername=targetdevhubusername
  16. username or alias for the dev hub org; overrides default dev hub org
  17. -y, --prompt
  18. If there is a file difference detected, prompt before overwriting file
  19. --apiversion=apiversion
  20. override the api version used for api requests made by this command
  21. --json
  22. format output as json
  23. --loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)
  24. [default: warn] logging level for this command invocation
  25. EXAMPLE
  26. sf commerce:store:quickstart:setup --definitionfile store-scratch-def.json

See code: src/commands/commerce/store/quickstart/setup.ts

Debugging your plugin

Please see our CONTRIBUTING guide.