@contentful/experience-design-system-cli 2.34.5-dev-build-131193c7.0 → 2.34.5-dev-build-f6f44159.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-131193c7.0",
3
+ "version": "2.34.5-dev-build-f6f44159.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/dist/src/index.js CHANGED
@@ -112,29 +112,26 @@ __export(render_with_goodbye_exports, {
112
112
  GoodbyeBoundary: () => GoodbyeBoundary,
113
113
  renderWithGoodbye: () => renderWithGoodbye
114
114
  });
115
- import { useCallback, useEffect, useRef, useState } from "react";
116
- import { render, Text, useInput } from "ink";
115
+ import { useEffect, useRef, useState } from "react";
116
+ import { render, Text } 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
- });
131
121
  useEffect(() => {
132
- process.on("SIGINT", requestExit);
122
+ let exitTimer;
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);
133
130
  return () => {
134
- process.off("SIGINT", requestExit);
135
- if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
131
+ process.off("SIGINT", handleSigint);
132
+ if (exitTimer) clearTimeout(exitTimer);
136
133
  };
137
- }, [requestExit]);
134
+ }, []);
138
135
  return isExiting ? /* @__PURE__ */ jsx(Text, { children: "Goodbye!" }) : /* @__PURE__ */ jsx(Fragment, { children });
139
136
  }
