mano-coding 0.1.16 → 0.1.18
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/bin.js +12 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -41723,6 +41723,12 @@ async function confirmUpgrade() {
|
|
|
41723
41723
|
readline3.close();
|
|
41724
41724
|
}
|
|
41725
41725
|
}
|
|
41726
|
+
function isSamePath(a, b2) {
|
|
41727
|
+
if (process.platform === "win32") {
|
|
41728
|
+
return resolve21(a).replaceAll("/", "\\").toLowerCase() === resolve21(b2).replaceAll("/", "\\").toLowerCase();
|
|
41729
|
+
}
|
|
41730
|
+
return resolve21(a) === resolve21(b2);
|
|
41731
|
+
}
|
|
41726
41732
|
async function detectGlobalCliInstallation(cliPath = process.argv[1], runner = runCommand) {
|
|
41727
41733
|
if (!cliPath) return void 0;
|
|
41728
41734
|
const binPath = await realpath2(cliPath).catch(() => void 0);
|
|
@@ -41737,7 +41743,7 @@ async function detectGlobalCliInstallation(cliPath = process.argv[1], runner = r
|
|
|
41737
41743
|
if (typeof declaredBin !== "string") continue;
|
|
41738
41744
|
const expectedBin = await realpath2(resolve21(packageRoot, declaredBin)).catch(() => void 0);
|
|
41739
41745
|
if (!expectedBin) continue;
|
|
41740
|
-
if (expectedBin
|
|
41746
|
+
if (!isSamePath(expectedBin, binPath) && !await isWindowsCmdShimFor(binPath, expectedBin)) continue;
|
|
41741
41747
|
return { manager, managerExecutable: manager, packageRoot, binPath: expectedBin, currentVersion: packageJson.version };
|
|
41742
41748
|
}
|
|
41743
41749
|
return void 0;
|
|
@@ -41775,8 +41781,11 @@ async function fetchCliMetadata(registry, request = fetch) {
|
|
|
41775
41781
|
}
|
|
41776
41782
|
}
|
|
41777
41783
|
async function runCommand(command, args) {
|
|
41784
|
+
const useCmd = process.platform === "win32" && (command === "pnpm" || command === "npm");
|
|
41785
|
+
const executable = useCmd ? process.env.ComSpec ?? "cmd.exe" : command;
|
|
41786
|
+
const commandArgs = useCmd ? ["/d", "/c", [command, ...args.map((value) => /[\s&|<>()^%!]/u.test(value) ? `"${value.replaceAll('"', '""')}"` : value)].join(" ")] : args;
|
|
41778
41787
|
return new Promise((resolveResult, reject) => {
|
|
41779
|
-
const child = spawn3(
|
|
41788
|
+
const child = spawn3(executable, commandArgs, { shell: false, windowsHide: true });
|
|
41780
41789
|
let stdout = "";
|
|
41781
41790
|
let stderrOutput = "";
|
|
41782
41791
|
child.stdout.on("data", (chunk) => {
|
|
@@ -41848,7 +41857,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
41848
41857
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
41849
41858
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
41850
41859
|
function resolveVersion() {
|
|
41851
|
-
if (true) return "0.1.
|
|
41860
|
+
if (true) return "0.1.18";
|
|
41852
41861
|
const candidates = [
|
|
41853
41862
|
new URL("../package.json", import.meta.url),
|
|
41854
41863
|
new URL("../../package.json", import.meta.url),
|