primitive-admin 1.0.60 → 1.0.62
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 +125 -69
- package/assets/skill/skills/primitive-platform/SKILL.md +336 -37
- package/dist/bin/primitive.js +29 -14
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +22 -8
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/analytics.js +96 -16
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps.js +49 -188
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +50 -155
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collection-type-configs.js +14 -100
- package/dist/src/commands/collection-type-configs.js.map +1 -1
- package/dist/src/commands/collections.js +47 -8
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/config.d.ts +46 -0
- package/dist/src/commands/config.js +479 -0
- package/dist/src/commands/config.js.map +1 -0
- package/dist/src/commands/connections.d.ts +2 -0
- package/dist/src/commands/connections.js +100 -0
- package/dist/src/commands/connections.js.map +1 -0
- package/dist/src/commands/cron-triggers.js +84 -176
- package/dist/src/commands/cron-triggers.js.map +1 -1
- package/dist/src/commands/database-type-configs.d.ts +2 -0
- package/dist/src/commands/database-type-configs.js +171 -0
- package/dist/src/commands/database-type-configs.js.map +1 -0
- package/dist/src/commands/database-types.js +4 -4
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.d.ts +63 -0
- package/dist/src/commands/databases.js +649 -87
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.js +869 -12
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +18 -125
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.d.ts +12 -1
- package/dist/src/commands/env.js +98 -25
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/feature-flags.d.ts +14 -0
- package/dist/src/commands/feature-flags.js +116 -0
- package/dist/src/commands/feature-flags.js.map +1 -0
- package/dist/src/commands/group-type-configs.js +14 -109
- package/dist/src/commands/group-type-configs.js.map +1 -1
- package/dist/src/commands/init.d.ts +9 -1
- package/dist/src/commands/init.js +1058 -279
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +136 -421
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.d.ts +12 -0
- package/dist/src/commands/metadata-category-configs.js +112 -0
- package/dist/src/commands/metadata-category-configs.js.map +1 -0
- package/dist/src/commands/metadata.js +33 -141
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +206 -563
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.d.ts +1 -1
- package/dist/src/commands/rule-sets.js +16 -132
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.js +67 -234
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/sessions.d.ts +2 -0
- package/dist/src/commands/sessions.js +75 -0
- package/dist/src/commands/sessions.js.map +1 -0
- package/dist/src/commands/skill.js +2 -2
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/sync-app-settings.d.ts +113 -70
- package/dist/src/commands/sync-app-settings.js +193 -242
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +1932 -49
- package/dist/src/commands/sync.js +9584 -1725
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +8 -2
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/users.js +92 -1
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +44 -58
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/webhooks.js +318 -156
- package/dist/src/commands/webhooks.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +49 -12
- package/dist/src/commands/workflows.js +652 -1043
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/access-rule-display.d.ts +21 -0
- package/dist/src/lib/access-rule-display.js +34 -0
- package/dist/src/lib/access-rule-display.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +630 -61
- package/dist/src/lib/api-client.js +676 -116
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +180 -25
- package/dist/src/lib/app-settings-descriptor.js +403 -82
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/canonical-json.d.ts +12 -0
- package/dist/src/lib/canonical-json.js +35 -0
- package/dist/src/lib/canonical-json.js.map +1 -0
- package/dist/src/lib/cli-manifest.d.ts +8 -0
- package/dist/src/lib/cli-manifest.js +1 -0
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/codegen-shared/generatedFiles.d.ts +6 -2
- package/dist/src/lib/codegen-shared/generatedFiles.js +9 -2
- package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -1
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +6 -6
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +8 -8
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -1
- package/dist/src/lib/config-object-descriptor.d.ts +127 -0
- package/dist/src/lib/config-object-descriptor.js +658 -0
- package/dist/src/lib/config-object-descriptor.js.map +1 -0
- package/dist/src/lib/config-payload.d.ts +85 -0
- package/dist/src/lib/config-payload.js +116 -0
- package/dist/src/lib/config-payload.js.map +1 -0
- package/dist/src/lib/config-surface.d.ts +130 -0
- package/dist/src/lib/config-surface.js +300 -0
- package/dist/src/lib/config-surface.js.map +1 -0
- package/dist/src/lib/credentials-store.d.ts +10 -0
- package/dist/src/lib/credentials-store.js +23 -0
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/data-input.d.ts +23 -0
- package/dist/src/lib/data-input.js +50 -0
- package/dist/src/lib/data-input.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTemplates.js +1 -1
- package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +1 -1
- package/dist/src/lib/env-resolver-core.d.ts +147 -0
- package/dist/src/lib/env-resolver-core.js +265 -0
- package/dist/src/lib/env-resolver-core.js.map +1 -0
- package/dist/src/lib/env-resolver.d.ts +28 -6
- package/dist/src/lib/env-resolver.js +44 -32
- package/dist/src/lib/env-resolver.js.map +1 -1
- package/dist/src/lib/generated-allowlist.js +13 -0
- package/dist/src/lib/generated-allowlist.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +682 -0
- package/dist/src/lib/generated-config-surfaces.js +4058 -0
- package/dist/src/lib/generated-config-surfaces.js.map +1 -0
- package/dist/src/lib/generated-template-lint.d.ts +212 -0
- package/dist/src/lib/generated-template-lint.js +624 -0
- package/dist/src/lib/generated-template-lint.js.map +1 -0
- package/dist/src/lib/init-adopt.d.ts +16 -0
- package/dist/src/lib/init-adopt.js +34 -0
- package/dist/src/lib/init-adopt.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +39 -0
- package/dist/src/lib/init-assets.js +97 -0
- package/dist/src/lib/init-assets.js.map +1 -0
- package/dist/src/lib/init-config.d.ts +44 -5
- package/dist/src/lib/init-config.js +80 -7
- package/dist/src/lib/init-config.js.map +1 -1
- package/dist/src/lib/init-ios-links.d.ts +50 -0
- package/dist/src/lib/init-ios-links.js +153 -0
- package/dist/src/lib/init-ios-links.js.map +1 -0
- package/dist/src/lib/init-plan.d.ts +80 -0
- package/dist/src/lib/init-plan.js +95 -0
- package/dist/src/lib/init-plan.js.map +1 -0
- package/dist/src/lib/init-production-env.d.ts +48 -0
- package/dist/src/lib/init-production-env.js +59 -0
- package/dist/src/lib/init-production-env.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +74 -0
- package/dist/src/lib/init-schema.js +358 -0
- package/dist/src/lib/init-schema.js.map +1 -0
- package/dist/src/lib/init-xcode.d.ts +33 -0
- package/dist/src/lib/init-xcode.js +114 -0
- package/dist/src/lib/init-xcode.js.map +1 -0
- package/dist/src/lib/integration-request-config.d.ts +30 -0
- package/dist/src/lib/integration-request-config.js +145 -0
- package/dist/src/lib/integration-request-config.js.map +1 -0
- package/dist/src/lib/local-state.d.ts +55 -0
- package/dist/src/lib/local-state.js +167 -0
- package/dist/src/lib/local-state.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +568 -0
- package/dist/src/lib/log-inspection.js +639 -0
- package/dist/src/lib/log-inspection.js.map +1 -0
- package/dist/src/lib/migration-nag.d.ts +2 -2
- package/dist/src/lib/migration-nag.js +3 -3
- package/dist/src/lib/object-status-filter.d.ts +22 -0
- package/dist/src/lib/object-status-filter.js +45 -0
- package/dist/src/lib/object-status-filter.js.map +1 -0
- package/dist/src/lib/output.d.ts +24 -1
- package/dist/src/lib/output.js +42 -1
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/package-manager.d.ts +140 -0
- package/dist/src/lib/package-manager.js +305 -0
- package/dist/src/lib/package-manager.js.map +1 -0
- package/dist/src/lib/paginate.d.ts +50 -0
- package/dist/src/lib/paginate.js +53 -0
- package/dist/src/lib/paginate.js.map +1 -1
- package/dist/src/lib/platform-owned.d.ts +29 -3
- package/dist/src/lib/platform-owned.js +42 -3
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/project-config.js +13 -5
- package/dist/src/lib/project-config.js.map +1 -1
- package/dist/src/lib/query-operators.d.ts +1 -1
- package/dist/src/lib/query-operators.js +1 -1
- package/dist/src/lib/record-filter.d.ts +18 -0
- package/dist/src/lib/record-filter.js +55 -0
- package/dist/src/lib/record-filter.js.map +1 -0
- package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
- package/dist/src/lib/resolve-init-dev-port.js +55 -0
- package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
- package/dist/src/lib/resolve-init-server.d.ts +64 -0
- package/dist/src/lib/resolve-init-server.js +77 -0
- package/dist/src/lib/resolve-init-server.js.map +1 -0
- package/dist/src/lib/resolve-platform.d.ts +43 -14
- package/dist/src/lib/resolve-platform.js +74 -12
- package/dist/src/lib/resolve-platform.js.map +1 -1
- package/dist/src/lib/run-status.d.ts +19 -0
- package/dist/src/lib/run-status.generated.d.ts +39 -0
- package/dist/src/lib/run-status.generated.js +66 -0
- package/dist/src/lib/run-status.generated.js.map +1 -0
- package/dist/src/lib/run-status.js +19 -0
- package/dist/src/lib/run-status.js.map +1 -0
- package/dist/src/lib/server-text-normalization.d.ts +51 -0
- package/dist/src/lib/server-text-normalization.js +90 -0
- package/dist/src/lib/server-text-normalization.js.map +1 -0
- package/dist/src/lib/server-url.d.ts +22 -0
- package/dist/src/lib/server-url.js +33 -0
- package/dist/src/lib/server-url.js.map +1 -0
- package/dist/src/lib/signing-secret-status.d.ts +81 -0
- package/dist/src/lib/signing-secret-status.js +116 -0
- package/dist/src/lib/signing-secret-status.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +4 -2
- package/dist/src/lib/skill-installer.js +143 -12
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/snapshots.d.ts +2 -2
- package/dist/src/lib/snapshots.js +2 -2
- package/dist/src/lib/swift-codegen/dbGenerator.d.ts +15 -2
- package/dist/src/lib/swift-codegen/dbGenerator.js +250 -18
- package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/generator.d.ts +11 -2
- package/dist/src/lib/swift-codegen/generator.js +181 -7
- package/dist/src/lib/swift-codegen/generator.js.map +1 -1
- package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +7 -3
- package/dist/src/lib/swift-codegen/siblingSymbols.js +4 -1
- package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -1
- package/dist/src/lib/sync-dir-selector.d.ts +21 -0
- package/dist/src/lib/sync-dir-selector.js +30 -0
- package/dist/src/lib/sync-dir-selector.js.map +1 -0
- package/dist/src/lib/sync-paths.d.ts +39 -0
- package/dist/src/lib/sync-paths.js +70 -2
- package/dist/src/lib/sync-paths.js.map +1 -1
- package/dist/src/lib/sync-resource-types.d.ts +138 -31
- package/dist/src/lib/sync-resource-types.js +241 -47
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +95 -0
- package/dist/src/lib/sync-selectors.js +228 -0
- package/dist/src/lib/sync-selectors.js.map +1 -0
- package/dist/src/lib/template.d.ts +62 -4
- package/dist/src/lib/template.js +147 -39
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-keys.d.ts +29 -0
- package/dist/src/lib/test-case-keys.js +55 -0
- package/dist/src/lib/test-case-keys.js.map +1 -0
- package/dist/src/lib/test-case-variables.d.ts +15 -0
- package/dist/src/lib/test-case-variables.js +29 -0
- package/dist/src/lib/test-case-variables.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +4 -4
- package/dist/src/lib/toml-database-config.js +27 -34
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-metadata-config.d.ts +9 -5
- package/dist/src/lib/toml-metadata-config.js +40 -45
- package/dist/src/lib/toml-metadata-config.js.map +1 -1
- package/dist/src/lib/toml-native-form.d.ts +1 -1
- package/dist/src/lib/toml-native-form.js +1 -1
- package/dist/src/lib/toml-params-validator.d.ts +1 -1
- package/dist/src/lib/toml-params-validator.js +1 -1
- package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
- package/dist/src/lib/toml-scalar-edit.js +283 -0
- package/dist/src/lib/toml-scalar-edit.js.map +1 -0
- package/dist/src/lib/user-selector.d.ts +24 -0
- package/dist/src/lib/user-selector.js +33 -0
- package/dist/src/lib/user-selector.js.map +1 -0
- package/dist/src/lib/version-check.d.ts +25 -0
- package/dist/src/lib/version-check.js +77 -8
- package/dist/src/lib/version-check.js.map +1 -1
- package/dist/src/lib/watch.d.ts +121 -0
- package/dist/src/lib/watch.js +169 -0
- package/dist/src/lib/watch.js.map +1 -0
- package/dist/src/lib/workflow-apply.d.ts +69 -45
- package/dist/src/lib/workflow-apply.js +99 -72
- package/dist/src/lib/workflow-apply.js.map +1 -1
- package/dist/src/lib/workflow-codegen/generator.js +4 -4
- package/dist/src/lib/workflow-codegen/generator.js.map +1 -1
- package/dist/src/lib/workflow-codegen/invokerIR.d.ts +11 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js +5 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -1
- package/dist/src/lib/workflow-config-apply.d.ts +70 -0
- package/dist/src/lib/workflow-config-apply.js +137 -0
- package/dist/src/lib/workflow-config-apply.js.map +1 -0
- package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
- package/dist/src/lib/workflow-config-sidecar.js +96 -0
- package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
- package/dist/src/lib/workflow-defaults.d.ts +29 -0
- package/dist/src/lib/workflow-defaults.js +41 -0
- package/dist/src/lib/workflow-defaults.js.map +1 -0
- package/dist/src/lib/workflow-fragments.d.ts +23 -0
- package/dist/src/lib/workflow-fragments.js +229 -8
- package/dist/src/lib/workflow-fragments.js.map +1 -1
- package/dist/src/lib/workflow-include-preserve.d.ts +76 -0
- package/dist/src/lib/workflow-include-preserve.js +286 -0
- package/dist/src/lib/workflow-include-preserve.js.map +1 -0
- package/dist/src/lib/workflow-payload.d.ts +31 -20
- package/dist/src/lib/workflow-payload.js +100 -93
- package/dist/src/lib/workflow-payload.js.map +1 -1
- package/dist/src/lib/workflow-toml-validator.d.ts +80 -3
- package/dist/src/lib/workflow-toml-validator.js +231 -3
- package/dist/src/lib/workflow-toml-validator.js.map +1 -1
- package/dist/src/types/index.d.ts +78 -22
- package/dist/src/validators.d.ts +7 -7
- package/dist/src/validators.js +6 -6
- package/package.json +11 -6
- package/dist/src/commands/settings.d.ts +0 -15
- package/dist/src/commands/settings.js +0 -102
- package/dist/src/commands/settings.js.map +0 -1
|
@@ -13,80 +13,88 @@
|
|
|
13
13
|
* `RECOGNIZED_AUTH_KEYS` pattern to every section, and fully replaces it.
|
|
14
14
|
*
|
|
15
15
|
* Design decisions of record (issue #1033):
|
|
16
|
-
* -
|
|
17
|
-
*
|
|
18
|
-
* `
|
|
16
|
+
* - Google is a typed client MAP (#2891): `googleClients` renders as
|
|
17
|
+
* `[auth.google.clients.<type>]`, and each entry's `clientSecret` holds a
|
|
18
|
+
* whole `{{secrets.KEY}}` reference rather than the secret itself, so the
|
|
19
|
+
* map round-trips through `app.toml` like any other setting.
|
|
19
20
|
* - `[cors]` is always emitted (the `mode` key is `emit: "always"`), even in
|
|
20
21
|
* universal mode. A one-time diff on the next pull for existing apps is
|
|
21
22
|
* acceptable.
|
|
22
23
|
* - `[invitations]` is an additive table for the member-invitation fields.
|
|
23
|
-
* -
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* - Nothing is writable-but-excluded any more (#2891). The legacy passkey
|
|
25
|
+
* pair and the three Google/redirect scalars are RETIRED: not writable, not
|
|
26
|
+
* synced, and refused by name with their own guidance when an old
|
|
27
|
+
* `app.toml` still carries them.
|
|
27
28
|
* - Push type mismatches are field-named validation errors — no silent
|
|
28
29
|
* coercion of a mistyped TOML value.
|
|
30
|
+
* - THE FILE IS THE WHOLE TRUTH (#2880, sponsor 2026-08-21). `app.toml` used
|
|
31
|
+
* to be the one surface where an omitted key preserved the server's value,
|
|
32
|
+
* while every other type follows "the local file is the source of truth"
|
|
33
|
+
* (#1567). That exception is gone: push emits a value for EVERY writable
|
|
34
|
+
* field, and a key the file does not carry clears the field or resets it to
|
|
35
|
+
* its declared default (`APP_SETTINGS_ABSENT_VALUES`). `[app].name` and
|
|
36
|
+
* `[app].mode` are the two exceptions — no default, identity-critical, and
|
|
37
|
+
* `mode: null` is a 400 — so their absence is a validation error instead.
|
|
29
38
|
*/
|
|
39
|
+
import { findUnknownDocumentKeys, requireConfigSurface, } from "./config-surface.js";
|
|
40
|
+
import { retiredConfigKey } from "./generated-config-surfaces.js";
|
|
41
|
+
import { canonicalizeSecretReference } from "./server-text-normalization.js";
|
|
30
42
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{ field: "corsExposedHeaders", section: "cors", key: "exposedHeaders", type: "string[]", emit: "whenSet" },
|
|
65
|
-
{ field: "corsMaxAge", section: "cors", key: "maxAge", type: "number", emit: "whenSet" },
|
|
66
|
-
// ---- [invitations] ------------------------------------------------------
|
|
67
|
-
{ field: "memberInvitationsEnabled", section: "invitations", key: "enabled", type: "boolean", emit: "always" },
|
|
68
|
-
{ field: "memberInvitationLimit", section: "invitations", key: "limit", type: "number", emit: "always" },
|
|
69
|
-
];
|
|
70
|
-
/** Section render order for a stable, diff-friendly `app.toml`. */
|
|
71
|
-
export const APP_SETTINGS_SECTIONS = [
|
|
72
|
-
"app",
|
|
73
|
-
"auth",
|
|
74
|
-
"cors",
|
|
75
|
-
"invitations",
|
|
76
|
-
];
|
|
43
|
+
* The vendored `app-settings` definition (#2644) this module projects. Read
|
|
44
|
+
* once at load; a missing definition fails loudly rather than yielding an
|
|
45
|
+
* empty descriptor that would silently sync nothing.
|
|
46
|
+
*/
|
|
47
|
+
const APP_SETTINGS_SURFACE = requireConfigSurface("app-settings");
|
|
48
|
+
/**
|
|
49
|
+
* Every field that round-trips through `app.toml` — DERIVED from the
|
|
50
|
+
* `app-settings` configuration-object definition (#2644), not listed.
|
|
51
|
+
*
|
|
52
|
+
* The definition already states each field's section (its table's TOML path),
|
|
53
|
+
* its `app.toml` key, its type and its `emit` rule, and the coverage guard
|
|
54
|
+
* holds it against the `App` model. Restating those 26 entries here made
|
|
55
|
+
* adding a setting two edits that a parity test then compared — the "two lists
|
|
56
|
+
* and a test they agree" shape the design gate rejected (2026-08-12). One edit
|
|
57
|
+
* in the definition now reaches the server allow-list
|
|
58
|
+
* (`settings-fields.ts`), this descriptor, and both directions of the sync.
|
|
59
|
+
*
|
|
60
|
+
* `json` in the definition is this module's `object` — the same shape under the
|
|
61
|
+
* name each side has always used for it.
|
|
62
|
+
*/
|
|
63
|
+
export const APP_SETTINGS_DESCRIPTOR = APP_SETTINGS_SURFACE.tables.flatMap((table) => table.fields.map((field) => ({
|
|
64
|
+
field: field.field,
|
|
65
|
+
section: table.tomlPath[0],
|
|
66
|
+
key: field.tomlKey,
|
|
67
|
+
type: (field.type === "json" ? "object" : field.type),
|
|
68
|
+
emit: field.emit,
|
|
69
|
+
})));
|
|
70
|
+
/**
|
|
71
|
+
* Section render order for a stable, diff-friendly `app.toml` — the
|
|
72
|
+
* definition's table order (#2644), so a new section is rendered by being
|
|
73
|
+
* declared there.
|
|
74
|
+
*/
|
|
75
|
+
export const APP_SETTINGS_SECTIONS = APP_SETTINGS_SURFACE.tables.map((table) => table.tomlPath[0]);
|
|
77
76
|
/**
|
|
78
77
|
* `GET /settings` keys that are computed/read-only and never sync (no server
|
|
79
78
|
* setter). The external coverage drift test classifies these here.
|
|
80
79
|
*/
|
|
81
80
|
export const IGNORED_GET_KEYS = new Set([
|
|
82
81
|
"appId",
|
|
83
|
-
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
|
|
82
|
+
// `hasGoogleAuth`, `googleClientSecretSet` and `googleClientSecretStatus` are
|
|
83
|
+
// GONE (#2891), not ignored: the first could not describe a per-platform
|
|
84
|
+
// configuration, and the other two existed only to report a value the server
|
|
85
|
+
// refused to send back. The map states availability per entry and the stored
|
|
86
|
+
// reference is echoed, so a response still carrying any of them is a server
|
|
87
|
+
// this CLI does not understand — worth failing the drift guard over.
|
|
88
|
+
//
|
|
89
|
+
// `hasAppleAuth` / `hasPasskey` stay: the asymmetry is deliberate, since
|
|
90
|
+
// Apple and passkeys have no map to derive per-platform truth from.
|
|
88
91
|
"hasAppleAuth",
|
|
89
92
|
"hasPasskey",
|
|
93
|
+
// #2884 — compatibility fields DERIVED from the one email sign-in flow; the
|
|
94
|
+
// tenant PUT and app.toml retired them, GET still emits both for older
|
|
95
|
+
// clients. Computed, never synced.
|
|
96
|
+
"magicLinkEnabled",
|
|
97
|
+
"otpEnabled",
|
|
90
98
|
"createdAt",
|
|
91
99
|
"modifiedAt",
|
|
92
100
|
]);
|
|
@@ -97,14 +105,212 @@ export const IGNORED_GET_KEYS = new Set([
|
|
|
97
105
|
* "every allow-listed field is covered" claim stays true — these are excluded,
|
|
98
106
|
* not read-only. (Codex design-review concern #1.)
|
|
99
107
|
*/
|
|
100
|
-
export const DEPRECATED_WRITABLE_EXCLUDED = new Set(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
export const DEPRECATED_WRITABLE_EXCLUDED = new Set(
|
|
109
|
+
// Derived (#2644): `deprecated` is exactly "still writable, superseded by
|
|
110
|
+
// another field", which is what this set has always meant.
|
|
111
|
+
APP_SETTINGS_SURFACE.tables.flatMap((table) => Object.entries(table.notExposed)
|
|
112
|
+
.filter(([, classification]) => classification.kind === "deprecated")
|
|
113
|
+
.map(([field]) => field)));
|
|
114
|
+
export const APP_SETTINGS_ABSENT_VALUES = {
|
|
115
|
+
// [app]
|
|
116
|
+
name: { required: true },
|
|
117
|
+
mode: { required: true },
|
|
118
|
+
baseUrl: { value: null },
|
|
119
|
+
waitlistEnabled: { value: false },
|
|
120
|
+
waitlistNotifyAdmins: { value: true },
|
|
121
|
+
directLlmEnabled: { value: false },
|
|
122
|
+
allowedDomains: { value: null },
|
|
123
|
+
testAccountBaseEmails: { value: null },
|
|
124
|
+
// [auth]
|
|
125
|
+
googleOAuthEnabled: { value: null },
|
|
126
|
+
googleClients: { value: null },
|
|
127
|
+
passkeyEnabled: { value: false },
|
|
128
|
+
// #2884: the one email sign-in setting, absent ⇒ `true` because that is what
|
|
129
|
+
// `GET /settings` reports for a row storing none of the three fields
|
|
130
|
+
// (`isEmailSignInEnabled`) — the equality the table above exists to hold.
|
|
131
|
+
// Stated consequence: a hand-authored file that never carried the key pushes
|
|
132
|
+
// email sign-in ON, exactly as omitting `magicLinkEnabled` / `otpEnabled`
|
|
133
|
+
// did before the collapse. A pulled file always states the setting
|
|
134
|
+
// (`emit: "always"`), so this only bites a file authored without it.
|
|
135
|
+
emailSignInEnabled: { value: true },
|
|
136
|
+
appleSignInEnabled: { value: null },
|
|
137
|
+
appleAudiences: { value: null },
|
|
138
|
+
emailRedirectUris: { value: null },
|
|
139
|
+
passkeyRpConfig: { value: null },
|
|
140
|
+
// [cors]
|
|
141
|
+
corsMode: { value: "universal" },
|
|
142
|
+
corsAllowedOrigins: { value: null },
|
|
143
|
+
corsAllowCredentials: { value: false },
|
|
144
|
+
corsAllowedMethods: { value: null },
|
|
145
|
+
corsAllowedHeaders: { value: null },
|
|
146
|
+
corsExposedHeaders: { value: null },
|
|
147
|
+
corsMaxAge: { value: null },
|
|
148
|
+
// [invitations]
|
|
149
|
+
memberInvitationsEnabled: { value: false },
|
|
150
|
+
memberInvitationLimit: { value: 5 },
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* The absent-key rule for one field, or a loud failure.
|
|
154
|
+
*
|
|
155
|
+
* Deliberately a throw rather than a `?? null` fallback: under whole-truth push
|
|
156
|
+
* an unlisted field would be CLEARED on every push by a table nobody updated.
|
|
157
|
+
*/
|
|
158
|
+
export function appSettingAbsentValue(field) {
|
|
159
|
+
const entry = APP_SETTINGS_ABSENT_VALUES[field];
|
|
160
|
+
if (!entry) {
|
|
161
|
+
throw new Error(`app.toml: no absent-key rule declared for the setting \`${field}\`. ` +
|
|
162
|
+
`Add it to APP_SETTINGS_ABSENT_VALUES (cli/src/lib/app-settings-descriptor.ts) ` +
|
|
163
|
+
`— push sends a value for every writable field (#2880).`);
|
|
164
|
+
}
|
|
165
|
+
return entry;
|
|
166
|
+
}
|
|
167
|
+
/** Fields whose absence is a validation error rather than a clear (#2880). */
|
|
168
|
+
export const REQUIRED_APP_SETTING_FIELDS = APP_SETTINGS_DESCRIPTOR.filter((d) => APP_SETTINGS_ABSENT_VALUES[d.field]?.required === true).map((d) => d.field);
|
|
169
|
+
/**
|
|
170
|
+
* The value the SERVER would hold after accepting this one (#2880 DSO-003).
|
|
171
|
+
*
|
|
172
|
+
* The comparison runs on the local side only: push forwards what the file says
|
|
173
|
+
* and the server normalizes it, so without this an authored-but-noncanonical
|
|
174
|
+
* value (`baseUrl` with a trailing slash, a mixed-case test-account email)
|
|
175
|
+
* differs from the record the server returns FOREVER — and baseline restamping
|
|
176
|
+
* cannot save it, because after an apply the remote hash matches the new
|
|
177
|
+
* baseline while the local hash still does not, re-classifying `local-edited`
|
|
178
|
+
* on every run.
|
|
179
|
+
*
|
|
180
|
+
* Mirrors the rules in `settings-controller.ts` (`baseUrl` trim + trailing
|
|
181
|
+
* slash), `validateTestAccountBaseEmails` (trim, lower-case, dedupe) and
|
|
182
|
+
* `validateRedirectUris` (trim, dedupe). Only the NORMALIZATION is mirrored,
|
|
183
|
+
* never the rejection: an entry the server would refuse stays as authored so
|
|
184
|
+
* the server's own 400 is what the operator sees.
|
|
185
|
+
*/
|
|
186
|
+
export function canonicalizeAppSettingValue(field, value) {
|
|
187
|
+
if (value === null || value === undefined)
|
|
188
|
+
return value;
|
|
189
|
+
if (field === "baseUrl") {
|
|
190
|
+
if (typeof value !== "string")
|
|
191
|
+
return value;
|
|
192
|
+
const trimmed = value.trim().replace(/\/+$/, "");
|
|
193
|
+
return trimmed === "" ? null : trimmed;
|
|
194
|
+
}
|
|
195
|
+
if (field === "testAccountBaseEmails" || field === "emailRedirectUris") {
|
|
196
|
+
if (!Array.isArray(value))
|
|
197
|
+
return value;
|
|
198
|
+
const lower = field === "testAccountBaseEmails";
|
|
199
|
+
const seen = new Set();
|
|
200
|
+
const out = [];
|
|
201
|
+
for (const entry of value) {
|
|
202
|
+
if (typeof entry !== "string") {
|
|
203
|
+
out.push(entry);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
const normalized = lower ? entry.trim().toLowerCase() : entry.trim();
|
|
207
|
+
if (seen.has(normalized))
|
|
208
|
+
continue;
|
|
209
|
+
seen.add(normalized);
|
|
210
|
+
out.push(normalized);
|
|
211
|
+
}
|
|
212
|
+
return out;
|
|
213
|
+
}
|
|
214
|
+
if (field === "appleAudiences") {
|
|
215
|
+
if (!Array.isArray(value))
|
|
216
|
+
return value;
|
|
217
|
+
// The controller filters non-empty strings and stores `null` for an empty
|
|
218
|
+
// result, so a list of blanks is the same state as no list at all.
|
|
219
|
+
return value.filter((v) => typeof v === "string" && v.length > 0);
|
|
220
|
+
}
|
|
221
|
+
if (field === "googleClients")
|
|
222
|
+
return canonicalizeGoogleClients(value);
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The typed Google client map as the server STORES it (#2880 DSO-003).
|
|
227
|
+
*
|
|
228
|
+
* `validateGoogleClientsWrite` (`src/services/google-clients.ts`) rewrites each
|
|
229
|
+
* accepted entry: the `clientId` is trimmed, the `clientSecret` is stored as
|
|
230
|
+
* the canonical `{{secrets.KEY}}` reference, the redirect URIs are trimmed and
|
|
231
|
+
* de-duplicated (`validateRedirectUris`), and an entry that states none at all
|
|
232
|
+
* stores the empty list. Without mirroring that, an authored
|
|
233
|
+
* `clientId = " 123.apps... "` — or a `{{ secrets.KEY }}` written with the
|
|
234
|
+
* spacing TOML makes easy — is a `Modified` row on every run against a value
|
|
235
|
+
* push already applied.
|
|
236
|
+
*
|
|
237
|
+
* Normalization only, never rejection: an entry the server would refuse (a
|
|
238
|
+
* `clientSecret` that is not a reference, a URI it will not take) is left as
|
|
239
|
+
* authored so the `PUT`'s own 400 is what the operator sees.
|
|
240
|
+
*/
|
|
241
|
+
function canonicalizeGoogleClients(value) {
|
|
242
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
243
|
+
return value;
|
|
244
|
+
const clients = value.clients;
|
|
245
|
+
if (!clients || typeof clients !== "object" || Array.isArray(clients)) {
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
const out = {};
|
|
249
|
+
for (const [type, entry] of Object.entries(clients)) {
|
|
250
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
251
|
+
out[type] = entry;
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
const source = entry;
|
|
255
|
+
const canonical = { ...source };
|
|
256
|
+
if (typeof source.clientId === "string") {
|
|
257
|
+
canonical.clientId = source.clientId.trim();
|
|
258
|
+
}
|
|
259
|
+
if (source.clientSecret !== undefined) {
|
|
260
|
+
canonical.clientSecret = canonicalizeSecretReference(source.clientSecret);
|
|
261
|
+
}
|
|
262
|
+
// Trimmed and de-duplicated, and materialized when the entry states none —
|
|
263
|
+
// the server stores `[]` either way, so "no key" and "empty list" are one
|
|
264
|
+
// state rather than a difference no push can close.
|
|
265
|
+
canonical.redirectUris = Array.isArray(source.redirectUris)
|
|
266
|
+
? [
|
|
267
|
+
...new Set(source.redirectUris.map((uri) => typeof uri === "string" ? uri.trim() : uri)),
|
|
268
|
+
]
|
|
269
|
+
: [];
|
|
270
|
+
out[type] = canonical;
|
|
271
|
+
}
|
|
272
|
+
return { clients: out };
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* One field's comparable value — what `config diff` and the push gate both read.
|
|
276
|
+
*
|
|
277
|
+
* Canonicalized as above, then flattened to `null` when the value is "empty"
|
|
278
|
+
* under an `emit: "whenSet"` field's own rule. That second step is the
|
|
279
|
+
* app-settings copy of what `projectConfigForComparison` does for every other
|
|
280
|
+
* type (#2731): pull OMITS an empty `whenSet` value, so the file it round-trips
|
|
281
|
+
* to has no key, and comparing `[]` against "no key" would be a difference no
|
|
282
|
+
* push could ever converge.
|
|
283
|
+
*/
|
|
284
|
+
export function comparableAppSettingValue(descriptor, value) {
|
|
285
|
+
const canonical = canonicalizeAppSettingValue(descriptor.field, value);
|
|
286
|
+
if (canonical === undefined)
|
|
287
|
+
return null;
|
|
288
|
+
if (descriptor.emit === "whenSet" && isEmptyForEmit(canonical, descriptor.type)) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
return canonical ?? null;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Project a settings record (either side) onto the full writable field set.
|
|
295
|
+
*
|
|
296
|
+
* `excludeName` is the cross-app rule (#2880 DSO-001): while a cross-app push's
|
|
297
|
+
* name exclusion is active, BOTH sides and the stamped baseline are hashed
|
|
298
|
+
* without `name`, so `classifyPushChange`'s `remoteHash === baselineHash ⇒
|
|
299
|
+
* local-edited` arithmetic stays valid.
|
|
300
|
+
*/
|
|
301
|
+
export function projectAppSettingsForComparison(settings, options = {}) {
|
|
302
|
+
const projected = {};
|
|
303
|
+
for (const d of APP_SETTINGS_DESCRIPTOR) {
|
|
304
|
+
if (options.excludeName && d.field === "name")
|
|
305
|
+
continue;
|
|
306
|
+
const raw = settings?.[d.field];
|
|
307
|
+
const absent = APP_SETTINGS_ABSENT_VALUES[d.field];
|
|
308
|
+
projected[d.field] = comparableAppSettingValue(d, raw === undefined && absent && absent.required !== true
|
|
309
|
+
? absent.value
|
|
310
|
+
: raw);
|
|
311
|
+
}
|
|
312
|
+
return projected;
|
|
313
|
+
}
|
|
108
314
|
const DESCRIPTOR_BY_SECTION = (() => {
|
|
109
315
|
const m = new Map();
|
|
110
316
|
for (const d of APP_SETTINGS_DESCRIPTOR) {
|
|
@@ -173,14 +379,12 @@ function typeError(descriptor, value) {
|
|
|
173
379
|
}
|
|
174
380
|
/**
|
|
175
381
|
* Build one `app.toml` section object from server settings (pull direction).
|
|
176
|
-
*
|
|
177
|
-
*
|
|
382
|
+
* Applies each field's `emit` rule; a `null` value is always omitted (TOML
|
|
383
|
+
* cannot encode null).
|
|
178
384
|
*/
|
|
179
385
|
export function serializeSection(settings, section) {
|
|
180
386
|
const out = {};
|
|
181
387
|
for (const d of DESCRIPTOR_BY_SECTION.get(section) ?? []) {
|
|
182
|
-
if (d.secret)
|
|
183
|
-
continue;
|
|
184
388
|
const value = settings[d.field];
|
|
185
389
|
if (value === null || value === undefined)
|
|
186
390
|
continue;
|
|
@@ -205,18 +409,53 @@ export function serializeAppSettingsToToml(settings) {
|
|
|
205
409
|
return data;
|
|
206
410
|
}
|
|
207
411
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
412
|
+
* Is `[app].name` out of this call entirely? ONE reading of the two spellings
|
|
413
|
+
* the callers use (#2936), so the parse and the payload can never disagree
|
|
414
|
+
* about whether the field is in play: `isCrossAppPush` is the raw cross-app
|
|
415
|
+
* determination, `excludeName` the already-computed answer from
|
|
416
|
+
* `appSettingsNameExcluded` (which also covers the recorded-exclusion case).
|
|
417
|
+
*/
|
|
418
|
+
function appSettingsNameStripped(options) {
|
|
419
|
+
return !!(options.isCrossAppPush || options.excludeName);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Translate a parsed `app.toml` object into the settings the FILE STATES —
|
|
423
|
+
* only the keys it carries. This is the parse half; `buildAppSettingsPayload`
|
|
424
|
+
* below turns it into the whole-truth `PUT /settings` body by filling in what
|
|
425
|
+
* the file omits. An unrecognized key or table and a type
|
|
426
|
+
* mismatch are both hard errors the caller must treat as abort-before-PUT
|
|
427
|
+
* (#2644 criterion 6: push rejects what it does not recognize, for every
|
|
428
|
+
* configuration surface, so a typo fails locally instead of being ignored).
|
|
429
|
+
*
|
|
430
|
+
* A per-entry `clientSecret` that is not a whole `{{secrets.KEY}}` reference is
|
|
431
|
+
* the server's rejection to make (#2256): the push forwards the map and the
|
|
432
|
+
* `PUT` answers 400 with `GOOGLE_CLIENT_SECRET_MUST_BE_SECRET_REF`. Duplicating
|
|
433
|
+
* the shape rule here would put two definitions of "valid reference" in play.
|
|
434
|
+
*
|
|
435
|
+
* A RETIRED key (#2891) is different: it is not a value the server can judge,
|
|
436
|
+
* it is a line that has to be deleted, so the parser refuses it locally with
|
|
437
|
+
* the guidance that names its replacement.
|
|
212
438
|
*
|
|
213
|
-
* `isCrossAppPush`
|
|
214
|
-
*
|
|
439
|
+
* `isCrossAppPush` — or `excludeName`, the same rule as the caller computed it
|
|
440
|
+
* (#2880 DSO-001, `appSettingsNameExcluded`) — strips `name` so a cross-app
|
|
441
|
+
* push never overwrites the target app's name. The strip has to happen HERE and
|
|
442
|
+
* not only in the payload builder below (#2936): a field the body will not
|
|
443
|
+
* carry is not a field this file gets to refuse, or a slot bound to another app
|
|
444
|
+
* aborts diff and push over a `[app].name` neither of them was going to send.
|
|
215
445
|
*/
|
|
216
446
|
export function parseTomlToAppSettings(tomlData, options = {}) {
|
|
447
|
+
const excludeName = appSettingsNameStripped(options);
|
|
217
448
|
const settings = {};
|
|
218
449
|
const warnings = [];
|
|
219
450
|
const errors = [];
|
|
451
|
+
// #2644 criterion 6 — a top-level table the definition does not declare is a
|
|
452
|
+
// hard error, the same posture every per-entity file has. Silently ignoring
|
|
453
|
+
// it made a typo'd header (`[curs]`) push as though the section it meant were
|
|
454
|
+
// absent, so the settings it carried were never applied.
|
|
455
|
+
for (const key of findUnknownDocumentKeys(tomlData, APP_SETTINGS_SURFACE)) {
|
|
456
|
+
errors.push(`app.toml: unrecognized top-level table [${key}]. Check the spelling ` +
|
|
457
|
+
`against the tables app.toml accepts (${APP_SETTINGS_SECTIONS.map((s) => `[${s}]`).join(", ")}), or upgrade the CLI if the server is newer than this one.`);
|
|
458
|
+
}
|
|
220
459
|
for (const section of APP_SETTINGS_SECTIONS) {
|
|
221
460
|
const sectionData = tomlData?.[section];
|
|
222
461
|
if (sectionData === undefined || sectionData === null)
|
|
@@ -230,15 +469,27 @@ export function parseTomlToAppSettings(tomlData, options = {}) {
|
|
|
230
469
|
for (const key of Object.keys(sectionData)) {
|
|
231
470
|
const d = byKey.get(key);
|
|
232
471
|
if (!d) {
|
|
233
|
-
|
|
472
|
+
// A RETIRED key is not an unknown key (#2803's rule, extended to
|
|
473
|
+
// app-settings by #2891/DSO-2891-005). "Check the spelling, or upgrade
|
|
474
|
+
// the CLI" is exactly backwards for a key the platform removed on
|
|
475
|
+
// purpose, and every pre-reshape `app.toml` still carries these lines —
|
|
476
|
+
// so the parser consults the shared retired set directly and says where
|
|
477
|
+
// the value moved to. Keyed under `app`, the app-settings surface's
|
|
478
|
+
// identifier, whichever section the key was authored in.
|
|
479
|
+
const retired = retiredConfigKey("app", key);
|
|
480
|
+
if (retired) {
|
|
481
|
+
errors.push(`app.toml: [${section}].${key} — ${retired.toml}`);
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
484
|
+
// #2644 criterion 6 — REJECTED, not warned-and-ignored. `app.toml` is a
|
|
485
|
+
// registered configuration surface like every other file, and an
|
|
486
|
+
// ignored key is a setting the author believes they changed.
|
|
487
|
+
errors.push(`app.toml: unrecognized key [${section}].${key}. Remove it or ` +
|
|
488
|
+
`upgrade the CLI if the server is newer than this one. ` +
|
|
234
489
|
`Recognized keys: ${descriptors.map((x) => x.key).join(", ")}.`);
|
|
235
490
|
continue;
|
|
236
491
|
}
|
|
237
|
-
if (d.
|
|
238
|
-
errors.push(GOOGLE_CLIENT_SECRET_PUSH_ERROR);
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
if (options.isCrossAppPush && d.field === "name")
|
|
492
|
+
if (excludeName && d.field === "name")
|
|
242
493
|
continue;
|
|
243
494
|
const value = sectionData[key];
|
|
244
495
|
const err = typeError(d, value);
|
|
@@ -251,4 +502,74 @@ export function parseTomlToAppSettings(tomlData, options = {}) {
|
|
|
251
502
|
}
|
|
252
503
|
return { settings, warnings, errors };
|
|
253
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* `[app].name` / `[app].mode` absent — the two keys whole-truth push refuses to
|
|
507
|
+
* fill in for the author (#2880).
|
|
508
|
+
*
|
|
509
|
+
* Read from the DOCUMENT rather than the parse result, so a cross-app push
|
|
510
|
+
* (which strips `name` before validating) still requires the file to state one.
|
|
511
|
+
* `mode` has no default and `mode: null` is a 400; more to the point, a deleted
|
|
512
|
+
* `mode` line silently resetting an invite-only app to public is the wrong
|
|
513
|
+
* failure to choose.
|
|
514
|
+
*/
|
|
515
|
+
export function missingRequiredKeyErrors(tomlData) {
|
|
516
|
+
const errors = [];
|
|
517
|
+
for (const field of REQUIRED_APP_SETTING_FIELDS) {
|
|
518
|
+
const d = APP_SETTINGS_DESCRIPTOR.find((x) => x.field === field);
|
|
519
|
+
if (!d)
|
|
520
|
+
continue;
|
|
521
|
+
const section = tomlData?.[d.section];
|
|
522
|
+
const present = section !== null &&
|
|
523
|
+
typeof section === "object" &&
|
|
524
|
+
!Array.isArray(section) &&
|
|
525
|
+
section[d.key] !== undefined;
|
|
526
|
+
if (present)
|
|
527
|
+
continue;
|
|
528
|
+
errors.push(`app.toml: [${d.section}].${d.key} is required — \`config push\` applies ` +
|
|
529
|
+
`app.toml as the whole truth, and this field has no default to fall ` +
|
|
530
|
+
`back to. Add the line (\`config pull --only app\` writes it).`);
|
|
531
|
+
}
|
|
532
|
+
return errors;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* The whole-truth `PUT /settings` body (#2880 criterion 4).
|
|
536
|
+
*
|
|
537
|
+
* Every writable field gets a value: the authored one where the file carries
|
|
538
|
+
* the key, its `APP_SETTINGS_ABSENT_VALUES` entry where it does not. That is
|
|
539
|
+
* what makes `app.toml` mean what every other configuration file means — the
|
|
540
|
+
* local file is the state, not a patch over whatever the server happens to
|
|
541
|
+
* hold (#1567). The controller applies only the keys in the body (`if (field in
|
|
542
|
+
* updates)`), so the completeness has to come from here.
|
|
543
|
+
*
|
|
544
|
+
* Values are forwarded AS AUTHORED, never canonicalized: the server owns its
|
|
545
|
+
* own normalization, and a CLI that rewrote the value before sending it would
|
|
546
|
+
* be pushing something the operator did not write. The canonicalization in
|
|
547
|
+
* `canonicalizeAppSettingValue` is for the local COMPARISON only.
|
|
548
|
+
*
|
|
549
|
+
* `excludeName` (and `isCrossAppPush`, which implies it) leaves `name` out of
|
|
550
|
+
* the body entirely, so a cross-app push never renames the target app.
|
|
551
|
+
*/
|
|
552
|
+
export function buildAppSettingsPayload(tomlData, options = {}) {
|
|
553
|
+
const parsed = parseTomlToAppSettings(tomlData, options);
|
|
554
|
+
const errors = [...parsed.errors, ...missingRequiredKeyErrors(tomlData)];
|
|
555
|
+
if (errors.length > 0) {
|
|
556
|
+
return { settings: {}, warnings: parsed.warnings, errors };
|
|
557
|
+
}
|
|
558
|
+
const excludeName = appSettingsNameStripped(options);
|
|
559
|
+
const settings = {};
|
|
560
|
+
for (const d of APP_SETTINGS_DESCRIPTOR) {
|
|
561
|
+
if (excludeName && d.field === "name")
|
|
562
|
+
continue;
|
|
563
|
+
if (d.field in parsed.settings) {
|
|
564
|
+
settings[d.field] = parsed.settings[d.field];
|
|
565
|
+
continue;
|
|
566
|
+
}
|
|
567
|
+
const absent = appSettingAbsentValue(d.field);
|
|
568
|
+
// Required fields never reach here — their absence already errored above.
|
|
569
|
+
if (absent.required === true)
|
|
570
|
+
continue;
|
|
571
|
+
settings[d.field] = absent.value;
|
|
572
|
+
}
|
|
573
|
+
return { settings, warnings: parsed.warnings, errors: [] };
|
|
574
|
+
}
|
|
254
575
|
//# sourceMappingURL=app-settings-descriptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-settings-descriptor.js","sourceRoot":"","sources":["../../../src/lib/app-settings-descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAgCH;;;;GAIG;AACH,MAAM,CAAC,MAAM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|
|
2
|
+
* Canonical JSON serialization used for content comparison and hashing.
|
|
3
|
+
*
|
|
4
|
+
* Key order is normalized (sorted) so two structurally identical objects
|
|
5
|
+
* always produce the same string, while array order is preserved (step order
|
|
6
|
+
* matters in workflows).
|
|
7
|
+
*
|
|
8
|
+
* Lives in `lib/` rather than inside `commands/sync.ts` so both the sync
|
|
9
|
+
* command and the workflow-include reconciliation helper can compare values
|
|
10
|
+
* the same way without a circular import.
|
|
11
|
+
*/
|
|
12
|
+
export declare function canonicalJsonStringify(value: any): string;
|