@lobehub/cli 0.0.152 → 0.0.153

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";
@@ -22215,7 +22215,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
22215
22215
  const childProcess$2 = __require("node:child_process");
22216
22216
  const path$16 = __require("node:path");
22217
22217
  const fs$17 = __require("node:fs");
22218
- const process$3 = __require("node:process");
22218
+ const process$2 = __require("node:process");
22219
22219
  const { Argument, humanReadableArgName } = require_argument();
22220
22220
  const { CommanderError } = require_error$1();
22221
22221
  const { Help, stripColor } = require_help();
@@ -22267,13 +22267,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
22267
22267
  this._showSuggestionAfterError = true;
22268
22268
  this._savedState = null;
22269
22269
  this._outputConfiguration = {
22270
- writeOut: (str) => process$3.stdout.write(str),
22271
- writeErr: (str) => process$3.stderr.write(str),
22270
+ writeOut: (str) => process$2.stdout.write(str),
22271
+ writeErr: (str) => process$2.stderr.write(str),
22272
22272
  outputError: (str, write) => write(str),
22273
- getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
22274
- getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
22275
- getOutHasColors: () => useColor() ?? (process$3.stdout.isTTY && process$3.stdout.hasColors?.()),
22276
- getErrHasColors: () => useColor() ?? (process$3.stderr.isTTY && process$3.stderr.hasColors?.()),
22273
+ getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
22274
+ getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
22275
+ getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
22276
+ getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
22277
22277
  stripColor: (str) => stripColor(str)
22278
22278
  };
22279
22279
  this._hidden = false;
@@ -22631,7 +22631,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22631
22631
  */
22632
22632
  _exit(exitCode, code, message) {
22633
22633
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
22634
- process$3.exit(exitCode);
22634
+ process$2.exit(exitCode);
22635
22635
  }
22636
22636
  /**
22637
22637
  * Register callback `fn` for the command.
@@ -22970,11 +22970,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
22970
22970
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
22971
22971
  parseOptions = parseOptions || {};
22972
22972
  if (argv === void 0 && parseOptions.from === void 0) {
22973
- if (process$3.versions?.electron) parseOptions.from = "electron";
22974
- const execArgv = process$3.execArgv ?? [];
22973
+ if (process$2.versions?.electron) parseOptions.from = "electron";
22974
+ const execArgv = process$2.execArgv ?? [];
22975
22975
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
22976
22976
  }
22977
- if (argv === void 0) argv = process$3.argv;
22977
+ if (argv === void 0) argv = process$2.argv;
22978
22978
  this.rawArgs = argv.slice();
22979
22979
  let userArgs;
22980
22980
  switch (parseOptions.from) {
@@ -22984,7 +22984,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
22984
22984
  userArgs = argv.slice(2);
22985
22985
  break;
22986
22986
  case "electron":
22987
- if (process$3.defaultApp) {
22987
+ if (process$2.defaultApp) {
22988
22988
  this._scriptPath = argv[1];
22989
22989
  userArgs = argv.slice(2);
22990
22990
  } else userArgs = argv.slice(1);
@@ -23149,16 +23149,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
23149
23149
  }
23150
23150
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
23151
23151
  let proc;
23152
- if (process$3.platform !== "win32") if (launchWithNode) {
23152
+ if (process$2.platform !== "win32") if (launchWithNode) {
23153
23153
  args.unshift(executableFile);
23154
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
23155
- proc = childProcess$2.spawn(process$3.argv[0], args, { stdio: "inherit" });
23154
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
23155
+ proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
23156
23156
  } else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
23157
23157
  else {
23158
23158
  this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
23159
23159
  args.unshift(executableFile);
23160
- args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
23161
- proc = childProcess$2.spawn(process$3.execPath, args, { stdio: "inherit" });
23160
+ args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
23161
+ proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
23162
23162
  }
23163
23163
  if (!proc.killed) [
23164
23164
  "SIGUSR1",
@@ -23167,20 +23167,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
23167
23167
  "SIGINT",
23168
23168
  "SIGHUP"
23169
23169
  ].forEach((signal) => {
23170
- process$3.on(signal, () => {
23170
+ process$2.on(signal, () => {
23171
23171
  if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
23172
23172
  });
23173
23173
  });
23174
23174
  const exitCallback = this._exitCallback;
23175
23175
  proc.on("close", (code) => {
23176
23176
  code = code ?? 1;
23177
- if (!exitCallback) process$3.exit(code);
23177
+ if (!exitCallback) process$2.exit(code);
23178
23178
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
23179
23179
  });
23180
23180
  proc.on("error", (err) => {
23181
23181
  if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
23182
23182
  else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
23183
- if (!exitCallback) process$3.exit(1);
23183
+ if (!exitCallback) process$2.exit(1);
23184
23184
  else {
23185
23185
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
23186
23186
  wrappedError.nestedError = err;
@@ -23589,13 +23589,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
23589
23589
  */
