@contentful/experience-design-system-cli 2.37.1-dev-build-6bfb243f.0 → 2.37.1-dev-build-e611e80b.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/index.js +0 -1
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +1 -9
- package/dist/src/tui/import/steps/03-path-validation/logic.d.ts +0 -4
- package/dist/src/tui/import/steps/07-scope-gate/columns.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/graph/fuzzy-search.d.ts +0 -2
- package/dist/src/tui/import/steps/07-scope-gate/graph/lineage.d.ts +0 -22
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/ai-flag.d.ts +0 -1
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.d.ts +0 -33
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/lineage-layout.d.ts +0 -36
- package/dist/src/tui/import/steps/09-review/components/FieldEditor.d.ts +1 -18
- package/dist/src/tui/import/steps/09-review/components/ReviewDialogs.d.ts +0 -14
- package/dist/src/tui/import/steps/09-review/components/TokenReviewPanel.d.ts +0 -6
- package/dist/src/tui/import/steps/09-review/generate-review-step.d.ts +1 -22
- package/dist/src/tui/import/steps/09-review/helpers/cycle-panel-scroll.d.ts +0 -4
- package/dist/src/tui/import/steps/09-review/run-live-preview.d.ts +0 -3
- package/dist/src/tui/import/steps/09-review/use-finalize-preview.d.ts +1 -11
- package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +1 -8
- package/dist/src/tui/import/steps/10-flow/flow/preview.d.ts +1 -15
- package/dist/src/tui/import/steps/10-flow/flow/save.d.ts +1 -10
- package/dist/src/tui/import/steps/10-flow/flow/screen.d.ts +0 -4
- package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +0 -6
- package/dist/src/tui/import/steps/10-flow/support/path-utils.d.ts +0 -5
- package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +1 -4
- package/dist/src/tui/import/steps/preview-validation-error/logic.d.ts +0 -3
- package/legacy/package.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -30192,7 +30192,6 @@ var init_generate_review_step = __esm({
|
|
|
30192
30192
|
init_review_input();
|
|
30193
30193
|
init_use_review_preview();
|
|
30194
30194
|
init_LivePreviewSummary();
|
|
30195
|
-
init_cycle_auto_reject();
|
|
30196
30195
|
HELP_SECTIONS2 = [
|
|
30197
30196
|
{
|
|
30198
30197
|
title: "Navigation",
|
package/dist/package.json
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { FileCounts as LocalFileCounts, ScanResult } from '../logic.js';
|
|
3
|
-
type CollectedFilesOutcome = ReturnType<typeof collectFiles>;
|
|
4
|
-
type PipelineFileCounts = Extract<CollectedFilesOutcome, {
|
|
5
|
-
ok: true;
|
|
6
|
-
}>['result']['counts'];
|
|
1
|
+
import type { ScanResult } from '../logic.js';
|
|
7
2
|
export declare function scanFiles(directory: string): ScanResult;
|
|
8
|
-
export declare function toScanResult(outcome: CollectedFilesOutcome): ScanResult;
|
|
9
|
-
export declare function foldSvelteAndMdIntoOther(counts: PipelineFileCounts): LocalFileCounts;
|
|
10
|
-
export {};
|
|
@@ -32,10 +32,6 @@ interface Key {
|
|
|
32
32
|
escape: boolean;
|
|
33
33
|
return: boolean;
|
|
34
34
|
}
|
|
35
|
-
export declare function emptyCounts(): FileCounts;
|
|
36
|
-
export declare function addFile(counts: FileCounts, fileName: string): FileCounts;
|
|
37
|
-
export declare function mergeCounts(a: FileCounts, b: FileCounts): FileCounts;
|
|
38
|
-
export declare function failureFromErrorCode(code: string | undefined): ScanFailureCode;
|
|
39
35
|
export declare function describeFailure(failure: ScanFailureCode, path: string): FailureMessage;
|
|
40
36
|
export declare function summarize(counts: FileCounts): Summary;
|
|
41
37
|
export declare function phaseOf(scan: ScanResult | undefined): PathPhase;
|
|
@@ -4,8 +4,6 @@ export interface ScopeComponentLike {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
import type { Decision } from './types.js';
|
|
7
|
-
export declare const SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
|
|
8
|
-
export declare const ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
|
|
9
7
|
export interface ScopeGatePanelLayout {
|
|
10
8
|
height: number;
|
|
11
9
|
mainVisibleCount: number;
|
|
@@ -3,27 +3,5 @@ export interface LineageParentEdge {
|
|
|
3
3
|
parent: string;
|
|
4
4
|
slotName: string;
|
|
5
5
|
}
|
|
6
|
-
export interface LineageEdge {
|
|
7
|
-
from: string;
|
|
8
|
-
slotName: string;
|
|
9
|
-
to: string;
|
|
10
|
-
}
|
|
11
|
-
export type LineageChain = LineageEdge[];
|
|
12
6
|
export declare function findDirectParents(target: string, components: ComponentGraphNode[]): LineageParentEdge[];
|
|
13
7
|
export declare function findAllAncestors(target: string, components: ComponentGraphNode[]): Set<string>;
|
|
14
|
-
export declare function findAllAncestorChains(target: string, components: ComponentGraphNode[]): LineageChain[];
|
|
15
|
-
export interface AncestorTreeNode {
|
|
16
|
-
name: string;
|
|
17
|
-
incomingSlotName?: string;
|
|
18
|
-
depth: number;
|
|
19
|
-
shared: boolean;
|
|
20
|
-
cycle: boolean;
|
|
21
|
-
parents: AncestorTreeNode[];
|
|
22
|
-
}
|
|
23
|
-
export declare function buildAncestorTree(target: string, components: ComponentGraphNode[]): AncestorTreeNode;
|
|
24
|
-
export interface AncestorTreeLine {
|
|
25
|
-
text: string;
|
|
26
|
-
jumpTarget?: string;
|
|
27
|
-
depth: number;
|
|
28
|
-
}
|
|
29
|
-
export declare function renderAncestorTree(node: AncestorTreeNode): AncestorTreeLine[];
|
|
@@ -56,38 +56,5 @@ export declare function buildVisibleRows(props: {
|
|
|
56
56
|
graph: ComponentGraphNode[];
|
|
57
57
|
filterVisibleKeys?: Set<string>;
|
|
58
58
|
}): VisibleRow[];
|
|
59
|
-
export declare function visibleItemOrder(props: {
|
|
60
|
-
items: GroupedSidebarItem[];
|
|
61
|
-
cycleParticipants: Set<string>;
|
|
62
|
-
expandedGroups: Set<string>;
|
|
63
|
-
alwaysExpanded?: boolean;
|
|
64
|
-
showFlatTier?: boolean;
|
|
65
|
-
graph: ComponentGraphNode[];
|
|
66
|
-
}): number[];
|
|
67
|
-
export declare function labelStyleFor(input: {
|
|
68
|
-
row: VisibleRow;
|
|
69
|
-
isCursor: boolean;
|
|
70
|
-
wouldDim: boolean;
|
|
71
|
-
}): {
|
|
72
|
-
color: string | undefined;
|
|
73
|
-
bold: boolean;
|
|
74
|
-
dim: boolean;
|
|
75
|
-
};
|
|
76
|
-
export declare function selectionGlyphStyleFor(selState: 'accepted' | 'rejected' | 'undecided' | undefined, isCycleRow: boolean): {
|
|
77
|
-
glyph: string | null;
|
|
78
|
-
color: string | undefined;
|
|
79
|
-
dim: boolean;
|
|
80
|
-
bold: boolean;
|
|
81
|
-
};
|
|
82
|
-
export declare function inheritanceGlyphStyleFor(input: {
|
|
83
|
-
status: RenderStatus['status'] | undefined;
|
|
84
|
-
isOwn: boolean;
|
|
85
|
-
isCursor: boolean;
|
|
86
|
-
}): {
|
|
87
|
-
glyph: string | null;
|
|
88
|
-
color: string | undefined;
|
|
89
|
-
dim: boolean;
|
|
90
|
-
bold: boolean;
|
|
91
|
-
};
|
|
92
59
|
export declare function GroupedSidebar(props: GroupedSidebarProps): React.ReactElement;
|
|
93
60
|
export {};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/** Maximum layout rows; the active terminal height determines the actual budget. */
|
|
2
|
-
export declare const VISIBLE_COUNT = 200;
|
|
3
|
-
/** Maximum supported panel window; normal terminals remain terminal-sized. */
|
|
4
|
-
export declare const MAX_PANEL_ROWS = 200;
|
|
5
|
-
/** Floors — both surfaces stay usable even on a small terminal. */
|
|
6
|
-
export declare const SIDEBAR_MIN = 4;
|
|
7
|
-
export declare const MIN_PANEL_ROWS = 4;
|
|
8
1
|
/**
|
|
9
2
|
* Fallback when `stdout.rows` is unavailable (piped output, tests). No TTY
|
|
10
3
|
* means Ink is not interactively repainting, so there is no flicker risk — we
|
|
@@ -12,23 +5,6 @@ export declare const MIN_PANEL_ROWS = 4;
|
|
|
12
5
|
* render is complete and unclipped.
|
|
13
6
|
*/
|
|
14
7
|
export declare const FALLBACK_ROWS = 40;
|
|
15
|
-
/**
|
|
16
|
-
* Vertical space consumed by everything ABOVE/BELOW the columns row. The panel
|
|
17
|
-
* shares the columns row, so the fit constraint while open is simply
|
|
18
|
-
* `FIXED_OVERHEAD + panelBoxHeight <= rows`.
|
|
19
|
-
*/
|
|
20
|
-
export declare const FIXED_OVERHEAD: number;
|
|
21
|
-
export declare const PANEL_BOX_CHROME = 6;
|
|
22
|
-
/**
|
|
23
|
-
* L2e — fixed vertical chrome around the sidebar in the BASE (no-panel) case,
|
|
24
|
-
* counting EVERYTHING that is not a variable sidebar entry row: the wizard
|
|
25
|
-
* header bar, the counter strip (with its blank separator), the cycle banner,
|
|
26
|
-
* the nothing-selected /
|
|
27
|
-
* AI-exclusion hint, the GroupedSidebar box borders + scroll indicator, the
|
|
28
|
-
* focused-detail block, and the wrapping legend region. The value intentionally
|
|
29
|
-
* leaves a small safety margin so resize-induced wrapping does not overflow.
|
|
30
|
-
*/
|
|
31
|
-
export declare const BASE_CHROME_OVERHEAD = 18;
|
|
32
8
|
export interface LineageLayoutInput {
|
|
33
9
|
/** Terminal height in rows (`stdout.rows`, or the fallback). */
|
|
34
10
|
rows: number;
|
|
@@ -37,18 +13,6 @@ export interface LineageLayoutInput {
|
|
|
37
13
|
/** Number of lineage entries — caps the panel window so it never over-allocates. */
|
|
38
14
|
entryCount?: number;
|
|
39
15
|
}
|
|
40
|
-
export interface LineageLayout {
|
|
41
|
-
/** Rows the sidebar should render (`visibleCount`). Constant across open/closed. */
|
|
42
|
-
sidebarVisible: number;
|
|
43
|
-
/** Rows a sidebar replacement panel should window to (`maxRows`). */
|
|
44
|
-
panelMaxRows: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The sidebar height is constant (the panel replaces it in the same slot, so
|
|
48
|
-
* there is nothing to shrink). Both values are derived from the terminal so
|
|
49
|
-
* resizing grows or shrinks the viewport without content-driven layout changes.
|
|
50
|
-
*/
|
|
51
|
-
export declare function computeLineageLayout({ rows, panelOpen, entryCount }: LineageLayoutInput): LineageLayout;
|
|
52
16
|
export interface SidebarBudget {
|
|
53
17
|
/** Rows the GroupedSidebar should render (`visibleCount`). */
|
|
54
18
|
sidebarVisibleCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type ComponentSlotInfo } from '../../07-scope-gate/graph/cycle-detection.js';
|
|
3
3
|
type PropMetadata = {
|
|
4
4
|
rationale?: string | null;
|
|
5
5
|
sourceStartLine?: number | null;
|
|
@@ -46,22 +46,5 @@ export type FieldEditorProps = {
|
|
|
46
46
|
header?: React.ReactNode;
|
|
47
47
|
headerHeight?: number;
|
|
48
48
|
};
|
|
49
|
-
export declare function simulateGraphWithCandidate(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
50
|
-
name: string;
|
|
51
|
-
allowedComponents: string[];
|
|
52
|
-
}[], targetSlotName: string, candidate: string): ComponentSlotInfo[];
|
|
53
|
-
export declare function introducesNewCycle(before: ReturnType<typeof findSlotCycles>, next: ReturnType<typeof findSlotCycles>): boolean;
|
|
54
|
-
export declare function computeAllowedComponentCandidates(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
55
|
-
name: string;
|
|
56
|
-
allowedComponents: string[];
|
|
57
|
-
}[], targetSlotName: string): string[];
|
|
58
|
-
export declare function simulateGraphWithReplacement(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
59
|
-
name: string;
|
|
60
|
-
allowedComponents: string[];
|
|
61
|
-
}[], targetSlotName: string, replaceIndex: number, candidate: string): ComponentSlotInfo[];
|
|
62
|
-
export declare function computeAllowedComponentReplacementCandidates(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
63
|
-
name: string;
|
|
64
|
-
allowedComponents: string[];
|
|
65
|
-
}[], targetSlotName: string, replaceIndex: number): string[];
|
|
66
49
|
export declare function FieldEditor({ value, width, height, fixedHeight, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, showHiddenProps, showInlineRationales, header, headerHeight, }: FieldEditorProps): React.ReactElement;
|
|
67
50
|
export {};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
3
2
|
import type { UseFinalizePreviewReturn } from '../use-finalize-preview.js';
|
|
4
3
|
import type { UseReviewSurfaceStateResult } from '../use-review-surface-state.js';
|
|
5
4
|
import { type ReviewStatusEntry } from './ReviewStatus.js';
|
|
6
|
-
export type ReviewFinalizeDialogsProps = {
|
|
7
|
-
showFinalize: boolean;
|
|
8
|
-
showQuit: boolean;
|
|
9
|
-
components: ReadonlyArray<ReviewStatusEntry>;
|
|
10
|
-
removed?: ComponentTypeSummary[];
|
|
11
|
-
previewStatus?: 'idle' | 'running' | 'done' | 'error';
|
|
12
|
-
removedScrollOffset?: number;
|
|
13
|
-
onFinalizeConfirm: () => void;
|
|
14
|
-
onFinalizeCancel: () => void;
|
|
15
|
-
onQuitConfirm: () => void;
|
|
16
|
-
onQuitCancel: () => void;
|
|
17
|
-
};
|
|
18
|
-
export declare function ReviewFinalizeDialogs({ showFinalize, showQuit, components, removed, previewStatus, removedScrollOffset, onFinalizeConfirm, onFinalizeCancel, onQuitConfirm, onQuitCancel, }: ReviewFinalizeDialogsProps): React.ReactElement;
|
|
19
5
|
export declare function ReviewStepDialogs({ surfaceState, components, finalizePreview, onFinalize, onQuit, }: {
|
|
20
6
|
surfaceState: UseReviewSurfaceStateResult;
|
|
21
7
|
components: ReadonlyArray<ReviewStatusEntry>;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
2
|
export type TokenPropSuggestion = {
|
|
4
3
|
propName: string;
|
|
5
4
|
paths: string[];
|
|
6
5
|
suggested: string[];
|
|
7
6
|
allowed: string[];
|
|
8
7
|
};
|
|
9
|
-
export type TokenReviewToken = {
|
|
10
|
-
path: string;
|
|
11
|
-
kind: string;
|
|
12
|
-
};
|
|
13
8
|
/**
|
|
14
9
|
* Design-token props on `entry` with a declared token kind. `paths` is the
|
|
15
10
|
* full compatible token universe when a token catalog is available; `allowed`
|
|
16
11
|
* remains the current subset.
|
|
17
12
|
*/
|
|
18
|
-
export declare function collectTokenSuggestions(entry: CDFComponentEntry, availableTokens?: TokenReviewToken[]): TokenPropSuggestion[];
|
|
19
13
|
export type TokenReviewPanelProps = {
|
|
20
14
|
componentName: string;
|
|
21
15
|
suggestions: TokenPropSuggestion[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
2
|
type GenerateReviewStepProps = {
|
|
4
3
|
extractSessionId: string | null;
|
|
5
4
|
tokenSessionId?: string | null;
|
|
@@ -13,25 +12,5 @@ type GenerateReviewStepProps = {
|
|
|
13
12
|
tokensPath?: string;
|
|
14
13
|
initialFinalizeError?: string | null;
|
|
15
14
|
};
|
|
16
|
-
export declare function sortComponentsForSidebar<T extends {
|
|
17
|
-
key: string;
|
|
18
|
-
entry: CDFComponentEntry;
|
|
19
|
-
}>(components: T[], cycleParticipants?: Set<string>): T[];
|
|
20
|
-
export { computeCycleAutoRejectTargets } from './graph/cycle-auto-reject.js';
|
|
21
|
-
export interface BreakingComponent {
|
|
22
|
-
componentName: string;
|
|
23
|
-
changes: BreakingChange[];
|
|
24
|
-
impact?: DownstreamImpact;
|
|
25
|
-
current?: ComponentTypeSummary;
|
|
26
|
-
}
|
|
27
|
-
export interface BreakingRow {
|
|
28
|
-
label: string;
|
|
29
|
-
componentName: string;
|
|
30
|
-
focusTarget?: {
|
|
31
|
-
kind: 'prop' | 'slot';
|
|
32
|
-
name: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare function buildBreakingRows(breakingChanges: BreakingComponent[]): BreakingRow[];
|
|
36
|
-
export declare function deriveBreakingChanges(response: ServerPreviewResponse): BreakingComponent[];
|
|
37
15
|
export declare function GenerateReviewStep(props: GenerateReviewStepProps): React.ReactElement;
|
|
16
|
+
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export declare const CYCLE_PANEL_PREAMBLE_LINES = 4;
|
|
2
1
|
export interface CyclePanelLineCountable {
|
|
3
2
|
suggestedBreak?: unknown;
|
|
4
3
|
}
|
|
5
|
-
export declare function cycleLineCount(cycle: CyclePanelLineCountable): number;
|
|
6
|
-
export declare function cycleLineOffsets(cycles: readonly CyclePanelLineCountable[], preamble?: number): number[];
|
|
7
|
-
export declare function totalCyclePanelLines(cycles: readonly CyclePanelLineCountable[], preamble?: number): number;
|
|
8
4
|
export declare function followCycleScroll(currentScroll: number, cursorIdx: number, cycles: readonly CyclePanelLineCountable[], panelHeight: number, preamble?: number): number;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
2
|
-
export declare class TimeoutError extends Error {
|
|
3
|
-
constructor(message?: string);
|
|
4
|
-
}
|
|
5
2
|
export type LivePreviewResult = {
|
|
6
3
|
generation: number;
|
|
7
4
|
response: ServerPreviewResponse | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
2
2
|
type FinalizePreviewStatus = 'idle' | 'running' | 'done' | 'error';
|
|
3
|
-
|
|
3
|
+
type UseFinalizePreviewOptions = {
|
|
4
4
|
/** True while the Finalize dialog is open. Toggling true (re)fires the preview. */
|
|
5
5
|
open: boolean;
|
|
6
6
|
extractSessionId: string | null;
|
|
@@ -26,14 +26,4 @@ export type UseReviewFinalizePreviewOptions = Omit<UseFinalizePreviewOptions, 'a
|
|
|
26
26
|
}>;
|
|
27
27
|
};
|
|
28
28
|
export declare function useReviewFinalizePreview({ components, ...options }: UseReviewFinalizePreviewOptions): UseFinalizePreviewReturn;
|
|
29
|
-
/**
|
|
30
|
-
* Shared Finalize-dialog preview, used by both the composite and atomic
|
|
31
|
-
* generate-review steps.
|
|
32
|
-
*
|
|
33
|
-
* When the dialog opens it fires a preview scoped to the ACCEPTED set (so the
|
|
34
|
-
* result reflects exactly what the push does, independent of the session's
|
|
35
|
-
* not-yet-reclassified generated rows), tracks loading/error, and owns the
|
|
36
|
-
* scroll offset for the preview list.
|
|
37
|
-
*/
|
|
38
|
-
export declare function useFinalizePreview(opts: UseFinalizePreviewOptions): UseFinalizePreviewReturn;
|
|
39
29
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type PreviewValidationError } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
1
|
import type { ImportHandoff } from '@contentful/experience-design-system-types/handoff';
|
|
3
2
|
import { type PreviewDeps } from './preview.js';
|
|
4
3
|
import { type PushDeps } from './push.js';
|
|
5
4
|
import { type SaveDeps } from './save.js';
|
|
6
|
-
import { type
|
|
5
|
+
import { type FlowState } from './types.js';
|
|
7
6
|
/** What the flow starts from: what the earlier stages produced, and the user's saved settings. */
|
|
8
7
|
export interface FlowStart {
|
|
9
8
|
handoff: ImportHandoff;
|
|
@@ -47,12 +46,6 @@ export interface FlowDeps {
|
|
|
47
46
|
}
|
|
48
47
|
export declare function startWizardLog(): void;
|
|
49
48
|
export declare function realFlowDeps(): FlowDeps;
|
|
50
|
-
/** The state the flow begins in, from what the earlier stages handed over. */
|
|
51
|
-
export declare function initialFlowState(start: FlowStart): FlowState;
|
|
52
|
-
/** What the log gets: the state change without the token, the document, or the whole of a large server response. */
|
|
53
|
-
export declare function sanitizeForLog(partial: FlowPatch): Record<string, unknown>;
|
|
54
|
-
/** The names of the components the errors are about, once each. */
|
|
55
|
-
export declare function namesToSkip(errors: readonly PreviewValidationError[]): string[];
|
|
56
49
|
export interface FlowController {
|
|
57
50
|
getState(): FlowState;
|
|
58
51
|
subscribe(listener: () => void): () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
-
import {
|
|
2
|
+
import { patchReviewStateWithValidationErrors } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
3
|
import { type CDFDocument, type DTCGTokenEntry, type ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
4
4
|
import type { FlowPatch, FlowState } from './types.js';
|
|
5
5
|
type PreviewClient = {
|
|
@@ -30,20 +30,6 @@ export interface RunPreviewInput {
|
|
|
30
30
|
/** Set when nothing was accepted, so the document is present but empty and the server shows what would be deleted. */
|
|
31
31
|
deleteAll: boolean;
|
|
32
32
|
}
|
|
33
|
-
/** What to do with a 422 from the preview: show the components that failed, or fall through to the generic error. */
|
|
34
|
-
type Preview422Outcome = {
|
|
35
|
-
kind: 'validation-error';
|
|
36
|
-
errors: PreviewValidationError[];
|
|
37
|
-
missingNames: string[];
|
|
38
|
-
} | {
|
|
39
|
-
kind: 'unparseable';
|
|
40
|
-
message: string;
|
|
41
|
-
} | {
|
|
42
|
-
kind: 'not-422';
|
|
43
|
-
};
|
|
44
|
-
export declare function handlePreview422(err: ApiError, extractSessionId: string | null, patchFn: PreviewDeps['patchReviewState']): Promise<Preview422Outcome>;
|
|
45
|
-
/** The patch to spread into any update that leaves the validation error step, so stale errors do not linger. */
|
|
46
|
-
export declare function clearedValidationErrorState(): Pick<FlowState, 'previewValidationErrors' | 'previewValidationMissingNames'>;
|
|
47
33
|
/**
|
|
48
34
|
* Loads what would be pushed and asks the server what that would change. Returns the patch the wizard applied: the
|
|
49
35
|
* preview gate, a terminal "done" when nothing would change, the validation error step for a 422, or an error.
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import type { DatabaseSync } from 'node:sqlite';
|
|
2
2
|
import { appendRun, buildSourceFingerprint } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
-
import { type
|
|
3
|
+
import { type DTCGTokenEntry } from '@contentful/experience-design-system-types';
|
|
4
4
|
import type { FlowPatch, FlowState } from './types.js';
|
|
5
|
-
/** How long the confirmation of a written file stays up before the flow moves on to the preview. */
|
|
6
|
-
export declare const SAVE_CONFIRMATION_DELAY_MS = 1000;
|
|
7
|
-
/** The document written to `components.json`: the components and tokens as one schema-valid CDF. */
|
|
8
|
-
export declare function buildSavedCDF(components: Array<{
|
|
9
|
-
key: string;
|
|
10
|
-
entry: CDFComponentEntry;
|
|
11
|
-
}>, tokens: DTCGTokenEntry[], opts?: {
|
|
12
|
-
deleteAll?: boolean;
|
|
13
|
-
}): CDFDocument;
|
|
14
5
|
/** The outside world saving talks to, so each branch can be tested without a disk, a database or a clock. */
|
|
15
6
|
export interface SaveDeps {
|
|
16
7
|
openDb: () => DatabaseSync;
|
|
@@ -9,9 +9,5 @@ interface FlowScreenProps {
|
|
|
9
9
|
/** Leaves the import with the exit code the wizard would have exited with. */
|
|
10
10
|
onExit: (exitCode: number) => void;
|
|
11
11
|
}
|
|
12
|
-
/** How many steps the import has, as the wizard counted them. */
|
|
13
|
-
export declare function totalStepsFor(state: Pick<FlowState, 'tokensPath' | 'rawTokensPath' | 'mapTokensEligible'>): number;
|
|
14
|
-
/** Whether the preview gate offers "[e] Edit definitions": only when the document has components to edit. */
|
|
15
|
-
export declare function canEditFromPreview(cdf: FlowState['cdf']): boolean;
|
|
16
12
|
export declare function FlowScreen({ state, controller, livePreview, generatePromptPath, onExit, }: FlowScreenProps): React.ReactElement;
|
|
17
13
|
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
|
-
export interface PreviewDiffLine {
|
|
4
|
-
key: string;
|
|
5
|
-
color: string;
|
|
6
|
-
text: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function buildPreviewSummaryLines(preview: ServerPreviewResponse): PreviewDiffLine[];
|
|
9
3
|
type WizardPreviewStepProps = {
|
|
10
4
|
preview: ServerPreviewResponse;
|
|
11
5
|
spaceId: string;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Expands a leading `~` to the user's home directory.
|
|
3
|
-
* Exported separately so it can be unit-tested and reused.
|
|
4
|
-
*/
|
|
5
|
-
export declare function expandTilde(input: string): string;
|
|
6
1
|
/**
|
|
7
2
|
* Normalizes a user-entered path to an absolute path, handling all common
|
|
8
3
|
* terminal path styles:
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type { ChangeClassification, ComponentTypeSummary
|
|
1
|
+
import type { ChangeClassification, ComponentTypeSummary } from '@contentful/experience-design-system-types';
|
|
2
2
|
export interface PropertyDiffLine {
|
|
3
3
|
key: string;
|
|
4
4
|
color: 'green' | 'red' | 'yellow';
|
|
5
5
|
text: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function computeComponentDiffLines(current: ComponentTypeSummary, proposed: Record<string, unknown>, changeClassification?: ChangeClassification): PropertyDiffLine[];
|
|
8
|
-
export declare function diffProperty(name: string, old: PropertySummary, newDef: Record<string, unknown>): PropertyDiffLine[];
|
|
9
|
-
export declare function formatOldProp(prop: PropertySummary): string;
|
|
10
|
-
export declare function formatPropDef(def: Record<string, unknown>): string;
|
|
@@ -3,10 +3,7 @@ export interface PreviewValidationError {
|
|
|
3
3
|
path: string;
|
|
4
4
|
message: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function failedComponentNames(errors: readonly PreviewValidationError[]): string[];
|
|
7
6
|
export declare function matchedComponentNames(errors: readonly PreviewValidationError[], missingNames: readonly string[]): string[];
|
|
8
|
-
export declare function formatErrorLine(error: PreviewValidationError): string;
|
|
9
7
|
export declare function formatErrorLines(errors: readonly PreviewValidationError[]): string;
|
|
10
|
-
export declare function missingNote(missingNames: readonly string[]): string;
|
|
11
8
|
export declare function contextText(errors: readonly PreviewValidationError[], missingNames: readonly string[]): string;
|
|
12
9
|
export declare function skipLabel(matchedNames: readonly string[]): string;
|
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-e611e80b.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-e611e80b.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-e611e80b.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|