npm scripts
package.json is the stable surface the pipeline and developers call. Most scripts are a thin alias
onto a dia-scripts CLI command; a few call a tool or a task script directly (listed separately
below). Either way the script names stay constant so the CI definitions never have to change
when an implementation does. Flags reach the underlying command after --:
npm run deploy -- --wait 40 --delta-from origin/develop.
Scripts that call the CLI
| npm script | CLI invocation |
|---|---|
apex:testsuite:convert |
apex testsuite convert |
apex:testsuite:generate |
apex testsuite generate |
apex:testsuite:generate:configured |
apex testsuite generate --config config/project-test-suites-config.json |
ci:auth:deploy |
ci auth-deploy |
ci:auth:devhub |
ci auth-devhub |
ci:auth:gitbot |
ci auth-gitbot |
ci:dev:start |
ci dev-start |
ci:github:test:summary |
ci github-test-summary |
branch:create |
branch-create |
ci:audit:node:dependencies |
ci audit-node-dependencies |
ci:install:tools |
ci install-tools |
ci:sync |
ci sync |
ci:tag:version |
ci tag-version |
ci:teardown |
ci teardown |
create:certificate |
create-certificate |
create:scratch |
org scratch-create --use-pool |
deploy |
deploy |
deploy:validate |
deploy validate |
docs:apex |
docs apex |
flows:delete |
delete-flow-versions |
format / format:changed / format:check |
format / format --only-changed / format --check |
git:cherrypick |
cherrypick |
install:latest:version |
install-latest-version |
lint |
lint |
lint:createbaseline |
lint createbaseline (see how to baseline the code analyzer) |
org:pool:activate |
org pool-activate |
org:pool:cleanup |
org pool-cleanup |
org:pool:get |
org scratch-create … --use-pool |
org:pool:list |
org pool-list |
org:pool:prepare |
org pool-prepare |
package:version:create |
package-version-create |
package:version:install |
package-version-install |
project:create |
create-new-project |
setup |
setup |
test |
test |
update:metadata:api:version |
updateMetadataApiVersion |
update:salesforce:template |
update-template-files |
validate |
validate |
Scripts that call a tool or task script directly
These do not go through the CLI's yargs entry point:
| npm script | Runs |
|---|---|
build |
run-s build:* (webpack production build) |
build:javascript |
webpack --mode production |
build:javascript:verify |
build-verify (fails when the webpack output differs from the index) |
build:javascript:watch |
npm run build:javascript -- --watch |
cm |
cz (commitizen commit prompt) |
data:export |
sf data export tree --plan |
data:import |
node ./scripts/dia-scripts/deploy/import-data.mjs |
data:import:csv |
node ./scripts/dia-scripts/deploy/import-data-csvs.mjs |
lint:report |
lint metadata --output-file code-analyzer/report.html (HTML report) |
lint:yaml |
yamllint . |
The data:* scripts are described in how to seed data into an org.
Not every command has an npm alias
deploy prepare-destructive-changes, org pool-fetch, org pool-release, and the lint * and
test * children other than lint:createbaseline and lint:report have no dedicated script — they are invoked by their parent dispatcher, by
husky hooks, or by org scratch-create.