primitive-admin 1.1.0-alpha.62 → 1.1.0-alpha.64
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 +34 -27
- package/assets/skill/skills/primitive-platform/SKILL.md +34 -20
- package/dist/bin/primitive.js +10 -10
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/analytics.js +5 -15
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps.js +40 -41
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +7 -7
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collection-type-configs.js +7 -7
- 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 +23 -12
- package/dist/src/commands/config.js +80 -45
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/cron-triggers.js +6 -6
- 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 +6 -6
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.js +35 -25
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.js +138 -11
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +8 -8
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/group-type-configs.js +7 -7
- package/dist/src/commands/group-type-configs.js.map +1 -1
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +12 -197
- 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 +4 -129
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +19 -282
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.js +8 -8
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.js +16 -201
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/sync-app-settings.d.ts +24 -19
- package/dist/src/commands/sync-app-settings.js +48 -52
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +952 -61
- package/dist/src/commands/sync.js +3977 -849
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/vars.js +4 -4
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/webhooks.js +6 -6
- package/dist/src/commands/webhooks.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +22 -0
- package/dist/src/commands/workflows.js +135 -443
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +74 -37
- package/dist/src/lib/api-client.js +113 -59
- package/dist/src/lib/api-client.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 +24 -5
- package/dist/src/lib/config-object-descriptor.js +58 -10
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-payload.d.ts +1 -1
- package/dist/src/lib/config-payload.js +1 -1
- package/dist/src/lib/config-surface.d.ts +8 -8
- package/dist/src/lib/config-surface.js +10 -10
- package/dist/src/lib/config-surface.js.map +1 -1
- 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/generated-allowlist.js +11 -0
- package/dist/src/lib/generated-allowlist.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +14 -14
- package/dist/src/lib/generated-config-surfaces.js +37 -35
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-template-lint.d.ts +16 -10
- package/dist/src/lib/generated-template-lint.js +59 -24
- package/dist/src/lib/generated-template-lint.js.map +1 -1
- package/dist/src/lib/google-client-secret-status.d.ts +1 -1
- package/dist/src/lib/google-client-secret-status.js +4 -4
- package/dist/src/lib/google-client-secret-status.js.map +1 -1
- package/dist/src/lib/migration-nag.d.ts +2 -2
- package/dist/src/lib/migration-nag.js +3 -3
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +1 -1
- package/dist/src/lib/platform-owned.d.ts +5 -5
- package/dist/src/lib/platform-owned.js +6 -6
- package/dist/src/lib/platform-owned.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/signing-secret-status.d.ts +2 -2
- package/dist/src/lib/signing-secret-status.js +2 -2
- 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 +182 -6
- 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 +122 -31
- package/dist/src/lib/sync-resource-types.js +177 -42
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +4 -4
- package/dist/src/lib/sync-selectors.js +4 -4
- package/dist/src/lib/toml-database-config.d.ts +4 -4
- package/dist/src/lib/toml-database-config.js +3 -3
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-metadata-config.d.ts +4 -4
- package/dist/src/lib/toml-metadata-config.js +4 -4
- 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/version-check.js +1 -1
- package/dist/src/lib/version-check.js.map +1 -1
- package/dist/src/lib/workflow-apply.d.ts +69 -10
- package/dist/src/lib/workflow-apply.js +99 -24
- 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 +1 -1
- package/dist/src/lib/workflow-config-apply.js +1 -1
- package/dist/src/lib/workflow-config-sidecar.d.ts +1 -1
- package/dist/src/lib/workflow-config-sidecar.js +1 -1
- package/dist/src/lib/workflow-config-sidecar.js.map +1 -1
- package/dist/src/lib/workflow-defaults.d.ts +30 -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-include-preserve.d.ts +6 -6
- package/dist/src/lib/workflow-include-preserve.js +4 -4
- package/dist/src/lib/workflow-payload.d.ts +26 -14
- package/dist/src/lib/workflow-payload.js +61 -45
- package/dist/src/lib/workflow-payload.js.map +1 -1
- package/dist/src/lib/workflow-toml-validator.d.ts +19 -16
- package/dist/src/lib/workflow-toml-validator.js +19 -16
- package/dist/src/lib/workflow-toml-validator.js.map +1 -1
- package/dist/src/types/index.d.ts +15 -0
- package/dist/src/validators.d.ts +7 -7
- package/dist/src/validators.js +6 -6
- package/package.json +1 -3
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Shared app-settings helpers (issue #1033, Phase 2; narrowed by #2645).
|
|
3
3
|
*
|
|
4
4
|
* The descriptor-driven `app.toml` round-trip (issue #1033, Phase 1) was born
|
|
5
|
-
* inside the big `
|
|
5
|
+
* inside the big `config pull` / `config push` command flow. Phase 2 lifted the
|
|
6
6
|
* app-settings-specific pieces here so both surfaces could drive them. #2645
|
|
7
7
|
* then removed the second surface: `app.toml` is authored like every other
|
|
8
|
-
* configuration file and applied by `
|
|
8
|
+
* configuration file and applied by `config push`, so what is left here is what
|
|
9
9
|
* `sync` calls (`serializeAppSettings`, `writePulledAppSettings`,
|
|
10
|
-
* `collectAppSettingsPushErrors`, `diffAppSettings` for `
|
|
11
|
-
* plus the one thing the file cannot answer — `
|
|
12
|
-
* server-effective view behind `
|
|
10
|
+
* `collectAppSettingsPushErrors`, `diffAppSettings` for `config diff --only app`)
|
|
11
|
+
* plus the one thing the file cannot answer — `renderAppSettings`, the
|
|
12
|
+
* server-effective view behind `primitive apps get` (#2759).
|
|
13
13
|
*
|
|
14
14
|
* `googleClientSecret` is an ordinary `[auth]` key here (#2256): it holds a whole
|
|
15
15
|
* `{{secrets.KEY}}` reference, not the secret itself, so it pulls, pushes, diffs
|
|
@@ -24,13 +24,12 @@ export declare const APP_TOML_FILENAME = "app.toml";
|
|
|
24
24
|
export declare function appTomlPath(configDir: string): string;
|
|
25
25
|
/**
|
|
26
26
|
* Serialize server settings into the `app.toml` string (pull direction).
|
|
27
|
-
* Descriptor-driven; this is the single serializer
|
|
28
|
-
* `sync pull` use.
|
|
27
|
+
* Descriptor-driven; this is the single serializer every pull path uses.
|
|
29
28
|
*/
|
|
30
29
|
export declare function serializeAppSettings(settings: any): string;
|
|
31
30
|
/**
|
|
32
31
|
* Write `app.toml` from server settings and return its content hash. Shared by
|
|
33
|
-
* `
|
|
32
|
+
* `config pull` (whole-tree and `--only app`), so the file and the hash have one
|
|
34
33
|
* producer.
|
|
35
34
|
*/
|
|
36
35
|
export declare function writeAppSettingsToml(configDir: string, settings: any): string;
|
|
@@ -38,7 +37,7 @@ export declare function writeAppSettingsToml(configDir: string, settings: any):
|
|
|
38
37
|
* The pull-time warning for a `googleClientSecret` the server withheld, or
|
|
39
38
|
* `null` when the stored value is a reference (or unset).
|
|
40
39
|
*
|
|
41
|
-
* Reported by `
|
|
40
|
+
* Reported by `config pull` wherever it writes `app.toml` — no pull said
|
|
42
41
|
* anything at all before (#2307). A withheld value is
|
|
43
42
|
* absent from the `app.toml` they just wrote AND absent from a push built out
|
|
44
43
|
* of that file, and a settings write that does not carry a `googleClientSecret`
|
|
@@ -47,7 +46,7 @@ export declare function writeAppSettingsToml(configDir: string, settings: any):
|
|
|
47
46
|
* until the field is migrated, and pull is where the operator can still act on
|
|
48
47
|
* that.
|
|
49
48
|
*
|
|
50
|
-
* `subject` lets `
|
|
49
|
+
* `subject` lets `config pull` name the file and match the indentation of its
|
|
51
50
|
* other per-entity lines.
|
|
52
51
|
*/
|
|
53
52
|
export declare function pulledGoogleClientSecretWarning(settings: any, options?: {
|
|
@@ -57,14 +56,18 @@ export declare function pulledGoogleClientSecretWarning(settings: any, options?:
|
|
|
57
56
|
* Validate a parsed `app.toml` for push and return the fatal errors (a type
|
|
58
57
|
* mismatch). An empty array means the push may proceed. Warnings (unrecognized
|
|
59
58
|
* keys) are intentionally not returned here — the caller surfaces those at apply
|
|
60
|
-
* time.
|
|
59
|
+
* time. Used by the `config push` preflight.
|
|
61
60
|
*/
|
|
62
61
|
export declare function collectAppSettingsPushErrors(tomlData: Record<string, any>, options?: {
|
|
63
62
|
isCrossAppPush?: boolean;
|
|
64
63
|
}): string[];
|
|
65
64
|
/**
|
|
66
|
-
*
|
|
67
|
-
* `
|
|
65
|
+
* Render server-effective settings grouped by `app.toml` section — the view
|
|
66
|
+
* `apps get` prints (issue #2759; it was `apps get` before the fold).
|
|
67
|
+
*
|
|
68
|
+
* Descriptor-driven on purpose: a new setting appears here by being declared,
|
|
69
|
+
* where the hand-curated block `apps get` used to print showed whichever
|
|
70
|
+
* fields somebody remembered to add.
|
|
68
71
|
*
|
|
69
72
|
* Nothing is redacted (#2256): `googleClientSecret` is the only credential-shaped
|
|
70
73
|
* setting and the server only ever sends it when it holds a `{{secrets.KEY}}`
|
|
@@ -75,17 +78,19 @@ export declare function collectAppSettingsPushErrors(tomlData: Record<string, an
|
|
|
75
78
|
* withheld value is reported as a remediation note instead, the same way
|
|
76
79
|
* `primitive webhooks get` reports a legacy `signingSecret`. Without it the
|
|
77
80
|
* operator sees a blank `googleClientSecret` and no reason for it.
|
|
81
|
+
*
|
|
82
|
+
* Takes settings rather than a client, and never exits: `apps get` fetches the
|
|
83
|
+
* app and its settings together and tolerates a settings fetch it is not
|
|
84
|
+
* allowed to make, so failure handling belongs at the call site.
|
|
78
85
|
*/
|
|
79
|
-
export declare function
|
|
80
|
-
json?: boolean;
|
|
81
|
-
}): Promise<void>;
|
|
86
|
+
export declare function renderAppSettings(settings: any): void;
|
|
82
87
|
/**
|
|
83
88
|
* Write the pulled `app.toml` and report what the file cannot carry.
|
|
84
89
|
*
|
|
85
90
|
* The one place a pull turns server settings into the local file, so both the
|
|
86
91
|
* write and the withheld-`googleClientSecret` warning stay together: a file
|
|
87
92
|
* written without that warning looks complete and is not pushable (#2307).
|
|
88
|
-
* `
|
|
93
|
+
* `config pull` calls this for `app.toml`, whether the pull is whole-tree or
|
|
89
94
|
* `--only app` — the `settings pull` that used to share it is gone.
|
|
90
95
|
*/
|
|
91
96
|
export declare function writePulledAppSettings(configDir: string, settings: any, options?: {
|
|
@@ -100,7 +105,7 @@ export declare function writePulledAppSettings(configDir: string, settings: any,
|
|
|
100
105
|
* mismatch), skip when unchanged since the last sync unless `--force`, then
|
|
101
106
|
* apply via `PUT /settings` and re-stamp the shared content hash. Cross-app
|
|
102
107
|
* pushes (state's app differs from the target) always apply and strip `name`,
|
|
103
|
-
* matching `
|
|
108
|
+
* matching `config push`.
|
|
104
109
|
*/
|
|
105
110
|
export declare function pushAppSettings(client: ApiClient, appId: string, configDir: string, options?: {
|
|
106
111
|
json?: boolean;
|
|
@@ -115,7 +120,7 @@ export interface AppSettingsFieldDiff {
|
|
|
115
120
|
remote: unknown;
|
|
116
121
|
}
|
|
117
122
|
/**
|
|
118
|
-
* `
|
|
123
|
+
* `config diff --only app` — report per-field differences between the local `app.toml`
|
|
119
124
|
* push payload and the current server settings. Only keys present in the TOML
|
|
120
125
|
* are compared, so a server value that equals a descriptor default (and is
|
|
121
126
|
* therefore omitted from `app.toml`) is never flagged as a spurious difference.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Shared app-settings helpers (issue #1033, Phase 2; narrowed by #2645).
|
|
3
3
|
*
|
|
4
4
|
* The descriptor-driven `app.toml` round-trip (issue #1033, Phase 1) was born
|
|
5
|
-
* inside the big `
|
|
5
|
+
* inside the big `config pull` / `config push` command flow. Phase 2 lifted the
|
|
6
6
|
* app-settings-specific pieces here so both surfaces could drive them. #2645
|
|
7
7
|
* then removed the second surface: `app.toml` is authored like every other
|
|
8
|
-
* configuration file and applied by `
|
|
8
|
+
* configuration file and applied by `config push`, so what is left here is what
|
|
9
9
|
* `sync` calls (`serializeAppSettings`, `writePulledAppSettings`,
|
|
10
|
-
* `collectAppSettingsPushErrors`, `diffAppSettings` for `
|
|
11
|
-
* plus the one thing the file cannot answer — `
|
|
12
|
-
* server-effective view behind `
|
|
10
|
+
* `collectAppSettingsPushErrors`, `diffAppSettings` for `config diff --only app`)
|
|
11
|
+
* plus the one thing the file cannot answer — `renderAppSettings`, the
|
|
12
|
+
* server-effective view behind `primitive apps get` (#2759).
|
|
13
13
|
*
|
|
14
14
|
* `googleClientSecret` is an ordinary `[auth]` key here (#2256): it holds a whole
|
|
15
15
|
* `{{secrets.KEY}}` reference, not the secret itself, so it pulls, pushes, diffs
|
|
@@ -32,8 +32,7 @@ export function appTomlPath(configDir) {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Serialize server settings into the `app.toml` string (pull direction).
|
|
35
|
-
* Descriptor-driven; this is the single serializer
|
|
36
|
-
* `sync pull` use.
|
|
35
|
+
* Descriptor-driven; this is the single serializer every pull path uses.
|
|
37
36
|
*/
|
|
38
37
|
export function serializeAppSettings(settings) {
|
|
39
38
|
return stringifyConfigToml(serializeAppSettingsToToml(settings));
|
|
@@ -48,7 +47,7 @@ function ensureDir(dirPath) {
|
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* Write `app.toml` from server settings and return its content hash. Shared by
|
|
51
|
-
* `
|
|
50
|
+
* `config pull` (whole-tree and `--only app`), so the file and the hash have one
|
|
52
51
|
* producer.
|
|
53
52
|
*/
|
|
54
53
|
export function writeAppSettingsToml(configDir, settings) {
|
|
@@ -60,7 +59,7 @@ export function writeAppSettingsToml(configDir, settings) {
|
|
|
60
59
|
* The pull-time warning for a `googleClientSecret` the server withheld, or
|
|
61
60
|
* `null` when the stored value is a reference (or unset).
|
|
62
61
|
*
|
|
63
|
-
* Reported by `
|
|
62
|
+
* Reported by `config pull` wherever it writes `app.toml` — no pull said
|
|
64
63
|
* anything at all before (#2307). A withheld value is
|
|
65
64
|
* absent from the `app.toml` they just wrote AND absent from a push built out
|
|
66
65
|
* of that file, and a settings write that does not carry a `googleClientSecret`
|
|
@@ -69,7 +68,7 @@ export function writeAppSettingsToml(configDir, settings) {
|
|
|
69
68
|
* until the field is migrated, and pull is where the operator can still act on
|
|
70
69
|
* that.
|
|
71
70
|
*
|
|
72
|
-
* `subject` lets `
|
|
71
|
+
* `subject` lets `config pull` name the file and match the indentation of its
|
|
73
72
|
* other per-entity lines.
|
|
74
73
|
*/
|
|
75
74
|
export function pulledGoogleClientSecretWarning(settings, options = {}) {
|
|
@@ -83,7 +82,7 @@ export function pulledGoogleClientSecretWarning(settings, options = {}) {
|
|
|
83
82
|
* Validate a parsed `app.toml` for push and return the fatal errors (a type
|
|
84
83
|
* mismatch). An empty array means the push may proceed. Warnings (unrecognized
|
|
85
84
|
* keys) are intentionally not returned here — the caller surfaces those at apply
|
|
86
|
-
* time.
|
|
85
|
+
* time. Used by the `config push` preflight.
|
|
87
86
|
*/
|
|
88
87
|
export function collectAppSettingsPushErrors(tomlData, options = {}) {
|
|
89
88
|
return parseTomlToAppSettings(tomlData, options).errors;
|
|
@@ -114,13 +113,13 @@ function saveSyncState(configDir, state) {
|
|
|
114
113
|
* Update `entities.app.contentHash`, preserving all other entities.
|
|
115
114
|
*
|
|
116
115
|
* On a cross-app stamp (the loaded state belongs to a different app than the
|
|
117
|
-
* one we just pulled from / pushed to) this mirrors `
|
|
116
|
+
* one we just pulled from / pushed to) this mirrors `config push` (see
|
|
118
117
|
* `sync.ts`): it rebinds the sync state to the target app with fresh entities,
|
|
119
118
|
* then records the app-settings hash. Without the rebind the stored
|
|
120
|
-
* `state.appId` would stay pointing at the source app, so every later
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
119
|
+
* `state.appId` would stay pointing at the source app, so every later push to
|
|
120
|
+
* that target would keep computing `isCrossAppPush` as true — it would ignore
|
|
121
|
+
* the stored hash and keep stripping `[app].name`, making it impossible to
|
|
122
|
+
* rename the target app via `app.toml`.
|
|
124
123
|
*/
|
|
125
124
|
function stampAppContentHash(configDir, appId, contentHash) {
|
|
126
125
|
const now = new Date().toISOString();
|
|
@@ -153,10 +152,14 @@ function formatValue(value) {
|
|
|
153
152
|
function settingsEqual(a, b) {
|
|
154
153
|
return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
155
154
|
}
|
|
156
|
-
// --- Command orchestrators
|
|
155
|
+
// --- Command orchestrators -------------------------------------------------
|
|
157
156
|
/**
|
|
158
|
-
*
|
|
159
|
-
* `
|
|
157
|
+
* Render server-effective settings grouped by `app.toml` section — the view
|
|
158
|
+
* `apps get` prints (issue #2759; it was `apps get` before the fold).
|
|
159
|
+
*
|
|
160
|
+
* Descriptor-driven on purpose: a new setting appears here by being declared,
|
|
161
|
+
* where the hand-curated block `apps get` used to print showed whichever
|
|
162
|
+
* fields somebody remembered to add.
|
|
160
163
|
*
|
|
161
164
|
* Nothing is redacted (#2256): `googleClientSecret` is the only credential-shaped
|
|
162
165
|
* setting and the server only ever sends it when it holds a `{{secrets.KEY}}`
|
|
@@ -167,37 +170,30 @@ function settingsEqual(a, b) {
|
|
|
167
170
|
* withheld value is reported as a remediation note instead, the same way
|
|
168
171
|
* `primitive webhooks get` reports a legacy `signingSecret`. Without it the
|
|
169
172
|
* operator sees a blank `googleClientSecret` and no reason for it.
|
|
173
|
+
*
|
|
174
|
+
* Takes settings rather than a client, and never exits: `apps get` fetches the
|
|
175
|
+
* app and its settings together and tolerates a settings fetch it is not
|
|
176
|
+
* allowed to make, so failure handling belongs at the call site.
|
|
170
177
|
*/
|
|
171
|
-
export
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
for (const section of APP_SETTINGS_SECTIONS) {
|
|
179
|
-
const descriptors = APP_SETTINGS_DESCRIPTOR.filter((d) => d.section === section);
|
|
180
|
-
divider();
|
|
181
|
-
info(`[${section}]`);
|
|
182
|
-
for (const d of descriptors) {
|
|
183
|
-
printResult(` ${d.key}`, formatValue(settings[d.field]));
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// `googleClientSecretStatus` is not a descriptor field (it is derived, and
|
|
187
|
-
// never written back), so it prints here rather than in a section.
|
|
188
|
-
const statusWarning = googleClientSecretStatusWarning(settings.googleClientSecretStatus, {
|
|
189
|
-
subject: "googleClientSecret",
|
|
190
|
-
withheldFrom: "this output",
|
|
191
|
-
blocks: "the next settings write will be rejected",
|
|
192
|
-
});
|
|
193
|
-
if (statusWarning) {
|
|
194
|
-
divider();
|
|
195
|
-
warn(statusWarning);
|
|
178
|
+
export function renderAppSettings(settings) {
|
|
179
|
+
for (const section of APP_SETTINGS_SECTIONS) {
|
|
180
|
+
const descriptors = APP_SETTINGS_DESCRIPTOR.filter((d) => d.section === section);
|
|
181
|
+
divider();
|
|
182
|
+
info(`[${section}]`);
|
|
183
|
+
for (const d of descriptors) {
|
|
184
|
+
printResult(` ${d.key}`, formatValue(settings[d.field]));
|
|
196
185
|
}
|
|
197
186
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
187
|
+
// `googleClientSecretStatus` is not a descriptor field (it is derived, and
|
|
188
|
+
// never written back), so it prints here rather than in a section.
|
|
189
|
+
const statusWarning = googleClientSecretStatusWarning(settings?.googleClientSecretStatus, {
|
|
190
|
+
subject: "googleClientSecret",
|
|
191
|
+
withheldFrom: "this output",
|
|
192
|
+
blocks: "the next settings write will be rejected",
|
|
193
|
+
});
|
|
194
|
+
if (statusWarning) {
|
|
195
|
+
divider();
|
|
196
|
+
warn(statusWarning);
|
|
201
197
|
}
|
|
202
198
|
}
|
|
203
199
|
/**
|
|
@@ -206,7 +202,7 @@ export async function showAppSettings(client, appId, options = {}) {
|
|
|
206
202
|
* The one place a pull turns server settings into the local file, so both the
|
|
207
203
|
* write and the withheld-`googleClientSecret` warning stay together: a file
|
|
208
204
|
* written without that warning looks complete and is not pushable (#2307).
|
|
209
|
-
* `
|
|
205
|
+
* `config pull` calls this for `app.toml`, whether the pull is whole-tree or
|
|
210
206
|
* `--only app` — the `settings pull` that used to share it is gone.
|
|
211
207
|
*/
|
|
212
208
|
export function writePulledAppSettings(configDir, settings, options = {}) {
|
|
@@ -225,13 +221,13 @@ export function writePulledAppSettings(configDir, settings, options = {}) {
|
|
|
225
221
|
* mismatch), skip when unchanged since the last sync unless `--force`, then
|
|
226
222
|
* apply via `PUT /settings` and re-stamp the shared content hash. Cross-app
|
|
227
223
|
* pushes (state's app differs from the target) always apply and strip `name`,
|
|
228
|
-
* matching `
|
|
224
|
+
* matching `config push`.
|
|
229
225
|
*/
|
|
230
226
|
export async function pushAppSettings(client, appId, configDir, options = {}) {
|
|
231
227
|
try {
|
|
232
228
|
const path = appTomlPath(configDir);
|
|
233
229
|
if (!existsSync(path)) {
|
|
234
|
-
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive
|
|
230
|
+
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive config pull --only app' first.`);
|
|
235
231
|
process.exit(1);
|
|
236
232
|
}
|
|
237
233
|
const state = loadSyncState(configDir);
|
|
@@ -296,7 +292,7 @@ export async function pushAppSettings(client, appId, configDir, options = {}) {
|
|
|
296
292
|
}
|
|
297
293
|
}
|
|
298
294
|
/**
|
|
299
|
-
* `
|
|
295
|
+
* `config diff --only app` — report per-field differences between the local `app.toml`
|
|
300
296
|
* push payload and the current server settings. Only keys present in the TOML
|
|
301
297
|
* are compared, so a server value that equals a descriptor default (and is
|
|
302
298
|
* therefore omitted from `app.toml`) is never flagged as a spurious difference.
|
|
@@ -305,7 +301,7 @@ export async function diffAppSettings(client, appId, configDir, options = {}) {
|
|
|
305
301
|
try {
|
|
306
302
|
const path = appTomlPath(configDir);
|
|
307
303
|
if (!existsSync(path)) {
|
|
308
|
-
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive
|
|
304
|
+
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive config pull --only app' first.`);
|
|
309
305
|
process.exit(1);
|
|
310
306
|
}
|
|
311
307
|
// Local-parse-first, mirroring `settings push`: validate the file before
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-app-settings.js","sourceRoot":"","sources":["../../../src/commands/sync-app-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,GAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAExF,OAAO,EACL,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,IAAI,WAAW,EACrB,OAAO,GACR,MAAM,kBAAkB,CAAC;AAE1B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,SAAiB;IAC3C,OAAO,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC5C,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"sync-app-settings.js","sourceRoot":"","sources":["../../../src/commands/sync-app-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,eAAe,EA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