@contentful/experience-design-system-cli 2.37.1-dev-build-444a2d6a.0 → 2.37.1-dev-build-04545499.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/app.js +973 -290
- package/dist/index.js +1014 -306
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +0 -5
- package/dist/src/tui/import/steps/07-scope-gate/state.d.ts +2 -3
- package/dist/src/tui/import/steps/07-scope-gate/types.d.ts +0 -7
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.d.ts +2 -6
- package/dist/src/tui/import/steps/07-scope-gate/use-scope-gate.d.ts +1 -2
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +44 -0
- package/dist/src/tui/import/steps/08-generation/map-tokens.d.ts +14 -0
- package/dist/src/tui/import/steps/08-generation/processes.d.ts +42 -0
- package/dist/src/tui/import/steps/08-generation/run.d.ts +26 -0
- package/dist/src/tui/import/steps/08-generation/save-decisions.d.ts +8 -0
- package/dist/src/tui/import/steps/08-generation/screen.d.ts +12 -0
- package/dist/src/tui/import/steps/08-generation/types.d.ts +47 -0
- package/dist/src/tui/import/steps/08-generation/use-generation.d.ts +14 -0
- package/legacy/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -2
- package/legacy/dist/src/import/tui/WizardApp.d.ts +1 -36
- package/legacy/dist/src/import/tui/handoff.d.ts +10 -13
- package/legacy/dist/src/import/tui/runLivePreview.d.ts +2 -3
- package/legacy/dist/src/index.js +55 -908
- package/legacy/dist/src/session/db.d.ts +0 -11
- package/legacy/package.json +1 -1
- package/package.json +4 -4
- package/legacy/dist/src/import/tui/runScopeGate.d.ts +0 -14
- package/legacy/dist/src/import/tui/spawn-generate.d.ts +0 -33
- package/legacy/dist/src/import/tui/wizard-generate-progress.d.ts +0 -21
|
@@ -99,21 +99,10 @@ export type ScopeComponentRow = {
|
|
|
99
99
|
}>;
|
|
100
100
|
};
|
|
101
101
|
export declare function loadScopeComponents(db: DatabaseSync, sessionId: string): ScopeComponentRow[];
|
|
102
|
-
/** A parent component's slot allowing a child component. */
|
|
103
|
-
export interface ParentChildEdge {
|
|
104
|
-
parent: string;
|
|
105
|
-
child: string;
|
|
106
|
-
}
|
|
107
102
|
export declare function applyScopeDecisions(db: DatabaseSync, sessionId: string, decisions: {
|
|
108
103
|
accepted: string[];
|
|
109
104
|
rejected: string[];
|
|
110
|
-
excludedSlotEdges?: ParentChildEdge[];
|
|
111
105
|
}): void;
|
|
112
|
-
/**
|
|
113
|
-
* Drops excluded parent→child edges from slot allowed lists. Rejected
|
|
114
|
-
* components are also removed from every slot, since they will not exist.
|
|
115
|
-
*/
|
|
116
|
-
export declare function removeSlotAllowedComponents(db: DatabaseSync, sessionId: string, edges: ParentChildEdge[], rejectedNames: string[]): void;
|
|
117
106
|
export declare function findLatestSessionForCommand(db: DatabaseSync, command: CommandName): string | null;
|
|
118
107
|
export declare function seedCDFFromPriorSession(db: DatabaseSync, targetSessionId: string): number;
|
|
119
108
|
export declare function seedCDFFromPreviewResponse(db: DatabaseSync, sessionId: string, removedItems: ComponentTypeSummary[]): number;
|
package/legacy/package.json
CHANGED
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-
|
|
3
|
+
"version": "2.37.1-dev-build-04545499.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-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
50
|
-
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-
|
|
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"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ParentChildEdge } from '../../session/db.js';
|
|
2
|
-
export declare function runScopeGate(opts: {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
decisions: {
|
|
5
|
-
accepted: string[];
|
|
6
|
-
rejected: string[];
|
|
7
|
-
excludedSlotEdges?: ParentChildEdge[];
|
|
8
|
-
};
|
|
9
|
-
onAdvanceToGenerate: (info: {
|
|
10
|
-
sessionId: string;
|
|
11
|
-
acceptedCount: number;
|
|
12
|
-
}) => Promise<void> | void;
|
|
13
|
-
onAdvanceToPushFlow: (acceptedCount: number) => Promise<void> | void;
|
|
14
|
-
}): Promise<void>;
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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;
|