@contentful/experience-design-system-cli 2.33.1-dev-build-1b6f259.0 → 2.33.1-dev-build-a73f696.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.
Files changed (89) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/src/analytics/env.d.ts +2 -0
  3. package/dist/src/analytics/exit.d.ts +1 -0
  4. package/dist/src/analytics/index.d.ts +9 -5
  5. package/dist/src/analytics/tracker.d.ts +1 -0
  6. package/dist/src/analyze/build-analyze-view-rows.d.ts +11 -0
  7. package/dist/src/analyze/composite-closure.d.ts +1 -2
  8. package/dist/src/analyze/issue-inheritance.d.ts +4 -0
  9. package/dist/src/analyze/select/index.d.ts +6 -0
  10. package/dist/src/analyze/select/stdout.d.ts +7 -0
  11. package/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +16 -0
  12. package/dist/src/analyze/select/tui/components/FieldEditor.d.ts +2 -2
  13. package/dist/src/analyze/select/tui/components/RationalePanel.d.ts +12 -0
  14. package/dist/src/analyze/select/tui/components/Sidebar.d.ts +2 -6
  15. package/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +4 -3
  16. package/dist/src/analyze/select/tui/theme.d.ts +1 -0
  17. package/dist/src/analyze/select-agent/context-builder.d.ts +3 -3
  18. package/dist/src/analyze/select-agent/show-rationale.d.ts +26 -0
  19. package/dist/src/apply/api-client.d.ts +3 -1
  20. package/dist/src/host-utils.d.ts +1 -0
  21. package/dist/src/import/orchestrator.d.ts +1 -0
  22. package/dist/src/import/picker-dispatch.d.ts +0 -2
  23. package/dist/src/import/print-prompt.d.ts +1 -0
  24. package/dist/src/import/tui/auto-filter-error.d.ts +1 -0
  25. package/dist/src/import/tui/final-review-host.d.ts +12 -2
  26. package/dist/src/import/tui/history.d.ts +1 -2
  27. package/dist/src/import/tui/scope-gate-columns.d.ts +1 -0
  28. package/dist/src/import/tui/scope-gate-host.d.ts +1 -1
  29. package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +15 -0
  30. package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +14 -2
  31. package/dist/src/import/tui/steps/PreviewStep.d.ts +21 -0
  32. package/dist/src/import/tui/useFinalizePreview.d.ts +1 -9
  33. package/dist/src/import/tui/useLivePreview.d.ts +1 -2
  34. package/dist/src/index.js +5859 -5711
  35. package/dist/src/lib/agent-model-options.d.ts +1 -0
  36. package/dist/src/lib/contentful-urls.d.ts +7 -2
  37. package/dist/src/lib/error-parser.d.ts +1 -2
  38. package/dist/src/lib/terminal-capabilities.d.ts +2 -3
  39. package/dist/src/map-tokens/resolve-defaults.d.ts +2 -3
  40. package/dist/src/runs/export-helpers.d.ts +14 -0
  41. package/dist/src/runs/fingerprint.d.ts +1 -2
  42. package/dist/src/runs/push-helpers.d.ts +5 -0
  43. package/dist/src/runs/run-picker.d.ts +1 -2
  44. package/dist/src/runs/store.d.ts +5 -3
  45. package/dist/src/session/db.d.ts +19 -0
  46. package/dist/src/session/migration.d.ts +2 -0
  47. package/dist/src/session/stats.d.ts +1 -0
  48. package/dist/src/setup/command.d.ts +5 -0
  49. package/dist/src/types.d.ts +13 -1
  50. package/package.json +7 -6
  51. package/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
  52. package/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
  53. package/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
  54. package/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
  55. package/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
  56. package/dist/src/import/composition-options.d.ts +0 -17
  57. package/dist/src/import/tui/components/LivePreviewSummary.d.ts +0 -14
  58. package/dist/src/import/tui/components/ReviewComponentPanel.d.ts +0 -33
  59. package/dist/src/import/tui/components/ReviewDetailsEditor.d.ts +0 -13
  60. package/dist/src/import/tui/components/ReviewDialogs.d.ts +0 -28
  61. package/dist/src/import/tui/components/ReviewStatus.d.ts +0 -20
  62. package/dist/src/import/tui/components/SearchMatchSummary.d.ts +0 -11
  63. package/dist/src/import/tui/components/SpaceEnvironment.d.ts +0 -7
  64. package/dist/src/import/tui/components/StepHeader.d.ts +0 -8
  65. package/dist/src/import/tui/hooks/review-input.d.ts +0 -39
  66. package/dist/src/import/tui/hooks/sidebar-search-state.d.ts +0 -17
  67. package/dist/src/import/tui/hooks/useReviewEditor.d.ts +0 -49
  68. package/dist/src/import/tui/hooks/useReviewPreview.d.ts +0 -26
  69. package/dist/src/import/tui/hooks/useReviewSession.d.ts +0 -74
  70. package/dist/src/import/tui/hooks/useReviewSurfaceState.d.ts +0 -12
  71. package/dist/src/import/tui/lineage-input.d.ts +0 -18
  72. package/dist/src/import/tui/preview-confirmation-input.d.ts +0 -6
  73. package/dist/src/import/tui/review-step-props.d.ts +0 -14
  74. package/dist/src/import/tui/sidebar-help.d.ts +0 -2
  75. package/dist/src/import/tui/sidebar-input.d.ts +0 -13
  76. package/dist/src/import/tui/sidebar-navigation.d.ts +0 -18
  77. package/dist/src/import/tui/steps/review-details-panel.d.ts +0 -26
  78. package/dist/src/import/tui/steps/useTerminalColumns.d.ts +0 -1
  79. package/dist/src/lib/agent-output.d.ts +0 -5
  80. package/dist/src/lib/component-patch.d.ts +0 -12
  81. package/dist/src/lib/path-exists.d.ts +0 -1
  82. package/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
  83. package/dist/src/runs/wizard-launcher.d.ts +0 -2
  84. package/dist/src/runs/wizard-seed.d.ts +0 -20
  85. package/dist/src/session/resolve-session-id.d.ts +0 -1
  86. package/dist/src/setup/prompt-helpers.d.ts +0 -1
  87. package/dist/src/tui/CommandCompletionView.d.ts +0 -13
  88. package/dist/src/tui/use-blinking-cursor.d.ts +0 -1
  89. package/dist/src/tui/use-timed-spinner.d.ts +0 -5
