@contentful/experience-design-system-cli 2.37.1-dev-build-04545499.0 → 2.37.1-dev-build-2af55e4f.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-04545499.0",
3
+ "version": "2.37.1-dev-build-2af55e4f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,8 +29,9 @@ export type RunLivePreviewOptions = {
29
29
  };
30
30
  /**
31
31
  * Pure async helper used by `useLivePreview` to re-fire `previewImport` after a
32
- * FieldEditor save in the wizard's final-review step. A side-effect-bearing
33
- * pure orchestrator that owns no React state.
32
+ * FieldEditor save in the wizard's final-review step. Mirrors the round-1
33
+ * `runScopeGate` shape: a side-effect-bearing pure orchestrator that owns no
34
+ * React state.
34
35
  *
35
36
  * Skips silently (returns `{ response: null }`) when any of `spaceId`,
36
37
  * `environmentId`, or `cmaToken` is missing — live preview is an enhancement
@@ -0,0 +1,12 @@
1
+ export declare function runScopeGate(opts: {
2
+ sessionId: string;
3
+ decisions: {
4
+ accepted: string[];
5
+ rejected: string[];
6
+ };
7
+ onAdvanceToGenerate: (info: {
8
+ sessionId: string;
9
+ acceptedCount: number;
10
+ }) => Promise<void> | void;
11
+ onAdvanceToPushFlow: (acceptedCount: number) => Promise<void> | void;
12
+ }): Promise<void>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Extracted spawn helper for the `generate components` subprocess.
3
+ *
4
+ * Why this exists: the wizard now kicks off generation from TWO call sites —
5
+ * the post-credentials path (`runGenerate`) AND a pre-fetch from scope-gate
6
+ * confirm (Change 2 in the prefetch spec). Both need the same spawn-and-stream
7
+ * behavior but the await-on-exit happens at different times. Keeping `runGenerate`
8
+ * as a thin wrapper around this helper lets the pre-fetch path stash the
9
+ * `donePromise` in a ref and resolve it later.
10
+ *
11
+ * Subprocess hygiene: we listen for 'close' (not 'exit') when surfacing the
12
+ * final result so the child's stdio + any inherited file handles (e.g. the
13
+ * pipeline SQLite WAL/SHM) have been fully released by the OS before the
14
+ * wizard re-enters that path. This applies the same lesson as
15
+ * fix/auto-filter-db-lock.
16
+ */
17
+ import { type ChildProcess } from 'node:child_process';
18
+ export type SpawnGenerateResult = {
19
+ exitCode: number;
20
+ signal: NodeJS.Signals | null;
21
+ stdout: string;
22
+ stderr: string;
23
+ };
24
+ export type SpawnGenerateOpts = {
25
+ command: string;
26
+ args: string[];
27
+ onStderr?: (chunk: string) => void;
28
+ onStdout?: (chunk: string) => void;
29
+ };
30
+ export declare function spawnGenerateChild(opts: SpawnGenerateOpts): {
31
+ child: ChildProcess;
32
+ donePromise: Promise<SpawnGenerateResult>;
33
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Pure parser for the generate-step stderr stream.
3
+ *
4
+ * Two line shapes can carry progress info:
5
+ *
6
+ * 1. `progress=generate:<done>/<total>:<name>` — emitted at terminal completion
7
+ * of each component in `runAllComponents`. `done` is the count of completed
8
+ * components and is monotonically non-decreasing.
9
+ * 2. `[<index+1>/<total>] <name>` — legacy line emitted at the START of each
10
+ * component (and again on retry). With concurrency > 1, the index reflects
11
+ * the worker's starting position, not completions, so it MUST NOT drive
12
+ * `done` — only `current` (the name shown to the user).
13
+ *
14
+ * Given a chunk and the previous state, returns the updated state.
15
+ */
16
+ export type GenerateProgressState = {
17
+ done: number;
18
+ total: number;
19
+ current: string;
20
+ } | null;
21
+ export declare function parseGenerateStderrChunk(chunk: string, prev: GenerateProgressState): GenerateProgressState;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-04545499.0",
3
+ "version": "2.37.1-dev-build-2af55e4f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-04545499.0",
3
+ "version": "2.37.1-dev-build-2af55e4f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,9 +45,9 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-generation": "2.37.1-dev-build-04545499.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-04545499.0",
50
- "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-04545499.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-2af55e4f.0",
49
+ "@contentful/experience-design-system-generation": "2.37.1-dev-build-2af55e4f.0",
50
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-2af55e4f.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@tsconfig/node24": "^24.0.4",