@yimingliao/cms 0.0.31 → 0.0.32

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.
@@ -170,7 +170,7 @@ declare function createSchemas({ z, localeArray, exist, }: {
170
170
  declare function createFileSchema({ z, maxSizeInMb, }: {
171
171
  z: ReturnType<typeof createZod>;
172
172
  maxSizeInMb: number;
173
- }): ({ size, extensions, }: {
173
+ }): ({ size, extensions, }?: {
174
174
  size?: number;
175
175
  extensions?: string[];
176
176
  }) => zod.ZodPipe<zod.ZodCustom<File, File>, zod.ZodTransform<BlobFile, File>>;
@@ -555,7 +555,7 @@ function createFileSchema({
555
555
  return function fileSchema({
556
556
  size = maxSizeInMb * SIZE.MB,
557
557
  extensions = []
558
- }) {
558
+ } = {}) {
559
559
  return z2.instanceof(File, { error: "Invalid file" }).refine((file) => file.size <= size, {
560
560
  error: `File is too large, max ${size / SIZE.MB}MB`
561
561
  }).refine(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",