ripencli 0.2.0 → 0.2.1
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/cli.js +31 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1784,13 +1784,13 @@ function SelfUpdatePrompt({ currentVersion, latestVersion, updating, error, onUp
|
|
|
1784
1784
|
children: "❯ "
|
|
1785
1785
|
}) : /* @__PURE__ */ jsx(Text, { children: " " }), /* @__PURE__ */ jsx(Text, {
|
|
1786
1786
|
color: selected === 0 ? "white" : "gray",
|
|
1787
|
-
children: "Update
|
|
1787
|
+
children: "Update"
|
|
1788
1788
|
})] }), /* @__PURE__ */ jsxs(Text, { children: [selected === 1 ? /* @__PURE__ */ jsx(Text, {
|
|
1789
1789
|
color: "greenBright",
|
|
1790
1790
|
children: "❯ "
|
|
1791
1791
|
}) : /* @__PURE__ */ jsx(Text, { children: " " }), /* @__PURE__ */ jsx(Text, {
|
|
1792
1792
|
color: selected === 1 ? "white" : "gray",
|
|
1793
|
-
children: "
|
|
1793
|
+
children: "Skip"
|
|
1794
1794
|
})] })]
|
|
1795
1795
|
})
|
|
1796
1796
|
]
|
|
@@ -1827,6 +1827,14 @@ function App({ project, global, version, installManager }) {
|
|
|
1827
1827
|
cancelled = true;
|
|
1828
1828
|
};
|
|
1829
1829
|
}, []);
|
|
1830
|
+
useEffect(() => {
|
|
1831
|
+
if (screen !== "self-update-done") return;
|
|
1832
|
+
const timer = setTimeout(() => {
|
|
1833
|
+
exit();
|
|
1834
|
+
process.exit(0);
|
|
1835
|
+
}, 1500);
|
|
1836
|
+
return () => clearTimeout(timer);
|
|
1837
|
+
}, [screen]);
|
|
1830
1838
|
const [fetchStarted, setFetchStarted] = useState(false);
|
|
1831
1839
|
useEffect(() => {
|
|
1832
1840
|
if (screen !== "loading" || fetchStarted) return;
|
|
@@ -1904,13 +1912,8 @@ function App({ project, global, version, installManager }) {
|
|
|
1904
1912
|
"--global",
|
|
1905
1913
|
`ripencli@${latestVersion}`
|
|
1906
1914
|
]);
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
stdio: "inherit",
|
|
1910
|
-
detached: true
|
|
1911
|
-
}).unref();
|
|
1912
|
-
exit();
|
|
1913
|
-
process.exit(0);
|
|
1915
|
+
setSelfUpdating(false);
|
|
1916
|
+
setScreen("self-update-done");
|
|
1914
1917
|
} catch (err) {
|
|
1915
1918
|
setSelfUpdateError(err.message ?? "Unknown error");
|
|
1916
1919
|
setSelfUpdating(false);
|
|
@@ -1953,6 +1956,25 @@ function App({ project, global, version, installManager }) {
|
|
|
1953
1956
|
onUpdate: handleSelfUpdate,
|
|
1954
1957
|
onSkip: () => setScreen("loading")
|
|
1955
1958
|
});
|
|
1959
|
+
if (screen === "self-update-done") return /* @__PURE__ */ jsxs(Box, {
|
|
1960
|
+
flexDirection: "column",
|
|
1961
|
+
padding: 1,
|
|
1962
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
1963
|
+
color: "greenBright",
|
|
1964
|
+
bold: true,
|
|
1965
|
+
children: [" ", "ripen"]
|
|
1966
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
1967
|
+
marginTop: 1,
|
|
1968
|
+
children: /* @__PURE__ */ jsxs(Text, {
|
|
1969
|
+
color: "green",
|
|
1970
|
+
children: [
|
|
1971
|
+
"✓ Updated to v",
|
|
1972
|
+
latestVersion,
|
|
1973
|
+
". Run ripen again to use the new version."
|
|
1974
|
+
]
|
|
1975
|
+
})
|
|
1976
|
+
})]
|
|
1977
|
+
});
|
|
1956
1978
|
if (screen === "loading") return /* @__PURE__ */ jsxs(Box, {
|
|
1957
1979
|
flexDirection: "column",
|
|
1958
1980
|
padding: 1,
|