@ngandu/ulicode 0.0.8 → 0.1.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.
@@ -926,7 +926,7 @@ var OnboardingInlineComponent = class extends Container {
926
926
 
927
927
  // package.json
928
928
  var package_default = {
929
- version: "0.0.8"};
929
+ version: "0.1.0"};
930
930
 
931
931
  // src/version.ts
932
932
  var APP_VERSION = package_default.version;
@@ -968,7 +968,8 @@ async function detectPackageManager() {
968
968
  } catch {
969
969
  }
970
970
  const pnpmResult = await new Promise((resolve3) => {
971
- execFile("pnpm", ["list", "-g", "--depth=0", PACKAGE_NAME], { timeout: 3e3 }, (error, stdout) => {
971
+ const spec = buildPackageManagerCommand("pnpm", ["list", "-g", "--depth=0", PACKAGE_NAME]);
972
+ execFile(spec.command, spec.args, { timeout: 3e3 }, (error, stdout) => {
972
973
  resolve3(!error && stdout.includes(PACKAGE_NAME));
973
974
  });
974
975
  });
@@ -1019,9 +1020,9 @@ function isNewerVersion(current, latest) {
1019
1020
  return lPatch > cPatch;
1020
1021
  }
1021
1022
  function runUpdate(pm, targetVersion) {
1022
- const args = buildInstallArgs(pm, targetVersion);
1023
+ const spec = buildPackageManagerCommand(pm, buildInstallArgs(pm, targetVersion));
1023
1024
  return new Promise((resolve3) => {
1024
- execFile(pm, args, { timeout: 6e4 }, (error) => {
1025
+ execFile(spec.command, spec.args, { timeout: 6e4 }, (error) => {
1025
1026
  resolve3(!error);
1026
1027
  });
1027
1028
  });
@@ -1039,6 +1040,24 @@ function buildInstallArgs(pm, version) {
1039
1040
  return ["install", "-g", pkg];
1040
1041
  }
1041
1042
  }
1043
+ function buildPackageManagerCommand(pm, args, platform = process.platform) {
1044
+ if (platform === "win32") {
1045
+ return {
1046
+ command: "cmd.exe",
1047
+ args: ["/d", "/s", "/c", quoteWindowsCommand([pm, ...args])]
1048
+ };
1049
+ }
1050
+ return {
1051
+ command: pm,
1052
+ args
1053
+ };
1054
+ }
1055
+ function quoteWindowsCommand(parts) {
1056
+ return parts.map((part) => {
1057
+ if (part.length === 0) return '""';
1058
+ return /[\s"]/.test(part) ? `"${part.replace(/"/g, '\\"')}"` : part;
1059
+ }).join(" ");
1060
+ }
1042
1061
  function normalizeVersion(value) {
1043
1062
  if (!value) return null;
1044
1063
  const normalized = value.trim().replace(/^v/, "");
@@ -5549,7 +5568,7 @@ async function handleUpdateCommand(ctx) {
5549
5568
  ctx.showInfo("Checking for updates\u2026");
5550
5569
  const latestVersion = await fetchLatestVersion();
5551
5570
  if (!latestVersion) {
5552
- ctx.showError("Could not reach GitHub Releases. Check your network connection.");
5571
+ ctx.showError("Could not reach the npm registry. Check your network connection.");
5553
5572
  return;
5554
5573
  }
5555
5574
  if (!isNewerVersion(currentVersion, latestVersion)) {
@@ -11923,5 +11942,5 @@ var LoginSelectorComponent = class extends Box {
11923
11942
  };
11924
11943
 
11925
11944
  export { AssistantMessageComponent, LoginDialogComponent, LoginSelectorComponent, MastraTUI, ModelSelectorComponent, OMProgressComponent, ToolExecutionComponentEnhanced, UserMessageComponent, applyThemeMode, createTUIState, detectTerminalTheme, formatOMStatus, getCurrentVersion, getEditorTheme, getMarkdownTheme, getThemeMode, mastra, mastraBrand, theme };
11926
- //# sourceMappingURL=chunk-4KQBCGAU.js.map
11927
- //# sourceMappingURL=chunk-4KQBCGAU.js.map
11945
+ //# sourceMappingURL=chunk-UOC6NARF.js.map
11946
+ //# sourceMappingURL=chunk-UOC6NARF.js.map