@contentful/experience-design-system-cli 2.34.5-dev-build-4985ea96.0 → 2.34.5-dev-build-134fe990.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
|
@@ -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
|
-
/**
|
|
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 ";
|
|
@@ -30860,14 +30849,14 @@ var init_extract_command = __esm({
|
|
|
30860
30849
|
});
|
|
30861
30850
|
|
|
30862
30851
|
// packages/experience-design-system-cli/src/lib/debug-preamble.ts
|
|
30863
|
-
async function beginCommand(command
|
|
30852
|
+
async function beginCommand(command) {
|
|
30864
30853
|
let configDebug;
|
|
30865
30854
|
try {
|
|
30866
30855
|
const creds = await readExperiencesCredentials();
|
|
30867
30856
|
configDebug = creds.debug;
|
|
30868
30857
|
} catch {
|
|
30869
30858
|
}
|
|
30870
|
-
const enabled =
|
|
30859
|
+
const enabled = configDebug ?? false;
|
|
30871
30860
|
const logger = initDebugLogger({ enabled, command });
|
|
30872
30861
|
if (logger.enabled) {
|
|
30873
30862
|
printDebugBanner(logger, "start");
|
|
@@ -30992,7 +30981,7 @@ function createProgram() {
|
|
|
30992
30981
|
const { analyticsDisabled } = await readExperiencesCredentials();
|
|
30993
30982
|
setPersistedAnalyticsDisabled(analyticsDisabled ?? false);
|
|
30994
30983
|
noteCommandStart(commandChain);
|
|
30995
|
-
await beginCommand(commandChain
|
|
30984
|
+
await beginCommand(commandChain);
|
|
30996
30985
|
});
|
|
30997
30986
|
program.hook("postAction", async () => {
|
|
30998
30987
|
await completeActiveCommand();
|
|
@@ -25,17 +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. `EDSI_DEBUG` env var (truthy: 1, true, yes, on)
|
|
33
|
-
* 2. Persisted `debug` field in credentials.json
|
|
34
|
-
* 4. Default: OFF
|
|
35
|
-
*/
|
|
36
|
-
export declare function resolveDebugMode(opts: {
|
|
37
|
-
debug?: boolean;
|
|
38
|
-
}, configDebug?: boolean): boolean;
|
|
39
28
|
/**
|
|
40
29
|
* Emit the bright-green "debug logs at <path>" banner to stderr.
|
|
41
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
|
-
*
|
|
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
|
|
13
|
-
debug?: boolean;
|
|
14
|
-
}): Promise<DebugLogger>;
|
|
6
|
+
export declare function beginCommand(command: string): Promise<DebugLogger>;
|
package/dist/src/program.d.ts
CHANGED
|
@@ -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`.
|
|
20
|
-
* is registered per-subcommand, so a
|
|
21
|
-
*
|
|
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-
|
|
3
|
+
"version": "2.34.5-dev-build-134fe990.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-
|
|
45
|
-
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-
|
|
44
|
+
"@contentful/experience-design-system-types": "2.34.5-dev-build-134fe990.0",
|
|
45
|
+
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-134fe990.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-
|
|
58
|
-
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-
|
|
59
|
-
"@contentful/experience-design-system-generation": "2.34.5-dev-build-
|
|
57
|
+
"@contentful/experience-design-system-client": "2.34.5-dev-build-134fe990.0",
|
|
58
|
+
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-134fe990.0",
|
|
59
|
+
"@contentful/experience-design-system-generation": "2.34.5-dev-build-134fe990.0"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|