140
137
  function renderWithGoodbye(element, options) {
@@ -7148,7 +7145,7 @@ var init_contentful_urls = __esm({
7148
7145
  });
7149
7146
 
7150
7147
  // packages/experience-design-system-cli/src/apply/tui/ServerApplyView.tsx
7151
- import { Box as Box3, Text as Text4, useInput as useInput2 } from "ink";
7148
+ import { Box as Box3, Text as Text4, useInput } from "ink";
7152
7149
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
7153
7150
  function ServerPreviewConfirm({
7154
7151
  preview,
@@ -7158,7 +7155,7 @@ function ServerPreviewConfirm({
7158
7155
  onConfirm,
7159
7156
  onCancel
7160
7157
  }) {
7161
- useInput2((input, key) => {
7158
+ useInput((input, key) => {
7162
7159
  if (key.return) onConfirm(breakingWithImpact);
7163
7160
  else if (key.escape || input === "q") onCancel();
7164
7161
  });
@@ -7187,7 +7184,7 @@ function ServerApplyProgress({
7187
7184
  operationId,
7188
7185
  error
7189
7186
  }) {
7190
- useInput2((_input, key) => {
7187
+ useInput((_input, key) => {
7191
7188
  if (status === "error" && (key.escape || _input === "q")) process.exit(1);
7192
7189
  });
7193
7190
  return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
@@ -7215,7 +7212,7 @@ function ServerApplyProgress({
7215
7212
  ] });
7216
7213
  }
7217
7214
  function ServerApplyDone({ operation, spaceId, environmentId, host }) {
7218
- useInput2((input, key) => {
7215
+ useInput((input, key) => {
7219
7216
  if (key.escape || input === "q") {
7220
7217
  process.exit(operation.sys.status === "succeeded" ? 0 : 1);
7221
7218
  }
@@ -7329,6 +7326,7 @@ var init_terminal_capabilities = __esm({
7329
7326
 
7330
7327
  // packages/experience-design-system-cli/src/apply/command.ts
7331
7328
  import { createElement as createElement2 } from "react";
7329
+ import { render as render2 } from "ink";
7332
7330
  import { readFile as readFile9, readdir as readdir2, stat as stat2 } from "node:fs/promises";
7333
7331
  import { join as join8 } from "node:path";
7334
7332
  import {
@@ -7732,11 +7730,11 @@ function registerApplyCommand(program) {
7732
7730
  environmentId,
7733
7731
  host,
7734
7732
  acknowledgeBreakingChanges: acknowledge,
7735
- rerender: (element) => instance.rerender(createElement2(GoodbyeBoundary, null, element)),
7733
+ rerender: (element) => instance.rerender(element),
7736
7734
  onDone: resolvePromise
7737
7735
  });
7738
7736
  };
7739
- const instance = renderWithGoodbye(
7737
+ const instance = render2(
7740
7738
  createElement2(ServerPreviewConfirm, {
7741
7739
  preview,
7742
7740
  spaceId,
@@ -7758,7 +7756,6 @@ var IGNORE_TOKEN_DIRS;
7758
7756
  var init_command2 = __esm({
7759
7757
  "packages/experience-design-system-cli/src/apply/command.ts"() {
7760
7758
  "use strict";
7761
- init_render_with_goodbye();
7762
7759
  init_api_client();
7763
7760
  init_error_parser();
7764
7761
  init_cycle_detection();
@@ -10179,7 +10176,7 @@ var init_SpaceEnvironment = __esm({
10179
10176
  });
10180
10177
 
10181
10178
  // packages/experience-design-system-cli/src/import/tui/preview-confirmation-input.ts
10182
- import { useCallback as useCallback2 } from "react";
10179
+ import { useCallback } from "react";
10183
10180
  function handlePreviewConfirmationInput(_input, key, options) {
10184
10181
  if (key.return) {
10185
10182
  options.onConfirm(options.breakingWithImpact);
@@ -10188,7 +10185,7 @@ function handlePreviewConfirmationInput(_input, key, options) {
10188
10185
  return false;
10189
10186
  }
10190
10187
  function usePreviewConfirmationInput(breakingWithImpact, onConfirm) {
10191
- return useCallback2(
10188
+ return useCallback(
10192
10189
  (input, key) => handlePreviewConfirmationInput(input, key, {
10193
10190
  breakingWithImpact,
10194
10191
  onConfirm
@@ -19520,20 +19517,20 @@ var init_SearchMatchSummary = __esm({
19520
19517
  });
19521
19518
 
19522
19519
  // packages/experience-design-system-cli/src/import/tui/hooks/useOverlayPanel.ts
19523
- import { useCallback as useCallback3, useState as useState13 } from "react";
19520
+ import { useCallback as useCallback2, useState as useState13 } from "react";
19524
19521
  function useOverlayPanel(opts) {
19525
19522
  const { toggleKey, onClose } = opts;
19526
19523
  const [isOpen, setIsOpen] = useState13(false);
19527
- const open = useCallback3(() => {
19524
+ const open = useCallback2(() => {
19528
19525
  setIsOpen(true);
19529
19526
  }, []);
19530
- const close = useCallback3(() => {
19527
+ const close = useCallback2(() => {
19531
19528
  setIsOpen((prev) => {
19532
19529
  if (prev && onClose) onClose();
19533
19530
  return false;
19534
19531
  });
19535
19532
  }, [onClose]);
19536
- const handleInput = useCallback3(
19533
+ const handleInput = useCallback2(
19537
19534
  (input, key) => {
19538
19535
  if (!isOpen) return false;
19539
19536
  if (input === toggleKey || key.escape === true) {
@@ -24257,7 +24254,7 @@ var init_useFinalizePreview = __esm({
24257
24254
  });
24258
24255
 
24259
24256
  // packages/experience-design-system-cli/src/import/tui/hooks/useReviewSession.ts
24260
- import { useCallback as useCallback4, useEffect as useEffect10, useRef as useRef6, useState as useState17 } from "react";
24257
+ import { useCallback as useCallback3, useEffect as useEffect10, useRef as useRef6, useState as useState17 } from "react";
24261
24258
  function loadReviewSessionState({
24262
24259
  extractSessionId,
24263
24260
  tokenSessionId,
@@ -24307,7 +24304,7 @@ function useReviewSession({
24307
24304
  const [loading, setLoading] = useState17(true);
24308
24305
  const [loadError, setLoadError] = useState17(null);
24309
24306
  const [availableTokens, setAvailableTokens] = useState17([]);
24310
- const loadInitialState = useCallback4(async () => {
24307
+ const loadInitialState = useCallback3(async () => {
24311
24308
  const result = loadSession();
24312
24309
  if (result.error || !tokensPath) return { result, catalog: result.tokens };
24313
24310
  const catalog = (await readTokensFromPath("tokens", tokensPath)).map((token) => ({
@@ -25008,7 +25005,7 @@ var init_preview_annotations = __esm({
25008
25005
  });
25009
25006
 
25010
25007
  // packages/experience-design-system-cli/src/import/tui/useLivePreview.ts
25011
- import { useCallback as useCallback5, useEffect as useEffect12, useRef as useRef8, useState as useState20 } from "react";
25008
+ import { useCallback as useCallback4, useEffect as useEffect12, useRef as useRef8, useState as useState20 } from "react";
25012
25009
  function useLivePreview(opts) {
25013
25010
  const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
25014
25011
  const [status, setStatus] = useState20("idle");
@@ -25033,7 +25030,7 @@ function useLivePreview(opts) {
25033
25030
  }
25034
25031
  };
25035
25032
  }, []);
25036
- const trigger = useCallback5(() => {
25033
+ const trigger = useCallback4(() => {
25037
25034
  const current = optsRef.current;
25038
25035
  if (!current.enabled) return;
25039
25036
  if (disabledRef.current) return;
@@ -25106,7 +25103,7 @@ var init_useLivePreview = __esm({
25106
25103
  });
25107
25104
 
25108
25105
  // packages/experience-design-system-cli/src/import/tui/hooks/useReviewPreview.ts
25109
- import { useCallback as useCallback6, useEffect as useEffect13, useState as useState21 } from "react";
25106
+ import { useCallback as useCallback5, useEffect as useEffect13, useState as useState21 } from "react";
25110
25107
  function useReviewPreview({
25111
25108
  components,
25112
25109
  loading,
@@ -25122,7 +25119,7 @@ function useReviewPreview({
25122
25119
  }) {
25123
25120
  const [previewAnnotations, setPreviewAnnotations] = useState21(/* @__PURE__ */ new Map());
25124
25121
  const [removedComponents, setRemovedComponents] = useState21([]);
25125
- const handleResult = useCallback6(
25122
+ const handleResult = useCallback5(
25126
25123
  (response) => {
25127
25124
  if (!response) return;
25128
25125
  setPreviewAnnotations(
@@ -25211,7 +25208,7 @@ var init_LivePreviewSummary = __esm({
25211
25208
  });
25212
25209
 
25213
25210
  // packages/experience-design-system-cli/src/import/tui/steps/GenerateReviewStep.tsx
25214
- import { useCallback as useCallback7, useEffect as useEffect14, useMemo as useMemo3, useRef as useRef9, useState as useState22 } from "react";
25211
+ import { useCallback as useCallback6, useEffect as useEffect14, useMemo as useMemo3, useRef as useRef9, useState as useState22 } from "react";
25215
25212
  import figures6 from "figures";
25216
25213
  import { Box as Box41, Text as Text45 } from "ink";
25217
25214
  import { Fragment as Fragment18, jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
@@ -25377,10 +25374,10 @@ function GenerateReviewStepView({
25377
25374
  }) {
25378
25375
  const { columns: terminalWidth, rows: terminalRows } = useTerminalSize();
25379
25376
  const [slotCycles, setSlotCycles] = useState22([]);
25380
- const setLoadedSlotCycles = useCallback7((cycles) => {
25377
+ const setLoadedSlotCycles = useCallback6((cycles) => {
25381
25378
  setSlotCycles(cycles ?? []);
25382
25379
  }, []);
25383
- const loadSessionState = useCallback7(
25380
+ const loadSessionState = useCallback6(
25384
25381
  () => loadReviewSessionState({
25385
25382
  extractSessionId,
25386
25383
  tokenSessionId,
@@ -26002,7 +25999,7 @@ function GenerateReviewStepView({
26002
25999
  }
26003
26000
  return;
26004
26001
  }
26005
- if (input === "c" && !key.ctrl && !key.meta && cycleRows.length > 0) {
26002
+ if (input === "c" && cycleRows.length > 0) {
26006
26003
  cyclePanel.open();
26007
26004
  setCyclePanelScroll(0);
26008
26005
  setCyclesCursor(0);
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-131193c7.0",
3
+ "version": "2.34.5-dev-build-f6f44159.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-131193c7.0",
45
- "@contentful/experience-design-system-types": "2.34.5-dev-build-131193c7.0"
44
+ "@contentful/experience-design-system-cli-v2": "2.34.5-dev-build-f6f44159.0",
45
+ "@contentful/experience-design-system-types": "2.34.5-dev-build-f6f44159.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-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"
57
+ "@contentful/experience-design-system-client": "2.34.5-dev-build-f6f44159.0",
58
+ "@contentful/experience-design-system-generation": "2.34.5-dev-build-f6f44159.0",
59
+ "@contentful/experience-design-system-extraction": "2.34.5-dev-build-f6f44159.0"
60
60
  },
61
61
  "repository": {
62
62
  "type": "git",