@contentful/experience-design-system-cli 2.37.1-dev-build-e9daa6a1.0 → 2.37.1-dev-build-6d56b670.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 +1831 -2651
- package/dist/index.js +1993 -2918
- package/dist/package.json +1 -1
- package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +3 -1
- package/dist/src/tui/import/shared/running-step/logic.d.ts +0 -1
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +3 -4
- package/dist/src/tui/import/steps/00-preflight/logic.d.ts +1 -2
- package/dist/src/tui/import/steps/02-token-input/screen.d.ts +1 -4
- package/dist/src/tui/import/steps/04-credentials/logic.d.ts +1 -9
- package/dist/src/tui/import/steps/06-extraction/logic.d.ts +0 -13
- package/dist/src/tui/import/steps/06-extraction/screen.d.ts +1 -3
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +4 -0
- package/dist/src/tui/import/steps/08-generation/screen.d.ts +1 -3
- package/dist/src/tui/import/steps/10-flow/screens/PushingStep.d.ts +1 -3
- package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +1 -3
- package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +1 -1
- package/dist/src/tui/shared/components/ControlHints.d.ts +9 -0
- package/dist/src/tui/{settings/shared → shared/components}/FieldForm.d.ts +7 -1
- package/dist/src/tui/shared/components/StepHeader.d.ts +26 -0
- package/dist/src/tui/theme.d.ts +2 -0
- package/package.json +3 -3
- package/dist/src/tui/control-hints.d.ts +0 -7
- package/dist/src/tui/import/steps/04-credentials/controls.d.ts +0 -21
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +0 -8
- package/dist/src/tui/import/steps/10-flow/components/StepHeader.d.ts +0 -8
- /package/dist/src/tui/{ClearableTextInput.d.ts → shared/components/ClearableTextInput.d.ts} +0 -0
package/dist/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type StepHeaderProps } from '@tui/shared/components/StepHeader.js';
|
|
2
3
|
interface GateStepProps {
|
|
3
4
|
message: string;
|
|
4
5
|
onContinue: () => void;
|
|
@@ -9,6 +10,7 @@ interface GateStepProps {
|
|
|
9
10
|
skipLabel?: string;
|
|
10
11
|
onSkip?: () => void;
|
|
11
12
|
intent?: 'success' | 'error';
|
|
13
|
+
step?: StepHeaderProps['step'];
|
|
12
14
|
}
|
|
13
|
-
export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, }: GateStepProps): React.ReactElement;
|
|
15
|
+
export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, step, }: GateStepProps): React.ReactElement;
|
|
14
16
|
export {};
|
|
@@ -9,4 +9,3 @@ export interface RunningLine {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function progressPercent(progress: Progress): number;
|
|
11
11
|
export declare function formatElapsed(totalSeconds: number): string;
|
|
12
|
-
export declare function stepLabel(stepNumber: number, totalSteps: number, title: string): string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type RunningLine } from './logic.js';
|
|
3
|
+
import type { ImportStepId } from '@tui/shared/components/StepHeader.js';
|
|
3
4
|
interface RunningStepProps {
|
|
4
|
-
|
|
5
|
-
totalSteps: number;
|
|
6
|
-
title: string;
|
|
5
|
+
step: ImportStepId;
|
|
7
6
|
description: string;
|
|
8
7
|
lines?: readonly RunningLine[];
|
|
9
8
|
}
|
|
10
|
-
export declare function RunningStep({
|
|
9
|
+
export declare function RunningStep({ step, description, lines, }: RunningStepProps): React.ReactElement;
|
|
11
10
|
export {};
|
|
@@ -4,8 +4,7 @@ export declare const IMPORT_TARGET_OPTIONS: ReadonlyArray<{
|
|
|
4
4
|
target: ImportTarget;
|
|
5
5
|
label: string;
|
|
6
6
|
}>;
|
|
7
|
-
export declare
|
|
8
|
-
export declare const TOKENS_ONLY_STEP_COUNT: number;
|
|
7
|
+
export declare function overviewFor(target: ImportTarget): readonly OverviewStep[];
|
|
9
8
|
export type ImportStepId = 'project' | 'token-file' | 'path-validation' | 'credentials' | 'component-extraction' | 'token-generation' | 'scope-gate' | 'generation' | 'review' | 'save-push';
|
|
10
9
|
export declare function stepsFor(target: ImportTarget): readonly ImportStepId[];
|
|
11
10
|
export interface InputAnswers {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type OverviewStep } from '../../shared/index.js';
|
|
3
2
|
interface TokenInputScreenProps {
|
|
4
3
|
onConfirm: (tokensPath: string) => void;
|
|
5
4
|
onBack: () => void;
|
|
6
5
|
initialPath?: string;
|
|
7
|
-
/** The steps of the import, shown above the prompt when this is the first screen the user sees (tokens only). */
|
|
8
|
-
overview?: readonly OverviewStep[];
|
|
9
6
|
}
|
|
10
|
-
export declare function TokenInputScreen({ onConfirm, onBack, initialPath
|
|
7
|
+
export declare function TokenInputScreen({ onConfirm, onBack, initialPath }: TokenInputScreenProps): React.ReactElement;
|
|
11
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const FIELDS: readonly ["spaceId", "environmentId", "cmaToken", "host"];
|
|
2
2
|
export type CredentialField = (typeof FIELDS)[number];
|
|
3
3
|
export type CredentialValues = Record<CredentialField, string>;
|
|
4
4
|
/**
|
|
@@ -6,14 +6,6 @@ export type CredentialValues = Record<CredentialField, string>;
|
|
|
6
6
|
* unless the import only generates tokens, which has nothing to look up.
|
|
7
7
|
*/
|
|
8
8
|
export declare function credentialsPurpose(tokensOnly: boolean): string;
|
|
9
|
-
interface Key {
|
|
10
|
-
escape: boolean;
|
|
11
|
-
tab: boolean;
|
|
12
|
-
ctrl: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type KeyAction = 'back' | 'next-field' | 'skip' | null;
|
|
15
|
-
export declare function keyAction(input: string, key: Key): KeyAction;
|
|
16
|
-
export declare function nextField(field: CredentialField): CredentialField;
|
|
17
9
|
export declare function normalize(values: CredentialValues): CredentialValues;
|
|
18
10
|
export declare function missingField(values: CredentialValues): boolean;
|
|
19
11
|
export declare function isUnchanged(current: CredentialValues, initial: CredentialValues): boolean;
|
|
@@ -18,19 +18,6 @@ export declare function progressRows(progress: ExtractionProgress, agent: string
|
|
|
18
18
|
}>;
|
|
19
19
|
/** True when every job is already done, so the screen would only flash. The wizard shows nothing in this case. */
|
|
20
20
|
export declare function isFullCacheHit(progress: ExtractionProgress): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The wizard's step counts: three fixed steps, one more when there is a token stage, two more when components are
|
|
23
|
-
* imported, and one more when the tokens can be mapped (not known yet at this stage, so it adds nothing here).
|
|
24
|
-
* Extraction is step 2 when there is a token stage, otherwise step 1.
|
|
25
|
-
*/
|
|
26
|
-
export declare function stepNumbers(input: {
|
|
27
|
-
hasRawTokens: boolean;
|
|
28
|
-
skipComponents?: boolean;
|
|
29
|
-
mapTokensEligible?: boolean | null;
|
|
30
|
-
}): {
|
|
31
|
-
stepNumber: number;
|
|
32
|
-
totalSteps: number;
|
|
33
|
-
};
|
|
34
21
|
export declare function noComponentsMessage(projectPath: string): string;
|
|
35
22
|
export declare function agentAuthMessage(agent: string, status: 'not-found' | 'unauthenticated'): string;
|
|
36
23
|
/**
|
|
@@ -3,8 +3,6 @@ import type { ExtractionProgress } from './types.js';
|
|
|
3
3
|
interface ExtractionScreenProps {
|
|
4
4
|
progress: ExtractionProgress;
|
|
5
5
|
agent: string;
|
|
6
|
-
stepNumber: number;
|
|
7
|
-
totalSteps: number;
|
|
8
6
|
}
|
|
9
|
-
export declare function ExtractionScreen({ progress, agent
|
|
7
|
+
export declare function ExtractionScreen({ progress, agent }: ExtractionScreenProps): React.ReactElement;
|
|
10
8
|
export {};
|
|
@@ -25,6 +25,10 @@ export interface FixedPanelProps {
|
|
|
25
25
|
export declare function FixedPanel({ width, height, minHeight, focused, borderStyle, borderColor, paddingLeft, clipOverflow, children, }: FixedPanelProps): ReactElement;
|
|
26
26
|
/** Shared frame for panels whose viewport must not change with their contents. */
|
|
27
27
|
export declare function WindowedPanel({ width, height, title, focused, children }: WindowedPanelProps): ReactElement;
|
|
28
|
+
export declare function WindowFooter({ above, below }: {
|
|
29
|
+
above: number;
|
|
30
|
+
below: number;
|
|
31
|
+
}): ReactElement;
|
|
28
32
|
export declare function WindowIndicator({ direction, count }: {
|
|
29
33
|
direction: WindowDirection;
|
|
30
34
|
count: number;
|
|
@@ -5,8 +5,6 @@ interface GenerationScreenProps {
|
|
|
5
5
|
agent: string;
|
|
6
6
|
acceptedCount: number;
|
|
7
7
|
hasTokens: boolean;
|
|
8
|
-
stepNumber: number;
|
|
9
|
-
totalSteps: number;
|
|
10
8
|
}
|
|
11
|
-
export declare function GenerationScreen({ progress, agent, acceptedCount, hasTokens,
|
|
9
|
+
export declare function GenerationScreen({ progress, agent, acceptedCount, hasTokens, }: GenerationScreenProps): React.ReactElement;
|
|
12
10
|
export {};
|
|
@@ -2,10 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { PushProgress } from '../support/push-progress.js';
|
|
3
3
|
import { type Produced } from '../support/produced.js';
|
|
4
4
|
type PushingStepProps = {
|
|
5
|
-
stepNumber: number;
|
|
6
|
-
totalSteps: number;
|
|
7
5
|
progress: PushProgress;
|
|
8
6
|
produced: Produced;
|
|
9
7
|
};
|
|
10
|
-
export declare function PushingStep({
|
|
8
|
+
export declare function PushingStep({ progress, produced }: PushingStepProps): React.ReactElement;
|
|
11
9
|
export {};
|
|
@@ -4,11 +4,9 @@ type WizardPreviewStepProps = {
|
|
|
4
4
|
preview: ServerPreviewResponse;
|
|
5
5
|
spaceId: string;
|
|
6
6
|
environmentId: string;
|
|
7
|
-
stepNumber: number;
|
|
8
|
-
totalSteps: number;
|
|
9
7
|
onConfirm: (acknowledge: boolean) => void;
|
|
10
8
|
onEdit?: () => void;
|
|
11
9
|
onQuit: () => void;
|
|
12
10
|
};
|
|
13
|
-
export declare function WizardPreviewStep({ preview, spaceId, environmentId,
|
|
11
|
+
export declare function WizardPreviewStep({ preview, spaceId, environmentId, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
|
|
14
12
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChangeClassification, ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
2
2
|
export interface PropertyDiffLine {
|
|
3
3
|
key: string;
|
|
4
|
-
color:
|
|
4
|
+
color: string;
|
|
5
5
|
text: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function computeComponentDiffLines(current: ComponentTypeSummary, proposed: Record<string, unknown>, changeClassification?: ChangeClassification): PropertyDiffLine[];
|
|
@@ -24,6 +24,8 @@ export type FormNotice = {
|
|
|
24
24
|
text: string;
|
|
25
25
|
};
|
|
26
26
|
interface FieldFormProps<K extends string> {
|
|
27
|
+
/** Shown above the form, outside its padding, such as the import's step header. */
|
|
28
|
+
header?: React.ReactNode;
|
|
27
29
|
title: string;
|
|
28
30
|
/** What this form is for, shown dimmed under the title. */
|
|
29
31
|
subtitle?: string;
|
|
@@ -31,8 +33,12 @@ interface FieldFormProps<K extends string> {
|
|
|
31
33
|
values: Record<K, string>;
|
|
32
34
|
onChange: (key: K, value: string) => void;
|
|
33
35
|
onSave: () => void;
|
|
36
|
+
/** What `s` does, in the control hints. */
|
|
37
|
+
saveLabel?: string;
|
|
34
38
|
/** Leaves without saving. */
|
|
35
39
|
onQuit: () => void;
|
|
40
|
+
/** What Esc does, in the control hints. */
|
|
41
|
+
quitLabel?: string;
|
|
36
42
|
/** Rows after the fields that are run, not edited. They share the cursor with the fields. */
|
|
37
43
|
actions?: readonly FormAction[];
|
|
38
44
|
notice?: FormNotice | null;
|
|
@@ -59,5 +65,5 @@ export declare function FormReadOnlyRow({ label, labelWidth, children, }: {
|
|
|
59
65
|
* While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
|
|
60
66
|
* Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
|
|
61
67
|
*/
|
|
62
|
-
export declare function FieldForm<K extends string>({ title, subtitle, fields, values, onChange, onSave, onQuit, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
|
|
68
|
+
export declare function FieldForm<K extends string>({ header, title, subtitle, fields, values, onChange, onSave, saveLabel, onQuit, quitLabel, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
|
|
63
69
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const IMPORT_STEPS: readonly [{
|
|
3
|
+
readonly id: "setup";
|
|
4
|
+
readonly label: "Setup";
|
|
5
|
+
}, {
|
|
6
|
+
readonly id: "extraction";
|
|
7
|
+
readonly label: "Extract";
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: "scope-gate";
|
|
10
|
+
readonly label: "Select";
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "generation";
|
|
13
|
+
readonly label: "Generate";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "review";
|
|
16
|
+
readonly label: "Review";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "push";
|
|
19
|
+
readonly label: "Push";
|
|
20
|
+
}];
|
|
21
|
+
export type ImportStepId = (typeof IMPORT_STEPS)[number]['id'];
|
|
22
|
+
export interface StepHeaderProps {
|
|
23
|
+
step: ImportStepId | 'done';
|
|
24
|
+
}
|
|
25
|
+
export declare function StepHeader({ step }: StepHeaderProps): React.ReactElement;
|
|
26
|
+
export {};
|
package/dist/src/tui/theme.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const PALETTE: {
|
|
|
5
5
|
readonly muted: "#aec1cc";
|
|
6
6
|
readonly border: "#aec1cc";
|
|
7
7
|
readonly accent: "#40a0ff";
|
|
8
|
+
readonly onAccent: "#111B2B";
|
|
8
9
|
readonly error: "#ff707d";
|
|
9
10
|
readonly success: "#5DB057";
|
|
10
11
|
readonly warning: "#FFC835";
|
|
@@ -13,6 +14,7 @@ export declare const PALETTE: {
|
|
|
13
14
|
readonly muted: "#5A657C";
|
|
14
15
|
readonly border: "#5A657C";
|
|
15
16
|
readonly accent: "#0059c8";
|
|
17
|
+
readonly onAccent: "#FFFFFF";
|
|
16
18
|
readonly error: "#bd002a";
|
|
17
19
|
readonly success: "#006D23";
|
|
18
20
|
readonly warning: "#CC4500";
|
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-6d56b670.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-6d56b670.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-6d56b670.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const CREDENTIALS_CONTROLS: readonly [{
|
|
2
|
-
readonly keys: "Enter";
|
|
3
|
-
readonly label: "Next field / Continue";
|
|
4
|
-
}, {
|
|
5
|
-
readonly keys: "Tab";
|
|
6
|
-
readonly label: "Switch field";
|
|
7
|
-
}, {
|
|
8
|
-
readonly keys: "Ctrl+S";
|
|
9
|
-
readonly label: "Skip (no push)";
|
|
10
|
-
}, {
|
|
11
|
-
readonly keys: "Esc";
|
|
12
|
-
readonly label: "Back";
|
|
13
|
-
}];
|
|
14
|
-
interface CredentialsHandlers {
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
onBack: () => void;
|
|
17
|
-
onNextField: () => void;
|
|
18
|
-
onSkip: () => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function useCredentialsControls(handlers: CredentialsHandlers): void;
|
|
21
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const PALETTE: {
|
|
2
|
-
readonly info: "#40a0ff" | "#0059c8";
|
|
3
|
-
readonly success: "#5DB057" | "#006D23";
|
|
4
|
-
readonly error: "#ff707d" | "#bd002a";
|
|
5
|
-
readonly warning: "#FFC835" | "#CC4500";
|
|
6
|
-
readonly muted: "#aec1cc" | "#5A657C";
|
|
7
|
-
readonly border: "#aec1cc" | "#5A657C";
|
|
8
|
-
};
|
|
File without changes
|