@hot-updater/cli-tools 0.29.0 → 0.29.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +28 -28
  2. package/package.json +4 -4
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 process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
12
+ import N, { 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 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";
19283
+ return N.platform !== "win32" ? N.env.TERM !== "linux" : !!N.env.CI || !!N.env.WT_SESSION || !!N.env.TERMINUS_SUBLIME || N.env.ConEmuTask === "{cmd::Cmder}" || N.env.TERM_PROGRAM === "Terminus-Sublime" || N.env.TERM_PROGRAM === "vscode" || N.env.TERM === "xterm-256color" || N.env.TERM === "alacritty" || N.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 ?? process$1.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? Ge, u = [
19923
+ const i = s?.output ?? N.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 : process$1.argv) {
20853
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : N.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 } = process$1;
20859
+ const { env } = N;
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 (process$1.platform === "win32") {
20892
+ if (N.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 } = process$1;
21649
+ const { env, stdout, stderr } = N;
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 && process$1?.stdout) {
21793
- let newDimensions = [process$1.stdout.columns, process$1.stdout.rows];
21792
+ if (options.fullscreen && N?.stdout) {
21793
+ let newDimensions = [N.stdout.columns, N.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];
@@ -35986,9 +35986,9 @@ const getSubprocessResult = ({ stdout }) => {
35986
35986
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
35987
35987
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
35988
35988
  const STANDARD_STREAMS = [
35989
- process$1.stdin,
35990
- process$1.stdout,
35991
- process$1.stderr
35989
+ N.stdin,
35990
+ N.stdout,
35991
+ N.stderr
35992
35992
  ];
35993
35993
  const STANDARD_STREAMS_ALIASES = [
35994
35994
  "stdin",
@@ -36109,9 +36109,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
36109
36109
  //#endregion
36110
36110
  //#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
36111
36111
  function isUnicodeSupported() {
36112
- const { env } = process$1;
36112
+ const { env } = N;
36113
36113
  const { TERM, TERM_PROGRAM } = env;
36114
- if (process$1.platform !== "win32") return TERM !== "linux";
36114
+ if (N.platform !== "win32") return TERM !== "linux";
36115
36115
  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";
36116
36116
  }
36117
36117
  //#endregion
@@ -37004,7 +37004,7 @@ function traversePathUp(startPath) {
37004
37004
  }
37005
37005
  //#endregion
37006
37006
  //#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
37007
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
37007
+ const npmRunPath = ({ cwd = N.cwd(), path: pathOption = N.env[pathKey()], preferLocal = true, execPath = N.execPath, addExecPath = true } = {}) => {
37008
37008
  const cwdPath = path$1.resolve(toPath$2(cwd));
37009
37009
  const result = [];
37010
37010
  const pathParts = pathOption.split(path$1.delimiter);
@@ -37022,7 +37022,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
37022
37022
  const pathPart = path$1.resolve(cwdPath, toPath$2(execPath), "..");
37023
37023
  if (!pathParts.includes(pathPart)) result.push(pathPart);
37024
37024
  };
37025
- const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
37025
+ const npmRunPathEnv = ({ env = N.env, ...options } = {}) => {
37026
37026
  env = { ...env };
37027
37027
  const pathName = pathKey({ env });
37028
37028
  options.path = env[pathName];
@@ -38129,7 +38129,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
38129
38129
  };
38130
38130
  const getDefaultCwd = () => {
38131
38131
  try {
38132
- return process$1.cwd();
38132
+ return N.cwd();
38133
38133
  } catch (error) {
38134
38134
  error.message = `The current directory does not exist.\n${error.message}`;
38135
38135
  throw error;
@@ -38163,7 +38163,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
38163
38163
  options.killSignal = normalizeKillSignal(options.killSignal);
38164
38164
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
38165
38165
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
38166
- if (process$1.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
38166
+ if (N.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
38167
38167
  return {
38168
38168
  file,
38169
38169
  commandArguments,
@@ -38190,7 +38190,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
38190
38190
  });
38191
38191
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
38192
38192
  const env = extendEnv ? {
38193
- ...process$1.env,
38193
+ ...N.env,
38194
38194
  ...envOption
38195
38195
  } : envOption;
38196
38196
  if (preferLocal || node) return npmRunPathEnv({
@@ -39157,12 +39157,12 @@ const guessStreamDirection = {
39157
39157
  }
39158
39158
  };
39159
39159
  const getStandardStreamDirection = (value) => {
39160
- if ([0, process$1.stdin].includes(value)) return "input";
39160
+ if ([0, N.stdin].includes(value)) return "input";
39161
39161
  if ([
39162
39162
  1,
39163
39163
  2,
39164
- process$1.stdout,
39165
- process$1.stderr
39164
+ N.stdout,
39165
+ N.stderr
39166
39166
  ].includes(value)) return "output";
39167
39167
  };
39168
39168
  const DEFAULT_DIRECTION = "output";
@@ -40202,9 +40202,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
40202
40202
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
40203
40203
  };
40204
40204
  const getIpcExport = () => {
40205
- const anyProcess = process$1;
40205
+ const anyProcess = N;
40206
40206
  const isSubprocess = true;
40207
- const ipc = process$1.channel !== void 0;
40207
+ const ipc = N.channel !== void 0;
40208
40208
  return {
40209
40209
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
40210
40210
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -40674,7 +40674,7 @@ var SignalExitFallback = class extends SignalExitBase {
40674
40674
  };
40675
40675
  var SignalExit = class extends SignalExitBase {
40676
40676
  /* c8 ignore start */
40677
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
40677
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
40678
40678
  /* c8 ignore stop */
40679
40679
  #emitter = new Emitter();
40680
40680
  #process;
@@ -40769,8 +40769,8 @@ var SignalExit = class extends SignalExitBase {
40769
40769
  } else return og.call(this.#process, ev, ...args);
40770
40770
  }
40771
40771
  };
40772
- const process$2 = globalThis.process;
40773
- const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
40772
+ const process$1 = globalThis.process;
40773
+ const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
40774
40774
  //#endregion
40775
40775
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/terminate/cleanup.js
40776
40776
  const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
@@ -41982,7 +41982,7 @@ const { sendMessage, getOneMessage, getEachMessage, getCancelSignal } = getIpcEx
41982
41982
  //#endregion
41983
41983
  //#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
41984
41984
  const toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
41985
- async function findUp(name, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
41985
+ async function findUp(name, { cwd = N.cwd(), type = "file", stopAt } = {}) {
41986
41986
  let directory = path$1.resolve(toPath$1(cwd) ?? "");
41987
41987
  const { root } = path$1.parse(directory);
41988
41988
  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.0",
3
+ "version": "0.29.1",
4
4
  "type": "module",
5
5
  "description": "CLI utilities for Hot Updater",
6
6
  "sideEffects": false,
@@ -41,8 +41,8 @@
41
41
  "dependencies": {
42
42
  "oxc-transform": "0.121.0",
43
43
  "unconfig": "7.5.0",
44
- "@hot-updater/core": "0.29.0",
45
- "@hot-updater/plugin-core": "0.29.0"
44
+ "@hot-updater/core": "0.29.1",
45
+ "@hot-updater/plugin-core": "0.29.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@clack/prompts": "1.0.1",
@@ -59,7 +59,7 @@
59
59
  "tar": "^7.5.1",
60
60
  "typescript": "5.8.2",
61
61
  "workspace-tools": "^0.36.4",
62
- "@hot-updater/test-utils": "0.29.0"
62
+ "@hot-updater/test-utils": "0.29.1"
63
63
  },
64
64
  "inlinedDependencies": {
65
65
  "@babel/code-frame": "7.29.0",