@diagonal-hq/cli 0.38.1 → 0.38.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1170,7 +1170,7 @@ In the editor, a data call takes any resource string, and record data is untyped
1170
1170
 
1171
1171
  ## Build the package
1172
1172
 
1173
- `npm run build:cli-package` (`scripts/build-cli-package.mjs`) writes `dist/` and packs `scripts/dist/npm/diagonal-hq-cli-<version>.tgz`. `dist/cli.mjs` bundles every dependency, the script SDK sources, and the bundled script SDK that workflow tests import, so the command needs no Diagonal checkout. It does not bundle TypeScript. The workflow script compiler comes from its platform package, an optional dependency of the CLI. The script needs the page Sdk contract and `scripts/generated/pageSdkContract.mjs`. `npm run generate-typescript` makes both and then runs the script with `--declarations-only`. That mode writes only the `.d.ts` files of `dist/`, which the Files editor and the draft editors bundle. It does not write `dist/cli.mjs` or the tarball. `npm run build:npm-packages` builds and packs all the packages.
1173
+ `npm run build:cli-package` (`scripts/build-cli-package.mjs`) writes `dist/` and packs `scripts/dist/npm/diagonal-hq-cli-<version>.tgz`. `dist/cli.mjs` bundles every dependency, so the command needs no Diagonal checkout. It does not bundle TypeScript. `diagonal check` runs the whole workspace check in the workflow script compiler, which comes from its platform package, an optional dependency of the CLI. The compiler reads `dist/check-data.json`, the data of the build, and `dist/script-sdk.json`, the script SDK. Node answers the questions of the compiler that need a JavaScript engine and runs the workflow and migration tests. The test runner, with the bundled script SDK that the tests import, the skill reader, and the asset commands are chunks (`dist/cli-*.mjs`) that the command loads only when it needs them. The script needs the page Sdk contract and `scripts/generated/pageSdkContract.mjs`. `npm run generate-typescript` makes both and then runs the script with `--declarations-only`. That mode writes only the `.d.ts` files of `dist/`, which the Files editor and the draft editors bundle. It does not write `dist/cli.mjs` or the tarball. `npm run build:npm-packages` builds and packs all the packages.
1174
1174
 
1175
1175
  `node scripts/smoke-cli-package.mjs [tarball]` installs the packed tarball in a copy of the starter template outside the repository, with one workflow and its test added. It checks the packed file list, imports the helpers through the `exports` map, runs `tsc` against the packed declarations, and runs `diagonal check`. The `generated-assets` job of PR CI runs it.
1176
1176