@lobehub/cli 0.0.209 → 0.0.210
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/acceptance-report.html +3 -3
- package/dist/index.js +48 -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";
|
|
@@ -9826,6 +9826,7 @@ var init_fetch = __esmMin((() => {
|
|
|
9826
9826
|
InsufficientBudgetForModel: "InsufficientBudgetForModel",
|
|
9827
9827
|
WorkspaceFrozenByAdmin: "WorkspaceFrozenByAdmin",
|
|
9828
9828
|
WorkspaceFrozenByRiskControl: "WorkspaceFrozenByRiskControl",
|
|
9829
|
+
WorkspaceModelRestricted: "WorkspaceModelRestricted",
|
|
9829
9830
|
WorkspaceSubscriptionInactive: "WorkspaceSubscriptionInactive",
|
|
9830
9831
|
ShareMessageLimitExceeded: "ShareMessageLimitExceeded",
|
|
9831
9832
|
ShareSpendLimitExceeded: "ShareSpendLimitExceeded",
|
|
@@ -24432,7 +24433,7 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
24432
24433
|
const childProcess$2 = __require("node:child_process");
|
|
24433
24434
|
const path$16 = __require("node:path");
|
|
24434
24435
|
const fs$17 = __require("node:fs");
|
|
24435
|
-
const process$
|
|
24436
|
+
const process$2 = __require("node:process");
|
|
24436
24437
|
const { Argument, humanReadableArgName } = require_argument();
|
|
24437
24438
|
const { CommanderError } = require_error$1();
|
|
24438
24439
|
const { Help, stripColor } = require_help();
|
|
@@ -24484,13 +24485,13 @@ var require_command = /* @__PURE__ */ __commonJSMin$2(((exports) => {
|
|
|
24484
24485
|
this._showSuggestionAfterError = true;
|
|
24485
24486
|
this._savedState = null;
|
|
24486
24487
|
this._outputConfiguration = {
|
|
24487
|
-
writeOut: (str) => process$
|
|
24488
|
-
writeErr: (str) => process$
|
|
24488
|
+
writeOut: (str) => process$2.stdout.write(str),
|
|
24489
|
+
writeErr: (str) => process$2.stderr.write(str),
|
|
24489
24490
|
outputError: (str, write) => write(str),
|
|
24490
|
-
getOutHelpWidth: () => process$
|
|
24491
|
-
getErrHelpWidth: () => process$
|
|
24492
|
-
getOutHasColors: () => useColor() ?? (process$
|
|
24493
|
-
getErrHasColors: () => useColor() ?? (process$
|
|
24491
|
+
getOutHelpWidth: () => process$2.stdout.isTTY ? process$2.stdout.columns : void 0,
|
|
24492
|
+
getErrHelpWidth: () => process$2.stderr.isTTY ? process$2.stderr.columns : void 0,
|
|
24493
|
+
getOutHasColors: () => useColor() ?? (process$2.stdout.isTTY && process$2.stdout.hasColors?.()),
|
|
24494
|
+
getErrHasColors: () => useColor() ?? (process$2.stderr.isTTY && process$2.stderr.hasColors?.()),
|
|
24494
24495
|
stripColor: (str) => stripColor(str)
|
|
24495
24496
|
};
|
|
24496
24497
|
this._hidden = false;
|
|
@@ -24848,7 +24849,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
24848
24849
|
*/
|
|
24849
24850
|
_exit(exitCode, code, message) {
|
|
24850
24851
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
|
|
24851
|
-
process$
|
|
24852
|
+
process$2.exit(exitCode);
|
|
24852
24853
|
}
|
|
24853
24854
|
/**
|
|
24854
24855
|
* Register callback `fn` for the command.
|
|
@@ -25187,11 +25188,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25187
25188
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
25188
25189
|
parseOptions = parseOptions || {};
|
|
25189
25190
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
25190
|
-
if (process$
|
|
25191
|
-
const execArgv = process$
|
|
25191
|
+
if (process$2.versions?.electron) parseOptions.from = "electron";
|
|
25192
|
+
const execArgv = process$2.execArgv ?? [];
|
|
25192
25193
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
|
|
25193
25194
|
}
|
|
25194
|
-
if (argv === void 0) argv = process$
|
|
25195
|
+
if (argv === void 0) argv = process$2.argv;
|
|
25195
25196
|
this.rawArgs = argv.slice();
|
|
25196
25197
|
let userArgs;
|
|
25197
25198
|
switch (parseOptions.from) {
|
|
@@ -25201,7 +25202,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25201
25202
|
userArgs = argv.slice(2);
|
|
25202
25203
|
break;
|
|
25203
25204
|
case "electron":
|
|
25204
|
-
if (process$
|
|
25205
|
+
if (process$2.defaultApp) {
|
|
25205
25206
|
this._scriptPath = argv[1];
|
|
25206
25207
|
userArgs = argv.slice(2);
|
|
25207
25208
|
} else userArgs = argv.slice(1);
|
|
@@ -25366,16 +25367,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25366
25367
|
}
|
|
25367
25368
|
launchWithNode = sourceExt.includes(path$16.extname(executableFile));
|
|
25368
25369
|
let proc;
|
|
25369
|
-
if (process$
|
|
25370
|
+
if (process$2.platform !== "win32") if (launchWithNode) {
|
|
25370
25371
|
args.unshift(executableFile);
|
|
25371
|
-
args = incrementNodeInspectorPort(process$
|
|
25372
|
-
proc = childProcess$2.spawn(process$
|
|
25372
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
25373
|
+
proc = childProcess$2.spawn(process$2.argv[0], args, { stdio: "inherit" });
|
|
25373
25374
|
} else proc = childProcess$2.spawn(executableFile, args, { stdio: "inherit" });
|
|
25374
25375
|
else {
|
|
25375
25376
|
this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
25376
25377
|
args.unshift(executableFile);
|
|
25377
|
-
args = incrementNodeInspectorPort(process$
|
|
25378
|
-
proc = childProcess$2.spawn(process$
|
|
25378
|
+
args = incrementNodeInspectorPort(process$2.execArgv).concat(args);
|
|
25379
|
+
proc = childProcess$2.spawn(process$2.execPath, args, { stdio: "inherit" });
|
|
25379
25380
|
}
|
|
25380
25381
|
if (!proc.killed) [
|
|
25381
25382
|
"SIGUSR1",
|
|
@@ -25384,20 +25385,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25384
25385
|
"SIGINT",
|
|
25385
25386
|
"SIGHUP"
|
|
25386
25387
|
].forEach((signal) => {
|
|
25387
|
-
process$
|
|
25388
|
+
process$2.on(signal, () => {
|
|
25388
25389
|
if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
|
|
25389
25390
|
});
|
|
25390
25391
|
});
|
|
25391
25392
|
const exitCallback = this._exitCallback;
|
|
25392
25393
|
proc.on("close", (code) => {
|
|
25393
25394
|
code = code ?? 1;
|
|
25394
|
-
if (!exitCallback) process$
|
|
25395
|
+
if (!exitCallback) process$2.exit(code);
|
|
25395
25396
|
else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
25396
25397
|
});
|
|
25397
25398
|
proc.on("error", (err) => {
|
|
25398
25399
|
if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
25399
25400
|
else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
25400
|
-
if (!exitCallback) process$
|
|
25401
|
+
if (!exitCallback) process$2.exit(1);
|
|
25401
25402
|
else {
|
|
25402
25403
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
25403
25404
|
wrappedError.nestedError = err;
|
|
@@ -25806,13 +25807,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
25806
25807
|
*/
|
|
25807
25808
|
_parseOptionsEnv() {
|
|
25808
25809
|
this.options.forEach((option) => {
|
|
25809
|
-
if (option.envVar && option.envVar in process$
|
|
25810
|
+
if (option.envVar && option.envVar in process$2.env) {
|
|
25810
25811
|
const optionKey = option.attributeName();
|
|
25811
25812
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
25812
25813
|
"default",
|
|
25813
25814
|
"config",
|
|
25814
25815
|
"env"
|
|
25815
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
25816
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$2.env[option.envVar]);
|
|
25816
25817
|
else this.emit(`optionEnv:${option.name()}`);
|
|
25817
25818
|
}
|
|
25818
25819
|
});
|
|
@@ -26229,7 +26230,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
26229
26230
|
*/
|
|
26230
26231
|
help(contextOptions) {
|
|
26231
26232
|
this.outputHelp(contextOptions);
|
|
26232
|
-
let exitCode = Number(process$
|
|
26233
|
+
let exitCode = Number(process$2.exitCode ?? 0);
|
|
26233
26234
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
26234
26235
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
26235
26236
|
}
|
|
@@ -26319,8 +26320,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
26319
26320
|
* @package
|
|
26320
26321
|
*/
|
|
26321
26322
|
function useColor() {
|
|
26322
|
-
if (process$
|
|
26323
|
-
if (process$
|
|
26323
|
+
if (process$2.env.NO_COLOR || process$2.env.FORCE_COLOR === "0" || process$2.env.FORCE_COLOR === "false") return false;
|
|
26324
|
+
if (process$2.env.FORCE_COLOR || process$2.env.CLICOLOR_FORCE !== void 0) return true;
|
|
26324
26325
|
}
|
|
26325
26326
|
exports.Command = Command;
|
|
26326
26327
|
exports.useColor = useColor;
|
|
@@ -337599,7 +337600,7 @@ var stdio_exports = /* @__PURE__ */ __exportAll$2({
|
|
|
337599
337600
|
function getDefaultEnvironment() {
|
|
337600
337601
|
const env = {};
|
|
337601
337602
|
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
337602
|
-
const value =
|
|
337603
|
+
const value = _w.env[key];
|
|
337603
337604
|
if (value === void 0) continue;
|
|
337604
337605
|
if (value.startsWith("()")) continue;
|
|
337605
337606
|
env[key] = value;
|
|
@@ -337610,7 +337611,7 @@ var import_cross_spawn$1, DEFAULT_INHERITED_ENV_VARS, StdioClientTransport;
|
|
|
337610
337611
|
var init_stdio = __esmMin((() => {
|
|
337611
337612
|
init_src_CeKsbNLO();
|
|
337612
337613
|
import_cross_spawn$1 = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
|
|
337613
|
-
DEFAULT_INHERITED_ENV_VARS =
|
|
337614
|
+
DEFAULT_INHERITED_ENV_VARS = _w.platform === "win32" ? [
|
|
337614
337615
|
"APPDATA",
|
|
337615
337616
|
"COMSPEC",
|
|
337616
337617
|
"HOMEDRIVE",
|
|
@@ -337667,7 +337668,7 @@ var init_stdio = __esmMin((() => {
|
|
|
337667
337668
|
this._serverParams.stderr ?? "inherit"
|
|
337668
337669
|
],
|
|
337669
337670
|
shell: false,
|
|
337670
|
-
windowsHide:
|
|
337671
|
+
windowsHide: _w.platform === "win32",
|
|
337671
337672
|
cwd: this._serverParams.cwd
|
|
337672
337673
|
});
|
|
337673
337674
|
this._process.on("error", (error) => {
|
|
@@ -340701,9 +340702,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
340701
340702
|
//#region node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/standard-stream.js
|
|
340702
340703
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
340703
340704
|
const STANDARD_STREAMS = [
|
|
340704
|
-
|
|
340705
|
-
|
|
340706
|
-
|
|
340705
|
+
_w.stdin,
|
|
340706
|
+
_w.stdout,
|
|
340707
|
+
_w.stderr
|
|
340707
340708
|
];
|
|
340708
340709
|
const STANDARD_STREAMS_ALIASES = [
|
|
340709
340710
|
"stdin",
|
|
@@ -340828,9 +340829,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
340828
340829
|
//#endregion
|
|
340829
340830
|
//#region node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
340830
340831
|
function isUnicodeSupported() {
|
|
340831
|
-
const { env } =
|
|
340832
|
+
const { env } = _w;
|
|
340832
340833
|
const { TERM, TERM_PROGRAM } = env;
|
|
340833
|
-
if (
|
|
340834
|
+
if (_w.platform !== "win32") return TERM !== "linux";
|
|
340834
340835
|
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";
|
|
340835
340836
|
}
|
|
340836
340837
|
|
|
@@ -341365,7 +341366,7 @@ function traversePathUp(startPath) {
|
|
|
341365
341366
|
|
|
341366
341367
|
//#endregion
|
|
341367
341368
|
//#region node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
341368
|
-
const npmRunPath = ({ cwd =
|
|
341369
|
+
const npmRunPath = ({ cwd = _w.cwd(), path: pathOption = _w.env[pathKey()], preferLocal = true, execPath = _w.execPath, addExecPath = true } = {}) => {
|
|
341369
341370
|
const cwdPath = path.resolve(toPath(cwd));
|
|
341370
341371
|
const result = [];
|
|
341371
341372
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -341383,7 +341384,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
341383
341384
|
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
341384
341385
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
341385
341386
|
};
|
|
341386
|
-
const npmRunPathEnv = ({ env =
|
|
341387
|
+
const npmRunPathEnv = ({ env = _w.env, ...options } = {}) => {
|
|
341387
341388
|
env = { ...env };
|
|
341388
341389
|
const pathName = pathKey({ env });
|
|
341389
341390
|
options.path = env[pathName];
|
|
@@ -342518,7 +342519,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
342518
342519
|
};
|
|
342519
342520
|
const getDefaultCwd = () => {
|
|
342520
342521
|
try {
|
|
342521
|
-
return
|
|
342522
|
+
return _w.cwd();
|
|
342522
342523
|
} catch (error) {
|
|
342523
342524
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
342524
342525
|
throw error;
|
|
@@ -342554,7 +342555,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
342554
342555
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
342555
342556
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
342556
342557
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
342557
|
-
if (
|
|
342558
|
+
if (_w.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
342558
342559
|
return {
|
|
342559
342560
|
file,
|
|
342560
342561
|
commandArguments,
|
|
@@ -342581,7 +342582,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
342581
342582
|
});
|
|
342582
342583
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
342583
342584
|
const env = extendEnv ? {
|
|
342584
|
-
...
|
|
342585
|
+
..._w.env,
|
|
342585
342586
|
...envOption
|
|
342586
342587
|
} : envOption;
|
|
342587
342588
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -343583,12 +343584,12 @@ const guessStreamDirection = {
|
|
|
343583
343584
|
}
|
|
343584
343585
|
};
|
|
343585
343586
|
const getStandardStreamDirection = (value) => {
|
|
343586
|
-
if ([0,
|
|
343587
|
+
if ([0, _w.stdin].includes(value)) return "input";
|
|
343587
343588
|
if ([
|
|
343588
343589
|
1,
|
|
343589
343590
|
2,
|
|
343590
|
-
|
|
343591
|
-
|
|
343591
|
+
_w.stdout,
|
|
343592
|
+
_w.stderr
|
|
343592
343593
|
].includes(value)) return "output";
|
|
343593
343594
|
};
|
|
343594
343595
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -344652,9 +344653,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
344652
344653
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
344653
344654
|
};
|
|
344654
344655
|
const getIpcExport = () => {
|
|
344655
|
-
const anyProcess =
|
|
344656
|
+
const anyProcess = _w;
|
|
344656
344657
|
const isSubprocess = true;
|
|
344657
|
-
const ipc =
|
|
344658
|
+
const ipc = _w.channel !== void 0;
|
|
344658
344659
|
return {
|
|
344659
344660
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
344660
344661
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -345131,7 +345132,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
345131
345132
|
};
|
|
345132
345133
|
var SignalExit = class extends SignalExitBase {
|
|
345133
345134
|
/* c8 ignore start */
|
|
345134
|
-
#hupSig = process$
|
|
345135
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
345135
345136
|
/* c8 ignore stop */
|
|
345136
345137
|
#emitter = new Emitter();
|
|
345137
345138
|
#process;
|
|
@@ -345226,8 +345227,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
345226
345227
|
} else return og.call(this.#process, ev, ...args);
|
|
345227
345228
|
}
|
|
345228
345229
|
};
|
|
345229
|
-
const process$
|
|
345230
|
-
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$
|
|
345230
|
+
const process$1 = globalThis.process;
|
|
345231
|
+
const { onExit, load: load$1, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
345231
345232
|
|
|
345232
345233
|
//#endregion
|
|
345233
345234
|
//#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.210" "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.210",
|
|
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": "39e8a1df81ce900d25d5766d5a7180d755a753e2"
|
|
87
87
|
}
|