fix: update icon size property from 'sizes' to 'size' in manifest and schema files

This commit is contained in:
Alexander Sklar 2025-10-30 16:26:55 -07:00
commit 257af30812
No known key found for this signature in database
3 changed files with 26 additions and 26 deletions

View file

@ -456,7 +456,7 @@ export async function promptVisualAssets() {
const icons: Array<{
src: string;
sizes: string;
size: string;
theme?: string;
}> = [];
@ -472,7 +472,7 @@ export async function promptVisualAssets() {
},
});
const iconSizes = await input({
const iconSize = await input({
message: "Icon size (e.g., 16x16):",
validate: (value) => {
if (!value.trim()) return "Icon size is required";
@ -490,7 +490,7 @@ export async function promptVisualAssets() {
icons.push({
src: iconSrc,
sizes: iconSizes,
size: iconSize,
...(iconTheme.trim() ? { theme: iconTheme.trim() } : {}),
});
@ -825,7 +825,7 @@ export function buildManifest(
icon: string;
icons: Array<{
src: string;
sizes: string;
size: string;
theme?: string;
}>;
screenshots: string[];

View file

@ -98,11 +98,11 @@ export const McpbManifestLocalizationSchema = z.strictObject({
export const McpbManifestIconSchema = z.strictObject({
src: z.string(),
sizes: z
size: z
.string()
.regex(
ICON_SIZE_REGEX,
'sizes must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
'size must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
),
theme: z.string().min(1, "theme cannot be empty when provided").optional(),
});

View file

@ -102,11 +102,11 @@ export const McpbManifestLocalizationSchema = z
export const McpbManifestIconSchema = z
.object({
src: z.string(),
sizes: z
size: z
.string()
.regex(
ICON_SIZE_REGEX,
'sizes must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
'size must be in the format "WIDTHxHEIGHT" (e.g., "16x16")',
),
theme: z.string().min(1).optional(),
})