@lobehub/cli 0.0.141 → 0.0.142
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 +47 -47
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
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
|
|
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$
|
|
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$
|
|
22011
|
-
writeErr: (str) => process$
|
|
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$
|
|
22014
|
-
getErrHelpWidth: () => process$
|
|
22015
|
-
getOutHasColors: () => useColor() ?? (process$
|
|
22016
|
-
getErrHasColors: () => useColor() ?? (process$
|
|
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$
|
|
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$
|
|
22714
|
-
const execArgv = process$
|
|
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$
|
|
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$
|
|
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$
|
|
22892
|
+
if (process$2.platform !== "win32") if (launchWithNode) {
|
|
22893
22893
|
args.unshift(executableFile);
|
|
22894
|
-
args = incrementNodeInspectorPort(process$
|
|
22895
|
-
proc = childProcess$2.spawn(process$
|
|
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$
|
|
22901
|
-
proc = childProcess$2.spawn(process$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
23846
|
-
if (process$
|
|
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;
|
|
@@ -333047,7 +333047,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
|
|
|
333047
333047
|
function getDefaultEnvironment() {
|
|
333048
333048
|
const env = {};
|
|
333049
333049
|
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
333050
|
-
const value =
|
|
333050
|
+
const value = _w.env[key];
|
|
333051
333051
|
if (value === void 0) continue;
|
|
333052
333052
|
if (value.startsWith("()")) continue;
|
|
333053
333053
|
env[key] = value;
|
|
@@ -333058,7 +333058,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
|
|
|
333058
333058
|
var init_stdio = __esmMin((() => {
|
|
333059
333059
|
init_src_CeKsbNLO();
|
|
333060
333060
|
import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
|
|
333061
|
-
DEFAULT_INHERITED_ENV_VARS =
|
|
333061
|
+
DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
|
|
333062
333062
|
"APPDATA",
|
|
333063
333063
|
"COMSPEC",
|
|
333064
333064
|
"HOMEDRIVE",
|
|
@@ -333115,7 +333115,7 @@ var init_stdio = __esmMin((() => {
|
|
|
333115
333115
|
this._serverParams.stderr ?? "inherit"
|
|
333116
333116
|
],
|
|
333117
333117
|
shell: false,
|
|
333118
|
-
windowsHide:
|
|
333118
|
+
windowsHide: _w.platform === "win32",
|
|
333119
333119
|
cwd: this._serverParams.cwd
|
|
333120
333120
|
});
|
|
333121
333121
|
this._process.on("error", (error) => {
|
|
@@ -336149,9 +336149,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
336149
336149
|
//#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
|
|
336150
336150
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
336151
336151
|
const STANDARD_STREAMS = [
|
|
336152
|
-
|
|
336153
|
-
|
|
336154
|
-
|
|
336152
|
+
_w.stdin,
|
|
336153
|
+
_w.stdout,
|
|
336154
|
+
_w.stderr
|
|
336155
336155
|
];
|
|
336156
336156
|
const STANDARD_STREAMS_ALIASES = [
|
|
336157
336157
|
"stdin",
|
|
@@ -336276,9 +336276,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
336276
336276
|
//#endregion
|
|
336277
336277
|
//#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
336278
336278
|
function isUnicodeSupported() {
|
|
336279
|
-
const { env } =
|
|
336279
|
+
const { env } = _w;
|
|
336280
336280
|
const { TERM, TERM_PROGRAM } = env;
|
|
336281
|
-
if (
|
|
336281
|
+
if (_w.platform !== "win32") return TERM !== "linux";
|
|
336282
336282
|
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";
|
|
336283
336283
|
}
|
|
336284
336284
|
|
|
@@ -336813,7 +336813,7 @@ function traversePathUp(startPath) {
|
|
|
336813
336813
|
|
|
336814
336814
|
//#endregion
|
|
336815
336815
|
//#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
336816
|
-
const npmRunPath = ({ cwd =
|
|
336816
|
+
const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
|
|
336817
336817
|
const cwdPath = path.resolve(toPath(cwd));
|
|
336818
336818
|
const result = [];
|
|
336819
336819
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -336831,7 +336831,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
336831
336831
|
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
336832
336832
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
336833
336833
|
};
|
|
336834
|
-
const npmRunPathEnv = ({ env =
|
|
336834
|
+
const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
|
|
336835
336835
|
env = { ...env };
|
|
336836
336836
|
const pathName = pathKey({ env });
|
|
336837
336837
|
options.path = env[pathName];
|
|
@@ -337966,7 +337966,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
337966
337966
|
};
|
|
337967
337967
|
const getDefaultCwd = () => {
|
|
337968
337968
|
try {
|
|
337969
|
-
return
|
|
337969
|
+
return _w.cwd();
|
|
337970
337970
|
} catch (error) {
|
|
337971
337971
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
337972
337972
|
throw error;
|
|
@@ -338002,7 +338002,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
338002
338002
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
338003
338003
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
338004
338004
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
338005
|
-
if (
|
|
338005
|
+
if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
338006
338006
|
return {
|
|
338007
338007
|
file,
|
|
338008
338008
|
commandArguments,
|
|
@@ -338029,7 +338029,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
338029
338029
|
});
|
|
338030
338030
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
338031
338031
|
const env = extendEnv ? {
|
|
338032
|
-
...
|
|
338032
|
+
..._w.env,
|
|
338033
338033
|
...envOption
|
|
338034
338034
|
} : envOption;
|
|
338035
338035
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -339031,12 +339031,12 @@ const guessStreamDirection = {
|
|
|
339031
339031
|
}
|
|
339032
339032
|
};
|
|
339033
339033
|
const getStandardStreamDirection = (value) => {
|
|
339034
|
-
if ([0,
|
|
339034
|
+
if ([0, _w.stdin].includes(value)) return "input";
|
|
339035
339035
|
if ([
|
|
339036
339036
|
1,
|
|
339037
339037
|
2,
|
|
339038
|
-
|
|
339039
|
-
|
|
339038
|
+
_w.stdout,
|
|
339039
|
+
_w.stderr
|
|
339040
339040
|
].includes(value)) return "output";
|
|
339041
339041
|
};
|
|
339042
339042
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -340100,9 +340100,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
340100
340100
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
340101
340101
|
};
|
|
340102
340102
|
const getIpcExport = () => {
|
|
340103
|
-
const anyProcess =
|
|
340103
|
+
const anyProcess = _w;
|
|
340104
340104
|
const isSubprocess = true;
|
|
340105
|
-
const ipc =
|
|
340105
|
+
const ipc = _w.channel !== void 0;
|
|
340106
340106
|
return {
|
|
340107
340107
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
340108
340108
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -340579,7 +340579,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
340579
340579
|
};
|
|
340580
340580
|
var SignalExit = class extends SignalExitBase {
|
|
340581
340581
|
/* c8 ignore start */
|
|
340582
|
-
#hupSig = process$
|
|
340582
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
340583
340583
|
/* c8 ignore stop */
|
|
340584
340584
|
#emitter = new Emitter();
|
|
340585
340585
|
#process;
|
|
@@ -340674,8 +340674,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
340674
340674
|
} else return og.call(this.#process, ev, ...args);
|
|
340675
340675
|
}
|
|
340676
340676
|
};
|
|
340677
|
-
const process$
|
|
340678
|
-
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$
|
|
340677
|
+
const process$1 = globalThis.process;
|
|
340678
|
+
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
340679
340679
|
|
|
340680
340680
|
//#endregion
|
|
340681
340681
|
//#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.
|
|
3
|
+
.TH LH 1 "" "@lobehub/cli 0.0.142" "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.
|
|
3
|
+
"version": "0.0.142",
|
|
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": "
|
|
86
|
+
"gitHead": "f77357e96ff8fb044af9241c86a1ee80b69bb0d2"
|
|
87
87
|
}
|