feat: add any schema
This commit is contained in:
parent
1660697588
commit
c29d1000f3
2 changed files with 16 additions and 0 deletions
15
src/schemas/any.ts
Normal file
15
src/schemas/any.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
import * as z from "zod";
|
||||||
|
|
||||||
|
import * as v0_1 from "./0.1.js";
|
||||||
|
import * as v0_2 from "./0.2.js";
|
||||||
|
import * as v0_3 from "./0.3.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Union schema that accepts any supported manifest version (0.1, 0.2, 0.3).
|
||||||
|
* Use this when you need to validate manifests of any version.
|
||||||
|
*/
|
||||||
|
export const McpbManifestSchema = z.union([
|
||||||
|
v0_1.McpbManifestSchema,
|
||||||
|
v0_2.McpbManifestSchema,
|
||||||
|
v0_3.McpbManifestSchema,
|
||||||
|
]);
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
export * as v0_1 from "./0.1.js";
|
export * as v0_1 from "./0.1.js";
|
||||||
export * as v0_2 from "./0.2.js";
|
export * as v0_2 from "./0.2.js";
|
||||||
export * as v0_3 from "./0.3.js";
|
export * as v0_3 from "./0.3.js";
|
||||||
|
export * as any from "./any.js";
|
||||||
export * as latest from "./latest.js";
|
export * as latest from "./latest.js";
|
||||||
export {
|
export {
|
||||||
MANIFEST_VERSION as LATEST_MANIFEST_VERSION,
|
MANIFEST_VERSION as LATEST_MANIFEST_VERSION,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue