mano-coding 0.1.27 → 0.1.28
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 +32 -5
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -32036,6 +32036,22 @@ function resolveTaskExecutable(command, platform = process.platform, envPath) {
|
|
|
32036
32036
|
}
|
|
32037
32037
|
return command;
|
|
32038
32038
|
}
|
|
32039
|
+
function prepareSpawnCommand(executable, args, platform = process.platform, comSpec = process.env.ComSpec ?? "cmd.exe") {
|
|
32040
|
+
const isWindowsBatch = platform === "win32" && /\.(cmd|bat)$/i.test(executable);
|
|
32041
|
+
if (!isWindowsBatch) {
|
|
32042
|
+
return {
|
|
32043
|
+
executable,
|
|
32044
|
+
args: [...args]
|
|
32045
|
+
};
|
|
32046
|
+
}
|
|
32047
|
+
const escapedArgs = args.map(
|
|
32048
|
+
(arg) => /[\s&|<>()^%!]/u.test(arg) ? `"${arg.replaceAll('"', '""')}"` : arg
|
|
32049
|
+
);
|
|
32050
|
+
return {
|
|
32051
|
+
executable: comSpec,
|
|
32052
|
+
args: ["/d", "/c", [executable, ...escapedArgs].join(" ")]
|
|
32053
|
+
};
|
|
32054
|
+
}
|
|
32039
32055
|
async function executeTasks(tasks, ctx, options = {}) {
|
|
32040
32056
|
if (tasks.length === 0) return;
|
|
32041
32057
|
const stdio = options.stdio ?? "inherit";
|
|
@@ -32069,9 +32085,14 @@ async function executeTasks(tasks, ctx, options = {}) {
|
|
|
32069
32085
|
if (options.onProgress) {
|
|
32070
32086
|
options.onProgress(`\u6B63\u5728\u6267\u884C\u4EFB\u52A1 [${i + 1}/${tasks.length}] (${taskLabel}): ${command} ${effectiveArgs.join(" ")}`);
|
|
32071
32087
|
}
|
|
32072
|
-
const
|
|
32088
|
+
const rawExecutable = resolveTaskExecutable(command, process.platform, env.PATH);
|
|
32089
|
+
const { executable, args: spawnArgs } = prepareSpawnCommand(
|
|
32090
|
+
rawExecutable,
|
|
32091
|
+
effectiveArgs,
|
|
32092
|
+
process.platform
|
|
32093
|
+
);
|
|
32073
32094
|
await new Promise((resolve22, reject) => {
|
|
32074
|
-
const child = spawn(executable,
|
|
32095
|
+
const child = spawn(executable, spawnArgs, {
|
|
32075
32096
|
cwd,
|
|
32076
32097
|
env,
|
|
32077
32098
|
stdio,
|
|
@@ -33676,6 +33697,7 @@ __export(src_exports, {
|
|
|
33676
33697
|
parseTomlSelector: () => parseTomlSelector,
|
|
33677
33698
|
planPluginDelivery: () => planPluginDelivery,
|
|
33678
33699
|
prepareJournalRecovery: () => prepareJournalRecovery,
|
|
33700
|
+
prepareSpawnCommand: () => prepareSpawnCommand,
|
|
33679
33701
|
prepareUserDataRecovery: () => prepareUserDataRecovery,
|
|
33680
33702
|
readVariantJson: () => readVariantJson,
|
|
33681
33703
|
recoverJournal: () => recoverJournal,
|
|
@@ -41912,8 +41934,13 @@ async function executeLaunch(launcherArgs) {
|
|
|
41912
41934
|
resolved.installation["version"]
|
|
41913
41935
|
);
|
|
41914
41936
|
const cmd = resolved.command;
|
|
41915
|
-
const
|
|
41916
|
-
|
|
41937
|
+
const rawExecutable = resolveTaskExecutable(cmd.executable, process.platform);
|
|
41938
|
+
const rawArgs = [...cmd.args, ...resolved.passthroughArgs];
|
|
41939
|
+
const { executable, args } = prepareSpawnCommand(rawExecutable, rawArgs, process.platform);
|
|
41940
|
+
const child = spawn2(executable, args, {
|
|
41941
|
+
stdio: "inherit",
|
|
41942
|
+
shell: false,
|
|
41943
|
+
windowsHide: true
|
|
41917
41944
|
});
|
|
41918
41945
|
const heartbeatTimer = setInterval(() => {
|
|
41919
41946
|
void heartbeatLease(lease).catch(() => {
|
|
@@ -42277,7 +42304,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
42277
42304
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
42278
42305
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
42279
42306
|
function resolveVersion() {
|
|
42280
|
-
if (true) return "0.1.
|
|
42307
|
+
if (true) return "0.1.28";
|
|
42281
42308
|
const candidates = [
|
|
42282
42309
|
new URL("../package.json", import.meta.url),
|
|
42283
42310
|
new URL("../../package.json", import.meta.url),
|