@shotstack/schemas 1.9.10 → 1.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zod/zod.gen.cjs +16 -1
- package/dist/zod/zod.gen.d.ts +3612 -3612
- package/dist/zod/zod.gen.js +16 -1
- package/dist/zod/zod.gen.ts +15 -1
- package/package.json +1 -1
package/dist/zod/zod.gen.js
CHANGED
|
@@ -1136,7 +1136,22 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
|
1136
1136
|
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
1137
1137
|
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
1138
1138
|
animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
|
|
1139
|
-
}).strict()
|
|
1139
|
+
}).strict().superRefine((data, ctx) => {
|
|
1140
|
+
if (data.src) {
|
|
1141
|
+
try {
|
|
1142
|
+
const pathname = new URL(data.src).pathname.toLowerCase();
|
|
1143
|
+
const mediaExts = [".m4a", ".mp3", ".wav", ".aac", ".ogg", ".flac", ".wma", ".mp4", ".mov", ".avi", ".mkv", ".webm", ".wmv", ".flv", ".3gp"];
|
|
1144
|
+
if (mediaExts.some((ext) => pathname.endsWith(ext))) {
|
|
1145
|
+
ctx.addIssue({
|
|
1146
|
+
code: z.ZodIssueCode.custom,
|
|
1147
|
+
message: "src must point to a subtitle file (SRT or VTT). Audio and video files are not supported as src. Use the words array to provide word timings directly.",
|
|
1148
|
+
path: ["src"],
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
catch { }
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1140
1155
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
1141
1156
|
/**
|
|
1142
1157
|
* Font properties for rich text.
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -974,7 +974,21 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
|
|
|
974
974
|
align: z.optional(richtextpropertiesRichTextAlignmentSchema),
|
|
975
975
|
active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
|
|
976
976
|
animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
|
|
977
|
-
}).strict()
|
|
977
|
+
}).strict().superRefine((data, ctx) => {
|
|
978
|
+
if (data.src) {
|
|
979
|
+
try {
|
|
980
|
+
const pathname = new URL(data.src).pathname.toLowerCase();
|
|
981
|
+
const mediaExts = [".m4a",".mp3",".wav",".aac",".ogg",".flac",".wma",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".3gp"];
|
|
982
|
+
if (mediaExts.some((ext) => pathname.endsWith(ext))) {
|
|
983
|
+
ctx.addIssue({
|
|
984
|
+
code: z.ZodIssueCode.custom,
|
|
985
|
+
message: "src must point to a subtitle file (SRT or VTT). Audio and video files are not supported as src. Use the words array to provide word timings directly.",
|
|
986
|
+
path: ["src"],
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
} catch {}
|
|
990
|
+
}
|
|
991
|
+
});
|
|
978
992
|
|
|
979
993
|
export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
|
|
980
994
|
|