@lobehub/cli 0.0.198 → 0.0.199

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 CHANGED
@@ -15,7 +15,7 @@ import { Buffer as Buffer$1 } from "node:buffer";
15
15
  import * as net$1 from "node:net";
16
16
  import net, { BlockList, connect, createServer, isIP } from "node:net";
17
17
  import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
18
- import _w, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
18
+ import process$1, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
19
19
  import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
20
20
  import { finished, pipeline } from "node:stream/promises";
21
21
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
@@ -24432,7 +24432,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
24432
24432
  const childProcess$2 = __require("node:child_process");
24433
24433
  const path$16 = __require("node:path");
24434
24434
  const fs$17 = __require("node:fs");
24435
- const process$2 = __require("node:process");
24435
+ const process$3 = __require("node:process");
24436
24436
  const { Argument, humanReadableArgName } = require_argument();
24437
24437
  const { CommanderError } = require_error$1();
24438
24438
  const { Help, stripColor } = require_help();
@@ -24484,13 +24484,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
24484
24484
  this._showSuggestionAfterError = true;
24485
24485
  this._savedState = null;
24486
24486
  this._outputConfiguration = {
24487
- writeOut: (str) => process$2.stdout.write(str),
24488
- writeErr: (str) => process$2.stderr.write(str),
24487
+ writeOut: (str) => process$3.stdout.write(str),
24488
+ writeErr: (str) => process$3.stderr.write(str),
24489
24489
  outputError: (str, write) => write(str),
24490
- getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
24491
- getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
24492
- getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
24493
- getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
24490
+ getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
24491
+ getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
24492
+ getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
24493
+ getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
24494
24494
  stripColor: (str) => stripColor(str)
24495
24495
  };
24496
24496
  this._hidden = false;
@@ -24848,7 +24848,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
24848
24848
  */
24849
24849
  _exit(exitCode, code, message) {
24850
24850
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
24851
- process$2.exit(exitCode);
24851
+ process$3.exit(exitCode);
24852
24852
  }
24853
24853
  /**
24854
24854
  * Register callback `fn` for the command.
@@ -25187,11 +25187,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
25187
25187
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
25188
25188
  parseOptions = parseOptions || {};
25189
25189
  if (argv === void 0 && parseOptions.from === void 0) {
25190
- if (process$2.versions?.electron) parseOptions.from = "electron";
25191
- const execArgv = process$2.execArgv ?? [];
25190
+ if (process$3.versions?.electron) parseOptions.from = "electron";
25191
+ const execArgv = process$3.execArgv ?? [];
25192
25192
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
25193
25193
  }
25194
- if (argv === void 0) argv = process$2.argv;
25194
+ if (argv === void 0) argv = process$3.argv;
25195
25195
  this.rawArgs = argv.slice();
25196
25196
  let userArgs;
25197
25197
  switch (parseOptions.from) {
@@ -25201,7 +25201,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
25201
25201
  userArgs = argv.slice(2);
25202
25202
  break;
25203
25203
  case "electron":
25204
- if (process$2.defaultApp) {
25204
+ if (process$3.defaultApp) {
25205
25205
  this._scriptPath = argv[1];
25206
25206
  userArgs = argv.slice(2);
25207
25207
  } else userArgs = argv.slice(1);
@@ -25366,16 +25366,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
25366
25366
  }
25367
25367
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
25368
25368
  let proc;
25369
- if (process$2.platform !== "win32") if (launchWithNode) {
25369
+ if (process$3.platform !== "win32") if (launchWithNode) {
25370
25370
  args.unshift(executableFile);
25371
- args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
25372
- proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
25371
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
25372
+ proc = childProcess$2.spawn(process$3.argv[0], args, { stdio: "inherit" });
25373
25373
  } else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
25374
25374
  else {
25375
25375
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
25376
25376
  args.unshift(executableFile);
25377
- args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
25378
- proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
25377
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
25378
+ proc = childProcess$2.spawn(process$3.execPath, args, { stdio: "inherit" });
25379
25379
  }
25380
25380
  if (!proc.killed) [
25381
25381
  "SIGUSR1",
@@ -25384,20 +25384,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
25384
25384
  "SIGINT",
25385
25385
  "SIGHUP"
25386
25386
  ].forEach((signal) => {
25387
- process$2.on(signal, () => {
25387
+ process$3.on(signal, () => {
25388
25388
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
25389
25389
  });
25390
25390
  });
25391
25391
  const exitCallback = this._exitCallback;
25392
25392
  proc.on("close", (code) => {
25393
25393
  code = code ?? 1;
25394
- if (!exitCallback) process$2.exit(code);
25394
+ if (!exitCallback) process$3.exit(code);
25395
25395
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
25396
25396
  });
25397
25397
  proc.on("error", (err) => {
25398
25398
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
25399
25399
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
25400
- if (!exitCallback) process$2.exit(1);
25400
+ if (!exitCallback) process$3.exit(1);
25401
25401
  else {
25402
25402
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
25403
25403
  wrappedError.nestedError = err;
@@ -25806,13 +25806,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
25806
25806
  */
