@contentful/experience-design-system-cli 2.42.1-dev-build-c7f654e2.0 → 2.42.1-dev-build-2fb477e0.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 +464 -607
- package/dist/index.js +314 -475
- package/dist/package.json +1 -1
- package/dist/src/tui/debug-store.d.ts +1 -3
- package/dist/src/tui/import/shared/error-step/controls.d.ts +0 -2
- package/dist/src/tui/import/shared/error-step/logic.d.ts +1 -2
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +12 -2
- package/package.json +3 -3
- package/dist/src/tui/import/shared/error-step/use-support-bundle.d.ts +0 -3
- package/dist/src/tui/support-bundle.d.ts +0 -25
- package/dist/src/tui/zip.d.ts +0 -7
package/dist/package.json
CHANGED
|
@@ -26,9 +26,7 @@ export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
|
|
|
26
26
|
}): void;
|
|
27
27
|
/** Keeps what the open run has so far, in memory. It is only written if the run is cut short. */
|
|
28
28
|
export declare function setDebugRunProgress(outputs: Record<string, unknown>): void;
|
|
29
|
-
|
|
30
|
-
export declare function settleDebugLogs(): Promise<void>;
|
|
31
|
-
export declare function finishDebugRun(args: {
|
|
29
|
+
export declare function finishDebugRun({ outputs, status, exitMethod, }: {
|
|
32
30
|
outputs: Record<string, unknown>;
|
|
33
31
|
status: Status;
|
|
34
32
|
exitMethod: ExitMethod;
|
|
@@ -2,8 +2,6 @@ interface ErrorHandlers {
|
|
|
2
2
|
onExit: () => void;
|
|
3
3
|
onRetry?: () => void;
|
|
4
4
|
onAcknowledge?: () => void;
|
|
5
|
-
/** Set once there is something to show in the file manager. */
|
|
6
|
-
onOpen?: () => void;
|
|
7
5
|
}
|
|
8
6
|
export declare function useErrorControls(handlers: ErrorHandlers): void;
|
|
9
7
|
export {};
|
|
@@ -2,11 +2,10 @@ interface Key {
|
|
|
2
2
|
return: boolean;
|
|
3
3
|
escape: boolean;
|
|
4
4
|
}
|
|
5
|
-
export type ErrorAction = 'exit' | 'retry' | 'acknowledge' |
|
|
5
|
+
export type ErrorAction = 'exit' | 'retry' | 'acknowledge' | null;
|
|
6
6
|
interface Available {
|
|
7
7
|
canRetry: boolean;
|
|
8
8
|
canAcknowledge: boolean;
|
|
9
|
-
canOpen: boolean;
|
|
10
9
|
}
|
|
11
10
|
export declare function errorAction(input: string, key: Key, available: Available): ErrorAction;
|
|
12
11
|
export declare function errorControls(available: Available): {
|
|
@@ -12,7 +12,8 @@ export type ScanResult = {
|
|
|
12
12
|
ok: false;
|
|
13
13
|
failure: ScanFailureCode;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
/** `empty` is a scan that worked but found nothing the import can use, so there is nothing to continue with. */
|
|
16
|
+
export type PathPhase = 'scanning' | 'ready' | 'empty' | 'failed';
|
|
16
17
|
export type KeyAction = 'confirm' | 'change-path' | 'back';
|
|
17
18
|
export interface SummaryRow {
|
|
18
19
|
label: string;
|
|
@@ -48,6 +49,15 @@ export declare function summarize(counts: FileCounts, { hasTokens }?: {
|
|
|
48
49
|
export declare function scanReport(scan: ScanResult | undefined, path: string, { hasTokens }?: {
|
|
49
50
|
hasTokens?: boolean;
|
|
50
51
|
}): Record<string, unknown>;
|
|
51
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Whether the scan found anything to import: component files, or (when the import also generates tokens) `.json`
|
|
54
|
+
* files. Without either there is nothing for the later steps to work on.
|
|
55
|
+
*/
|
|
56
|
+
export declare function hasImportableFiles(counts: FileCounts, { hasTokens }?: {
|
|
57
|
+
hasTokens?: boolean;
|
|
58
|
+
}): boolean;
|
|
59
|
+
export declare function phaseOf(scan: ScanResult | undefined, { hasTokens }?: {
|
|
60
|
+
hasTokens?: boolean;
|
|
61
|
+
}): PathPhase;
|
|
52
62
|
export declare function keyAction(phase: PathPhase, input: string, key: Key): KeyAction | undefined;
|
|
53
63
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.42.1-dev-build-
|
|
3
|
+
"version": "2.42.1-dev-build-2fb477e0.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.42.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-types": "2.42.1-dev-build-2fb477e0.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.42.1-dev-build-
|
|
62
|
+
"@contentful/experience-design-system-backend-pipeline": "2.42.1-dev-build-2fb477e0.0"
|
|
63
63
|
},
|
|
64
64
|
"repository": {
|
|
65
65
|
"type": "git",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type SupportBundle = {
|
|
2
|
-
status: 'created';
|
|
3
|
-
path: string;
|
|
4
|
-
files: number;
|
|
5
|
-
}
|
|
6
|
-
/** There are no debug logs to send, which is what Debug Mode being off looks like. */
|
|
7
|
-
| {
|
|
8
|
-
status: 'no-logs';
|
|
9
|
-
}
|
|
10
|
-
/** The zip could not be made. The logs are still in `folder`. */
|
|
11
|
-
| {
|
|
12
|
-
status: 'failed';
|
|
13
|
-
folder: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Zips this session's debug logs, in the folder layout they have on disk, into the session folder next to `debug/`. The
|
|
17
|
-
* zip is not inside `debug/`, so it is never zipped into itself and the log cleanup leaves it alone. It waits for logs
|
|
18
|
-
* that are still being written, so the step that just failed is in it. Making the zip never throws: it is offered on the
|
|
19
|
-
* screen that explains an error, and must not replace that error with another.
|
|
20
|
-
*/
|
|
21
|
-
export declare function bundleDebugLogs(): Promise<SupportBundle>;
|
|
22
|
-
/** Shows the zip (or, if there is none, the debug folder) in Finder or File Explorer. Best effort: a failure is ignored. */
|
|
23
|
-
export declare function openSupportBundle(bundle: SupportBundle): void;
|
|
24
|
-
/** What the error screen says about the logs, in one short instruction. */
|
|
25
|
-
export declare function supportInstruction(bundle: SupportBundle): string;
|