Add rich update check, version diffs, and changelog release history querying
Binaries / Build & Release Binaries (push) Has been cancelled
Binaries / Build & Release Binaries (push) Has been cancelled
This commit is contained in:
1 parent
e716f069ed
commit
63d579c273
6 files changed
+338
-71
No files matched your search
+24
-5
@@ -27,7 +27,7 @@ import { handleUpdateCommand } from "./commands/update.js";
|
||||
import { handleUsersCommand } from "./commands/users.js";
|
||||
import { handleWebhookCommand } from "./commands/webhook.js";
|
||||
import { selectCorp } from "./helpers.js";
|
||||
import { booleanOption, parseArgs, stringOption } from "./parser.js";
|
||||
import { booleanOption, numberOption, parseArgs, stringOption } from "./parser.js";
|
||||
import {
|
||||
formatConsoleOutput,
|
||||
joinOutput,
|
||||
@@ -63,7 +63,8 @@ const KNOWN_AREAS = new Set([
|
||||
"mcp-config",
|
||||
"skill",
|
||||
"openapi",
|
||||
"probe"
|
||||
"probe",
|
||||
"changelog"
|
||||
]);
|
||||
|
||||
export type { CliResult, CliRunOptions } from "./types.js";
|
||||
@@ -181,10 +182,28 @@ async function dispatch(argv: string[], runtime: CliRuntime) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "update") {
|
||||
const targetVersion = stringOption(args.options.version) ?? stringOption(args.options.tag) ?? (action && !action.startsWith("-") ? action : undefined);
|
||||
if (area === "update" || area === "changelog") {
|
||||
const isChangelog =
|
||||
area === "changelog" ||
|
||||
action === "changelog" ||
|
||||
action === "log" ||
|
||||
action === "history" ||
|
||||
booleanOption(args.options.changelog) === true;
|
||||
|
||||
const isCheck =
|
||||
action === "check" ||
|
||||
booleanOption(args.options.check) === true ||
|
||||
booleanOption(args.options["check-only"]) === true;
|
||||
|
||||
const targetVersion =
|
||||
stringOption(args.options.version) ??
|
||||
stringOption(args.options.tag) ??
|
||||
(!isChangelog && !isCheck && action && !action.startsWith("-") ? action : undefined);
|
||||
|
||||
await handleUpdateCommand(runtime, {
|
||||
checkOnly: booleanOption(args.options.check) ?? booleanOption(args.options["check-only"]),
|
||||
checkOnly: isCheck,
|
||||
changelogOnly: isChangelog,
|
||||
limit: numberOption(args.options.limit),
|
||||
force: booleanOption(args.options.force),
|
||||
targetVersion,
|
||||
repo: stringOption(args.options.repo)
|
||||
|
||||
Reference in new issue
Block a user