Add Webhook material pack import
This commit is contained in:
1 parent
1299d70777
commit
77ae7d4dca
17 files changed
+667
-4
No files matched your search
+8
-1
@@ -28,7 +28,7 @@ import { handleToolCommand } from "./commands/tool.js";
|
||||
import { handleToolsListCommand } from "./commands/tools.js";
|
||||
import { handleUpdateCommand } from "./commands/update.js";
|
||||
import { handleUsersCommand } from "./commands/users.js";
|
||||
import { handleWebhookCommand } from "./commands/webhook.js";
|
||||
import { handleWebhookCommand, handleWebhookMaterialPackPreview } from "./commands/webhook.js";
|
||||
import { selectCorp } from "./helpers.js";
|
||||
import { booleanOption, numberOption, parseArgs, stringOption } from "./parser.js";
|
||||
import {
|
||||
@@ -155,6 +155,13 @@ async function dispatch(argv: string[], runtime: CliRuntime) {
|
||||
throw new Error(`Unknown command: ${args.command.join(" ")}. Run 'seal-use help' for available commands.`);
|
||||
}
|
||||
|
||||
if (area === "webhook" && action === "material-pack" && maybeName === "preview") {
|
||||
const filePath = args.command[3] ?? stringOption(args.options.file) ?? stringOption(args.options.input);
|
||||
if (!filePath) throw new Error("Usage: seal-use webhook material-pack preview <材料包.zip>");
|
||||
await handleWebhookMaterialPackPreview(filePath);
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "openapi") {
|
||||
handleOpenApiCommand(args);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user