fix(apple): preserve modern cache subtype metadata

This commit is contained in:
morluto
2026-10-08 23:26:33 +08:00
parent 8289ede5db
commit 22e6110acb
6 changed files with 95 additions and 3 deletions
+10
View File
@@ -45,6 +45,16 @@ const headerSchema = z.object({
alt_platform: applePlatformSchema.nullable(),
alt_os_version: z.string().nullable(),
cache_type: z.enum(["development", "production", "multi-cache"]).nullable(),
cache_subtype: z
.object({
id: z.number().int().nonnegative(),
name: z.enum(["development", "production"]).nullable(),
})
.nullable()
.default(null)
.describe(
"Multi-cache subtype from the producer header: 0 is development, 1 is production; unknown values retain their ID with a null name. Null when absent or not applicable.",
),
shared_region: z.object({ start: hexSchema, size: hexSchema }).nullable(),
max_slide: hexSchema.nullable(),
mappings: z.array(mappingSchema),