mano-coding 0.1.16 → 0.1.17
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 +10 -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,9 @@ async function fetchCliMetadata(registry, request = fetch) {
|
|
|
41775
41781
|
}
|
|
41776
41782
|
}
|
|
41777
41783
|
async function runCommand(command, args) {
|
|
41784
|
+
const executable = process.platform === "win32" && (command === "npm" || command === "pnpm") ? `${command}.cmd` : command;
|
|
41778
41785
|
return new Promise((resolveResult, reject) => {
|
|
41779
|
-
const child = spawn3(
|
|
41786
|
+
const child = spawn3(executable, args, { shell: false, windowsHide: true });
|
|
41780
41787
|
let stdout = "";
|
|
41781
41788
|
let stderrOutput = "";
|
|
41782
41789
|
child.stdout.on("data", (chunk) => {
|
|
@@ -41848,7 +41855,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
41848
41855
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
41849
41856
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
41850
41857
|
function resolveVersion() {
|
|
41851
|
-
if (true) return "0.1.
|
|
41858
|
+
if (true) return "0.1.17";
|
|
41852
41859
|
const candidates = [
|
|
41853
41860
|
new URL("../package.json", import.meta.url),
|
|
41854
41861
|
new URL("../../package.json", import.meta.url),
|