From bdae99990f3cf90bae8310b3e8c90fad633c7744 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Sun, 5 Jan 2025 18:35:35 -0500 Subject: [PATCH] feat: make each type of cmds optional in manifest There may be more types of cmds in the future, this makes backward compatibility easier. --- packages/api/src/models/manifest.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api/src/models/manifest.ts b/packages/api/src/models/manifest.ts index 77159c1..a6ce3fb 100644 --- a/packages/api/src/models/manifest.ts +++ b/packages/api/src/models/manifest.ts @@ -124,9 +124,9 @@ export const KunkunExtManifest = v.object({ "Permissions Declared by the extension. e.g. clipboard-all. Not declared APIs will be blocked." ), demoImages: v.array(v.string("Demo images for the extension")), - customUiCmds: v.array(CustomUiCmd, "Custom UI Commands"), - templateUiCmds: v.array(TemplateUiCmd, "Template UI Commands"), - headlessCmds: v.array(HeadlessCmd, "Headless Commands") + customUiCmds: v.optional(v.array(CustomUiCmd, "Custom UI Commands")), + templateUiCmds: v.optional(v.array(TemplateUiCmd, "Template UI Commands")), + headlessCmds: v.optional(v.array(HeadlessCmd, "Headless Commands")) }) export type KunkunExtManifest = v.InferOutput