|
1 | 1 | import { confirm, input, select } from "@inquirer/prompts"; |
2 | 2 | import { existsSync, readFileSync, writeFileSync } from "fs"; |
3 | 3 | import { basename, join, resolve } from "path"; |
| 4 | +import type { z } from "zod"; |
4 | 5 |
|
| 6 | +// Import the schema for DEFAULT_MANIFEST_VERSION |
| 7 | +// TODO: Allow dynamic manifest version choice |
| 8 | +import type { McpbManifestSchema } from "../schemas/0.2.js"; |
5 | 9 | import { DEFAULT_MANIFEST_VERSION } from "../shared/constants.js"; |
6 | | -import type { McpbManifest } from "../types.js"; |
7 | 10 |
|
8 | 11 | interface PackageJson { |
9 | 12 | name?: string; |
@@ -874,11 +877,11 @@ export function buildManifest( |
874 | 877 | license: string; |
875 | 878 | repository?: { type: string; url: string }; |
876 | 879 | }, |
877 | | - localization?: { |
878 | | - resources: string; |
879 | | - default_locale: string; |
880 | | - }, |
881 | | -): McpbManifest { |
| 880 | + // localization?: { |
| 881 | + // resources: string; |
| 882 | + // default_locale: string; |
| 883 | + // }, |
| 884 | +): z.infer<typeof McpbManifestSchema> { |
882 | 885 | const { name, displayName, version, description, authorName } = basicInfo; |
883 | 886 | const { authorEmail, authorUrl } = authorInfo; |
884 | 887 | const { serverType, entryPoint, mcp_config } = serverConfig; |
@@ -906,7 +909,7 @@ export function buildManifest( |
906 | 909 | ...(visualAssets.screenshots.length > 0 |
907 | 910 | ? { screenshots: visualAssets.screenshots } |
908 | 911 | : {}), |
909 | | - ...(localization ? { localization } : {}), |
| 912 | + // ...(localization ? { localization } : {}), |
910 | 913 | server: { |
911 | 914 | type: serverType, |
912 | 915 | entry_point: entryPoint, |
@@ -991,9 +994,9 @@ export async function initExtension( |
991 | 994 | const visualAssets = nonInteractive |
992 | 995 | ? { icon: "", icons: [], screenshots: [] } |
993 | 996 | : await promptVisualAssets(); |
994 | | - const localization = nonInteractive |
995 | | - ? undefined |
996 | | - : await promptLocalization(); |
| 997 | + // const localization = nonInteractive |
| 998 | + // ? undefined |
| 999 | + // : await promptLocalization(); |
997 | 1000 | const serverConfig = nonInteractive |
998 | 1001 | ? getDefaultServerConfig(packageData) |
999 | 1002 | : await promptServerConfig(packageData); |
@@ -1026,7 +1029,6 @@ export async function initExtension( |
1026 | 1029 | compatibility, |
1027 | 1030 | userConfig, |
1028 | 1031 | optionalFields, |
1029 | | - localization, |
1030 | 1032 | ); |
1031 | 1033 |
|
1032 | 1034 | // Write manifest |
|
0 commit comments