@lobehub/cli 0.0.115 → 0.0.116
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";
|
|
@@ -21908,7 +21908,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
21908
21908
|
const childProcess$2 = __require("node:child_process");
|
|
21909
21909
|
const path$16 = __require("node:path");
|
|
21910
21910
|
const fs$17 = __require("node:fs");
|
|
21911
|
-
const process$
|
|
21911
|
+
const process$2 = __require("node:process");
|
|
21912
21912
|
const { Argument, humanReadableArgName } = require_argument();
|
|
21913
21913
|
const { CommanderError } = require_error$1();
|
|
21914
21914
|
const { Help, stripColor } = require_help();
|
|
@@ -21960,13 +21960,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
21960
21960
|
this._showSuggestionAfterError = true;
|
|
21961
21961
|
this._savedState = null;
|
|
21962
21962
|
this._outputConfiguration = {
|
|
21963
|
-
writeOut: (str) => process$
|
|
21964
|
-
writeErr: (str) => process$
|
|
21963
|
+
writeOut: (str) => process$2.stdout.write(str),
|
|
21964
|
+
writeErr: (str) => process$2.stderr.write(str),
|
|
21965
21965
|
outputError: (str, write) => write(str),
|
|
21966
|
-
getOutHelpWidth: () => process$
|
|
21967
|
-
getErrHelpWidth: () => process$
|
|
21968
|
-
getOutHasColors: () => useColor() ?? (process$
|
|
21969
|
-
getErrHasColors: () => useColor() ?? (process$
|
|
21966
|
+
getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
|
|
21967
|
+
getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
|
|
21968
|
+
getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
|
|
21969
|
+
getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
|
|
21970
21970
|
stripColor: (str) => stripColor(str)
|
|
21971
21971
|
};
|
|
21972
21972
|
this._hidden = false;
|
|
@@ -22324,7 +22324,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
22324
22324
|
*/
|
|
22325
22325
|
_exit(exitCode, code, message) {
|
|
22326
22326
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
|
|
22327
|
-
process$
|
|
22327
|
+
process$2.exit(exitCode);
|
|
22328
22328
|
}
|
|
22329
22329
|
/**
|
|
22330
22330
|
* Register callback `fn` for the command.
|
|
@@ -22663,11 +22663,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
22663
22663
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
22664
22664
|
parseOptions = parseOptions || {};
|
|
22665
22665
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
22666
|
-
if (process$
|
|
22667
|
-
const execArgv = process$
|
|
22666
|
+
if (process$2.versions?.electron) parseOptions.from = "electron";
|
|
22667
|
+
const execArgv = process$2.execArgv ?? [];
|
|
22668
22668
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
|
|
22669
22669
|
}
|
|
22670
|
-
if (argv === void 0) argv = process$
|
|
22670
|
+
if (argv === void 0) argv = process$2.argv;
|
|
22671
22671
|
this.rawArgs = argv.slice();
|
|
22672
22672
|
let userArgs;
|
|
22673
22673
|
switch (parseOptions.from) {
|
|
@@ -22677,7 +22677,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
22677
22677
|
userArgs = argv.slice(2);
|
|
22678
22678
|
break;
|
|
22679
22679
|
case "electron":
|
|
22680
|
-
if (process$
|
|
22680
|
+
if (process$2.defaultApp) {
|
|
22681
22681
|
this._scriptPath = argv[1];
|
|
22682
22682
|
userArgs = argv.slice(2);
|
|
22683
22683
|
} else userArgs = argv.slice(1);
|
|
@@ -22842,16 +22842,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
22842
22842
|
}
|
|
22843
22843
|
launchWithNode = sourceExt.includes(path$16.extname(executableFile));
|
|
22844
22844
|
let proc;
|
|
22845
|
-
if (process$
|
|
22845
|
+
if (process$2.platform !== "win32") if (launchWithNode) {
|
|
22846
22846
|
args.unshift(executableFile);
|
|
22847
|
-
args = incrementNodeInspectorPort(process$
|
|
22848
|
-
proc = childProcess$2.spawn(process$
|
|
22847
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
22848
|
+
proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
|
|
22849
22849
|
} else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
|
|
22850
22850
|
else {
|
|
22851
22851
|
this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
22852
22852
|
args.unshift(executableFile);
|
|
22853
|
-
args = incrementNodeInspectorPort(process$
|
|
22854
|
-
proc = childProcess$2.spawn(process$
|
|
22853
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
22854
|
+
proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
|
|
22855
22855
|
}
|
|
22856
22856
|
if (!proc.killed) [
|
|
22857
22857
|
"SIGUSR1",
|
|
@@ -22860,20 +22860,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
22860
22860
|
"SIGINT",
|
|
22861
22861
|
"SIGHUP"
|
|
22862
22862
|
].forEach((signal) => {
|
|
22863
|
-
process$
|
|
22863
|
+
process$2.on(signal, () => {
|
|
22864
22864
|
if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
|
|
22865
22865
|
});
|
|
22866
22866
|
});
|
|
22867
22867
|
const exitCallback = this._exitCallback;
|
|
22868
22868
|
proc.on("close", (code) => {
|
|
22869
22869
|
code = code ?? 1;
|
|
22870
|
-
if (!exitCallback) process$
|
|
22870
|
+
if (!exitCallback) process$2.exit(code);
|
|
22871
22871
|
else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
22872
22872
|
});
|
|
22873
22873
|
proc.on("error", (err) => {
|
|
22874
22874
|
if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
22875
22875
|
else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
22876
|
-
if (!exitCallback) process$
|
|
22876
|
+
if (!exitCallback) process$2.exit(1);
|
|
22877
22877
|
else {
|
|
22878
22878
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
22879
22879
|
wrappedError.nestedError = err;
|
|
@@ -23282,13 +23282,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
23282
23282
|
*/
|
|
23283
23283
|
_parseOptionsEnv() {
|
|
23284
23284
|
this.options.forEach((option) => {
|
|
23285
|
-
if (option.envVar && option.envVar in process$
|
|
23285
|
+
if (option.envVar && option.envVar in process$2.env) {
|
|
23286
23286
|
const optionKey = option.attributeName();
|
|
23287
23287
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
23288
23288
|
"default",
|
|
23289
23289
|
"config",
|
|
23290
23290
|
"env"
|
|
23291
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
23291
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
|
|
23292
23292
|
else this.emit(`optionEnv:${option.name()}`);
|
|
23293
23293
|
}
|
|
23294
23294
|
});
|
|
@@ -23705,7 +23705,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
23705
23705
|
*/
|
|
23706
23706
|
help(contextOptions) {
|
|
23707
23707
|
this.outputHelp(contextOptions);
|
|
23708
|
-
let exitCode = Number(process$
|
|
23708
|
+
let exitCode = Number(process$2.exitCode ?? 0);
|
|
23709
23709
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
23710
23710
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
23711
23711
|
}
|
|
@@ -23795,8 +23795,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
23795
23795
|
* @package
|
|
23796
23796
|
*/
|
|
23797
23797
|
function useColor() {
|
|
23798
|
-
if (process$
|
|
23799
|
-
if (process$
|
|
23798
|
+
if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
|
|
23799
|
+
if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
|
|
23800
23800
|
}
|
|
23801
23801
|
exports.Command = Command;
|
|
23802
23802
|
exports.useColor = useColor;
|
|
@@ -332407,7 +332407,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
|
|
|
332407
332407
|
function getDefaultEnvironment() {
|
|
332408
332408
|
const env = {};
|
|
332409
332409
|
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
332410
|
-
const value =
|
|
332410
|
+
const value = _w.env[key];
|
|
332411
332411
|
if (value === void 0) continue;
|
|
332412
332412
|
if (value.startsWith("()")) continue;
|
|
332413
332413
|
env[key] = value;
|
|
@@ -332418,7 +332418,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
|
|
|
332418
332418
|
var init_stdio = __esmMin((() => {
|
|
332419
332419
|
init_src_CeKsbNLO();
|
|
332420
332420
|
import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
|
|
332421
|
-
DEFAULT_INHERITED_ENV_VARS =
|
|
332421
|
+
DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
|
|
332422
332422
|
"APPDATA",
|
|
332423
332423
|
"COMSPEC",
|
|
332424
332424
|
"HOMEDRIVE",
|
|
@@ -332475,7 +332475,7 @@ var init_stdio = __esmMin((() => {
|
|
|
332475
332475
|
this._serverParams.stderr ?? "inherit"
|
|
332476
332476
|
],
|
|
332477
332477
|
shell: false,
|
|
332478
|
-
windowsHide:
|
|
332478
|
+
windowsHide: _w.platform === "win32",
|
|
332479
332479
|
cwd: this._serverParams.cwd
|
|
332480
332480
|
});
|
|
332481
332481
|
this._process.on("error", (error) => {
|
|
@@ -335509,9 +335509,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
335509
335509
|
//#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
|
|
335510
335510
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
335511
335511
|
const STANDARD_STREAMS = [
|
|
335512
|
-
|
|
335513
|
-
|
|
335514
|
-
|
|
335512
|
+
_w.stdin,
|
|
335513
|
+
_w.stdout,
|
|
335514
|
+
_w.stderr
|
|
335515
335515
|
];
|
|
335516
335516
|
const STANDARD_STREAMS_ALIASES = [
|
|
335517
335517
|
"stdin",
|
|
@@ -335636,9 +335636,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
335636
335636
|
//#endregion
|
|
335637
335637
|
//#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
335638
335638
|
function isUnicodeSupported() {
|
|
335639
|
-
const { env } =
|
|
335639
|
+
const { env } = _w;
|
|
335640
335640
|
const { TERM, TERM_PROGRAM } = env;
|
|
335641
|
-
if (
|
|
335641
|
+
if (_w.platform !== "win32") return TERM !== "linux";
|
|
335642
335642
|
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";
|
|
335643
335643
|
}
|
|
335644
335644
|
|
|
@@ -336173,7 +336173,7 @@ function traversePathUp(startPath) {
|
|
|
336173
336173
|
|
|
336174
336174
|
//#endregion
|
|
336175
336175
|
//#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
336176
|
-
const npmRunPath = ({ cwd =
|
|
336176
|
+
const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
|
|
336177
336177
|
const cwdPath = path.resolve(toPath(cwd));
|
|
336178
336178
|
const result = [];
|
|
336179
336179
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -336191,7 +336191,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
336191
336191
|
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
336192
336192
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
336193
336193
|
};
|
|
336194
|
-
const npmRunPathEnv = ({ env =
|
|
336194
|
+
const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
|
|
336195
336195
|
env = { ...env };
|
|
336196
336196
|
const pathName = pathKey({ env });
|
|
336197
336197
|
options.path = env[pathName];
|
|
@@ -337326,7 +337326,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
337326
337326
|
};
|
|
337327
337327
|
const getDefaultCwd = () => {
|
|
337328
337328
|
try {
|
|
337329
|
-
return
|
|
337329
|
+
return _w.cwd();
|
|
337330
337330
|
} catch (error) {
|
|
337331
337331
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
337332
337332
|
throw error;
|
|
@@ -337362,7 +337362,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
337362
337362
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
337363
337363
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
337364
337364
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
337365
|
-
if (
|
|
337365
|
+
if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
337366
337366
|
return {
|
|
337367
337367
|
file,
|
|
337368
337368
|
commandArguments,
|
|
@@ -337389,7 +337389,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
337389
337389
|
});
|
|
337390
337390
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
337391
337391
|
const env = extendEnv ? {
|
|
337392
|
-
...
|
|
337392
|
+
..._w.env,
|
|
337393
337393
|
...envOption
|
|
337394
337394
|
} : envOption;
|
|
337395
337395
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -338391,12 +338391,12 @@ const guessStreamDirection = {
|
|
|
338391
338391
|
}
|
|
338392
338392
|
};
|
|
338393
338393
|
const getStandardStreamDirection = (value) => {
|
|
338394
|
-
if ([0,
|
|
338394
|
+
if ([0, _w.stdin].includes(value)) return "input";
|
|
338395
338395
|
if ([
|
|
338396
338396
|
1,
|
|
338397
338397
|
2,
|
|
338398
|
-
|
|
338399
|
-
|
|
338398
|
+
_w.stdout,
|
|
338399
|
+
_w.stderr
|
|
338400
338400
|
].includes(value)) return "output";
|
|
338401
338401
|
};
|
|
338402
338402
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -339460,9 +339460,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
339460
339460
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
339461
339461
|
};
|
|
339462
339462
|
const getIpcExport = () => {
|
|
339463
|
-
const anyProcess =
|
|
339463
|
+
const anyProcess = _w;
|
|
339464
339464
|
const isSubprocess = true;
|
|
339465
|
-
const ipc =
|
|
339465
|
+
const ipc = _w.channel !== void 0;
|
|
339466
339466
|
return {
|
|
339467
339467
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
339468
339468
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -339939,7 +339939,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
339939
339939
|
};
|
|
339940
339940
|
var SignalExit = class extends SignalExitBase {
|
|
339941
339941
|
/* c8 ignore start */
|
|
339942
|
-
#hupSig = process$
|
|
339942
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
339943
339943
|
/* c8 ignore stop */
|
|
339944
339944
|
#emitter = new Emitter();
|
|
339945
339945
|
#process;
|
|
@@ -340034,8 +340034,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
340034
340034
|
} else return og.call(this.#process, ev, ...args);
|
|
340035
340035
|
}
|
|
340036
340036
|
};
|
|
340037
|
-
const process$
|
|
340038
|
-
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$
|
|
340037
|
+
const process$1 = globalThis.process;
|
|
340038
|
+
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
340039
340039
|
|
|
340040
340040
|
//#endregion
|
|
340041
340041
|
//#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.116" "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.116",
|
|
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": "5d92df45729e79310884c96c4e15749e1b35832d"
|
|
87
87
|
}
|