@ngandu/ulicode 0.0.7 → 0.0.9
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/{chunk-YCO6YQ32.cjs → chunk-MYJC6M7W.cjs} +26 -7
- package/dist/chunk-MYJC6M7W.cjs.map +1 -0
- package/dist/{chunk-MBFIA2QL.js → chunk-SVO3SOLQ.js} +26 -7
- package/dist/chunk-SVO3SOLQ.js.map +1 -0
- package/dist/cli.cjs +6 -6
- package/dist/cli.js +1 -1
- package/dist/index.d.cts +95 -37
- package/dist/index.d.ts +95 -37
- package/dist/tui.cjs +18 -18
- package/dist/tui.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-MBFIA2QL.js.map +0 -1
- package/dist/chunk-YCO6YQ32.cjs.map +0 -1
|
@@ -955,7 +955,7 @@ var OnboardingInlineComponent = class extends piTui.Container {
|
|
|
955
955
|
|
|
956
956
|
// package.json
|
|
957
957
|
var package_default = {
|
|
958
|
-
version: "0.0.
|
|
958
|
+
version: "0.0.9"};
|
|
959
959
|
|
|
960
960
|
// src/version.ts
|
|
961
961
|
var APP_VERSION = package_default.version;
|
|
@@ -997,7 +997,8 @@ async function detectPackageManager() {
|
|
|
997
997
|
} catch {
|
|
998
998
|
}
|
|
999
999
|
const pnpmResult = await new Promise((resolve3) => {
|
|
1000
|
-
|
|
1000
|
+
const spec = buildPackageManagerCommand("pnpm", ["list", "-g", "--depth=0", PACKAGE_NAME]);
|
|
1001
|
+
child_process.execFile(spec.command, spec.args, { timeout: 3e3 }, (error, stdout) => {
|
|
1001
1002
|
resolve3(!error && stdout.includes(PACKAGE_NAME));
|
|
1002
1003
|
});
|
|
1003
1004
|
});
|
|
@@ -1048,9 +1049,9 @@ function isNewerVersion(current, latest) {
|
|
|
1048
1049
|
return lPatch > cPatch;
|
|
1049
1050
|
}
|
|
1050
1051
|
function runUpdate(pm, targetVersion) {
|
|
1051
|
-
const
|
|
1052
|
+
const spec = buildPackageManagerCommand(pm, buildInstallArgs(pm, targetVersion));
|
|
1052
1053
|
return new Promise((resolve3) => {
|
|
1053
|
-
child_process.execFile(
|
|
1054
|
+
child_process.execFile(spec.command, spec.args, { timeout: 6e4 }, (error) => {
|
|
1054
1055
|
resolve3(!error);
|
|
1055
1056
|
});
|
|
1056
1057
|
});
|
|
@@ -1068,6 +1069,24 @@ function buildInstallArgs(pm, version) {
|
|
|
1068
1069
|
return ["install", "-g", pkg];
|
|
1069
1070
|
}
|
|
1070
1071
|
}
|
|
1072
|
+
function buildPackageManagerCommand(pm, args, platform = process.platform) {
|
|
1073
|
+
if (platform === "win32") {
|
|
1074
|
+
return {
|
|
1075
|
+
command: "cmd.exe",
|
|
1076
|
+
args: ["/d", "/s", "/c", quoteWindowsCommand([pm, ...args])]
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
return {
|
|
1080
|
+
command: pm,
|
|
1081
|
+
args
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
function quoteWindowsCommand(parts) {
|
|
1085
|
+
return parts.map((part) => {
|
|
1086
|
+
if (part.length === 0) return '""';
|
|
1087
|
+
return /[\s"]/.test(part) ? `"${part.replace(/"/g, '\\"')}"` : part;
|
|
1088
|
+
}).join(" ");
|
|
1089
|
+
}
|
|
1071
1090
|
function normalizeVersion(value) {
|
|
1072
1091
|
if (!value) return null;
|
|
1073
1092
|
const normalized = value.trim().replace(/^v/, "");
|
|
@@ -5578,7 +5597,7 @@ async function handleUpdateCommand(ctx) {
|
|
|
5578
5597
|
ctx.showInfo("Checking for updates\u2026");
|
|
5579
5598
|
const latestVersion = await fetchLatestVersion();
|
|
5580
5599
|
if (!latestVersion) {
|
|
5581
|
-
ctx.showError("Could not reach
|
|
5600
|
+
ctx.showError("Could not reach the npm registry. Check your network connection.");
|
|
5582
5601
|
return;
|
|
5583
5602
|
}
|
|
5584
5603
|
if (!isNewerVersion(currentVersion, latestVersion)) {
|
|
@@ -11970,5 +11989,5 @@ exports.getThemeMode = getThemeMode;
|
|
|
11970
11989
|
exports.mastra = mastra;
|
|
11971
11990
|
exports.mastraBrand = mastraBrand;
|
|
11972
11991
|
exports.theme = theme;
|
|
11973
|
-
//# sourceMappingURL=chunk-
|
|
11974
|
-
//# sourceMappingURL=chunk-
|
|
11992
|
+
//# sourceMappingURL=chunk-MYJC6M7W.cjs.map
|
|
11993
|
+
//# sourceMappingURL=chunk-MYJC6M7W.cjs.map
|