fix: rename CURRENT_MANIFEST_VERSION to MANIFEST_VERSION and set correct versions
This commit is contained in:
parent
2e9e70c5ff
commit
3d9c966951
4 changed files with 10 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import { confirm, input, select } from "@inquirer/prompts";
|
|||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { basename, join, resolve } from "path";
|
||||
|
||||
import { CURRENT_MANIFEST_VERSION } from "../schemas/0.2.js";
|
||||
import { MANIFEST_VERSION } from "../schemas/0.2.js";
|
||||
import type { McpbManifest } from "../types.js";
|
||||
|
||||
interface PackageJson {
|
||||
|
|
@ -774,7 +774,7 @@ export function buildManifest(
|
|||
const { keywords, license, repository } = optionalFields;
|
||||
|
||||
return {
|
||||
manifest_version: CURRENT_MANIFEST_VERSION,
|
||||
manifest_version: MANIFEST_VERSION,
|
||||
name,
|
||||
...(displayName && displayName !== name
|
||||
? { display_name: displayName }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { basename, join, relative, resolve, sep } from "path";
|
|||
|
||||
import { getAllFilesWithCount, readMcpbIgnorePatterns } from "../node/files.js";
|
||||
import { validateManifest } from "../node/validate.js";
|
||||
import { CURRENT_MANIFEST_VERSION, McpbManifestSchema } from "../schemas/0.2.js";
|
||||
import { MANIFEST_VERSION, McpbManifestSchema } from "../schemas/0.2.js";
|
||||
import { getLogger } from "../shared/log.js";
|
||||
import { initExtension } from "./init.js";
|
||||
|
||||
|
|
@ -102,12 +102,12 @@ export async function packExtension({
|
|||
}
|
||||
|
||||
const manifestVersion = manifest.manifest_version || manifest.dxt_version;
|
||||
if (manifestVersion !== CURRENT_MANIFEST_VERSION) {
|
||||
if (manifestVersion !== MANIFEST_VERSION) {
|
||||
logger.error(
|
||||
`ERROR: Manifest version mismatch. Expected "${CURRENT_MANIFEST_VERSION}", found "${manifestVersion}"`,
|
||||
`ERROR: Manifest version mismatch. Expected "${MANIFEST_VERSION}", found "${manifestVersion}"`,
|
||||
);
|
||||
logger.error(
|
||||
` Please update the manifest_version in your manifest.json to "${CURRENT_MANIFEST_VERSION}"`,
|
||||
` Please update the manifest_version in your manifest.json to "${MANIFEST_VERSION}"`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as z from "zod";
|
||||
|
||||
export const CURRENT_MANIFEST_VERSION = "0.2";
|
||||
export const MANIFEST_VERSION = "0.1";
|
||||
|
||||
export const McpServerConfigSchema = z.strictObject({
|
||||
command: z.string(),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import * as z from "zod";
|
||||
|
||||
export const McpServerConfigSchema = z.object({
|
||||
export const MANIFEST_VERSION = "0.2";
|
||||
|
||||
export const McpServerConfigSchema = z.strictObject({
|
||||
command: z.string(),
|
||||
args: z.array(z.string()).optional(),
|
||||
env: z.record(z.string(), z.string()).optional(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue