@contentful/experience-design-system-cli 2.37.1-dev-build-5654e400.0 → 2.37.1-dev-build-cffd984a.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 +392 -311
- package/dist/index.js +286 -253
- package/dist/package.json +1 -1
- package/dist/src/tui/debug-store.d.ts +6 -0
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +0 -6
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +3 -1
- package/dist/src/tui/import/steps/10-flow/flow/use-flow.d.ts +1 -4
- package/legacy/package.json +1 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
type Status = 'success' | 'error';
|
|
2
2
|
type ExitMethod = 'saved' | 'discarded' | 'crashed';
|
|
3
3
|
export declare function currentDebugSessionDir(): string;
|
|
4
|
+
/**
|
|
5
|
+
* Moves this session's logs to `<outDir>/debug/sessions/<session>/`, next to the CDF, and writes there from now on.
|
|
6
|
+
* Logs written before the project was known come along. Safe to call repeatedly; a different outDir moves them again.
|
|
7
|
+
* Fail-open like the rest of the logger: if the move fails the logs stay where they were.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setDebugOutDir(outDir: string): Promise<void>;
|
|
4
10
|
export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
|
|
5
11
|
flow: string;
|
|
6
12
|
step: string;
|
|
@@ -38,12 +38,6 @@ 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
|
-
/**
|
|
42
|
-
* Called when the step is about to change, before anything is told about the new one. The host clears the terminal
|
|
43
|
-
* here so the next screen is drawn on a clean one. It has to be before: Ink paints as soon as it is told, and a clear
|
|
44
|
-
* after the paint wipes a static screen like the done step, which nothing draws again.
|
|
45
|
-
*/
|
|
46
|
-
beforeStepChange?: () => void;
|
|
47
41
|
}
|
|
48
42
|
export declare function startWizardLog(): void;
|
|
49
43
|
export declare function realFlowDeps(): FlowDeps;
|
|
@@ -8,10 +8,12 @@ interface FlowScreenProps {
|
|
|
8
8
|
generatePromptPath?: string;
|
|
9
9
|
/** Leaves the import with the exit code the wizard would have exited with. */
|
|
10
10
|
onExit: (exitCode: number) => void;
|
|
11
|
+
/** Called when the step changes so the host can clear Ink's render buffer without scrollback pollution. */
|
|
12
|
+
onStepChange?: () => void;
|
|
11
13
|
}
|
|
12
14
|
/** How many steps the import has, as the wizard counted them. */
|
|
13
15
|
export declare function totalStepsFor(state: Pick<FlowState, 'tokensPath' | 'rawTokensPath' | 'mapTokensEligible'>): number;
|
|
14
16
|
/** Whether the preview gate offers "[e] Edit definitions": only when the document has components to edit. */
|
|
15
17
|
export declare function canEditFromPreview(cdf: FlowState['cdf']): boolean;
|
|
16
|
-
export declare function FlowScreen({ state, controller, livePreview, generatePromptPath, onExit, }: FlowScreenProps): React.ReactElement;
|
|
18
|
+
export declare function FlowScreen({ state, controller, livePreview, generatePromptPath, onExit, onStepChange, }: FlowScreenProps): React.ReactElement;
|
|
17
19
|
export {};
|
|
@@ -3,10 +3,7 @@ import { type FlowController, type FlowDeps, type FlowStart } from './controller
|
|
|
3
3
|
* The flow for a start, once. `start` is undefined until the generation stage has finished, so the hook can be called
|
|
4
4
|
* unconditionally; the step log is started with the controller, as the wizard started it with its first render.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useFlow(start: FlowStart | undefined,
|
|
7
|
-
beforeStepChange?: () => void;
|
|
8
|
-
deps?: () => FlowDeps;
|
|
9
|
-
}): {
|
|
6
|
+
export declare function useFlow(start: FlowStart | undefined, deps?: () => FlowDeps): {
|
|
10
7
|
controller: FlowController;
|
|
11
8
|
state: ReturnType<FlowController['getState']>;
|
|
12
9
|
} | undefined;
|
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-cffd984a.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-cffd984a.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-cffd984a.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|