@contentful/experience-design-system-cli 2.34.5-dev-build-4bbbf2f0.0 → 2.34.5-dev-build-98f09a97.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 ";
|
|
@@ -30671,14 +30660,14 @@ var init_extract_command = __esm({
|
|
|
30671
30660
|
});
|
|
30672
30661
|
|
|
30673
30662
|
// packages/experience-design-system-cli/src/lib/debug-preamble.ts
|
|
30674
|
-
async function beginCommand(command
|
|
30663
|
+
async function beginCommand(command) {
|
|
30675
30664
|
let configDebug;
|
|
30676
30665
|
try {
|
|
30677
30666
|
const creds = await readExperiencesCredentials();
|
|
30678
30667
|
configDebug = creds.debug;
|
|
30679
30668
|
} catch {
|
|
30680
30669
|
}
|
|
30681
|
-
const enabled =
|
|
30670
|
+
const enabled = configDebug ?? false;
|
|
30682
30671
|
const logger = initDebugLogger({ enabled, command });
|
|
30683
30672
|
if (logger.enabled) {
|
|
30684
30673
|
printDebugBanner(logger, "start");
|
|
@@ -30803,7 +30792,7 @@ function createProgram() {
|
|
|
30803
30792
|
const { analyticsDisabled } = await readExperiencesCredentials();
|
|
30804
30793
|
setPersistedAnalyticsDisabled(analyticsDisabled ?? false);
|
|
30805
30794
|
noteCommandStart(commandChain);
|
|
30806
|
-
await beginCommand(commandChain
|
|
30795
|
+
await beginCommand(commandChain);
|
|
30807
30796
|
});
|
|
30808
30797
|
program.hook("postAction", async () => {
|
|
30809
30798
|
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-98f09a97.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-
|
|
45
|
-
"@contentful/experience-design-system-
|
|
44
|
+
"@contentful/experience-design-system-types": "2.34.5-dev-build-98f09a97.0",
|
|
45
|
+
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-98f09a97.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-98f09a97.0",
|
|
58
|
+
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-98f09a97.0",
|
|
59
|
+
"@contentful/experience-design-system-generation": "2.34.5-dev-build-98f09a97.0"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|