@contentful/experience-design-system-cli 2.35.1-dev-build-7780c1f7.0 → 2.35.1-dev-build-215f38d1.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 +342 -130
- package/dist/index.js +395 -134
- package/dist/package.json +2 -1
- package/dist/src/tui/import/spawn-v1-import.d.ts +2 -0
- package/dist/src/tui/import/steps/01-welcome/controls.d.ts +8 -0
- package/dist/src/tui/import/steps/01-welcome/logic.d.ts +8 -0
- package/dist/src/tui/import/steps/01-welcome/screen.d.ts +7 -0
- package/dist/src/tui/import/steps/02-token-input/controls.d.ts +11 -0
- package/dist/src/tui/import/steps/02-token-input/logic.d.ts +9 -0
- package/dist/src/tui/import/steps/02-token-input/screen.d.ts +8 -0
- package/dist/src/tui/import/steps/02-token-input/validate-path.d.ts +12 -0
- package/dist/src/tui/import/steps/index.d.ts +2 -0
- package/legacy/dist/src/import/command.d.ts +1 -1
- package/legacy/dist/src/import/tui/WizardApp.d.ts +2 -1
- package/legacy/dist/src/index.js +7 -2
- package/legacy/package.json +2 -1
- package/package.json +3 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.35.1-dev-build-
|
|
3
|
+
"version": "2.35.1-dev-build-215f38d1.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"contentful-management": "^12.17.0",
|
|
45
45
|
"figures": "6.1.0",
|
|
46
46
|
"ink": "^5.2.1",
|
|
47
|
+
"ink-text-input": "^6.0.0",
|
|
47
48
|
"react": "^18.3.1",
|
|
48
49
|
"react-devtools-core": "^4.19.1",
|
|
49
50
|
"semver": "^7.7.2",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const WELCOME_CONTROLS: readonly [{
|
|
2
|
+
readonly keys: "Enter";
|
|
3
|
+
readonly label: "Continue";
|
|
4
|
+
}, {
|
|
5
|
+
readonly keys: "Esc/q";
|
|
6
|
+
readonly label: "Back to menu";
|
|
7
|
+
}];
|
|
8
|
+
export declare function useWelcomeControls(projectPath: string, onQuit: () => void): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const TOKEN_INPUT_CONTROLS: readonly [{
|
|
2
|
+
readonly keys: "Enter";
|
|
3
|
+
readonly label: "Continue (skips if empty)";
|
|
4
|
+
}, {
|
|
5
|
+
readonly keys: "s";
|
|
6
|
+
readonly label: "Skip";
|
|
7
|
+
}, {
|
|
8
|
+
readonly keys: "Esc/q";
|
|
9
|
+
readonly label: "Back";
|
|
10
|
+
}];
|
|
11
|
+
export declare function useTokenInputControls(tokenPath: string, onSkip: () => void, onBack: () => void): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Key {
|
|
2
|
+
escape: boolean;
|
|
3
|
+
ctrl: boolean;
|
|
4
|
+
meta: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function shouldGoBack(value: string, input: string, key: Key): boolean;
|
|
7
|
+
export declare function shouldSkip(value: string, input: string, key: Key): boolean;
|
|
8
|
+
export declare function toTokenPath(value: string): string | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TokenInputScreenProps {
|
|
3
|
+
onConfirm: (tokensPath: string) => void;
|
|
4
|
+
onSkip: () => void;
|
|
5
|
+
onBack: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function TokenInputScreen({ onConfirm, onSkip, onBack }: TokenInputScreenProps): React.ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TokenPathFailure {
|
|
2
|
+
error: string;
|
|
3
|
+
resolvedPath: string;
|
|
4
|
+
}
|
|
5
|
+
type TokenPathCheck = {
|
|
6
|
+
ok: true;
|
|
7
|
+
path: string;
|
|
8
|
+
} | ({
|
|
9
|
+
ok: false;
|
|
10
|
+
} & TokenPathFailure);
|
|
11
|
+
export declare function validateTokenPath(rawPath: string): TokenPathCheck;
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Command } from 'commander';
|
|
2
2
|
export declare function registerImportCommand(program: Command): void;
|
|
@@ -62,6 +62,7 @@ export type WizardAppProps = {
|
|
|
62
62
|
generatePromptPath?: string;
|
|
63
63
|
skipMapTokens?: boolean;
|
|
64
64
|
initialRawTokensPath?: string;
|
|
65
|
+
skipTokenPrompt?: boolean;
|
|
65
66
|
initialAgentAuth?: Promise<AgentAuthStatus>;
|
|
66
67
|
};
|
|
67
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
|
|
68
|
+
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, promptOverrides, noCache, livePreview, generatePromptPath, skipMapTokens, initialRawTokensPath, skipTokenPrompt, initialAgentAuth, }?: WizardAppProps): React.ReactElement;
|
package/legacy/dist/src/index.js
CHANGED
|
@@ -28240,6 +28240,7 @@ function WizardApp({
|
|
|
28240
28240
|
generatePromptPath,
|
|
28241
28241
|
skipMapTokens = false,
|
|
28242
28242
|
initialRawTokensPath,
|
|
28243
|
+
skipTokenPrompt = false,
|
|
28243
28244
|
initialAgentAuth
|
|
28244
28245
|
} = {}) {
|
|
28245
28246
|
const defaultConfiguredHost = toConfiguredHost(host || process.env["EDS_HOST"]) ?? DEFAULT_CONFIGURED_HOST;
|
|
@@ -28276,7 +28277,7 @@ function WizardApp({
|
|
|
28276
28277
|
const generatePromiseRef = useRef10(null);
|
|
28277
28278
|
const rawTokensEntryReady = !!initialRawTokensPath;
|
|
28278
28279
|
const effectiveNoCache = resolveNoCacheForGenerate({ cliNoCache: noCache });
|
|
28279
|
-
const initialStepResolved = rawTokensEntryReady ? initialProjectPath ? "path-validation" : "credentials" : initialProjectPath ? "token-input" : "welcome";
|
|
28280
|
+
const initialStepResolved = rawTokensEntryReady ? initialProjectPath ? "path-validation" : "credentials" : initialProjectPath ? skipTokenPrompt ? "path-validation" : "token-input" : "welcome";
|
|
28280
28281
|
const initialOutDir = initialProjectPath ? join23(resolve18(initialProjectPath), ".contentful") : "";
|
|
28281
28282
|
const [state, setState] = useState23({
|
|
28282
28283
|
step: initialStepResolved,
|
|
@@ -30344,6 +30345,7 @@ var init_WizardApp = __esm({
|
|
|
30344
30345
|
});
|
|
30345
30346
|
|
|
30346
30347
|
// packages/experience-design-system-cli-legacy/src/import/command.ts
|
|
30348
|
+
import { Option } from "commander";
|
|
30347
30349
|
function registerImportCommand(program) {
|
|
30348
30350
|
const cmd = program.command("import").description("Run the full pipeline: analyze \u2192 select \u2192 generate \u2192 push").option("--project <path>", "Path to the project root to analyze", ".");
|
|
30349
30351
|
cmd.option(
|
|
@@ -30360,7 +30362,9 @@ function registerImportCommand(program) {
|
|
|
30360
30362
|
"Override a composition, selection, token, generation, or token-mapping prompt (repeatable). value is a file path or literal text, e.g. --prompt select=./p.md",
|
|
30361
30363
|
(v, acc) => [...acc, v],
|
|
30362
30364
|
[]
|
|
30363
|
-
).option("--no-cache", "Re-run all steps even if output already exists").
|
|
30365
|
+
).option("--no-cache", "Re-run all steps even if output already exists").addOption(
|
|
30366
|
+
new Option("--skip-token-prompt", "Start after the token prompt, as if the token step was skipped").hideHelp()
|
|
30367
|
+
).action(async (opts) => {
|
|
30364
30368
|
const interactiveTerminalSupported = getInteractiveTerminalSupport().supported;
|
|
30365
30369
|
if (opts.tokens !== void 0) {
|
|
30366
30370
|
const { access: access9 } = await import("node:fs/promises");
|
|
@@ -30402,6 +30406,7 @@ function registerImportCommand(program) {
|
|
|
30402
30406
|
livePreview: true,
|
|
30403
30407
|
generatePromptPath: creds.generatePromptPath,
|
|
30404
30408
|
...opts.tokens ? { initialRawTokensPath: normalizePath(opts.tokens) } : {},
|
|
30409
|
+
...opts.skipTokenPrompt ? { skipTokenPrompt: true } : {},
|
|
30405
30410
|
initialAgentAuth
|
|
30406
30411
|
})
|
|
30407
30412
|
);
|
package/legacy/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.35.1-dev-build-
|
|
3
|
+
"version": "2.35.1-dev-build-215f38d1.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"contentful-management": "^12.17.0",
|
|
45
45
|
"figures": "6.1.0",
|
|
46
46
|
"ink": "^5.2.1",
|
|
47
|
+
"ink-text-input": "^6.0.0",
|
|
47
48
|
"react": "^18.3.1",
|
|
48
49
|
"react-devtools-core": "^4.19.1",
|
|
49
50
|
"semver": "^7.7.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.35.1-dev-build-
|
|
3
|
+
"version": "2.35.1-dev-build-215f38d1.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,13 +35,14 @@
|
|
|
35
35
|
"contentful-management": "^12.17.0",
|
|
36
36
|
"figures": "6.1.0",
|
|
37
37
|
"ink": "^5.2.1",
|
|
38
|
+
"ink-text-input": "^6.0.0",
|
|
38
39
|
"react": "^18.3.1",
|
|
39
40
|
"react-devtools-core": "^4.19.1",
|
|
40
41
|
"semver": "^7.7.2",
|
|
41
42
|
"svelte": "^5.56.4",
|
|
42
43
|
"ts-morph": "^27.0.2",
|
|
43
44
|
"typescript": "^5.9.3",
|
|
44
|
-
"@contentful/experience-design-system-types": "2.35.1-dev-build-
|
|
45
|
+
"@contentful/experience-design-system-types": "2.35.1-dev-build-215f38d1.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@tsconfig/node24": "^24.0.4",
|