@contentful/experience-design-system-cli 2.37.1-dev-build-049f8d38.0 → 2.37.1-dev-build-cf4224ad.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 +442 -149
- package/dist/index.js +483 -160
- package/dist/package.json +1 -1
- package/dist/src/tui/import/resolve-user-path.d.ts +1 -0
- package/dist/src/tui/import/steps/03-path-validation/controls.d.ts +13 -0
- package/dist/src/tui/import/steps/03-path-validation/loader.d.ts +2 -0
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +42 -0
- package/dist/src/tui/import/steps/03-path-validation/screen.d.ts +9 -0
- package/dist/src/tui/import/steps/index.d.ts +1 -0
- package/legacy/package.json +1 -1
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveUserPath(raw: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PathPhase } from './logic.js';
|
|
2
|
+
interface Control {
|
|
3
|
+
keys: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface PathValidationHandlers {
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
onChangePath: () => void;
|
|
9
|
+
onBack: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function controlsFor(phase: PathPhase): readonly Control[];
|
|
12
|
+
export declare function usePathValidationControls(phase: PathPhase, handlers: PathValidationHandlers): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type FileCategory = 'tsx' | 'ts' | 'vue' | 'astro' | 'jsx' | 'js' | 'json' | 'other';
|
|
2
|
+
export type FileCounts = Record<FileCategory, number> & {
|
|
3
|
+
total: number;
|
|
4
|
+
};
|
|
5
|
+
export type ScanFailureCode = 'not-found' | 'permission-denied' | 'is-file' | 'not-directory' | 'unreadable';
|
|
6
|
+
export type ScanResult = {
|
|
7
|
+
ok: true;
|
|
8
|
+
counts: FileCounts;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
failure: ScanFailureCode;
|
|
12
|
+
};
|
|
13
|
+
export type PathPhase = 'scanning' | 'ready' | 'failed';
|
|
14
|
+
export type KeyAction = 'confirm' | 'change-path' | 'back';
|
|
15
|
+
export interface SummaryRow {
|
|
16
|
+
label: string;
|
|
17
|
+
count: number;
|
|
18
|
+
tone: 'default' | 'accent' | 'muted';
|
|
19
|
+
}
|
|
20
|
+
export interface Summary {
|
|
21
|
+
total: number;
|
|
22
|
+
rows: SummaryRow[];
|
|
23
|
+
warning?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface FailureMessage {
|
|
26
|
+
headline: string;
|
|
27
|
+
hints: string[];
|
|
28
|
+
}
|
|
29
|
+
interface Key {
|
|
30
|
+
escape: boolean;
|
|
31
|
+
return: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const IGNORED_DIRECTORIES: Set<string>;
|
|
34
|
+
export declare function emptyCounts(): FileCounts;
|
|
35
|
+
export declare function addFile(counts: FileCounts, fileName: string): FileCounts;
|
|
36
|
+
export declare function mergeCounts(a: FileCounts, b: FileCounts): FileCounts;
|
|
37
|
+
export declare function failureFromErrorCode(code: string | undefined): ScanFailureCode;
|
|
38
|
+
export declare function describeFailure(failure: ScanFailureCode, path: string): FailureMessage;
|
|
39
|
+
export declare function summarize(counts: FileCounts): Summary;
|
|
40
|
+
export declare function phaseOf(scan: ScanResult | undefined): PathPhase;
|
|
41
|
+
export declare function keyAction(phase: PathPhase, input: string, key: Key): KeyAction | undefined;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PathValidationScreenProps {
|
|
3
|
+
projectPath: string;
|
|
4
|
+
onConfirm: (projectPath: string) => void;
|
|
5
|
+
onChangePath: () => void;
|
|
6
|
+
onBack: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function PathValidationScreen({ projectPath, onConfirm, onChangePath, onBack, }: PathValidationScreenProps): React.ReactElement;
|
|
9
|
+
export {};
|
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-cf4224ad.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"svelte": "^5.56.4",
|
|
43
43
|
"ts-morph": "^27.0.2",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
45
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-cf4224ad.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@tsconfig/node24": "^24.0.4",
|