@contentful/experience-design-system-cli 2.34.5-dev-build-0fafac5.0 → 2.34.5-dev-build-d08439d.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 +26 -13
- package/dist/package.json +1 -1
- package/dist/src/credentials-store.d.ts +7 -0
- package/dist/src/import/orchestrator.d.ts +2 -0
- package/dist/src/import/strip-allowed-components.d.ts +18 -0
- package/dist/src/import/tui/WizardApp.d.ts +3 -1
- package/dist/src/import/tui/final-review-host.d.ts +3 -1
- package/dist/src/import/tui/scope-gate-host.d.ts +3 -1
- package/dist/src/import/tui/steps/AtomicGenerateReviewStep.d.ts +28 -0
- package/dist/src/import/tui/steps/AtomicScopeGateStep.d.ts +3 -0
- package/dist/src/index.js +1668 -883
- package/dist/src/lib/command-options.d.ts +1 -0
- package/dist/src/lib/composition-mode.d.ts +30 -0
- package/dist/src/runs/modify-launcher.d.ts +4 -0
- package/dist/src/runs/store.d.ts +5 -0
- package/dist/src/setup/composition-mode-prompt.d.ts +14 -0
- package/package.json +6 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
2
|
export declare function addArtifactInputOptions(cmd: Command): Command;
|
|
3
3
|
export declare function addContentfulTargetOptions(cmd: Command): Command;
|
|
4
|
+
export declare function addCompositionOptions(cmd: Command): Command;
|
|
4
5
|
export declare function addSelectionOptions(cmd: Command): Command;
|
|
5
6
|
export declare function addAllowDeletionsOption(cmd: Command): Command;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const COMPOSITION_MODES: readonly ["composite", "atomic"];
|
|
2
|
+
export type CompositionMode = (typeof COMPOSITION_MODES)[number];
|
|
3
|
+
export declare function isCompositionMode(value: string): value is CompositionMode;
|
|
4
|
+
/**
|
|
5
|
+
* Options that, when present, IMPLY composite mode — passing any of them is a
|
|
6
|
+
* clear opt-in, so requiring an explicit `--composite` alongside is redundant.
|
|
7
|
+
*/
|
|
8
|
+
export type CompositionSourceOptions = {
|
|
9
|
+
compositionMap?: string;
|
|
10
|
+
compositionAgent?: boolean;
|
|
11
|
+
compositionRefresh?: boolean;
|
|
12
|
+
generateMap?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the effective composition mode with precedence
|
|
16
|
+
* `explicit flag > implied source > env > persisted config > default`.
|
|
17
|
+
* Default is `atomic` (composition OFF); `--composite` opts into the hierarchy
|
|
18
|
+
* machinery.
|
|
19
|
+
*
|
|
20
|
+
* `--atomic` is accepted for symmetry and wins when passed — even alongside a
|
|
21
|
+
* composition source, since it's an explicit "no" that overrides the implicit
|
|
22
|
+
* opt-in. If both `--composite` and `--atomic` are present, `--composite`
|
|
23
|
+
* wins. Passing a composition source (`--composition-map/-agent`,
|
|
24
|
+
* `--composition-refresh`, or `--generate-map`) implies composite without a
|
|
25
|
+
* separate `--composite`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveCompositionMode(opts: {
|
|
28
|
+
composite?: boolean;
|
|
29
|
+
atomic?: boolean;
|
|
30
|
+
} & CompositionSourceOptions, configMode?: CompositionMode): CompositionMode;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Thin indirection so `runModifyCommand` can be unit-tested without spinning
|
|
3
3
|
* up the real Ink wizard. The production implementation lives here.
|
|
4
4
|
*/
|
|
5
|
+
import type { CompositionMode } from '../lib/composition-mode.js';
|
|
5
6
|
export type ModifyLauncherInput = {
|
|
6
7
|
extractSessionId: string;
|
|
7
8
|
generateSessionId: string | null;
|
|
@@ -15,6 +16,9 @@ export type ModifyLauncherInput = {
|
|
|
15
16
|
savePath: string;
|
|
16
17
|
entryStep: 'scope-gate' | 'final-review';
|
|
17
18
|
saveMode: 'overwrite' | 'new' | 'prompt';
|
|
19
|
+
/** Composition mode from the run record, so the modify wizard resumes in the
|
|
20
|
+
* same mode. Omitted → the wizard's default (`atomic`). */
|
|
21
|
+
compositionMode?: CompositionMode;
|
|
18
22
|
outDirOverride?: string;
|
|
19
23
|
/** Pre-fill space id (from the run record's pushedTo). */
|
|
20
24
|
initialSpaceId?: string;
|
package/dist/src/runs/store.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CompositionMode } from '../lib/composition-mode.js';
|
|
1
2
|
export declare const RUNS_FILE_VERSION: 3;
|
|
2
3
|
/** Versions this CLI can read. v1 / v2 files are auto-migrated in memory;
|
|
3
4
|
* new writes always use the latest version. */
|
|
@@ -54,6 +55,10 @@ export type RunRecord = {
|
|
|
54
55
|
* writers always populate. Added in runs.json v3. Optional for the same
|
|
55
56
|
* reason as `sourceFingerprint`. */
|
|
56
57
|
savedFingerprint?: SavedFingerprint | null;
|
|
58
|
+
/** Composition mode the run was produced in, so modify/replay resumes in the
|
|
59
|
+
* same mode (`composite` vs `atomic`). Absent on records written before this
|
|
60
|
+
* field existed; callers treat a missing value as `atomic` (the default). */
|
|
61
|
+
compositionMode?: CompositionMode;
|
|
57
62
|
notes?: string;
|
|
58
63
|
};
|
|
59
64
|
export type RunsFile = {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CompositionMode } from '../lib/composition-mode.js';
|
|
2
|
+
/**
|
|
3
|
+
* Setup prompts for composition (spec T10). Parallels `promptAutoFilterPreference`
|
|
4
|
+
* — injectable `ask` for TTY-free unit testing.
|
|
5
|
+
*
|
|
6
|
+
* (a) Composite-mode default. Default N → atomic (composition OFF); the
|
|
7
|
+
* low-surprise default. `--composite` opts in per invocation.
|
|
8
|
+
*/
|
|
9
|
+
export declare function promptCompositeModePreference(ask: (q: string) => Promise<string>, current?: CompositionMode): Promise<CompositionMode>;
|
|
10
|
+
/**
|
|
11
|
+
* (b) Agentic mapping resolution. Default N — opt-in (it costs tokens and the
|
|
12
|
+
* output needs review), and only meaningful in composite mode.
|
|
13
|
+
*/
|
|
14
|
+
export declare function promptAgenticResolutionPreference(ask: (q: string) => Promise<string>, current?: boolean): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.34.5-dev-build-
|
|
3
|
+
"version": "2.34.5-dev-build-d08439d.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"svelte": "^5.56.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
|
-
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-
|
|
43
|
-
"@contentful/experience-design-system-types": "2.34.5-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-d08439d.0",
|
|
43
|
+
"@contentful/experience-design-system-types": "2.34.5-dev-build-d08439d.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"ink-testing-library": "^4.0.0",
|
|
53
53
|
"typescript-eslint": "^8.67.0",
|
|
54
54
|
"vitest": "^4.0.16",
|
|
55
|
-
"@contentful/experience-design-system-client": "2.34.5-dev-build-
|
|
56
|
-
"@contentful/experience-design-system-
|
|
57
|
-
"@contentful/experience-design-system-
|
|
55
|
+
"@contentful/experience-design-system-client": "2.34.5-dev-build-d08439d.0",
|
|
56
|
+
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-d08439d.0",
|
|
57
|
+
"@contentful/experience-design-system-generation": "2.34.5-dev-build-d08439d.0"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|