@contentful/experience-design-system-cli 2.34.5-dev-build-5e798cb1.0 → 2.35.0-alpha.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.
@@ -1,3 +1,4 @@
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;
@@ -0,0 +1,21 @@
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
+ compositionRefresh?: boolean;
10
+ compositionMap?: string;
11
+ };
12
+ /**
13
+ * Resolve the effective composition mode with precedence
14
+ * `explicit flag > implied source > env > persisted config > default`.
15
+ * Default is `atomic` (composition OFF); opting into composite mode enables
16
+ * the hierarchy machinery. Passing a composition source implies composite.
17
+ */
18
+ export declare function resolveCompositionMode(opts: {
19
+ composite?: boolean;
20
+ atomic?: boolean;
21
+ } & CompositionSourceOptions, configMode?: CompositionMode): CompositionMode;
@@ -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. */
@@ -44,6 +45,10 @@ export type RunRecord = {
44
45
  * satisfy `RunRecord`; `appendRun` always normalizes a missing value to
45
46
  * null on the way to disk. */
46
47
  sourceFingerprint?: SourceFingerprint | null;
48
+ /** Composition mode the run was produced in, so replay resumes in the
49
+ * same mode (`composite` vs `atomic`). Absent on records written before this
50
+ * field existed; callers treat a missing value as `atomic` (the default). */
51
+ compositionMode?: CompositionMode;
47
52
  notes?: string;
48
53
  };
49
54
  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-5e798cb1.0",
3
+ "version": "2.35.0-alpha.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,8 +40,8 @@
40
40
  "svelte": "^5.56.4",
41
41
  "ts-morph": "^27.0.2",
42
42
  "typescript": "^5.9.3",
43
- "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-5e798cb1.0",
44
- "@contentful/experience-design-system-types": "2.34.5-dev-build-5e798cb1.0"
43
+ "@contentful/experience-design-system-types": "2.35.0-alpha.0",
44
+ "@contentful/experience-design-system-cli-v2": "2.35.0-alpha.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@tsconfig/node24": "^24.0.4",
@@ -53,9 +53,9 @@
53
53
  "ink-testing-library": "^4.0.0",
54
54
  "typescript-eslint": "^8.67.0",
55
55
  "vitest": "^4.0.16",
56
- "@contentful/experience-design-system-client": "2.34.5-dev-build-5e798cb1.0",
57
- "@contentful/experience-design-system-extraction": "2.34.5-dev-build-5e798cb1.0",
58
- "@contentful/experience-design-system-generation": "2.34.5-dev-build-5e798cb1.0"
56
+ "@contentful/experience-design-system-extraction": "2.35.0-alpha.0",
57
+ "@contentful/experience-design-system-client": "2.35.0-alpha.0",
58
+ "@contentful/experience-design-system-generation": "2.35.0-alpha.0"
59
59
  },
60
60
  "repository": {
61
61
  "type": "git",