23590
23590
  _parseOptionsEnv() {
23591
23591
  this.options.forEach((option) => {
23592
- if (option.envVar && option.envVar in process$3.env) {
23592
+ if (option.envVar && option.envVar in process$2.env) {
23593
23593
  const optionKey = option.attributeName();
23594
23594
  if (this.getOptionValue(optionKey) === void 0 || [
23595
23595
  "default",
23596
23596
  "config",
23597
23597
  "env"
23598
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
23598
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
23599
23599
  else this.emit(`optionEnv:${option.name()}`);
23600
23600
  }
23601
23601
  });
@@ -24012,7 +24012,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
24012
24012
  */
24013
24013
  help(contextOptions) {
24014
24014
  this.outputHelp(contextOptions);
24015
- let exitCode = Number(process$3.exitCode ?? 0);
24015
+ let exitCode = Number(process$2.exitCode ?? 0);
24016
24016
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
24017
24017
  this._exit(exitCode, "commander.help", "(outputHelp)");
24018
24018
  }
@@ -24102,8 +24102,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
24102
24102
  * @package
24103
24103
  */
24104
24104
  function useColor() {
24105
- if (process$3.env.NO_COLOR || process$3.env.FORCE_COLOR === "0" || process$3.env.FORCE_COLOR === "false") return false;
24106
- if (process$3.env.FORCE_COLOR || process$3.env.CLICOLOR_FORCE !== void 0) return true;
24105
+ if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
24106
+ if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
24107
24107
  }
24108
24108
  exports.Command = Command;
24109
24109
  exports.useColor = useColor;
@@ -333910,7 +333910,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
333910
333910
  function getDefaultEnvironment() {
333911
333911
  const env = {};
333912
333912
  for (const key of DEFAULT_INHERITED_ENV_VARS) {
333913
- const value = process$1.env[key];
333913
+ const value = _w.env[key];
333914
333914
  if (value === void 0) continue;
333915
333915
  if (value.startsWith("()")) continue;
333916
333916
  env[key] = value;
@@ -333921,7 +333921,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
333921
333921
  var init_stdio = __esmMin((() => {
333922
333922
  init_src_CeKsbNLO();
333923
333923
  import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
333924
- DEFAULT_INHERITED_ENV_VARS = process$1.platform === "win32" ? [
333924
+ DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
333925
333925
  "APPDATA",
333926
333926
  "COMSPEC",
333927
333927
  "HOMEDRIVE",
@@ -333978,7 +333978,7 @@ var init_stdio = __esmMin((() => {
333978
333978
  this._serverParams.stderr ?? "inherit"
333979
333979
  ],
333980
333980
  shell: false,
333981
- windowsHide: process$1.platform === "win32",
333981
+ windowsHide: _w.platform === "win32",
333982
333982
  cwd: this._serverParams.cwd
333983
333983
  });
333984
333984
  this._process.on("error", (error) => {
@@ -337012,9 +337012,9 @@ const getSubprocessResult = ({ stdout }) => {
337012
337012
  //#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
337013
337013
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
337014
337014
  const STANDARD_STREAMS = [
337015
- process$1.stdin,
337016
- process$1.stdout,
337017
- process$1.stderr
337015
+ _w.stdin,
337016
+ _w.stdout,
337017
+ _w.stderr
337018
337018
  ];
337019
337019
  const STANDARD_STREAMS_ALIASES = [
337020
337020
  "stdin",
@@ -337139,9 +337139,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
337139
337139
  //#endregion
337140
337140
  //#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
337141
337141
  function isUnicodeSupported() {
337142
- const { env } = process$1;
337142
+ const { env } = _w;
337143
337143
  const { TERM, TERM_PROGRAM } = env;
337144
- if (process$1.platform !== "win32") return TERM !== "linux";
337144
+ if (_w.platform !== "win32") return TERM !== "linux";
337145
337145
  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";
337146
337146
  }
337147
337147
 
@@ -337676,7 +337676,7 @@ function traversePathUp(startPath) {
337676
337676
 
337677
337677
  //#endregion
337678
337678
  //#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
337679
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
337679
+ const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
337680
337680
  const cwdPath = path.resolve(toPath(cwd));
337681
337681
  const result = [];
337682
337682
  const pathParts = pathOption.split(path.delimiter);
@@ -337694,7 +337694,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
337694
337694
  const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
337695
337695
  if (!pathParts.includes(pathPart)) result.push(pathPart);
337696
337696
  };
337697
- const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
337697
+ const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
337698
337698
  env = { ...env };
337699
337699
  const pathName = pathKey({ env });
337700
337700
  options.path = env[pathName];
@@ -338829,7 +338829,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
338829
338829
  };
338830
338830
  const getDefaultCwd = () => {
338831
338831
  try {
338832
- return process$1.cwd();
338832
+ return _w.cwd();
338833
338833
  } catch (error) {
338834
338834
  error.message = `The current directory does not exist.\n${error.message}`;
338835
338835
  throw error;
@@ -338865,7 +338865,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
338865
338865
  options.killSignal = normalizeKillSignal(options.killSignal);
338866
338866
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
338867
338867
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
338868
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
338868
+ if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
338869
338869
  return {
338870
338870
  file,
338871
338871
  commandArguments,
@@ -338892,7 +338892,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
338892
338892
  });
338893
338893
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
338894
338894
  const env = extendEnv ? {
338895
- ...process$1.env,
338895
+ ..._w.env,
338896
338896
  ...envOption
338897
338897
  } : envOption;
338898
338898
  if (preferLocal || node) return npmRunPathEnv({
@@ -339894,12 +339894,12 @@ const guessStreamDirection = {
339894
339894
  }
339895
339895
  };
339896
339896
  const getStandardStreamDirection = (value) => {
339897
- if ([0, process$1.stdin].includes(value)) return "input";
339897
+ if ([0, _w.stdin].includes(value)) return "input";
339898
339898
  if ([
339899
339899
  1,
339900
339900
  2,
339901
- process$1.stdout,
339902
- process$1.stderr
339901
+ _w.stdout,
339902
+ _w.stderr
339903
339903
  ].includes(value)) return "output";
339904
339904
  };
339905
339905
  const DEFAULT_DIRECTION = "output";
@@ -340963,9 +340963,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
340963
340963
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
340964
340964
  };
340965
340965
  const getIpcExport = () => {
340966
- const anyProcess = process$1;
340966
+ const anyProcess = _w;
340967
340967
  const isSubprocess = true;
340968
- const ipc = process$1.channel !== void 0;
340968
+ const ipc = _w.channel !== void 0;
340969
340969
  return {
340970
340970
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
340971
340971
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -341442,7 +341442,7 @@ var SignalExitFallback = class extends SignalExitBase {
341442
341442
  };
341443
341443
  var SignalExit = class extends SignalExitBase {
341444
341444
  /* c8 ignore start */
341445
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
341445
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
341446
341446
  /* c8 ignore stop */
341447
341447
  #emitter = new Emitter();
341448
341448
  #process;
@@ -341537,8 +341537,8 @@ var SignalExit = class extends SignalExitBase {
341537
341537
  } else return og.call(this.#process, ev, ...args);
341538
341538
  }
341539
341539
  };
341540
- const process$2 = globalThis.process;
341541
- const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
341540
+ const process$1 = globalThis.process;
341541
+ const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
341542
341542
 
341543
341543
  //#endregion
341544
341544
  //#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.152" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.153" "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.152",
3
+ "version": "0.0.153",
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": "9463328d58872729c60c4f759995da3ddde8b968"
86
+ "gitHead": "f69ecef284048bac77e1ba18935a6f9800553c04"
87
87
  }