25807
25807
  _parseOptionsEnv() {
25808
25808
  this.options.forEach((option) => {
25809
- if (option.envVar && option.envVar in process$2.env) {
25809
+ if (option.envVar && option.envVar in process$3.env) {
25810
25810
  const optionKey = option.attributeName();
25811
25811
  if (this.getOptionValue(optionKey) === void 0 || [
25812
25812
  "default",
25813
25813
  "config",
25814
25814
  "env"
25815
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
25815
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
25816
25816
  else this.emit(`optionEnv:${option.name()}`);
25817
25817
  }
25818
25818
  });
@@ -26229,7 +26229,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
26229
26229
  */
26230
26230
  help(contextOptions) {
26231
26231
  this.outputHelp(contextOptions);
26232
- let exitCode = Number(process$2.exitCode ?? 0);
26232
+ let exitCode = Number(process$3.exitCode ?? 0);
26233
26233
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
26234
26234
  this._exit(exitCode, "commander.help", "(outputHelp)");
26235
26235
  }
@@ -26319,8 +26319,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
26319
26319
  * @package
26320
26320
  */
26321
26321
  function useColor() {
26322
- if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
26323
- if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
26322
+ if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
26323
+ if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
26324
26324
  }
26325
26325
  exports.Command = Command;
26326
26326
  exports.useColor = useColor;
@@ -337537,7 +337537,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
337537
337537
  function getDefaultEnvironment() {
337538
337538
  const env = {};
337539
337539
  for (const key of DEFAULT_INHERITED_ENV_VARS) {
337540
- const value = _w.env[key];
337540
+ const value = process$1.env[key];
337541
337541
  if (value === void 0) continue;
337542
337542
  if (value.startsWith("()")) continue;
337543
337543
  env[key] = value;
@@ -337548,7 +337548,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
337548
337548
  var init_stdio = __esmMin((() => {
337549
337549
  init_src_CeKsbNLO();
337550
337550
  import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
337551
- DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
337551
+ DEFAULT_INHERITED_ENV_VARS = process$1.platform === "win32" ? [
337552
337552
  "APPDATA",
337553
337553
  "COMSPEC",
337554
337554
  "HOMEDRIVE",
@@ -337605,7 +337605,7 @@ var init_stdio = __esmMin((() => {
337605
337605
  this._serverParams.stderr ?? "inherit"
337606
337606
  ],
337607
337607
  shell: false,
337608
- windowsHide: _w.platform === "win32",
337608
+ windowsHide: process$1.platform === "win32",
337609
337609
  cwd: this._serverParams.cwd
337610
337610
  });
337611
337611
  this._process.on("error", (error) => {
@@ -340639,9 +340639,9 @@ const getSubprocessResult = ({ stdout }) => {
340639
340639
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
340640
340640
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
340641
340641
  const STANDARD_STREAMS = [
340642
- _w.stdin,
340643
- _w.stdout,
340644
- _w.stderr
340642
+ process$1.stdin,
340643
+ process$1.stdout,
340644
+ process$1.stderr
340645
340645
  ];
340646
340646
  const STANDARD_STREAMS_ALIASES = [
340647
340647
  "stdin",
@@ -340766,9 +340766,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
340766
340766
  //#endregion
340767
340767
  //#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
340768
340768
  function isUnicodeSupported() {
340769
- const { env } = _w;
340769
+ const { env } = process$1;
340770
340770
  const { TERM, TERM_PROGRAM } = env;
340771
- if (_w.platform !== "win32") return TERM !== "linux";
340771
+ if (process$1.platform !== "win32") return TERM !== "linux";
340772
340772
  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";
340773
340773
  }
340774
340774
 
@@ -341303,7 +341303,7 @@ function traversePathUp(startPath) {
341303
341303
 
341304
341304
  //#endregion
341305
341305
  //#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
341306
- const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
341306
+ const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
341307
341307
  const cwdPath = path.resolve(toPath(cwd));
341308
341308
  const result = [];
341309
341309
  const pathParts = pathOption.split(path.delimiter);
@@ -341321,7 +341321,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
341321
341321
  const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
341322
341322
  if (!pathParts.includes(pathPart)) result.push(pathPart);
341323
341323
  };
341324
- const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
341324
+ const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
341325
341325
  env = { ...env };
341326
341326
  const pathName = pathKey({ env });
341327
341327
  options.path = env[pathName];
@@ -342456,7 +342456,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
342456
342456
  };
342457
342457
  const getDefaultCwd = () => {
342458
342458
  try {
342459
- return _w.cwd();
342459
+ return process$1.cwd();
342460
342460
  } catch (error) {
342461
342461
  error.message = `The current directory does not exist.\n${error.message}`;
342462
342462
  throw error;
@@ -342492,7 +342492,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
342492
342492
  options.killSignal = normalizeKillSignal(options.killSignal);
342493
342493
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
342494
342494
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
342495
- if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
342495
+ if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
342496
342496
  return {
342497
342497
  file,
342498
342498
  commandArguments,
@@ -342519,7 +342519,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
342519
342519
  });
342520
342520
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
342521
342521
  const env = extendEnv ? {
342522
- ..._w.env,
342522
+ ...process$1.env,
342523
342523
  ...envOption
342524
342524
  } : envOption;
342525
342525
  if (preferLocal || node) return npmRunPathEnv({
@@ -343521,12 +343521,12 @@ const guessStreamDirection = {
343521
343521
  }
343522
343522
  };
343523
343523
  const getStandardStreamDirection = (value) => {
343524
- if ([0, _w.stdin].includes(value)) return "input";
343524
+ if ([0, process$1.stdin].includes(value)) return "input";
343525
343525
  if ([
343526
343526
  1,
343527
343527
  2,
343528
- _w.stdout,
343529
- _w.stderr
343528
+ process$1.stdout,
343529
+ process$1.stderr
343530
343530
  ].includes(value)) return "output";
343531
343531
  };
343532
343532
  const DEFAULT_DIRECTION = "output";
@@ -344590,9 +344590,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
344590
344590
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
344591
344591
  };
344592
344592
  const getIpcExport = () => {
344593
- const anyProcess = _w;
344593
+ const anyProcess = process$1;
344594
344594
  const isSubprocess = true;
344595
- const ipc = _w.channel !== void 0;
344595
+ const ipc = process$1.channel !== void 0;
344596
344596
  return {
344597
344597
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
344598
344598
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -345069,7 +345069,7 @@ var SignalExitFallback = class extends SignalExitBase {
345069
345069
  };
345070
345070
  var SignalExit = class extends SignalExitBase {
345071
345071
  /* c8 ignore start */
345072
- #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
345072
+ #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
345073
345073
  /* c8 ignore stop */
345074
345074
  #emitter = new Emitter();
345075
345075
  #process;
@@ -345164,8 +345164,8 @@ var SignalExit = class extends SignalExitBase {
345164
345164
  } else return og.call(this.#process, ev, ...args);
345165
345165
  }
345166
345166
  };
345167
- const process$1 = globalThis.process;
345168
- const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
345167
+ const process$2 = globalThis.process;
345168
+ const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
345169
345169
 
345170
345170
  //#endregion
345171
345171
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/cleanup.js
package/man/man1/lh.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .\" Code generated by `npm run man:generate`; DO NOT EDIT.
2
2
  .\" Manual command details come from the Commander command tree.
3
- .TH LH 1 "" "@lobehub/cli 0.0.198" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.199" "User Commands"
4
4
  .SH NAME
5
5
  lh \- LobeHub CLI \- manage and connect to LobeHub services
6
6
  .SH SYNOPSIS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/cli",
3
- "version": "0.0.198",
3
+ "version": "0.0.199",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lobehub/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "f31fd954f70f0c64ee9b210cfbc7fee5c09cc87b"
86
+ "gitHead": "d504c14db2d1043da33d54341810aaa7ecd9e316"
87
87
  }