@hot-updater/cli-tools 0.25.6 → 0.25.7
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.js +69 -69
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
3
|
-
import
|
|
3
|
+
import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
4
4
|
import * as g from "node:readline";
|
|
5
5
|
import O from "node:readline";
|
|
6
6
|
import Stream, { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
@@ -71,16 +71,16 @@ var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/sistera
|
|
|
71
71
|
const CSI = `${ESC}[`;
|
|
72
72
|
const beep = "\x07";
|
|
73
73
|
const cursor = {
|
|
74
|
-
to(x$2, y$
|
|
75
|
-
if (!y$
|
|
76
|
-
return `${CSI}${y$
|
|
74
|
+
to(x$2, y$1) {
|
|
75
|
+
if (!y$1) return `${CSI}${x$2 + 1}G`;
|
|
76
|
+
return `${CSI}${y$1 + 1};${x$2 + 1}H`;
|
|
77
77
|
},
|
|
78
|
-
move(x$2, y$
|
|
78
|
+
move(x$2, y$1) {
|
|
79
79
|
let ret = "";
|
|
80
80
|
if (x$2 < 0) ret += `${CSI}${-x$2}D`;
|
|
81
81
|
else if (x$2 > 0) ret += `${CSI}${x$2}C`;
|
|
82
|
-
if (y$
|
|
83
|
-
else if (y$
|
|
82
|
+
if (y$1 < 0) ret += `${CSI}${-y$1}A`;
|
|
83
|
+
else if (y$1 > 0) ret += `${CSI}${y$1}B`;
|
|
84
84
|
return ret;
|
|
85
85
|
},
|
|
86
86
|
up: (count$1 = 1) => `${CSI}${count$1}A`,
|
|
@@ -390,13 +390,13 @@ function rD() {
|
|
|
390
390
|
}
|
|
391
391
|
}), r;
|
|
392
392
|
}
|
|
393
|
-
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y
|
|
393
|
+
const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t$2) => {
|
|
394
394
|
const F$1 = [...u$2];
|
|
395
395
|
let s = !1, i$4 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
|
|
396
396
|
for (const [C$1, n$1] of F$1.entries()) {
|
|
397
397
|
const E = p(n$1);
|
|
398
398
|
if (D$1 + E <= t$2 ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$4 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
|
|
399
|
-
i$4 ? n$1 === y
|
|
399
|
+
i$4 ? n$1 === y && (s = !1, i$4 = !1) : n$1 === G$1 && (s = !1);
|
|
400
400
|
continue;
|
|
401
401
|
}
|
|
402
402
|
D$1 += E, D$1 === t$2 && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
|
|
@@ -438,7 +438,7 @@ const ED = rD(), d$1 = new Set(["\x1B", ""]), oD = 39, y$1 = "\x07", V$1 = "["
|
|
|
438
438
|
`)];
|
|
439
439
|
for (const [E, a$1] of n$1.entries()) {
|
|
440
440
|
if (F$1 += a$1, d$1.has(a$1)) {
|
|
441
|
-
const { groups: c$2 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y
|
|
441
|
+
const { groups: c$2 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
|
|
442
442
|
if (c$2.code !== void 0) {
|
|
443
443
|
const f = Number.parseFloat(c$2.code);
|
|
444
444
|
s = f === oD ? void 0 : f;
|
|
@@ -873,7 +873,7 @@ var dist_exports = /* @__PURE__ */ __export({
|
|
|
873
873
|
var import_picocolors$3 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
874
874
|
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
875
875
|
function ce() {
|
|
876
|
-
return
|
|
876
|
+
return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
877
877
|
}
|
|
878
878
|
const V = ce(), u$1 = (t$2, n$1) => V ? t$2 : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q$1 = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t$2) => {
|
|
879
879
|
switch (t$2) {
|
|
@@ -1584,13 +1584,13 @@ var ansi_styles_default$1 = ansiStyles$1;
|
|
|
1584
1584
|
|
|
1585
1585
|
//#endregion
|
|
1586
1586
|
//#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
1587
|
-
function hasFlag(flag, argv$1 = globalThis.Deno ? globalThis.Deno.args :
|
|
1587
|
+
function hasFlag(flag, argv$1 = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
1588
1588
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
1589
1589
|
const position = argv$1.indexOf(prefix + flag);
|
|
1590
1590
|
const terminatorPosition = argv$1.indexOf("--");
|
|
1591
1591
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
1592
1592
|
}
|
|
1593
|
-
const { env: env$1 } =
|
|
1593
|
+
const { env: env$1 } = process$1;
|
|
1594
1594
|
let flagForceColor;
|
|
1595
1595
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
1596
1596
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -1623,7 +1623,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
1623
1623
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
1624
1624
|
const min = forceColor || 0;
|
|
1625
1625
|
if (env$1.TERM === "dumb") return min;
|
|
1626
|
-
if (
|
|
1626
|
+
if (process$1.platform === "win32") {
|
|
1627
1627
|
const osRelease = os.release().split(".");
|
|
1628
1628
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1629
1629
|
return 1;
|
|
@@ -2405,7 +2405,7 @@ const NEWLINE$2 = "\n";
|
|
|
2405
2405
|
const PAD = " ";
|
|
2406
2406
|
const NONE = "none";
|
|
2407
2407
|
const terminalColumns = () => {
|
|
2408
|
-
const { env: env$3, stdout: stdout$1, stderr } =
|
|
2408
|
+
const { env: env$3, stdout: stdout$1, stderr } = process$1;
|
|
2409
2409
|
if (stdout$1?.columns) return stdout$1.columns;
|
|
2410
2410
|
if (stderr?.columns) return stderr.columns;
|
|
2411
2411
|
if (env$3.COLUMNS) return Number.parseInt(env$3.COLUMNS, 10);
|
|
@@ -2548,8 +2548,8 @@ const boxContent = (content, contentWidth, options) => {
|
|
|
2548
2548
|
return result;
|
|
2549
2549
|
};
|
|
2550
2550
|
const sanitizeOptions = (options) => {
|
|
2551
|
-
if (options.fullscreen &&
|
|
2552
|
-
let newDimensions = [
|
|
2551
|
+
if (options.fullscreen && process$1?.stdout) {
|
|
2552
|
+
let newDimensions = [process$1.stdout.columns, process$1.stdout.rows];
|
|
2553
2553
|
if (typeof options.fullscreen === "function") newDimensions = options.fullscreen(...newDimensions);
|
|
2554
2554
|
options.width ||= newDimensions[0];
|
|
2555
2555
|
options.height ||= newDimensions[1];
|
|
@@ -13970,9 +13970,9 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
13970
13970
|
}
|
|
13971
13971
|
exports$1.MessageError = MessageError;
|
|
13972
13972
|
class ProcessSpawnError extends MessageError {
|
|
13973
|
-
constructor(msg$3, code$1, process$
|
|
13973
|
+
constructor(msg$3, code$1, process$3) {
|
|
13974
13974
|
super(msg$3, code$1);
|
|
13975
|
-
this.process = process$
|
|
13975
|
+
this.process = process$3;
|
|
13976
13976
|
}
|
|
13977
13977
|
}
|
|
13978
13978
|
exports$1.ProcessSpawnError = ProcessSpawnError;
|
|
@@ -17534,7 +17534,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
17534
17534
|
var html = __webpack_require__(102);
|
|
17535
17535
|
var cel = __webpack_require__(68);
|
|
17536
17536
|
var global$2 = __webpack_require__(11);
|
|
17537
|
-
var process$
|
|
17537
|
+
var process$3 = global$2.process;
|
|
17538
17538
|
var setTask = global$2.setImmediate;
|
|
17539
17539
|
var clearTask = global$2.clearImmediate;
|
|
17540
17540
|
var MessageChannel$1 = global$2.MessageChannel;
|
|
@@ -17568,8 +17568,8 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
17568
17568
|
clearTask = function clearImmediate(id) {
|
|
17569
17569
|
delete queue$1[id];
|
|
17570
17570
|
};
|
|
17571
|
-
if (__webpack_require__(47)(process$
|
|
17572
|
-
process$
|
|
17571
|
+
if (__webpack_require__(47)(process$3) == "process") defer$1 = function(id) {
|
|
17572
|
+
process$3.nextTick(ctx(run, id, 1));
|
|
17573
17573
|
};
|
|
17574
17574
|
else if (Dispatch && Dispatch.now) defer$1 = function(id) {
|
|
17575
17575
|
Dispatch.now(ctx(run, id, 1));
|
|
@@ -18599,11 +18599,11 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
18599
18599
|
function isPadded(el) {
|
|
18600
18600
|
return /^-?0\d/.test(el);
|
|
18601
18601
|
}
|
|
18602
|
-
function lte(i$4, y$
|
|
18603
|
-
return i$4 <= y$
|
|
18602
|
+
function lte(i$4, y$1) {
|
|
18603
|
+
return i$4 <= y$1;
|
|
18604
18604
|
}
|
|
18605
|
-
function gte(i$4, y$
|
|
18606
|
-
return i$4 >= y$
|
|
18605
|
+
function gte(i$4, y$1) {
|
|
18606
|
+
return i$4 >= y$1;
|
|
18607
18607
|
}
|
|
18608
18608
|
function expand$2(str, isTop) {
|
|
18609
18609
|
var expansions = [];
|
|
@@ -18639,17 +18639,17 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
18639
18639
|
var N$1;
|
|
18640
18640
|
if (isSequence) {
|
|
18641
18641
|
var x$2 = numeric$1(n$1[0]);
|
|
18642
|
-
var y$
|
|
18642
|
+
var y$1 = numeric$1(n$1[1]);
|
|
18643
18643
|
var width = Math.max(n$1[0].length, n$1[1].length);
|
|
18644
18644
|
var incr = n$1.length == 3 ? Math.abs(numeric$1(n$1[2])) : 1;
|
|
18645
18645
|
var test = lte;
|
|
18646
|
-
if (y$
|
|
18646
|
+
if (y$1 < x$2) {
|
|
18647
18647
|
incr *= -1;
|
|
18648
18648
|
test = gte;
|
|
18649
18649
|
}
|
|
18650
18650
|
var pad$1 = n$1.some(isPadded);
|
|
18651
18651
|
N$1 = [];
|
|
18652
|
-
for (var i$4 = x$2; test(i$4, y$
|
|
18652
|
+
for (var i$4 = x$2; test(i$4, y$1); i$4 += incr) {
|
|
18653
18653
|
var c$2;
|
|
18654
18654
|
if (isAlphaSequence) {
|
|
18655
18655
|
c$2 = String.fromCharCode(i$4);
|
|
@@ -18890,14 +18890,14 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
18890
18890
|
var global$2 = __webpack_require__(11);
|
|
18891
18891
|
var macrotask = __webpack_require__(109).set;
|
|
18892
18892
|
var Observer = global$2.MutationObserver || global$2.WebKitMutationObserver;
|
|
18893
|
-
var process$
|
|
18893
|
+
var process$3 = global$2.process;
|
|
18894
18894
|
var Promise$2 = global$2.Promise;
|
|
18895
|
-
var isNode = __webpack_require__(47)(process$
|
|
18895
|
+
var isNode = __webpack_require__(47)(process$3) == "process";
|
|
18896
18896
|
module$1.exports = function() {
|
|
18897
18897
|
var head, last, notify;
|
|
18898
18898
|
var flush = function() {
|
|
18899
18899
|
var parent, fn;
|
|
18900
|
-
if (isNode && (parent = process$
|
|
18900
|
+
if (isNode && (parent = process$3.domain)) parent.exit();
|
|
18901
18901
|
while (head) {
|
|
18902
18902
|
fn = head.fn;
|
|
18903
18903
|
head = head.next;
|
|
@@ -18913,7 +18913,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
18913
18913
|
if (parent) parent.enter();
|
|
18914
18914
|
};
|
|
18915
18915
|
if (isNode) notify = function() {
|
|
18916
|
-
process$
|
|
18916
|
+
process$3.nextTick(flush);
|
|
18917
18917
|
};
|
|
18918
18918
|
else if (Observer && !(global$2.navigator && global$2.navigator.standalone)) {
|
|
18919
18919
|
var toggle = true;
|
|
@@ -19140,11 +19140,11 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
19140
19140
|
var promiseResolve = __webpack_require__(105);
|
|
19141
19141
|
var PROMISE = "Promise";
|
|
19142
19142
|
var TypeError$1 = global$2.TypeError;
|
|
19143
|
-
var process$
|
|
19144
|
-
var versions = process$
|
|
19143
|
+
var process$3 = global$2.process;
|
|
19144
|
+
var versions = process$3 && process$3.versions;
|
|
19145
19145
|
var v8 = versions && versions.v8 || "";
|
|
19146
19146
|
var $Promise = global$2[PROMISE];
|
|
19147
|
-
var isNode = classof(process$
|
|
19147
|
+
var isNode = classof(process$3) == "process";
|
|
19148
19148
|
var empty = function() {};
|
|
19149
19149
|
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
|
|
19150
19150
|
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
|
|
@@ -19212,7 +19212,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
19212
19212
|
var result, handler, console$1;
|
|
19213
19213
|
if (unhandled) {
|
|
19214
19214
|
result = perform(function() {
|
|
19215
|
-
if (isNode) process$
|
|
19215
|
+
if (isNode) process$3.emit("unhandledRejection", value$1, promise$1);
|
|
19216
19216
|
else if (handler = global$2.onunhandledrejection) handler({
|
|
19217
19217
|
promise: promise$1,
|
|
19218
19218
|
reason: value$1
|
|
@@ -19231,7 +19231,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
19231
19231
|
var onHandleUnhandled = function(promise$1) {
|
|
19232
19232
|
task.call(global$2, function() {
|
|
19233
19233
|
var handler;
|
|
19234
|
-
if (isNode) process$
|
|
19234
|
+
if (isNode) process$3.emit("rejectionHandled", promise$1);
|
|
19235
19235
|
else if (handler = global$2.onrejectionhandled) handler({
|
|
19236
19236
|
promise: promise$1,
|
|
19237
19237
|
reason: promise$1._v
|
|
@@ -19304,7 +19304,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
19304
19304
|
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
|
|
19305
19305
|
reaction.ok = typeof onFulfilled == "function" ? onFulfilled : true;
|
|
19306
19306
|
reaction.fail = typeof onRejected == "function" && onRejected;
|
|
19307
|
-
reaction.domain = isNode ? process$
|
|
19307
|
+
reaction.domain = isNode ? process$3.domain : void 0;
|
|
19308
19308
|
this._c.push(reaction);
|
|
19309
19309
|
if (this._a) this._a.push(reaction);
|
|
19310
19310
|
if (this._s) notify(this, false);
|
|
@@ -20379,7 +20379,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
20379
20379
|
var m$1 = s * 60;
|
|
20380
20380
|
var h$2 = m$1 * 60;
|
|
20381
20381
|
var d$2 = h$2 * 24;
|
|
20382
|
-
var y$
|
|
20382
|
+
var y$1 = d$2 * 365.25;
|
|
20383
20383
|
/**
|
|
20384
20384
|
* Parse or format the given `val`.
|
|
20385
20385
|
*
|
|
@@ -20418,7 +20418,7 @@ var require_lockfile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
20418
20418
|
case "year":
|
|
20419
20419
|
case "yrs":
|
|
20420
20420
|
case "yr":
|
|
20421
|
-
case "y": return n$1 * y$
|
|
20421
|
+
case "y": return n$1 * y$1;
|
|
20422
20422
|
case "days":
|
|
20423
20423
|
case "day":
|
|
20424
20424
|
case "d": return n$1 * d$2;
|
|
@@ -35338,9 +35338,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
35338
35338
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
35339
35339
|
const isStandardStream = (stream$1) => STANDARD_STREAMS.includes(stream$1);
|
|
35340
35340
|
const STANDARD_STREAMS = [
|
|
35341
|
-
|
|
35342
|
-
|
|
35343
|
-
|
|
35341
|
+
process$1.stdin,
|
|
35342
|
+
process$1.stdout,
|
|
35343
|
+
process$1.stderr
|
|
35344
35344
|
];
|
|
35345
35345
|
const STANDARD_STREAMS_ALIASES = [
|
|
35346
35346
|
"stdin",
|
|
@@ -35465,9 +35465,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
35465
35465
|
//#endregion
|
|
35466
35466
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
35467
35467
|
function isUnicodeSupported() {
|
|
35468
|
-
const { env: env$3 } =
|
|
35468
|
+
const { env: env$3 } = process$1;
|
|
35469
35469
|
const { TERM, TERM_PROGRAM } = env$3;
|
|
35470
|
-
if (
|
|
35470
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
35471
35471
|
return Boolean(env$3.WT_SESSION) || Boolean(env$3.TERMINUS_SUBLIME) || env$3.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$3.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
35472
35472
|
}
|
|
35473
35473
|
|
|
@@ -36393,7 +36393,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
36393
36393
|
|
|
36394
36394
|
//#endregion
|
|
36395
36395
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
36396
|
-
const npmRunPath = ({ cwd =
|
|
36396
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
|
|
36397
36397
|
const cwdPath = path$1.resolve(toPath$2(cwd));
|
|
36398
36398
|
const result = [];
|
|
36399
36399
|
const pathParts = pathOption.split(path$1.delimiter);
|
|
@@ -36411,7 +36411,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
36411
36411
|
const pathPart = path$1.resolve(cwdPath, toPath$2(execPath$1), "..");
|
|
36412
36412
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
36413
36413
|
};
|
|
36414
|
-
const npmRunPathEnv = ({ env: env$3 =
|
|
36414
|
+
const npmRunPathEnv = ({ env: env$3 = process$1.env,...options } = {}) => {
|
|
36415
36415
|
env$3 = { ...env$3 };
|
|
36416
36416
|
const pathName = pathKey({ env: env$3 });
|
|
36417
36417
|
options.path = env$3[pathName];
|
|
@@ -37546,7 +37546,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
37546
37546
|
};
|
|
37547
37547
|
const getDefaultCwd = () => {
|
|
37548
37548
|
try {
|
|
37549
|
-
return
|
|
37549
|
+
return process$1.cwd();
|
|
37550
37550
|
} catch (error) {
|
|
37551
37551
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
37552
37552
|
throw error;
|
|
@@ -37581,7 +37581,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
37581
37581
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
37582
37582
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
37583
37583
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
37584
|
-
if (
|
|
37584
|
+
if (process$1.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
37585
37585
|
return {
|
|
37586
37586
|
file,
|
|
37587
37587
|
commandArguments,
|
|
@@ -37608,7 +37608,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
37608
37608
|
});
|
|
37609
37609
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
37610
37610
|
const env$3 = extendEnv ? {
|
|
37611
|
-
...
|
|
37611
|
+
...process$1.env,
|
|
37612
37612
|
...envOption
|
|
37613
37613
|
} : envOption;
|
|
37614
37614
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -38596,12 +38596,12 @@ const guessStreamDirection = {
|
|
|
38596
38596
|
}
|
|
38597
38597
|
};
|
|
38598
38598
|
const getStandardStreamDirection = (value$1) => {
|
|
38599
|
-
if ([0,
|
|
38599
|
+
if ([0, process$1.stdin].includes(value$1)) return "input";
|
|
38600
38600
|
if ([
|
|
38601
38601
|
1,
|
|
38602
38602
|
2,
|
|
38603
|
-
|
|
38604
|
-
|
|
38603
|
+
process$1.stdout,
|
|
38604
|
+
process$1.stderr
|
|
38605
38605
|
].includes(value$1)) return "output";
|
|
38606
38606
|
};
|
|
38607
38607
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -39665,9 +39665,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
39665
39665
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
39666
39666
|
};
|
|
39667
39667
|
const getIpcExport = () => {
|
|
39668
|
-
const anyProcess =
|
|
39668
|
+
const anyProcess = process$1;
|
|
39669
39669
|
const isSubprocess = true;
|
|
39670
|
-
const ipc =
|
|
39670
|
+
const ipc = process$1.channel !== void 0;
|
|
39671
39671
|
return {
|
|
39672
39672
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
39673
39673
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -40076,7 +40076,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
40076
40076
|
|
|
40077
40077
|
//#endregion
|
|
40078
40078
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
40079
|
-
const processOk = (process$
|
|
40079
|
+
const processOk = (process$3) => !!process$3 && typeof process$3 === "object" && typeof process$3.removeListener === "function" && typeof process$3.emit === "function" && typeof process$3.reallyExit === "function" && typeof process$3.listeners === "function" && typeof process$3.kill === "function" && typeof process$3.pid === "number" && typeof process$3.on === "function";
|
|
40080
40080
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
40081
40081
|
const global$1 = globalThis;
|
|
40082
40082
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -40144,7 +40144,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
40144
40144
|
};
|
|
40145
40145
|
var SignalExit = class extends SignalExitBase {
|
|
40146
40146
|
/* c8 ignore start */
|
|
40147
|
-
#hupSig = process$
|
|
40147
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
40148
40148
|
/* c8 ignore stop */
|
|
40149
40149
|
#emitter = new Emitter();
|
|
40150
40150
|
#process;
|
|
@@ -40152,15 +40152,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
40152
40152
|
#originalProcessReallyExit;
|
|
40153
40153
|
#sigListeners = {};
|
|
40154
40154
|
#loaded = false;
|
|
40155
|
-
constructor(process$
|
|
40155
|
+
constructor(process$3) {
|
|
40156
40156
|
super();
|
|
40157
|
-
this.#process = process$
|
|
40157
|
+
this.#process = process$3;
|
|
40158
40158
|
this.#sigListeners = {};
|
|
40159
40159
|
for (const sig$1 of signals) this.#sigListeners[sig$1] = () => {
|
|
40160
40160
|
const listeners = this.#process.listeners(sig$1);
|
|
40161
40161
|
let { count: count$1 } = this.#emitter;
|
|
40162
40162
|
/* c8 ignore start */
|
|
40163
|
-
const p$2 = process$
|
|
40163
|
+
const p$2 = process$3;
|
|
40164
40164
|
if (typeof p$2.__signal_exit_emitter__ === "object" && typeof p$2.__signal_exit_emitter__.count === "number") count$1 += p$2.__signal_exit_emitter__.count;
|
|
40165
40165
|
/* c8 ignore stop */
|
|
40166
40166
|
if (listeners.length === count$1) {
|
|
@@ -40168,11 +40168,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
40168
40168
|
const ret = this.#emitter.emit("exit", null, sig$1);
|
|
40169
40169
|
/* c8 ignore start */
|
|
40170
40170
|
const s = sig$1 === "SIGHUP" ? this.#hupSig : sig$1;
|
|
40171
|
-
if (!ret) process$
|
|
40171
|
+
if (!ret) process$3.kill(process$3.pid, s);
|
|
40172
40172
|
}
|
|
40173
40173
|
};
|
|
40174
|
-
this.#originalProcessReallyExit = process$
|
|
40175
|
-
this.#originalProcessEmit = process$
|
|
40174
|
+
this.#originalProcessReallyExit = process$3.reallyExit;
|
|
40175
|
+
this.#originalProcessEmit = process$3.emit;
|
|
40176
40176
|
}
|
|
40177
40177
|
onExit(cb, opts) {
|
|
40178
40178
|
/* c8 ignore start */
|
|
@@ -40239,8 +40239,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
40239
40239
|
} else return og.call(this.#process, ev, ...args);
|
|
40240
40240
|
}
|
|
40241
40241
|
};
|
|
40242
|
-
const process$
|
|
40243
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
40242
|
+
const process$2 = globalThis.process;
|
|
40243
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
40244
40244
|
|
|
40245
40245
|
//#endregion
|
|
40246
40246
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -41482,7 +41482,7 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
|
|
|
41482
41482
|
//#endregion
|
|
41483
41483
|
//#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
41484
41484
|
const toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
41485
|
-
async function findUp(name$1, { cwd =
|
|
41485
|
+
async function findUp(name$1, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
|
|
41486
41486
|
let directory = path$1.resolve(toPath$1(cwd) ?? "");
|
|
41487
41487
|
const { root } = path$1.parse(directory);
|
|
41488
41488
|
stopAt = path$1.resolve(directory, toPath$1(stopAt ?? root));
|
|
@@ -54927,7 +54927,7 @@ var require_babel = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/jiti@
|
|
|
54927
54927
|
jsesc.version = "2.5.2", module$1.exports = jsesc;
|
|
54928
54928
|
},
|
|
54929
54929
|
"./node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js": (module$1) => {
|
|
54930
|
-
var s = 1e3, m$1 = 60 * s, h$2 = 60 * m$1, d$2 = 24 * h$2, w$1 = 7 * d$2, y$
|
|
54930
|
+
var s = 1e3, m$1 = 60 * s, h$2 = 60 * m$1, d$2 = 24 * h$2, w$1 = 7 * d$2, y$1 = 365.25 * d$2;
|
|
54931
54931
|
function plural(ms, msAbs, n$1, name$1) {
|
|
54932
54932
|
var isPlural = msAbs >= 1.5 * n$1;
|
|
54933
54933
|
return Math.round(ms / n$1) + " " + name$1 + (isPlural ? "s" : "");
|
|
@@ -54945,7 +54945,7 @@ var require_babel = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/jiti@
|
|
|
54945
54945
|
case "year":
|
|
54946
54946
|
case "yrs":
|
|
54947
54947
|
case "yr":
|
|
54948
|
-
case "y": return n$1 * y$
|
|
54948
|
+
case "y": return n$1 * y$1;
|
|
54949
54949
|
case "weeks":
|
|
54950
54950
|
case "week":
|
|
54951
54951
|
case "w": return n$1 * w$1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cli-tools",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI utilities for Hot Updater",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"oxc-transform": "0.82.1",
|
|
43
|
-
"@hot-updater/plugin-core": "0.25.
|
|
43
|
+
"@hot-updater/plugin-core": "0.25.7"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@clack/prompts": "0.11.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"typescript": "5.8.2",
|
|
60
60
|
"@types/semver": "^7.7.1",
|
|
61
61
|
"execa": "9.5.2",
|
|
62
|
-
"@hot-updater/test-utils": "0.25.
|
|
62
|
+
"@hot-updater/test-utils": "0.25.7"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"typescript": "*"
|