@lobehub/cli 0.0.145 → 0.0.146

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 process$1, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
18
+ import _w, { 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";
@@ -21955,7 +21955,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
21955
21955
  const childProcess$2 = __require("node:child_process");
21956
21956
  const path$16 = __require("node:path");
21957
21957
  const fs$17 = __require("node:fs");
21958
- const process$3 = __require("node:process");
21958
+ const process$2 = __require("node:process");
21959
21959
  const { Argument, humanReadableArgName } = require_argument();
21960
21960
  const { CommanderError } = require_error$1();
21961
21961
  const { Help, stripColor } = require_help();
@@ -22007,13 +22007,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
22007
22007
  this._showSuggestionAfterError = true;
22008
22008
  this._savedState = null;
22009
22009
  this._outputConfiguration = {
22010
- writeOut: (str) => process$3.stdout.write(str),
22011
- writeErr: (str) => process$3.stderr.write(str),
22010
+ writeOut: (str) => process$2.stdout.write(str),
22011
+ writeErr: (str) => process$2.stderr.write(str),
22012
22012
  outputError: (str, write) => write(str),
22013
- getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
22014
- getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
22015
- getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
22016
- getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
22013
+ getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
22014
+ getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
22015
+ getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
22016
+ getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
22017
22017
  stripColor: (str) => stripColor(str)
22018
22018
  };
22019
22019
  this._hidden = false;
@@ -22371,7 +22371,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22371
22371
  */
22372
22372
  _exit(exitCode, code, message) {
22373
22373
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
22374
- process$3.exit(exitCode);
22374
+ process$2.exit(exitCode);
22375
22375
  }
22376
22376
  /**
22377
22377
  * Register callback `fn` for the command.
@@ -22710,11 +22710,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
22710
22710
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
22711
22711
  parseOptions = parseOptions || {};
22712
22712
  if (argv === void 0 && parseOptions.from === void 0) {
22713
- if (process$3.versions?.electron) parseOptions.from = "electron";
22714
- const execArgv = process$3.execArgv ?? [];
22713
+ if (process$2.versions?.electron) parseOptions.from = "electron";
22714
+ const execArgv = process$2.execArgv ?? [];
22715
22715
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
22716
22716
  }
22717
- if (argv === void 0) argv = process$3.argv;
22717
+ if (argv === void 0) argv = process$2.argv;
22718
22718
  this.rawArgs = argv.slice();
22719
22719
  let userArgs;
22720
22720
  switch (parseOptions.from) {
@@ -22724,7 +22724,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22724
22724
  userArgs = argv.slice(2);
22725
22725
  break;
22726
22726
  case "electron":
22727
- if (process$3.defaultApp) {
22727
+ if (process$2.defaultApp) {
22728
22728
  this._scriptPath = argv[1];
22729
22729
  userArgs = argv.slice(2);
22730
22730
  } else userArgs = argv.slice(1);
@@ -22889,16 +22889,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
22889
22889
  }
22890
22890
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
22891
22891
  let proc;
22892
- if (process$3.platform !== "win32") if (launchWithNode) {
22892
+ if (process$2.platform !== "win32") if (launchWithNode) {
22893
22893
  args.unshift(executableFile);
22894
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22895
- proc = childProcess$2.spawn(process$3.argv[0], args, { stdio: "inherit" });
22894
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22895
+ proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
22896
22896
  } else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
22897
22897
  else {
22898
22898
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22899
22899
  args.unshift(executableFile);
22900
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
22901
- proc = childProcess$2.spawn(process$3.execPath, args, { stdio: "inherit" });
22900
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
22901
+ proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
22902
22902
  }
22903
22903
  if (!proc.killed) [
22904
22904
  "SIGUSR1",
@@ -22907,20 +22907,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
22907
22907
  "SIGINT",
22908
22908
  "SIGHUP"
22909
22909
  ].forEach((signal) => {
22910
- process$3.on(signal, () => {
22910
+ process$2.on(signal, () => {
22911
22911
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
22912
22912
  });
22913
22913
  });
22914
22914
  const exitCallback = this._exitCallback;
22915
22915
  proc.on("close", (code) => {
22916
22916
  code = code ?? 1;
22917
- if (!exitCallback) process$3.exit(code);
22917
+ if (!exitCallback) process$2.exit(code);
22918
22918
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
22919
22919
  });
22920
22920
  proc.on("error", (err) => {
22921
22921
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
22922
22922
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
22923
- if (!exitCallback) process$3.exit(1);
22923
+ if (!exitCallback) process$2.exit(1);
22924
22924
  else {
22925
22925
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
22926
22926
  wrappedError.nestedError = err;
@@ -23329,13 +23329,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
23329
23329
  */
23330
23330
  _parseOptionsEnv() {
23331
23331
  this.options.forEach((option) => {
23332
- if (option.envVar && option.envVar in process$3.env) {
23332
+ if (option.envVar && option.envVar in process$2.env) {
23333
23333
  const optionKey = option.attributeName();
23334
23334
  if (this.getOptionValue(optionKey) === void 0 || [
23335
23335
  "default",
23336
23336
  "config",
23337
23337
  "env"
23338
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
23338
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
23339
23339
  else this.emit(`optionEnv:${option.name()}`);
23340
23340
  }
23341
23341
  });
@@ -23752,7 +23752,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
23752
23752
  */
23753
23753
  help(contextOptions) {
23754
23754
  this.outputHelp(contextOptions);
23755
- let exitCode = Number(process$3.exitCode ?? 0);
23755
+ let exitCode = Number(process$2.exitCode ?? 0);
23756
23756
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
23757
23757
  this._exit(exitCode, "commander.help", "(outputHelp)");
23758
23758
  }
@@ -23842,8 +23842,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
23842
23842
  * @package
23843
23843
  */
23844
23844
  function useColor() {
23845
- if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
23846
- if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
23845
+ if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
23846
+ if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
23847
23847
  }
23848
23848
  exports.Command = Command;
23849
23849
  exports.useColor = useColor;
@@ -333027,7 +333027,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
333027
333027
  function getDefaultEnvironment() {
333028
333028
  const env = {};
333029
333029
  for (const key of DEFAULT_INHERITED_ENV_VARS) {
333030
- const value = process$1.env[key];
333030
+ const value = _w.env[key];
333031
333031
  if (value === void 0) continue;
333032
333032
  if (value.startsWith("()")) continue;
333033
333033
  env[key] = value;
@@ -333038,7 +333038,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
333038
333038
  var init_stdio = __esmMin((() => {
333039
333039
  init_src_CeKsbNLO();
333040
333040
  import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
333041
- DEFAULT_INHERITED_ENV_VARS = process$1.platform === "win32" ? [
333041
+ DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
333042
333042
  "APPDATA",
333043
333043
  "COMSPEC",
333044
333044
  "HOMEDRIVE",
@@ -333095,7 +333095,7 @@ var init_stdio = __esmMin((() => {
333095
333095
  this._serverParams.stderr ?? "inherit"
333096
333096
  ],
333097
333097
  shell: false,
333098
- windowsHide: process$1.platform === "win32",
333098
+ windowsHide: _w.platform === "win32",
333099
333099
  cwd: this._serverParams.cwd
333100
333100
  });
333101
333101
  this._process.on("error", (error) => {
@@ -336129,9 +336129,9 @@ const getSubprocessResult = ({ stdout }) => {
336129
336129
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
336130
336130
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
336131
336131
  const STANDARD_STREAMS = [
336132
- process$1.stdin,
336133
- process$1.stdout,
336134
- process$1.stderr
336132
+ _w.stdin,
336133
+ _w.stdout,
336134
+ _w.stderr
336135
336135
  ];
336136
336136
  const STANDARD_STREAMS_ALIASES = [
336137
336137
  "stdin",
@@ -336256,9 +336256,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
336256
336256
  //#endregion
336257
336257
  //#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
336258
336258
  function isUnicodeSupported() {
336259
- const { env } = process$1;
336259
+ const { env } = _w;
336260
336260
  const { TERM, TERM_PROGRAM } = env;
336261
- if (process$1.platform !== "win32") return TERM !== "linux";
336261
+ if (_w.platform !== "win32") return TERM !== "linux";
336262
336262
  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";
336263
336263
  }
336264
336264
 
@@ -336793,7 +336793,7 @@ function traversePathUp(startPath) {
336793
336793
 
336794
336794
  //#endregion
336795
336795
  //#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
336796
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
336796
+ const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
336797
336797
  const cwdPath = path.resolve(toPath(cwd));
336798
336798
  const result = [];
336799
336799
  const pathParts = pathOption.split(path.delimiter);
@@ -336811,7 +336811,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
336811
336811
  const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
336812
336812
  if (!pathParts.includes(pathPart)) result.push(pathPart);
336813
336813
  };
336814
- const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
336814
+ const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
336815
336815
  env = { ...env };
336816
336816
  const pathName = pathKey({ env });
336817
336817
  options.path = env[pathName];
@@ -337946,7 +337946,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
337946
337946
  };
337947
337947
  const getDefaultCwd = () => {
337948
337948
  try {
337949
- return process$1.cwd();
337949
+ return _w.cwd();
337950
337950
  } catch (error) {
337951
337951
  error.message = `The current directory does not exist.\n${error.message}`;
337952
337952
  throw error;
@@ -337982,7 +337982,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
337982
337982
  options.killSignal = normalizeKillSignal(options.killSignal);
337983
337983
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
337984
337984
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
337985
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
337985
+ if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
337986
337986
  return {
337987
337987
  file,
337988
337988
  commandArguments,
@@ -338009,7 +338009,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
338009
338009
  });
338010
338010
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
338011
338011
  const env = extendEnv ? {
338012
- ...process$1.env,
338012
+ ..._w.env,
338013
338013
  ...envOption
338014
338014
  } : envOption;
338015
338015
  if (preferLocal || node) return npmRunPathEnv({
@@ -339011,12 +339011,12 @@ const guessStreamDirection = {
339011
339011
  }
339012
339012
  };
339013
339013
  const getStandardStreamDirection = (value) => {
339014
- if ([0, process$1.stdin].includes(value)) return "input";
339014
+ if ([0, _w.stdin].includes(value)) return "input";
339015
339015
  if ([
339016
339016
  1,
339017
339017
  2,
339018
- process$1.stdout,
339019
- process$1.stderr
339018
+ _w.stdout,
339019
+ _w.stderr
339020
339020
  ].includes(value)) return "output";
339021
339021
  };
339022
339022
  const DEFAULT_DIRECTION = "output";
@@ -340080,9 +340080,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
340080
340080
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
340081
340081
  };
340082
340082
  const getIpcExport = () => {
340083
- const anyProcess = process$1;
340083
+ const anyProcess = _w;
340084
340084
  const isSubprocess = true;
340085
- const ipc = process$1.channel !== void 0;
340085
+ const ipc = _w.channel !== void 0;
340086
340086
  return {
340087
340087
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
340088
340088
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -340559,7 +340559,7 @@ var SignalExitFallback = class extends SignalExitBase {
340559
340559
  };
340560
340560
  var SignalExit = class extends SignalExitBase {
340561
340561
  /* c8 ignore start */
340562
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
340562
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
340563
340563
  /* c8 ignore stop */
340564
340564
  #emitter = new Emitter();
340565
340565
  #process;
@@ -340654,8 +340654,8 @@ var SignalExit = class extends SignalExitBase {
340654
340654
  } else return og.call(this.#process, ev, ...args);
340655
340655
  }
340656
340656
  };
340657
- const process$2 = globalThis.process;
340658
- const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
340657
+ const process$1 = globalThis.process;
340658
+ const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
340659
340659
 
340660
340660
  //#endregion
340661
340661
  //#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.145" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.146" "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.145",
3
+ "version": "0.0.146",
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": "585ae785c682ba9c3ce75d1f99b00d142e7a9eb5"
86
+ "gitHead": "43358e80057fa455ecc6b02ddf2263276a70c0a2"
87
87
  }