@hot-updater/cli-tools 0.29.6 → 0.29.8
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.mjs +28 -28
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import fs$1 from "fs/promises";
|
|
|
9
9
|
import assert from "assert";
|
|
10
10
|
import crypto from "crypto";
|
|
11
11
|
import { Buffer as Buffer$1 } from "buffer";
|
|
12
|
-
import
|
|
12
|
+
import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
|
|
13
13
|
import * as k from "node:readline";
|
|
14
14
|
import ot from "node:readline";
|
|
15
15
|
import tty, { ReadStream } from "node:tty";
|
|
@@ -19280,7 +19280,7 @@ var dist_exports = /* @__PURE__ */ __exportAll({
|
|
|
19280
19280
|
updateSettings: () => It$1
|
|
19281
19281
|
});
|
|
19282
19282
|
function me() {
|
|
19283
|
-
return
|
|
19283
|
+
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";
|
|
19284
19284
|
}
|
|
19285
19285
|
const et = me(), ct = () => process.env.CI === "true", Mt = (t) => t.isTTY === !0, C = (t, r) => et ? t : r, Rt = C("◆", "*"), dt = C("■", "x"), $t = C("▲", "x"), V = C("◇", "o"), ht = C("┌", "T"), d = C("│", "|"), x = C("└", "—"), Ot = C("┐", "T"), Pt = C("┘", "—"), Q = C("●", ">"), H = C("○", " "), st = C("◻", "[•]"), U = C("◼", "[+]"), q = C("◻", "[ ]"), Nt = C("▪", "•"), rt = C("─", "-"), mt = C("╮", "+"), Wt = C("├", "+"), pt = C("╯", "+"), gt = C("╰", "+"), Lt = C("╭", "+"), ft = C("●", "•"), Ft = C("◆", "*"), yt = C("▲", "!"), Et = C("■", "x"), W = (t) => {
|
|
19286
19286
|
switch (t) {
|
|
@@ -19920,7 +19920,7 @@ ${import_picocolors.default.cyan(x)}
|
|
|
19920
19920
|
`), o = a.reduce((n, c) => Math.max(M(c), n), 0);
|
|
19921
19921
|
return J(t, r - (a.map(s).reduce((n, c) => Math.max(M(c), n), 0) - o), i);
|
|
19922
19922
|
}, Ve = (t = "", r = "", s) => {
|
|
19923
|
-
const i = s?.output ??
|
|
19923
|
+
const i = s?.output ?? process$1.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? Ge, u = [
|
|
19924
19924
|
"",
|
|
19925
19925
|
...ke(t, rt$1(i) - 6, o).split(`
|
|
19926
19926
|
`).map(o),
|
|
@@ -20850,13 +20850,13 @@ function assembleStyles$1() {
|
|
|
20850
20850
|
const ansiStyles$1 = assembleStyles$1();
|
|
20851
20851
|
//#endregion
|
|
20852
20852
|
//#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
20853
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
20853
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
20854
20854
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
20855
20855
|
const position = argv.indexOf(prefix + flag);
|
|
20856
20856
|
const terminatorPosition = argv.indexOf("--");
|
|
20857
20857
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
20858
20858
|
}
|
|
20859
|
-
const { env } =
|
|
20859
|
+
const { env } = process$1;
|
|
20860
20860
|
let flagForceColor;
|
|
20861
20861
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
20862
20862
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -20889,7 +20889,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
20889
20889
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
20890
20890
|
const min = forceColor || 0;
|
|
20891
20891
|
if (env.TERM === "dumb") return min;
|
|
20892
|
-
if (
|
|
20892
|
+
if (process$1.platform === "win32") {
|
|
20893
20893
|
const osRelease = os.release().split(".");
|
|
20894
20894
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
20895
20895
|
return 1;
|
|
@@ -21646,7 +21646,7 @@ const NEWLINE = "\n";
|
|
|
21646
21646
|
const PAD = " ";
|
|
21647
21647
|
const NONE = "none";
|
|
21648
21648
|
const terminalColumns = () => {
|
|
21649
|
-
const { env, stdout, stderr } =
|
|
21649
|
+
const { env, stdout, stderr } = process$1;
|
|
21650
21650
|
if (stdout?.columns) return stdout.columns;
|
|
21651
21651
|
if (stderr?.columns) return stderr.columns;
|
|
21652
21652
|
if (env.COLUMNS) return Number.parseInt(env.COLUMNS, 10);
|
|
@@ -21789,8 +21789,8 @@ const boxContent = (content, contentWidth, options) => {
|
|
|
21789
21789
|
return result;
|
|
21790
21790
|
};
|
|
21791
21791
|
const sanitizeOptions = (options) => {
|
|
21792
|
-
if (options.fullscreen &&
|
|
21793
|
-
let newDimensions = [
|
|
21792
|
+
if (options.fullscreen && process$1?.stdout) {
|
|
21793
|
+
let newDimensions = [process$1.stdout.columns, process$1.stdout.rows];
|
|
21794
21794
|
if (typeof options.fullscreen === "function") newDimensions = options.fullscreen(...newDimensions);
|
|
21795
21795
|
options.width ||= newDimensions[0];
|
|
21796
21796
|
options.height ||= newDimensions[1];
|
|
@@ -36051,9 +36051,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
36051
36051
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
36052
36052
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
36053
36053
|
const STANDARD_STREAMS = [
|
|
36054
|
-
|
|
36055
|
-
|
|
36056
|
-
|
|
36054
|
+
process$1.stdin,
|
|
36055
|
+
process$1.stdout,
|
|
36056
|
+
process$1.stderr
|
|
36057
36057
|
];
|
|
36058
36058
|
const STANDARD_STREAMS_ALIASES = [
|
|
36059
36059
|
"stdin",
|
|
@@ -36174,9 +36174,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
36174
36174
|
//#endregion
|
|
36175
36175
|
//#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
36176
36176
|
function isUnicodeSupported() {
|
|
36177
|
-
const { env } =
|
|
36177
|
+
const { env } = process$1;
|
|
36178
36178
|
const { TERM, TERM_PROGRAM } = env;
|
|
36179
|
-
if (
|
|
36179
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
36180
36180
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
36181
36181
|
}
|
|
36182
36182
|
//#endregion
|
|
@@ -37069,7 +37069,7 @@ function traversePathUp(startPath) {
|
|
|
37069
37069
|
}
|
|
37070
37070
|
//#endregion
|
|
37071
37071
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
37072
|
-
const npmRunPath = ({ cwd =
|
|
37072
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
|
|
37073
37073
|
const cwdPath = path$1.resolve(toPath$2(cwd));
|
|
37074
37074
|
const result = [];
|
|
37075
37075
|
const pathParts = pathOption.split(path$1.delimiter);
|
|
@@ -37087,7 +37087,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
37087
37087
|
const pathPart = path$1.resolve(cwdPath, toPath$2(execPath), "..");
|
|
37088
37088
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
37089
37089
|
};
|
|
37090
|
-
const npmRunPathEnv = ({ env =
|
|
37090
|
+
const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
|
|
37091
37091
|
env = { ...env };
|
|
37092
37092
|
const pathName = pathKey({ env });
|
|
37093
37093
|
options.path = env[pathName];
|
|
@@ -38194,7 +38194,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
38194
38194
|
};
|
|
38195
38195
|
const getDefaultCwd = () => {
|
|
38196
38196
|
try {
|
|
38197
|
-
return
|
|
38197
|
+
return process$1.cwd();
|
|
38198
38198
|
} catch (error) {
|
|
38199
38199
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
38200
38200
|
throw error;
|
|
@@ -38228,7 +38228,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
38228
38228
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
38229
38229
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
38230
38230
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
38231
|
-
if (
|
|
38231
|
+
if (process$1.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
38232
38232
|
return {
|
|
38233
38233
|
file,
|
|
38234
38234
|
commandArguments,
|
|
@@ -38255,7 +38255,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
38255
38255
|
});
|
|
38256
38256
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
38257
38257
|
const env = extendEnv ? {
|
|
38258
|
-
...
|
|
38258
|
+
...process$1.env,
|
|
38259
38259
|
...envOption
|
|
38260
38260
|
} : envOption;
|
|
38261
38261
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -39222,12 +39222,12 @@ const guessStreamDirection = {
|
|
|
39222
39222
|
}
|
|
39223
39223
|
};
|
|
39224
39224
|
const getStandardStreamDirection = (value) => {
|
|
39225
|
-
if ([0,
|
|
39225
|
+
if ([0, process$1.stdin].includes(value)) return "input";
|
|
39226
39226
|
if ([
|
|
39227
39227
|
1,
|
|
39228
39228
|
2,
|
|
39229
|
-
|
|
39230
|
-
|
|
39229
|
+
process$1.stdout,
|
|
39230
|
+
process$1.stderr
|
|
39231
39231
|
].includes(value)) return "output";
|
|
39232
39232
|
};
|
|
39233
39233
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -40267,9 +40267,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
40267
40267
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
40268
40268
|
};
|
|
40269
40269
|
const getIpcExport = () => {
|
|
40270
|
-
const anyProcess =
|
|
40270
|
+
const anyProcess = process$1;
|
|
40271
40271
|
const isSubprocess = true;
|
|
40272
|
-
const ipc =
|
|
40272
|
+
const ipc = process$1.channel !== void 0;
|
|
40273
40273
|
return {
|
|
40274
40274
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
40275
40275
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -40739,7 +40739,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
40739
40739
|
};
|
|
40740
40740
|
var SignalExit = class extends SignalExitBase {
|
|
40741
40741
|
/* c8 ignore start */
|
|
40742
|
-
#hupSig = process$
|
|
40742
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
40743
40743
|
/* c8 ignore stop */
|
|
40744
40744
|
#emitter = new Emitter();
|
|
40745
40745
|
#process;
|
|
@@ -40834,8 +40834,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
40834
40834
|
} else return og.call(this.#process, ev, ...args);
|
|
40835
40835
|
}
|
|
40836
40836
|
};
|
|
40837
|
-
const process$
|
|
40838
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
40837
|
+
const process$2 = globalThis.process;
|
|
40838
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
40839
40839
|
//#endregion
|
|
40840
40840
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
|
|
40841
40841
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -42047,7 +42047,7 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
|
|
|
42047
42047
|
//#endregion
|
|
42048
42048
|
//#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
42049
42049
|
const toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
42050
|
-
async function findUp(name, { cwd =
|
|
42050
|
+
async function findUp(name, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
|
|
42051
42051
|
let directory = path$1.resolve(toPath$1(cwd) ?? "");
|
|
42052
42052
|
const { root } = path$1.parse(directory);
|
|
42053
42053
|
stopAt = path$1.resolve(directory, toPath$1(stopAt ?? root));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cli-tools",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI utilities for Hot Updater",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"oxc-transform": "0.121.0",
|
|
43
43
|
"typescript": "6.0.2",
|
|
44
44
|
"unconfig": "7.5.0",
|
|
45
|
-
"@hot-updater/plugin-core": "0.29.
|
|
45
|
+
"@hot-updater/plugin-core": "0.29.8"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@clack/prompts": "1.0.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"semver": "^7.6.3",
|
|
59
59
|
"tar": "^7.5.1",
|
|
60
60
|
"workspace-tools": "^0.36.4",
|
|
61
|
-
"@hot-updater/test-utils": "0.29.
|
|
61
|
+
"@hot-updater/test-utils": "0.29.8"
|
|
62
62
|
},
|
|
63
63
|
"inlinedDependencies": {
|
|
64
64
|
"@babel/code-frame": "7.29.0",
|