@contentful/experience-design-system-cli 2.34.5-dev-build-3ce6f03.0 → 2.34.5-dev-build-d42cd1ad.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.34.5-dev-build-3ce6f03.0",
3
+ "version": "2.34.5-dev-build-d42cd1ad.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -7,7 +7,7 @@ export type ExperiencesCredentials = {
7
7
  agentModel?: string;
8
8
  /** Feature 8: persisted custom prompt path for `generate components`. */
9
9
  generatePromptPath?: string;
10
- /** Feature: default debug-mode (writes JSONL trace of every decision) for all commands. */
10
+ /** Write JSONL trace of every command decision to ~/.contentful/experience-design-system-cli/debug/. */
11
11
  debug?: boolean;
12
12
  /** Print plain text with no color; an exported NO_COLOR still wins. */
13
13
  noColor?: boolean;
package/dist/src/index.js CHANGED
@@ -1184,17 +1184,6 @@ function initDebugLogger(opts) {
1184
1184
  function getDebugLogger() {
1185
1185
  return singleton ?? new NoopDebugLogger();
1186
1186
  }
1187
- function resolveDebugMode(opts, configDebug) {
1188
- if (opts.debug !== void 0) return opts.debug;
1189
- const env = process.env["EDSI_DEBUG"];
1190
- if (env !== void 0 && env !== "") {
1191
- const v = env.toLowerCase();
1192
- if (v === "1" || v === "true" || v === "yes" || v === "on") return true;
1193
- if (v === "0" || v === "false" || v === "no" || v === "off") return false;
1194
- }
1195
- if (configDebug !== void 0) return configDebug;
1196
- return false;
1197
- }
1198
1187
  function printDebugBanner(logger, phase) {
1199
1188
  if (!logger.enabled || !logger.path) return;
1200
1189
  const prefix = phase === "start" ? "\x1B[92m[debug]\x1B[0m " : "\x1B[92m[debug]\x1B[0m ";
@@ -30791,14 +30780,14 @@ var init_extract_command = __esm({
30791
30780
  });
30792
30781
 
30793
30782
  // packages/experience-design-system-cli/src/lib/debug-preamble.ts
30794
- async function beginCommand(command, opts) {
30783
+ async function beginCommand(command) {
30795
30784
  let configDebug;
30796
30785
  try {
30797
30786
  const creds = await readExperiencesCredentials();
30798
30787
  configDebug = creds.debug;
30799
30788
  } catch {
30800
30789
  }
30801
- const enabled = resolveDebugMode(opts, configDebug);
30790
+ const enabled = configDebug ?? false;
30802
30791
  const logger = initDebugLogger({ enabled, command });
30803
30792
  if (logger.enabled) {
30804
30793
  printDebugBanner(logger, "start");
@@ -30897,20 +30886,7 @@ function createProgram() {
30897
30886
  registerDoctorCommand(program);
30898
30887
  registerSetupCommand(program);
30899
30888
  registerBuildCommand(program);
30900
- program.option(
30901
- "--debug",
30902
- "Write a JSONL trace of every decision to ~/.contentful/experience-design-system-cli/debug/"
30903
- );
30904
- program.option("--no-debug", "Force debug logging off (overrides EDSI_DEBUG and persisted setup preference)");
30905
30889
  program.hook("preAction", async (_thisCommand, actionCommand) => {
30906
- let debug;
30907
- for (let c2 = actionCommand; c2; c2 = c2.parent) {
30908
- const opts = c2.opts();
30909
- if (opts.debug !== void 0) {
30910
- debug = opts.debug;
30911
- break;
30912
- }
30913
- }
30914
30890
  if (resolveBedrockFromAncestors(actionCommand)) {
30915
30891
  process.env.EDS_BEDROCK = "1";
30916
30892
  }
@@ -30920,7 +30896,7 @@ function createProgram() {
30920
30896
  const { analyticsDisabled } = await readExperiencesCredentials();
30921
30897
  setPersistedAnalyticsDisabled(analyticsDisabled ?? false);
30922
30898
  noteCommandStart(commandChain);
30923
- await beginCommand(commandChain, { ...debug !== void 0 ? { debug } : {} });
30899
+ await beginCommand(commandChain);
30924
30900
  });
30925
30901
  program.hook("postAction", async () => {
30926
30902
  await completeActiveCommand();
@@ -25,18 +25,6 @@ export declare function initDebugLogger(opts: InitDebugLoggerOptions): DebugLogg
25
25
  export declare function getDebugLogger(): DebugLogger;
26
26
  /** Test-only: reset the singleton. */
27
27
  export declare function __resetDebugLoggerForTest(): void;
28
- /**
29
- * Resolve effective debug-mode setting from three sources.
30
- *
31
- * Precedence (highest first):
32
- * 1. `--debug` / `--no-debug` CLI flag
33
- * 2. `EDSI_DEBUG` env var (truthy: 1, true, yes, on)
34
- * 3. Persisted `debug` field in credentials.json
35
- * 4. Default: OFF
36
- */
37
- export declare function resolveDebugMode(opts: {
38
- debug?: boolean;
39
- }, configDebug?: boolean): boolean;
40
28
  /**
41
29
  * Emit the bright-green "debug logs at <path>" banner to stderr.
42
30
  * No-op when debug is disabled or stderr is not a TTY-friendly stream.
@@ -1,14 +1,6 @@
1
1
  import { type DebugLogger } from './debug-logger.js';
2
2
  /**
3
- * Preamble every top-level command action should call before doing work.
4
- *
5
- * Resolves the effective debug decision (flag > env > persisted config),
6
- * initializes the singleton, and prints the bright-green start banner.
7
- * Registers a process-exit handler that prints the end banner once.
8
- *
9
- * Returns the logger so the caller can emit events without a second import.
10
- * When debug is disabled, the returned logger is a no-op.
3
+ * Initialize the debug logger from persisted credentials.
4
+ * Debug mode can only be configured via setup preferences;
11
5
  */
12
- export declare function beginCommand(command: string, opts: {
13
- debug?: boolean;
14
- }): Promise<DebugLogger>;
6
+ export declare function beginCommand(command: string): Promise<DebugLogger>;
@@ -16,9 +16,9 @@ export declare function runBuild(opts: {
16
16
  exitCode: number;
17
17
  }>;
18
18
  /**
19
- * Walks `actionCommand` and its ancestors for a truthy `--bedrock`. --bedrock
20
- * is registered per-subcommand (not at program scope, unlike --debug), so a
21
- * root-level or subcommand-level setting can each carry it.
19
+ * Walks `actionCommand` and its ancestors for a truthy `--bedrock`.
20
+ * --bedrock is registered per-subcommand, so a root-level or
21
+ * subcommand-level setting can each carry it.
22
22
  */
23
23
  export declare function resolveBedrockFromAncestors(actionCommand: Command): boolean;
24
24
  export declare function createProgram(): Command;
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-3ce6f03.0",
3
+ "version": "2.34.5-dev-build-d42cd1ad.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,8 +41,8 @@
41
41
  "svelte": "^5.56.4",
42
42
  "ts-morph": "^27.0.2",
43
43
  "typescript": "^5.9.3",
44
- "@contentful/experience-design-system-types": "2.34.5-dev-build-3ce6f03.0",
45
- "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-3ce6f03.0"
44
+ "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-d42cd1ad.0",
45
+ "@contentful/experience-design-system-types": "2.34.5-dev-build-d42cd1ad.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@tsconfig/node24": "^24.0.4",
@@ -54,9 +54,9 @@
54
54
  "ink-testing-library": "^4.0.0",
55
55
  "typescript-eslint": "^8.67.0",
56
56
  "vitest": "^4.0.16",
57
- "@contentful/experience-design-system-client": "2.34.5-dev-build-3ce6f03.0",
58
- "@contentful/experience-design-system-extraction": "2.34.5-dev-build-3ce6f03.0",
59
- "@contentful/experience-design-system-generation": "2.34.5-dev-build-3ce6f03.0"
57
+ "@contentful/experience-design-system-client": "2.34.5-dev-build-d42cd1ad.0",
58
+ "@contentful/experience-design-system-generation": "2.34.5-dev-build-d42cd1ad.0",
59
+ "@contentful/experience-design-system-extraction": "2.34.5-dev-build-d42cd1ad.0"
60
60
  },
61
61
  "repository": {
62
62
  "type": "git",