@contentful/experience-design-system-cli 2.36.2-dev-build-d983d04c.0 → 2.36.2-dev-build-7b317500.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.36.2-dev-build-d983d04c.0",
3
+ "version": "2.36.2-dev-build-7b317500.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 @@
1
+ export declare function migrateOldConfig(): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  type Status = 'success' | 'error';
2
2
  type ExitMethod = 'saved' | 'discarded' | 'crashed';
3
+ export declare function currentDebugSessionDir(): string;
3
4
  export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
4
5
  flow: string;
5
6
  step: string;
@@ -0,0 +1,9 @@
1
+ export interface HelpRow {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export interface HelpInfo {
6
+ storage: HelpRow[];
7
+ troubleshooting: HelpRow[];
8
+ }
9
+ export declare function readHelpInfo(): Promise<HelpInfo>;
@@ -16,6 +16,7 @@ interface PipelineResult {
16
16
  }
17
17
  export interface SpawnV1ImportOptions {
18
18
  project?: string;
19
+ tokens?: string;
19
20
  onProgress?: (line: string) => void;
20
21
  }
21
22
  export interface SpawnV1ImportResult {
@@ -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,8 @@
1
+ interface QuitKey {
2
+ escape: boolean;
3
+ ctrl: boolean;
4
+ meta: boolean;
5
+ }
6
+ export declare function shouldQuit(value: string, input: string, key: QuitKey): boolean;
7
+ export declare function toProjectPath(value: string): string | null;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface WelcomeScreenProps {
3
+ onContinue: (projectPath: string) => void;
4
+ onQuit: () => void;
5
+ initialPath?: string;
6
+ }
7
+ export declare function WelcomeScreen({ onContinue, onQuit, initialPath }: WelcomeScreenProps): React.ReactElement;
8
+ export {};
@@ -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,9 @@
1
+ import React from 'react';
2
+ interface TokenInputScreenProps {
3
+ onConfirm: (tokensPath: string) => void;
4
+ onSkip: () => void;
5
+ onBack: () => void;
6
+ initialPath?: string;
7
+ }
8
+ export declare function TokenInputScreen({ onConfirm, onSkip, onBack, initialPath, }: TokenInputScreenProps): React.ReactElement;
9
+ 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 {};
@@ -0,0 +1,2 @@
1
+ export { WelcomeScreen } from './01-welcome/screen.js';
2
+ export { TokenInputScreen } from './02-token-input/screen.js';
@@ -3,6 +3,8 @@ export type V1Credentials = {
3
3
  environmentId?: string;
4
4
  cmaToken?: string;
5
5
  host?: string;
6
+ defaultComponentDir?: string;
7
+ defaultTokenFile?: string;
6
8
  [key: string]: string | undefined;
7
9
  };
8
10
  export declare function readCredentials(): Promise<V1Credentials>;
@@ -1,2 +1,3 @@
1
- export declare function readV1Store(): Promise<Record<string, unknown>>;
2
- export declare function writeV1Store(data: Record<string, unknown>): Promise<void>;
1
+ import { readSettings, writeSettings } from '@contentful/experience-design-system-types/config';
2
+ export declare const readV1Store: typeof readSettings;
3
+ export declare const writeV1Store: typeof writeSettings;
@@ -11,4 +11,7 @@ export declare const PALETTE: {
11
11
  readonly subtle: "#DDE5EC";
12
12
  readonly bg: "#EFF2F6";
13
13
  };
14
+ export declare const INK_UI_THEME: {
15
+ components: Record<string, import("@inkjs/ui").ComponentTheme>;
16
+ };
14
17
  export declare function statusPaletteColor(status: ReviewComponentStatus, validationErrorCount: number, validationWarningCount: number): string;
@@ -24,5 +24,5 @@ type DoneStepProps = {
24
24
  }>;
25
25
  onExit: () => void;
26
26
  };
27
- export declare function DoneStep({ componentTypes, designTokens, summary, spaceId, environmentId, host, runTeaser, failures, onExit, }: DoneStepProps): React.ReactElement;
27
+ export declare function DoneStep({ componentTypes, designTokens, summary, spaceId, environmentId, host, failures, onExit, }: DoneStepProps): React.ReactElement;
28
28
  export {};
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
+ type Progress = {
3
+ done: number;
4
+ total: number;
5
+ };
2
6
  type RunningStepProps = {
3
7
  stepNumber: number;
4
8
  totalSteps: number;
@@ -6,10 +10,14 @@ type RunningStepProps = {
6
10
  description: string;
7
11
  detail?: string;
8
12
  detailComplete?: boolean;
13
+ /** Progress for the detail row (displays as progress bar + ratio). */
14
+ detailProgress?: Progress;
9
15
  /** Optional second progress line (own spinner) — e.g. composition resolution
10
16
  * running after the file scan on the extracting screen. */
11
17
  secondaryDetail?: string;
12
18
  secondaryComplete?: boolean;
19
+ /** Progress for the secondary detail row (displays as progress bar + ratio). */
20
+ secondaryProgress?: Progress;
13
21
  /** Optional third progress line for another concurrent stage. */
14
22
  tertiaryDetail?: string;
15
23
  tertiaryComplete?: boolean;
@@ -20,5 +28,5 @@ type RunningStepProps = {
20
28
  quinaryDetail?: string;
21
29
  quinaryComplete?: boolean;
22
30
  };
23
- export declare function RunningStep({ stepNumber, totalSteps, title, description, detail, detailComplete, secondaryDetail, secondaryComplete, tertiaryDetail, tertiaryComplete, quaternaryDetail, quaternaryComplete, quinaryDetail, quinaryComplete, }: RunningStepProps): React.ReactElement;
31
+ export declare function RunningStep({ stepNumber, totalSteps, title, description, detail, detailComplete, detailProgress, secondaryDetail, secondaryComplete, secondaryProgress, tertiaryDetail, tertiaryComplete, quaternaryDetail, quaternaryComplete, quinaryDetail, quinaryComplete, }: RunningStepProps): React.ReactElement;
24
32
  export {};