@shotstack/schemas 1.9.10 → 1.9.12
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.cjs
CHANGED
|
@@ -1144,7 +1144,22 @@ exports.richcaptionassetRichCaptionAssetSchema = zod_1.z.object({
|
|
|
1144
1144
|
align: zod_1.z.optional(exports.richtextpropertiesRichTextAlignmentSchema),
|
|
1145
1145
|
active: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionActiveSchema),
|
|
1146
1146
|
animation: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionAnimationSchema)
|
|
1147
|
-
}).strict()
|
|
1147
|
+
}).strict().superRefine((data, ctx) => {
|
|
1148
|
+
if (data.src) {
|
|
1149
|
+
try {
|
|
1150
|
+
const pathname = new URL(data.src).pathname.toLowerCase();
|
|
1151
|
+
const mediaExts = [".m4a", ".mp3", ".wav", ".aac", ".ogg", ".flac", ".wma", ".mp4", ".mov", ".avi", ".mkv", ".webm", ".wmv", ".flv", ".3gp"];
|
|
1152
|
+
if (mediaExts.some((ext) => pathname.endsWith(ext))) {
|
|
1153
|
+
ctx.addIssue({
|
|
1154
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
1155
|
+
message: "Caption src must be an SRT or VTT subtitle file. To generate captions from a media asset, use an alias reference (e.g. \"alias://my-clip\") instead of a direct URL. See: https://shotstack.io/docs/guide/architecting-an-application/rich-captions/",
|
|
1156
|
+
path: ["src"],
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
catch { }
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1148
1163
|
exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema;
|
|
1149
1164
|
/**
|
|
1150
1165
|
* Font properties for rich text.
|