@contentful/experience-design-system-cli 2.38.1-dev-build-a3bf0edc.0 → 2.38.1-dev-build-8e139f2f.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/app.js CHANGED
@@ -27755,7 +27755,8 @@ function PathPrompt({
27755
27755
  defaultPath,
27756
27756
  onSubmit,
27757
27757
  onCancel,
27758
- label = "Save to"
27758
+ label = "Save to",
27759
+ summary
27759
27760
  }) {
27760
27761
  const [input, setInput] = useState28("");
27761
27762
  const cursorVisible = useBlinkingCursor();
@@ -27789,6 +27790,7 @@ function PathPrompt({
27789
27790
  return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
27790
27791
  /* @__PURE__ */ jsx52(StepHeader, { step: "push" }),
27791
27792
  /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27793
+ summary && /* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: summary }),
27792
27794
  /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
27793
27795
  /* @__PURE__ */ jsx52(Text44, { color: PALETTE.accent, children: "?" }),
27794
27796
  /* @__PURE__ */ jsxs42(Text44, { bold: true, children: [
@@ -27823,9 +27825,15 @@ function producedOf(state2) {
27823
27825
  function fileSummaryLabel({ components }) {
27824
27826
  return components ? "components.json" : "components.json (design tokens only)";
27825
27827
  }
27826
- function writtenThings({ components, tokens }) {
27827
- if (components && tokens) return "component types and design tokens";
27828
- return tokens ? "design tokens" : "component types";
27828
+ function counted(count, noun) {
27829
+ if (!count) return `${noun}s`;
27830
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
27831
+ }
27832
+ function countedThings({ components, tokens }, counts = {}) {
27833
+ const parts = [];
27834
+ if (components || !tokens) parts.push(counted(counts.components, "component type"));
27835
+ if (tokens) parts.push(counted(counts.tokens, "design token"));
27836
+ return parts.join(" and ");
27829
27837
  }
27830
27838
 
27831
27839
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
@@ -27850,18 +27858,21 @@ function useTimedSpinner() {
27850
27858
 
27851
27859
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
27852
27860
  import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
27853
- function PushingStep({ progress, produced }) {
27854
- const { elapsed } = useTimedSpinner();
27861
+ function PushingStep({ progress, produced, counts }) {
27862
+ const { spinner, elapsed } = useTimedSpinner();
27855
27863
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
27856
27864
  const showGlobal = progress && progress.kind === "progress";
27857
27865
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
27858
27866
  return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
27859
27867
  /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
27860
27868
  /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
27861
- /* @__PURE__ */ jsxs43(Text45, { children: [
27862
- "Writing ",
27863
- writtenThings(produced),
27864
- " to your Contentful space..."
27869
+ /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
27870
+ spinner,
27871
+ /* @__PURE__ */ jsxs43(Text45, { children: [
27872
+ "Writing ",
27873
+ countedThings(produced, counts),
27874
+ " to your Contentful space..."
27875
+ ] })
27865
27876
  ] }),
27866
27877
  operationId && /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
27867
27878
  /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Operation:" }),
@@ -28380,6 +28391,8 @@ function FlowScreen({
28380
28391
  onExit
28381
28392
  }) {
28382
28393
  const produced = producedOf(state2);
28394
+ const counts = { components: state2.generatedAcceptedCount, tokens: state2.tokenCount };
28395
+ const things = countedThings(produced, counts);
28383
28396
  const quit = () => onExit(0);
28384
28397
  const content = (() => {
28385
28398
  switch (state2.step) {
@@ -28401,7 +28414,7 @@ function FlowScreen({
28401
28414
  }
28402
28415
  );
28403
28416
  case "previewing":
28404
- return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
28417
+ return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: `Computing diff for ${things} against your Contentful space...` });
28405
28418
  case "preview-gate":
28406
28419
  if (!state2.serverPreview) return null;
28407
28420
  return /* @__PURE__ */ jsx56(
@@ -28416,11 +28429,12 @@ function FlowScreen({
28416
28429
  }
28417
28430
  );
28418
28431
  case "pushing":
28419
- return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced });
28432
+ return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced, counts });
28420
28433
  case "path-prompt":
28421
28434
  return /* @__PURE__ */ jsx56(
28422
28435
  PathPrompt,
28423
28436
  {
28437
+ summary: `Saving ${things}${state2.credentialsSkipped ? "" : " and pushing them to your Contentful space"}.`,
28424
28438
  defaultPath: state2.outDir,
28425
28439
  onSubmit: (submitted) => void controller.submitPath(submitted),
28426
28440
  onCancel: quit
package/dist/index.js CHANGED
@@ -31074,7 +31074,8 @@ function PathPrompt({
31074
31074
  defaultPath,
31075
31075
  onSubmit,
31076
31076
  onCancel,
31077
- label = "Save to"
31077
+ label = "Save to",
31078
+ summary
31078
31079
  }) {
31079
31080
  const [input, setInput] = useState28("");
31080
31081
  const cursorVisible = useBlinkingCursor();
@@ -31108,6 +31109,7 @@ function PathPrompt({
31108
31109
  return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
31109
31110
  /* @__PURE__ */ jsx52(StepHeader, { step: "push" }),
31110
31111
  /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31112
+ summary && /* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: summary }),
31111
31113
  /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
31112
31114
  /* @__PURE__ */ jsx52(Text44, { color: PALETTE.accent, children: "?" }),
31113
31115
  /* @__PURE__ */ jsxs42(Text44, { bold: true, children: [
@@ -31149,9 +31151,15 @@ function producedOf(state2) {
31149
31151
  function fileSummaryLabel({ components }) {
31150
31152
  return components ? "components.json" : "components.json (design tokens only)";
31151
31153
  }
31152
- function writtenThings({ components, tokens }) {
31153
- if (components && tokens) return "component types and design tokens";
31154
- return tokens ? "design tokens" : "component types";
31154
+ function counted(count, noun) {
31155
+ if (!count) return `${noun}s`;
31156
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
31157
+ }
31158
+ function countedThings({ components, tokens }, counts = {}) {
31159
+ const parts = [];
31160
+ if (components || !tokens) parts.push(counted(counts.components, "component type"));
31161
+ if (tokens) parts.push(counted(counts.tokens, "design token"));
31162
+ return parts.join(" and ");
31155
31163
  }
31156
31164
  var init_produced = __esm({
31157
31165
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/produced.ts"() {
@@ -31188,18 +31196,21 @@ var init_use_timed_spinner = __esm({
31188
31196
  import { Box as Box43, Text as Text45 } from "ink";
31189
31197
  import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
31190
31198
  import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
31191
- function PushingStep({ progress, produced }) {
31192
- const { elapsed } = useTimedSpinner();
31199
+ function PushingStep({ progress, produced, counts }) {
31200
+ const { spinner, elapsed } = useTimedSpinner();
31193
31201
  const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
31194
31202
  const showGlobal = progress && progress.kind === "progress";
31195
31203
  const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
31196
31204
  return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
31197
31205
  /* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
31198
31206
  /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
31199
- /* @__PURE__ */ jsxs43(Text45, { children: [
31200
- "Writing ",
31201
- writtenThings(produced),
31202
- " to your Contentful space..."
31207
+ /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
31208
+ spinner,
31209
+ /* @__PURE__ */ jsxs43(Text45, { children: [
31210
+ "Writing ",
31211
+ countedThings(produced, counts),
31212
+ " to your Contentful space..."
31213
+ ] })
31203
31214
  ] }),
31204
31215
  operationId && /* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
31205
31216
  /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Operation:" }),
@@ -31758,6 +31769,8 @@ function FlowScreen({
31758
31769
  onExit
31759
31770
  }) {
31760
31771
  const produced = producedOf(state2);
31772
+ const counts = { components: state2.generatedAcceptedCount, tokens: state2.tokenCount };
31773
+ const things = countedThings(produced, counts);
31761
31774
  const quit = () => onExit(0);
31762
31775
  const content = (() => {
31763
31776
  switch (state2.step) {
@@ -31779,7 +31792,7 @@ function FlowScreen({
31779
31792
  }
31780
31793
  );
31781
31794
  case "previewing":
31782
- return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: "Computing diff against your Contentful space..." });
31795
+ return /* @__PURE__ */ jsx56(RunningStep, { step: "push", description: `Computing diff for ${things} against your Contentful space...` });
31783
31796
  case "preview-gate":
31784
31797
  if (!state2.serverPreview) return null;
31785
31798
  return /* @__PURE__ */ jsx56(
@@ -31794,11 +31807,12 @@ function FlowScreen({
31794
31807
  }
31795
31808
  );
31796
31809
  case "pushing":
31797
- return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced });
31810
+ return /* @__PURE__ */ jsx56(PushingStep, { progress: state2.pushProgress, produced, counts });
31798
31811
  case "path-prompt":
31799
31812
  return /* @__PURE__ */ jsx56(
31800
31813
  PathPrompt,
31801
31814
  {
31815
+ summary: `Saving ${things}${state2.credentialsSkipped ? "" : " and pushing them to your Contentful space"}.`,
31802
31816
  defaultPath: state2.outDir,
31803
31817
  onSubmit: (submitted) => void controller.submitPath(submitted),
31804
31818
  onCancel: quit
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.38.1-dev-build-a3bf0edc.0",
3
+ "version": "2.38.1-dev-build-8e139f2f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,5 +4,7 @@ export type PathPromptProps = {
4
4
  onSubmit: (path: string) => void;
5
5
  onCancel: () => void;
6
6
  label?: string;
7
+ /** What is being saved, shown above the path, such as "Saving 42 design tokens." */
8
+ summary?: string;
7
9
  };
8
- export declare function PathPrompt({ defaultPath, onSubmit, onCancel, label, }: PathPromptProps): React.ReactElement;
10
+ export declare function PathPrompt({ defaultPath, onSubmit, onCancel, label, summary, }: PathPromptProps): React.ReactElement;
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { PushProgress } from '../support/push-progress.js';
3
- import { type Produced } from '../support/produced.js';
3
+ import { type Produced, type ProducedCounts } from '../support/produced.js';
4
4
  type PushingStepProps = {
5
5
  progress: PushProgress;
6
6
  produced: Produced;
7
+ counts: ProducedCounts;
7
8
  };
8
- export declare function PushingStep({ progress, produced }: PushingStepProps): React.ReactElement;
9
+ export declare function PushingStep({ progress, produced, counts }: PushingStepProps): React.ReactElement;
9
10
  export {};
@@ -11,5 +11,15 @@ export declare function producedOf(state: Pick<FlowState, 'extractSessionId' | '
11
11
  * holds just the tokens, and calling it a components file would mislead.
12
12
  */
13
13
  export declare function fileSummaryLabel({ components }: Produced): string;
14
+ /** How many of each thing a run writes. A missing or zero count is left out of the wording, never shown as "0". */
15
+ export interface ProducedCounts {
16
+ components?: number;
17
+ tokens?: number;
18
+ }
19
+ /**
20
+ * "12 component types and 42 design tokens", "42 design tokens", or "component types": the things this run writes, with
21
+ * how many of each when known.
22
+ */
23
+ export declare function countedThings({ components, tokens }: Produced, counts?: ProducedCounts): string;
14
24
  /** "component types and design tokens", "design tokens", or "component types": the things this run writes. */
15
- export declare function writtenThings({ components, tokens }: Produced): string;
25
+ export declare function writtenThings(produced: Produced): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.38.1-dev-build-a3bf0edc.0",
3
+ "version": "2.38.1-dev-build-8e139f2f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,8 +45,8 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-backend-pipeline": "2.38.1-dev-build-a3bf0edc.0",
49
- "@contentful/experience-design-system-types": "2.38.1-dev-build-a3bf0edc.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.38.1-dev-build-8e139f2f.0",
49
+ "@contentful/experience-design-system-types": "2.38.1-dev-build-8e139f2f.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",