refactor: use MANIFEST_VERSION variable in z.literal() instead of hardcoded strings

This commit is contained in:
Joan Xie 2025-09-24 13:54:38 -07:00
commit fe733e3450
No known key found for this signature in database
2 changed files with 12 additions and 8 deletions

View file

@ -79,8 +79,8 @@ export const McpbUserConfigValuesSchema = z.record(
export const McpbManifestSchema = z
.strictObject({
$schema: z.string().optional(),
dxt_version: z.literal("0.1").optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.literal("0.1").optional(),
dxt_version: z.literal(MANIFEST_VERSION).optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.literal(MANIFEST_VERSION).optional(),
name: z.string(),
display_name: z.string().optional(),
version: z.string(),

View file

@ -79,8 +79,8 @@ export const McpbUserConfigValuesSchema = z.record(
export const McpbManifestSchema = z
.strictObject({
$schema: z.string().optional(),
dxt_version: z.literal("0.2").optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.literal("0.2").optional(),
dxt_version: z.literal(MANIFEST_VERSION).optional().describe("@deprecated Use manifest_version instead"),
manifest_version: z.literal(MANIFEST_VERSION).optional(),
name: z.string(),
display_name: z.string().optional(),
version: z.string(),