@contentful/experience-design-system-cli 2.37.1-dev-build-ef8b693f.0 → 2.37.1-dev-build-a7704a7f.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 +262 -261
- package/dist/index.js +394 -467
- package/dist/package.json +1 -1
- package/dist/src/tui/home/home.theme.d.ts +8 -0
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +6 -6
- package/dist/src/tui/import/steps/09-review/theme.d.ts +9 -0
- package/{legacy/dist/src/analyze/select/tui → dist/src/tui/import/steps/10-flow}/theme.d.ts +2 -7
- package/package.json +3 -3
- package/dist/src/commands/forwarded.d.ts +0 -2
- package/dist/src/legacy/forwarded-import-args.d.ts +0 -1
- package/dist/src/legacy/legacy-cli-path.d.ts +0 -1
- package/dist/src/legacy/run-legacy.d.ts +0 -1
- package/dist/src/tui/theme.d.ts +0 -19
- package/legacy/bin/cli.js +0 -58
- package/legacy/dist/package.json +0 -76
- package/legacy/dist/src/analytics/exit.d.ts +0 -4
- package/legacy/dist/src/analytics/index.d.ts +0 -3
- package/legacy/dist/src/analyze/composite-closure.d.ts +0 -26
- package/legacy/dist/src/analyze/composition/apply-mapping.d.ts +0 -22
- package/legacy/dist/src/analyze/composition/candidate-files.d.ts +0 -34
- package/legacy/dist/src/analyze/composition/composition-cache-key.d.ts +0 -18
- package/legacy/dist/src/analyze/composition/interchange-schema.d.ts +0 -17
- package/legacy/dist/src/analyze/composition/manifest-doc-evidence.d.ts +0 -49
- package/legacy/dist/src/analyze/composition/merge-edges.d.ts +0 -19
- package/legacy/dist/src/analyze/composition/parse-map-edges.d.ts +0 -16
- package/legacy/dist/src/analyze/composition/prompt-loader.d.ts +0 -3
- package/legacy/dist/src/analyze/composition/resolve-mapping-cli.d.ts +0 -10
- package/legacy/dist/src/analyze/composition/resolve-mapping.d.ts +0 -59
- package/legacy/dist/src/analyze/cycle-detection.d.ts +0 -27
- package/legacy/dist/src/analyze/extract-command.d.ts +0 -7
- package/legacy/dist/src/analyze/fuzzy-search.d.ts +0 -3
- package/legacy/dist/src/analyze/issue-inheritance.d.ts +0 -8
- package/legacy/dist/src/analyze/lineage.d.ts +0 -29
- package/legacy/dist/src/analyze/search-neighborhood.d.ts +0 -3
- package/legacy/dist/src/analyze/select/command.d.ts +0 -27
- package/legacy/dist/src/analyze/select/parser.d.ts +0 -6
- package/legacy/dist/src/analyze/select/persistence.d.ts +0 -22
- package/legacy/dist/src/analyze/select/preview-annotations.d.ts +0 -26
- package/legacy/dist/src/analyze/select/tui/LegacySelectApp.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/ComponentDetail.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/components/ComponentRationalePanel.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/FieldEditor.d.ts +0 -67
- package/legacy/dist/src/analyze/select/tui/components/FinalizeDialog.d.ts +0 -22
- package/legacy/dist/src/analyze/select/tui/components/GotoBanner.d.ts +0 -31
- package/legacy/dist/src/analyze/select/tui/components/GroupedSidebar.d.ts +0 -94
- package/legacy/dist/src/analyze/select/tui/components/HelpOverlay.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/HighlightedLine.d.ts +0 -9
- package/legacy/dist/src/analyze/select/tui/components/JsonEditor.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/JsonPanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/PreviewSummaryBar.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/QuitDialog.d.ts +0 -8
- package/legacy/dist/src/analyze/select/tui/components/RationaleLine.d.ts +0 -21
- package/legacy/dist/src/analyze/select/tui/components/RationalePanel.d.ts +0 -15
- package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +0 -14
- package/legacy/dist/src/analyze/select/tui/components/Sidebar.d.ts +0 -29
- package/legacy/dist/src/analyze/select/tui/components/SourcePanel.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/StatusBar.d.ts +0 -11
- package/legacy/dist/src/analyze/select/tui/components/TokenReviewPanel.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/components/TopBar.d.ts +0 -10
- package/legacy/dist/src/analyze/select/tui/components/removed-components-text.d.ts +0 -7
- package/legacy/dist/src/analyze/select/tui/components/wrap-text.d.ts +0 -1
- package/legacy/dist/src/analyze/select/tui/hooks/list-scroll-input.d.ts +0 -13
- package/legacy/dist/src/analyze/select/tui/hooks/scroll-offset.d.ts +0 -30
- package/legacy/dist/src/analyze/select/tui/hooks/useImmediateInput.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/hooks/useKeymap.d.ts +0 -24
- package/legacy/dist/src/analyze/select/tui/hooks/useSession.d.ts +0 -19
- package/legacy/dist/src/analyze/select/tui/hooks/useUndo.d.ts +0 -8
- package/legacy/dist/src/analyze/select/types.d.ts +0 -54
- package/legacy/dist/src/analyze/selection-cascade.d.ts +0 -3
- package/legacy/dist/src/analyze/slot-graph.d.ts +0 -11
- package/legacy/dist/src/apply/api-client.d.ts +0 -64
- package/legacy/dist/src/apply/command.d.ts +0 -43
- package/legacy/dist/src/apply/preview-utils.d.ts +0 -12
- package/legacy/dist/src/apply/tokens.d.ts +0 -1
- package/legacy/dist/src/apply/tui/ServerApplyView.d.ts +0 -34
- package/legacy/dist/src/apply/tui/ServerPreviewView.d.ts +0 -9
- package/legacy/dist/src/credentials-store.d.ts +0 -18
- package/legacy/dist/src/doctor/checks.d.ts +0 -5
- package/legacy/dist/src/doctor/command.d.ts +0 -2
- package/legacy/dist/src/doctor/report.d.ts +0 -7
- package/legacy/dist/src/generate/command.d.ts +0 -2
- package/legacy/dist/src/generate/tui/GenerateView.d.ts +0 -12
- package/legacy/dist/src/helpers/build-contentful-management-client.d.ts +0 -7
- package/legacy/dist/src/helpers/fetch-and-persist-existing-contentful-entities.d.ts +0 -29
- package/legacy/dist/src/helpers/fetch-existing-contentful-entities.d.ts +0 -11
- package/legacy/dist/src/helpers/find-nearly-matching-component.d.ts +0 -7
- package/legacy/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +0 -7
- package/legacy/dist/src/helpers/summarize-existing-contentful-entities.d.ts +0 -50
- package/legacy/dist/src/host-utils.d.ts +0 -3
- package/legacy/dist/src/index.d.ts +0 -1
- package/legacy/dist/src/index.js +0 -25165
- package/legacy/dist/src/lib/agent-definitions.d.ts +0 -14
- package/legacy/dist/src/lib/agent-model-options.d.ts +0 -15
- package/legacy/dist/src/lib/agent-output.d.ts +0 -5
- package/legacy/dist/src/lib/cli-errors.d.ts +0 -2
- package/legacy/dist/src/lib/cli-path.d.ts +0 -4
- package/legacy/dist/src/lib/command-options.d.ts +0 -3
- package/legacy/dist/src/lib/component-patch.d.ts +0 -12
- package/legacy/dist/src/lib/contentful-urls.d.ts +0 -15
- package/legacy/dist/src/lib/debug-logger.d.ts +0 -39
- package/legacy/dist/src/lib/debug-preamble.d.ts +0 -7
- package/legacy/dist/src/lib/error-parser.d.ts +0 -40
- package/legacy/dist/src/lib/path-exists.d.ts +0 -1
- package/legacy/dist/src/lib/prompt-overrides.d.ts +0 -38
- package/legacy/dist/src/lib/terminal-capabilities.d.ts +0 -29
- package/legacy/dist/src/lib/user-agent.d.ts +0 -7
- package/legacy/dist/src/map-tokens/apply.d.ts +0 -12
- package/legacy/dist/src/map-tokens/command.d.ts +0 -2
- package/legacy/dist/src/map-tokens/resolve-defaults.d.ts +0 -32
- package/legacy/dist/src/map-tokens/tui/MapTokensView.d.ts +0 -13
- package/legacy/dist/src/output/format.d.ts +0 -23
- package/legacy/dist/src/print/command.d.ts +0 -11
- package/legacy/dist/src/print/validate/tui/ValidateView.d.ts +0 -15
- package/legacy/dist/src/print/validate/validators/cdf-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/dtcg-validator.d.ts +0 -2
- package/legacy/dist/src/print/validate/validators/format-errors.d.ts +0 -12
- package/legacy/dist/src/print/validate/validators/read-json-file.d.ts +0 -10
- package/legacy/dist/src/program.d.ts +0 -25
- package/legacy/dist/src/runs/fingerprint.d.ts +0 -36
- package/legacy/dist/src/runs/save-path-resolver.d.ts +0 -11
- package/legacy/dist/src/runs/store.d.ts +0 -65
- package/legacy/dist/src/session/cache-keys.d.ts +0 -22
- package/legacy/dist/src/session/core/cdf/cdf-mappers.d.ts +0 -3
- package/legacy/dist/src/session/core/components/derive-component-id.d.ts +0 -1
- package/legacy/dist/src/session/core/components/hash-component-shape.d.ts +0 -5
- package/legacy/dist/src/session/core/shared/index-rows-by-key.d.ts +0 -1
- package/legacy/dist/src/session/core/tokens/build-dtcg-groups.d.ts +0 -12
- package/legacy/dist/src/session/core/tokens/build-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/core/tokens/hash-token-content.d.ts +0 -1
- package/legacy/dist/src/session/db.d.ts +0 -200
- package/legacy/dist/src/session/migration.d.ts +0 -2
- package/legacy/dist/src/session/repositories/sessions/read.d.ts +0 -11
- package/legacy/dist/src/session/repositories/sessions/write.d.ts +0 -3
- package/legacy/dist/src/session/repositories/shared/with-transaction.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/read.d.ts +0 -2
- package/legacy/dist/src/session/repositories/steps/write.d.ts +0 -5
- package/legacy/dist/src/session/repositories/tokens/read.d.ts +0 -15
- package/legacy/dist/src/session/repositories/tokens/write.d.ts +0 -16
- package/legacy/dist/src/session/resolve-session-id.d.ts +0 -1
- package/legacy/dist/src/session/services/session-resolver.d.ts +0 -9
- package/legacy/dist/src/session/services/tokens/apply-tool-calls.d.ts +0 -8
- package/legacy/dist/src/session/services/tokens/replace-raw-prop-token-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/replace-raw-token-name-paths.d.ts +0 -3
- package/legacy/dist/src/session/services/tokens/store-dtcg-tokens.d.ts +0 -3
- package/legacy/dist/src/session/session-id.d.ts +0 -1
- package/legacy/dist/src/session/source-excerpt.d.ts +0 -26
- package/legacy/dist/src/setup/SetupScreen.d.ts +0 -28
- package/legacy/dist/src/setup/SetupStepper.d.ts +0 -7
- package/legacy/dist/src/setup/command.d.ts +0 -3
- package/legacy/dist/src/setup/lib/checks.d.ts +0 -57
- package/legacy/dist/src/setup/lib/shell.d.ts +0 -12
- package/legacy/dist/src/setup/steps/CodingAgentScreen.d.ts +0 -20
- package/legacy/dist/src/setup/steps/ContentfulCredentialsScreen.d.ts +0 -11
- package/legacy/dist/src/setup/steps/StepLayout.d.ts +0 -20
- package/legacy/dist/src/setup/steps/preferences/AnalyticsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/BooleanInput.d.ts +0 -21
- package/legacy/dist/src/setup/steps/preferences/ColorPreferenceScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/CustomPromptScreen.d.ts +0 -14
- package/legacy/dist/src/setup/steps/preferences/DebugLogsScreen.d.ts +0 -5
- package/legacy/dist/src/setup/steps/preferences/PreferencesMenu.d.ts +0 -26
- package/legacy/dist/src/setup/steps/prerequisites/PrerequisitesScreen.d.ts +0 -16
- package/legacy/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/deps.d.ts +0 -33
- package/legacy/dist/src/setup/steps/prerequisites/index.d.ts +0 -4
- package/legacy/dist/src/setup/steps/prerequisites/node.d.ts +0 -2
- package/legacy/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
- package/legacy/dist/src/tui/CommandCompletionView.d.ts +0 -13
- package/legacy/dist/src/tui/render-with-goodbye.d.ts +0 -7
- package/legacy/dist/src/tui/use-terminal-size.d.ts +0 -6
- package/legacy/dist/src/tui/windowed-panel.d.ts +0 -37
- package/legacy/dist/src/types.d.ts +0 -2
- package/legacy/package.json +0 -85
- package/legacy/prompts/composition-edges.md +0 -11
- package/legacy/skills/generate-components.md +0 -612
- package/legacy/skills/generate-tokens.md +0 -194
- package/legacy/skills/map-tokens.md +0 -102
- package/legacy/skills/select-components.md +0 -235
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
type KeymapContext = {
|
|
2
|
-
sidebarFocused: boolean;
|
|
3
|
-
editMode: boolean;
|
|
4
|
-
dialogOpen: boolean;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
};
|
|
7
|
-
type KeymapHandlers = {
|
|
8
|
-
onSidebarUp: () => void;
|
|
9
|
-
onSidebarDown: () => void;
|
|
10
|
-
onSidebarSelect: () => void;
|
|
11
|
-
onAccept: () => void;
|
|
12
|
-
onReject: () => void;
|
|
13
|
-
onEnterEditMode: () => void;
|
|
14
|
-
onToggleSource: () => void;
|
|
15
|
-
onScrollUp: () => void;
|
|
16
|
-
onScrollDown: () => void;
|
|
17
|
-
onToggleFocus: () => void;
|
|
18
|
-
onApproveAll: () => void;
|
|
19
|
-
onFinalize: () => void;
|
|
20
|
-
onQuit: () => void;
|
|
21
|
-
onToggleHelp: () => void;
|
|
22
|
-
};
|
|
23
|
-
export declare function useKeymap(context: KeymapContext, handlers: KeymapHandlers): void;
|
|
24
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReviewSessionPaths, ReviewSessionSnapshot } from '../../types.js';
|
|
2
|
-
type UseSessionInput = {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
artifactsRoot: string;
|
|
5
|
-
reviewRoot?: string;
|
|
6
|
-
};
|
|
7
|
-
type UseSessionResult = {
|
|
8
|
-
session: ReviewSessionSnapshot | null;
|
|
9
|
-
paths: ReviewSessionPaths | null;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
error: string | null;
|
|
12
|
-
saveState: (updatedSession: ReviewSessionSnapshot) => Promise<void>;
|
|
13
|
-
appendEvent: (event: {
|
|
14
|
-
type: string;
|
|
15
|
-
payload: Record<string, unknown>;
|
|
16
|
-
}) => Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
export declare function useSession({ sessionId, artifactsRoot, reviewRoot }: UseSessionInput): UseSessionResult;
|
|
19
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { RawComponentDefinition } from '../../types.js';
|
|
2
|
-
export type PreviewAnnotation = 'new' | 'changed' | 'removed' | 'breaking';
|
|
3
|
-
export type ReviewComponentStatus = 'needs-review' | 'reviewed' | 'accepted' | 'rejected';
|
|
4
|
-
export type ReviewComponentRecord = {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
resolvedSourcePath: string;
|
|
8
|
-
sourceCode: string | null;
|
|
9
|
-
originalProposal: RawComponentDefinition;
|
|
10
|
-
editedProposal: RawComponentDefinition;
|
|
11
|
-
status: ReviewComponentStatus;
|
|
12
|
-
};
|
|
13
|
-
export type ReviewComponentDetail = {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
originalProposal: RawComponentDefinition;
|
|
17
|
-
editedProposal: RawComponentDefinition;
|
|
18
|
-
status: ReviewComponentStatus;
|
|
19
|
-
};
|
|
20
|
-
export type ReviewComponentSummary = {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
status: ReviewComponentStatus;
|
|
24
|
-
previewAnnotation?: PreviewAnnotation;
|
|
25
|
-
extractionConfidence: number | null;
|
|
26
|
-
needsReview: boolean;
|
|
27
|
-
validationErrorCount: number;
|
|
28
|
-
validationWarningCount: number;
|
|
29
|
-
};
|
|
30
|
-
export type ReviewSessionSnapshot = {
|
|
31
|
-
components: ReviewComponentRecord[];
|
|
32
|
-
};
|
|
33
|
-
export type ReviewSessionDetail = {
|
|
34
|
-
components: ReviewComponentDetail[];
|
|
35
|
-
};
|
|
36
|
-
export type ReviewSessionSummary = {
|
|
37
|
-
components: ReviewComponentSummary[];
|
|
38
|
-
};
|
|
39
|
-
export type ReviewEvent = {
|
|
40
|
-
type: string;
|
|
41
|
-
timestamp: string;
|
|
42
|
-
payload: Record<string, unknown>;
|
|
43
|
-
};
|
|
44
|
-
export type ReviewSessionPaths = {
|
|
45
|
-
sessionDir: string;
|
|
46
|
-
eventsPath: string;
|
|
47
|
-
statePath: string;
|
|
48
|
-
};
|
|
49
|
-
export declare function countValidationIssues(component: RawComponentDefinition): {
|
|
50
|
-
errors: number;
|
|
51
|
-
warnings: number;
|
|
52
|
-
};
|
|
53
|
-
export declare function createReviewSessionSummary(session: ReviewSessionSnapshot): ReviewSessionSummary;
|
|
54
|
-
export declare function createReviewSessionDetail(session: ReviewSessionSnapshot): ReviewSessionDetail;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ComponentGraphNode } from './composite-closure.js';
|
|
2
|
-
export declare function computeRejectCascade(target: string, components: ComponentGraphNode[]): Set<string>;
|
|
3
|
-
export declare function computeAcceptCascade(target: string, components: ComponentGraphNode[]): Set<string>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
2
|
-
import type { ComponentGraphNode } from './composite-closure.js';
|
|
3
|
-
export interface SlotGraphInput {
|
|
4
|
-
key: string;
|
|
5
|
-
entry: CDFComponentEntry;
|
|
6
|
-
status?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface BuildOptions {
|
|
9
|
-
stripRejectedEdges?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function buildComponentGraph(components: SlotGraphInput[], opts?: BuildOptions): ComponentGraphNode[];
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { CDFDocument, ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
|
|
2
|
-
export declare const PREVIEW_ERROR_PREFIX = "preview failed:";
|
|
3
|
-
export declare const APPLY_ERROR_PREFIX = "apply failed:";
|
|
4
|
-
export interface ApiClientOptions {
|
|
5
|
-
host?: string;
|
|
6
|
-
cmaToken: string;
|
|
7
|
-
spaceId: string;
|
|
8
|
-
environmentId: string;
|
|
9
|
-
retry?: {
|
|
10
|
-
maxAttempts?: number;
|
|
11
|
-
initialDelayMs?: number;
|
|
12
|
-
maxDelayMs?: number;
|
|
13
|
-
sleep?: (delayMs: number) => Promise<void>;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare class ApiError extends Error {
|
|
17
|
-
readonly status: number;
|
|
18
|
-
readonly body: string;
|
|
19
|
-
readonly guidance?: string | undefined;
|
|
20
|
-
constructor(message: string, status: number, body: string, guidance?: string | undefined);
|
|
21
|
-
}
|
|
22
|
-
export interface PreviewValidationError {
|
|
23
|
-
componentName: string;
|
|
24
|
-
path: string;
|
|
25
|
-
message: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Parse the JSON body of a 422 from `previewImport()` into structured
|
|
29
|
-
* per-component validation errors. Returns [] for any malformed input
|
|
30
|
-
* so callers can fall back to the generic error path without try/catch.
|
|
31
|
-
*
|
|
32
|
-
* Path shape: `manifest:components/<Name>/$slots/<key>` or
|
|
33
|
-
* `manifest:components/<Name>/$properties/<key>`. Only the component
|
|
34
|
-
* name is extracted today; `path` and `message` are kept verbatim so
|
|
35
|
-
* future diagnostic surfaces can render
|
|
36
|
-
* the field-level detail.
|
|
37
|
-
*/
|
|
38
|
-
export declare function parsePreviewValidationErrors(body: string): PreviewValidationError[];
|
|
39
|
-
export declare class ImportApiClient {
|
|
40
|
-
private host;
|
|
41
|
-
private token;
|
|
42
|
-
private spaceId;
|
|
43
|
-
private environmentId;
|
|
44
|
-
private retry;
|
|
45
|
-
private lastRequestId?;
|
|
46
|
-
getLastRequestId(): string | undefined;
|
|
47
|
-
private noteRequestId;
|
|
48
|
-
constructor(opts: ApiClientOptions);
|
|
49
|
-
private base;
|
|
50
|
-
private headers;
|
|
51
|
-
private requestWithRetry;
|
|
52
|
-
validateToken(): Promise<void>;
|
|
53
|
-
checkPreflight(): Promise<void>;
|
|
54
|
-
previewImport(cdf: CDFDocument): Promise<ServerPreviewResponse>;
|
|
55
|
-
applyImport(cdf: CDFDocument, options: {
|
|
56
|
-
acknowledgeBreakingChanges: boolean;
|
|
57
|
-
}): Promise<ApplyOperationResponse>;
|
|
58
|
-
pollOperation(operationId: string, opts?: {
|
|
59
|
-
intervalMs?: number;
|
|
60
|
-
maxIntervalMs?: number;
|
|
61
|
-
maxAttempts?: number;
|
|
62
|
-
onProgress?: (op: ApplyOperationResponse) => void;
|
|
63
|
-
}): Promise<ApplyOperationResponse>;
|
|
64
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Command } from 'commander';
|
|
2
|
-
import type { CDFComponentEntry, CDFTokenEntry, CDFValidationError, DTCGTokenEntry } from '@contentful/experience-design-system-types';
|
|
3
|
-
import { findSlotCycles } from '../analyze/cycle-detection.js';
|
|
4
|
-
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
5
|
-
export declare function readTokensFromPath(flag: string, p: string): Promise<DTCGTokenEntry[]>;
|
|
6
|
-
/** Adapts flat DTCGTokenEntry[] (path alongside the leaf) into the
|
|
7
|
-
* {path, entry} pairs buildCDF/buildFilteredCDF expect. */
|
|
8
|
-
export declare function toCDFTokens(tokens: DTCGTokenEntry[]): Array<{
|
|
9
|
-
path: string;
|
|
10
|
-
entry: CDFTokenEntry;
|
|
11
|
-
}>;
|
|
12
|
-
export declare function detectSlotCycles(components: Array<{
|
|
13
|
-
key: string;
|
|
14
|
-
entry: CDFComponentEntry;
|
|
15
|
-
}>): ReturnType<typeof findSlotCycles>;
|
|
16
|
-
export declare function formatSlotCycleReport(cycles: ReturnType<typeof findSlotCycles>): string[];
|
|
17
|
-
export declare function assertNoSlotCycles(components: Array<{
|
|
18
|
-
key: string;
|
|
19
|
-
entry: CDFComponentEntry;
|
|
20
|
-
}>): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Client-side pre-flight for `$allowedComponents` references that are absent
|
|
23
|
-
* from this document, so a typo'd or renamed reference fails fast instead of
|
|
24
|
-
* waiting on the `previewImport`/`applyImport` round-trip. Only catches
|
|
25
|
-
* document-internal misses — a name that resolves against an *existing*
|
|
26
|
-
* target-environment Component still needs the network round-trip to
|
|
27
|
-
* confirm, so this cannot replace the server-side check.
|
|
28
|
-
*
|
|
29
|
-
* `validateSlotReferences` is the detection step (shared with
|
|
30
|
-
* `WizardApp.tsx` via `formatUnresolvedSlotReferences` below, mirroring how
|
|
31
|
-
* `detectSlotCycles`/`formatSlotCycleReport` split for the cycle check).
|
|
32
|
-
*/
|
|
33
|
-
export declare function formatUnresolvedSlotReferences(errors: CDFValidationError[]): string[];
|
|
34
|
-
export declare function assertNoUnresolvedSlotReferences(components: Array<{
|
|
35
|
-
key: string;
|
|
36
|
-
entry: CDFComponentEntry;
|
|
37
|
-
}>): Promise<void>;
|
|
38
|
-
export declare function extractComponents(cdf: Record<string, unknown> | null | undefined): Array<{
|
|
39
|
-
key: string;
|
|
40
|
-
entry: CDFComponentEntry;
|
|
41
|
-
}>;
|
|
42
|
-
export declare function hasBreakingChangesWithImpact(preview: ServerPreviewResponse): boolean;
|
|
43
|
-
export declare function registerApplyCommand(program: Command): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
2
|
-
/**
|
|
3
|
-
* True when a preview response describes zero server-side changes across
|
|
4
|
-
* every diff bucket (components, tokens, taxonomies). Used by:
|
|
5
|
-
* - `experiences apply` (CLI): short-circuit the confirm-and-push step.
|
|
6
|
-
* - `experiences import` wizard: block finalize when the resulting push
|
|
7
|
-
* would be a pure no-op.
|
|
8
|
-
*
|
|
9
|
-
* A push that produces ANY entry in ANY bucket — including a rejection that
|
|
10
|
-
* removes a server-side component — is NOT empty.
|
|
11
|
-
*/
|
|
12
|
-
export declare function isEmptyPreview(preview: ServerPreviewResponse): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { readTokensFromPath, hasBreakingChangesWithImpact, toCDFTokens } from './command.js';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ServerPreviewResponse, ApplyOperationResponse } from '@contentful/experience-design-system-types';
|
|
3
|
-
interface ServerPreviewConfirmProps {
|
|
4
|
-
preview: ServerPreviewResponse;
|
|
5
|
-
spaceId: string;
|
|
6
|
-
environmentId: string;
|
|
7
|
-
breakingWithImpact: boolean;
|
|
8
|
-
onConfirm: (acknowledge: boolean) => void;
|
|
9
|
-
onCancel: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function ServerPreviewConfirm({ preview, spaceId, environmentId, breakingWithImpact, onConfirm, onCancel, }: ServerPreviewConfirmProps): React.ReactElement;
|
|
12
|
-
interface ServerPreviewAppProps {
|
|
13
|
-
preview: ServerPreviewResponse;
|
|
14
|
-
spaceId: string;
|
|
15
|
-
environmentId: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function ServerPreviewApp({ preview, spaceId, environmentId }: ServerPreviewAppProps): React.ReactElement;
|
|
18
|
-
interface ServerApplyProgressProps {
|
|
19
|
-
spaceId: string;
|
|
20
|
-
environmentId: string;
|
|
21
|
-
status: 'applying' | 'polling' | 'error';
|
|
22
|
-
operationId?: string;
|
|
23
|
-
error?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function ServerApplyProgress({ spaceId, environmentId, status, operationId, error, }: ServerApplyProgressProps): React.ReactElement;
|
|
26
|
-
interface ServerApplyDoneProps {
|
|
27
|
-
operation: ApplyOperationResponse;
|
|
28
|
-
spaceId: string;
|
|
29
|
-
environmentId: string;
|
|
30
|
-
/** Configured API host (e.g. `api.contentful.com`). Used to derive the post-push webapp URL. */
|
|
31
|
-
host?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare function ServerApplyDone({ operation, spaceId, environmentId, host }: ServerApplyDoneProps): React.ReactElement;
|
|
34
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
|
-
interface ServerPreviewViewProps {
|
|
4
|
-
preview: ServerPreviewResponse;
|
|
5
|
-
spaceId: string;
|
|
6
|
-
environmentId: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function ServerPreviewView({ preview, spaceId, environmentId }: ServerPreviewViewProps): React.ReactElement;
|
|
9
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type ExperiencesCredentials = {
|
|
2
|
-
spaceId: string;
|
|
3
|
-
environmentId: string;
|
|
4
|
-
cmaToken: string;
|
|
5
|
-
host?: string;
|
|
6
|
-
agent?: string;
|
|
7
|
-
agentModel?: string;
|
|
8
|
-
/** Feature 8: persisted custom prompt path for `generate components`. */
|
|
9
|
-
generatePromptPath?: string;
|
|
10
|
-
/** Write JSONL trace of every command decision to ~/.contentful/experience-design-system-cli/debug/. */
|
|
11
|
-
debug?: boolean;
|
|
12
|
-
/** Print plain text with no color; an exported NO_COLOR still wins. */
|
|
13
|
-
noColor?: boolean;
|
|
14
|
-
analyticsDisabled?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare function readExperiencesCredentials(): Promise<ExperiencesCredentials>;
|
|
17
|
-
export declare function writeExperiencesCredentials(creds: ExperiencesCredentials): Promise<void>;
|
|
18
|
-
export declare function experiencesCredentialsPath(): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function reportNode(): Promise<boolean>;
|
|
2
|
-
export declare function reportPnpm(pkgRoot: string): Promise<boolean>;
|
|
3
|
-
export declare function reportDependencies(pkgRoot: string): Promise<boolean>;
|
|
4
|
-
export declare function reportBuild(pkgRoot: string): Promise<boolean>;
|
|
5
|
-
export declare function reportAgent(): Promise<boolean>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function ok(msg: string): void;
|
|
2
|
-
export declare function fail(msg: string): void;
|
|
3
|
-
export declare function warn(msg: string): void;
|
|
4
|
-
export declare function info(msg: string): void;
|
|
5
|
-
export declare function section(title: string): void;
|
|
6
|
-
/** Echo the first `limit` lines of a failed command's stderr. */
|
|
7
|
-
export declare function infoStderr(stderr: string, limit: number): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface GenerateViewResult {
|
|
3
|
-
skill: string;
|
|
4
|
-
agent: string;
|
|
5
|
-
sessionId: string;
|
|
6
|
-
}
|
|
7
|
-
interface GenerateViewProps {
|
|
8
|
-
result: GenerateViewResult;
|
|
9
|
-
onExit: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function GenerateView({ result, onExit }: GenerateViewProps): React.ReactElement;
|
|
12
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PlainClientAPI } from 'contentful-management';
|
|
2
|
-
interface BuildContentfulManagementClientOptions {
|
|
3
|
-
cmaToken: string;
|
|
4
|
-
host?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function buildContentfulManagementClient(opts: BuildContentfulManagementClientOptions): PlainClientAPI;
|
|
7
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
|
|
2
|
-
export interface FetchAndPersistParams {
|
|
3
|
-
spaceId: string;
|
|
4
|
-
environmentId: string;
|
|
5
|
-
cmaToken: string;
|
|
6
|
-
host?: string;
|
|
7
|
-
outDir: string;
|
|
8
|
-
}
|
|
9
|
-
export interface FetchAndPersistSuccess {
|
|
10
|
-
ok: true;
|
|
11
|
-
path: string;
|
|
12
|
-
durationMs: number;
|
|
13
|
-
entities: ExistingContentfulEntities;
|
|
14
|
-
}
|
|
15
|
-
export interface FetchAndPersistFailure {
|
|
16
|
-
ok: false;
|
|
17
|
-
durationMs: number;
|
|
18
|
-
error: string;
|
|
19
|
-
}
|
|
20
|
-
export type FetchAndPersistResult = FetchAndPersistSuccess | FetchAndPersistFailure;
|
|
21
|
-
/**
|
|
22
|
-
* Build the Contentful management client, fetch the target space's Components
|
|
23
|
-
* and DesignTokens, and write the raw payload to `<outDir>/.existing-entities.json`.
|
|
24
|
-
*
|
|
25
|
-
* Never throws — a failure is reported via `ok: false`. Callers own the
|
|
26
|
-
* user-facing step/progress reporting. This helper only handles the mechanical
|
|
27
|
-
* fetch-then-write and returns a structured result.
|
|
28
|
-
*/
|
|
29
|
-
export declare function fetchAndPersistExistingContentfulEntities(params: FetchAndPersistParams): Promise<FetchAndPersistResult>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type DesignTokenProps, type PlainClientAPI } from 'contentful-management';
|
|
2
|
-
export interface ExistingContentfulEntities {
|
|
3
|
-
components: ComponentProps[];
|
|
4
|
-
tokens: DesignTokenProps[];
|
|
5
|
-
}
|
|
6
|
-
interface FetchExistingContentfulEntitiesParams {
|
|
7
|
-
spaceId: string;
|
|
8
|
-
environmentId: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function fetchExistingContentfulEntitiesFromContentful(client: PlainClientAPI, params: FetchExistingContentfulEntitiesParams): Promise<ExistingContentfulEntities>;
|
|
11
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from 'contentful-management';
|
|
2
|
-
/**
|
|
3
|
-
* Find the space component whose name is closest to the codebase component name,
|
|
4
|
-
* within a small edit budget. Handles case, punctuation, and plural differences
|
|
5
|
-
* so `Btn-Primary` matches `btnPrimary`, and `Cards` matches `Card`.
|
|
6
|
-
*/
|
|
7
|
-
export declare function findNearlyMatchingComponent(components: ComponentProps[], codebaseName: string): ComponentProps | undefined;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
|
|
2
|
-
/**
|
|
3
|
-
* Read the session file written after
|
|
4
|
-
* `fetchExistingContentfulEntitiesFromContentful()`. Returns undefined on
|
|
5
|
-
* any failure — this is optional enrichment and must never block the step.
|
|
6
|
-
*/
|
|
7
|
-
export declare function readExistingContentfulEntitiesFromSession(path: string | undefined): Promise<ExistingContentfulEntities | undefined>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
|
|
2
|
-
export interface SelectAgentSummary {
|
|
3
|
-
components: Array<{
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
}>;
|
|
8
|
-
tokens: {
|
|
9
|
-
count: number;
|
|
10
|
-
kinds: string[];
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export interface GenerateAgentSummary {
|
|
14
|
-
likelyMatch?: {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
designProperties: Array<{
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
type: string;
|
|
21
|
-
}>;
|
|
22
|
-
contentProperties: Array<{
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
type: string;
|
|
26
|
-
}>;
|
|
27
|
-
slots: Array<{
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
}>;
|
|
31
|
-
};
|
|
32
|
-
otherComponents: Array<{
|
|
33
|
-
id: string;
|
|
34
|
-
name: string;
|
|
35
|
-
}>;
|
|
36
|
-
tokens: {
|
|
37
|
-
count: number;
|
|
38
|
-
kinds: string[];
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export interface MapTokensSummary {
|
|
42
|
-
tokens: Array<{
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
type: string;
|
|
46
|
-
}>;
|
|
47
|
-
}
|
|
48
|
-
export declare function summarizeForSelectAgent(entities: ExistingContentfulEntities): SelectAgentSummary;
|
|
49
|
-
export declare function summarizeForGenerateAgent(entities: ExistingContentfulEntities, codebaseComponentName: string): GenerateAgentSummary;
|
|
50
|
-
export declare function summarizeForMapTokens(entities: ExistingContentfulEntities): MapTokensSummary;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|