@contentful/experience-design-system-cli 2.34.5-dev-build-f8f0b1fa.0 → 2.34.5-dev-build-ec126bf0.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,4 @@
|
|
|
1
|
-
export declare function CompactControlBar({ hasGroupRoots, searchActive
|
|
1
|
+
export declare function CompactControlBar({ hasGroupRoots, searchActive }: {
|
|
2
2
|
hasGroupRoots: boolean;
|
|
3
3
|
searchActive: boolean;
|
|
4
|
-
showJson?: boolean;
|
|
5
|
-
tokenReviewAvailable?: boolean;
|
|
6
4
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/src/index.js
CHANGED
|
@@ -142,18 +142,13 @@ function GoodbyeBoundary({ children }) {
|
|
|
142
142
|
return isExiting ? /* @__PURE__ */ jsx(Text, { children: "Goodbye!" }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
143
143
|
}
|
|
144
144
|
function renderWithGoodbye(element, options) {
|
|
145
|
-
const instanceRef = {};
|
|
146
|
-
const clearScreen = () => {
|
|
147
|
-
instanceRef.current?.clear();
|
|
148
|
-
};
|
|
149
145
|
const instance = render(
|
|
150
|
-
/* @__PURE__ */ jsx(ScreenTransitionClearContext.Provider, { value:
|
|
146
|
+
/* @__PURE__ */ jsx(ScreenTransitionClearContext.Provider, { value: () => instance.clear(), children: /* @__PURE__ */ jsx(GoodbyeBoundary, { children: element }) }),
|
|
151
147
|
{
|
|
152
148
|
...options,
|
|
153
149
|
exitOnCtrlC: false
|
|
154
150
|
}
|
|
155
151
|
);
|
|
156
|
-
instanceRef.current = instance;
|
|
157
152
|
return instance;
|
|
158
153
|
}
|
|
159
154
|
var GOODBYE_RENDER_DELAY_MS, ScreenTransitionClearContext;
|
|
@@ -1250,6 +1245,17 @@ function initDebugLogger(opts) {
|
|
|
1250
1245
|
function getDebugLogger() {
|
|
1251
1246
|
return singleton ?? new NoopDebugLogger();
|
|
1252
1247
|
}
|
|
1248
|
+
function resolveDebugMode(opts, configDebug) {
|
|
1249
|
+
if (opts.debug !== void 0) return opts.debug;
|
|
1250
|
+
const env = process.env["EDSI_DEBUG"];
|
|
1251
|
+
if (env !== void 0 && env !== "") {
|
|
1252
|
+
const value = env.toLowerCase();
|
|
1253
|
+
if (value === "1" || value === "true" || value === "yes" || value === "on") return true;
|
|
1254
|
+
if (value === "0" || value === "false" || value === "no" || value === "off") return false;
|
|
1255
|
+
}
|
|
1256
|
+
if (configDebug !== void 0) return configDebug;
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1253
1259
|
function printDebugBanner(logger, phase) {
|
|
1254
1260
|
if (!logger.enabled || !logger.path) return;
|
|
1255
1261
|
const prefix = phase === "start" ? "\x1B[92m[debug]\x1B[0m " : "\x1B[92m[debug]\x1B[0m ";
|
|
@@ -4934,6 +4940,11 @@ function createCachedComponentResult(componentName, warnings = []) {
|
|
|
4934
4940
|
renamedSlotsCount: 0
|
|
4935
4941
|
};
|
|
4936
4942
|
}
|
|
4943
|
+
function writeCachedComponentStatus(position, componentName, pinned) {
|
|
4944
|
+
const status = pinned ? c.cyan("pinned (human-edited)") : c.green("cached");
|
|
4945
|
+
process.stderr.write(` ${position} ${c.bold(componentName)} ${status}
|
|
4946
|
+
`);
|
|
4947
|
+
}
|
|
4937
4948
|
async function showGenerateView(result) {
|
|
4938
4949
|
if (process.stdout.isTTY) {
|
|
4939
4950
|
const { waitUntilExit } = renderWithGoodbye(
|
|
@@ -4954,11 +4965,6 @@ session=${result.sessionId}
|
|
|
4954
4965
|
);
|
|
4955
4966
|
await exitWithAnalytics(0);
|
|
4956
4967
|
}
|
|
4957
|
-
function writeCachedComponentStatus(position, componentName, pinned) {
|
|
4958
|
-
const status = pinned ? c.cyan("pinned (human-edited)") : c.green("cached");
|
|
4959
|
-
process.stderr.write(` ${position} ${c.bold(componentName)} ${status}
|
|
4960
|
-
`);
|
|
4961
|
-
}
|
|
4962
4968
|
function normalizeComponentForCache(component) {
|
|
4963
4969
|
const slots = component.slots.map((slot, index, allSlots) => ({
|
|
4964
4970
|
...slot,
|
|
@@ -5051,7 +5057,7 @@ async function runOneComponent(options, component, index, total) {
|
|
|
5051
5057
|
allowedComponentNames: allowedComponentNames2
|
|
5052
5058
|
});
|
|
5053
5059
|
writeCachedComponentStatus(pos, component.name, true);
|
|
5054
|
-
return createCachedComponentResult(component.name
|
|
5060
|
+
return createCachedComponentResult(`${component.name}`, [
|
|
5055
5061
|
`${component.name}: source changed but human edits preserved`
|
|
5056
5062
|
]);
|
|
5057
5063
|
}
|
|
@@ -19969,29 +19975,14 @@ var init_LegendEntry = __esm({
|
|
|
19969
19975
|
// packages/experience-design-system-cli/src/import/tui/components/CompactControlBar.tsx
|
|
19970
19976
|
import { Box as Box26 } from "ink";
|
|
19971
19977
|
import { jsxs as jsxs27 } from "react/jsx-runtime";
|
|
19972
|
-
function CompactControlBar({
|
|
19973
|
-
hasGroupRoots,
|
|
19974
|
-
searchActive,
|
|
19975
|
-
showJson = false,
|
|
19976
|
-
tokenReviewAvailable = false
|
|
19977
|
-
}) {
|
|
19978
|
+
function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
19978
19979
|
return /* @__PURE__ */ jsxs27(Box26, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
|
|
19979
19980
|
legendEntry("[\u2191/\u2193]", "move"),
|
|
19980
19981
|
legendEntry("[a/r]", "accept/reject"),
|
|
19981
|
-
legendEntry("[A]", "accept all"),
|
|
19982
19982
|
hasGroupRoots && legendEntry("[space/E/C]", "expand/collapse"),
|
|
19983
|
-
legendEntry("[L]", "flat"),
|
|
19984
|
-
legendEntry("[i]", "focus lineage"),
|
|
19985
|
-
legendEntry("[w]", "only breaking"),
|
|
19986
|
-
legendEntry("[o]", "only cycles"),
|
|
19987
|
-
legendEntry("[c]", "cycle list"),
|
|
19988
|
-
legendEntry("[b]", "breaking changes"),
|
|
19989
19983
|
legendEntry("[/]", "search", searchActive),
|
|
19990
19984
|
legendEntry("[f]", "continue/finalize"),
|
|
19991
19985
|
legendEntry("[h]", "help"),
|
|
19992
|
-
legendEntry("[J]", showJson ? "hide JSON" : "show JSON"),
|
|
19993
|
-
tokenReviewAvailable && legendEntry("[t]", "token review"),
|
|
19994
|
-
legendEntry("[Ctrl+Z/Y/R]", "undo/redo/reload"),
|
|
19995
19986
|
legendEntry("[q]", "quit")
|
|
19996
19987
|
] });
|
|
19997
19988
|
}
|
|
@@ -26673,15 +26664,7 @@ function GenerateReviewStepView({
|
|
|
26673
26664
|
hidden: dialogOpen
|
|
26674
26665
|
}
|
|
26675
26666
|
),
|
|
26676
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx49(
|
|
26677
|
-
CompactControlBar,
|
|
26678
|
-
{
|
|
26679
|
-
hasGroupRoots,
|
|
26680
|
-
searchActive: searchOpen || searchQuery.length > 0,
|
|
26681
|
-
showJson: reviewEditor.showJson,
|
|
26682
|
-
tokenReviewAvailable: reviewEditor.currentTokenSuggestions().length > 0
|
|
26683
|
-
}
|
|
26684
|
-
)
|
|
26667
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx49(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
26685
26668
|
] });
|
|
26686
26669
|
}
|
|
26687
26670
|
var HELP_SECTIONS2;
|
|
@@ -31501,7 +31484,7 @@ function registerInternalExtractCommand(program) {
|
|
|
31501
31484
|
if (allFilesCached) {
|
|
31502
31485
|
const cachedComponents = sourceFiles.flatMap((filePath) => cachedByPath.get(filePath).components);
|
|
31503
31486
|
extractionCacheHits = sourceFiles.length;
|
|
31504
|
-
extraction = { components: cachedComponents, warnings: [] };
|
|
31487
|
+
extraction = { components: cachedComponents, warnings: [], exclusions: [] };
|
|
31505
31488
|
if (!process.stdout.isTTY) {
|
|
31506
31489
|
process.stderr.write(
|
|
31507
31490
|
`progress=extract:${sourceFiles.length}/${sourceFiles.length}:${cachedComponents.length}
|
|
@@ -31721,7 +31704,7 @@ function registerInternalExtractCommand(program) {
|
|
|
31721
31704
|
validatedComponents = result.components;
|
|
31722
31705
|
}
|
|
31723
31706
|
}
|
|
31724
|
-
await retryDatabaseWrite(() => storeRawComponents(db, sessionId2, validatedComponents));
|
|
31707
|
+
await retryDatabaseWrite(() => storeRawComponents(db, sessionId2, validatedComponents, { preserveStatus: true }));
|
|
31725
31708
|
const cycleInput = validatedComponents.map((c2) => ({
|
|
31726
31709
|
name: c2.name,
|
|
31727
31710
|
slots: c2.slots.map((s) => ({ name: s.name, allowedComponents: s.allowedComponents }))
|
|
@@ -31828,14 +31811,14 @@ var init_extract_command = __esm({
|
|
|
31828
31811
|
});
|
|
31829
31812
|
|
|
31830
31813
|
// packages/experience-design-system-cli/src/lib/debug-preamble.ts
|
|
31831
|
-
async function beginCommand(command) {
|
|
31814
|
+
async function beginCommand(command, opts) {
|
|
31832
31815
|
let configDebug;
|
|
31833
31816
|
try {
|
|
31834
31817
|
const creds = await readExperiencesCredentials();
|
|
31835
31818
|
configDebug = creds.debug;
|
|
31836
31819
|
} catch {
|
|
31837
31820
|
}
|
|
31838
|
-
const enabled = configDebug
|
|
31821
|
+
const enabled = resolveDebugMode(opts, configDebug);
|
|
31839
31822
|
const logger = initDebugLogger({ enabled, command });
|
|
31840
31823
|
if (logger.enabled) {
|
|
31841
31824
|
printDebugBanner(logger, "start");
|
|
@@ -31951,7 +31934,7 @@ function createProgram() {
|
|
|
31951
31934
|
const { analyticsDisabled } = await readExperiencesCredentials();
|
|
31952
31935
|
setPersistedAnalyticsDisabled(analyticsDisabled ?? false);
|
|
31953
31936
|
noteCommandStart(commandChain);
|
|
31954
|
-
await beginCommand(commandChain);
|
|
31937
|
+
await beginCommand(commandChain, {});
|
|
31955
31938
|
});
|
|
31956
31939
|
program.hook("postAction", async () => {
|
|
31957
31940
|
await completeActiveCommand();
|
|
@@ -25,6 +25,10 @@ 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
|
+
/** Resolve debug mode from an explicit option, environment, or saved settings. */
|
|
29
|
+
export declare function resolveDebugMode(opts: {
|
|
30
|
+
debug?: boolean;
|
|
31
|
+
}, configDebug?: boolean): boolean;
|
|
28
32
|
/**
|
|
29
33
|
* Emit the bright-green "debug logs at <path>" banner to stderr.
|
|
30
34
|
* No-op when debug is disabled or stderr is not a TTY-friendly stream.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DebugLogger } from './debug-logger.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Debug mode can only be configured via setup preferences;
|
|
3
|
+
* Resolve and initialize the debug logger before a top-level command runs.
|
|
5
4
|
*/
|
|
6
|
-
export declare function beginCommand(command: string
|
|
5
|
+
export declare function beginCommand(command: string, opts: {
|
|
6
|
+
debug?: boolean;
|
|
7
|
+
}): Promise<DebugLogger>;
|
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-ec126bf0.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-ec126bf0.0",
|
|
45
|
+
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-ec126bf0.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-extraction": "2.34.5-dev-build-
|
|
58
|
-
"@contentful/experience-design-system-
|
|
59
|
-
"@contentful/experience-design-system-
|
|
57
|
+
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-ec126bf0.0",
|
|
58
|
+
"@contentful/experience-design-system-generation": "2.34.5-dev-build-ec126bf0.0",
|
|
59
|
+
"@contentful/experience-design-system-client": "2.34.5-dev-build-ec126bf0.0"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|