@@ -1,26 +0,0 @@
1
- import type { ComponentTypeSummary, ServerPreviewResponse } from '@contentful/experience-design-system-types';
2
- import type { PreviewAnnotation } from '../../../analyze/select/types.js';
3
- import { type UseLivePreviewReturn } from '../useLivePreview.js';
4
- export type UseReviewPreviewOptions = {
5
- components: ReadonlyArray<{
6
- key: string;
7
- }>;
8
- loading: boolean;
9
- livePreview: boolean;
10
- sessionId: string;
11
- tokensPath: string;
12
- spaceId: string;
13
- environmentId: string;
14
- cmaToken: string;
15
- host: string;
16
- deleteAllComponents?: boolean;
17
- allowDeletions?: boolean;
18
- onResult?: (response: ServerPreviewResponse) => void;
19
- };
20
- export type UseReviewPreviewResult = {
21
- previewAnnotations: Map<string, PreviewAnnotation>;
22
- removedComponents: ComponentTypeSummary[];
23
- livePreviewHook: UseLivePreviewReturn;
24
- livePreviewSpinner: string;
25
- };
26
- export declare function useReviewPreview({ components, loading, livePreview, sessionId, tokensPath, spaceId, environmentId, cmaToken, host, deleteAllComponents, allowDeletions, onResult, }: UseReviewPreviewOptions): UseReviewPreviewResult;
@@ -1,74 +0,0 @@
1
- import type { DatabaseSync } from 'node:sqlite';
2
- import { type Dispatch, type SetStateAction } from 'react';
3
- import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
4
- import { type ComponentRationale, type ComponentReviewMetadata } from '../../../session/db.js';
5
- import { type TokenReviewToken } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
6
- import type { ReviewComponentStatus } from '../../../analyze/select/types.js';
7
- import { type HistorySnapshot } from '../history.js';
8
- export type CdfReviewEntry = {
9
- key: string;
10
- entry: CDFComponentEntry;
11
- status: ReviewComponentStatus;
12
- };
13
- export type ReviewSessionLoadResult<TExtra = undefined> = {
14
- entries: CdfReviewEntry[];
15
- tokens: TokenReviewToken[];
16
- error: string | null;
17
- extra?: TExtra;
18
- };
19
- export type ReviewSessionLoaderOptions<TExtra = undefined> = {
20
- extractSessionId: string;
21
- tokenSessionId?: string | null;
22
- loadExtra?: (db: DatabaseSync, sessionId: string) => TExtra;
23
- sortEntries: (entries: CdfReviewEntry[], extra: TExtra | undefined) => CdfReviewEntry[];
24
- };
25
- export declare function loadReviewSessionState<TExtra = undefined>({ extractSessionId, tokenSessionId, loadExtra, sortEntries, }: ReviewSessionLoaderOptions<TExtra>): ReviewSessionLoadResult<TExtra>;
26
- type UseReviewSessionOptions<TExtra> = {
27
- loadSession: () => ReviewSessionLoadResult<TExtra>;
28
- tokensPath?: string;
29
- onExtraLoaded?: (extra: TExtra | undefined) => void;
30
- };
31
- type UseReviewSessionResult<TExtra> = {
32
- components: CdfReviewEntry[];
33
- setComponents: Dispatch<SetStateAction<CdfReviewEntry[]>>;
34
- loading: boolean;
35
- loadError: string | null;
36
- availableTokens: TokenReviewToken[];
37
- reloadFromSave: () => ReviewSessionLoadResult<TExtra> | null;
38
- };
39
- export declare function useReviewSession<TExtra = undefined>({ loadSession, tokensPath, onExtraLoaded, }: UseReviewSessionOptions<TExtra>): UseReviewSessionResult<TExtra>;
40
- type UseReviewMetadataOptions = {
41
- components: CdfReviewEntry[];
42
- selectedIdx: number;
43
- extractSessionId: string;
44
- };
45
- export declare function useReviewMetadata({ components, selectedIdx, extractSessionId }: UseReviewMetadataOptions): {
46
- reviewMetadata: ComponentReviewMetadata | null;
47
- componentRationale: ComponentRationale | null;
48
- };
49
- export declare function createReviewHistorySnapshot(components: CdfReviewEntry[], options?: {
50
- autoRejected?: readonly string[];
51
- undoSnapshot?: ReadonlyMap<string, ReviewComponentStatus> | null;
52
- }): HistorySnapshot;
53
- type UseReviewHistoryOptions = {
54
- loading: boolean;
55
- components: CdfReviewEntry[];
56
- createSnapshot: (components: CdfReviewEntry[]) => HistorySnapshot;
57
- applySnapshot: (snapshot: HistorySnapshot) => void;
58
- };
59
- export declare function useReviewHistory({ loading, components, createSnapshot, applySnapshot }: UseReviewHistoryOptions): {
60
- historySeededRef: {
61
- current: boolean;
62
- };
63
- pushHistorySnapshot: (entries: CdfReviewEntry[], label: string) => void;
64
- handleUndo: () => void;
65
- handleRedo: () => void;
66
- resetHistory: (snapshot: HistorySnapshot) => void;
67
- };
68
- export type ReviewFinalizeCounts = {
69
- accepted: number;
70
- rejected: number;
71
- unresolved: number;
72
- };
73
- export declare function finalizeReviewSession(extractSessionId: string, components: CdfReviewEntry[]): ReviewFinalizeCounts;
74
- export {};
@@ -1,12 +0,0 @@
1
- import { type Dispatch, type SetStateAction } from 'react';
2
- export type UseReviewSurfaceStateResult = {
3
- sidebarFocused: boolean;
4
- setSidebarFocused: Dispatch<SetStateAction<boolean>>;
5
- showFinalize: boolean;
6
- setShowFinalize: Dispatch<SetStateAction<boolean>>;
7
- showQuit: boolean;
8
- setShowQuit: Dispatch<SetStateAction<boolean>>;
9
- finalizeError: string | null;
10
- setFinalizeError: Dispatch<SetStateAction<string | null>>;
11
- };
12
- export declare function useReviewSurfaceState(initialFinalizeError?: string | null): UseReviewSurfaceStateResult;
@@ -1,18 +0,0 @@
1
- import type { LineageJumpable } from './hooks/useLineage.js';
2
- type LineageInputKey = {
3
- upArrow: boolean;
4
- downArrow: boolean;
5
- tab: boolean;
6
- return: boolean;
7
- };
8
- export declare function handleLineageNavigation({ input, key, cursor, jumpables, onCursorChange, onJump, onClose, allowTab, }: {
9
- input: string;
10
- key: LineageInputKey;
11
- cursor: number;
12
- jumpables: LineageJumpable[];
13
- onCursorChange: (update: number | ((current: number) => number)) => void;
14
- onJump: (name: string) => void;
15
- onClose: () => void;
16
- allowTab: boolean;
17
- }): boolean;
18
- export {};
@@ -1,6 +0,0 @@
1
- import { type Dispatch, type SetStateAction } from 'react';
2
- type PreviewConfirmationKey = {
3
- return: boolean;
4
- };
5
- export declare function usePreviewConfirmationInput(breakingWithImpact: boolean, allowDeletions: boolean, fetchedAllowDeletions: boolean, removedCount: number, onConfirm: (acknowledge: boolean, allowDeletions: boolean) => void, setAllowDeletions: Dispatch<SetStateAction<boolean>>): (input: string, key: PreviewConfirmationKey) => boolean;
6
- export {};
@@ -1,14 +0,0 @@
1
- export type ReviewStepProps = {
2
- extractSessionId: string;
3
- tokenSessionId?: string | null;
4
- onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
5
- onQuit: () => void;
6
- livePreview?: boolean;
7
- spaceId?: string;
8
- environmentId?: string;
9
- cmaToken?: string;
10
- host?: string;
11
- tokensPath?: string;
12
- initialFinalizeError?: string | null;
13
- allowDeletions?: boolean;
14
- };
@@ -1,2 +0,0 @@
1
- import type { HelpSection } from '../../analyze/select/tui/components/HelpOverlay.js';
2
- export declare function createSidebarViewsHelpSection(includeBreaking: boolean): HelpSection;
@@ -1,13 +0,0 @@
1
- type SearchInputKey = {
2
- tab: boolean;
3
- backspace: boolean;
4
- };
5
- type SearchInputOptions = {
6
- query: string;
7
- names: string[];
8
- setQuery: (value: string | ((current: string) => string)) => void;
9
- setCandidates: (value: string[]) => void;
10
- };
11
- export declare function handleSidebarSearchInput(input: string, key: SearchInputKey, { query, names, setQuery, setCandidates }: SearchInputOptions): boolean;
12
- export declare function formatSearchMatchSummary(matches: number, total: number): string;
13
- export {};
@@ -1,18 +0,0 @@
1
- import type { ComponentGraphNode, Closure } from '../../analyze/composite-closure.js';
2
- import { type GroupedSidebarItem } from '../../analyze/select/tui/components/GroupedSidebar.js';
3
- export declare function collectExpandedGroupRoots(closures: Map<string, Closure>, cycleParticipants: Iterable<string>): Set<string>;
4
- export declare function computeSidebarViewToggle({ currentView, currentKey, currentScroll, visibleCount, items, cycleParticipants, expandedGroups, graph, showFlatTier, }: {
5
- currentView: 'grouped' | 'flat';
6
- currentKey: string | null | undefined;
7
- currentScroll: number;
8
- visibleCount: number;
9
- items: GroupedSidebarItem[];
10
- cycleParticipants: Set<string>;
11
- expandedGroups: Set<string>;
12
- graph: ComponentGraphNode[];
13
- showFlatTier?: boolean;
14
- }): {
15
- view: 'grouped' | 'flat';
16
- cursor: number;
17
- scroll: number;
18
- };
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { type TokenPropSuggestion } from '../../../analyze/select/tui/components/TokenReviewPanel.js';
3
- import type { ComponentRationale, ComponentReviewMetadata } from '../../../session/db.js';
4
- type ReviewPanel = 'none' | 'prop-rationale' | 'component-rationale' | 'source' | 'token-review';
5
- export type ReviewDetailsPanelProps = {
6
- selectedKey: string;
7
- panelOpen: ReviewPanel;
8
- componentRationale: ComponentRationale | null;
9
- reviewMetadata: ComponentReviewMetadata | null;
10
- panelScrollOffset: number;
11
- width: number;
12
- height: number;
13
- sourceBorderColor?: string;
14
- tokenSuggestions: TokenPropSuggestion[];
15
- tokenReviewRow: number;
16
- tokenReviewEditing: boolean;
17
- tokenReviewEditCursor: number;
18
- tokenReviewEditSelection: Set<string>;
19
- showJson: boolean;
20
- jsonValue: string;
21
- jsonScrollOffset: number;
22
- sidebarFocused: boolean;
23
- editor: React.ReactNode;
24
- };
25
- export declare function ReviewDetailsPanel({ selectedKey, panelOpen, componentRationale, reviewMetadata, panelScrollOffset, width, height, sourceBorderColor, tokenSuggestions, tokenReviewRow, tokenReviewEditing, tokenReviewEditCursor, tokenReviewEditSelection, showJson, jsonValue, jsonScrollOffset, sidebarFocused, editor, }: ReviewDetailsPanelProps): React.ReactElement;
26
- export {};
@@ -1 +0,0 @@
1
- export declare function useTerminalColumns(): number;
@@ -1,5 +0,0 @@
1
- import type { AgentInvoker, InvokeAgentOptions } from '@contentful/experience-design-system-generation';
2
- export declare function invokeAgentWithOutput(invoker: AgentInvoker, options: Omit<InvokeAgentOptions, 'onOutput'>, verbose: boolean): Promise<{
3
- result: Awaited<ReturnType<AgentInvoker['invoke']>>;
4
- output: string;
5
- }>;
@@ -1,12 +0,0 @@
1
- export type ComponentPatchOperation = {
2
- component: string;
3
- status?: string;
4
- set?: Record<string, unknown>;
5
- };
6
- export declare function applyDotPath(obj: Record<string, unknown>, path: string, value: unknown): void;
7
- export declare function applyComponentPatch<T extends {
8
- name: string;
9
- }>(components: T[], operations: ComponentPatchOperation[], applySet: (component: T, values: Record<string, unknown>) => T): T[];
10
- export declare function warnOnUnknownPatchComponents<T extends {
11
- name: string;
12
- }>(components: T[], operations: ComponentPatchOperation[]): void;
@@ -1 +0,0 @@
1
- export declare function pathExists(path: string): Promise<boolean>;
@@ -1,10 +0,0 @@
1
- import type { ValidationResult } from './format-errors.js';
2
- type ReadJsonFileResult = {
3
- ok: true;
4
- value: unknown;
5
- } | {
6
- ok: false;
7
- result: ValidationResult;
8
- };
9
- export declare function readJsonFile(filePath: string): Promise<ReadJsonFileResult>;
10
- export {};
@@ -1,2 +0,0 @@
1
- import type { WizardAppProps } from '../import/tui/WizardApp.js';
2
- export declare function launchWizard(props: WizardAppProps): Promise<void>;
@@ -1,20 +0,0 @@
1
- type WizardSeedInput = {
2
- generateSessionId: string | null;
3
- tokenSessionId?: string | null;
4
- tokensPath?: string | null;
5
- initialSpaceId?: string;
6
- initialEnvironmentId?: string;
7
- initialHost?: string;
8
- initialCmaToken?: string;
9
- };
10
- type WizardSeedProps = {
11
- seedGenerateSessionId?: string;
12
- seedTokenSessionId?: string;
13
- seedTokensPath?: string;
14
- initialSpaceId?: string;
15
- initialEnvironmentId?: string;
16
- initialHost?: string;
17
- initialCmaToken?: string;
18
- };
19
- export declare function applyWizardSeedProps<T extends WizardSeedProps>(props: T, input: WizardSeedInput): void;
20
- export {};
@@ -1 +0,0 @@
1
- export declare function resolveExtractSessionId(sessionFlag: string | undefined, onMissing: () => Promise<string> | string): Promise<string>;
@@ -1 +0,0 @@
1
- export declare function promptBooleanPreference(ask: (question: string) => Promise<string>, current: boolean | undefined, defaultValue: boolean, question: string): Promise<boolean>;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- type CompletionRow = {
3
- label: string;
4
- value: React.ReactNode;
5
- };
6
- export type CommandCompletionViewProps = {
7
- title: string;
8
- rows: CompletionRow[];
9
- command: string;
10
- instruction: string;
11
- };
12
- export declare function CommandCompletionView({ title, rows, command, instruction, }: CommandCompletionViewProps): React.ReactElement;
13
- export {};
@@ -1 +0,0 @@
1
- export declare function useBlinkingCursor(): boolean;
@@ -1,5 +0,0 @@
1
- export declare function useTimedSpinner(): {
2
- spinner: string;
3
- secondarySpinner: string;
4
- elapsed: string;
5
- };