@contentful/experience-design-system-cli 2.36.2-dev-build-c4497102.0 → 2.36.2-dev-build-4bcc1e36.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 +35 -73
- package/dist/index.js +35 -84
- package/dist/package.json +1 -1
- package/dist/src/tui/debug-store.d.ts +0 -1
- package/legacy/package.json +1 -1
- package/package.json +2 -2
- package/dist/src/tui/help/help-info.d.ts +0 -9
package/dist/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/experience-design-system-cli/app.tsx
|
|
2
|
-
import { useEffect as useEffect8, useState as
|
|
2
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3
3
|
|
|
4
4
|
// packages/experience-design-system-cli/src/tui/home/home.tsx
|
|
5
5
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
@@ -509,7 +509,7 @@ function startReadingTerminal() {
|
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
512
|
-
import { useEffect as useEffect3
|
|
512
|
+
import { useEffect as useEffect3 } from "react";
|
|
513
513
|
import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
|
|
514
514
|
|
|
515
515
|
// packages/experience-design-system-cli/src/tui/debug-store.ts
|
|
@@ -587,9 +587,6 @@ var SESSION_ID = generateSessionId();
|
|
|
587
587
|
function sessionDebugDir() {
|
|
588
588
|
return join5(debugSessionsDir(), SESSION_ID);
|
|
589
589
|
}
|
|
590
|
-
function currentDebugSessionDir() {
|
|
591
|
-
return sessionDebugDir();
|
|
592
|
-
}
|
|
593
590
|
void isDebugModeEnabled().then((enabled) => {
|
|
594
591
|
if (!enabled) return void 0;
|
|
595
592
|
return mkdir2(sessionDebugDir(), { recursive: true });
|
|
@@ -697,44 +694,11 @@ process.once("SIGINT", () => {
|
|
|
697
694
|
});
|
|
698
695
|
});
|
|
699
696
|
|
|
700
|
-
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
701
|
-
async function readHelpInfo() {
|
|
702
|
-
const debugMode = await readDebugModeSetting();
|
|
703
|
-
return {
|
|
704
|
-
storage: [
|
|
705
|
-
{ label: "Config folder", value: configRoot() },
|
|
706
|
-
{ label: "Settings file", value: configFilePath() },
|
|
707
|
-
{ label: "Debug logs", value: debugSessionsDir() }
|
|
708
|
-
],
|
|
709
|
-
troubleshooting: [
|
|
710
|
-
{ label: "CLI version", value: readPackageVersion() },
|
|
711
|
-
{ label: "Node", value: process.version },
|
|
712
|
-
{ label: "Platform", value: `${process.platform} ${process.arch}` },
|
|
713
|
-
{ label: "Debug Mode", value: debugMode.enabled ? "on" : "off" },
|
|
714
|
-
{
|
|
715
|
-
label: "This session",
|
|
716
|
-
value: debugMode.enabled ? currentDebugSessionDir() : "no logs written while Debug Mode is off"
|
|
717
|
-
}
|
|
718
|
-
]
|
|
719
|
-
};
|
|
720
|
-
}
|
|
721
|
-
|
|
722
697
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
723
|
-
import {
|
|
724
|
-
function Section({ title, rows }) {
|
|
725
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
726
|
-
/* @__PURE__ */ jsx6(Text6, { bold: true, color: PALETTE.accent, children: title }),
|
|
727
|
-
rows.map((row) => /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
728
|
-
/* @__PURE__ */ jsx6(Box5, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: row.label }) }),
|
|
729
|
-
/* @__PURE__ */ jsx6(Text6, { children: row.value })
|
|
730
|
-
] }, row.label))
|
|
731
|
-
] });
|
|
732
|
-
}
|
|
698
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
733
699
|
function HelpScreen({ onDone }) {
|
|
734
|
-
const [info, setInfo] = useState5();
|
|
735
700
|
useEffect3(() => {
|
|
736
701
|
startDebugRun({ flow: "help", step: "01-help", menuOption: "Help", inputs: {} });
|
|
737
|
-
void readHelpInfo().then(setInfo);
|
|
738
702
|
}, []);
|
|
739
703
|
const leave = (exitMethod) => {
|
|
740
704
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
@@ -750,13 +714,11 @@ function HelpScreen({ onDone }) {
|
|
|
750
714
|
return;
|
|
751
715
|
}
|
|
752
716
|
});
|
|
753
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1,
|
|
717
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
754
718
|
/* @__PURE__ */ jsx6(Text6, { bold: true, children: "Help" }),
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
/* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
|
|
759
|
-
] }) : /* @__PURE__ */ jsx6(Text6, { color: PALETTE.accent, children: "Loading..." }),
|
|
719
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
720
|
+
/* @__PURE__ */ jsx6(Text6, { children: "This is a placeholder screen for v2 help content." }),
|
|
721
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
760
722
|
/* @__PURE__ */ jsx6(
|
|
761
723
|
ControlHints,
|
|
762
724
|
{
|
|
@@ -770,14 +732,14 @@ function HelpScreen({ onDone }) {
|
|
|
770
732
|
}
|
|
771
733
|
|
|
772
734
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
773
|
-
import { useState as
|
|
735
|
+
import { useState as useState5 } from "react";
|
|
774
736
|
import { Box as Box6, Text as Text7, useInput as useInput6 } from "ink";
|
|
775
737
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
776
738
|
function SettingsScreen({
|
|
777
739
|
onNavigate,
|
|
778
740
|
onBack
|
|
779
741
|
}) {
|
|
780
|
-
const [focusIdx, setFocusIdx] =
|
|
742
|
+
const [focusIdx, setFocusIdx] = useState5(0);
|
|
781
743
|
const items = [
|
|
782
744
|
{ label: "Configuration", screen: "settings-configuration" },
|
|
783
745
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
@@ -825,7 +787,7 @@ function SettingsScreen({
|
|
|
825
787
|
}
|
|
826
788
|
|
|
827
789
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
828
|
-
import { useEffect as useEffect4, useState as
|
|
790
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
829
791
|
import { Box as Box7, Text as Text8, useInput as useInput7 } from "ink";
|
|
830
792
|
import TextInput3 from "ink-text-input";
|
|
831
793
|
|
|
@@ -858,7 +820,7 @@ async function writeCredentials(config) {
|
|
|
858
820
|
}
|
|
859
821
|
|
|
860
822
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
861
|
-
import { Fragment
|
|
823
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
862
824
|
var FIELD_ORDER = [
|
|
863
825
|
"spaceId",
|
|
864
826
|
"environmentId",
|
|
@@ -886,13 +848,13 @@ var FIELD_LABELS = {
|
|
|
886
848
|
defaultTokenFile: "Default token file (optional)"
|
|
887
849
|
};
|
|
888
850
|
function ConfigurationScreen({ onDone }) {
|
|
889
|
-
const [stage, setStage] =
|
|
890
|
-
const [config, setConfig] =
|
|
891
|
-
const [activeField, setActiveField] =
|
|
892
|
-
const [notice, setNotice] =
|
|
893
|
-
const [lastSaved, setLastSaved] =
|
|
894
|
-
const [editing, setEditing] =
|
|
895
|
-
const [valueBeforeEdit, setValueBeforeEdit] =
|
|
851
|
+
const [stage, setStage] = useState6("loading");
|
|
852
|
+
const [config, setConfig] = useState6(null);
|
|
853
|
+
const [activeField, setActiveField] = useState6("spaceId");
|
|
854
|
+
const [notice, setNotice] = useState6(null);
|
|
855
|
+
const [lastSaved, setLastSaved] = useState6(null);
|
|
856
|
+
const [editing, setEditing] = useState6(false);
|
|
857
|
+
const [valueBeforeEdit, setValueBeforeEdit] = useState6("");
|
|
896
858
|
useEffect4(() => {
|
|
897
859
|
readCredentials().then((cfg) => {
|
|
898
860
|
setConfig(cfg);
|
|
@@ -1000,7 +962,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
1000
962
|
) : /* @__PURE__ */ jsx8(Text8, { children: display || /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: "(empty)" }) })
|
|
1001
963
|
] }, field);
|
|
1002
964
|
}) }),
|
|
1003
|
-
notice && /* @__PURE__ */ jsxs7(
|
|
965
|
+
notice && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1004
966
|
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
1005
967
|
/* @__PURE__ */ jsxs7(Text8, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
1006
968
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
@@ -1030,7 +992,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
1030
992
|
}
|
|
1031
993
|
|
|
1032
994
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1033
|
-
import { useEffect as useEffect5, useState as
|
|
995
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
1034
996
|
import { Box as Box8, Text as Text9, useInput as useInput8 } from "ink";
|
|
1035
997
|
|
|
1036
998
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
@@ -1049,10 +1011,10 @@ async function writeAnalyticsSetting(setting) {
|
|
|
1049
1011
|
}
|
|
1050
1012
|
|
|
1051
1013
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1052
|
-
import { Fragment as
|
|
1014
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1053
1015
|
function OptInAnalyticsScreen({ onDone }) {
|
|
1054
|
-
const [loading, setLoading] =
|
|
1055
|
-
const [enabled, setEnabled] =
|
|
1016
|
+
const [loading, setLoading] = useState7(true);
|
|
1017
|
+
const [enabled, setEnabled] = useState7(true);
|
|
1056
1018
|
useEffect5(() => {
|
|
1057
1019
|
readAnalyticsSetting().then((setting) => {
|
|
1058
1020
|
setEnabled(setting.enabled);
|
|
@@ -1083,7 +1045,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1083
1045
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1084
1046
|
/* @__PURE__ */ jsx9(Text9, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
1085
1047
|
/* @__PURE__ */ jsx9(Text9, { children: " " }),
|
|
1086
|
-
loading ? /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(
|
|
1048
|
+
loading ? /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1087
1049
|
/* @__PURE__ */ jsxs8(Text9, { children: [
|
|
1088
1050
|
"Share anonymous usage data:",
|
|
1089
1051
|
" ",
|
|
@@ -1107,12 +1069,12 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1107
1069
|
}
|
|
1108
1070
|
|
|
1109
1071
|
// packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
|
|
1110
|
-
import { useEffect as useEffect6, useState as
|
|
1072
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
1111
1073
|
import { Box as Box9, Text as Text10, useInput as useInput9 } from "ink";
|
|
1112
1074
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1113
1075
|
var UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
|
|
1114
1076
|
function UpgradeScreen({ onDone }) {
|
|
1115
|
-
const [upgradeCheck, setUpgradeCheck] =
|
|
1077
|
+
const [upgradeCheck, setUpgradeCheck] = useState8();
|
|
1116
1078
|
useEffect6(() => {
|
|
1117
1079
|
startDebugRun({
|
|
1118
1080
|
flow: "upgrade",
|
|
@@ -1178,12 +1140,12 @@ function renderBody(upgradeCheck) {
|
|
|
1178
1140
|
}
|
|
1179
1141
|
|
|
1180
1142
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
1181
|
-
import { useEffect as useEffect7, useState as
|
|
1143
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1182
1144
|
import { Box as Box10, Text as Text11, useInput as useInput10 } from "ink";
|
|
1183
1145
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1184
1146
|
function DebugModeScreen({ onDone }) {
|
|
1185
|
-
const [loading, setLoading] =
|
|
1186
|
-
const [enabled, setEnabled] =
|
|
1147
|
+
const [loading, setLoading] = useState9(true);
|
|
1148
|
+
const [enabled, setEnabled] = useState9(true);
|
|
1187
1149
|
useEffect7(() => {
|
|
1188
1150
|
readDebugModeSetting().then((setting) => {
|
|
1189
1151
|
setEnabled(setting.enabled);
|
|
@@ -1233,13 +1195,13 @@ function DebugModeScreen({ onDone }) {
|
|
|
1233
1195
|
}
|
|
1234
1196
|
|
|
1235
1197
|
// packages/experience-design-system-cli/app.tsx
|
|
1236
|
-
import { Fragment as
|
|
1198
|
+
import { Fragment as Fragment3, jsx as jsx12 } from "react/jsx-runtime";
|
|
1237
1199
|
function App({ onLaunchImport, importExitCode }) {
|
|
1238
1200
|
const returnedFromImport = importExitCode !== void 0;
|
|
1239
|
-
const [screen, setScreen] =
|
|
1240
|
-
const [showImportResult, setShowImportResult] =
|
|
1241
|
-
const [projectPath, setProjectPath] =
|
|
1242
|
-
const [importDefaults, setImportDefaults] =
|
|
1201
|
+
const [screen, setScreen] = useState10(returnedFromImport ? "import" : "start");
|
|
1202
|
+
const [showImportResult, setShowImportResult] = useState10(returnedFromImport);
|
|
1203
|
+
const [projectPath, setProjectPath] = useState10();
|
|
1204
|
+
const [importDefaults, setImportDefaults] = useState10();
|
|
1243
1205
|
useEffect8(() => {
|
|
1244
1206
|
if (screen !== "import") {
|
|
1245
1207
|
setImportDefaults(void 0);
|
|
@@ -1263,7 +1225,7 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1263
1225
|
switch (screen) {
|
|
1264
1226
|
case "import":
|
|
1265
1227
|
if (showImportResult) return /* @__PURE__ */ jsx12(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
1266
|
-
if (importDefaults === void 0) return /* @__PURE__ */ jsx12(
|
|
1228
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx12(Fragment3, {});
|
|
1267
1229
|
if (projectPath === void 0) {
|
|
1268
1230
|
return /* @__PURE__ */ jsx12(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
1269
1231
|
}
|
package/dist/index.js
CHANGED
|
@@ -707,9 +707,6 @@ function generateSessionId() {
|
|
|
707
707
|
function sessionDebugDir() {
|
|
708
708
|
return join5(debugSessionsDir(), SESSION_ID);
|
|
709
709
|
}
|
|
710
|
-
function currentDebugSessionDir() {
|
|
711
|
-
return sessionDebugDir();
|
|
712
|
-
}
|
|
713
710
|
async function isDebugModeEnabled() {
|
|
714
711
|
try {
|
|
715
712
|
return (await readDebugModeSetting()).enabled;
|
|
@@ -827,55 +824,13 @@ var init_debug_store = __esm({
|
|
|
827
824
|
}
|
|
828
825
|
});
|
|
829
826
|
|
|
830
|
-
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
831
|
-
async function readHelpInfo() {
|
|
832
|
-
const debugMode = await readDebugModeSetting();
|
|
833
|
-
return {
|
|
834
|
-
storage: [
|
|
835
|
-
{ label: "Config folder", value: configRoot() },
|
|
836
|
-
{ label: "Settings file", value: configFilePath() },
|
|
837
|
-
{ label: "Debug logs", value: debugSessionsDir() }
|
|
838
|
-
],
|
|
839
|
-
troubleshooting: [
|
|
840
|
-
{ label: "CLI version", value: readPackageVersion() },
|
|
841
|
-
{ label: "Node", value: process.version },
|
|
842
|
-
{ label: "Platform", value: `${process.platform} ${process.arch}` },
|
|
843
|
-
{ label: "Debug Mode", value: debugMode.enabled ? "on" : "off" },
|
|
844
|
-
{
|
|
845
|
-
label: "This session",
|
|
846
|
-
value: debugMode.enabled ? currentDebugSessionDir() : "no logs written while Debug Mode is off"
|
|
847
|
-
}
|
|
848
|
-
]
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
var init_help_info = __esm({
|
|
852
|
-
"packages/experience-design-system-cli/src/tui/help/help-info.ts"() {
|
|
853
|
-
"use strict";
|
|
854
|
-
init_config();
|
|
855
|
-
init_debug_store();
|
|
856
|
-
init_debug_mode_store();
|
|
857
|
-
init_version();
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
|
|
861
827
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
862
|
-
import { useEffect as useEffect3
|
|
828
|
+
import { useEffect as useEffect3 } from "react";
|
|
863
829
|
import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
|
|
864
|
-
import {
|
|
865
|
-
function Section({ title, rows }) {
|
|
866
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
867
|
-
/* @__PURE__ */ jsx6(Text6, { bold: true, color: PALETTE.accent, children: title }),
|
|
868
|
-
rows.map((row) => /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
869
|
-
/* @__PURE__ */ jsx6(Box5, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: row.label }) }),
|
|
870
|
-
/* @__PURE__ */ jsx6(Text6, { children: row.value })
|
|
871
|
-
] }, row.label))
|
|
872
|
-
] });
|
|
873
|
-
}
|
|
830
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
874
831
|
function HelpScreen({ onDone }) {
|
|
875
|
-
const [info, setInfo] = useState5();
|
|
876
832
|
useEffect3(() => {
|
|
877
833
|
startDebugRun({ flow: "help", step: "01-help", menuOption: "Help", inputs: {} });
|
|
878
|
-
void readHelpInfo().then(setInfo);
|
|
879
834
|
}, []);
|
|
880
835
|
const leave = (exitMethod) => {
|
|
881
836
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
@@ -891,13 +846,11 @@ function HelpScreen({ onDone }) {
|
|
|
891
846
|
return;
|
|
892
847
|
}
|
|
893
848
|
});
|
|
894
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1,
|
|
849
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
895
850
|
/* @__PURE__ */ jsx6(Text6, { bold: true, children: "Help" }),
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
/* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
|
|
900
|
-
] }) : /* @__PURE__ */ jsx6(Text6, { color: PALETTE.accent, children: "Loading..." }),
|
|
851
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
852
|
+
/* @__PURE__ */ jsx6(Text6, { children: "This is a placeholder screen for v2 help content." }),
|
|
853
|
+
/* @__PURE__ */ jsx6(Text6, { children: " " }),
|
|
901
854
|
/* @__PURE__ */ jsx6(
|
|
902
855
|
ControlHints,
|
|
903
856
|
{
|
|
@@ -912,22 +865,20 @@ function HelpScreen({ onDone }) {
|
|
|
912
865
|
var init_PageContainer2 = __esm({
|
|
913
866
|
"packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
|
|
914
867
|
"use strict";
|
|
915
|
-
init_home_theme();
|
|
916
868
|
init_debug_store();
|
|
917
869
|
init_control_hints();
|
|
918
|
-
init_help_info();
|
|
919
870
|
}
|
|
920
871
|
});
|
|
921
872
|
|
|
922
873
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
923
|
-
import { useState as
|
|
874
|
+
import { useState as useState5 } from "react";
|
|
924
875
|
import { Box as Box6, Text as Text7, useInput as useInput6 } from "ink";
|
|
925
876
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
926
877
|
function SettingsScreen({
|
|
927
878
|
onNavigate,
|
|
928
879
|
onBack
|
|
929
880
|
}) {
|
|
930
|
-
const [focusIdx, setFocusIdx] =
|
|
881
|
+
const [focusIdx, setFocusIdx] = useState5(0);
|
|
931
882
|
const items = [
|
|
932
883
|
{ label: "Configuration", screen: "settings-configuration" },
|
|
933
884
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
@@ -1022,10 +973,10 @@ var init_config_store = __esm({
|
|
|
1022
973
|
});
|
|
1023
974
|
|
|
1024
975
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
1025
|
-
import { useEffect as useEffect4, useState as
|
|
976
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
1026
977
|
import { Box as Box7, Text as Text8, useInput as useInput7 } from "ink";
|
|
1027
978
|
import TextInput3 from "ink-text-input";
|
|
1028
|
-
import { Fragment
|
|
979
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1029
980
|
function debugFields(config) {
|
|
1030
981
|
return {
|
|
1031
982
|
space_id: config?.spaceId ?? "",
|
|
@@ -1037,13 +988,13 @@ function debugFields(config) {
|
|
|
1037
988
|
};
|
|
1038
989
|
}
|
|
1039
990
|
function ConfigurationScreen({ onDone }) {
|
|
1040
|
-
const [stage, setStage] =
|
|
1041
|
-
const [config, setConfig] =
|
|
1042
|
-
const [activeField, setActiveField] =
|
|
1043
|
-
const [notice, setNotice] =
|
|
1044
|
-
const [lastSaved, setLastSaved] =
|
|
1045
|
-
const [editing, setEditing] =
|
|
1046
|
-
const [valueBeforeEdit, setValueBeforeEdit] =
|
|
991
|
+
const [stage, setStage] = useState6("loading");
|
|
992
|
+
const [config, setConfig] = useState6(null);
|
|
993
|
+
const [activeField, setActiveField] = useState6("spaceId");
|
|
994
|
+
const [notice, setNotice] = useState6(null);
|
|
995
|
+
const [lastSaved, setLastSaved] = useState6(null);
|
|
996
|
+
const [editing, setEditing] = useState6(false);
|
|
997
|
+
const [valueBeforeEdit, setValueBeforeEdit] = useState6("");
|
|
1047
998
|
useEffect4(() => {
|
|
1048
999
|
readCredentials().then((cfg) => {
|
|
1049
1000
|
setConfig(cfg);
|
|
@@ -1151,7 +1102,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
1151
1102
|
) : /* @__PURE__ */ jsx8(Text8, { children: display || /* @__PURE__ */ jsx8(Text8, { dimColor: true, children: "(empty)" }) })
|
|
1152
1103
|
] }, field);
|
|
1153
1104
|
}) }),
|
|
1154
|
-
notice && /* @__PURE__ */ jsxs7(
|
|
1105
|
+
notice && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1155
1106
|
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
1156
1107
|
/* @__PURE__ */ jsxs7(Text8, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
1157
1108
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
@@ -1228,12 +1179,12 @@ var init_analytics_store = __esm({
|
|
|
1228
1179
|
});
|
|
1229
1180
|
|
|
1230
1181
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1231
|
-
import { useEffect as useEffect5, useState as
|
|
1182
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
1232
1183
|
import { Box as Box8, Text as Text9, useInput as useInput8 } from "ink";
|
|
1233
|
-
import { Fragment as
|
|
1184
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1234
1185
|
function OptInAnalyticsScreen({ onDone }) {
|
|
1235
|
-
const [loading, setLoading] =
|
|
1236
|
-
const [enabled, setEnabled] =
|
|
1186
|
+
const [loading, setLoading] = useState7(true);
|
|
1187
|
+
const [enabled, setEnabled] = useState7(true);
|
|
1237
1188
|
useEffect5(() => {
|
|
1238
1189
|
readAnalyticsSetting().then((setting) => {
|
|
1239
1190
|
setEnabled(setting.enabled);
|
|
@@ -1264,7 +1215,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1264
1215
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1265
1216
|
/* @__PURE__ */ jsx9(Text9, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
1266
1217
|
/* @__PURE__ */ jsx9(Text9, { children: " " }),
|
|
1267
|
-
loading ? /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(
|
|
1218
|
+
loading ? /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1268
1219
|
/* @__PURE__ */ jsxs8(Text9, { children: [
|
|
1269
1220
|
"Share anonymous usage data:",
|
|
1270
1221
|
" ",
|
|
@@ -1297,11 +1248,11 @@ var init_screen3 = __esm({
|
|
|
1297
1248
|
});
|
|
1298
1249
|
|
|
1299
1250
|
// packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
|
|
1300
|
-
import { useEffect as useEffect6, useState as
|
|
1251
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
1301
1252
|
import { Box as Box9, Text as Text10, useInput as useInput9 } from "ink";
|
|
1302
1253
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1303
1254
|
function UpgradeScreen({ onDone }) {
|
|
1304
|
-
const [upgradeCheck, setUpgradeCheck] =
|
|
1255
|
+
const [upgradeCheck, setUpgradeCheck] = useState8();
|
|
1305
1256
|
useEffect6(() => {
|
|
1306
1257
|
startDebugRun({
|
|
1307
1258
|
flow: "upgrade",
|
|
@@ -1377,12 +1328,12 @@ var init_PageContainer4 = __esm({
|
|
|
1377
1328
|
});
|
|
1378
1329
|
|
|
1379
1330
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
1380
|
-
import { useEffect as useEffect7, useState as
|
|
1331
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1381
1332
|
import { Box as Box10, Text as Text11, useInput as useInput10 } from "ink";
|
|
1382
1333
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1383
1334
|
function DebugModeScreen({ onDone }) {
|
|
1384
|
-
const [loading, setLoading] =
|
|
1385
|
-
const [enabled, setEnabled] =
|
|
1335
|
+
const [loading, setLoading] = useState9(true);
|
|
1336
|
+
const [enabled, setEnabled] = useState9(true);
|
|
1386
1337
|
useEffect7(() => {
|
|
1387
1338
|
readDebugModeSetting().then((setting) => {
|
|
1388
1339
|
setEnabled(setting.enabled);
|
|
@@ -1445,14 +1396,14 @@ var app_exports = {};
|
|
|
1445
1396
|
__export(app_exports, {
|
|
1446
1397
|
runApp: () => runApp
|
|
1447
1398
|
});
|
|
1448
|
-
import { useEffect as useEffect8, useState as
|
|
1449
|
-
import { Fragment as
|
|
1399
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
1400
|
+
import { Fragment as Fragment3, jsx as jsx12 } from "react/jsx-runtime";
|
|
1450
1401
|
function App({ onLaunchImport, importExitCode }) {
|
|
1451
1402
|
const returnedFromImport = importExitCode !== void 0;
|
|
1452
|
-
const [screen, setScreen] =
|
|
1453
|
-
const [showImportResult, setShowImportResult] =
|
|
1454
|
-
const [projectPath, setProjectPath] =
|
|
1455
|
-
const [importDefaults, setImportDefaults] =
|
|
1403
|
+
const [screen, setScreen] = useState10(returnedFromImport ? "import" : "start");
|
|
1404
|
+
const [showImportResult, setShowImportResult] = useState10(returnedFromImport);
|
|
1405
|
+
const [projectPath, setProjectPath] = useState10();
|
|
1406
|
+
const [importDefaults, setImportDefaults] = useState10();
|
|
1456
1407
|
useEffect8(() => {
|
|
1457
1408
|
if (screen !== "import") {
|
|
1458
1409
|
setImportDefaults(void 0);
|
|
@@ -1476,7 +1427,7 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1476
1427
|
switch (screen) {
|
|
1477
1428
|
case "import":
|
|
1478
1429
|
if (showImportResult) return /* @__PURE__ */ jsx12(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
1479
|
-
if (importDefaults === void 0) return /* @__PURE__ */ jsx12(
|
|
1430
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx12(Fragment3, {});
|
|
1480
1431
|
if (projectPath === void 0) {
|
|
1481
1432
|
return /* @__PURE__ */ jsx12(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
1482
1433
|
}
|
package/dist/package.json
CHANGED
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.36.2-dev-build-
|
|
3
|
+
"version": "2.36.2-dev-build-4bcc1e36.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"svelte": "^5.56.4",
|
|
43
43
|
"ts-morph": "^27.0.2",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
|
-
"@contentful/experience-design-system-types": "2.36.2-dev-build-
|
|
45
|
+
"@contentful/experience-design-system-types": "2.36.2-dev-build-4bcc1e36.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@tsconfig/node24": "^24.0.4",
|