@mutmutco/hub 4.5.14 → 4.5.15
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/index.cjs +42 -55
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -88,7 +88,7 @@ __export(index_exports, {
|
|
|
88
88
|
writePending: () => writePending
|
|
89
89
|
});
|
|
90
90
|
module.exports = __toCommonJS(index_exports);
|
|
91
|
-
var
|
|
91
|
+
var import_node_child_process10 = require("node:child_process");
|
|
92
92
|
var import_node_fs24 = require("node:fs");
|
|
93
93
|
var import_node_path16 = require("node:path");
|
|
94
94
|
|
|
@@ -305,35 +305,17 @@ var plainText = (text) => String(text).replaceAll("\u2192", "->").replaceAll("\x
|
|
|
305
305
|
|
|
306
306
|
// ../installer/face/src/spinner.ts
|
|
307
307
|
var import_node_fs2 = require("node:fs");
|
|
308
|
+
var import_node_tty = require("node:tty");
|
|
308
309
|
var import_node_worker_threads = require("node:worker_threads");
|
|
309
310
|
|
|
310
311
|
// ../installer/face/src/encoding.ts
|
|
311
|
-
var import_node_child_process = require("node:child_process");
|
|
312
312
|
var UNICODE_SPINNER_FRAMES = Object.freeze(["\u25D2", "\u25D0", "\u25D3", "\u25D1"]);
|
|
313
313
|
var ASCII_SPINNER_FRAMES = Object.freeze(["-", "\\", "|", "/"]);
|
|
314
|
-
|
|
315
|
-
function consoleOutputCodePage() {
|
|
316
|
-
if (cachedCodePage !== void 0) return cachedCodePage;
|
|
317
|
-
cachedCodePage = null;
|
|
318
|
-
try {
|
|
319
|
-
const out = (0, import_node_child_process.execFileSync)("chcp.com", { windowsHide: true, encoding: "utf8", timeout: 5e3 });
|
|
320
|
-
const pages = [...String(out).matchAll(/(\d{3,5})/gu)].map((m) => Number(m[1]));
|
|
321
|
-
cachedCodePage = pages.length ? pages[pages.length - 1] : null;
|
|
322
|
-
} catch {
|
|
323
|
-
cachedCodePage = null;
|
|
324
|
-
}
|
|
325
|
-
return cachedCodePage;
|
|
326
|
-
}
|
|
327
|
-
function consoleRendersUnicode(env = process.env, platform = process.platform, codePage = platform === "win32" ? consoleOutputCodePage() : null) {
|
|
314
|
+
function consoleRendersUnicode(env = process.env, _platform = process.platform) {
|
|
328
315
|
if (env.MM_FACE_ASCII === "1" || env.NO_UNICODE === "1") return false;
|
|
329
316
|
const locale = env.LC_ALL || env.LC_CTYPE || env.LANG || "";
|
|
330
317
|
if (locale === "C" || locale === "POSIX" || /^C\./u.test(locale) || /^POSIX\./u.test(locale)) return false;
|
|
331
318
|
if (/cp437|ibm437|\b437\b/iu.test(locale)) return false;
|
|
332
|
-
if (/utf-?8/iu.test(locale)) return true;
|
|
333
|
-
if (platform === "win32") {
|
|
334
|
-
if (env.WT_SESSION || env.ConEmuANSI === "ON") return true;
|
|
335
|
-
return codePage === 65001;
|
|
336
|
-
}
|
|
337
319
|
return true;
|
|
338
320
|
}
|
|
339
321
|
function spinnerFramesFor(env = process.env, platform = process.platform) {
|
|
@@ -344,6 +326,8 @@ function spinnerFramesFor(env = process.env, platform = process.platform) {
|
|
|
344
326
|
var WORKER_SOURCE = `
|
|
345
327
|
const { parentPort, workerData } = require('node:worker_threads');
|
|
346
328
|
const { writeSync, appendFileSync } = require('node:fs');
|
|
329
|
+
const wide = workerData.wide ? new (require('node:tty').WriteStream)(2) : null;
|
|
330
|
+
const put = (text) => wide ? wide.write(text) : writeSync(2, text);
|
|
347
331
|
const control = new Int32Array(workerData.control);
|
|
348
332
|
let frames = workerData.frames, frame = workerData.frame;
|
|
349
333
|
function draw() {
|
|
@@ -351,7 +335,7 @@ function draw() {
|
|
|
351
335
|
try {
|
|
352
336
|
if (Atomics.load(control, 0) || Atomics.load(control, 2) || !frames.length) return;
|
|
353
337
|
const text = frames[frame++ % frames.length].replace('__elapsed__', Math.floor((Date.now() - workerData.started) / 1000) + 's');
|
|
354
|
-
|
|
338
|
+
put(text);
|
|
355
339
|
if (workerData.transcriptPath) appendFileSync(workerData.transcriptPath, JSON.stringify({ channel: 'spinner', text }) + '\\n');
|
|
356
340
|
} finally {
|
|
357
341
|
Atomics.store(control, 1, 0);
|
|
@@ -376,10 +360,12 @@ function createSpinner(face, { animate, stream, intervalMs = 90, transcriptPath,
|
|
|
376
360
|
let frame = 0;
|
|
377
361
|
let started = 0;
|
|
378
362
|
let suspended = false;
|
|
363
|
+
const wide = process.platform === "win32" && (0, import_node_tty.isatty)(2);
|
|
379
364
|
const write = (text) => {
|
|
380
365
|
if (stream) stream.write(text);
|
|
381
366
|
else {
|
|
382
|
-
(
|
|
367
|
+
if (wide) process.stderr.write(`\x1B[1G${text}`);
|
|
368
|
+
else (0, import_node_fs2.writeSync)(2, text);
|
|
383
369
|
if (transcriptPath) (0, import_node_fs2.appendFileSync)(transcriptPath, `${JSON.stringify({ channel: "spinner", text })}
|
|
384
370
|
`);
|
|
385
371
|
}
|
|
@@ -426,7 +412,8 @@ function createSpinner(face, { animate, stream, intervalMs = 90, transcriptPath,
|
|
|
426
412
|
frame,
|
|
427
413
|
intervalMs,
|
|
428
414
|
transcriptPath,
|
|
429
|
-
started
|
|
415
|
+
started,
|
|
416
|
+
wide
|
|
430
417
|
} });
|
|
431
418
|
const active = worker;
|
|
432
419
|
worker.on("error", () => {
|
|
@@ -1276,7 +1263,7 @@ async function runMaintenance(product, args, dependencies) {
|
|
|
1276
1263
|
}
|
|
1277
1264
|
|
|
1278
1265
|
// ../installer/launcher/src/refresh.ts
|
|
1279
|
-
var
|
|
1266
|
+
var import_node_child_process = require("node:child_process");
|
|
1280
1267
|
var import_node_fs6 = require("node:fs");
|
|
1281
1268
|
var import_node_os2 = require("node:os");
|
|
1282
1269
|
var import_node_path3 = require("node:path");
|
|
@@ -1515,7 +1502,7 @@ function parseLauncherVersion(stdout, bin) {
|
|
|
1515
1502
|
}
|
|
1516
1503
|
function runVersion(path, bin) {
|
|
1517
1504
|
return new Promise((resolve2) => {
|
|
1518
|
-
(0,
|
|
1505
|
+
(0, import_node_child_process.execFile)(path, ["--version"], { timeout: 3e4, windowsHide: true, encoding: "utf8" }, (error, stdout) => {
|
|
1519
1506
|
resolve2(error ? null : parseLauncherVersion(stdout, bin));
|
|
1520
1507
|
});
|
|
1521
1508
|
});
|
|
@@ -1783,7 +1770,7 @@ function fileExists(path) {
|
|
|
1783
1770
|
var import_node_perf_hooks2 = require("node:perf_hooks");
|
|
1784
1771
|
|
|
1785
1772
|
// src/npm.ts
|
|
1786
|
-
var
|
|
1773
|
+
var import_node_child_process2 = require("node:child_process");
|
|
1787
1774
|
var import_node_fs8 = require("node:fs");
|
|
1788
1775
|
var import_node_path5 = require("node:path");
|
|
1789
1776
|
var cachedNpm = null;
|
|
@@ -1791,7 +1778,7 @@ function resolveNpm(env = process.env) {
|
|
|
1791
1778
|
if (env.MMI_UPDATER_NPM) return { kind: "command", command: env.MMI_UPDATER_NPM };
|
|
1792
1779
|
if (cachedNpm) return cachedNpm;
|
|
1793
1780
|
if (process.platform === "win32") {
|
|
1794
|
-
const where = (0,
|
|
1781
|
+
const where = (0, import_node_child_process2.spawnSync)("where.exe", ["npm.cmd"], { encoding: "utf8", windowsHide: true });
|
|
1795
1782
|
const first = where.stdout.split("\n").map((l) => l.trim()).find(Boolean);
|
|
1796
1783
|
if (where.status === 0 && first) {
|
|
1797
1784
|
const script = (0, import_node_path5.join)((0, import_node_path5.dirname)(first), "node_modules", "npm", "bin", "npm-cli.js");
|
|
@@ -1808,7 +1795,7 @@ function resolveNpm(env = process.env) {
|
|
|
1808
1795
|
cachedNpm = { kind: "node-script", script: bundled };
|
|
1809
1796
|
return cachedNpm;
|
|
1810
1797
|
}
|
|
1811
|
-
const located = (0,
|
|
1798
|
+
const located = (0, import_node_child_process2.spawnSync)("/bin/sh", ["-lc", "command -v npm"], { encoding: "utf8", windowsHide: true });
|
|
1812
1799
|
const resolved = (located.stdout ?? "").trim().split("\n").map((line) => line.trim()).find(Boolean);
|
|
1813
1800
|
if (located.status === 0 && resolved && (0, import_node_fs8.existsSync)(resolved)) {
|
|
1814
1801
|
cachedNpm = { kind: "command", command: resolved };
|
|
@@ -1819,7 +1806,7 @@ function resolveNpm(env = process.env) {
|
|
|
1819
1806
|
}
|
|
1820
1807
|
function runNpm(args, env = process.env, options = {}) {
|
|
1821
1808
|
const npm = resolveNpm(env);
|
|
1822
|
-
const result = npm.kind === "node-script" ? (0,
|
|
1809
|
+
const result = npm.kind === "node-script" ? (0, import_node_child_process2.spawnSync)(process.execPath, [npm.script, ...args], { encoding: "utf8", env, cwd: options.cwd, windowsHide: true }) : (0, import_node_child_process2.spawnSync)(npm.command, args, { encoding: "utf8", env, cwd: options.cwd, shell: process.platform === "win32", windowsHide: true });
|
|
1823
1810
|
return { status: result.status, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
|
|
1824
1811
|
}
|
|
1825
1812
|
function runNpmAsync(args, env = process.env, options = {}) {
|
|
@@ -1830,7 +1817,7 @@ function runNpmAsync(args, env = process.env, options = {}) {
|
|
|
1830
1817
|
let stderr = "";
|
|
1831
1818
|
let child;
|
|
1832
1819
|
try {
|
|
1833
|
-
child = (0,
|
|
1820
|
+
child = (0, import_node_child_process2.spawn)(file, argv, { env, cwd: options.cwd, windowsHide: true, shell });
|
|
1834
1821
|
} catch (error) {
|
|
1835
1822
|
resolve2({ status: null, stdout, stderr: String(error?.message ?? error) });
|
|
1836
1823
|
return;
|
|
@@ -1891,7 +1878,7 @@ function npmVersions(packageName, env = process.env) {
|
|
|
1891
1878
|
}
|
|
1892
1879
|
|
|
1893
1880
|
// src/gate.ts
|
|
1894
|
-
var
|
|
1881
|
+
var import_node_child_process3 = require("node:child_process");
|
|
1895
1882
|
var import_node_fs9 = require("node:fs");
|
|
1896
1883
|
function parseBom(text) {
|
|
1897
1884
|
const bom = JSON.parse(text);
|
|
@@ -1906,16 +1893,16 @@ function npmPackRows(bom) {
|
|
|
1906
1893
|
var GateEnvError = class extends Error {
|
|
1907
1894
|
};
|
|
1908
1895
|
function git(cachePath, args) {
|
|
1909
|
-
const result = (0,
|
|
1896
|
+
const result = (0, import_node_child_process3.spawnSync)("git", ["-C", cachePath, ...args], { encoding: "utf8", windowsHide: true });
|
|
1910
1897
|
return { status: result.status, stdout: (result.stdout ?? "").trim(), stderr: result.stderr ?? "" };
|
|
1911
1898
|
}
|
|
1912
1899
|
function ensureBareCache(cachePath, repoUrl) {
|
|
1913
|
-
const probe = (0,
|
|
1900
|
+
const probe = (0, import_node_child_process3.spawnSync)("git", ["--version"], { encoding: "utf8", windowsHide: true });
|
|
1914
1901
|
if (probe.status !== 0) {
|
|
1915
1902
|
throw new GateEnvError("git is not available \u2014 the release gate needs a git client");
|
|
1916
1903
|
}
|
|
1917
1904
|
if (!(0, import_node_fs9.existsSync)(cachePath)) {
|
|
1918
|
-
const init = (0,
|
|
1905
|
+
const init = (0, import_node_child_process3.spawnSync)("git", ["init", "--bare", cachePath], { encoding: "utf8", windowsHide: true });
|
|
1919
1906
|
if (init.status !== 0) throw new GateEnvError(`cannot create bare cache at ${cachePath}: ${init.stderr}`);
|
|
1920
1907
|
}
|
|
1921
1908
|
}
|
|
@@ -2026,18 +2013,18 @@ var import_node_os5 = require("node:os");
|
|
|
2026
2013
|
var import_node_path10 = require("node:path");
|
|
2027
2014
|
|
|
2028
2015
|
// src/arm-host-plugins.ts
|
|
2029
|
-
var
|
|
2016
|
+
var import_node_child_process6 = require("node:child_process");
|
|
2030
2017
|
var import_node_fs13 = require("node:fs");
|
|
2031
2018
|
var import_node_os4 = require("node:os");
|
|
2032
2019
|
var import_node_path9 = require("node:path");
|
|
2033
2020
|
|
|
2034
2021
|
// src/arm-npm-global.ts
|
|
2035
2022
|
var import_node_fs11 = require("node:fs");
|
|
2036
|
-
var
|
|
2023
|
+
var import_node_child_process5 = require("node:child_process");
|
|
2037
2024
|
var import_node_path7 = require("node:path");
|
|
2038
2025
|
|
|
2039
2026
|
// src/pending.ts
|
|
2040
|
-
var
|
|
2027
|
+
var import_node_child_process4 = require("node:child_process");
|
|
2041
2028
|
var import_node_fs10 = require("node:fs");
|
|
2042
2029
|
var import_node_path6 = require("node:path");
|
|
2043
2030
|
function hubDistPath(env) {
|
|
@@ -2118,7 +2105,7 @@ function buildWatcherCommand(opts) {
|
|
|
2118
2105
|
return { file: "sh", args: ["-c", `${testBusy}; ${wait}; ${lock}; ${run}`] };
|
|
2119
2106
|
}
|
|
2120
2107
|
function defaultDetachSpawn(file, args) {
|
|
2121
|
-
const child = (0,
|
|
2108
|
+
const child = (0, import_node_child_process4.spawn)(file, [...args], {
|
|
2122
2109
|
detached: process.platform !== "win32",
|
|
2123
2110
|
stdio: "ignore",
|
|
2124
2111
|
windowsHide: true,
|
|
@@ -2185,7 +2172,7 @@ function globalDist(env, packageName, distRel) {
|
|
|
2185
2172
|
}
|
|
2186
2173
|
function probeVersion(distPath) {
|
|
2187
2174
|
if (!fileExists(distPath)) return null;
|
|
2188
|
-
const probe = (0,
|
|
2175
|
+
const probe = (0, import_node_child_process5.spawnSync)(process.execPath, [distPath, "--version"], { encoding: "utf8", windowsHide: true });
|
|
2189
2176
|
const version = (probe.stdout || "").trim();
|
|
2190
2177
|
return probe.status === 0 && /^\d+\.\d+\.\d+/.test(version) ? version : null;
|
|
2191
2178
|
}
|
|
@@ -2331,13 +2318,13 @@ function cmdArg(value) {
|
|
|
2331
2318
|
return /^[A-Za-z0-9_@./:\\=+-]+$/.test(value) ? value : `"${value.replaceAll('"', '""')}"`;
|
|
2332
2319
|
}
|
|
2333
2320
|
var runHostCommand = (command, args, env) => {
|
|
2334
|
-
const result = process.platform === "win32" ? (0,
|
|
2321
|
+
const result = process.platform === "win32" ? (0, import_node_child_process6.spawnSync)("cmd.exe", ["/d", "/s", "/c", [command, ...args].map(cmdArg).join(" ")], {
|
|
2335
2322
|
encoding: "utf8",
|
|
2336
2323
|
env,
|
|
2337
2324
|
input: "",
|
|
2338
2325
|
timeout: 12e4,
|
|
2339
2326
|
windowsHide: true
|
|
2340
|
-
}) : (0,
|
|
2327
|
+
}) : (0, import_node_child_process6.spawnSync)(command, args, {
|
|
2341
2328
|
encoding: "utf8",
|
|
2342
2329
|
env,
|
|
2343
2330
|
input: "",
|
|
@@ -2423,7 +2410,7 @@ function claudeProcessToken(line) {
|
|
|
2423
2410
|
return null;
|
|
2424
2411
|
}
|
|
2425
2412
|
function realClaudeProcessListing() {
|
|
2426
|
-
const result = process.platform === "win32" ? (0,
|
|
2413
|
+
const result = process.platform === "win32" ? (0, import_node_child_process6.spawnSync)("powershell.exe", ["-NoProfile", "-Command", "Get-CimInstance Win32_Process | ForEach-Object { $_.Name + ' ' + $_.CommandLine }"], { encoding: "utf8", windowsHide: true, timeout: 15e3 }) : (0, import_node_child_process6.spawnSync)("ps", ["-eo", "args="], { encoding: "utf8", windowsHide: true, timeout: 15e3 });
|
|
2427
2414
|
return result.status === 0 ? result.stdout ?? "" : null;
|
|
2428
2415
|
}
|
|
2429
2416
|
function claudeHostEvidence(env, processListProvider) {
|
|
@@ -2688,7 +2675,7 @@ function enumerateSurfaces(env = process.env) {
|
|
|
2688
2675
|
|
|
2689
2676
|
// src/arm-cursor.ts
|
|
2690
2677
|
var import_node_fs17 = require("node:fs");
|
|
2691
|
-
var
|
|
2678
|
+
var import_node_child_process7 = require("node:child_process");
|
|
2692
2679
|
var import_node_os7 = require("node:os");
|
|
2693
2680
|
var import_node_path11 = require("node:path");
|
|
2694
2681
|
|
|
@@ -2871,7 +2858,7 @@ function cursorHostEvidence(env) {
|
|
|
2871
2858
|
if (env[marker]?.trim()) return `env marker ${marker}`;
|
|
2872
2859
|
}
|
|
2873
2860
|
if (env.CURSOR_AGENT === "1") return "env marker CURSOR_AGENT=1";
|
|
2874
|
-
const result = process.platform === "win32" ? (0,
|
|
2861
|
+
const result = process.platform === "win32" ? (0, import_node_child_process7.spawnSync)("powershell.exe", ["-NoProfile", "-Command", "Get-CimInstance Win32_Process | ForEach-Object { $_.CommandLine }"], { encoding: "utf8", windowsHide: true, timeout: 15e3 }) : (0, import_node_child_process7.spawnSync)("ps", ["-eo", "args="], { encoding: "utf8", windowsHide: true, timeout: 15e3 });
|
|
2875
2862
|
if (result.status !== 0 || !(result.stdout ?? "").trim()) return "the process table is unreadable (unsafe to write)";
|
|
2876
2863
|
for (const line of result.stdout.split(/\r?\n/)) {
|
|
2877
2864
|
const executable = cursorExecutable(line);
|
|
@@ -3268,7 +3255,7 @@ function jervcodeArm(options) {
|
|
|
3268
3255
|
|
|
3269
3256
|
// src/arm-hermes.ts
|
|
3270
3257
|
var import_node_fs19 = require("node:fs");
|
|
3271
|
-
var
|
|
3258
|
+
var import_node_child_process8 = require("node:child_process");
|
|
3272
3259
|
var import_node_path13 = require("node:path");
|
|
3273
3260
|
var PACKAGE2 = "@mutmutco/hermes-plugin";
|
|
3274
3261
|
var MANIFEST2 = "plugin.yaml";
|
|
@@ -3354,7 +3341,7 @@ function hermesProcessToken(line, home) {
|
|
|
3354
3341
|
return hermesToken(tokens) ?? (home && normalized.toLowerCase().includes(home.toLowerCase()) ? home : null);
|
|
3355
3342
|
}
|
|
3356
3343
|
function realProcessListing() {
|
|
3357
|
-
const result = process.platform === "win32" ? (0,
|
|
3344
|
+
const result = process.platform === "win32" ? (0, import_node_child_process8.spawnSync)("powershell.exe", ["-NoProfile", "-Command", "Get-CimInstance Win32_Process | ForEach-Object { $_.Name + ' ' + $_.CommandLine }"], { encoding: "utf8", windowsHide: true, timeout: 15e3 }) : (0, import_node_child_process8.spawnSync)("ps", ["-eo", "args="], { encoding: "utf8", windowsHide: true, timeout: 15e3 });
|
|
3358
3345
|
return result.status === 0 ? result.stdout ?? "" : null;
|
|
3359
3346
|
}
|
|
3360
3347
|
function hermesHostEvidence(env, home, processListProvider) {
|
|
@@ -3869,7 +3856,7 @@ async function reconcile(options) {
|
|
|
3869
3856
|
}
|
|
3870
3857
|
|
|
3871
3858
|
// src/scheduler.ts
|
|
3872
|
-
var
|
|
3859
|
+
var import_node_child_process9 = require("node:child_process");
|
|
3873
3860
|
var import_node_fs21 = require("node:fs");
|
|
3874
3861
|
var import_node_os8 = require("node:os");
|
|
3875
3862
|
var import_node_path15 = require("node:path");
|
|
@@ -3888,15 +3875,15 @@ var SYSTEMD_UNIT = "mmi-hub-updater";
|
|
|
3888
3875
|
var SYSTEMD_SERVICE_NAME = `${SYSTEMD_UNIT}.service`;
|
|
3889
3876
|
var SYSTEMD_TIMER_NAME = `${SYSTEMD_UNIT}.timer`;
|
|
3890
3877
|
function schtasks(args) {
|
|
3891
|
-
const result = (0,
|
|
3878
|
+
const result = (0, import_node_child_process9.spawnSync)("schtasks.exe", args, { encoding: "utf8", windowsHide: true });
|
|
3892
3879
|
return { status: result.status, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
|
|
3893
3880
|
}
|
|
3894
3881
|
function launchctl(args) {
|
|
3895
|
-
const result = (0,
|
|
3882
|
+
const result = (0, import_node_child_process9.spawnSync)("launchctl", args, { encoding: "utf8", windowsHide: true });
|
|
3896
3883
|
return { status: result.status, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
|
|
3897
3884
|
}
|
|
3898
3885
|
function systemctlUser(args) {
|
|
3899
|
-
const result = (0,
|
|
3886
|
+
const result = (0, import_node_child_process9.spawnSync)("systemctl", ["--user", ...args], { encoding: "utf8", windowsHide: true });
|
|
3900
3887
|
return { status: result.status, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
|
|
3901
3888
|
}
|
|
3902
3889
|
function uid() {
|
|
@@ -3921,7 +3908,7 @@ WScript.Quit code
|
|
|
3921
3908
|
`;
|
|
3922
3909
|
}
|
|
3923
3910
|
function loginPath(fallback = process.env.PATH ?? "") {
|
|
3924
|
-
const probe = (0,
|
|
3911
|
+
const probe = (0, import_node_child_process9.spawnSync)("/bin/sh", ["-lc", 'printf %s "$PATH"'], { encoding: "utf8", windowsHide: true, timeout: 1e4 });
|
|
3925
3912
|
const captured = (probe.status === 0 ? probe.stdout ?? "" : "").trim();
|
|
3926
3913
|
const source = captured || fallback;
|
|
3927
3914
|
const durable = source.split(":").filter((entry) => entry && !/^\/(?:private\/)?(?:tmp|var\/folders)\//.test(entry));
|
|
@@ -4042,7 +4029,7 @@ function elevatedRelaunch(mode, env) {
|
|
|
4042
4029
|
if (env.MMI_UPDATER_ELEVATED_RETRY === "1") return false;
|
|
4043
4030
|
const self = process.argv[1];
|
|
4044
4031
|
const command = self ? `"${process.execPath}" "${self}" autoupdate ${mode}` : `mmi-hub autoupdate ${mode}`;
|
|
4045
|
-
const relaunch = (0,
|
|
4032
|
+
const relaunch = (0, import_node_child_process9.spawnSync)(
|
|
4046
4033
|
"powershell.exe",
|
|
4047
4034
|
["-NoProfile", "-Command", `Start-Process -Verb RunAs -Wait -WindowStyle Hidden -FilePath 'cmd.exe' -ArgumentList '/c',${psQuote(`set MMI_UPDATER_ELEVATED_RETRY=1&& ${command}`)}`],
|
|
4048
4035
|
{ encoding: "utf8", windowsHide: true }
|
|
@@ -4053,7 +4040,7 @@ var NEVER_RUN_RESULT = 267011;
|
|
|
4053
4040
|
var NEVER_RUN_YEAR = 1999;
|
|
4054
4041
|
var EMPTY_RUN_INFO = { lastRunTime: null, lastTaskResult: null, nextRunTime: null };
|
|
4055
4042
|
function taskRunInfo() {
|
|
4056
|
-
const result = (0,
|
|
4043
|
+
const result = (0, import_node_child_process9.spawnSync)(
|
|
4057
4044
|
"powershell.exe",
|
|
4058
4045
|
["-NoProfile", "-Command", `$stamp = { param($t) if ($t) { $t.ToString('yyyy-MM-dd HH:mm:ss') } }; Get-ScheduledTaskInfo -TaskName '${TASK_NAME}' | Select-Object @{n='LastRunTime';e={& $stamp $_.LastRunTime}},LastTaskResult,@{n='NextRunTime';e={& $stamp $_.NextRunTime}} | ConvertTo-Json -Compress`],
|
|
4059
4046
|
{ encoding: "utf8", windowsHide: true, timeout: 3e4 }
|
|
@@ -4624,7 +4611,7 @@ function notice(screen, render) {
|
|
|
4624
4611
|
printScreen(renderNotice(FACE, screen, render), screen.state === "fail" ? "stderr" : "stdout");
|
|
4625
4612
|
}
|
|
4626
4613
|
function handOff(reexec, args, env) {
|
|
4627
|
-
const child = (0,
|
|
4614
|
+
const child = (0, import_node_child_process10.spawnSync)(process.execPath, [reexec.dist, ...args], {
|
|
4628
4615
|
stdio: "inherit",
|
|
4629
4616
|
windowsHide: true,
|
|
4630
4617
|
env: { ...env, MMI_UPDATER_REEXEC: "1" }
|
package/package.json
CHANGED