@contentful/experience-design-system-cli 2.34.5-dev-build-7ebabd5d.0 → 2.34.5-dev-build-131193c7.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 +1 -1
- package/dist/src/import/tui/steps/WizardPreviewStep.d.ts +1 -2
- package/dist/src/import/tui/wizard-state-transitions.d.ts +1 -9
- package/dist/src/index.js +74 -75
- package/package.json +6 -6
- package/dist/src/import/tui/push-decision-gate-helpers.d.ts +0 -8
- package/dist/src/import/tui/steps/PushDecisionGateStep.d.ts +0 -12
- package/dist/src/runs/save-conflict.d.ts +0 -8
package/dist/package.json
CHANGED
|
@@ -15,8 +15,7 @@ type WizardPreviewStepProps = {
|
|
|
15
15
|
totalSteps: number;
|
|
16
16
|
onConfirm: (acknowledge: boolean) => void;
|
|
17
17
|
onEdit?: () => void;
|
|
18
|
-
onSaveFiles?: () => void;
|
|
19
18
|
onQuit: () => void;
|
|
20
19
|
};
|
|
21
|
-
export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onEdit,
|
|
20
|
+
export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
|
|
22
21
|
export {};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export type WizardStepAfterScope = 'generating' | 'push-decision-gate';
|
|
2
|
-
export type WizardStepAfterCredentials = 'generating' | 'push-decision-gate';
|
|
3
|
-
export declare function nextStepAfterScopeGate(opts: {
|
|
4
|
-
acceptedCount: number;
|
|
5
|
-
}): WizardStepAfterScope;
|
|
6
|
-
export declare function nextStepAfterCredentialsValidated(opts: {
|
|
7
|
-
acceptedCount: number;
|
|
8
|
-
}): WizardStepAfterCredentials;
|
|
9
1
|
export declare function shouldGenerateAfterScopeGate(opts: {
|
|
10
2
|
acceptedCount: number;
|
|
11
3
|
}): boolean;
|
|
@@ -23,7 +15,7 @@ export declare function shouldBypassPreview(state: {
|
|
|
23
15
|
credentialsSkipped: boolean;
|
|
24
16
|
}): boolean;
|
|
25
17
|
export declare function buildSkippedPreviewTransition(): {
|
|
26
|
-
step: '
|
|
18
|
+
step: 'done';
|
|
27
19
|
serverPreview: null;
|
|
28
20
|
};
|
|
29
21
|
export type CycleGateAction = 'block' | 'proceed';
|
package/dist/src/index.js
CHANGED
|
@@ -112,26 +112,29 @@ __export(render_with_goodbye_exports, {
|
|
|
112
112
|
GoodbyeBoundary: () => GoodbyeBoundary,
|
|
113
113
|
renderWithGoodbye: () => renderWithGoodbye
|
|
114
114
|
});
|
|
115
|
-
import { useEffect, useRef, useState } from "react";
|
|
116
|
-
import { render, Text } from "ink";
|
|
115
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
116
|
+
import { render, Text, useInput } from "ink";
|
|
117
117
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
118
118
|
function GoodbyeBoundary({ children }) {
|
|
119
119
|
const [isExiting, setIsExiting] = useState(false);
|
|
120
120
|
const isExitingRef = useRef(false);
|
|
121
|
+
const exitTimerRef = useRef(void 0);
|
|
122
|
+
const requestExit = useCallback(() => {
|
|
123
|
+
if (isExitingRef.current) return;
|
|
124
|
+
isExitingRef.current = true;
|
|
125
|
+
setIsExiting(true);
|
|
126
|
+
exitTimerRef.current = setTimeout(() => process.exit(0), GOODBYE_RENDER_DELAY_MS);
|
|
127
|
+
}, []);
|
|
128
|
+
useInput((input, key) => {
|
|
129
|
+
if (key.ctrl && input === "c") requestExit();
|
|
130
|
+
});
|
|
121
131
|
useEffect(() => {
|
|
122
|
-
|
|
123
|
-
const handleSigint = () => {
|
|
124
|
-
if (isExitingRef.current) return;
|
|
125
|
-
isExitingRef.current = true;
|
|
126
|
-
setIsExiting(true);
|
|
127
|
-
exitTimer = setTimeout(() => process.exit(0), GOODBYE_RENDER_DELAY_MS);
|
|
128
|
-
};
|
|
129
|
-
process.on("SIGINT", handleSigint);
|
|
132
|
+
process.on("SIGINT", requestExit);
|
|
130
133
|
return () => {
|
|
131
|
-
process.off("SIGINT",
|
|
132
|
-
if (
|
|
134
|
+
process.off("SIGINT", requestExit);
|
|
135
|
+
if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
|
|
133
136
|
};
|
|
134
|
-
}, []);
|
|
137
|
+
}, [requestExit]);
|
|
135
138
|
return isExiting ? /* @__PURE__ */ jsx(Text, { children: "Goodbye!" }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
136
139
|
}
|
|
137
140
|
function renderWithGoodbye(element, options) {
|
|
@@ -7145,7 +7148,7 @@ var init_contentful_urls = __esm({
|
|
|
7145
7148
|
});
|
|
7146
7149
|
|
|
7147
7150
|
// packages/experience-design-system-cli/src/apply/tui/ServerApplyView.tsx
|
|
7148
|
-
import { Box as Box3, Text as Text4, useInput } from "ink";
|
|
7151
|
+
import { Box as Box3, Text as Text4, useInput as useInput2 } from "ink";
|
|
7149
7152
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
7150
7153
|
function ServerPreviewConfirm({
|
|
7151
7154
|
preview,
|
|
@@ -7155,7 +7158,7 @@ function ServerPreviewConfirm({
|
|
|
7155
7158
|
onConfirm,
|
|
7156
7159
|
onCancel
|
|
7157
7160
|
}) {
|
|
7158
|
-
|
|
7161
|
+
useInput2((input, key) => {
|
|
7159
7162
|
if (key.return) onConfirm(breakingWithImpact);
|
|
7160
7163
|
else if (key.escape || input === "q") onCancel();
|
|
7161
7164
|
});
|
|
@@ -7184,7 +7187,7 @@ function ServerApplyProgress({
|
|
|
7184
7187
|
operationId,
|
|
7185
7188
|
error
|
|
7186
7189
|
}) {
|
|
7187
|
-
|
|
7190
|
+
useInput2((_input, key) => {
|
|
7188
7191
|
if (status === "error" && (key.escape || _input === "q")) process.exit(1);
|
|
7189
7192
|
});
|
|
7190
7193
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
@@ -7212,7 +7215,7 @@ function ServerApplyProgress({
|
|
|
7212
7215
|
] });
|
|
7213
7216
|
}
|
|
7214
7217
|
function ServerApplyDone({ operation, spaceId, environmentId, host }) {
|
|
7215
|
-
|
|
7218
|
+
useInput2((input, key) => {
|
|
7216
7219
|
if (key.escape || input === "q") {
|
|
7217
7220
|
process.exit(operation.sys.status === "succeeded" ? 0 : 1);
|
|
7218
7221
|
}
|
|
@@ -7326,7 +7329,6 @@ var init_terminal_capabilities = __esm({
|
|
|
7326
7329
|
|
|
7327
7330
|
// packages/experience-design-system-cli/src/apply/command.ts
|
|
7328
7331
|
import { createElement as createElement2 } from "react";
|
|
7329
|
-
import { render as render2 } from "ink";
|
|
7330
7332
|
import { readFile as readFile9, readdir as readdir2, stat as stat2 } from "node:fs/promises";
|
|
7331
7333
|
import { join as join8 } from "node:path";
|
|
7332
7334
|
import {
|
|
@@ -7730,11 +7732,11 @@ function registerApplyCommand(program) {
|
|
|
7730
7732
|
environmentId,
|
|
7731
7733
|
host,
|
|
7732
7734
|
acknowledgeBreakingChanges: acknowledge,
|
|
7733
|
-
rerender: (element) => instance.rerender(element),
|
|
7735
|
+
rerender: (element) => instance.rerender(createElement2(GoodbyeBoundary, null, element)),
|
|
7734
7736
|
onDone: resolvePromise
|
|
7735
7737
|
});
|
|
7736
7738
|
};
|
|
7737
|
-
const instance =
|
|
7739
|
+
const instance = renderWithGoodbye(
|
|
7738
7740
|
createElement2(ServerPreviewConfirm, {
|
|
7739
7741
|
preview,
|
|
7740
7742
|
spaceId,
|
|
@@ -7756,6 +7758,7 @@ var IGNORE_TOKEN_DIRS;
|
|
|
7756
7758
|
var init_command2 = __esm({
|
|
7757
7759
|
"packages/experience-design-system-cli/src/apply/command.ts"() {
|
|
7758
7760
|
"use strict";
|
|
7761
|
+
init_render_with_goodbye();
|
|
7759
7762
|
init_api_client();
|
|
7760
7763
|
init_error_parser();
|
|
7761
7764
|
init_cycle_detection();
|
|
@@ -9424,7 +9427,7 @@ function PathValidationStep({
|
|
|
9424
9427
|
onChangePath,
|
|
9425
9428
|
onQuit
|
|
9426
9429
|
}) {
|
|
9427
|
-
const [counts, setCounts] = useState6(null);
|
|
9430
|
+
const [counts, setCounts] = useState6(() => fileCountsCache.get(projectPath) ?? null);
|
|
9428
9431
|
const [error, setError] = useState6(null);
|
|
9429
9432
|
useEffect3(() => {
|
|
9430
9433
|
void (async () => {
|
|
@@ -9445,6 +9448,7 @@ Example: ~/projects/my-design-system`
|
|
|
9445
9448
|
return;
|
|
9446
9449
|
}
|
|
9447
9450
|
const result = await countFiles(projectPath);
|
|
9451
|
+
fileCountsCache.set(projectPath, result);
|
|
9448
9452
|
setCounts(result);
|
|
9449
9453
|
} catch (e) {
|
|
9450
9454
|
const code = e.code;
|
|
@@ -9584,12 +9588,13 @@ You don't have read access to this directory.`);
|
|
|
9584
9588
|
] })
|
|
9585
9589
|
] });
|
|
9586
9590
|
}
|
|
9587
|
-
var IGNORE_DIRS;
|
|
9591
|
+
var fileCountsCache, IGNORE_DIRS;
|
|
9588
9592
|
var init_PathValidationStep = __esm({
|
|
9589
9593
|
"packages/experience-design-system-cli/src/import/tui/steps/PathValidationStep.tsx"() {
|
|
9590
9594
|
"use strict";
|
|
9591
9595
|
init_theme();
|
|
9592
9596
|
init_useImmediateInput();
|
|
9597
|
+
fileCountsCache = /* @__PURE__ */ new Map();
|
|
9593
9598
|
IGNORE_DIRS = /* @__PURE__ */ new Set([
|
|
9594
9599
|
"node_modules",
|
|
9595
9600
|
"dist",
|
|
@@ -9962,6 +9967,34 @@ var init_CredentialsStep = __esm({
|
|
|
9962
9967
|
}
|
|
9963
9968
|
});
|
|
9964
9969
|
|
|
9970
|
+
// packages/experience-design-system-cli/src/tui/use-terminal-size.ts
|
|
9971
|
+
import { useStdout } from "ink";
|
|
9972
|
+
import { useEffect as useEffect5, useState as useState9 } from "react";
|
|
9973
|
+
function readTerminalSize(stdout) {
|
|
9974
|
+
return {
|
|
9975
|
+
columns: stdout?.columns ?? 80,
|
|
9976
|
+
rows: stdout?.rows ?? process.stdout.rows ?? 40
|
|
9977
|
+
};
|
|
9978
|
+
}
|
|
9979
|
+
function useTerminalSize() {
|
|
9980
|
+
const { stdout } = useStdout();
|
|
9981
|
+
const [size, setSize] = useState9(() => readTerminalSize(stdout));
|
|
9982
|
+
useEffect5(() => {
|
|
9983
|
+
const updateSize = () => setSize(readTerminalSize(stdout));
|
|
9984
|
+
stdout?.on("resize", updateSize);
|
|
9985
|
+
updateSize();
|
|
9986
|
+
return () => {
|
|
9987
|
+
stdout?.off("resize", updateSize);
|
|
9988
|
+
};
|
|
9989
|
+
}, [stdout]);
|
|
9990
|
+
return size;
|
|
9991
|
+
}
|
|
9992
|
+
var init_use_terminal_size = __esm({
|
|
9993
|
+
"packages/experience-design-system-cli/src/tui/use-terminal-size.ts"() {
|
|
9994
|
+
"use strict";
|
|
9995
|
+
}
|
|
9996
|
+
});
|
|
9997
|
+
|
|
9965
9998
|
// packages/experience-design-system-cli/src/apply/tokens.ts
|
|
9966
9999
|
var init_tokens = __esm({
|
|
9967
10000
|
"packages/experience-design-system-cli/src/apply/tokens.ts"() {
|
|
@@ -10146,7 +10179,7 @@ var init_SpaceEnvironment = __esm({
|
|
|
10146
10179
|
});
|
|
10147
10180
|
|
|
10148
10181
|
// packages/experience-design-system-cli/src/import/tui/preview-confirmation-input.ts
|
|
10149
|
-
import { useCallback } from "react";
|
|
10182
|
+
import { useCallback as useCallback2 } from "react";
|
|
10150
10183
|
function handlePreviewConfirmationInput(_input, key, options) {
|
|
10151
10184
|
if (key.return) {
|
|
10152
10185
|
options.onConfirm(options.breakingWithImpact);
|
|
@@ -10155,7 +10188,7 @@ function handlePreviewConfirmationInput(_input, key, options) {
|
|
|
10155
10188
|
return false;
|
|
10156
10189
|
}
|
|
10157
10190
|
function usePreviewConfirmationInput(breakingWithImpact, onConfirm) {
|
|
10158
|
-
return
|
|
10191
|
+
return useCallback2(
|
|
10159
10192
|
(input, key) => handlePreviewConfirmationInput(input, key, {
|
|
10160
10193
|
breakingWithImpact,
|
|
10161
10194
|
onConfirm
|
|
@@ -10169,34 +10202,6 @@ var init_preview_confirmation_input = __esm({
|
|
|
10169
10202
|
}
|
|
10170
10203
|
});
|
|
10171
10204
|
|
|
10172
|
-
// packages/experience-design-system-cli/src/tui/use-terminal-size.ts
|
|
10173
|
-
import { useStdout } from "ink";
|
|
10174
|
-
import { useEffect as useEffect5, useState as useState9 } from "react";
|
|
10175
|
-
function readTerminalSize(stdout) {
|
|
10176
|
-
return {
|
|
10177
|
-
columns: stdout?.columns ?? 80,
|
|
10178
|
-
rows: stdout?.rows ?? process.stdout.rows ?? 40
|
|
10179
|
-
};
|
|
10180
|
-
}
|
|
10181
|
-
function useTerminalSize() {
|
|
10182
|
-
const { stdout } = useStdout();
|
|
10183
|
-
const [size, setSize] = useState9(() => readTerminalSize(stdout));
|
|
10184
|
-
useEffect5(() => {
|
|
10185
|
-
const updateSize = () => setSize(readTerminalSize(stdout));
|
|
10186
|
-
stdout?.on("resize", updateSize);
|
|
10187
|
-
updateSize();
|
|
10188
|
-
return () => {
|
|
10189
|
-
stdout?.off("resize", updateSize);
|
|
10190
|
-
};
|
|
10191
|
-
}, [stdout]);
|
|
10192
|
-
return size;
|
|
10193
|
-
}
|
|
10194
|
-
var init_use_terminal_size = __esm({
|
|
10195
|
-
"packages/experience-design-system-cli/src/tui/use-terminal-size.ts"() {
|
|
10196
|
-
"use strict";
|
|
10197
|
-
}
|
|
10198
|
-
});
|
|
10199
|
-
|
|
10200
10205
|
// packages/experience-design-system-cli/src/tui/windowed-panel.tsx
|
|
10201
10206
|
import { Box as Box15, Text as Text16 } from "ink";
|
|
10202
10207
|
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
@@ -10466,7 +10471,6 @@ function WizardPreviewStep({
|
|
|
10466
10471
|
totalSteps,
|
|
10467
10472
|
onConfirm,
|
|
10468
10473
|
onEdit,
|
|
10469
|
-
onSaveFiles,
|
|
10470
10474
|
onQuit
|
|
10471
10475
|
}) {
|
|
10472
10476
|
const breakingWithImpact = hasBreakingChangesWithImpact(preview);
|
|
@@ -10525,10 +10529,6 @@ function WizardPreviewStep({
|
|
|
10525
10529
|
onEdit();
|
|
10526
10530
|
return;
|
|
10527
10531
|
}
|
|
10528
|
-
if (input === "s" && onSaveFiles) {
|
|
10529
|
-
onSaveFiles();
|
|
10530
|
-
return;
|
|
10531
|
-
}
|
|
10532
10532
|
if (input === "q" || key.escape) {
|
|
10533
10533
|
onQuit();
|
|
10534
10534
|
return;
|
|
@@ -10570,9 +10570,8 @@ function WizardPreviewStep({
|
|
|
10570
10570
|
diffExpanded ? "Hide" : "Show",
|
|
10571
10571
|
" diff"
|
|
10572
10572
|
] }),
|
|
10573
|
-
|
|
10573
|
+
diffExpanded && /* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
10574
10574
|
onEdit && /* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "[e] Edit definitions" }),
|
|
10575
|
-
onSaveFiles && /* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "[s] Save files instead" }),
|
|
10576
10575
|
/* @__PURE__ */ jsx19(Text17, { dimColor: true, children: "[q] Cancel" })
|
|
10577
10576
|
] })
|
|
10578
10577
|
] });
|
|
@@ -10582,12 +10581,12 @@ var init_WizardPreviewStep = __esm({
|
|
|
10582
10581
|
"use strict";
|
|
10583
10582
|
init_theme();
|
|
10584
10583
|
init_useImmediateInput();
|
|
10584
|
+
init_use_terminal_size();
|
|
10585
10585
|
init_tokens();
|
|
10586
10586
|
init_preview_diff();
|
|
10587
10587
|
init_StepHeader();
|
|
10588
10588
|
init_SpaceEnvironment();
|
|
10589
10589
|
init_preview_confirmation_input();
|
|
10590
|
-
init_use_terminal_size();
|
|
10591
10590
|
init_windowed_panel();
|
|
10592
10591
|
}
|
|
10593
10592
|
});
|
|
@@ -19521,20 +19520,20 @@ var init_SearchMatchSummary = __esm({
|
|
|
19521
19520
|
});
|
|
19522
19521
|
|
|
19523
19522
|
// packages/experience-design-system-cli/src/import/tui/hooks/useOverlayPanel.ts
|
|
19524
|
-
import { useCallback as
|
|
19523
|
+
import { useCallback as useCallback3, useState as useState13 } from "react";
|
|
19525
19524
|
function useOverlayPanel(opts) {
|
|
19526
19525
|
const { toggleKey, onClose } = opts;
|
|
19527
19526
|
const [isOpen, setIsOpen] = useState13(false);
|
|
19528
|
-
const open =
|
|
19527
|
+
const open = useCallback3(() => {
|
|
19529
19528
|
setIsOpen(true);
|
|
19530
19529
|
}, []);
|
|
19531
|
-
const close =
|
|
19530
|
+
const close = useCallback3(() => {
|
|
19532
19531
|
setIsOpen((prev) => {
|
|
19533
19532
|
if (prev && onClose) onClose();
|
|
19534
19533
|
return false;
|
|
19535
19534
|
});
|
|
19536
19535
|
}, [onClose]);
|
|
19537
|
-
const handleInput =
|
|
19536
|
+
const handleInput = useCallback3(
|
|
19538
19537
|
(input, key) => {
|
|
19539
19538
|
if (!isOpen) return false;
|
|
19540
19539
|
if (input === toggleKey || key.escape === true) {
|
|
@@ -24258,7 +24257,7 @@ var init_useFinalizePreview = __esm({
|
|
|
24258
24257
|
});
|
|
24259
24258
|
|
|
24260
24259
|
// packages/experience-design-system-cli/src/import/tui/hooks/useReviewSession.ts
|
|
24261
|
-
import { useCallback as
|
|
24260
|
+
import { useCallback as useCallback4, useEffect as useEffect10, useRef as useRef6, useState as useState17 } from "react";
|
|
24262
24261
|
function loadReviewSessionState({
|
|
24263
24262
|
extractSessionId,
|
|
24264
24263
|
tokenSessionId,
|
|
@@ -24308,7 +24307,7 @@ function useReviewSession({
|
|
|
24308
24307
|
const [loading, setLoading] = useState17(true);
|
|
24309
24308
|
const [loadError, setLoadError] = useState17(null);
|
|
24310
24309
|
const [availableTokens, setAvailableTokens] = useState17([]);
|
|
24311
|
-
const loadInitialState =
|
|
24310
|
+
const loadInitialState = useCallback4(async () => {
|
|
24312
24311
|
const result = loadSession();
|
|
24313
24312
|
if (result.error || !tokensPath) return { result, catalog: result.tokens };
|
|
24314
24313
|
const catalog = (await readTokensFromPath("tokens", tokensPath)).map((token) => ({
|
|
@@ -25009,7 +25008,7 @@ var init_preview_annotations = __esm({
|
|
|
25009
25008
|
});
|
|
25010
25009
|
|
|
25011
25010
|
// packages/experience-design-system-cli/src/import/tui/useLivePreview.ts
|
|
25012
|
-
import { useCallback as
|
|
25011
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useRef as useRef8, useState as useState20 } from "react";
|
|
25013
25012
|
function useLivePreview(opts) {
|
|
25014
25013
|
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
25015
25014
|
const [status, setStatus] = useState20("idle");
|
|
@@ -25034,7 +25033,7 @@ function useLivePreview(opts) {
|
|
|
25034
25033
|
}
|
|
25035
25034
|
};
|
|
25036
25035
|
}, []);
|
|
25037
|
-
const trigger =
|
|
25036
|
+
const trigger = useCallback5(() => {
|
|
25038
25037
|
const current = optsRef.current;
|
|
25039
25038
|
if (!current.enabled) return;
|
|
25040
25039
|
if (disabledRef.current) return;
|
|
@@ -25107,7 +25106,7 @@ var init_useLivePreview = __esm({
|
|
|
25107
25106
|
});
|
|
25108
25107
|
|
|
25109
25108
|
// packages/experience-design-system-cli/src/import/tui/hooks/useReviewPreview.ts
|
|
25110
|
-
import { useCallback as
|
|
25109
|
+
import { useCallback as useCallback6, useEffect as useEffect13, useState as useState21 } from "react";
|
|
25111
25110
|
function useReviewPreview({
|
|
25112
25111
|
components,
|
|
25113
25112
|
loading,
|
|
@@ -25123,7 +25122,7 @@ function useReviewPreview({
|
|
|
25123
25122
|
}) {
|
|
25124
25123
|
const [previewAnnotations, setPreviewAnnotations] = useState21(/* @__PURE__ */ new Map());
|
|
25125
25124
|
const [removedComponents, setRemovedComponents] = useState21([]);
|
|
25126
|
-
const handleResult =
|
|
25125
|
+
const handleResult = useCallback6(
|
|
25127
25126
|
(response) => {
|
|
25128
25127
|
if (!response) return;
|
|
25129
25128
|
setPreviewAnnotations(
|
|
@@ -25212,7 +25211,7 @@ var init_LivePreviewSummary = __esm({
|
|
|
25212
25211
|
});
|
|
25213
25212
|
|
|
25214
25213
|
// packages/experience-design-system-cli/src/import/tui/steps/GenerateReviewStep.tsx
|
|
25215
|
-
import { useCallback as
|
|
25214
|
+
import { useCallback as useCallback7, useEffect as useEffect14, useMemo as useMemo3, useRef as useRef9, useState as useState22 } from "react";
|
|
25216
25215
|
import figures6 from "figures";
|
|
25217
25216
|
import { Box as Box41, Text as Text45 } from "ink";
|
|
25218
25217
|
import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
@@ -25378,10 +25377,10 @@ function GenerateReviewStepView({
|
|
|
25378
25377
|
}) {
|
|
25379
25378
|
const { columns: terminalWidth, rows: terminalRows } = useTerminalSize();
|
|
25380
25379
|
const [slotCycles, setSlotCycles] = useState22([]);
|
|
25381
|
-
const setLoadedSlotCycles =
|
|
25380
|
+
const setLoadedSlotCycles = useCallback7((cycles) => {
|
|
25382
25381
|
setSlotCycles(cycles ?? []);
|
|
25383
25382
|
}, []);
|
|
25384
|
-
const loadSessionState =
|
|
25383
|
+
const loadSessionState = useCallback7(
|
|
25385
25384
|
() => loadReviewSessionState({
|
|
25386
25385
|
extractSessionId,
|
|
25387
25386
|
tokenSessionId,
|
|
@@ -26003,7 +26002,7 @@ function GenerateReviewStepView({
|
|
|
26003
26002
|
}
|
|
26004
26003
|
return;
|
|
26005
26004
|
}
|
|
26006
|
-
if (input === "c" && cycleRows.length > 0) {
|
|
26005
|
+
if (input === "c" && !key.ctrl && !key.meta && cycleRows.length > 0) {
|
|
26007
26006
|
cyclePanel.open();
|
|
26008
26007
|
setCyclePanelScroll(0);
|
|
26009
26008
|
setCyclesCursor(0);
|
|
@@ -26703,7 +26702,7 @@ function shouldBypassPreview(state) {
|
|
|
26703
26702
|
return state.credentialsSkipped === true;
|
|
26704
26703
|
}
|
|
26705
26704
|
function buildSkippedPreviewTransition() {
|
|
26706
|
-
return { step: "
|
|
26705
|
+
return { step: "done", serverPreview: null };
|
|
26707
26706
|
}
|
|
26708
26707
|
function resolveCycleGateAction(opts) {
|
|
26709
26708
|
if (!opts.hasCycles) return "proceed";
|
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-131193c7.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-cli-v2": "2.34.5-dev-build-
|
|
45
|
-
"@contentful/experience-design-system-types": "2.34.5-dev-build-
|
|
44
|
+
"@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-131193c7.0",
|
|
45
|
+
"@contentful/experience-design-system-types": "2.34.5-dev-build-131193c7.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-
|
|
58
|
-
"@contentful/experience-design-system-
|
|
59
|
-
"@contentful/experience-design-system-
|
|
57
|
+
"@contentful/experience-design-system-extraction": "2.34.5-dev-build-131193c7.0",
|
|
58
|
+
"@contentful/experience-design-system-generation": "2.34.5-dev-build-131193c7.0",
|
|
59
|
+
"@contentful/experience-design-system-client": "2.34.5-dev-build-131193c7.0"
|
|
60
60
|
},
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PushDecisionChoice } from './steps/PushDecisionGateStep.js';
|
|
2
|
-
export type GateAction = 'save-and-push' | 'push-only' | 'save-only';
|
|
3
|
-
/**
|
|
4
|
-
* Maps a `PushDecisionGateStep` choice to the wizard action it triggers.
|
|
5
|
-
* Centralizing this keeps the gate component free of wizard-side semantics
|
|
6
|
-
* and gives us a unit-testable seam between UI choice and side-effect.
|
|
7
|
-
*/
|
|
8
|
-
export declare function chooseGateAction(choice: PushDecisionChoice): GateAction;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type PushDecisionChoice = 'both' | 'push-only' | 'save-only';
|
|
3
|
-
type PushDecisionGateStepProps = {
|
|
4
|
-
summary: string;
|
|
5
|
-
context: string;
|
|
6
|
-
fileList: string;
|
|
7
|
-
onChoice: (choice: PushDecisionChoice) => void;
|
|
8
|
-
onQuit: () => void;
|
|
9
|
-
pushDisabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare function PushDecisionGateStep({ summary, context, onChoice, onQuit, pushDisabled, }: PushDecisionGateStepProps): React.ReactElement;
|
|
12
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type SaveConflictGateProps = {
|
|
3
|
-
path: string;
|
|
4
|
-
onOverwrite: () => void;
|
|
5
|
-
onNew: () => void;
|
|
6
|
-
onCancel: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function SaveConflictGate({ path, onOverwrite, onNew, onCancel }: SaveConflictGateProps): React.ReactElement;
|