primitive-admin 1.1.0-alpha.74 → 1.1.0-alpha.76
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/dist/bin/primitive.js +110 -21
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/collection-type-configs.js +1 -1
- package/dist/src/commands/collection-type-configs.js.map +1 -1
- package/dist/src/commands/config.js +8 -4
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +1 -1
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +25 -31
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.js +9 -24
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/env.d.ts +1 -1
- package/dist/src/commands/env.js +14 -11
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/functions.js +173 -4
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +1 -1
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/init.d.ts +12 -15
- package/dist/src/commands/init.js +36 -77
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/prompts.js +54 -39
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.js +1 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.js +17 -4
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/sync-app-settings.js +2 -4
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +41 -2
- package/dist/src/commands/sync.js +635 -364
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/workflows.js +62 -31
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +23 -2
- package/dist/src/lib/api-client.js +24 -5
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-match-guard.d.ts +44 -0
- package/dist/src/lib/app-match-guard.js +72 -0
- package/dist/src/lib/app-match-guard.js.map +1 -0
- package/dist/src/lib/block-selector.d.ts +58 -0
- package/dist/src/lib/block-selector.js +92 -0
- package/dist/src/lib/block-selector.js.map +1 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +11 -8
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +108 -54
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -1
- package/dist/src/lib/config-object-descriptor.js +1 -3
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config.d.ts +2 -2
- package/dist/src/lib/config.js +2 -2
- package/dist/src/lib/credentials-store.d.ts +3 -3
- package/dist/src/lib/credentials-store.js +3 -3
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/document-export-permissions.d.ts +30 -0
- package/dist/src/lib/document-export-permissions.js +54 -0
- package/dist/src/lib/document-export-permissions.js.map +1 -0
- package/dist/src/lib/env-resolver-core.d.ts +41 -9
- package/dist/src/lib/env-resolver-core.js +84 -13
- package/dist/src/lib/env-resolver-core.js.map +1 -1
- package/dist/src/lib/env-resolver.d.ts +3 -3
- package/dist/src/lib/env-resolver.js +2 -2
- package/dist/src/lib/function-bundle.d.ts +11 -1
- package/dist/src/lib/function-bundle.js +13 -1
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +123 -0
- package/dist/src/lib/function-collect.js +463 -0
- package/dist/src/lib/function-collect.js.map +1 -0
- package/dist/src/lib/function-db-types.d.ts +149 -0
- package/dist/src/lib/function-db-types.js +587 -0
- package/dist/src/lib/function-db-types.js.map +1 -0
- package/dist/src/lib/function-grants-preflight.d.ts +64 -0
- package/dist/src/lib/function-grants-preflight.js +100 -0
- package/dist/src/lib/function-grants-preflight.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +23 -0
- package/dist/src/lib/function-sync.js +65 -1
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-triggers.d.ts +6 -0
- package/dist/src/lib/function-triggers.js +63 -4
- package/dist/src/lib/function-triggers.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +340 -0
- package/dist/src/lib/generated-config-surfaces.js +669 -17
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +12 -0
- package/dist/src/lib/generated-sdk-types.js +13 -0
- package/dist/src/lib/generated-sdk-types.js.map +1 -0
- package/dist/src/lib/init-adopt.js +2 -2
- package/dist/src/lib/init-adopt.js.map +1 -1
- package/dist/src/lib/init-assets.js +3 -3
- package/dist/src/lib/init-config.d.ts +1 -1
- package/dist/src/lib/init-ios-links.js +1 -1
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-plan.d.ts +1 -1
- package/dist/src/lib/init-plan.js +1 -1
- package/dist/src/lib/init-xcode.d.ts +2 -2
- package/dist/src/lib/init-xcode.js +6 -5
- package/dist/src/lib/init-xcode.js.map +1 -1
- package/dist/src/lib/local-state.d.ts +1 -1
- package/dist/src/lib/local-state.js +1 -1
- package/dist/src/lib/local-test-cases.d.ts +1 -1
- package/dist/src/lib/local-test-cases.js +2 -1
- package/dist/src/lib/local-test-cases.js.map +1 -1
- package/dist/src/lib/migration-nag.d.ts +2 -2
- package/dist/src/lib/migration-nag.js +4 -3
- package/dist/src/lib/migration-nag.js.map +1 -1
- package/dist/src/lib/project-config.d.ts +23 -20
- package/dist/src/lib/project-config.js +27 -45
- package/dist/src/lib/project-config.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/generator.d.ts +1 -1
- package/dist/src/lib/swift-codegen/generator.js +1 -1
- package/dist/src/lib/sync-dir-selector.d.ts +1 -1
- package/dist/src/lib/sync-dir-selector.js +1 -1
- package/dist/src/lib/sync-paths.d.ts +52 -16
- package/dist/src/lib/sync-paths.js +68 -22
- package/dist/src/lib/sync-paths.js.map +1 -1
- package/dist/src/lib/sync-resource-types.d.ts +2 -2
- package/dist/src/lib/sync-resource-types.js +2 -2
- package/dist/src/lib/template.d.ts +2 -2
- package/dist/src/lib/template.js +2 -2
- package/dist/src/lib/test-case-keys.d.ts +1 -1
- package/dist/src/lib/test-case-keys.js +1 -1
- package/dist/src/lib/toml-database-config.js +19 -2
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/workflow-codegen/generator.d.ts +1 -1
- package/dist/src/lib/workflow-codegen/generator.js +1 -1
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* CHECKED IN — that is what Xcode's Run button, a bare `xcodebuild` and a fresh
|
|
7
7
|
* clone all compile. A composed repository moves two files the Xcode build
|
|
8
8
|
* phases declare out of the client: the model schema (up to `models/` at the
|
|
9
|
-
* root) and
|
|
9
|
+
* root) and `primitive/config.json` (which the whole app shares). Rewriting
|
|
10
10
|
* only `project.yml` would leave the shipped project declaring paths that are
|
|
11
11
|
* no longer there — a build input error naming a file, with nothing saying the
|
|
12
12
|
* schema moved — so every rewrite here lands in both places.
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { existsSync, readFileSync, readdirSync, writeFileSync } from "fs";
|
|
19
19
|
import { join, relative, sep } from "path";
|
|
20
|
+
import { LOCAL_STATE_FILENAME, PROJECT_CONFIG_FILENAME, PROJECT_LOCAL_STATE_DIR, PROJECT_TREE_DIR, } from "./env-resolver-core.js";
|
|
20
21
|
/**
|
|
21
22
|
* The committed Xcode files that spell a `$(SRCROOT)/`-relative path, beyond
|
|
22
23
|
* the spec and the checked-in project.
|
|
@@ -33,8 +34,8 @@ const XCODE_FILE_LISTS = [
|
|
|
33
34
|
];
|
|
34
35
|
/** The build phase inputs that name the project config, relative to a client. */
|
|
35
36
|
const PROJECT_CONFIG_INPUTS = [
|
|
36
|
-
join(
|
|
37
|
-
join(
|
|
37
|
+
join(PROJECT_TREE_DIR, PROJECT_CONFIG_FILENAME),
|
|
38
|
+
join(PROJECT_LOCAL_STATE_DIR, LOCAL_STATE_FILENAME),
|
|
38
39
|
];
|
|
39
40
|
/** A POSIX-style path from `fromDir` to `toPath`, for a build-setting string. */
|
|
40
41
|
function posixRelative(fromDir, toPath) {
|
|
@@ -113,11 +114,11 @@ export function xcodePathsLeftBehind(clientDir, fromRelative, toRelative) {
|
|
|
113
114
|
return stranded;
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
|
-
* Points the Xcode build phases at the app's
|
|
117
|
+
* Points the Xcode build phases at the app's `primitive/config.json` when it
|
|
117
118
|
* lives above the client.
|
|
118
119
|
*
|
|
119
120
|
* Without this an Xcode build has no readable config: the phase declares
|
|
120
|
-
* `$(SRCROOT)
|
|
121
|
+
* `$(SRCROOT)/primitive/config.json`, which a composed client does not have,
|
|
121
122
|
* and the sandbox denies everything undeclared. A fresh clone (where
|
|
122
123
|
* `primitive.json` is gitignored) then cannot build at all, and a working copy
|
|
123
124
|
* that still has one keeps whichever environment generated it — so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-xcode.js","sourceRoot":"","sources":["../../../src/lib/init-xcode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"init-xcode.js","sourceRoot":"","sources":["../../../src/lib/init-xcode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EACL,oBAAoB,EACpB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AAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3D,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,IAAI,IAAI,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,SAAS;QAChC,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpE,IAAI,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,WAAmB;IAEnB,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,qBAAqB,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;QAClE,SAAS,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `primitive env use` records which environment THIS machine is pointed at.
|
|
5
5
|
* That is not a team decision, so it must not land in the committed
|
|
6
|
-
*
|
|
6
|
+
* `primitive/config.json` — `defaultEnvironment` stays the team default a
|
|
7
7
|
* fresh clone resolves. The file sits beside `credentials.json`, which has the
|
|
8
8
|
* same "local, never committed" property.
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `primitive env use` records which environment THIS machine is pointed at.
|
|
5
5
|
* That is not a team decision, so it must not land in the committed
|
|
6
|
-
*
|
|
6
|
+
* `primitive/config.json` — `defaultEnvironment` stays the team default a
|
|
7
7
|
* fresh clone resolves. The file sits beside `credentials.json`, which has the
|
|
8
8
|
* same "local, never committed" property.
|
|
9
9
|
*
|
|
@@ -33,7 +33,7 @@ export interface LocalTestCaseScan {
|
|
|
33
33
|
/** The subset no registered case accounts for, basename order. */
|
|
34
34
|
unregistered: string[];
|
|
35
35
|
}
|
|
36
|
-
/** The
|
|
36
|
+
/** The sync-state baseline rows that map a sidecar to a live case. */
|
|
37
37
|
export type ManagedTestCases = Record<string, {
|
|
38
38
|
id?: string;
|
|
39
39
|
} | undefined>;
|
|
@@ -30,9 +30,10 @@ import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
|
30
30
|
import { basename, join } from "path";
|
|
31
31
|
import { testCaseFileBasenames } from "./test-case-file-names.js";
|
|
32
32
|
import { normalizeTestCaseKey } from "./test-case-keys.js";
|
|
33
|
+
import { syncStatePath } from "./sync-paths.js";
|
|
33
34
|
/** Read the manifest's test-case rows, or nothing when it cannot be read. */
|
|
34
35
|
export function readManagedTestCases(configDir) {
|
|
35
|
-
const syncFile =
|
|
36
|
+
const syncFile = syncStatePath(configDir);
|
|
36
37
|
if (!existsSync(syncFile))
|
|
37
38
|
return {};
|
|
38
39
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-test-cases.js","sourceRoot":"","sources":["../../../src/lib/local-test-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,IAA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,CAAC;IAED,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7C,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAC/E,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Detection signal (warn iff ALL of):
|
|
11
11
|
* 1. `peekLegacyCredentials()` is non-null (legacy creds file present).
|
|
12
12
|
* 2. `findProjectConfigPath()` is null (no project config in scope).
|
|
13
|
-
* 3. `./config
|
|
13
|
+
* 3. `./config/` holds the pre-project-config sync state (strong signal the
|
|
14
14
|
* user has actually run `primitive config pull` here — the
|
|
15
15
|
* population at risk from #548).
|
|
16
16
|
*
|
|
@@ -36,7 +36,7 @@ export interface MaybeWarnLegacyMigrationOptions {
|
|
|
36
36
|
argv: string[];
|
|
37
37
|
/**
|
|
38
38
|
* Override the working directory used for project-shape detection and
|
|
39
|
-
* the upward
|
|
39
|
+
* the upward `primitive/config.json` search. Defaults to
|
|
40
40
|
* `process.cwd()`. Exists so unit tests (which run in worker threads
|
|
41
41
|
* that disallow `process.chdir()`) can point at a tmpdir.
|
|
42
42
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Detection signal (warn iff ALL of):
|
|
11
11
|
* 1. `peekLegacyCredentials()` is non-null (legacy creds file present).
|
|
12
12
|
* 2. `findProjectConfigPath()` is null (no project config in scope).
|
|
13
|
-
* 3. `./config
|
|
13
|
+
* 3. `./config/` holds the pre-project-config sync state (strong signal the
|
|
14
14
|
* user has actually run `primitive config pull` here — the
|
|
15
15
|
* population at risk from #548).
|
|
16
16
|
*
|
|
@@ -38,6 +38,7 @@ import { join } from "path";
|
|
|
38
38
|
import { warn } from "./output.js";
|
|
39
39
|
import { peekLegacyCredentials } from "./credentials-store.js";
|
|
40
40
|
import { findProjectConfigPath } from "./project-config.js";
|
|
41
|
+
import { LEGACY_SYNC_STATE_FILENAME } from "./sync-paths.js";
|
|
41
42
|
const NAG_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
42
43
|
/** Resolved per-call so tests can override PRIMITIVE_CONFIG_DIR at runtime. */
|
|
43
44
|
function getConfigDir() {
|
|
@@ -109,7 +110,7 @@ function shouldSuppressByArgv(argv) {
|
|
|
109
110
|
/**
|
|
110
111
|
* Returns true when `cwd` looks like a project that has actually been
|
|
111
112
|
* used with `primitive config` — specifically, when
|
|
112
|
-
* `<cwd>/config
|
|
113
|
+
* `<cwd>/config/` holds the pre-project-config sync state. Per F4 of the approved
|
|
113
114
|
* plan, this is the only project-shape signal we use; we deliberately
|
|
114
115
|
* do not fall back to `package.json` or `.git` to avoid nagging users
|
|
115
116
|
* who run the CLI for read-only commands from incidental project
|
|
@@ -117,7 +118,7 @@ function shouldSuppressByArgv(argv) {
|
|
|
117
118
|
*/
|
|
118
119
|
function isProjectShaped(cwd) {
|
|
119
120
|
try {
|
|
120
|
-
return existsSync(join(cwd, "config",
|
|
121
|
+
return existsSync(join(cwd, "config", LEGACY_SYNC_STATE_FILENAME));
|
|
121
122
|
}
|
|
122
123
|
catch {
|
|
123
124
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-nag.js","sourceRoot":"","sources":["../../../src/lib/migration-nag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC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,8DAA8D,CAAC,CAAC;QACrE,IAAI,CACF,0KAA0K,CAC3K,CAAC;QAEF,YAAY,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,wEAAwE;IAC1E,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Project-scoped configuration (
|
|
2
|
+
* Project-scoped configuration (primitive/config.json).
|
|
3
3
|
*
|
|
4
4
|
* This module handles loading, validating, and saving the project config file
|
|
5
|
-
* that lives inside the
|
|
6
|
-
* defines named environments (dev, prod, staging, etc.) with their
|
|
7
|
-
* and app IDs.
|
|
5
|
+
* that lives inside the committed `primitive/` directory at the project root.
|
|
6
|
+
* The config defines named environments (dev, prod, staging, etc.) with their
|
|
7
|
+
* API URLs and app IDs.
|
|
8
8
|
*
|
|
9
9
|
* Design:
|
|
10
|
-
* - Config file:
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
10
|
+
* - Config file: primitive/config.json (or any ancestor directory)
|
|
11
|
+
* - `primitive/` is committed — the config plus each environment's TOML;
|
|
12
|
+
* `.primitive/` is machine-local state and is gitignored whole (#3153).
|
|
13
13
|
* - Format: JSON
|
|
14
14
|
* - Schema is versioned (currently 1). Future versions use semver-ish
|
|
15
15
|
* caret range compatibility: we accept any config where major version
|
|
@@ -22,14 +22,12 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const CURRENT_CONFIG_VERSION = 1;
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* The one set of layout constants, owned by the resolver core so the CLI, the
|
|
26
|
+
* Vite plugin and the Swift script cannot disagree about where the tree is
|
|
27
|
+
* (#3153). Re-exported here because most of the CLI imports its config
|
|
28
|
+
* vocabulary from this module.
|
|
28
29
|
*/
|
|
29
|
-
export
|
|
30
|
-
export declare const PROJECT_CONFIG_FILENAME = "config.json";
|
|
31
|
-
/** Display name used in user-facing messages. */
|
|
32
|
-
export declare const PROJECT_CONFIG_DISPLAY_NAME = ".primitive/config.json";
|
|
30
|
+
export { PROJECT_TREE_DIR, PROJECT_LOCAL_STATE_DIR, PROJECT_CONFIG_FILENAME, PROJECT_CONFIG_DISPLAY_NAME, } from "./env-resolver-core.js";
|
|
33
31
|
export interface ProjectEnvironment {
|
|
34
32
|
apiUrl: string;
|
|
35
33
|
/**
|
|
@@ -77,20 +75,25 @@ export declare class ProjectConfigError extends Error {
|
|
|
77
75
|
constructor(message: string, path?: string);
|
|
78
76
|
}
|
|
79
77
|
/**
|
|
80
|
-
* Walks upward from `startDir` looking for a
|
|
78
|
+
* Walks upward from `startDir` looking for a `primitive/config.json` file.
|
|
81
79
|
* Returns the absolute path to the config file, or null if not found.
|
|
82
80
|
*
|
|
83
81
|
* Allows running `primitive` commands from subdirectories of a project,
|
|
84
82
|
* much like `git` walks up to find `.git`.
|
|
83
|
+
*
|
|
84
|
+
* One walk, not two: this delegates to the resolver core (#3153) so the CLI
|
|
85
|
+
* and every other reader refuse the pre-move layout identically — a second
|
|
86
|
+
* copy of the walk here is exactly how the stale-layout refusal would come to
|
|
87
|
+
* mean two different things.
|
|
85
88
|
*/
|
|
86
89
|
export declare function findProjectConfigPath(startDir?: string): string | null;
|
|
87
90
|
/**
|
|
88
|
-
* Returns the project root directory (the parent of
|
|
89
|
-
*
|
|
91
|
+
* Returns the project root directory (the parent of `primitive/`, which holds
|
|
92
|
+
* `primitive/config.json`), or null if no project config is found.
|
|
90
93
|
*
|
|
91
94
|
* When the PRIMITIVE_PROJECT_CONFIG env var override is active, the config
|
|
92
|
-
* file may not live inside a
|
|
93
|
-
*
|
|
95
|
+
* file may not live inside a `primitive/` directory (e.g. in tests), and then
|
|
96
|
+
* the root is simply the containing directory.
|
|
94
97
|
*/
|
|
95
98
|
export declare function findProjectRoot(startDir?: string): string | null;
|
|
96
99
|
/**
|
|
@@ -107,7 +110,7 @@ export declare function validateProjectConfig(raw: unknown, sourcePath?: string)
|
|
|
107
110
|
export declare function loadProjectConfigFromPath(path: string): ProjectConfig;
|
|
108
111
|
/**
|
|
109
112
|
* Loads the project config by searching upward from the current directory.
|
|
110
|
-
* Returns null (not an error) if no
|
|
113
|
+
* Returns null (not an error) if no primitive/config.json is found anywhere.
|
|
111
114
|
* Still throws ProjectConfigError if a config IS found but is invalid.
|
|
112
115
|
*/
|
|
113
116
|
export declare function loadProjectConfig(startDir?: string): ProjectConfig | null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Project-scoped configuration (
|
|
2
|
+
* Project-scoped configuration (primitive/config.json).
|
|
3
3
|
*
|
|
4
4
|
* This module handles loading, validating, and saving the project config file
|
|
5
|
-
* that lives inside the
|
|
6
|
-
* defines named environments (dev, prod, staging, etc.) with their
|
|
7
|
-
* and app IDs.
|
|
5
|
+
* that lives inside the committed `primitive/` directory at the project root.
|
|
6
|
+
* The config defines named environments (dev, prod, staging, etc.) with their
|
|
7
|
+
* API URLs and app IDs.
|
|
8
8
|
*
|
|
9
9
|
* Design:
|
|
10
|
-
* - Config file:
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
10
|
+
* - Config file: primitive/config.json (or any ancestor directory)
|
|
11
|
+
* - `primitive/` is committed — the config plus each environment's TOML;
|
|
12
|
+
* `.primitive/` is machine-local state and is gitignored whole (#3153).
|
|
13
13
|
* - Format: JSON
|
|
14
14
|
* - Schema is versioned (currently 1). Future versions use semver-ish
|
|
15
15
|
* caret range compatibility: we accept any config where major version
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* - Invalid configs throw — we do NOT silently ignore malformed files.
|
|
18
18
|
*/
|
|
19
19
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
20
|
-
import { dirname
|
|
20
|
+
import { dirname } from "path";
|
|
21
21
|
import { detectInstall, installCommand, upgradeCommand, PRIMITIVE_CLI_PACKAGE, } from "./package-manager.js";
|
|
22
|
-
import { missingAppIdMessage } from "./env-resolver-core.js";
|
|
22
|
+
import { findPrimitiveConfigPath, missingAppIdMessage, projectRootForConfigPath, PROJECT_CONFIG_DISPLAY_NAME, } from "./env-resolver-core.js";
|
|
23
23
|
import { normalizeIosAppId, validateIosAppId } from "./ios-app-id.js";
|
|
24
24
|
import { validateServerUrl } from "./server-url.js";
|
|
25
25
|
import { normalizeWebUrl, validateWebUrl } from "./web-url.js";
|
|
@@ -38,14 +38,12 @@ function cliUpgradeCommand() {
|
|
|
38
38
|
*/
|
|
39
39
|
export const CURRENT_CONFIG_VERSION = 1;
|
|
40
40
|
/**
|
|
41
|
-
* The
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* The one set of layout constants, owned by the resolver core so the CLI, the
|
|
42
|
+
* Vite plugin and the Swift script cannot disagree about where the tree is
|
|
43
|
+
* (#3153). Re-exported here because most of the CLI imports its config
|
|
44
|
+
* vocabulary from this module.
|
|
44
45
|
*/
|
|
45
|
-
export
|
|
46
|
-
export const PROJECT_CONFIG_FILENAME = "config.json";
|
|
47
|
-
/** Display name used in user-facing messages. */
|
|
48
|
-
export const PROJECT_CONFIG_DISPLAY_NAME = ".primitive/config.json";
|
|
46
|
+
export { PROJECT_TREE_DIR, PROJECT_LOCAL_STATE_DIR, PROJECT_CONFIG_FILENAME, PROJECT_CONFIG_DISPLAY_NAME, } from "./env-resolver-core.js";
|
|
49
47
|
export class ProjectConfigError extends Error {
|
|
50
48
|
path;
|
|
51
49
|
constructor(message, path) {
|
|
@@ -55,49 +53,33 @@ export class ProjectConfigError extends Error {
|
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
|
-
* Walks upward from `startDir` looking for a
|
|
56
|
+
* Walks upward from `startDir` looking for a `primitive/config.json` file.
|
|
59
57
|
* Returns the absolute path to the config file, or null if not found.
|
|
60
58
|
*
|
|
61
59
|
* Allows running `primitive` commands from subdirectories of a project,
|
|
62
60
|
* much like `git` walks up to find `.git`.
|
|
61
|
+
*
|
|
62
|
+
* One walk, not two: this delegates to the resolver core (#3153) so the CLI
|
|
63
|
+
* and every other reader refuse the pre-move layout identically — a second
|
|
64
|
+
* copy of the walk here is exactly how the stale-layout refusal would come to
|
|
65
|
+
* mean two different things.
|
|
63
66
|
*/
|
|
64
67
|
export function findProjectConfigPath(startDir = process.cwd()) {
|
|
65
|
-
|
|
66
|
-
if (process.env.PRIMITIVE_PROJECT_CONFIG) {
|
|
67
|
-
const forced = resolve(process.env.PRIMITIVE_PROJECT_CONFIG);
|
|
68
|
-
return existsSync(forced) ? forced : null;
|
|
69
|
-
}
|
|
70
|
-
let current = resolve(startDir);
|
|
71
|
-
// Walk up until we hit filesystem root.
|
|
72
|
-
while (true) {
|
|
73
|
-
const candidate = join(current, PROJECT_CONFIG_DIR, PROJECT_CONFIG_FILENAME);
|
|
74
|
-
if (existsSync(candidate))
|
|
75
|
-
return candidate;
|
|
76
|
-
const parent = dirname(current);
|
|
77
|
-
if (parent === current)
|
|
78
|
-
return null;
|
|
79
|
-
current = parent;
|
|
80
|
-
}
|
|
68
|
+
return findPrimitiveConfigPath({ cwd: startDir });
|
|
81
69
|
}
|
|
82
70
|
/**
|
|
83
|
-
* Returns the project root directory (the parent of
|
|
84
|
-
*
|
|
71
|
+
* Returns the project root directory (the parent of `primitive/`, which holds
|
|
72
|
+
* `primitive/config.json`), or null if no project config is found.
|
|
85
73
|
*
|
|
86
74
|
* When the PRIMITIVE_PROJECT_CONFIG env var override is active, the config
|
|
87
|
-
* file may not live inside a
|
|
88
|
-
*
|
|
75
|
+
* file may not live inside a `primitive/` directory (e.g. in tests), and then
|
|
76
|
+
* the root is simply the containing directory.
|
|
89
77
|
*/
|
|
90
78
|
export function findProjectRoot(startDir = process.cwd()) {
|
|
91
79
|
const path = findProjectConfigPath(startDir);
|
|
92
80
|
if (!path)
|
|
93
81
|
return null;
|
|
94
|
-
|
|
95
|
-
// up one level. In the normal case the path ends with .primitive/config.json
|
|
96
|
-
// so dirname(dirname(path)) gives the project root.
|
|
97
|
-
if (process.env.PRIMITIVE_PROJECT_CONFIG) {
|
|
98
|
-
return dirname(path);
|
|
99
|
-
}
|
|
100
|
-
return dirname(dirname(path));
|
|
82
|
+
return projectRootForConfigPath(path);
|
|
101
83
|
}
|
|
102
84
|
/**
|
|
103
85
|
* Validates a raw parsed object against the ProjectConfig schema.
|
|
@@ -237,7 +219,7 @@ export function loadProjectConfigFromPath(path) {
|
|
|
237
219
|
}
|
|
238
220
|
/**
|
|
239
221
|
* Loads the project config by searching upward from the current directory.
|
|
240
|
-
* Returns null (not an error) if no
|
|
222
|
+
* Returns null (not an error) if no primitive/config.json is found anywhere.
|
|
241
223
|
* Still throws ProjectConfigError if a config IS found but is invalid.
|
|
242
224
|
*/
|
|
243
225
|
export function loadProjectConfig(startDir = process.cwd()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.js","sourceRoot":"","sources":["../../../src/lib/project-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"project-config.js","sourceRoot":"","sources":["../../../src/lib/project-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAiB,MAAM,MAAM,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAA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,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1D,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* destructive `config pull` overwrites local TOML state (issue #578, Phase 1).
|
|
4
4
|
*
|
|
5
5
|
* A snapshot is a full recursive copy of the live sync tree (including
|
|
6
|
-
* `.
|
|
6
|
+
* `.sync-state.json`, the content-hash baseline) into a timestamped slot
|
|
7
7
|
* under the snapshots root:
|
|
8
8
|
*
|
|
9
9
|
* <snapshotsRoot>/<YYYY-MM-DDTHH-MM-SS>/
|
|
10
|
-
* <full pre-pull copy of the sync tree, incl. .
|
|
10
|
+
* <full pre-pull copy of the sync tree, incl. .sync-state.json>
|
|
11
11
|
* .snapshot-complete # integrity marker, written LAST
|
|
12
12
|
* .audit-id # ULID cross-link (Phase 2; absent in P1)
|
|
13
13
|
*
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* destructive `config pull` overwrites local TOML state (issue #578, Phase 1).
|
|
4
4
|
*
|
|
5
5
|
* A snapshot is a full recursive copy of the live sync tree (including
|
|
6
|
-
* `.
|
|
6
|
+
* `.sync-state.json`, the content-hash baseline) into a timestamped slot
|
|
7
7
|
* under the snapshots root:
|
|
8
8
|
*
|
|
9
9
|
* <snapshotsRoot>/<YYYY-MM-DDTHH-MM-SS>/
|
|
10
|
-
* <full pre-pull copy of the sync tree, incl. .
|
|
10
|
+
* <full pre-pull copy of the sync tree, incl. .sync-state.json>
|
|
11
11
|
* .snapshot-complete # integrity marker, written LAST
|
|
12
12
|
* .audit-id # ULID cross-link (Phase 2; absent in P1)
|
|
13
13
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `workflows codegen --lang swift` orchestrator (issue #1547, Phases 2-3).
|
|
3
3
|
*
|
|
4
4
|
* The Swift counterpart of `workflow-codegen/generator.ts`. Reads the SAME
|
|
5
|
-
* synced workflow TOMLs (
|
|
5
|
+
* synced workflow TOMLs (`primitive/<env>/workflows/*.toml`) and
|
|
6
6
|
* emits ONE `<key>.generated.swift` per workflow. Each file carries the
|
|
7
7
|
* workflow's `<Key>Input`/`<Key>Output` Swift `Codable` types (Phase 1's
|
|
8
8
|
* `renderSwiftRootType`) plus — Phase 3 — a typed invoker factory: a free
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `workflows codegen --lang swift` orchestrator (issue #1547, Phases 2-3).
|
|
3
3
|
*
|
|
4
4
|
* The Swift counterpart of `workflow-codegen/generator.ts`. Reads the SAME
|
|
5
|
-
* synced workflow TOMLs (
|
|
5
|
+
* synced workflow TOMLs (`primitive/<env>/workflows/*.toml`) and
|
|
6
6
|
* emits ONE `<key>.generated.swift` per workflow. Each file carries the
|
|
7
7
|
* workflow's `<Key>Input`/`<Key>Output` Swift `Codable` types (Phase 1's
|
|
8
8
|
* `renderSwiftRootType`) plus — Phase 3 — a typed invoker factory: a free
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Resolve the sync-directory override for a command that takes one (issue #2807).
|
|
3
3
|
*
|
|
4
4
|
* `--dir <path>` is the canonical spelling of "read/write the config tree HERE
|
|
5
|
-
* instead of the auto-resolved
|
|
5
|
+
* instead of the auto-resolved `primitive/<env>/`": every `config`
|
|
6
6
|
* verb has shipped it since the tree existed, and it is the spelling the
|
|
7
7
|
* getting-started pages and the CLI skill teach. The codegen-family commands
|
|
8
8
|
* (`databases codegen`, `workflows codegen`, `databases schema generate`)
|
|
@@ -3,7 +3,7 @@ import { error, warn } from "./output.js";
|
|
|
3
3
|
* Resolve the sync-directory override for a command that takes one (issue #2807).
|
|
4
4
|
*
|
|
5
5
|
* `--dir <path>` is the canonical spelling of "read/write the config tree HERE
|
|
6
|
-
* instead of the auto-resolved
|
|
6
|
+
* instead of the auto-resolved `primitive/<env>/`": every `config`
|
|
7
7
|
* verb has shipped it since the tree existed, and it is the spelling the
|
|
8
8
|
* getting-started pages and the CLI skill teach. The codegen-family commands
|
|
9
9
|
* (`databases codegen`, `workflows codegen`, `databases schema generate`)
|