@contentful/experience-design-system-cli 2.36.2-dev-build-7b317500.0 → 2.36.2-dev-build-dc6fb2aa.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";
|
|
@@ -493,7 +493,7 @@ function startReadingTerminal() {
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
496
|
-
import { useEffect as useEffect3
|
|
496
|
+
import { useEffect as useEffect3 } from "react";
|
|
497
497
|
import { Box as Box5, Text as Text5, useInput as useInput5 } from "ink";
|
|
498
498
|
|
|
499
499
|
// packages/experience-design-system-cli/src/tui/debug-store.ts
|
|
@@ -571,9 +571,6 @@ var SESSION_ID = generateSessionId();
|
|
|
571
571
|
function sessionDebugDir() {
|
|
572
572
|
return join5(debugSessionsDir(), SESSION_ID);
|
|
573
573
|
}
|
|
574
|
-
function currentDebugSessionDir() {
|
|
575
|
-
return sessionDebugDir();
|
|
576
|
-
}
|
|
577
574
|
void isDebugModeEnabled().then((enabled) => {
|
|
578
575
|
if (!enabled) return void 0;
|
|
579
576
|
return mkdir2(sessionDebugDir(), { recursive: true });
|
|
@@ -681,44 +678,11 @@ process.once("SIGINT", () => {
|
|
|
681
678
|
});
|
|
682
679
|
});
|
|
683
680
|
|
|
684
|
-
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
685
|
-
async function readHelpInfo() {
|
|
686
|
-
const debugMode = await readDebugModeSetting();
|
|
687
|
-
return {
|
|
688
|
-
storage: [
|
|
689
|
-
{ label: "Config folder", value: configRoot() },
|
|
690
|
-
{ label: "Settings file", value: configFilePath() },
|
|
691
|
-
{ label: "Debug logs", value: debugSessionsDir() }
|
|
692
|
-
],
|
|
693
|
-
troubleshooting: [
|
|
694
|
-
{ label: "CLI version", value: readPackageVersion() },
|
|
695
|
-
{ label: "Node", value: process.version },
|
|
696
|
-
{ label: "Platform", value: `${process.platform} ${process.arch}` },
|
|
697
|
-
{ label: "Debug Mode", value: debugMode.enabled ? "on" : "off" },
|
|
698
|
-
{
|
|
699
|
-
label: "This session",
|
|
700
|
-
value: debugMode.enabled ? currentDebugSessionDir() : "no logs written while Debug Mode is off"
|
|
701
|
-
}
|
|
702
|
-
]
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
|
|
706
681
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
707
|
-
import {
|
|
708
|
-
function Section({ title, rows }) {
|
|
709
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
710
|
-
/* @__PURE__ */ jsx5(Text5, { bold: true, color: PALETTE.accent, children: title }),
|
|
711
|
-
rows.map((row) => /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
712
|
-
/* @__PURE__ */ jsx5(Box5, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: row.label }) }),
|
|
713
|
-
/* @__PURE__ */ jsx5(Text5, { children: row.value })
|
|
714
|
-
] }, row.label))
|
|
715
|
-
] });
|
|
716
|
-
}
|
|
682
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
717
683
|
function HelpScreen({ onDone }) {
|
|
718
|
-
const [info, setInfo] = useState5();
|
|
719
684
|
useEffect3(() => {
|
|
720
685
|
startDebugRun({ flow: "help", step: "01-help", menuOption: "Help", inputs: {} });
|
|
721
|
-
void readHelpInfo().then(setInfo);
|
|
722
686
|
}, []);
|
|
723
687
|
const leave = (exitMethod) => {
|
|
724
688
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
@@ -734,26 +698,24 @@ function HelpScreen({ onDone }) {
|
|
|
734
698
|
return;
|
|
735
699
|
}
|
|
736
700
|
});
|
|
737
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1,
|
|
701
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
738
702
|
/* @__PURE__ */ jsx5(Text5, { bold: true, children: "Help" }),
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
/* @__PURE__ */ jsx5(Text5, { 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." })
|
|
743
|
-
] }) : /* @__PURE__ */ jsx5(Text5, { color: PALETTE.accent, children: "Loading..." }),
|
|
703
|
+
/* @__PURE__ */ jsx5(Text5, { children: " " }),
|
|
704
|
+
/* @__PURE__ */ jsx5(Text5, { children: "This is a placeholder screen for v2 help content." }),
|
|
705
|
+
/* @__PURE__ */ jsx5(Text5, { children: " " }),
|
|
744
706
|
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "[Enter] Complete [Esc/q] Exit \u2014 both return to Start" })
|
|
745
707
|
] });
|
|
746
708
|
}
|
|
747
709
|
|
|
748
710
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
749
|
-
import { useState as
|
|
711
|
+
import { useState as useState5 } from "react";
|
|
750
712
|
import { Box as Box6, Text as Text6, useInput as useInput6 } from "ink";
|
|
751
713
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
752
714
|
function SettingsScreen({
|
|
753
715
|
onNavigate,
|
|
754
716
|
onBack
|
|
755
717
|
}) {
|
|
756
|
-
const [focusIdx, setFocusIdx] =
|
|
718
|
+
const [focusIdx, setFocusIdx] = useState5(0);
|
|
757
719
|
const items = [
|
|
758
720
|
{ label: "Configuration", screen: "settings-configuration" },
|
|
759
721
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
@@ -792,7 +754,7 @@ function SettingsScreen({
|
|
|
792
754
|
}
|
|
793
755
|
|
|
794
756
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
795
|
-
import { useEffect as useEffect4, useState as
|
|
757
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
796
758
|
import { Box as Box7, Text as Text7, useInput as useInput7 } from "ink";
|
|
797
759
|
import TextInput3 from "ink-text-input";
|
|
798
760
|
|
|
@@ -825,7 +787,7 @@ async function writeCredentials(config) {
|
|
|
825
787
|
}
|
|
826
788
|
|
|
827
789
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
828
|
-
import { Fragment
|
|
790
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
829
791
|
var FIELD_ORDER = [
|
|
830
792
|
"spaceId",
|
|
831
793
|
"environmentId",
|
|
@@ -853,13 +815,13 @@ var FIELD_LABELS = {
|
|
|
853
815
|
defaultTokenFile: "Default token file (optional)"
|
|
854
816
|
};
|
|
855
817
|
function ConfigurationScreen({ onDone }) {
|
|
856
|
-
const [stage, setStage] =
|
|
857
|
-
const [config, setConfig] =
|
|
858
|
-
const [activeField, setActiveField] =
|
|
859
|
-
const [notice, setNotice] =
|
|
860
|
-
const [lastSaved, setLastSaved] =
|
|
861
|
-
const [editing, setEditing] =
|
|
862
|
-
const [valueBeforeEdit, setValueBeforeEdit] =
|
|
818
|
+
const [stage, setStage] = useState6("loading");
|
|
819
|
+
const [config, setConfig] = useState6(null);
|
|
820
|
+
const [activeField, setActiveField] = useState6("spaceId");
|
|
821
|
+
const [notice, setNotice] = useState6(null);
|
|
822
|
+
const [lastSaved, setLastSaved] = useState6(null);
|
|
823
|
+
const [editing, setEditing] = useState6(false);
|
|
824
|
+
const [valueBeforeEdit, setValueBeforeEdit] = useState6("");
|
|
863
825
|
useEffect4(() => {
|
|
864
826
|
readCredentials().then((cfg) => {
|
|
865
827
|
setConfig(cfg);
|
|
@@ -967,7 +929,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
967
929
|
) : /* @__PURE__ */ jsx7(Text7, { children: display || /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "(empty)" }) })
|
|
968
930
|
] }, field);
|
|
969
931
|
}) }),
|
|
970
|
-
notice && /* @__PURE__ */ jsxs7(
|
|
932
|
+
notice && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
971
933
|
/* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
972
934
|
/* @__PURE__ */ jsxs7(Text7, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
973
935
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
@@ -981,7 +943,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
981
943
|
}
|
|
982
944
|
|
|
983
945
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
984
|
-
import { useEffect as useEffect5, useState as
|
|
946
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
985
947
|
import { Box as Box8, Text as Text8, useInput as useInput8 } from "ink";
|
|
986
948
|
|
|
987
949
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
@@ -1000,10 +962,10 @@ async function writeAnalyticsSetting(setting) {
|
|
|
1000
962
|
}
|
|
1001
963
|
|
|
1002
964
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1003
|
-
import { Fragment as
|
|
965
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1004
966
|
function OptInAnalyticsScreen({ onDone }) {
|
|
1005
|
-
const [loading, setLoading] =
|
|
1006
|
-
const [enabled, setEnabled] =
|
|
967
|
+
const [loading, setLoading] = useState7(true);
|
|
968
|
+
const [enabled, setEnabled] = useState7(true);
|
|
1007
969
|
useEffect5(() => {
|
|
1008
970
|
readAnalyticsSetting().then((setting) => {
|
|
1009
971
|
setEnabled(setting.enabled);
|
|
@@ -1034,7 +996,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1034
996
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1035
997
|
/* @__PURE__ */ jsx8(Text8, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
1036
998
|
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
1037
|
-
loading ? /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(
|
|
999
|
+
loading ? /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1038
1000
|
/* @__PURE__ */ jsxs8(Text8, { children: [
|
|
1039
1001
|
"Share anonymous usage data:",
|
|
1040
1002
|
" ",
|
|
@@ -1050,12 +1012,12 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1050
1012
|
}
|
|
1051
1013
|
|
|
1052
1014
|
// packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
|
|
1053
|
-
import { useEffect as useEffect6, useState as
|
|
1015
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
1054
1016
|
import { Box as Box9, Text as Text9, useInput as useInput9 } from "ink";
|
|
1055
1017
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1056
1018
|
var UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
|
|
1057
1019
|
function UpgradeScreen({ onDone }) {
|
|
1058
|
-
const [upgradeCheck, setUpgradeCheck] =
|
|
1020
|
+
const [upgradeCheck, setUpgradeCheck] = useState8();
|
|
1059
1021
|
useEffect6(() => {
|
|
1060
1022
|
startDebugRun({
|
|
1061
1023
|
flow: "upgrade",
|
|
@@ -1121,12 +1083,12 @@ function renderBody(upgradeCheck) {
|
|
|
1121
1083
|
}
|
|
1122
1084
|
|
|
1123
1085
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
1124
|
-
import { useEffect as useEffect7, useState as
|
|
1086
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1125
1087
|
import { Box as Box10, Text as Text10, useInput as useInput10 } from "ink";
|
|
1126
1088
|
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1127
1089
|
function DebugModeScreen({ onDone }) {
|
|
1128
|
-
const [loading, setLoading] =
|
|
1129
|
-
const [enabled, setEnabled] =
|
|
1090
|
+
const [loading, setLoading] = useState9(true);
|
|
1091
|
+
const [enabled, setEnabled] = useState9(true);
|
|
1130
1092
|
useEffect7(() => {
|
|
1131
1093
|
readDebugModeSetting().then((setting) => {
|
|
1132
1094
|
setEnabled(setting.enabled);
|
|
@@ -1168,13 +1130,13 @@ function DebugModeScreen({ onDone }) {
|
|
|
1168
1130
|
}
|
|
1169
1131
|
|
|
1170
1132
|
// packages/experience-design-system-cli/app.tsx
|
|
1171
|
-
import { Fragment as
|
|
1133
|
+
import { Fragment as Fragment3, jsx as jsx11 } from "react/jsx-runtime";
|
|
1172
1134
|
function App({ onLaunchImport, importExitCode }) {
|
|
1173
1135
|
const returnedFromImport = importExitCode !== void 0;
|
|
1174
|
-
const [screen, setScreen] =
|
|
1175
|
-
const [showImportResult, setShowImportResult] =
|
|
1176
|
-
const [projectPath, setProjectPath] =
|
|
1177
|
-
const [importDefaults, setImportDefaults] =
|
|
1136
|
+
const [screen, setScreen] = useState10(returnedFromImport ? "import" : "start");
|
|
1137
|
+
const [showImportResult, setShowImportResult] = useState10(returnedFromImport);
|
|
1138
|
+
const [projectPath, setProjectPath] = useState10();
|
|
1139
|
+
const [importDefaults, setImportDefaults] = useState10();
|
|
1178
1140
|
useEffect8(() => {
|
|
1179
1141
|
if (screen !== "import") {
|
|
1180
1142
|
setImportDefaults(void 0);
|
|
@@ -1198,7 +1160,7 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1198
1160
|
switch (screen) {
|
|
1199
1161
|
case "import":
|
|
1200
1162
|
if (showImportResult) return /* @__PURE__ */ jsx11(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
1201
|
-
if (importDefaults === void 0) return /* @__PURE__ */ jsx11(
|
|
1163
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx11(Fragment3, {});
|
|
1202
1164
|
if (projectPath === void 0) {
|
|
1203
1165
|
return /* @__PURE__ */ jsx11(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
1204
1166
|
}
|
package/dist/index.js
CHANGED
|
@@ -684,9 +684,6 @@ function generateSessionId() {
|
|
|
684
684
|
function sessionDebugDir() {
|
|
685
685
|
return join5(debugSessionsDir(), SESSION_ID);
|
|
686
686
|
}
|
|
687
|
-
function currentDebugSessionDir() {
|
|
688
|
-
return sessionDebugDir();
|
|
689
|
-
}
|
|
690
687
|
async function isDebugModeEnabled() {
|
|
691
688
|
try {
|
|
692
689
|
return (await readDebugModeSetting()).enabled;
|
|
@@ -804,55 +801,13 @@ var init_debug_store = __esm({
|
|
|
804
801
|
}
|
|
805
802
|
});
|
|
806
803
|
|
|
807
|
-
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
808
|
-
async function readHelpInfo() {
|
|
809
|
-
const debugMode = await readDebugModeSetting();
|
|
810
|
-
return {
|
|
811
|
-
storage: [
|
|
812
|
-
{ label: "Config folder", value: configRoot() },
|
|
813
|
-
{ label: "Settings file", value: configFilePath() },
|
|
814
|
-
{ label: "Debug logs", value: debugSessionsDir() }
|
|
815
|
-
],
|
|
816
|
-
troubleshooting: [
|
|
817
|
-
{ label: "CLI version", value: readPackageVersion() },
|
|
818
|
-
{ label: "Node", value: process.version },
|
|
819
|
-
{ label: "Platform", value: `${process.platform} ${process.arch}` },
|
|
820
|
-
{ label: "Debug Mode", value: debugMode.enabled ? "on" : "off" },
|
|
821
|
-
{
|
|
822
|
-
label: "This session",
|
|
823
|
-
value: debugMode.enabled ? currentDebugSessionDir() : "no logs written while Debug Mode is off"
|
|
824
|
-
}
|
|
825
|
-
]
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
var init_help_info = __esm({
|
|
829
|
-
"packages/experience-design-system-cli/src/tui/help/help-info.ts"() {
|
|
830
|
-
"use strict";
|
|
831
|
-
init_config();
|
|
832
|
-
init_debug_store();
|
|
833
|
-
init_debug_mode_store();
|
|
834
|
-
init_version();
|
|
835
|
-
}
|
|
836
|
-
});
|
|
837
|
-
|
|
838
804
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
839
|
-
import { useEffect as useEffect3
|
|
805
|
+
import { useEffect as useEffect3 } from "react";
|
|
840
806
|
import { Box as Box5, Text as Text5, useInput as useInput5 } from "ink";
|
|
841
|
-
import {
|
|
842
|
-
function Section({ title, rows }) {
|
|
843
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
844
|
-
/* @__PURE__ */ jsx5(Text5, { bold: true, color: PALETTE.accent, children: title }),
|
|
845
|
-
rows.map((row) => /* @__PURE__ */ jsxs5(Box5, { gap: 1, children: [
|
|
846
|
-
/* @__PURE__ */ jsx5(Box5, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: row.label }) }),
|
|
847
|
-
/* @__PURE__ */ jsx5(Text5, { children: row.value })
|
|
848
|
-
] }, row.label))
|
|
849
|
-
] });
|
|
850
|
-
}
|
|
807
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
851
808
|
function HelpScreen({ onDone }) {
|
|
852
|
-
const [info, setInfo] = useState5();
|
|
853
809
|
useEffect3(() => {
|
|
854
810
|
startDebugRun({ flow: "help", step: "01-help", menuOption: "Help", inputs: {} });
|
|
855
|
-
void readHelpInfo().then(setInfo);
|
|
856
811
|
}, []);
|
|
857
812
|
const leave = (exitMethod) => {
|
|
858
813
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
@@ -868,34 +823,30 @@ function HelpScreen({ onDone }) {
|
|
|
868
823
|
return;
|
|
869
824
|
}
|
|
870
825
|
});
|
|
871
|
-
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1,
|
|
826
|
+
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
872
827
|
/* @__PURE__ */ jsx5(Text5, { bold: true, children: "Help" }),
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
/* @__PURE__ */ jsx5(Text5, { 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." })
|
|
877
|
-
] }) : /* @__PURE__ */ jsx5(Text5, { color: PALETTE.accent, children: "Loading..." }),
|
|
828
|
+
/* @__PURE__ */ jsx5(Text5, { children: " " }),
|
|
829
|
+
/* @__PURE__ */ jsx5(Text5, { children: "This is a placeholder screen for v2 help content." }),
|
|
830
|
+
/* @__PURE__ */ jsx5(Text5, { children: " " }),
|
|
878
831
|
/* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "[Enter] Complete [Esc/q] Exit \u2014 both return to Start" })
|
|
879
832
|
] });
|
|
880
833
|
}
|
|
881
834
|
var init_PageContainer2 = __esm({
|
|
882
835
|
"packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
|
|
883
836
|
"use strict";
|
|
884
|
-
init_home_theme();
|
|
885
837
|
init_debug_store();
|
|
886
|
-
init_help_info();
|
|
887
838
|
}
|
|
888
839
|
});
|
|
889
840
|
|
|
890
841
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
891
|
-
import { useState as
|
|
842
|
+
import { useState as useState5 } from "react";
|
|
892
843
|
import { Box as Box6, Text as Text6, useInput as useInput6 } from "ink";
|
|
893
844
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
894
845
|
function SettingsScreen({
|
|
895
846
|
onNavigate,
|
|
896
847
|
onBack
|
|
897
848
|
}) {
|
|
898
|
-
const [focusIdx, setFocusIdx] =
|
|
849
|
+
const [focusIdx, setFocusIdx] = useState5(0);
|
|
899
850
|
const items = [
|
|
900
851
|
{ label: "Configuration", screen: "settings-configuration" },
|
|
901
852
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
@@ -980,10 +931,10 @@ var init_config_store = __esm({
|
|
|
980
931
|
});
|
|
981
932
|
|
|
982
933
|
// packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
|
|
983
|
-
import { useEffect as useEffect4, useState as
|
|
934
|
+
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
984
935
|
import { Box as Box7, Text as Text7, useInput as useInput7 } from "ink";
|
|
985
936
|
import TextInput3 from "ink-text-input";
|
|
986
|
-
import { Fragment
|
|
937
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
987
938
|
function debugFields(config) {
|
|
988
939
|
return {
|
|
989
940
|
space_id: config?.spaceId ?? "",
|
|
@@ -995,13 +946,13 @@ function debugFields(config) {
|
|
|
995
946
|
};
|
|
996
947
|
}
|
|
997
948
|
function ConfigurationScreen({ onDone }) {
|
|
998
|
-
const [stage, setStage] =
|
|
999
|
-
const [config, setConfig] =
|
|
1000
|
-
const [activeField, setActiveField] =
|
|
1001
|
-
const [notice, setNotice] =
|
|
1002
|
-
const [lastSaved, setLastSaved] =
|
|
1003
|
-
const [editing, setEditing] =
|
|
1004
|
-
const [valueBeforeEdit, setValueBeforeEdit] =
|
|
949
|
+
const [stage, setStage] = useState6("loading");
|
|
950
|
+
const [config, setConfig] = useState6(null);
|
|
951
|
+
const [activeField, setActiveField] = useState6("spaceId");
|
|
952
|
+
const [notice, setNotice] = useState6(null);
|
|
953
|
+
const [lastSaved, setLastSaved] = useState6(null);
|
|
954
|
+
const [editing, setEditing] = useState6(false);
|
|
955
|
+
const [valueBeforeEdit, setValueBeforeEdit] = useState6("");
|
|
1005
956
|
useEffect4(() => {
|
|
1006
957
|
readCredentials().then((cfg) => {
|
|
1007
958
|
setConfig(cfg);
|
|
@@ -1109,7 +1060,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
1109
1060
|
) : /* @__PURE__ */ jsx7(Text7, { children: display || /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "(empty)" }) })
|
|
1110
1061
|
] }, field);
|
|
1111
1062
|
}) }),
|
|
1112
|
-
notice && /* @__PURE__ */ jsxs7(
|
|
1063
|
+
notice && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1113
1064
|
/* @__PURE__ */ jsx7(Text7, { children: " " }),
|
|
1114
1065
|
/* @__PURE__ */ jsxs7(Text7, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
1115
1066
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
@@ -1169,12 +1120,12 @@ var init_analytics_store = __esm({
|
|
|
1169
1120
|
});
|
|
1170
1121
|
|
|
1171
1122
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
1172
|
-
import { useEffect as useEffect5, useState as
|
|
1123
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
1173
1124
|
import { Box as Box8, Text as Text8, useInput as useInput8 } from "ink";
|
|
1174
|
-
import { Fragment as
|
|
1125
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1175
1126
|
function OptInAnalyticsScreen({ onDone }) {
|
|
1176
|
-
const [loading, setLoading] =
|
|
1177
|
-
const [enabled, setEnabled] =
|
|
1127
|
+
const [loading, setLoading] = useState7(true);
|
|
1128
|
+
const [enabled, setEnabled] = useState7(true);
|
|
1178
1129
|
useEffect5(() => {
|
|
1179
1130
|
readAnalyticsSetting().then((setting) => {
|
|
1180
1131
|
setEnabled(setting.enabled);
|
|
@@ -1205,7 +1156,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
1205
1156
|
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
1206
1157
|
/* @__PURE__ */ jsx8(Text8, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
1207
1158
|
/* @__PURE__ */ jsx8(Text8, { children: " " }),
|
|
1208
|
-
loading ? /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(
|
|
1159
|
+
loading ? /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1209
1160
|
/* @__PURE__ */ jsxs8(Text8, { children: [
|
|
1210
1161
|
"Share anonymous usage data:",
|
|
1211
1162
|
" ",
|
|
@@ -1229,11 +1180,11 @@ var init_screen3 = __esm({
|
|
|
1229
1180
|
});
|
|
1230
1181
|
|
|
1231
1182
|
// packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
|
|
1232
|
-
import { useEffect as useEffect6, useState as
|
|
1183
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
1233
1184
|
import { Box as Box9, Text as Text9, useInput as useInput9 } from "ink";
|
|
1234
1185
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1235
1186
|
function UpgradeScreen({ onDone }) {
|
|
1236
|
-
const [upgradeCheck, setUpgradeCheck] =
|
|
1187
|
+
const [upgradeCheck, setUpgradeCheck] = useState8();
|
|
1237
1188
|
useEffect6(() => {
|
|
1238
1189
|
startDebugRun({
|
|
1239
1190
|
flow: "upgrade",
|
|
@@ -1309,12 +1260,12 @@ var init_PageContainer4 = __esm({
|
|
|
1309
1260
|
});
|
|
1310
1261
|
|
|
1311
1262
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
1312
|
-
import { useEffect as useEffect7, useState as
|
|
1263
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1313
1264
|
import { Box as Box10, Text as Text10, useInput as useInput10 } from "ink";
|
|
1314
1265
|
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1315
1266
|
function DebugModeScreen({ onDone }) {
|
|
1316
|
-
const [loading, setLoading] =
|
|
1317
|
-
const [enabled, setEnabled] =
|
|
1267
|
+
const [loading, setLoading] = useState9(true);
|
|
1268
|
+
const [enabled, setEnabled] = useState9(true);
|
|
1318
1269
|
useEffect7(() => {
|
|
1319
1270
|
readDebugModeSetting().then((setting) => {
|
|
1320
1271
|
setEnabled(setting.enabled);
|
|
@@ -1368,14 +1319,14 @@ var app_exports = {};
|
|
|
1368
1319
|
__export(app_exports, {
|
|
1369
1320
|
runApp: () => runApp
|
|
1370
1321
|
});
|
|
1371
|
-
import { useEffect as useEffect8, useState as
|
|
1372
|
-
import { Fragment as
|
|
1322
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
1323
|
+
import { Fragment as Fragment3, jsx as jsx11 } from "react/jsx-runtime";
|
|
1373
1324
|
function App({ onLaunchImport, importExitCode }) {
|
|
1374
1325
|
const returnedFromImport = importExitCode !== void 0;
|
|
1375
|
-
const [screen, setScreen] =
|
|
1376
|
-
const [showImportResult, setShowImportResult] =
|
|
1377
|
-
const [projectPath, setProjectPath] =
|
|
1378
|
-
const [importDefaults, setImportDefaults] =
|
|
1326
|
+
const [screen, setScreen] = useState10(returnedFromImport ? "import" : "start");
|
|
1327
|
+
const [showImportResult, setShowImportResult] = useState10(returnedFromImport);
|
|
1328
|
+
const [projectPath, setProjectPath] = useState10();
|
|
1329
|
+
const [importDefaults, setImportDefaults] = useState10();
|
|
1379
1330
|
useEffect8(() => {
|
|
1380
1331
|
if (screen !== "import") {
|
|
1381
1332
|
setImportDefaults(void 0);
|
|
@@ -1399,7 +1350,7 @@ function App({ onLaunchImport, importExitCode }) {
|
|
|
1399
1350
|
switch (screen) {
|
|
1400
1351
|
case "import":
|
|
1401
1352
|
if (showImportResult) return /* @__PURE__ */ jsx11(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
1402
|
-
if (importDefaults === void 0) return /* @__PURE__ */ jsx11(
|
|
1353
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx11(Fragment3, {});
|
|
1403
1354
|
if (projectPath === void 0) {
|
|
1404
1355
|
return /* @__PURE__ */ jsx11(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
1405
1356
|
}
|
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-dc6fb2aa.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-dc6fb2aa.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@tsconfig/node24": "^24.0.4",
|