@contentful/experience-design-system-cli 2.37.1-dev-build-ced30421.0 → 2.37.1-dev-build-4ce44f69.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 +409 -411
- package/dist/index.js +298 -348
- package/dist/package.json +1 -1
- package/dist/src/tui/debug-store.d.ts +11 -1
- package/dist/src/tui/import/steps/07-scope-gate/keymap.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +0 -2
- 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.d.ts +1 -1
- package/dist/src/tui/import/steps/08-generation/types.d.ts +4 -2
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +2 -0
- package/dist/src/tui/settings/contentful-configuration/config-store.d.ts +1 -0
- package/legacy/package.json +1 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
type Status = 'success' | 'error';
|
|
2
2
|
type ExitMethod = 'saved' | 'discarded' | 'crashed';
|
|
3
|
-
export declare function currentDebugSessionDir(): string;
|
|
3
|
+
export declare function currentDebugSessionDir(): string | undefined;
|
|
4
|
+
/** This terminal session's folder, `<base>/.contentful/<session>/`, or undefined until it is known. */
|
|
5
|
+
export declare function currentSessionDir(): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Starts this terminal session's folder in `base`. The base directory setting being saved passes `replace` so the new
|
|
8
|
+
* location wins; the import passes nothing and only starts a session when none exists yet. Fail-open like the rest of
|
|
9
|
+
* the logger.
|
|
10
|
+
*/
|
|
11
|
+
export declare function startDebugSessionIn(base: string, { replace }?: {
|
|
12
|
+
replace?: boolean | undefined;
|
|
13
|
+
}): Promise<void>;
|
|
4
14
|
export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
|
|
5
15
|
flow: string;
|
|
6
16
|
step: string;
|
|
@@ -45,8 +45,6 @@ export interface VisibleRow {
|
|
|
45
45
|
cycleChild?: boolean;
|
|
46
46
|
itemIdx: number;
|
|
47
47
|
rootName?: string;
|
|
48
|
-
/** The parent whose slot the nested row sits in. */
|
|
49
|
-
parentName?: string;
|
|
50
48
|
}
|
|
51
49
|
export declare function buildVisibleRows(props: {
|
|
52
50
|
items: GroupedSidebarItem[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ScopeGraph } from './graph/index.js';
|
|
2
|
-
import type { Decision,
|
|
2
|
+
import type { Decision, ScopeComponent, ScopeDecisions } from './types.js';
|
|
3
3
|
export type DecisionState = Map<string, Decision>;
|
|
4
4
|
export type DecisionAction = {
|
|
5
5
|
type: 'accept';
|
|
@@ -15,6 +15,5 @@ export type DecisionAction = {
|
|
|
15
15
|
export declare function reduceDecisions(state: DecisionState, action: DecisionAction, components: ScopeComponent[], graph: ScopeGraph): DecisionState;
|
|
16
16
|
/** Whether rejecting `name` touches 2 or more other components, so the screen has to ask first. */
|
|
17
17
|
export declare function rejectNeedsConfirmation(graph: ScopeGraph, name: string, state: DecisionState): boolean;
|
|
18
|
-
export declare function withoutSlotChildren(components: ScopeComponent[], removedEdges: ParentChildEdge[]): ScopeComponent[];
|
|
19
18
|
/** Everything not accepted counts as rejected, as legacy's `partition` did. */
|
|
20
|
-
export declare function partitionDecisions(components: ScopeComponent[], state: DecisionState
|
|
19
|
+
export declare function partitionDecisions(components: ScopeComponent[], state: DecisionState): ScopeDecisions;
|
|
@@ -10,17 +10,10 @@ export type ScopeComponent = Omit<ScopeComponentRow, 'aiDecision' | 'aiReason' |
|
|
|
10
10
|
slots?: ScopeComponentRow['slots'];
|
|
11
11
|
};
|
|
12
12
|
export type Decision = 'accepted' | 'rejected' | 'undecided';
|
|
13
|
-
/** One slot edge: `parent` allows `child` in a slot. */
|
|
14
|
-
export interface ParentChildEdge {
|
|
15
|
-
parent: string;
|
|
16
|
-
child: string;
|
|
17
|
-
}
|
|
18
13
|
/** What the user confirmed. Becomes `ImportHandoff.scope`; the legacy wizard saves it and starts generation. */
|
|
19
14
|
export interface ScopeDecisions {
|
|
20
15
|
accepted: string[];
|
|
21
16
|
rejected: string[];
|
|
22
|
-
/** Slot edges removed at the gate. The child keeps its own decision. Missing means none were removed. */
|
|
23
|
-
excludedSlotEdges?: ParentChildEdge[];
|
|
24
17
|
}
|
|
25
18
|
export type ScopeGateLoad = {
|
|
26
19
|
ok: true;
|
|
@@ -10,7 +10,7 @@ export interface PendingRejectCascade {
|
|
|
10
10
|
ancestors: string[];
|
|
11
11
|
descendants: string[];
|
|
12
12
|
}
|
|
13
|
-
export declare function useScopeGate({ components
|
|
13
|
+
export declare function useScopeGate({ components, onConfirm, onQuit }: UseScopeGateOptions): {
|
|
14
14
|
totalWidth: number;
|
|
15
15
|
columnPlan: {
|
|
16
16
|
layout: "single" | "two-column";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { GenerationHandoff } from '@contentful/experience-design-system-types/handoff';
|
|
2
|
-
import type { ScopeDecisions } from '../07-scope-gate/types.js';
|
|
3
2
|
export interface GenerationInput {
|
|
4
3
|
/** The extraction session the scope was decided on. */
|
|
5
4
|
sessionId: string;
|
|
6
|
-
decisions:
|
|
5
|
+
decisions: {
|
|
6
|
+
accepted: string[];
|
|
7
|
+
rejected: string[];
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* The cache check that ran while the scope gate was open, which restores cached definitions into the pipeline
|
|
9
11
|
* database. The stage waits for it before saving the decisions, since both write to that database.
|
|
@@ -38,6 +38,8 @@ export interface FlowDeps {
|
|
|
38
38
|
/** Writes one line of the wizard's step log. */
|
|
39
39
|
log: (entry: Record<string, unknown>) => void;
|
|
40
40
|
stderr: (text: string) => void;
|
|
41
|
+
/** This terminal session's folder, when there is one; the saved files default to a `dsi-import` folder inside it. */
|
|
42
|
+
sessionDir?: () => Promise<string | undefined>;
|
|
41
43
|
}
|
|
42
44
|
export declare function startWizardLog(): void;
|
|
43
45
|
export declare function realFlowDeps(): FlowDeps;
|
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-4ce44f69.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-4ce44f69.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-4ce44f69.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|