fix linting
This commit is contained in:
parent
d929b8c33c
commit
55154fa6fb
3 changed files with 15 additions and 9 deletions
|
|
@ -543,7 +543,8 @@ export async function promptLocalization() {
|
||||||
const placeholderRegex = /\$\{locale\}/i;
|
const placeholderRegex = /\$\{locale\}/i;
|
||||||
|
|
||||||
const resourcesPath = await input({
|
const resourcesPath = await input({
|
||||||
message: "Localization resources path (must include ${locale} placeholder):",
|
message:
|
||||||
|
"Localization resources path (must include ${locale} placeholder):",
|
||||||
default: "resources/${locale}.json",
|
default: "resources/${locale}.json",
|
||||||
validate: (value) => {
|
validate: (value) => {
|
||||||
if (!value.trim()) {
|
if (!value.trim()) {
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,7 @@ export const McpbManifestIconSchema = z.strictObject({
|
||||||
ICON_SIZE_REGEX,
|
ICON_SIZE_REGEX,
|
||||||
'sizes must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
|
'sizes must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
|
||||||
),
|
),
|
||||||
theme: z
|
theme: z.string().min(1, "theme cannot be empty when provided").optional(),
|
||||||
.string()
|
|
||||||
.min(1, "theme cannot be empty when provided")
|
|
||||||
.optional(),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const McpbManifestSchema = z
|
export const McpbManifestSchema = z
|
||||||
|
|
@ -129,9 +126,9 @@ export const McpbManifestSchema = z
|
||||||
documentation: z.string().url().optional(),
|
documentation: z.string().url().optional(),
|
||||||
support: z.string().url().optional(),
|
support: z.string().url().optional(),
|
||||||
icon: z.string().optional(),
|
icon: z.string().optional(),
|
||||||
icons: z.array(McpbManifestIconSchema).optional(),
|
icons: z.array(McpbManifestIconSchema).optional(),
|
||||||
screenshots: z.array(z.string()).optional(),
|
screenshots: z.array(z.string()).optional(),
|
||||||
localization: McpbManifestLocalizationSchema.optional(),
|
localization: McpbManifestLocalizationSchema.optional(),
|
||||||
server: McpbManifestServerSchema,
|
server: McpbManifestServerSchema,
|
||||||
tools: z.array(McpbManifestToolSchema).optional(),
|
tools: z.array(McpbManifestToolSchema).optional(),
|
||||||
tools_generated: z.boolean().optional(),
|
tools_generated: z.boolean().optional(),
|
||||||
|
|
|
||||||
|
|
@ -261,8 +261,16 @@ describe("init functions", () => {
|
||||||
{
|
{
|
||||||
icon: "icon.png",
|
icon: "icon.png",
|
||||||
icons: [
|
icons: [
|
||||||
{ src: "assets/icons/icon-16-light.png", sizes: "16x16", theme: "light" },
|
{
|
||||||
{ src: "assets/icons/icon-16-dark.png", sizes: "16x16", theme: "dark" },
|
src: "assets/icons/icon-16-light.png",
|
||||||
|
sizes: "16x16",
|
||||||
|
theme: "light",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: "assets/icons/icon-16-dark.png",
|
||||||
|
sizes: "16x16",
|
||||||
|
theme: "dark",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
screenshots: ["screen1.png", "screen2.png"],
|
screenshots: ["screen1.png", "screen2.png"],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue