@contentful/experience-design-system-cli 2.37.1-dev-build-2d576e63.0 → 2.37.1-dev-build-34b19a02.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 +150 -139
- package/dist/index.js +160 -146
- package/dist/package.json +1 -1
- package/dist/src/tui/shared/components/StepHeader.d.ts +3 -0
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -2750,7 +2750,7 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
2750
2750
|
|
|
2751
2751
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
2752
2752
|
import { useState as useState4 } from "react";
|
|
2753
|
-
import { Box as
|
|
2753
|
+
import { Box as Box6, Text as Text6 } from "ink";
|
|
2754
2754
|
|
|
2755
2755
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
|
|
2756
2756
|
import { useInput as useInput5 } from "ink";
|
|
@@ -2815,8 +2815,62 @@ function validateTokenPath(rawPath) {
|
|
|
2815
2815
|
return { ok: true, path: path5 };
|
|
2816
2816
|
}
|
|
2817
2817
|
|
|
2818
|
-
// packages/experience-design-system-cli/src/tui/
|
|
2818
|
+
// packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx
|
|
2819
|
+
import { Box as Box5, Text as Text5 } from "ink";
|
|
2820
|
+
init_version();
|
|
2819
2821
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2822
|
+
var IMPORT_STEPS = [
|
|
2823
|
+
{ id: "setup", label: "Setup" },
|
|
2824
|
+
{ id: "extraction", label: "Extract" },
|
|
2825
|
+
{ id: "scope-gate", label: "Select" },
|
|
2826
|
+
{ id: "generation", label: "Generate" },
|
|
2827
|
+
{ id: "review", label: "Review" },
|
|
2828
|
+
{ id: "push", label: "Push" }
|
|
2829
|
+
];
|
|
2830
|
+
var version = readPackageVersion();
|
|
2831
|
+
function StepHeader({ step }) {
|
|
2832
|
+
const current = step === "done" ? IMPORT_STEPS.length : IMPORT_STEPS.findIndex((candidate) => candidate.id === step);
|
|
2833
|
+
return /* @__PURE__ */ jsxs5(
|
|
2834
|
+
Box5,
|
|
2835
|
+
{
|
|
2836
|
+
justifyContent: "space-between",
|
|
2837
|
+
paddingX: 2,
|
|
2838
|
+
marginBottom: 1,
|
|
2839
|
+
borderStyle: "single",
|
|
2840
|
+
borderColor: PALETTE.border,
|
|
2841
|
+
borderTop: false,
|
|
2842
|
+
borderLeft: false,
|
|
2843
|
+
borderRight: false,
|
|
2844
|
+
children: [
|
|
2845
|
+
/* @__PURE__ */ jsx6(Box5, { columnGap: 3, children: IMPORT_STEPS.map((candidate, index) => {
|
|
2846
|
+
if (index < current) {
|
|
2847
|
+
return /* @__PURE__ */ jsxs5(Text5, { color: PALETTE.success, children: [
|
|
2848
|
+
"\u2713 ",
|
|
2849
|
+
candidate.label
|
|
2850
|
+
] }, candidate.id);
|
|
2851
|
+
}
|
|
2852
|
+
if (index === current) {
|
|
2853
|
+
return /* @__PURE__ */ jsxs5(Text5, { bold: true, color: PALETTE.accent, children: [
|
|
2854
|
+
"\u25CF ",
|
|
2855
|
+
candidate.label
|
|
2856
|
+
] }, candidate.id);
|
|
2857
|
+
}
|
|
2858
|
+
return /* @__PURE__ */ jsxs5(Text5, { color: PALETTE.muted, children: [
|
|
2859
|
+
"\u25CB ",
|
|
2860
|
+
candidate.label
|
|
2861
|
+
] }, candidate.id);
|
|
2862
|
+
}) }),
|
|
2863
|
+
/* @__PURE__ */ jsxs5(Text5, { color: PALETTE.muted, children: [
|
|
2864
|
+
"v",
|
|
2865
|
+
version
|
|
2866
|
+
] })
|
|
2867
|
+
]
|
|
2868
|
+
}
|
|
2869
|
+
);
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
2873
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2820
2874
|
function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
2821
2875
|
const [tokenPath, setTokenPath] = useState4(initialPath);
|
|
2822
2876
|
const [failure, setFailure] = useState4(null);
|
|
@@ -2835,33 +2889,36 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
2835
2889
|
if (check.ok) onConfirm(check.path);
|
|
2836
2890
|
else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
|
|
2837
2891
|
};
|
|
2838
|
-
return /* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
|
|
2842
|
-
/* @__PURE__ */
|
|
2843
|
-
|
|
2844
|
-
/* @__PURE__ */
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
/* @__PURE__ */ jsxs5(Text5, { color: PALETTE.error, children: [
|
|
2849
|
-
"\u2717 ",
|
|
2850
|
-
failure.error
|
|
2892
|
+
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
2893
|
+
/* @__PURE__ */ jsx7(StepHeader, { step: "setup" }),
|
|
2894
|
+
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
2895
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: "Design tokens" }),
|
|
2896
|
+
/* @__PURE__ */ jsx7(Text6, { color: PALETTE.muted, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG)." }),
|
|
2897
|
+
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
2898
|
+
/* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
2899
|
+
/* @__PURE__ */ jsx7(Text6, { color: PALETTE.accent, children: "?" }),
|
|
2900
|
+
/* @__PURE__ */ jsx7(Text6, { children: "Token path:" }),
|
|
2901
|
+
/* @__PURE__ */ jsx7(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
2851
2902
|
] }),
|
|
2852
|
-
failure
|
|
2853
|
-
|
|
2854
|
-
|
|
2903
|
+
failure && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
2904
|
+
/* @__PURE__ */ jsxs6(Text6, { color: PALETTE.error, children: [
|
|
2905
|
+
"\u2717 ",
|
|
2906
|
+
failure.error
|
|
2907
|
+
] }),
|
|
2908
|
+
failure.resolvedPath && /* @__PURE__ */ jsxs6(Text6, { color: PALETTE.muted, children: [
|
|
2909
|
+
" Resolved to: ",
|
|
2910
|
+
failure.resolvedPath
|
|
2911
|
+
] })
|
|
2855
2912
|
] })
|
|
2856
|
-
] })
|
|
2857
|
-
|
|
2858
|
-
|
|
2913
|
+
] }),
|
|
2914
|
+
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx7(ControlHints, { hints: TOKEN_INPUT_CONTROLS }) })
|
|
2915
|
+
] })
|
|
2859
2916
|
] });
|
|
2860
2917
|
}
|
|
2861
2918
|
|
|
2862
2919
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
2863
2920
|
import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
|
|
2864
|
-
import { Box as
|
|
2921
|
+
import { Box as Box7, Text as Text7 } from "ink";
|
|
2865
2922
|
|
|
2866
2923
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
|
|
2867
2924
|
import { useInput as useInput6 } from "ink";
|
|
@@ -16738,9 +16795,9 @@ function foldSvelteAndMdIntoOther(counts) {
|
|
|
16738
16795
|
}
|
|
16739
16796
|
|
|
16740
16797
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
16741
|
-
import { jsx as
|
|
16798
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
16742
16799
|
function Row({ row }) {
|
|
16743
|
-
return /* @__PURE__ */
|
|
16800
|
+
return /* @__PURE__ */ jsxs7(Text7, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
16744
16801
|
" \u2022 ",
|
|
16745
16802
|
String(row.count).padStart(3),
|
|
16746
16803
|
" ",
|
|
@@ -16749,34 +16806,34 @@ function Row({ row }) {
|
|
|
16749
16806
|
}
|
|
16750
16807
|
function Failure({ scan, path: path5 }) {
|
|
16751
16808
|
const { headline, hints } = describeFailure(scan.failure, path5);
|
|
16752
|
-
return /* @__PURE__ */
|
|
16753
|
-
/* @__PURE__ */
|
|
16809
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
16810
|
+
/* @__PURE__ */ jsxs7(Text7, { color: PALETTE.error, children: [
|
|
16754
16811
|
"\u2717 ",
|
|
16755
16812
|
headline
|
|
16756
16813
|
] }),
|
|
16757
|
-
hints.map((hint) => /* @__PURE__ */
|
|
16814
|
+
hints.map((hint) => /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: hint }, hint))
|
|
16758
16815
|
] });
|
|
16759
16816
|
}
|
|
16760
16817
|
function Summary({ scan, path: path5 }) {
|
|
16761
16818
|
const { total, rows, warning } = summarize(scan.counts);
|
|
16762
|
-
return /* @__PURE__ */
|
|
16763
|
-
/* @__PURE__ */
|
|
16819
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", gap: 1, children: [
|
|
16820
|
+
/* @__PURE__ */ jsxs7(Text7, { children: [
|
|
16764
16821
|
"Scanned ",
|
|
16765
|
-
/* @__PURE__ */
|
|
16822
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: path5 })
|
|
16766
16823
|
] }),
|
|
16767
|
-
/* @__PURE__ */
|
|
16768
|
-
/* @__PURE__ */
|
|
16824
|
+
/* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
16825
|
+
/* @__PURE__ */ jsxs7(Text7, { color: PALETTE.success, children: [
|
|
16769
16826
|
"\u2713 Found ",
|
|
16770
16827
|
total,
|
|
16771
16828
|
" files:"
|
|
16772
16829
|
] }),
|
|
16773
|
-
rows.map((row) => /* @__PURE__ */
|
|
16830
|
+
rows.map((row) => /* @__PURE__ */ jsx8(Row, { row }, row.label))
|
|
16774
16831
|
] }),
|
|
16775
|
-
warning && /* @__PURE__ */
|
|
16832
|
+
warning && /* @__PURE__ */ jsxs7(Text7, { color: PALETTE.warning, children: [
|
|
16776
16833
|
"\u26A0 ",
|
|
16777
16834
|
warning
|
|
16778
16835
|
] }),
|
|
16779
|
-
/* @__PURE__ */
|
|
16836
|
+
/* @__PURE__ */ jsx8(Text7, { children: "Does this look right?" })
|
|
16780
16837
|
] });
|
|
16781
16838
|
}
|
|
16782
16839
|
function PathValidationScreen({
|
|
@@ -16798,21 +16855,24 @@ function PathValidationScreen({
|
|
|
16798
16855
|
onChangePath,
|
|
16799
16856
|
onBack
|
|
16800
16857
|
});
|
|
16801
|
-
return /* @__PURE__ */
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
/* @__PURE__ */
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16858
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
16859
|
+
/* @__PURE__ */ jsx8(StepHeader, { step: "setup" }),
|
|
16860
|
+
/* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
16861
|
+
scan === void 0 && /* @__PURE__ */ jsxs7(Text7, { color: PALETTE.muted, children: [
|
|
16862
|
+
"Scanning ",
|
|
16863
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: resolvedPath }),
|
|
16864
|
+
"..."
|
|
16865
|
+
] }),
|
|
16866
|
+
scan?.ok === false && /* @__PURE__ */ jsx8(Failure, { scan, path: resolvedPath }),
|
|
16867
|
+
scan?.ok === true && /* @__PURE__ */ jsx8(Summary, { scan, path: resolvedPath }),
|
|
16868
|
+
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, children: /* @__PURE__ */ jsx8(ControlHints, { hints: controlsFor(phase) }) })
|
|
16869
|
+
] })
|
|
16810
16870
|
] });
|
|
16811
16871
|
}
|
|
16812
16872
|
|
|
16813
16873
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
16814
16874
|
import { useRef as useRef2, useState as useState6 } from "react";
|
|
16815
|
-
import { Box as
|
|
16875
|
+
import { Box as Box8, Text as Text8 } from "ink";
|
|
16816
16876
|
import TextInput2 from "ink-text-input";
|
|
16817
16877
|
|
|
16818
16878
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/controls.ts
|
|
@@ -16896,7 +16956,7 @@ function toUserError(error, host) {
|
|
|
16896
16956
|
}
|
|
16897
16957
|
|
|
16898
16958
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
16899
|
-
import { Fragment, jsx as
|
|
16959
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
16900
16960
|
var LABELS = {
|
|
16901
16961
|
spaceId: "Space ID",
|
|
16902
16962
|
environmentId: "Environment",
|
|
@@ -16948,46 +17008,49 @@ function CredentialsScreen({
|
|
|
16948
17008
|
if (result.ok) onDone({ skipped: false, credentials });
|
|
16949
17009
|
else setError(result.error);
|
|
16950
17010
|
};
|
|
16951
|
-
return /* @__PURE__ */
|
|
16952
|
-
/* @__PURE__ */
|
|
16953
|
-
|
|
16954
|
-
/* @__PURE__ */
|
|
16955
|
-
|
|
16956
|
-
/* @__PURE__ */
|
|
16957
|
-
/* @__PURE__ */
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
/* @__PURE__ */ jsx8(Text7, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
16962
|
-
/* @__PURE__ */ jsxs7(Text7, { bold: active === field, children: [
|
|
16963
|
-
LABELS[field],
|
|
16964
|
-
":"
|
|
17011
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
17012
|
+
/* @__PURE__ */ jsx9(StepHeader, { step: "setup" }),
|
|
17013
|
+
/* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
17014
|
+
/* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", gap: 1, children: [
|
|
17015
|
+
/* @__PURE__ */ jsx9(Text8, { bold: true, children: "Contentful Credentials" }),
|
|
17016
|
+
/* @__PURE__ */ jsx9(Text8, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
17017
|
+
!prefilled && /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
17018
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
|
|
17019
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
17020
|
+
] })
|
|
16965
17021
|
] }),
|
|
16966
|
-
/* @__PURE__ */
|
|
16967
|
-
|
|
16968
|
-
{
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
17022
|
+
/* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs8(Box8, { gap: 1, children: [
|
|
17023
|
+
/* @__PURE__ */ jsx9(Text8, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
17024
|
+
/* @__PURE__ */ jsxs8(Text8, { bold: active === field, children: [
|
|
17025
|
+
LABELS[field],
|
|
17026
|
+
":"
|
|
17027
|
+
] }),
|
|
17028
|
+
/* @__PURE__ */ jsx9(
|
|
17029
|
+
TextInput2,
|
|
17030
|
+
{
|
|
17031
|
+
value: values[field],
|
|
17032
|
+
focus: active === field && !validating,
|
|
17033
|
+
mask: field === "cmaToken" ? "\u2022" : void 0,
|
|
17034
|
+
placeholder: field === "host" ? DEFAULT_CONFIGURED_HOST : void 0,
|
|
17035
|
+
onChange: change(field),
|
|
17036
|
+
onSubmit: () => void submit(field)
|
|
17037
|
+
}
|
|
17038
|
+
)
|
|
17039
|
+
] }, field)) }),
|
|
17040
|
+
active === "host" && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
17041
|
+
error && /* @__PURE__ */ jsxs8(Text8, { color: PALETTE.error, children: [
|
|
17042
|
+
"\u2717 ",
|
|
17043
|
+
error
|
|
17044
|
+
] }),
|
|
17045
|
+
validating && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
17046
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
|
|
17047
|
+
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(ControlHints, { hints: CREDENTIALS_CONTROLS }) })
|
|
17048
|
+
] })
|
|
16986
17049
|
] });
|
|
16987
17050
|
}
|
|
16988
17051
|
|
|
16989
17052
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx
|
|
16990
|
-
import { Box as
|
|
17053
|
+
import { Box as Box9, Text as Text9 } from "ink";
|
|
16991
17054
|
|
|
16992
17055
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/controls.ts
|
|
16993
17056
|
import { useInput as useInput8 } from "ink";
|
|
@@ -17021,7 +17084,7 @@ function useErrorControls(handlers) {
|
|
|
17021
17084
|
}
|
|
17022
17085
|
|
|
17023
17086
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx
|
|
17024
|
-
import { jsx as
|
|
17087
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
17025
17088
|
function ErrorStep({
|
|
17026
17089
|
stepName,
|
|
17027
17090
|
message,
|
|
@@ -17034,14 +17097,14 @@ function ErrorStep({
|
|
|
17034
17097
|
canRetry: onRetryCredentials !== void 0,
|
|
17035
17098
|
canAcknowledge: onAcknowledgeBreakingChanges !== void 0
|
|
17036
17099
|
});
|
|
17037
|
-
return /* @__PURE__ */
|
|
17038
|
-
/* @__PURE__ */
|
|
17100
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
17101
|
+
/* @__PURE__ */ jsxs9(Text9, { bold: true, color: PALETTE.error, children: [
|
|
17039
17102
|
"\u2717 ",
|
|
17040
17103
|
stepName,
|
|
17041
17104
|
" failed"
|
|
17042
17105
|
] }),
|
|
17043
|
-
/* @__PURE__ */
|
|
17044
|
-
/* @__PURE__ */
|
|
17106
|
+
/* @__PURE__ */ jsx10(Text9, { color: PALETTE.error, children: message }),
|
|
17107
|
+
/* @__PURE__ */ jsx10(Box9, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
17045
17108
|
"[",
|
|
17046
17109
|
control.keys,
|
|
17047
17110
|
"] ",
|
|
@@ -17081,59 +17144,6 @@ function useGateControls(handlers) {
|
|
|
17081
17144
|
});
|
|
17082
17145
|
}
|
|
17083
17146
|
|
|
17084
|
-
// packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx
|
|
17085
|
-
import { Box as Box9, Text as Text9 } from "ink";
|
|
17086
|
-
init_version();
|
|
17087
|
-
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
17088
|
-
var IMPORT_STEPS = [
|
|
17089
|
-
{ id: "extraction", label: "Extract" },
|
|
17090
|
-
{ id: "scope-gate", label: "Select" },
|
|
17091
|
-
{ id: "generation", label: "Generate" },
|
|
17092
|
-
{ id: "review", label: "Review" },
|
|
17093
|
-
{ id: "push", label: "Push" }
|
|
17094
|
-
];
|
|
17095
|
-
var version = readPackageVersion();
|
|
17096
|
-
function StepHeader({ step }) {
|
|
17097
|
-
const current = step === "done" ? IMPORT_STEPS.length : IMPORT_STEPS.findIndex((candidate) => candidate.id === step);
|
|
17098
|
-
return /* @__PURE__ */ jsxs9(
|
|
17099
|
-
Box9,
|
|
17100
|
-
{
|
|
17101
|
-
justifyContent: "space-between",
|
|
17102
|
-
paddingX: 2,
|
|
17103
|
-
marginBottom: 1,
|
|
17104
|
-
borderStyle: "single",
|
|
17105
|
-
borderColor: PALETTE.border,
|
|
17106
|
-
borderTop: false,
|
|
17107
|
-
borderLeft: false,
|
|
17108
|
-
borderRight: false,
|
|
17109
|
-
children: [
|
|
17110
|
-
/* @__PURE__ */ jsx10(Box9, { columnGap: 3, children: IMPORT_STEPS.map((candidate, index) => {
|
|
17111
|
-
if (index < current) {
|
|
17112
|
-
return /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.success, children: [
|
|
17113
|
-
"\u2713 ",
|
|
17114
|
-
candidate.label
|
|
17115
|
-
] }, candidate.id);
|
|
17116
|
-
}
|
|
17117
|
-
if (index === current) {
|
|
17118
|
-
return /* @__PURE__ */ jsxs9(Text9, { bold: true, color: PALETTE.accent, children: [
|
|
17119
|
-
"\u25CF ",
|
|
17120
|
-
candidate.label
|
|
17121
|
-
] }, candidate.id);
|
|
17122
|
-
}
|
|
17123
|
-
return /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
17124
|
-
"\u25CB ",
|
|
17125
|
-
candidate.label
|
|
17126
|
-
] }, candidate.id);
|
|
17127
|
-
}) }),
|
|
17128
|
-
/* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
17129
|
-
"v",
|
|
17130
|
-
version
|
|
17131
|
-
] })
|
|
17132
|
-
]
|
|
17133
|
-
}
|
|
17134
|
-
);
|
|
17135
|
-
}
|
|
17136
|
-
|
|
17137
17147
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx
|
|
17138
17148
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
17139
17149
|
function GateStep({
|
|
@@ -17304,6 +17314,7 @@ function TokenReuseScreen({
|
|
|
17304
17314
|
return /* @__PURE__ */ jsx13(
|
|
17305
17315
|
GateStep,
|
|
17306
17316
|
{
|
|
17317
|
+
step: "setup",
|
|
17307
17318
|
message: "Existing tokens.json found",
|
|
17308
17319
|
summary,
|
|
17309
17320
|
context,
|
package/dist/index.js
CHANGED
|
@@ -18759,10 +18759,71 @@ var init_validate_path = __esm({
|
|
|
18759
18759
|
}
|
|
18760
18760
|
});
|
|
18761
18761
|
|
|
18762
|
-
// packages/experience-design-system-cli/src/tui/
|
|
18763
|
-
import { useState as useState4 } from "react";
|
|
18762
|
+
// packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx
|
|
18764
18763
|
import { Box as Box5, Text as Text5 } from "ink";
|
|
18765
18764
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
18765
|
+
function StepHeader({ step }) {
|
|
18766
|
+
const current = step === "done" ? IMPORT_STEPS.length : IMPORT_STEPS.findIndex((candidate) => candidate.id === step);
|
|
18767
|
+
return /* @__PURE__ */ jsxs5(
|
|
18768
|
+
Box5,
|
|
18769
|
+
{
|
|
18770
|
+
justifyContent: "space-between",
|
|
18771
|
+
paddingX: 2,
|
|
18772
|
+
marginBottom: 1,
|
|
18773
|
+
borderStyle: "single",
|
|
18774
|
+
borderColor: PALETTE.border,
|
|
18775
|
+
borderTop: false,
|
|
18776
|
+
borderLeft: false,
|
|
18777
|
+
borderRight: false,
|
|
18778
|
+
children: [
|
|
18779
|
+
/* @__PURE__ */ jsx6(Box5, { columnGap: 3, children: IMPORT_STEPS.map((candidate, index) => {
|
|
18780
|
+
if (index < current) {
|
|
18781
|
+
return /* @__PURE__ */ jsxs5(Text5, { color: PALETTE.success, children: [
|
|
18782
|
+
"\u2713 ",
|
|
18783
|
+
candidate.label
|
|
18784
|
+
] }, candidate.id);
|
|
18785
|
+
}
|
|
18786
|
+
if (index === current) {
|
|
18787
|
+
return /* @__PURE__ */ jsxs5(Text5, { bold: true, color: PALETTE.accent, children: [
|
|
18788
|
+
"\u25CF ",
|
|
18789
|
+
candidate.label
|
|
18790
|
+
] }, candidate.id);
|
|
18791
|
+
}
|
|
18792
|
+
return /* @__PURE__ */ jsxs5(Text5, { color: PALETTE.muted, children: [
|
|
18793
|
+
"\u25CB ",
|
|
18794
|
+
candidate.label
|
|
18795
|
+
] }, candidate.id);
|
|
18796
|
+
}) }),
|
|
18797
|
+
/* @__PURE__ */ jsxs5(Text5, { color: PALETTE.muted, children: [
|
|
18798
|
+
"v",
|
|
18799
|
+
version
|
|
18800
|
+
] })
|
|
18801
|
+
]
|
|
18802
|
+
}
|
|
18803
|
+
);
|
|
18804
|
+
}
|
|
18805
|
+
var IMPORT_STEPS, version;
|
|
18806
|
+
var init_StepHeader = __esm({
|
|
18807
|
+
"packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx"() {
|
|
18808
|
+
"use strict";
|
|
18809
|
+
init_theme();
|
|
18810
|
+
init_version();
|
|
18811
|
+
IMPORT_STEPS = [
|
|
18812
|
+
{ id: "setup", label: "Setup" },
|
|
18813
|
+
{ id: "extraction", label: "Extract" },
|
|
18814
|
+
{ id: "scope-gate", label: "Select" },
|
|
18815
|
+
{ id: "generation", label: "Generate" },
|
|
18816
|
+
{ id: "review", label: "Review" },
|
|
18817
|
+
{ id: "push", label: "Push" }
|
|
18818
|
+
];
|
|
18819
|
+
version = readPackageVersion();
|
|
18820
|
+
}
|
|
18821
|
+
});
|
|
18822
|
+
|
|
18823
|
+
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
18824
|
+
import { useState as useState4 } from "react";
|
|
18825
|
+
import { Box as Box6, Text as Text6 } from "ink";
|
|
18826
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
18766
18827
|
function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
18767
18828
|
const [tokenPath, setTokenPath] = useState4(initialPath);
|
|
18768
18829
|
const [failure, setFailure] = useState4(null);
|
|
@@ -18781,27 +18842,30 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
18781
18842
|
if (check.ok) onConfirm(check.path);
|
|
18782
18843
|
else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
|
|
18783
18844
|
};
|
|
18784
|
-
return /* @__PURE__ */
|
|
18785
|
-
/* @__PURE__ */
|
|
18786
|
-
/* @__PURE__ */
|
|
18787
|
-
|
|
18788
|
-
/* @__PURE__ */
|
|
18789
|
-
|
|
18790
|
-
/* @__PURE__ */
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
/* @__PURE__ */ jsxs5(Text5, { color: PALETTE.error, children: [
|
|
18795
|
-
"\u2717 ",
|
|
18796
|
-
failure.error
|
|
18845
|
+
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
18846
|
+
/* @__PURE__ */ jsx7(StepHeader, { step: "setup" }),
|
|
18847
|
+
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
18848
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: "Design tokens" }),
|
|
18849
|
+
/* @__PURE__ */ jsx7(Text6, { color: PALETTE.muted, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG)." }),
|
|
18850
|
+
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
18851
|
+
/* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
18852
|
+
/* @__PURE__ */ jsx7(Text6, { color: PALETTE.accent, children: "?" }),
|
|
18853
|
+
/* @__PURE__ */ jsx7(Text6, { children: "Token path:" }),
|
|
18854
|
+
/* @__PURE__ */ jsx7(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
18797
18855
|
] }),
|
|
18798
|
-
failure
|
|
18799
|
-
|
|
18800
|
-
|
|
18856
|
+
failure && /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
18857
|
+
/* @__PURE__ */ jsxs6(Text6, { color: PALETTE.error, children: [
|
|
18858
|
+
"\u2717 ",
|
|
18859
|
+
failure.error
|
|
18860
|
+
] }),
|
|
18861
|
+
failure.resolvedPath && /* @__PURE__ */ jsxs6(Text6, { color: PALETTE.muted, children: [
|
|
18862
|
+
" Resolved to: ",
|
|
18863
|
+
failure.resolvedPath
|
|
18864
|
+
] })
|
|
18801
18865
|
] })
|
|
18802
|
-
] })
|
|
18803
|
-
|
|
18804
|
-
|
|
18866
|
+
] }),
|
|
18867
|
+
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx7(ControlHints, { hints: TOKEN_INPUT_CONTROLS }) })
|
|
18868
|
+
] })
|
|
18805
18869
|
] });
|
|
18806
18870
|
}
|
|
18807
18871
|
var init_screen2 = __esm({
|
|
@@ -18813,6 +18877,7 @@ var init_screen2 = __esm({
|
|
|
18813
18877
|
init_logic2();
|
|
18814
18878
|
init_validate_path();
|
|
18815
18879
|
init_ControlHints();
|
|
18880
|
+
init_StepHeader();
|
|
18816
18881
|
}
|
|
18817
18882
|
});
|
|
18818
18883
|
|
|
@@ -18950,10 +19015,10 @@ var init_scan_files = __esm({
|
|
|
18950
19015
|
|
|
18951
19016
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
18952
19017
|
import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
|
|
18953
|
-
import { Box as
|
|
18954
|
-
import { jsx as
|
|
19018
|
+
import { Box as Box7, Text as Text7 } from "ink";
|
|
19019
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
18955
19020
|
function Row({ row }) {
|
|
18956
|
-
return /* @__PURE__ */
|
|
19021
|
+
return /* @__PURE__ */ jsxs7(Text7, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
18957
19022
|
" \u2022 ",
|
|
18958
19023
|
String(row.count).padStart(3),
|
|
18959
19024
|
" ",
|
|
@@ -18962,34 +19027,34 @@ function Row({ row }) {
|
|
|
18962
19027
|
}
|
|
18963
19028
|
function Failure({ scan, path: path5 }) {
|
|
18964
19029
|
const { headline, hints } = describeFailure(scan.failure, path5);
|
|
18965
|
-
return /* @__PURE__ */
|
|
18966
|
-
/* @__PURE__ */
|
|
19030
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
19031
|
+
/* @__PURE__ */ jsxs7(Text7, { color: PALETTE.error, children: [
|
|
18967
19032
|
"\u2717 ",
|
|
18968
19033
|
headline
|
|
18969
19034
|
] }),
|
|
18970
|
-
hints.map((hint) => /* @__PURE__ */
|
|
19035
|
+
hints.map((hint) => /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: hint }, hint))
|
|
18971
19036
|
] });
|
|
18972
19037
|
}
|
|
18973
19038
|
function Summary({ scan, path: path5 }) {
|
|
18974
19039
|
const { total, rows, warning } = summarize(scan.counts);
|
|
18975
|
-
return /* @__PURE__ */
|
|
18976
|
-
/* @__PURE__ */
|
|
19040
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", gap: 1, children: [
|
|
19041
|
+
/* @__PURE__ */ jsxs7(Text7, { children: [
|
|
18977
19042
|
"Scanned ",
|
|
18978
|
-
/* @__PURE__ */
|
|
19043
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: path5 })
|
|
18979
19044
|
] }),
|
|
18980
|
-
/* @__PURE__ */
|
|
18981
|
-
/* @__PURE__ */
|
|
19045
|
+
/* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
19046
|
+
/* @__PURE__ */ jsxs7(Text7, { color: PALETTE.success, children: [
|
|
18982
19047
|
"\u2713 Found ",
|
|
18983
19048
|
total,
|
|
18984
19049
|
" files:"
|
|
18985
19050
|
] }),
|
|
18986
|
-
rows.map((row) => /* @__PURE__ */
|
|
19051
|
+
rows.map((row) => /* @__PURE__ */ jsx8(Row, { row }, row.label))
|
|
18987
19052
|
] }),
|
|
18988
|
-
warning && /* @__PURE__ */
|
|
19053
|
+
warning && /* @__PURE__ */ jsxs7(Text7, { color: PALETTE.warning, children: [
|
|
18989
19054
|
"\u26A0 ",
|
|
18990
19055
|
warning
|
|
18991
19056
|
] }),
|
|
18992
|
-
/* @__PURE__ */
|
|
19057
|
+
/* @__PURE__ */ jsx8(Text7, { children: "Does this look right?" })
|
|
18993
19058
|
] });
|
|
18994
19059
|
}
|
|
18995
19060
|
function PathValidationScreen({
|
|
@@ -19011,15 +19076,18 @@ function PathValidationScreen({
|
|
|
19011
19076
|
onChangePath,
|
|
19012
19077
|
onBack
|
|
19013
19078
|
});
|
|
19014
|
-
return /* @__PURE__ */
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
/* @__PURE__ */
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19079
|
+
return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
|
|
19080
|
+
/* @__PURE__ */ jsx8(StepHeader, { step: "setup" }),
|
|
19081
|
+
/* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
19082
|
+
scan === void 0 && /* @__PURE__ */ jsxs7(Text7, { color: PALETTE.muted, children: [
|
|
19083
|
+
"Scanning ",
|
|
19084
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: resolvedPath }),
|
|
19085
|
+
"..."
|
|
19086
|
+
] }),
|
|
19087
|
+
scan?.ok === false && /* @__PURE__ */ jsx8(Failure, { scan, path: resolvedPath }),
|
|
19088
|
+
scan?.ok === true && /* @__PURE__ */ jsx8(Summary, { scan, path: resolvedPath }),
|
|
19089
|
+
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, children: /* @__PURE__ */ jsx8(ControlHints, { hints: controlsFor(phase) }) })
|
|
19090
|
+
] })
|
|
19023
19091
|
] });
|
|
19024
19092
|
}
|
|
19025
19093
|
var init_screen3 = __esm({
|
|
@@ -19031,6 +19099,7 @@ var init_screen3 = __esm({
|
|
|
19031
19099
|
init_scan_files();
|
|
19032
19100
|
init_logic3();
|
|
19033
19101
|
init_ControlHints();
|
|
19102
|
+
init_StepHeader();
|
|
19034
19103
|
}
|
|
19035
19104
|
});
|
|
19036
19105
|
|
|
@@ -19141,9 +19210,9 @@ var init_validate4 = __esm({
|
|
|
19141
19210
|
|
|
19142
19211
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
19143
19212
|
import { useRef as useRef2, useState as useState6 } from "react";
|
|
19144
|
-
import { Box as
|
|
19213
|
+
import { Box as Box8, Text as Text8 } from "ink";
|
|
19145
19214
|
import TextInput2 from "ink-text-input";
|
|
19146
|
-
import { Fragment, jsx as
|
|
19215
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
19147
19216
|
function CredentialsScreen({
|
|
19148
19217
|
onDone,
|
|
19149
19218
|
onBack,
|
|
@@ -19189,41 +19258,44 @@ function CredentialsScreen({
|
|
|
19189
19258
|
if (result.ok) onDone({ skipped: false, credentials });
|
|
19190
19259
|
else setError(result.error);
|
|
19191
19260
|
};
|
|
19192
|
-
return /* @__PURE__ */
|
|
19193
|
-
/* @__PURE__ */
|
|
19194
|
-
|
|
19195
|
-
/* @__PURE__ */
|
|
19196
|
-
|
|
19197
|
-
/* @__PURE__ */
|
|
19198
|
-
/* @__PURE__ */
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
/* @__PURE__ */ jsx8(Text7, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
19203
|
-
/* @__PURE__ */ jsxs7(Text7, { bold: active === field, children: [
|
|
19204
|
-
LABELS[field],
|
|
19205
|
-
":"
|
|
19261
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
19262
|
+
/* @__PURE__ */ jsx9(StepHeader, { step: "setup" }),
|
|
19263
|
+
/* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
19264
|
+
/* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", gap: 1, children: [
|
|
19265
|
+
/* @__PURE__ */ jsx9(Text8, { bold: true, children: "Contentful Credentials" }),
|
|
19266
|
+
/* @__PURE__ */ jsx9(Text8, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
19267
|
+
!prefilled && /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
19268
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
|
|
19269
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
19270
|
+
] })
|
|
19206
19271
|
] }),
|
|
19207
|
-
/* @__PURE__ */
|
|
19208
|
-
|
|
19209
|
-
{
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19272
|
+
/* @__PURE__ */ jsx9(Box8, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs8(Box8, { gap: 1, children: [
|
|
19273
|
+
/* @__PURE__ */ jsx9(Text8, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
19274
|
+
/* @__PURE__ */ jsxs8(Text8, { bold: active === field, children: [
|
|
19275
|
+
LABELS[field],
|
|
19276
|
+
":"
|
|
19277
|
+
] }),
|
|
19278
|
+
/* @__PURE__ */ jsx9(
|
|
19279
|
+
TextInput2,
|
|
19280
|
+
{
|
|
19281
|
+
value: values[field],
|
|
19282
|
+
focus: active === field && !validating,
|
|
19283
|
+
mask: field === "cmaToken" ? "\u2022" : void 0,
|
|
19284
|
+
placeholder: field === "host" ? DEFAULT_CONFIGURED_HOST : void 0,
|
|
19285
|
+
onChange: change(field),
|
|
19286
|
+
onSubmit: () => void submit(field)
|
|
19287
|
+
}
|
|
19288
|
+
)
|
|
19289
|
+
] }, field)) }),
|
|
19290
|
+
active === "host" && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
19291
|
+
error && /* @__PURE__ */ jsxs8(Text8, { color: PALETTE.error, children: [
|
|
19292
|
+
"\u2717 ",
|
|
19293
|
+
error
|
|
19294
|
+
] }),
|
|
19295
|
+
validating && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
19296
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx9(Text8, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
|
|
19297
|
+
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(ControlHints, { hints: CREDENTIALS_CONTROLS }) })
|
|
19298
|
+
] })
|
|
19227
19299
|
] });
|
|
19228
19300
|
}
|
|
19229
19301
|
var LABELS;
|
|
@@ -19236,6 +19308,7 @@ var init_screen4 = __esm({
|
|
|
19236
19308
|
init_logic4();
|
|
19237
19309
|
init_validate4();
|
|
19238
19310
|
init_ControlHints();
|
|
19311
|
+
init_StepHeader();
|
|
19239
19312
|
LABELS = {
|
|
19240
19313
|
spaceId: "Space ID",
|
|
19241
19314
|
environmentId: "Environment",
|
|
@@ -19286,8 +19359,8 @@ var init_controls5 = __esm({
|
|
|
19286
19359
|
});
|
|
19287
19360
|
|
|
19288
19361
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx
|
|
19289
|
-
import { Box as
|
|
19290
|
-
import { jsx as
|
|
19362
|
+
import { Box as Box9, Text as Text9 } from "ink";
|
|
19363
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
19291
19364
|
function ErrorStep({
|
|
19292
19365
|
stepName,
|
|
19293
19366
|
message,
|
|
@@ -19300,14 +19373,14 @@ function ErrorStep({
|
|
|
19300
19373
|
canRetry: onRetryCredentials !== void 0,
|
|
19301
19374
|
canAcknowledge: onAcknowledgeBreakingChanges !== void 0
|
|
19302
19375
|
});
|
|
19303
|
-
return /* @__PURE__ */
|
|
19304
|
-
/* @__PURE__ */
|
|
19376
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
19377
|
+
/* @__PURE__ */ jsxs9(Text9, { bold: true, color: PALETTE.error, children: [
|
|
19305
19378
|
"\u2717 ",
|
|
19306
19379
|
stepName,
|
|
19307
19380
|
" failed"
|
|
19308
19381
|
] }),
|
|
19309
|
-
/* @__PURE__ */
|
|
19310
|
-
/* @__PURE__ */
|
|
19382
|
+
/* @__PURE__ */ jsx10(Text9, { color: PALETTE.error, children: message }),
|
|
19383
|
+
/* @__PURE__ */ jsx10(Box9, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
19311
19384
|
"[",
|
|
19312
19385
|
control.keys,
|
|
19313
19386
|
"] ",
|
|
@@ -19361,66 +19434,6 @@ var init_controls6 = __esm({
|
|
|
19361
19434
|
}
|
|
19362
19435
|
});
|
|
19363
19436
|
|
|
19364
|
-
// packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx
|
|
19365
|
-
import { Box as Box9, Text as Text9 } from "ink";
|
|
19366
|
-
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
19367
|
-
function StepHeader({ step }) {
|
|
19368
|
-
const current = step === "done" ? IMPORT_STEPS.length : IMPORT_STEPS.findIndex((candidate) => candidate.id === step);
|
|
19369
|
-
return /* @__PURE__ */ jsxs9(
|
|
19370
|
-
Box9,
|
|
19371
|
-
{
|
|
19372
|
-
justifyContent: "space-between",
|
|
19373
|
-
paddingX: 2,
|
|
19374
|
-
marginBottom: 1,
|
|
19375
|
-
borderStyle: "single",
|
|
19376
|
-
borderColor: PALETTE.border,
|
|
19377
|
-
borderTop: false,
|
|
19378
|
-
borderLeft: false,
|
|
19379
|
-
borderRight: false,
|
|
19380
|
-
children: [
|
|
19381
|
-
/* @__PURE__ */ jsx10(Box9, { columnGap: 3, children: IMPORT_STEPS.map((candidate, index) => {
|
|
19382
|
-
if (index < current) {
|
|
19383
|
-
return /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.success, children: [
|
|
19384
|
-
"\u2713 ",
|
|
19385
|
-
candidate.label
|
|
19386
|
-
] }, candidate.id);
|
|
19387
|
-
}
|
|
19388
|
-
if (index === current) {
|
|
19389
|
-
return /* @__PURE__ */ jsxs9(Text9, { bold: true, color: PALETTE.accent, children: [
|
|
19390
|
-
"\u25CF ",
|
|
19391
|
-
candidate.label
|
|
19392
|
-
] }, candidate.id);
|
|
19393
|
-
}
|
|
19394
|
-
return /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
19395
|
-
"\u25CB ",
|
|
19396
|
-
candidate.label
|
|
19397
|
-
] }, candidate.id);
|
|
19398
|
-
}) }),
|
|
19399
|
-
/* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
19400
|
-
"v",
|
|
19401
|
-
version
|
|
19402
|
-
] })
|
|
19403
|
-
]
|
|
19404
|
-
}
|
|
19405
|
-
);
|
|
19406
|
-
}
|
|
19407
|
-
var IMPORT_STEPS, version;
|
|
19408
|
-
var init_StepHeader = __esm({
|
|
19409
|
-
"packages/experience-design-system-cli/src/tui/shared/components/StepHeader.tsx"() {
|
|
19410
|
-
"use strict";
|
|
19411
|
-
init_theme();
|
|
19412
|
-
init_version();
|
|
19413
|
-
IMPORT_STEPS = [
|
|
19414
|
-
{ id: "extraction", label: "Extract" },
|
|
19415
|
-
{ id: "scope-gate", label: "Select" },
|
|
19416
|
-
{ id: "generation", label: "Generate" },
|
|
19417
|
-
{ id: "review", label: "Review" },
|
|
19418
|
-
{ id: "push", label: "Push" }
|
|
19419
|
-
];
|
|
19420
|
-
version = readPackageVersion();
|
|
19421
|
-
}
|
|
19422
|
-
});
|
|
19423
|
-
|
|
19424
19437
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx
|
|
19425
19438
|
import { Box as Box10, Text as Text10 } from "ink";
|
|
19426
19439
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
@@ -19643,6 +19656,7 @@ function TokenReuseScreen({
|
|
|
19643
19656
|
return /* @__PURE__ */ jsx13(
|
|
19644
19657
|
GateStep,
|
|
19645
19658
|
{
|
|
19659
|
+
step: "setup",
|
|
19646
19660
|
message: "Existing tokens.json found",
|
|
19647
19661
|
summary,
|
|
19648
19662
|
context,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-34b19a02.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.37.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-34b19a02.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-34b19a02.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|