@contentful/experience-design-system-cli 2.41.1-dev-build-bf9d918c.0 → 2.41.1-dev-build-3a724687.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.41.1-dev-build-bf9d918c.0",
3
+ "version": "2.41.1-dev-build-3a724687.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,8 +24,6 @@ export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
24
24
  menuOption: string;
25
25
  inputs: Record<string, unknown>;
26
26
  }): void;
27
- /** Keeps what the open run has so far, in memory. It is only written if the run is cut short. */
28
- export declare function setDebugRunProgress(outputs: Record<string, unknown>): void;
29
27
  export declare function finishDebugRun({ outputs, status, exitMethod, }: {
30
28
  outputs: Record<string, unknown>;
31
29
  status: Status;
@@ -7,28 +7,6 @@ export type CredentialValues = Record<CredentialField, string>;
7
7
  */
8
8
  export declare function credentialsPurpose(tokensOnly: boolean): string;
9
9
  export declare function normalize(values: CredentialValues): CredentialValues;
10
- /** The required fields that are still empty, by name. */
11
- export declare function missingFields(values: CredentialValues): CredentialField[];
10
+ export declare function missingField(values: CredentialValues): boolean;
12
11
  export declare function isUnchanged(current: CredentialValues, initial: CredentialValues): boolean;
13
- export type CredentialAttempt = {
14
- host: string;
15
- reason: string;
16
- };
17
- /**
18
- * One rejected attempt as the log records it. The reason is scrubbed of the token first: an API error can echo what it
19
- * was sent, so the message the user saw may contain it.
20
- */
21
- export declare function rejectedAttempt(reason: string, credentials: CredentialValues): CredentialAttempt;
22
- /**
23
- * The credentials as the log shows them. `cma_token` is the only key the token may be under: the logger reduces it to
24
- * "present, N chars", which is enough to spot a truncated paste without writing the secret.
25
- */
26
- export declare function credentialsLog(credentials: CredentialValues): Record<string, unknown>;
27
- /** The log's outputs: where the user ended up, the credentials, which fields they changed (names only), and the rejections. */
28
- export declare function credentialsOutputs({ outcome, credentials, initial, attempts, }: {
29
- outcome: 'validated' | 'back';
30
- credentials: CredentialValues;
31
- initial: CredentialValues;
32
- attempts: readonly CredentialAttempt[];
33
- }): Record<string, unknown>;
34
12
  export {};
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import type { ImportTarget } from '../00-preflight/logic.js';
3
2
  import { type CredentialValues } from './logic.js';
4
3
  import { type ValidationResult } from './validate.js';
5
4
  export type CredentialsResult = {
@@ -9,8 +8,6 @@ export type CredentialsResult = {
9
8
  skipped: true;
10
9
  };
11
10
  interface CredentialsScreenProps {
12
- /** What the user chose to import at Preflight; it decides which steps run, so every log notes it. */
13
- mode: ImportTarget;
14
11
  onDone: (result: CredentialsResult) => void;
15
12
  onBack: () => void;
16
13
  initial?: Partial<CredentialValues>;
@@ -18,5 +15,5 @@ interface CredentialsScreenProps {
18
15
  /** The import only generates tokens, so there are no components to look up in the space. */
19
16
  tokensOnly?: boolean;
20
17
  }
21
- export declare function CredentialsScreen({ mode, onDone, onBack, initial, validate, tokensOnly, }: CredentialsScreenProps): React.ReactElement;
18
+ export declare function CredentialsScreen({ onDone, onBack, initial, validate, tokensOnly, }: CredentialsScreenProps): React.ReactElement;
22
19
  export {};
@@ -1,20 +1,7 @@
1
1
  import type { ExtractAndComposeProgress } from '@contentful/experience-design-system-backend-pipeline';
2
- import type { ExtractionInput, ExtractionProgress, ExtractionResult } from './types.js';
2
+ import type { ExtractionProgress } from './types.js';
3
3
  /** Structured progress events emitted by the orchestrator (extraction + composition). */
4
4
  export type ProgressEvent = ExtractAndComposeProgress;
5
- /**
6
- * What the debug log says the stage started with. The credentials come with the input, so the CMA token is only ever put
7
- * under `cma_token`, which the logger reduces to "present, N chars" (or "not set" when the credentials were skipped).
8
- */
9
- export declare function extractionLogInputs(input: ExtractionInput): Record<string, unknown>;
10
- /**
11
- * How the stage ended. A failure names the step that failed and its message, scrubbed of the CMA token; the last progress
12
- * says which of the parallel jobs had finished, failed or was still running.
13
- */
14
- export declare function extractionLogOutputs(result: ExtractionResult, progress: ExtractionProgress | undefined, cmaToken: string): {
15
- outputs: Record<string, unknown>;
16
- status: 'success' | 'error';
17
- };
18
5
  /**
19
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
20
7
  * apply stays 'idle' and has no row: existing entities need credentials, and token definitions need a raw tokens file.
@@ -1,11 +1,4 @@
1
- import type { GenerationInput, GenerationProgress, GenerationResult } from './types.js';
2
- /** What the debug log says the stage started with. The counts are logged, not the lists of names. */
3
- export declare function generationLogInputs(input: GenerationInput): Record<string, unknown>;
4
- /** How the stage ended. A failure names the step that failed (save decisions, generate components, map tokens). */
5
- export declare function generationLogOutputs(result: GenerationResult, progress: GenerationProgress | undefined): {
6
- outputs: Record<string, unknown>;
7
- status: 'success' | 'error';
8
- };
1
+ import type { GenerationProgress } from './types.js';
9
2
  export declare function initialProgress(): GenerationProgress;
10
3
  export declare function shouldRunMapTokens(counts: {
11
4
  mappablePropCount: number;
@@ -1,5 +1,5 @@
1
1
  import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
2
- import type { Snapshot } from '@tui/shared/debug-trail.js';
2
+ import type { Snapshot } from '../../shared/debug-trail.js';
3
3
  import type { AgentConfig } from './agent-store.js';
4
4
  /**
5
5
  * The agent settings as flat text, for `diffSnapshots`: `default_agent`, then `<agent>.model` and `<agent>.binary` for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.41.1-dev-build-bf9d918c.0",
3
+ "version": "2.41.1-dev-build-3a724687.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-types": "2.41.1-dev-build-bf9d918c.0"
48
+ "@contentful/experience-design-system-types": "2.41.1-dev-build-3a724687.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@tsconfig/node24": "^24.0.4",
@@ -59,7 +59,7 @@
59
59
  "ink-testing-library": "^4.0.0",
60
60
  "typescript-eslint": "^8.67.0",
61
61
  "vitest": "^4.0.16",
62
- "@contentful/experience-design-system-backend-pipeline": "2.41.1-dev-build-bf9d918c.0"
62
+ "@contentful/experience-design-system-backend-pipeline": "2.41.1-dev-build-3a724687.0"
63
63
  },
64
64
  "repository": {
65
65
  "type": "git",
@@ -1,8 +0,0 @@
1
- import type { ScopeComponent, ScopeDecisions } from './types.js';
2
- /** What the gate starts with: how many components, and what the AI suggested for them. */
3
- export declare function scopeGateLogInputs(components: ScopeComponent[], tokenCount: number): Record<string, unknown>;
4
- /**
5
- * What the user decided. Everything not accepted counts as rejected, so a component the AI accepted and the user never
6
- * touched shows as left out. Components with the same name share one decision, so names are counted once.
7
- */
8
- export declare function scopeGateLogOutputs(components: ScopeComponent[], decisions: ScopeDecisions): Record<string, unknown>;
@@ -1,48 +0,0 @@
1
- import type { FlowState } from './types.js';
2
- type FlowStep = FlowState['step'];
3
- /** Where the log goes: one folder for the whole step, numbered so it sorts after the earlier steps. */
4
- export declare const FLOW_RUN: {
5
- readonly flow: "import/publish";
6
- readonly step: "10-publish";
7
- readonly menuOption: "Publish";
8
- };
9
- export type FlowTrail = {
10
- startedAt: number;
11
- stageStartedAt: number;
12
- /** The step the flow is in now. */
13
- at: FlowStep;
14
- stages: string[];
15
- /** How many times the user went back from the preview to edit the definitions. */
16
- edits: number;
17
- preview?: Record<string, unknown>;
18
- push?: Record<string, unknown>;
19
- pushFailed?: boolean;
20
- saved?: {
21
- path: string;
22
- run_id: string | null;
23
- };
24
- failure?: {
25
- step: string;
26
- message: string;
27
- };
28
- validation?: Record<string, unknown>;
29
- };
30
- /** What the run starts with, stated once. The token is only ever under `cma_token`, which the logger reduces to "present, N chars". */
31
- export declare function flowContext(state: FlowState): Record<string, unknown>;
32
- /** Starts the trail at the state the run began in. */
33
- export declare function openTrail(state: FlowState, now: number): FlowTrail;
34
- /** Adds what happened when the flow moved from one step to the next. */
35
- export declare function advance(trail: FlowTrail, from: FlowState, to: FlowState, now: number): FlowTrail;
36
- export declare const isFlowFinished: (step: FlowStep) => boolean;
37
- /** What a crash or Ctrl+C writes if it cuts the run short. */
38
- export declare function flowProgress(trail: FlowTrail, now: number): Record<string, unknown>;
39
- /**
40
- * How the run ended. `final` is the state it ended in, or undefined when the import was left while the run was open. The
41
- * outcome names the cause, so a failed push or preview says why in the first line of its own log.
42
- */
43
- export declare function flowFinish(trail: FlowTrail, final: FlowState | undefined, now: number): {
44
- outputs: Record<string, unknown>;
45
- status: 'success' | 'error';
46
- exitMethod: 'saved' | 'discarded';
47
- };
48
- export {};
@@ -1,7 +0,0 @@
1
- import type { FlowState } from './types.js';
2
- /**
3
- * Writes one debug log for the flow after the review. The trail grows in memory as the step changes; the log is written
4
- * when the flow reaches done or an error, or when the import is left. The trail is also handed to the logger as it grows,
5
- * so a crash or Ctrl+C writes what happened so far. The final review is not part of it: it is its own step.
6
- */
7
- export declare function useFlowLog(state: FlowState): void;