@contentful/experience-design-system-cli 2.37.1-dev-build-aa3ffe6f.0 → 2.37.1-dev-build-f0533497.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-aa3ffe6f.0",
3
+ "version": "2.37.1-dev-build-f0533497.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1 @@
1
+ export declare function findSkillPath(fileName: string): string;
@@ -1,28 +1,7 @@
1
- import type { CompositionPhase, ExtractionProgress } from './types.js';
2
- /** One line of the extract subprocess's stderr, decoded. Lines it does not recognise are ignored. */
3
- export type ProgressEvent = {
4
- kind: 'scan';
5
- scanned: number;
6
- } | {
7
- kind: 'scan-done';
8
- total: number;
9
- } | {
10
- kind: 'extract';
11
- totalFiles: number;
12
- } | {
13
- kind: 'composition';
14
- phase: CompositionPhase;
15
- };
16
- /** `progress=scan:12`, `progress=scan-done:40`, `progress=extract:3/40:7`, `progress=composition:cache-hit`. */
17
- export declare function parseProgressLine(line: string): ProgressEvent | null;
18
- /** `session=<id>` on the extract subprocess's stdout. It arrives before composition finishes, which is when selection starts. */
19
- export declare function parseSessionLine(line: string): string | null;
20
- /** The first `session=<id>` anywhere in a command's stdout. */
21
- export declare function findSession(stdout: string): string | null;
22
- /** `Extracted 7 components` in the extract command's stderr; 0 when it never printed one. */
23
- export declare function parseExtractedCount(stderr: string): number;
24
- /** `(12 tokens` in the output of `print tokens`. */
25
- export declare function parsePrintTokensCount(stdout: string): number;
1
+ import type { ExtractAndComposeProgress } from '@contentful/experience-design-system-backend-pipeline';
2
+ import type { ExtractionProgress } from './types.js';
3
+ /** Structured progress events emitted by the orchestrator (extraction + composition). */
4
+ export type ProgressEvent = ExtractAndComposeProgress;
26
5
  /**
27
6
  * Every job the stage will run starts on the first frame, so no row appears later as a surprise. A job that does not
28
7
  * apply stays 'idle' and has no row: existing entities need credentials, token definitions need a raw tokens file, and
@@ -1,24 +1,26 @@
1
- import { checkAgentAuth } from '@contentful/experience-design-system-generation';
2
- import { runTokenGeneration, spawnExtract } from './processes.js';
1
+ import { checkAgentAuth, runExtractAndComposeSession, runGenerateTokensSession } from '@contentful/experience-design-system-backend-pipeline';
3
2
  import { runSelection } from './selection.js';
4
3
  import type { ExtractionInput, ExtractionProgress, ExtractionResult } from './types.js';
5
4
  /** The outside world the stage talks to, so the order of events can be tested without a network, an agent or a CLI. */
6
5
  export interface ExtractionDeps {
7
6
  checkAgentAuth: typeof checkAgentAuth;
8
7
  fetchEntities: (credentials: NonNullable<ExtractionInput['credentials']>, outDir: string) => Promise<string | null>;
9
- spawnExtract: typeof spawnExtract;
10
- runTokenGeneration: typeof runTokenGeneration;
8
+ runExtractAndComposeSession: typeof runExtractAndComposeSession;
9
+ runGenerateTokensSession: typeof runGenerateTokensSession;
11
10
  runSelection: typeof runSelection;
12
11
  }
13
12
  /**
14
- * Runs the stage. The jobs overlap exactly as they do in the legacy wizard:
13
+ * Runs the stage. The jobs overlap exactly as they did when extract was a
14
+ * subprocess:
15
15
  *
16
- * entities fetch ───────┐
17
- * __extract ── session= ┴─ selection agent (waits for the fetch) ──┐
18
- * └──────────────────────────────── exits (composition done) ─┴─ result
19
- * __generate tokens → print tokens (only when the tokens are not being reused)
16
+ * entities fetch ───────────────────┐
17
+ * extract + compose (in-process) │
18
+ * └─ onSessionCreated(id) ────────┴─ selection agent (waits for fetch) ──┐
19
+ * └──────────────────────── returns (composition done) ─────────────────┴─ result
20
+ * token generation (only when the tokens are not being reused)
20
21
  *
21
- * Selection starts the moment the session id is printed, so it overlaps with composition. When more than one job
22
- * fails, the error reported is the first of: extract, no components, selection, token generation.
22
+ * Selection starts the moment the orchestrator mints the sessionId, so it
23
+ * overlaps with composition. When more than one job fails, the error reported
24
+ * is the first of: extract, no components, selection, token generation.
23
25
  */
24
26
  export declare function runExtraction(input: ExtractionInput, onProgress: (progress: ExtractionProgress) => void, deps?: ExtractionDeps): Promise<ExtractionResult>;
@@ -1,4 +1,4 @@
1
- import { type AgentName } from '@contentful/experience-design-system-generation';
1
+ import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
2
2
  export interface SelectionOptions {
3
3
  sessionId: string;
4
4
  agent: AgentName;
@@ -2,6 +2,8 @@ import type { ExtractionHandoff, ImportHandoff } from '@contentful/experience-de
2
2
  export type TokenStrategy = ImportHandoff['tokens']['strategy'];
3
3
  export interface ExtractionInput {
4
4
  projectPath: string;
5
+ /** Absolute source files from the path-validation step (collectFiles output). */
6
+ filePaths: string[];
5
7
  /** Raw tokens file the user pointed at (always set: v2 asks for one). */
6
8
  rawTokensPath: string;
7
9
  /** From the token reuse step. 'reuse' skips token generation entirely. */
@@ -18,7 +20,7 @@ export interface ExtractionInput {
18
20
  promptOverrides: string[];
19
21
  noCache: boolean;
20
22
  }
21
- export type CompositionPhase = 'resolving' | 'cache-hit' | 'done' | `agent:${string}`;
23
+ type CompositionPhase = 'resolving' | 'cache-hit' | 'done' | `agent:${string}`;
22
24
  type JobStatus = 'idle' | 'running' | 'complete' | 'failed';
23
25
  /** Everything the extracting screen shows. One field per row. */
24
26
  export interface ExtractionProgress {
@@ -30,10 +30,12 @@
30
30
  "lint:fix": "nx lint:fix experience-design-system-cli-legacy"
31
31
  },
32
32
  "dependencies": {
33
+ "@contentful/experience-design-system-backend-pipeline": "workspace:*",
33
34
  "@contentful/experience-design-system-types": "workspace:*",
34
35
  "@inkjs/ui": "^2.0.0",
35
36
  "@segment/analytics-node": "^3.0.0",
36
37
  "@vue/compiler-sfc": "^3.5.31",
38
+ "ajv": "^8.17.1",
37
39
  "commander": "^13.1.0",
38
40
  "contentful-management": "^12.17.0",
39
41
  "figures": "6.1.0",
@@ -42,7 +44,8 @@
42
44
  "react-devtools-core": "^4.19.1",
43
45
  "svelte": "^5.56.4",
44
46
  "ts-morph": "^27.0.2",
45
- "typescript": "^5.9.3"
47
+ "typescript": "^5.9.3",
48
+ "zod": "^4.3.6"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@contentful/experience-design-system-client": "workspace:*",