@diagonal-hq/cli 0.33.0 → 0.33.2
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 +2 -2
- package/dist/cli.mjs +261 -1324
- package/dist/sdk-contract.d.ts +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ export default defineConfig({
|
|
|
237
237
|
- `default_timezone` is an IANA timezone name, such as `America/Edmonton`. `default_currency` is a lower-case currency code, such as `cad`. `website` is a URL. `head_html` is at most 50,000 characters.
|
|
238
238
|
- Each `custom_<status>_error_page` setting names a page file by its uid, as `Pages.<Name>.uid` from `@app/generated/pages`. The page route must not have a parameter. The check refuses an unknown page, a page with a route parameter, and a value that is not a page uid, at the line of the setting. The deploy stores the setting as `{ id }` with the page uid, which is the page id. See [Page reference settings](#page-reference-settings).
|
|
239
239
|
- The check refuses `name`, `slug`, and `brand_kit` in `settings`, and any other key, at the line of the key. It also refuses a value that the setting does not accept.
|
|
240
|
-
- Each deploy writes `name` and every setting to the workspace. The file owns them: a setting that the file omits gets its default, for example `America/Chicago` or `usd`, and a setting without a default becomes `null`. A
|
|
240
|
+
- Each deploy writes `name` and every setting to the workspace. The file owns them: a setting that the file omits gets its default, for example `America/Chicago` or `usd`, and a setting without a default becomes `null`. A change to `name` or a setting in the admin settings, the API, the AI assistant, or the Control Panel commits to this file and deploys it.
|
|
241
241
|
- The deploy checks each value again with the rules of the workspace field. A value that fails, such as a timezone that the server does not know, stops the deploy, and the workspace keeps its values. The deploy checks an error page setting against the pages of the build instead, because a file page has no page row.
|
|
242
242
|
- A rollback writes the config of the older deployment. A deployment built before the deploy wrote the config writes nothing.
|
|
243
243
|
- `domains` declares the domains of the workspace, and `primaryDomain` names the one that is primary. See [Domains](#domains).
|
|
@@ -1115,7 +1115,7 @@ In the editor, a data call takes any resource string, and record data is untyped
|
|
|
1115
1115
|
|
|
1116
1116
|
## Build the package
|
|
1117
1117
|
|
|
1118
|
-
`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 TypeScript lib files, the workflow script compiler with the script SDK sources, and the bundled script SDK that workflow tests import, so the command needs no Diagonal checkout. The script needs the page Sdk contract and `scripts/generated/
|
|
1118
|
+
`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 TypeScript lib files, the workflow script compiler with the script SDK sources, and the bundled script SDK that workflow tests import, so the command needs no Diagonal checkout. The script needs the page Sdk contract and `scripts/generated/pageSdkContract.mjs`. `npm run generate-typescript` makes both and then runs the script.
|
|
1119
1119
|
|
|
1120
1120
|
`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.
|
|
1121
1121
|
|