zod-nest 3.2.1 → 3.2.3
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/README.md +1 -0
- package/dist/{chunk-RTWHQFNA.mjs → chunk-47ML6LKE.mjs} +5 -5
- package/dist/{chunk-RTWHQFNA.mjs.map → chunk-47ML6LKE.mjs.map} +1 -1
- package/dist/{chunk-LXRBMFWD.js → chunk-4LOFWANL.js} +6 -6
- package/dist/{chunk-LXRBMFWD.js.map → chunk-4LOFWANL.js.map} +1 -1
- package/dist/{chunk-KSDHVGMB.js → chunk-6FL3HR4I.js} +45 -45
- package/dist/{chunk-KSDHVGMB.js.map → chunk-6FL3HR4I.js.map} +1 -1
- package/dist/{chunk-BAG3BDRM.mjs → chunk-7IPDYJNI.mjs} +37 -57
- package/dist/chunk-7IPDYJNI.mjs.map +1 -0
- package/dist/{chunk-T4KTFCJW.js → chunk-DUQLL62I.js} +94 -114
- package/dist/chunk-DUQLL62I.js.map +1 -0
- package/dist/chunk-EV5I5HGT.js +127 -0
- package/dist/chunk-EV5I5HGT.js.map +1 -0
- package/dist/{chunk-WI4JKXT6.mjs → chunk-IMEFMJTS.mjs} +3 -3
- package/dist/{chunk-WI4JKXT6.mjs.map → chunk-IMEFMJTS.mjs.map} +1 -1
- package/dist/chunk-MPNAA53V.mjs +119 -0
- package/dist/chunk-MPNAA53V.mjs.map +1 -0
- package/dist/express/index.js +20 -20
- package/dist/express/index.mjs +5 -5
- package/dist/fastify/index.js +11 -11
- package/dist/fastify/index.mjs +5 -5
- package/dist/helpers/index.js +24 -24
- package/dist/helpers/index.mjs +3 -3
- package/dist/index.js +203 -203
- package/dist/index.mjs +4 -4
- package/package.json +26 -33
- package/dist/chunk-4RXGLSPP.js +0 -73
- package/dist/chunk-4RXGLSPP.js.map +0 -1
- package/dist/chunk-BAG3BDRM.mjs.map +0 -1
- package/dist/chunk-T4KTFCJW.js.map +0 -1
- package/dist/chunk-ZZW54ETO.mjs +0 -67
- package/dist/chunk-ZZW54ETO.mjs.map +0 -1
package/dist/express/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
3
|
+
var chunk6FL3HR4I_js = require('../chunk-6FL3HR4I.js');
|
|
4
|
+
require('../chunk-DUQLL62I.js');
|
|
5
|
+
require('../chunk-4LOFWANL.js');
|
|
6
|
+
var chunkEV5I5HGT_js = require('../chunk-EV5I5HGT.js');
|
|
7
7
|
|
|
8
8
|
// src/express/index.ts
|
|
9
|
-
var hasCommonFields = /* @__PURE__ */
|
|
10
|
-
var isMulterMemoryFile = /* @__PURE__ */
|
|
11
|
-
var isMulterDiskFile = /* @__PURE__ */
|
|
9
|
+
var hasCommonFields = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => value !== null && typeof value === "object" && "mimetype" in value && "originalname" in value && "size" in value, "hasCommonFields");
|
|
10
|
+
var isMulterMemoryFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => hasCommonFields(value) && Buffer.isBuffer(value.buffer), "isMulterMemoryFile");
|
|
11
|
+
var isMulterDiskFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => hasCommonFields(value) && typeof value.path === "string", "isMulterDiskFile");
|
|
12
12
|
var memoryAccessors = {
|
|
13
|
-
mimeType: /* @__PURE__ */
|
|
14
|
-
fileName: /* @__PURE__ */
|
|
15
|
-
size: /* @__PURE__ */
|
|
13
|
+
mimeType: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.mimetype, "mimeType"),
|
|
14
|
+
fileName: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.originalname, "fileName"),
|
|
15
|
+
size: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.size, "size")
|
|
16
16
|
};
|
|
17
17
|
var diskAccessors = {
|
|
18
|
-
mimeType: /* @__PURE__ */
|
|
19
|
-
fileName: /* @__PURE__ */
|
|
20
|
-
size: /* @__PURE__ */
|
|
18
|
+
mimeType: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.mimetype, "mimeType"),
|
|
19
|
+
fileName: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.originalname, "fileName"),
|
|
20
|
+
size: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.size, "size")
|
|
21
21
|
};
|
|
22
|
-
var multerMemoryFile = /* @__PURE__ */
|
|
22
|
+
var multerMemoryFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((options) => chunk6FL3HR4I_js.buildFileSchema({
|
|
23
23
|
predicate: isMulterMemoryFile,
|
|
24
24
|
accessors: memoryAccessors,
|
|
25
25
|
options,
|
|
@@ -27,7 +27,7 @@ var multerMemoryFile = /* @__PURE__ */ chunk4RXGLSPP_js.__name((options) => chun
|
|
|
27
27
|
maxSize: options.maxSize
|
|
28
28
|
} : {}
|
|
29
29
|
}), "multerMemoryFile");
|
|
30
|
-
var multerDiskFile = /* @__PURE__ */
|
|
30
|
+
var multerDiskFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((options) => chunk6FL3HR4I_js.buildFileSchema({
|
|
31
31
|
predicate: isMulterDiskFile,
|
|
32
32
|
accessors: diskAccessors,
|
|
33
33
|
options,
|
|
@@ -37,23 +37,23 @@ var multerDiskFile = /* @__PURE__ */ chunk4RXGLSPP_js.__name((options) => chunkK
|
|
|
37
37
|
}), "multerDiskFile");
|
|
38
38
|
var MulterMemoryFileSchema = multerMemoryFile();
|
|
39
39
|
var MulterDiskFileSchema = multerDiskFile();
|
|
40
|
-
var ZodMultipart =
|
|
40
|
+
var ZodMultipart = chunk6FL3HR4I_js.createZodMultipart(chunk6FL3HR4I_js.MultipartFilesIn.Request);
|
|
41
41
|
|
|
42
42
|
Object.defineProperty(exports, "MULTIPART_CONTENT_TYPE", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk6FL3HR4I_js.MULTIPART_CONTENT_TYPE; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "ZodMultipartBody", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk6FL3HR4I_js.ZodMultipartBody; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "ZodUploadedFile", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk6FL3HR4I_js.ZodUploadedFile; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "ZodUploadedFiles", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk6FL3HR4I_js.ZodUploadedFiles; }
|
|
57
57
|
});
|
|
58
58
|
exports.MulterDiskFileSchema = MulterDiskFileSchema;
|
|
59
59
|
exports.MulterMemoryFileSchema = MulterMemoryFileSchema;
|
package/dist/express/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createZodMultipart, MultipartFilesIn, buildFileSchema } from '../chunk-
|
|
2
|
-
export { MULTIPART_CONTENT_TYPE, ZodMultipartBody, ZodUploadedFile, ZodUploadedFiles } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import { __name } from '../chunk-
|
|
1
|
+
import { createZodMultipart, MultipartFilesIn, buildFileSchema } from '../chunk-47ML6LKE.mjs';
|
|
2
|
+
export { MULTIPART_CONTENT_TYPE, ZodMultipartBody, ZodUploadedFile, ZodUploadedFiles } from '../chunk-47ML6LKE.mjs';
|
|
3
|
+
import '../chunk-7IPDYJNI.mjs';
|
|
4
|
+
import '../chunk-IMEFMJTS.mjs';
|
|
5
|
+
import { __name } from '../chunk-MPNAA53V.mjs';
|
|
6
6
|
|
|
7
7
|
// src/express/index.ts
|
|
8
8
|
var hasCommonFields = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && "mimetype" in value && "originalname" in value && "size" in value, "hasCommonFields");
|
package/dist/fastify/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
3
|
+
var chunk6FL3HR4I_js = require('../chunk-6FL3HR4I.js');
|
|
4
|
+
require('../chunk-DUQLL62I.js');
|
|
5
|
+
require('../chunk-4LOFWANL.js');
|
|
6
|
+
var chunkEV5I5HGT_js = require('../chunk-EV5I5HGT.js');
|
|
7
7
|
|
|
8
8
|
// src/fastify/index.ts
|
|
9
|
-
var isFastifyMultipartFile = /* @__PURE__ */
|
|
9
|
+
var isFastifyMultipartFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((value) => value !== null && typeof value === "object" && "type" in value && value.type === "file" && "mimetype" in value && "filename" in value && "toBuffer" in value && typeof value.toBuffer === "function", "isFastifyMultipartFile");
|
|
10
10
|
var accessors = {
|
|
11
|
-
mimeType: /* @__PURE__ */
|
|
12
|
-
fileName: /* @__PURE__ */
|
|
11
|
+
mimeType: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.mimetype, "mimeType"),
|
|
12
|
+
fileName: /* @__PURE__ */ chunkEV5I5HGT_js.__name((file) => file.filename, "fileName")
|
|
13
13
|
};
|
|
14
|
-
var fastifyMultipartFile = /* @__PURE__ */
|
|
14
|
+
var fastifyMultipartFile = /* @__PURE__ */ chunkEV5I5HGT_js.__name((options) => chunk6FL3HR4I_js.buildFileSchema({
|
|
15
15
|
predicate: isFastifyMultipartFile,
|
|
16
16
|
accessors,
|
|
17
17
|
options
|
|
18
18
|
}), "fastifyMultipartFile");
|
|
19
19
|
var FastifyMultipartFileSchema = fastifyMultipartFile();
|
|
20
|
-
var ZodMultipart =
|
|
20
|
+
var ZodMultipart = chunk6FL3HR4I_js.createZodMultipart(chunk6FL3HR4I_js.MultipartFilesIn.Body);
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "MULTIPART_CONTENT_TYPE", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk6FL3HR4I_js.MULTIPART_CONTENT_TYPE; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "ZodMultipartBody", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk6FL3HR4I_js.ZodMultipartBody; }
|
|
29
29
|
});
|
|
30
30
|
exports.FastifyMultipartFileSchema = FastifyMultipartFileSchema;
|
|
31
31
|
exports.ZodMultipart = ZodMultipart;
|
package/dist/fastify/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createZodMultipart, MultipartFilesIn, buildFileSchema } from '../chunk-
|
|
2
|
-
export { MULTIPART_CONTENT_TYPE, ZodMultipartBody } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import { __name } from '../chunk-
|
|
1
|
+
import { createZodMultipart, MultipartFilesIn, buildFileSchema } from '../chunk-47ML6LKE.mjs';
|
|
2
|
+
export { MULTIPART_CONTENT_TYPE, ZodMultipartBody } from '../chunk-47ML6LKE.mjs';
|
|
3
|
+
import '../chunk-7IPDYJNI.mjs';
|
|
4
|
+
import '../chunk-IMEFMJTS.mjs';
|
|
5
|
+
import { __name } from '../chunk-MPNAA53V.mjs';
|
|
6
6
|
|
|
7
7
|
// src/fastify/index.ts
|
|
8
8
|
var isFastifyMultipartFile = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && "type" in value && value.type === "file" && "mimetype" in value && "filename" in value && "toBuffer" in value && typeof value.toBuffer === "function", "isFastifyMultipartFile");
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk4LOFWANL_js = require('../chunk-4LOFWANL.js');
|
|
4
|
+
var chunkEV5I5HGT_js = require('../chunk-EV5I5HGT.js');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
|
-
var FileSchema =
|
|
8
|
-
var BlobSchema =
|
|
9
|
-
var BufferSchema =
|
|
7
|
+
var FileSchema = chunkEV5I5HGT_js.overrideJSONSchema(zod.z.instanceof(File), chunk4LOFWANL_js.binaryFragment);
|
|
8
|
+
var BlobSchema = chunkEV5I5HGT_js.overrideJSONSchema(zod.z.instanceof(Blob), chunk4LOFWANL_js.binaryFragment);
|
|
9
|
+
var BufferSchema = chunkEV5I5HGT_js.overrideJSONSchema(zod.z.instanceof(Buffer), chunk4LOFWANL_js.binaryFragment);
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "binary", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk4LOFWANL_js.binary; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "binaryFragment", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk4LOFWANL_js.binaryFragment; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "byteFragment", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk4LOFWANL_js.byteFragment; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "dateFragment", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk4LOFWANL_js.dateFragment; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "dateTimeFragment", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk4LOFWANL_js.dateTimeFragment; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "doubleFragment", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk4LOFWANL_js.doubleFragment; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "emailFragment", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk4LOFWANL_js.emailFragment; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "enrich", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk4LOFWANL_js.enrich; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "floatFragment", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk4LOFWANL_js.floatFragment; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "hostnameFragment", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunk4LOFWANL_js.hostnameFragment; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "int32Fragment", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk4LOFWANL_js.int32Fragment; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "int64Fragment", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk4LOFWANL_js.int64Fragment; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "ipv4Fragment", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk4LOFWANL_js.ipv4Fragment; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "ipv6Fragment", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk4LOFWANL_js.ipv6Fragment; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "opaque", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunk4LOFWANL_js.opaque; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "opaqueFragment", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk4LOFWANL_js.opaqueFragment; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "timeFragment", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk4LOFWANL_js.timeFragment; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "uriFragment", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk4LOFWANL_js.uriFragment; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "uuidFragment", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk4LOFWANL_js.uuidFragment; }
|
|
86
86
|
});
|
|
87
87
|
exports.BlobSchema = BlobSchema;
|
|
88
88
|
exports.BufferSchema = BufferSchema;
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { binaryFragment } from '../chunk-
|
|
2
|
-
export { binary, binaryFragment, byteFragment, dateFragment, dateTimeFragment, doubleFragment, emailFragment, enrich, floatFragment, hostnameFragment, int32Fragment, int64Fragment, ipv4Fragment, ipv6Fragment, opaque, opaqueFragment, timeFragment, uriFragment, uuidFragment } from '../chunk-
|
|
3
|
-
import { overrideJSONSchema } from '../chunk-
|
|
1
|
+
import { binaryFragment } from '../chunk-IMEFMJTS.mjs';
|
|
2
|
+
export { binary, binaryFragment, byteFragment, dateFragment, dateTimeFragment, doubleFragment, emailFragment, enrich, floatFragment, hostnameFragment, int32Fragment, int64Fragment, ipv4Fragment, ipv6Fragment, opaque, opaqueFragment, timeFragment, uriFragment, uuidFragment } from '../chunk-IMEFMJTS.mjs';
|
|
3
|
+
import { overrideJSONSchema } from '../chunk-MPNAA53V.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
var FileSchema = overrideJSONSchema(z.instanceof(File), binaryFragment);
|