@contentful/experience-design-system-cli 2.27.5-dev-build-56846c8.0 → 2.27.5-dev-build-347f1b0.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/README.md +2 -1
- package/dist/package.json +1 -1
- package/dist/src/analytics/types.d.ts +1 -1
- package/dist/src/analyze/select/tui/components/TokenReviewPanel.d.ts +30 -0
- package/dist/src/import/orchestrator.d.ts +1 -0
- package/dist/src/import/tui/WizardApp.d.ts +13 -1
- package/dist/src/import/tui/final-review-host.d.ts +2 -1
- package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +2 -1
- package/dist/src/import/tui/steps/GenerateReviewStep.d.ts +2 -1
- package/dist/src/index.js +2790 -1139
- package/dist/src/lib/cli-errors.d.ts +2 -0
- package/dist/src/map-tokens/apply.d.ts +12 -0
- package/dist/src/map-tokens/command.d.ts +2 -0
- package/dist/src/map-tokens/resolve-defaults.d.ts +31 -0
- package/dist/src/map-tokens/tui/MapTokensView.d.ts +13 -0
- package/dist/src/print/command.d.ts +9 -0
- package/dist/src/runs/modify-launcher.d.ts +2 -0
- package/dist/src/session/db.d.ts +35 -6
- package/dist/src/session/source-excerpt.d.ts +25 -0
- package/package.json +5 -5
- package/skills/generate-components.md +139 -35
- package/skills/map-tokens.md +90 -0
package/README.md
CHANGED
|
@@ -205,8 +205,9 @@ Pass `--select-prompt-path <path>` and/or `--generate-prompt-path <path>` to swa
|
|
|
205
205
|
| `--skip-analyze` | — | Reuse most recent `analyze extract` session |
|
|
206
206
|
| `--skip-generate` | — | Reuse most recent `generate components` session |
|
|
207
207
|
| `--print` | — | Headless: write `components.json` to `--out` after generation |
|
|
208
|
+
| `--skip-map-tokens` | — | Skip the `map tokens` step between generate and apply |
|
|
208
209
|
| `--skip-apply` | — | Stop after generate; do not push |
|
|
209
|
-
| `--no-cache` | cache on | Bypass extract/select/generate fine-grained caches and force re-run; forwarded to `analyze select-agent` and `
|
|
210
|
+
| `--no-cache` | cache on | Bypass extract/select/generate/map-tokens fine-grained caches and force re-run; forwarded to `analyze select-agent`, `generate components`, and `map tokens` |
|
|
210
211
|
| `--yes` | — | Skip interactive confirmation in `apply push` |
|
|
211
212
|
| `--verbose` | — | Show full agent output and all entity progress |
|
|
212
213
|
| `--exclude-invalid` | off (fail loud) | Auto-reject components with validation errors instead of refusing to proceed |
|
package/dist/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Tracked CLI commands — closed set aligned with the published event schema. */
|
|
2
|
-
export type DsiCliCommand = 'analyze_extract' | 'analyze_select' | 'generate_components' | 'generate_tokens' | 'generate_edit' | 'apply_preview' | 'apply_select' | 'apply_push' | 'print_components' | 'print_tokens' | 'import';
|
|
2
|
+
export type DsiCliCommand = 'analyze_extract' | 'analyze_select' | 'generate_components' | 'generate_tokens' | 'generate_edit' | 'map_tokens' | 'apply_preview' | 'apply_select' | 'apply_push' | 'print_components' | 'print_tokens' | 'import';
|
|
3
3
|
export type EntryCommand = 'analyze_extract' | 'import';
|
|
4
4
|
export type OsName = 'macOS' | 'Linux' | 'Windows' | 'Android' | 'other';
|
|
5
5
|
export type WriteResult = {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
|
+
export type TokenPropSuggestion = {
|
|
4
|
+
propName: string;
|
|
5
|
+
paths: string[];
|
|
6
|
+
suggested: string[];
|
|
7
|
+
allowed: string[];
|
|
8
|
+
};
|
|
9
|
+
export type TokenReviewToken = {
|
|
10
|
+
path: string;
|
|
11
|
+
kind: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Design-token props on `entry` with a declared token kind. `paths` is the
|
|
15
|
+
* full compatible token universe when a token catalog is available; `allowed`
|
|
16
|
+
* remains the current subset.
|
|
17
|
+
*/
|
|
18
|
+
export declare function collectTokenSuggestions(entry: CDFComponentEntry, availableTokens?: TokenReviewToken[]): TokenPropSuggestion[];
|
|
19
|
+
export type TokenReviewPanelProps = {
|
|
20
|
+
componentName: string;
|
|
21
|
+
suggestions: TokenPropSuggestion[];
|
|
22
|
+
selectedRow: number;
|
|
23
|
+
editing: boolean;
|
|
24
|
+
editCursor: number;
|
|
25
|
+
editSelection: Set<string>;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
active: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function TokenReviewPanel({ componentName, suggestions, selectedRow, editing, editCursor, editSelection, width, height, active, }: TokenReviewPanelProps): React.ReactElement;
|
|
@@ -26,6 +26,17 @@ export declare function buildGenerateComponentsArgs(opts: {
|
|
|
26
26
|
noCache?: boolean;
|
|
27
27
|
generatePromptPath?: string;
|
|
28
28
|
}): string[];
|
|
29
|
+
export declare function buildMapTokensArgs(opts: {
|
|
30
|
+
sessionId: string;
|
|
31
|
+
agent: string;
|
|
32
|
+
model?: string;
|
|
33
|
+
noCache?: boolean;
|
|
34
|
+
skipAgent?: boolean;
|
|
35
|
+
}): string[];
|
|
36
|
+
export declare function shouldRunMapTokens(opts: {
|
|
37
|
+
mappablePropCount: number;
|
|
38
|
+
rawTokenCount: number;
|
|
39
|
+
}): boolean;
|
|
29
40
|
export declare function formatAcceptanceSummary(opts: {
|
|
30
41
|
accepted: number;
|
|
31
42
|
autoRejected: number;
|
|
@@ -58,6 +69,7 @@ export type WizardAppProps = {
|
|
|
58
69
|
onConflictMode?: ConflictMode;
|
|
59
70
|
selectPromptPath?: string;
|
|
60
71
|
generatePromptPath?: string;
|
|
72
|
+
skipMapTokens?: boolean;
|
|
61
73
|
seedExtractSessionId?: string;
|
|
62
74
|
seedGenerateSessionId?: string;
|
|
63
75
|
seedTokenSessionId?: string;
|
|
@@ -68,4 +80,4 @@ export type WizardAppProps = {
|
|
|
68
80
|
onRunPicked?: (selection: RunPickerSelection) => void;
|
|
69
81
|
allowDeletions?: boolean;
|
|
70
82
|
};
|
|
71
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, initialProjectPath, host, autoAcceptScope, autoRejectCycles, compositionMode, compositionMap, compositionAgent, compositionAgentMode, compositionRefresh, generateMap, promptOverrides, noCache, autoFilter, livePreview, noPush, noSave, outDirOverride, onConflictMode, selectPromptPath, generatePromptPath, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
|
|
83
|
+
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, initialProjectPath, host, autoAcceptScope, autoRejectCycles, compositionMode, compositionMap, compositionAgent, compositionAgentMode, compositionRefresh, generateMap, promptOverrides, noCache, autoFilter, livePreview, noPush, noSave, outDirOverride, onConflictMode, selectPromptPath, generatePromptPath, skipMapTokens, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { CompositionMode } from '../../lib/composition-mode.js';
|
|
3
3
|
export type FinalReviewHostProps = {
|
|
4
4
|
extractSessionId: string | null;
|
|
5
|
+
tokenSessionId?: string | null;
|
|
5
6
|
generatedCount: number;
|
|
6
7
|
autoAccept: boolean;
|
|
7
8
|
compositionMode?: CompositionMode;
|
|
@@ -16,4 +17,4 @@ export type FinalReviewHostProps = {
|
|
|
16
17
|
initialFinalizeError?: string | null;
|
|
17
18
|
allowDeletions?: boolean;
|
|
18
19
|
};
|
|
19
|
-
export declare function FinalReviewHost({ extractSessionId, generatedCount, autoAccept, compositionMode, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: FinalReviewHostProps): React.ReactElement;
|
|
20
|
+
export declare function FinalReviewHost({ extractSessionId, tokenSessionId, generatedCount, autoAccept, compositionMode, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: FinalReviewHostProps): React.ReactElement;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
3
3
|
type GenerateReviewStepProps = {
|
|
4
4
|
extractSessionId: string;
|
|
5
|
+
tokenSessionId?: string | null;
|
|
5
6
|
onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
|
|
6
7
|
onQuit: () => void;
|
|
7
8
|
/**
|
|
@@ -38,5 +39,5 @@ export declare function sortComponentsForSidebar<T extends {
|
|
|
38
39
|
key: string;
|
|
39
40
|
entry: CDFComponentEntry;
|
|
40
41
|
}>(components: T[]): T[];
|
|
41
|
-
export declare function AtomicGenerateReviewStep({ extractSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: GenerateReviewStepProps): React.ReactElement;
|
|
42
|
+
export declare function AtomicGenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, }: GenerateReviewStepProps): React.ReactElement;
|
|
42
43
|
export {};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { BreakingChange, CDFComponentEntry, ComponentTypeSummary, DownstreamImpact, ServerPreviewResponse } from '@contentful/experience-design-system-types';
|
|
3
3
|
type GenerateReviewStepProps = {
|
|
4
4
|
extractSessionId: string;
|
|
5
|
+
tokenSessionId?: string | null;
|
|
5
6
|
onFinalize: (accepted: number, rejected: number, unresolved: number) => void;
|
|
6
7
|
onQuit: () => void;
|
|
7
8
|
livePreview?: boolean;
|
|
@@ -34,4 +35,4 @@ export interface BreakingRow {
|
|
|
34
35
|
}
|
|
35
36
|
export declare function buildBreakingRows(breakingChanges: BreakingComponent[]): BreakingRow[];
|
|
36
37
|
export declare function deriveBreakingChanges(response: ServerPreviewResponse): BreakingComponent[];
|
|
37
|
-
export declare function GenerateReviewStep({ extractSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: GenerateReviewStepProps): React.ReactElement;
|
|
38
|
+
export declare function GenerateReviewStep({ extractSessionId, tokenSessionId, onFinalize, onQuit, livePreview, spaceId, environmentId, cmaToken, host, tokensPath, initialFinalizeError, allowDeletions, }: GenerateReviewStepProps): React.ReactElement;
|