@logto/connector-google 1.0.0-beta.11 → 1.0.0-beta.15
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/lib/index.js +1236 -568
- package/lib/jest.config.d.ts +1 -1
- package/lib/src/constant.d.ts +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/types.d.ts +3 -3
- package/package.json +31 -28
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 5254:
|
|
5
5
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
@@ -21,115 +21,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24
|
-
|
|
25
|
-
const types_1 = __nccwpck_require__(8053);
|
|
26
|
-
__exportStar(__nccwpck_require__(8053), exports);
|
|
27
|
-
function validateConfig(config, guard) {
|
|
28
|
-
const result = guard.safeParse(config);
|
|
29
|
-
if (!result.success) {
|
|
30
|
-
throw new types_1.ConnectorError(types_1.ConnectorErrorCodes.InvalidConfig, result.error);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.validateConfig = validateConfig;
|
|
34
|
-
const parseJson = (jsonString, errorCode = types_1.ConnectorErrorCodes.InvalidResponse, errorPayload) => {
|
|
35
|
-
try {
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
37
|
-
return JSON.parse(jsonString);
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
throw new types_1.ConnectorError(errorCode, errorPayload ?? jsonString);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.parseJson = parseJson;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/***/ }),
|
|
47
|
-
|
|
48
|
-
/***/ 8053:
|
|
49
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
50
|
-
|
|
51
|
-
"use strict";
|
|
52
|
-
|
|
53
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54
|
-
exports.messageTypesGuard = exports.MessageTypes = exports.ConnectorError = exports.ConnectorErrorCodes = exports.ConnectorPlatform = exports.ConnectorType = void 0;
|
|
55
|
-
const zod_1 = __nccwpck_require__(8062);
|
|
56
|
-
// MARK: Foundation
|
|
57
|
-
var ConnectorType;
|
|
58
|
-
(function (ConnectorType) {
|
|
59
|
-
ConnectorType["Email"] = "Email";
|
|
60
|
-
ConnectorType["Sms"] = "Sms";
|
|
61
|
-
ConnectorType["Social"] = "Social";
|
|
62
|
-
})(ConnectorType = exports.ConnectorType || (exports.ConnectorType = {}));
|
|
63
|
-
var ConnectorPlatform;
|
|
64
|
-
(function (ConnectorPlatform) {
|
|
65
|
-
ConnectorPlatform["Native"] = "Native";
|
|
66
|
-
ConnectorPlatform["Universal"] = "Universal";
|
|
67
|
-
ConnectorPlatform["Web"] = "Web";
|
|
68
|
-
})(ConnectorPlatform = exports.ConnectorPlatform || (exports.ConnectorPlatform = {}));
|
|
69
|
-
var ConnectorErrorCodes;
|
|
70
|
-
(function (ConnectorErrorCodes) {
|
|
71
|
-
ConnectorErrorCodes["General"] = "general";
|
|
72
|
-
ConnectorErrorCodes["InvalidMetadata"] = "invalid_metadata";
|
|
73
|
-
ConnectorErrorCodes["UnexpectedType"] = "unexpected_type";
|
|
74
|
-
ConnectorErrorCodes["InvalidConfigGuard"] = "invalid_config_guard";
|
|
75
|
-
ConnectorErrorCodes["InvalidRequestParameters"] = "invalid_request_parameters";
|
|
76
|
-
ConnectorErrorCodes["InsufficientRequestParameters"] = "insufficient_request_parameters";
|
|
77
|
-
ConnectorErrorCodes["InvalidConfig"] = "invalid_config";
|
|
78
|
-
ConnectorErrorCodes["InvalidResponse"] = "invalid_response";
|
|
79
|
-
ConnectorErrorCodes["TemplateNotFound"] = "template_not_found";
|
|
80
|
-
ConnectorErrorCodes["NotImplemented"] = "not_implemented";
|
|
81
|
-
ConnectorErrorCodes["SocialAuthCodeInvalid"] = "social_auth_code_invalid";
|
|
82
|
-
ConnectorErrorCodes["SocialAccessTokenInvalid"] = "social_invalid_access_token";
|
|
83
|
-
ConnectorErrorCodes["SocialIdTokenInvalid"] = "social_invalid_id_token";
|
|
84
|
-
ConnectorErrorCodes["AuthorizationFailed"] = "authorization_failed";
|
|
85
|
-
})(ConnectorErrorCodes = exports.ConnectorErrorCodes || (exports.ConnectorErrorCodes = {}));
|
|
86
|
-
class ConnectorError extends Error {
|
|
87
|
-
constructor(code, data) {
|
|
88
|
-
const message = typeof data === 'string' ? data : 'Connector error occurred.';
|
|
89
|
-
super(message);
|
|
90
|
-
this.code = code;
|
|
91
|
-
this.data = typeof data === 'string' ? { message: data } : data;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.ConnectorError = ConnectorError;
|
|
95
|
-
var MessageTypes;
|
|
96
|
-
(function (MessageTypes) {
|
|
97
|
-
MessageTypes["SignIn"] = "SignIn";
|
|
98
|
-
MessageTypes["Register"] = "Register";
|
|
99
|
-
MessageTypes["ForgotPassword"] = "ForgotPassword";
|
|
100
|
-
MessageTypes["Test"] = "Test";
|
|
101
|
-
})(MessageTypes = exports.MessageTypes || (exports.MessageTypes = {}));
|
|
102
|
-
exports.messageTypesGuard = zod_1.z.nativeEnum(MessageTypes);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
/***/ }),
|
|
106
|
-
|
|
107
|
-
/***/ 8138:
|
|
108
|
-
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
109
|
-
|
|
110
|
-
"use strict";
|
|
111
|
-
|
|
112
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
113
|
-
if (k2 === undefined) k2 = k;
|
|
114
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
115
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
116
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
117
|
-
}
|
|
118
|
-
Object.defineProperty(o, k2, desc);
|
|
119
|
-
}) : (function(o, m, k, k2) {
|
|
120
|
-
if (k2 === undefined) k2 = k;
|
|
121
|
-
o[k2] = m[k];
|
|
122
|
-
}));
|
|
123
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
124
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
125
|
-
};
|
|
126
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
127
|
-
__exportStar(__nccwpck_require__(685), exports);
|
|
24
|
+
__exportStar(__nccwpck_require__(7189), exports);
|
|
128
25
|
|
|
129
26
|
|
|
130
27
|
/***/ }),
|
|
131
28
|
|
|
132
|
-
/***/
|
|
29
|
+
/***/ 9454:
|
|
133
30
|
/***/ ((__unused_webpack_module, exports) => {
|
|
134
31
|
|
|
135
32
|
"use strict";
|
|
@@ -158,7 +55,7 @@ exports.repeat = repeat;
|
|
|
158
55
|
|
|
159
56
|
/***/ }),
|
|
160
57
|
|
|
161
|
-
/***/
|
|
58
|
+
/***/ 8980:
|
|
162
59
|
/***/ ((__unused_webpack_module, exports) => {
|
|
163
60
|
|
|
164
61
|
"use strict";
|
|
@@ -178,7 +75,7 @@ exports.assert = assert;
|
|
|
178
75
|
|
|
179
76
|
/***/ }),
|
|
180
77
|
|
|
181
|
-
/***/
|
|
78
|
+
/***/ 1635:
|
|
182
79
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
183
80
|
|
|
184
81
|
"use strict";
|
|
@@ -188,7 +85,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
188
85
|
};
|
|
189
86
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
190
87
|
exports.hasChineseCharacter = exports.has = exports.notEmpty = exports.notFalsy = exports.isSameArray = void 0;
|
|
191
|
-
const lodash_orderby_1 = __importDefault(__nccwpck_require__(
|
|
88
|
+
const lodash_orderby_1 = __importDefault(__nccwpck_require__(1128));
|
|
192
89
|
const isSameArray = (array1, array2) => {
|
|
193
90
|
if (array1.length !== array2.length) {
|
|
194
91
|
return false;
|
|
@@ -211,14 +108,14 @@ exports.hasChineseCharacter = hasChineseCharacter;
|
|
|
211
108
|
|
|
212
109
|
/***/ }),
|
|
213
110
|
|
|
214
|
-
/***/
|
|
111
|
+
/***/ 9532:
|
|
215
112
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
216
113
|
|
|
217
114
|
"use strict";
|
|
218
115
|
|
|
219
116
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
220
117
|
exports.conditionalString = exports.conditional = exports.nullable = void 0;
|
|
221
|
-
const assertions_1 = __nccwpck_require__(
|
|
118
|
+
const assertions_1 = __nccwpck_require__(1635);
|
|
222
119
|
const nullable = (exp) => ((0, assertions_1.notFalsy)(exp) ? exp : null);
|
|
223
120
|
exports.nullable = nullable;
|
|
224
121
|
const conditional = (exp) => ((0, assertions_1.notFalsy)(exp) ? exp : undefined);
|
|
@@ -229,14 +126,14 @@ exports.conditionalString = conditionalString;
|
|
|
229
126
|
|
|
230
127
|
/***/ }),
|
|
231
128
|
|
|
232
|
-
/***/
|
|
129
|
+
/***/ 316:
|
|
233
130
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
234
131
|
|
|
235
132
|
"use strict";
|
|
236
133
|
|
|
237
134
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
238
135
|
exports.isNode = exports.assertEnv = exports.getEnvAsStringArray = exports.getEnv = void 0;
|
|
239
|
-
const assert_1 = __nccwpck_require__(
|
|
136
|
+
const assert_1 = __nccwpck_require__(8980);
|
|
240
137
|
// Browsers don't have `process`
|
|
241
138
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
242
139
|
const getEnv = (key, fallback = '') => { var _a; return (_a = process === null || process === void 0 ? void 0 : process.env[key]) !== null && _a !== void 0 ? _a : fallback; };
|
|
@@ -266,7 +163,7 @@ exports.isNode = isNode;
|
|
|
266
163
|
|
|
267
164
|
/***/ }),
|
|
268
165
|
|
|
269
|
-
/***/
|
|
166
|
+
/***/ 7189:
|
|
270
167
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
271
168
|
|
|
272
169
|
"use strict";
|
|
@@ -290,21 +187,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
290
187
|
};
|
|
291
188
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
292
189
|
exports.orderBy = void 0;
|
|
293
|
-
__exportStar(__nccwpck_require__(
|
|
294
|
-
__exportStar(__nccwpck_require__(
|
|
295
|
-
__exportStar(__nccwpck_require__(
|
|
296
|
-
__exportStar(__nccwpck_require__(
|
|
297
|
-
__exportStar(__nccwpck_require__(
|
|
298
|
-
__exportStar(__nccwpck_require__(
|
|
299
|
-
__exportStar(__nccwpck_require__(
|
|
300
|
-
__exportStar(__nccwpck_require__(
|
|
301
|
-
var lodash_orderby_1 = __nccwpck_require__(
|
|
190
|
+
__exportStar(__nccwpck_require__(9454), exports);
|
|
191
|
+
__exportStar(__nccwpck_require__(8980), exports);
|
|
192
|
+
__exportStar(__nccwpck_require__(1635), exports);
|
|
193
|
+
__exportStar(__nccwpck_require__(9532), exports);
|
|
194
|
+
__exportStar(__nccwpck_require__(316), exports);
|
|
195
|
+
__exportStar(__nccwpck_require__(4110), exports);
|
|
196
|
+
__exportStar(__nccwpck_require__(2973), exports);
|
|
197
|
+
__exportStar(__nccwpck_require__(5827), exports);
|
|
198
|
+
var lodash_orderby_1 = __nccwpck_require__(1128);
|
|
302
199
|
Object.defineProperty(exports, "orderBy", ({ enumerable: true, get: function () { return __importDefault(lodash_orderby_1).default; } }));
|
|
303
200
|
|
|
304
201
|
|
|
305
202
|
/***/ }),
|
|
306
203
|
|
|
307
|
-
/***/
|
|
204
|
+
/***/ 4110:
|
|
308
205
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
309
206
|
|
|
310
207
|
"use strict";
|
|
@@ -314,8 +211,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
314
211
|
};
|
|
315
212
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
316
213
|
exports.pickState = exports.pick = void 0;
|
|
317
|
-
const lodash_pick_1 = __importDefault(__nccwpck_require__(
|
|
318
|
-
var lodash_pick_2 = __nccwpck_require__(
|
|
214
|
+
const lodash_pick_1 = __importDefault(__nccwpck_require__(9103));
|
|
215
|
+
var lodash_pick_2 = __nccwpck_require__(9103);
|
|
319
216
|
Object.defineProperty(exports, "pick", ({ enumerable: true, get: function () { return __importDefault(lodash_pick_2).default; } }));
|
|
320
217
|
const pickState = (...keys) => (state) => (0, lodash_pick_1.default)(state, ...keys);
|
|
321
218
|
exports.pickState = pickState;
|
|
@@ -323,14 +220,14 @@ exports.pickState = pickState;
|
|
|
323
220
|
|
|
324
221
|
/***/ }),
|
|
325
222
|
|
|
326
|
-
/***/
|
|
223
|
+
/***/ 2973:
|
|
327
224
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
328
225
|
|
|
329
226
|
"use strict";
|
|
330
227
|
|
|
331
228
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
332
229
|
exports.UrlSafeBase64 = exports.toTitle = void 0;
|
|
333
|
-
const env_1 = __nccwpck_require__(
|
|
230
|
+
const env_1 = __nccwpck_require__(316);
|
|
334
231
|
function toTitle(string) {
|
|
335
232
|
if (typeof string !== 'string') {
|
|
336
233
|
throw new TypeError('Expected a string');
|
|
@@ -375,7 +272,7 @@ exports.UrlSafeBase64 = {
|
|
|
375
272
|
|
|
376
273
|
/***/ }),
|
|
377
274
|
|
|
378
|
-
/***/
|
|
275
|
+
/***/ 5827:
|
|
379
276
|
/***/ ((__unused_webpack_module, exports) => {
|
|
380
277
|
|
|
381
278
|
"use strict";
|
|
@@ -386,7 +283,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
386
283
|
|
|
387
284
|
/***/ }),
|
|
388
285
|
|
|
389
|
-
/***/
|
|
286
|
+
/***/ 6198:
|
|
390
287
|
/***/ ((module, exports) => {
|
|
391
288
|
|
|
392
289
|
"use strict";
|
|
@@ -828,13 +725,13 @@ module.exports.assert = exports.assert;
|
|
|
828
725
|
|
|
829
726
|
/***/ }),
|
|
830
727
|
|
|
831
|
-
/***/
|
|
728
|
+
/***/ 3632:
|
|
832
729
|
/***/ ((module, exports, __nccwpck_require__) => {
|
|
833
730
|
|
|
834
731
|
"use strict";
|
|
835
732
|
|
|
836
733
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
837
|
-
const defer_to_connect_1 = __nccwpck_require__(
|
|
734
|
+
const defer_to_connect_1 = __nccwpck_require__(8836);
|
|
838
735
|
const util_1 = __nccwpck_require__(3837);
|
|
839
736
|
const nodejsMajorVersion = Number(process.versions.node.split('.')[0]);
|
|
840
737
|
const timer = (request) => {
|
|
@@ -962,7 +859,7 @@ module.exports["default"] = timer;
|
|
|
962
859
|
|
|
963
860
|
/***/ }),
|
|
964
861
|
|
|
965
|
-
/***/
|
|
862
|
+
/***/ 2074:
|
|
966
863
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
967
864
|
|
|
968
865
|
"use strict";
|
|
@@ -1406,7 +1303,7 @@ module.exports["default"] = CacheableLookup;
|
|
|
1406
1303
|
|
|
1407
1304
|
/***/ }),
|
|
1408
1305
|
|
|
1409
|
-
/***/
|
|
1306
|
+
/***/ 5967:
|
|
1410
1307
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1411
1308
|
|
|
1412
1309
|
"use strict";
|
|
@@ -1414,13 +1311,13 @@ module.exports["default"] = CacheableLookup;
|
|
|
1414
1311
|
|
|
1415
1312
|
const EventEmitter = __nccwpck_require__(2361);
|
|
1416
1313
|
const urlLib = __nccwpck_require__(7310);
|
|
1417
|
-
const normalizeUrl = __nccwpck_require__(
|
|
1418
|
-
const getStream = __nccwpck_require__(
|
|
1419
|
-
const CachePolicy = __nccwpck_require__(
|
|
1420
|
-
const Response = __nccwpck_require__(
|
|
1421
|
-
const lowercaseKeys = __nccwpck_require__(
|
|
1422
|
-
const cloneResponse = __nccwpck_require__(
|
|
1423
|
-
const Keyv = __nccwpck_require__(
|
|
1314
|
+
const normalizeUrl = __nccwpck_require__(5797);
|
|
1315
|
+
const getStream = __nccwpck_require__(3421);
|
|
1316
|
+
const CachePolicy = __nccwpck_require__(8412);
|
|
1317
|
+
const Response = __nccwpck_require__(4404);
|
|
1318
|
+
const lowercaseKeys = __nccwpck_require__(2893);
|
|
1319
|
+
const cloneResponse = __nccwpck_require__(6592);
|
|
1320
|
+
const Keyv = __nccwpck_require__(6474);
|
|
1424
1321
|
|
|
1425
1322
|
class CacheableRequest {
|
|
1426
1323
|
constructor(request, cacheAdapter) {
|
|
@@ -1665,14 +1562,14 @@ module.exports = CacheableRequest;
|
|
|
1665
1562
|
|
|
1666
1563
|
/***/ }),
|
|
1667
1564
|
|
|
1668
|
-
/***/
|
|
1565
|
+
/***/ 6592:
|
|
1669
1566
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1670
1567
|
|
|
1671
1568
|
"use strict";
|
|
1672
1569
|
|
|
1673
1570
|
|
|
1674
1571
|
const PassThrough = (__nccwpck_require__(2781).PassThrough);
|
|
1675
|
-
const mimicResponse = __nccwpck_require__(
|
|
1572
|
+
const mimicResponse = __nccwpck_require__(7642);
|
|
1676
1573
|
|
|
1677
1574
|
const cloneResponse = response => {
|
|
1678
1575
|
if (!(response && response.pipe)) {
|
|
@@ -1690,17 +1587,17 @@ module.exports = cloneResponse;
|
|
|
1690
1587
|
|
|
1691
1588
|
/***/ }),
|
|
1692
1589
|
|
|
1693
|
-
/***/
|
|
1590
|
+
/***/ 996:
|
|
1694
1591
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1695
1592
|
|
|
1696
1593
|
"use strict";
|
|
1697
1594
|
|
|
1698
1595
|
|
|
1699
1596
|
const { promisify } = __nccwpck_require__(3837)
|
|
1700
|
-
const JSONB = __nccwpck_require__(
|
|
1597
|
+
const JSONB = __nccwpck_require__(3180)
|
|
1701
1598
|
const zlib = __nccwpck_require__(9796)
|
|
1702
1599
|
|
|
1703
|
-
const mergeOptions = __nccwpck_require__(
|
|
1600
|
+
const mergeOptions = __nccwpck_require__(8672)
|
|
1704
1601
|
|
|
1705
1602
|
const compress = promisify(zlib.brotliCompress)
|
|
1706
1603
|
|
|
@@ -1743,7 +1640,7 @@ module.exports.parse = JSONB.parse
|
|
|
1743
1640
|
|
|
1744
1641
|
/***/ }),
|
|
1745
1642
|
|
|
1746
|
-
/***/
|
|
1643
|
+
/***/ 8672:
|
|
1747
1644
|
/***/ ((module) => {
|
|
1748
1645
|
|
|
1749
1646
|
"use strict";
|
|
@@ -1769,14 +1666,14 @@ module.exports = (defaultOptions = {}, options = {}) => {
|
|
|
1769
1666
|
|
|
1770
1667
|
/***/ }),
|
|
1771
1668
|
|
|
1772
|
-
/***/
|
|
1669
|
+
/***/ 1331:
|
|
1773
1670
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1774
1671
|
|
|
1775
1672
|
"use strict";
|
|
1776
1673
|
|
|
1777
1674
|
const {Transform, PassThrough} = __nccwpck_require__(2781);
|
|
1778
1675
|
const zlib = __nccwpck_require__(9796);
|
|
1779
|
-
const mimicResponse = __nccwpck_require__(
|
|
1676
|
+
const mimicResponse = __nccwpck_require__(9443);
|
|
1780
1677
|
|
|
1781
1678
|
module.exports = response => {
|
|
1782
1679
|
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
|
|
@@ -1835,7 +1732,7 @@ module.exports = response => {
|
|
|
1835
1732
|
|
|
1836
1733
|
/***/ }),
|
|
1837
1734
|
|
|
1838
|
-
/***/
|
|
1735
|
+
/***/ 8836:
|
|
1839
1736
|
/***/ ((module, exports) => {
|
|
1840
1737
|
|
|
1841
1738
|
"use strict";
|
|
@@ -1890,10 +1787,10 @@ module.exports["default"] = deferToConnect;
|
|
|
1890
1787
|
|
|
1891
1788
|
/***/ }),
|
|
1892
1789
|
|
|
1893
|
-
/***/
|
|
1790
|
+
/***/ 1243:
|
|
1894
1791
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1895
1792
|
|
|
1896
|
-
var once = __nccwpck_require__(
|
|
1793
|
+
var once = __nccwpck_require__(2469);
|
|
1897
1794
|
|
|
1898
1795
|
var noop = function() {};
|
|
1899
1796
|
|
|
@@ -1991,7 +1888,7 @@ module.exports = eos;
|
|
|
1991
1888
|
|
|
1992
1889
|
/***/ }),
|
|
1993
1890
|
|
|
1994
|
-
/***/
|
|
1891
|
+
/***/ 6957:
|
|
1995
1892
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1996
1893
|
|
|
1997
1894
|
"use strict";
|
|
@@ -2051,14 +1948,14 @@ module.exports = options => {
|
|
|
2051
1948
|
|
|
2052
1949
|
/***/ }),
|
|
2053
1950
|
|
|
2054
|
-
/***/
|
|
1951
|
+
/***/ 3421:
|
|
2055
1952
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2056
1953
|
|
|
2057
1954
|
"use strict";
|
|
2058
1955
|
|
|
2059
1956
|
const {constants: BufferConstants} = __nccwpck_require__(4300);
|
|
2060
|
-
const pump = __nccwpck_require__(
|
|
2061
|
-
const bufferStream = __nccwpck_require__(
|
|
1957
|
+
const pump = __nccwpck_require__(1216);
|
|
1958
|
+
const bufferStream = __nccwpck_require__(6957);
|
|
2062
1959
|
|
|
2063
1960
|
class MaxBufferError extends Error {
|
|
2064
1961
|
constructor() {
|
|
@@ -2119,13 +2016,13 @@ module.exports.MaxBufferError = MaxBufferError;
|
|
|
2119
2016
|
|
|
2120
2017
|
/***/ }),
|
|
2121
2018
|
|
|
2122
|
-
/***/
|
|
2019
|
+
/***/ 4827:
|
|
2123
2020
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2124
2021
|
|
|
2125
2022
|
"use strict";
|
|
2126
2023
|
|
|
2127
2024
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2128
|
-
const types_1 = __nccwpck_require__(
|
|
2025
|
+
const types_1 = __nccwpck_require__(2554);
|
|
2129
2026
|
function createRejection(error, ...beforeErrorGroups) {
|
|
2130
2027
|
const promise = (async () => {
|
|
2131
2028
|
if (error instanceof types_1.RequestError) {
|
|
@@ -2157,7 +2054,7 @@ exports["default"] = createRejection;
|
|
|
2157
2054
|
|
|
2158
2055
|
/***/ }),
|
|
2159
2056
|
|
|
2160
|
-
/***/
|
|
2057
|
+
/***/ 6894:
|
|
2161
2058
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
2162
2059
|
|
|
2163
2060
|
"use strict";
|
|
@@ -2174,14 +2071,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
2174
2071
|
};
|
|
2175
2072
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2176
2073
|
const events_1 = __nccwpck_require__(2361);
|
|
2177
|
-
const is_1 = __nccwpck_require__(
|
|
2178
|
-
const PCancelable = __nccwpck_require__(
|
|
2179
|
-
const types_1 = __nccwpck_require__(
|
|
2180
|
-
const parse_body_1 = __nccwpck_require__(
|
|
2181
|
-
const core_1 = __nccwpck_require__(
|
|
2182
|
-
const proxy_events_1 = __nccwpck_require__(
|
|
2183
|
-
const get_buffer_1 = __nccwpck_require__(
|
|
2184
|
-
const is_response_ok_1 = __nccwpck_require__(
|
|
2074
|
+
const is_1 = __nccwpck_require__(6198);
|
|
2075
|
+
const PCancelable = __nccwpck_require__(5323);
|
|
2076
|
+
const types_1 = __nccwpck_require__(2554);
|
|
2077
|
+
const parse_body_1 = __nccwpck_require__(3544);
|
|
2078
|
+
const core_1 = __nccwpck_require__(8525);
|
|
2079
|
+
const proxy_events_1 = __nccwpck_require__(8423);
|
|
2080
|
+
const get_buffer_1 = __nccwpck_require__(5444);
|
|
2081
|
+
const is_response_ok_1 = __nccwpck_require__(3117);
|
|
2185
2082
|
const proxiedRequestEvents = [
|
|
2186
2083
|
'request',
|
|
2187
2084
|
'response',
|
|
@@ -2335,18 +2232,18 @@ function asPromise(normalizedOptions) {
|
|
|
2335
2232
|
return promise;
|
|
2336
2233
|
}
|
|
2337
2234
|
exports["default"] = asPromise;
|
|
2338
|
-
__exportStar(__nccwpck_require__(
|
|
2235
|
+
__exportStar(__nccwpck_require__(2554), exports);
|
|
2339
2236
|
|
|
2340
2237
|
|
|
2341
2238
|
/***/ }),
|
|
2342
2239
|
|
|
2343
|
-
/***/
|
|
2240
|
+
/***/ 5040:
|
|
2344
2241
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2345
2242
|
|
|
2346
2243
|
"use strict";
|
|
2347
2244
|
|
|
2348
2245
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2349
|
-
const is_1 = __nccwpck_require__(
|
|
2246
|
+
const is_1 = __nccwpck_require__(6198);
|
|
2350
2247
|
const normalizeArguments = (options, defaults) => {
|
|
2351
2248
|
if (is_1.default.null_(options.encoding)) {
|
|
2352
2249
|
throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead');
|
|
@@ -2426,13 +2323,13 @@ exports["default"] = normalizeArguments;
|
|
|
2426
2323
|
|
|
2427
2324
|
/***/ }),
|
|
2428
2325
|
|
|
2429
|
-
/***/
|
|
2326
|
+
/***/ 3544:
|
|
2430
2327
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2431
2328
|
|
|
2432
2329
|
"use strict";
|
|
2433
2330
|
|
|
2434
2331
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2435
|
-
const types_1 = __nccwpck_require__(
|
|
2332
|
+
const types_1 = __nccwpck_require__(2554);
|
|
2436
2333
|
const parseBody = (response, responseType, parseJson, encoding) => {
|
|
2437
2334
|
const { rawBody } = response;
|
|
2438
2335
|
try {
|
|
@@ -2459,7 +2356,7 @@ exports["default"] = parseBody;
|
|
|
2459
2356
|
|
|
2460
2357
|
/***/ }),
|
|
2461
2358
|
|
|
2462
|
-
/***/
|
|
2359
|
+
/***/ 2554:
|
|
2463
2360
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
2464
2361
|
|
|
2465
2362
|
"use strict";
|
|
@@ -2476,7 +2373,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
2476
2373
|
};
|
|
2477
2374
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2478
2375
|
exports.CancelError = exports.ParseError = void 0;
|
|
2479
|
-
const core_1 = __nccwpck_require__(
|
|
2376
|
+
const core_1 = __nccwpck_require__(8525);
|
|
2480
2377
|
/**
|
|
2481
2378
|
An error to be thrown when server response code is 2xx, and parsing body fails.
|
|
2482
2379
|
Includes a `response` property.
|
|
@@ -2504,12 +2401,12 @@ class CancelError extends core_1.RequestError {
|
|
|
2504
2401
|
}
|
|
2505
2402
|
}
|
|
2506
2403
|
exports.CancelError = CancelError;
|
|
2507
|
-
__exportStar(__nccwpck_require__(
|
|
2404
|
+
__exportStar(__nccwpck_require__(8525), exports);
|
|
2508
2405
|
|
|
2509
2406
|
|
|
2510
2407
|
/***/ }),
|
|
2511
2408
|
|
|
2512
|
-
/***/
|
|
2409
|
+
/***/ 9388:
|
|
2513
2410
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2514
2411
|
|
|
2515
2412
|
"use strict";
|
|
@@ -2546,7 +2443,7 @@ exports["default"] = calculateRetryDelay;
|
|
|
2546
2443
|
|
|
2547
2444
|
/***/ }),
|
|
2548
2445
|
|
|
2549
|
-
/***/
|
|
2446
|
+
/***/ 8525:
|
|
2550
2447
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2551
2448
|
|
|
2552
2449
|
"use strict";
|
|
@@ -2560,27 +2457,27 @@ const url_1 = __nccwpck_require__(7310);
|
|
|
2560
2457
|
const http = __nccwpck_require__(3685);
|
|
2561
2458
|
const http_1 = __nccwpck_require__(3685);
|
|
2562
2459
|
const https = __nccwpck_require__(5687);
|
|
2563
|
-
const http_timer_1 = __nccwpck_require__(
|
|
2564
|
-
const cacheable_lookup_1 = __nccwpck_require__(
|
|
2565
|
-
const CacheableRequest = __nccwpck_require__(
|
|
2566
|
-
const decompressResponse = __nccwpck_require__(
|
|
2460
|
+
const http_timer_1 = __nccwpck_require__(3632);
|
|
2461
|
+
const cacheable_lookup_1 = __nccwpck_require__(2074);
|
|
2462
|
+
const CacheableRequest = __nccwpck_require__(5967);
|
|
2463
|
+
const decompressResponse = __nccwpck_require__(1331);
|
|
2567
2464
|
// @ts-expect-error Missing types
|
|
2568
|
-
const http2wrapper = __nccwpck_require__(
|
|
2569
|
-
const lowercaseKeys = __nccwpck_require__(
|
|
2570
|
-
const is_1 = __nccwpck_require__(
|
|
2571
|
-
const get_body_size_1 = __nccwpck_require__(
|
|
2572
|
-
const is_form_data_1 = __nccwpck_require__(
|
|
2573
|
-
const proxy_events_1 = __nccwpck_require__(
|
|
2574
|
-
const timed_out_1 = __nccwpck_require__(
|
|
2575
|
-
const url_to_options_1 = __nccwpck_require__(
|
|
2576
|
-
const options_to_url_1 = __nccwpck_require__(
|
|
2577
|
-
const weakable_map_1 = __nccwpck_require__(
|
|
2578
|
-
const get_buffer_1 = __nccwpck_require__(
|
|
2579
|
-
const dns_ip_version_1 = __nccwpck_require__(
|
|
2580
|
-
const is_response_ok_1 = __nccwpck_require__(
|
|
2581
|
-
const deprecation_warning_1 = __nccwpck_require__(
|
|
2582
|
-
const normalize_arguments_1 = __nccwpck_require__(
|
|
2583
|
-
const calculate_retry_delay_1 = __nccwpck_require__(
|
|
2465
|
+
const http2wrapper = __nccwpck_require__(739);
|
|
2466
|
+
const lowercaseKeys = __nccwpck_require__(2893);
|
|
2467
|
+
const is_1 = __nccwpck_require__(6198);
|
|
2468
|
+
const get_body_size_1 = __nccwpck_require__(7408);
|
|
2469
|
+
const is_form_data_1 = __nccwpck_require__(9502);
|
|
2470
|
+
const proxy_events_1 = __nccwpck_require__(8423);
|
|
2471
|
+
const timed_out_1 = __nccwpck_require__(6843);
|
|
2472
|
+
const url_to_options_1 = __nccwpck_require__(4003);
|
|
2473
|
+
const options_to_url_1 = __nccwpck_require__(8124);
|
|
2474
|
+
const weakable_map_1 = __nccwpck_require__(7849);
|
|
2475
|
+
const get_buffer_1 = __nccwpck_require__(5444);
|
|
2476
|
+
const dns_ip_version_1 = __nccwpck_require__(4254);
|
|
2477
|
+
const is_response_ok_1 = __nccwpck_require__(3117);
|
|
2478
|
+
const deprecation_warning_1 = __nccwpck_require__(5531);
|
|
2479
|
+
const normalize_arguments_1 = __nccwpck_require__(5040);
|
|
2480
|
+
const calculate_retry_delay_1 = __nccwpck_require__(9388);
|
|
2584
2481
|
let globalDnsCache;
|
|
2585
2482
|
const kRequest = Symbol('request');
|
|
2586
2483
|
const kResponse = Symbol('response');
|
|
@@ -4059,7 +3956,7 @@ exports["default"] = Request;
|
|
|
4059
3956
|
|
|
4060
3957
|
/***/ }),
|
|
4061
3958
|
|
|
4062
|
-
/***/
|
|
3959
|
+
/***/ 4254:
|
|
4063
3960
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4064
3961
|
|
|
4065
3962
|
"use strict";
|
|
@@ -4084,7 +3981,7 @@ exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => {
|
|
|
4084
3981
|
|
|
4085
3982
|
/***/ }),
|
|
4086
3983
|
|
|
4087
|
-
/***/
|
|
3984
|
+
/***/ 7408:
|
|
4088
3985
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4089
3986
|
|
|
4090
3987
|
"use strict";
|
|
@@ -4092,8 +3989,8 @@ exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => {
|
|
|
4092
3989
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4093
3990
|
const fs_1 = __nccwpck_require__(7147);
|
|
4094
3991
|
const util_1 = __nccwpck_require__(3837);
|
|
4095
|
-
const is_1 = __nccwpck_require__(
|
|
4096
|
-
const is_form_data_1 = __nccwpck_require__(
|
|
3992
|
+
const is_1 = __nccwpck_require__(6198);
|
|
3993
|
+
const is_form_data_1 = __nccwpck_require__(9502);
|
|
4097
3994
|
const statAsync = util_1.promisify(fs_1.stat);
|
|
4098
3995
|
exports["default"] = async (body, headers) => {
|
|
4099
3996
|
if (headers && 'content-length' in headers) {
|
|
@@ -4124,7 +4021,7 @@ exports["default"] = async (body, headers) => {
|
|
|
4124
4021
|
|
|
4125
4022
|
/***/ }),
|
|
4126
4023
|
|
|
4127
|
-
/***/
|
|
4024
|
+
/***/ 5444:
|
|
4128
4025
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4129
4026
|
|
|
4130
4027
|
"use strict";
|
|
@@ -4148,19 +4045,19 @@ exports["default"] = getBuffer;
|
|
|
4148
4045
|
|
|
4149
4046
|
/***/ }),
|
|
4150
4047
|
|
|
4151
|
-
/***/
|
|
4048
|
+
/***/ 9502:
|
|
4152
4049
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4153
4050
|
|
|
4154
4051
|
"use strict";
|
|
4155
4052
|
|
|
4156
4053
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4157
|
-
const is_1 = __nccwpck_require__(
|
|
4054
|
+
const is_1 = __nccwpck_require__(6198);
|
|
4158
4055
|
exports["default"] = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary);
|
|
4159
4056
|
|
|
4160
4057
|
|
|
4161
4058
|
/***/ }),
|
|
4162
4059
|
|
|
4163
|
-
/***/
|
|
4060
|
+
/***/ 3117:
|
|
4164
4061
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4165
4062
|
|
|
4166
4063
|
"use strict";
|
|
@@ -4176,7 +4073,7 @@ exports.isResponseOk = (response) => {
|
|
|
4176
4073
|
|
|
4177
4074
|
/***/ }),
|
|
4178
4075
|
|
|
4179
|
-
/***/
|
|
4076
|
+
/***/ 8124:
|
|
4180
4077
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4181
4078
|
|
|
4182
4079
|
"use strict";
|
|
@@ -4237,7 +4134,7 @@ exports["default"] = (origin, options) => {
|
|
|
4237
4134
|
|
|
4238
4135
|
/***/ }),
|
|
4239
4136
|
|
|
4240
|
-
/***/
|
|
4137
|
+
/***/ 8423:
|
|
4241
4138
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4242
4139
|
|
|
4243
4140
|
"use strict";
|
|
@@ -4262,7 +4159,7 @@ exports["default"] = default_1;
|
|
|
4262
4159
|
|
|
4263
4160
|
/***/ }),
|
|
4264
4161
|
|
|
4265
|
-
/***/
|
|
4162
|
+
/***/ 6843:
|
|
4266
4163
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4267
4164
|
|
|
4268
4165
|
"use strict";
|
|
@@ -4270,7 +4167,7 @@ exports["default"] = default_1;
|
|
|
4270
4167
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4271
4168
|
exports.TimeoutError = void 0;
|
|
4272
4169
|
const net = __nccwpck_require__(1808);
|
|
4273
|
-
const unhandle_1 = __nccwpck_require__(
|
|
4170
|
+
const unhandle_1 = __nccwpck_require__(6922);
|
|
4274
4171
|
const reentry = Symbol('reentry');
|
|
4275
4172
|
const noop = () => { };
|
|
4276
4173
|
class TimeoutError extends Error {
|
|
@@ -4391,7 +4288,7 @@ exports["default"] = (request, delays, options) => {
|
|
|
4391
4288
|
|
|
4392
4289
|
/***/ }),
|
|
4393
4290
|
|
|
4394
|
-
/***/
|
|
4291
|
+
/***/ 6922:
|
|
4395
4292
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4396
4293
|
|
|
4397
4294
|
"use strict";
|
|
@@ -4421,13 +4318,13 @@ exports["default"] = () => {
|
|
|
4421
4318
|
|
|
4422
4319
|
/***/ }),
|
|
4423
4320
|
|
|
4424
|
-
/***/
|
|
4321
|
+
/***/ 4003:
|
|
4425
4322
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4426
4323
|
|
|
4427
4324
|
"use strict";
|
|
4428
4325
|
|
|
4429
4326
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4430
|
-
const is_1 = __nccwpck_require__(
|
|
4327
|
+
const is_1 = __nccwpck_require__(6198);
|
|
4431
4328
|
exports["default"] = (url) => {
|
|
4432
4329
|
// Cast to URL
|
|
4433
4330
|
url = url;
|
|
@@ -4453,7 +4350,7 @@ exports["default"] = (url) => {
|
|
|
4453
4350
|
|
|
4454
4351
|
/***/ }),
|
|
4455
4352
|
|
|
4456
|
-
/***/
|
|
4353
|
+
/***/ 7849:
|
|
4457
4354
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4458
4355
|
|
|
4459
4356
|
"use strict";
|
|
@@ -4490,7 +4387,7 @@ exports["default"] = WeakableMap;
|
|
|
4490
4387
|
|
|
4491
4388
|
/***/ }),
|
|
4492
4389
|
|
|
4493
|
-
/***/
|
|
4390
|
+
/***/ 9162:
|
|
4494
4391
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
4495
4392
|
|
|
4496
4393
|
"use strict";
|
|
@@ -4507,11 +4404,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
4507
4404
|
};
|
|
4508
4405
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4509
4406
|
exports.defaultHandler = void 0;
|
|
4510
|
-
const is_1 = __nccwpck_require__(
|
|
4511
|
-
const as_promise_1 = __nccwpck_require__(
|
|
4512
|
-
const create_rejection_1 = __nccwpck_require__(
|
|
4513
|
-
const core_1 = __nccwpck_require__(
|
|
4514
|
-
const deep_freeze_1 = __nccwpck_require__(
|
|
4407
|
+
const is_1 = __nccwpck_require__(6198);
|
|
4408
|
+
const as_promise_1 = __nccwpck_require__(6894);
|
|
4409
|
+
const create_rejection_1 = __nccwpck_require__(4827);
|
|
4410
|
+
const core_1 = __nccwpck_require__(8525);
|
|
4411
|
+
const deep_freeze_1 = __nccwpck_require__(2982);
|
|
4515
4412
|
const errors = {
|
|
4516
4413
|
RequestError: as_promise_1.RequestError,
|
|
4517
4414
|
CacheError: as_promise_1.CacheError,
|
|
@@ -4733,12 +4630,12 @@ const create = (defaults) => {
|
|
|
4733
4630
|
return got;
|
|
4734
4631
|
};
|
|
4735
4632
|
exports["default"] = create;
|
|
4736
|
-
__exportStar(__nccwpck_require__(
|
|
4633
|
+
__exportStar(__nccwpck_require__(9239), exports);
|
|
4737
4634
|
|
|
4738
4635
|
|
|
4739
4636
|
/***/ }),
|
|
4740
4637
|
|
|
4741
|
-
/***/
|
|
4638
|
+
/***/ 9235:
|
|
4742
4639
|
/***/ (function(module, exports, __nccwpck_require__) {
|
|
4743
4640
|
|
|
4744
4641
|
"use strict";
|
|
@@ -4755,7 +4652,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
4755
4652
|
};
|
|
4756
4653
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4757
4654
|
const url_1 = __nccwpck_require__(7310);
|
|
4758
|
-
const create_1 = __nccwpck_require__(
|
|
4655
|
+
const create_1 = __nccwpck_require__(9162);
|
|
4759
4656
|
const defaults = {
|
|
4760
4657
|
options: {
|
|
4761
4658
|
method: 'GET',
|
|
@@ -4872,13 +4769,13 @@ exports["default"] = got;
|
|
|
4872
4769
|
module.exports = got;
|
|
4873
4770
|
module.exports["default"] = got;
|
|
4874
4771
|
module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267
|
|
4875
|
-
__exportStar(__nccwpck_require__(
|
|
4876
|
-
__exportStar(__nccwpck_require__(
|
|
4772
|
+
__exportStar(__nccwpck_require__(9162), exports);
|
|
4773
|
+
__exportStar(__nccwpck_require__(6894), exports);
|
|
4877
4774
|
|
|
4878
4775
|
|
|
4879
4776
|
/***/ }),
|
|
4880
4777
|
|
|
4881
|
-
/***/
|
|
4778
|
+
/***/ 9239:
|
|
4882
4779
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4883
4780
|
|
|
4884
4781
|
"use strict";
|
|
@@ -4888,13 +4785,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
4888
4785
|
|
|
4889
4786
|
/***/ }),
|
|
4890
4787
|
|
|
4891
|
-
/***/
|
|
4788
|
+
/***/ 2982:
|
|
4892
4789
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4893
4790
|
|
|
4894
4791
|
"use strict";
|
|
4895
4792
|
|
|
4896
4793
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4897
|
-
const is_1 = __nccwpck_require__(
|
|
4794
|
+
const is_1 = __nccwpck_require__(6198);
|
|
4898
4795
|
function deepFreeze(object) {
|
|
4899
4796
|
for (const value of Object.values(object)) {
|
|
4900
4797
|
if (is_1.default.plainObject(value) || is_1.default.array(value)) {
|
|
@@ -4908,7 +4805,7 @@ exports["default"] = deepFreeze;
|
|
|
4908
4805
|
|
|
4909
4806
|
/***/ }),
|
|
4910
4807
|
|
|
4911
|
-
/***/
|
|
4808
|
+
/***/ 5531:
|
|
4912
4809
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4913
4810
|
|
|
4914
4811
|
"use strict";
|
|
@@ -4929,7 +4826,7 @@ exports["default"] = (message) => {
|
|
|
4929
4826
|
|
|
4930
4827
|
/***/ }),
|
|
4931
4828
|
|
|
4932
|
-
/***/
|
|
4829
|
+
/***/ 8412:
|
|
4933
4830
|
/***/ ((module) => {
|
|
4934
4831
|
|
|
4935
4832
|
"use strict";
|
|
@@ -5610,15 +5507,15 @@ module.exports = class CachePolicy {
|
|
|
5610
5507
|
|
|
5611
5508
|
/***/ }),
|
|
5612
5509
|
|
|
5613
|
-
/***/
|
|
5510
|
+
/***/ 6495:
|
|
5614
5511
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5615
5512
|
|
|
5616
5513
|
"use strict";
|
|
5617
5514
|
|
|
5618
5515
|
const EventEmitter = __nccwpck_require__(2361);
|
|
5619
|
-
const tls = __nccwpck_require__(
|
|
5516
|
+
const tls = __nccwpck_require__(6821);
|
|
5620
5517
|
const http2 = __nccwpck_require__(5158);
|
|
5621
|
-
const QuickLRU = __nccwpck_require__(
|
|
5518
|
+
const QuickLRU = __nccwpck_require__(4225);
|
|
5622
5519
|
|
|
5623
5520
|
const kCurrentStreamsCount = Symbol('currentStreamsCount');
|
|
5624
5521
|
const kRequest = Symbol('request');
|
|
@@ -6288,18 +6185,18 @@ module.exports = {
|
|
|
6288
6185
|
|
|
6289
6186
|
/***/ }),
|
|
6290
6187
|
|
|
6291
|
-
/***/
|
|
6188
|
+
/***/ 229:
|
|
6292
6189
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6293
6190
|
|
|
6294
6191
|
"use strict";
|
|
6295
6192
|
|
|
6296
6193
|
const http = __nccwpck_require__(3685);
|
|
6297
6194
|
const https = __nccwpck_require__(5687);
|
|
6298
|
-
const resolveALPN = __nccwpck_require__(
|
|
6299
|
-
const QuickLRU = __nccwpck_require__(
|
|
6300
|
-
const Http2ClientRequest = __nccwpck_require__(
|
|
6301
|
-
const calculateServerName = __nccwpck_require__(
|
|
6302
|
-
const urlToOptions = __nccwpck_require__(
|
|
6195
|
+
const resolveALPN = __nccwpck_require__(6354);
|
|
6196
|
+
const QuickLRU = __nccwpck_require__(4225);
|
|
6197
|
+
const Http2ClientRequest = __nccwpck_require__(3674);
|
|
6198
|
+
const calculateServerName = __nccwpck_require__(5502);
|
|
6199
|
+
const urlToOptions = __nccwpck_require__(5142);
|
|
6303
6200
|
|
|
6304
6201
|
const cache = new QuickLRU({maxSize: 100});
|
|
6305
6202
|
const queue = new Map();
|
|
@@ -6445,18 +6342,18 @@ module.exports.protocolCache = cache;
|
|
|
6445
6342
|
|
|
6446
6343
|
/***/ }),
|
|
6447
6344
|
|
|
6448
|
-
/***/
|
|
6345
|
+
/***/ 3674:
|
|
6449
6346
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6450
6347
|
|
|
6451
6348
|
"use strict";
|
|
6452
6349
|
|
|
6453
6350
|
const http2 = __nccwpck_require__(5158);
|
|
6454
6351
|
const {Writable} = __nccwpck_require__(2781);
|
|
6455
|
-
const {Agent, globalAgent} = __nccwpck_require__(
|
|
6456
|
-
const IncomingMessage = __nccwpck_require__(
|
|
6457
|
-
const urlToOptions = __nccwpck_require__(
|
|
6458
|
-
const proxyEvents = __nccwpck_require__(
|
|
6459
|
-
const isRequestPseudoHeader = __nccwpck_require__(
|
|
6352
|
+
const {Agent, globalAgent} = __nccwpck_require__(6495);
|
|
6353
|
+
const IncomingMessage = __nccwpck_require__(6877);
|
|
6354
|
+
const urlToOptions = __nccwpck_require__(5142);
|
|
6355
|
+
const proxyEvents = __nccwpck_require__(6993);
|
|
6356
|
+
const isRequestPseudoHeader = __nccwpck_require__(7708);
|
|
6460
6357
|
const {
|
|
6461
6358
|
ERR_INVALID_ARG_TYPE,
|
|
6462
6359
|
ERR_INVALID_PROTOCOL,
|
|
@@ -6464,7 +6361,7 @@ const {
|
|
|
6464
6361
|
ERR_INVALID_HTTP_TOKEN,
|
|
6465
6362
|
ERR_HTTP_INVALID_HEADER_VALUE,
|
|
6466
6363
|
ERR_INVALID_CHAR
|
|
6467
|
-
} = __nccwpck_require__(
|
|
6364
|
+
} = __nccwpck_require__(3223);
|
|
6468
6365
|
|
|
6469
6366
|
const {
|
|
6470
6367
|
HTTP2_HEADER_STATUS,
|
|
@@ -6898,7 +6795,7 @@ module.exports = ClientRequest;
|
|
|
6898
6795
|
|
|
6899
6796
|
/***/ }),
|
|
6900
6797
|
|
|
6901
|
-
/***/
|
|
6798
|
+
/***/ 6877:
|
|
6902
6799
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6903
6800
|
|
|
6904
6801
|
"use strict";
|
|
@@ -6964,16 +6861,16 @@ module.exports = IncomingMessage;
|
|
|
6964
6861
|
|
|
6965
6862
|
/***/ }),
|
|
6966
6863
|
|
|
6967
|
-
/***/
|
|
6864
|
+
/***/ 739:
|
|
6968
6865
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6969
6866
|
|
|
6970
6867
|
"use strict";
|
|
6971
6868
|
|
|
6972
6869
|
const http2 = __nccwpck_require__(5158);
|
|
6973
|
-
const agent = __nccwpck_require__(
|
|
6974
|
-
const ClientRequest = __nccwpck_require__(
|
|
6975
|
-
const IncomingMessage = __nccwpck_require__(
|
|
6976
|
-
const auto = __nccwpck_require__(
|
|
6870
|
+
const agent = __nccwpck_require__(6495);
|
|
6871
|
+
const ClientRequest = __nccwpck_require__(3674);
|
|
6872
|
+
const IncomingMessage = __nccwpck_require__(6877);
|
|
6873
|
+
const auto = __nccwpck_require__(229);
|
|
6977
6874
|
|
|
6978
6875
|
const request = (url, options, callback) => {
|
|
6979
6876
|
return new ClientRequest(url, options, callback);
|
|
@@ -7000,7 +6897,7 @@ module.exports = {
|
|
|
7000
6897
|
|
|
7001
6898
|
/***/ }),
|
|
7002
6899
|
|
|
7003
|
-
/***/
|
|
6900
|
+
/***/ 5502:
|
|
7004
6901
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7005
6902
|
|
|
7006
6903
|
"use strict";
|
|
@@ -7035,7 +6932,7 @@ module.exports = options => {
|
|
|
7035
6932
|
|
|
7036
6933
|
/***/ }),
|
|
7037
6934
|
|
|
7038
|
-
/***/
|
|
6935
|
+
/***/ 3223:
|
|
7039
6936
|
/***/ ((module) => {
|
|
7040
6937
|
|
|
7041
6938
|
"use strict";
|
|
@@ -7088,7 +6985,7 @@ makeError(TypeError, 'ERR_INVALID_CHAR', args => {
|
|
|
7088
6985
|
|
|
7089
6986
|
/***/ }),
|
|
7090
6987
|
|
|
7091
|
-
/***/
|
|
6988
|
+
/***/ 7708:
|
|
7092
6989
|
/***/ ((module) => {
|
|
7093
6990
|
|
|
7094
6991
|
"use strict";
|
|
@@ -7109,7 +7006,7 @@ module.exports = header => {
|
|
|
7109
7006
|
|
|
7110
7007
|
/***/ }),
|
|
7111
7008
|
|
|
7112
|
-
/***/
|
|
7009
|
+
/***/ 6993:
|
|
7113
7010
|
/***/ ((module) => {
|
|
7114
7011
|
|
|
7115
7012
|
"use strict";
|
|
@@ -7124,7 +7021,7 @@ module.exports = (from, to, events) => {
|
|
|
7124
7021
|
|
|
7125
7022
|
/***/ }),
|
|
7126
7023
|
|
|
7127
|
-
/***/
|
|
7024
|
+
/***/ 5142:
|
|
7128
7025
|
/***/ ((module) => {
|
|
7129
7026
|
|
|
7130
7027
|
"use strict";
|
|
@@ -7157,7 +7054,7 @@ module.exports = url => {
|
|
|
7157
7054
|
|
|
7158
7055
|
/***/ }),
|
|
7159
7056
|
|
|
7160
|
-
/***/
|
|
7057
|
+
/***/ 3180:
|
|
7161
7058
|
/***/ ((__unused_webpack_module, exports) => {
|
|
7162
7059
|
|
|
7163
7060
|
//TODO: handle reviver/dehydrate function like normal
|
|
@@ -7222,15 +7119,15 @@ exports.parse = function (s) {
|
|
|
7222
7119
|
|
|
7223
7120
|
/***/ }),
|
|
7224
7121
|
|
|
7225
|
-
/***/
|
|
7122
|
+
/***/ 6474:
|
|
7226
7123
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7227
7124
|
|
|
7228
7125
|
"use strict";
|
|
7229
7126
|
|
|
7230
7127
|
|
|
7231
7128
|
const EventEmitter = __nccwpck_require__(2361);
|
|
7232
|
-
const JSONB = __nccwpck_require__(
|
|
7233
|
-
const compressBrotli = __nccwpck_require__(
|
|
7129
|
+
const JSONB = __nccwpck_require__(3180);
|
|
7130
|
+
const compressBrotli = __nccwpck_require__(996);
|
|
7234
7131
|
|
|
7235
7132
|
const loadStore = options => {
|
|
7236
7133
|
const adapters = {
|
|
@@ -7498,7 +7395,7 @@ module.exports = Keyv;
|
|
|
7498
7395
|
|
|
7499
7396
|
/***/ }),
|
|
7500
7397
|
|
|
7501
|
-
/***/
|
|
7398
|
+
/***/ 1128:
|
|
7502
7399
|
/***/ ((module, exports, __nccwpck_require__) => {
|
|
7503
7400
|
|
|
7504
7401
|
/* module decorator */ module = __nccwpck_require__.nmd(module);
|
|
@@ -9992,7 +9889,7 @@ module.exports = orderBy;
|
|
|
9992
9889
|
|
|
9993
9890
|
/***/ }),
|
|
9994
9891
|
|
|
9995
|
-
/***/
|
|
9892
|
+
/***/ 9103:
|
|
9996
9893
|
/***/ ((module) => {
|
|
9997
9894
|
|
|
9998
9895
|
/**
|
|
@@ -10502,7 +10399,7 @@ module.exports = pick;
|
|
|
10502
10399
|
|
|
10503
10400
|
/***/ }),
|
|
10504
10401
|
|
|
10505
|
-
/***/
|
|
10402
|
+
/***/ 2893:
|
|
10506
10403
|
/***/ ((module) => {
|
|
10507
10404
|
|
|
10508
10405
|
"use strict";
|
|
@@ -10520,7 +10417,7 @@ module.exports = object => {
|
|
|
10520
10417
|
|
|
10521
10418
|
/***/ }),
|
|
10522
10419
|
|
|
10523
|
-
/***/
|
|
10420
|
+
/***/ 7642:
|
|
10524
10421
|
/***/ ((module) => {
|
|
10525
10422
|
|
|
10526
10423
|
"use strict";
|
|
@@ -10560,7 +10457,7 @@ module.exports = (fromStream, toStream) => {
|
|
|
10560
10457
|
|
|
10561
10458
|
/***/ }),
|
|
10562
10459
|
|
|
10563
|
-
/***/
|
|
10460
|
+
/***/ 9443:
|
|
10564
10461
|
/***/ ((module) => {
|
|
10565
10462
|
|
|
10566
10463
|
"use strict";
|
|
@@ -10645,7 +10542,7 @@ module.exports = (fromStream, toStream) => {
|
|
|
10645
10542
|
|
|
10646
10543
|
/***/ }),
|
|
10647
10544
|
|
|
10648
|
-
/***/
|
|
10545
|
+
/***/ 5797:
|
|
10649
10546
|
/***/ ((module) => {
|
|
10650
10547
|
|
|
10651
10548
|
"use strict";
|
|
@@ -10869,10 +10766,10 @@ module.exports = normalizeUrl;
|
|
|
10869
10766
|
|
|
10870
10767
|
/***/ }),
|
|
10871
10768
|
|
|
10872
|
-
/***/
|
|
10769
|
+
/***/ 2469:
|
|
10873
10770
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
10874
10771
|
|
|
10875
|
-
var wrappy = __nccwpck_require__(
|
|
10772
|
+
var wrappy = __nccwpck_require__(6540)
|
|
10876
10773
|
module.exports = wrappy(once)
|
|
10877
10774
|
module.exports.strict = wrappy(onceStrict)
|
|
10878
10775
|
|
|
@@ -10918,7 +10815,7 @@ function onceStrict (fn) {
|
|
|
10918
10815
|
|
|
10919
10816
|
/***/ }),
|
|
10920
10817
|
|
|
10921
|
-
/***/
|
|
10818
|
+
/***/ 5323:
|
|
10922
10819
|
/***/ ((module) => {
|
|
10923
10820
|
|
|
10924
10821
|
"use strict";
|
|
@@ -11037,11 +10934,11 @@ module.exports.CancelError = CancelError;
|
|
|
11037
10934
|
|
|
11038
10935
|
/***/ }),
|
|
11039
10936
|
|
|
11040
|
-
/***/
|
|
10937
|
+
/***/ 1216:
|
|
11041
10938
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
11042
10939
|
|
|
11043
|
-
var once = __nccwpck_require__(
|
|
11044
|
-
var eos = __nccwpck_require__(
|
|
10940
|
+
var once = __nccwpck_require__(2469)
|
|
10941
|
+
var eos = __nccwpck_require__(1243)
|
|
11045
10942
|
var fs = __nccwpck_require__(7147) // we only need fs to get the ReadStream and WriteStream prototypes
|
|
11046
10943
|
|
|
11047
10944
|
var noop = function () {}
|
|
@@ -11126,7 +11023,7 @@ module.exports = pump
|
|
|
11126
11023
|
|
|
11127
11024
|
/***/ }),
|
|
11128
11025
|
|
|
11129
|
-
/***/
|
|
11026
|
+
/***/ 4225:
|
|
11130
11027
|
/***/ ((module) => {
|
|
11131
11028
|
|
|
11132
11029
|
"use strict";
|
|
@@ -11257,12 +11154,12 @@ module.exports = QuickLRU;
|
|
|
11257
11154
|
|
|
11258
11155
|
/***/ }),
|
|
11259
11156
|
|
|
11260
|
-
/***/
|
|
11157
|
+
/***/ 6354:
|
|
11261
11158
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
11262
11159
|
|
|
11263
11160
|
"use strict";
|
|
11264
11161
|
|
|
11265
|
-
const tls = __nccwpck_require__(
|
|
11162
|
+
const tls = __nccwpck_require__(6821);
|
|
11266
11163
|
|
|
11267
11164
|
module.exports = (options = {}, connect = tls.connect) => new Promise((resolve, reject) => {
|
|
11268
11165
|
let timeout = false;
|
|
@@ -11308,14 +11205,14 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
|
|
11308
11205
|
|
|
11309
11206
|
/***/ }),
|
|
11310
11207
|
|
|
11311
|
-
/***/
|
|
11208
|
+
/***/ 4404:
|
|
11312
11209
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
11313
11210
|
|
|
11314
11211
|
"use strict";
|
|
11315
11212
|
|
|
11316
11213
|
|
|
11317
11214
|
const Readable = (__nccwpck_require__(2781).Readable);
|
|
11318
|
-
const lowercaseKeys = __nccwpck_require__(
|
|
11215
|
+
const lowercaseKeys = __nccwpck_require__(2893);
|
|
11319
11216
|
|
|
11320
11217
|
class Response extends Readable {
|
|
11321
11218
|
constructor(statusCode, headers, body, url) {
|
|
@@ -11350,7 +11247,7 @@ module.exports = Response;
|
|
|
11350
11247
|
|
|
11351
11248
|
/***/ }),
|
|
11352
11249
|
|
|
11353
|
-
/***/
|
|
11250
|
+
/***/ 6540:
|
|
11354
11251
|
/***/ ((module) => {
|
|
11355
11252
|
|
|
11356
11253
|
// Returns a wrapper function that returns a wrapped callback
|
|
@@ -11390,15 +11287,14 @@ function wrappy (fn, cb) {
|
|
|
11390
11287
|
|
|
11391
11288
|
/***/ }),
|
|
11392
11289
|
|
|
11393
|
-
/***/
|
|
11290
|
+
/***/ 3933:
|
|
11394
11291
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11395
11292
|
|
|
11396
11293
|
"use strict";
|
|
11397
11294
|
|
|
11398
11295
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11399
|
-
exports.
|
|
11400
|
-
const
|
|
11401
|
-
const util_1 = __nccwpck_require__(809);
|
|
11296
|
+
exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
|
|
11297
|
+
const util_1 = __nccwpck_require__(9973);
|
|
11402
11298
|
exports.ZodIssueCode = util_1.util.arrayToEnum([
|
|
11403
11299
|
"invalid_type",
|
|
11404
11300
|
"invalid_literal",
|
|
@@ -11415,6 +11311,7 @@ exports.ZodIssueCode = util_1.util.arrayToEnum([
|
|
|
11415
11311
|
"too_big",
|
|
11416
11312
|
"invalid_intersection_types",
|
|
11417
11313
|
"not_multiple_of",
|
|
11314
|
+
"not_finite",
|
|
11418
11315
|
]);
|
|
11419
11316
|
const quotelessJson = (obj) => {
|
|
11420
11317
|
const json = JSON.stringify(obj, null, 2);
|
|
@@ -11498,7 +11395,7 @@ class ZodError extends Error {
|
|
|
11498
11395
|
return this.message;
|
|
11499
11396
|
}
|
|
11500
11397
|
get message() {
|
|
11501
|
-
return JSON.stringify(this.issues,
|
|
11398
|
+
return JSON.stringify(this.issues, util_1.util.jsonStringifyReplacer, 2);
|
|
11502
11399
|
}
|
|
11503
11400
|
get isEmpty() {
|
|
11504
11401
|
return this.issues.length === 0;
|
|
@@ -11526,101 +11423,23 @@ ZodError.create = (issues) => {
|
|
|
11526
11423
|
const error = new ZodError(issues);
|
|
11527
11424
|
return error;
|
|
11528
11425
|
};
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
case exports.ZodIssueCode.invalid_literal:
|
|
11541
|
-
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, parseUtil_1.jsonStringifyReplacer)}`;
|
|
11542
|
-
break;
|
|
11543
|
-
case exports.ZodIssueCode.unrecognized_keys:
|
|
11544
|
-
message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`;
|
|
11545
|
-
break;
|
|
11546
|
-
case exports.ZodIssueCode.invalid_union:
|
|
11547
|
-
message = `Invalid input`;
|
|
11548
|
-
break;
|
|
11549
|
-
case exports.ZodIssueCode.invalid_union_discriminator:
|
|
11550
|
-
message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;
|
|
11551
|
-
break;
|
|
11552
|
-
case exports.ZodIssueCode.invalid_enum_value:
|
|
11553
|
-
message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
11554
|
-
break;
|
|
11555
|
-
case exports.ZodIssueCode.invalid_arguments:
|
|
11556
|
-
message = `Invalid function arguments`;
|
|
11557
|
-
break;
|
|
11558
|
-
case exports.ZodIssueCode.invalid_return_type:
|
|
11559
|
-
message = `Invalid function return type`;
|
|
11560
|
-
break;
|
|
11561
|
-
case exports.ZodIssueCode.invalid_date:
|
|
11562
|
-
message = `Invalid date`;
|
|
11563
|
-
break;
|
|
11564
|
-
case exports.ZodIssueCode.invalid_string:
|
|
11565
|
-
if (typeof issue.validation === "object") {
|
|
11566
|
-
if ("startsWith" in issue.validation) {
|
|
11567
|
-
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
11568
|
-
}
|
|
11569
|
-
else if ("endsWith" in issue.validation) {
|
|
11570
|
-
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
11571
|
-
}
|
|
11572
|
-
else {
|
|
11573
|
-
util_1.util.assertNever(issue.validation);
|
|
11574
|
-
}
|
|
11575
|
-
}
|
|
11576
|
-
else if (issue.validation !== "regex") {
|
|
11577
|
-
message = `Invalid ${issue.validation}`;
|
|
11578
|
-
}
|
|
11579
|
-
else {
|
|
11580
|
-
message = "Invalid";
|
|
11581
|
-
}
|
|
11582
|
-
break;
|
|
11583
|
-
case exports.ZodIssueCode.too_small:
|
|
11584
|
-
if (issue.type === "array")
|
|
11585
|
-
message = `Array must contain ${issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
11586
|
-
else if (issue.type === "string")
|
|
11587
|
-
message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
11588
|
-
else if (issue.type === "number")
|
|
11589
|
-
message = `Number must be greater than ${issue.inclusive ? `or equal to ` : ``}${issue.minimum}`;
|
|
11590
|
-
else if (issue.type === "date")
|
|
11591
|
-
message = `Date must be greater than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.minimum)}`;
|
|
11592
|
-
else
|
|
11593
|
-
message = "Invalid input";
|
|
11594
|
-
break;
|
|
11595
|
-
case exports.ZodIssueCode.too_big:
|
|
11596
|
-
if (issue.type === "array")
|
|
11597
|
-
message = `Array must contain ${issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
11598
|
-
else if (issue.type === "string")
|
|
11599
|
-
message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
11600
|
-
else if (issue.type === "number")
|
|
11601
|
-
message = `Number must be less than ${issue.inclusive ? `or equal to ` : ``}${issue.maximum}`;
|
|
11602
|
-
else if (issue.type === "date")
|
|
11603
|
-
message = `Date must be smaller than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.maximum)}`;
|
|
11604
|
-
else
|
|
11605
|
-
message = "Invalid input";
|
|
11606
|
-
break;
|
|
11607
|
-
case exports.ZodIssueCode.custom:
|
|
11608
|
-
message = `Invalid input`;
|
|
11609
|
-
break;
|
|
11610
|
-
case exports.ZodIssueCode.invalid_intersection_types:
|
|
11611
|
-
message = `Intersection results could not be merged`;
|
|
11612
|
-
break;
|
|
11613
|
-
case exports.ZodIssueCode.not_multiple_of:
|
|
11614
|
-
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
11615
|
-
break;
|
|
11616
|
-
default:
|
|
11617
|
-
message = _ctx.defaultError;
|
|
11618
|
-
util_1.util.assertNever(issue);
|
|
11619
|
-
}
|
|
11620
|
-
return { message };
|
|
11426
|
+
|
|
11427
|
+
|
|
11428
|
+
/***/ }),
|
|
11429
|
+
|
|
11430
|
+
/***/ 5391:
|
|
11431
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
11432
|
+
|
|
11433
|
+
"use strict";
|
|
11434
|
+
|
|
11435
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11436
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11621
11437
|
};
|
|
11622
|
-
exports
|
|
11623
|
-
|
|
11438
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11439
|
+
exports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = void 0;
|
|
11440
|
+
const en_1 = __importDefault(__nccwpck_require__(184));
|
|
11441
|
+
exports.defaultErrorMap = en_1.default;
|
|
11442
|
+
let overrideErrorMap = en_1.default;
|
|
11624
11443
|
function setErrorMap(map) {
|
|
11625
11444
|
overrideErrorMap = map;
|
|
11626
11445
|
}
|
|
@@ -11633,7 +11452,7 @@ exports.getErrorMap = getErrorMap;
|
|
|
11633
11452
|
|
|
11634
11453
|
/***/ }),
|
|
11635
11454
|
|
|
11636
|
-
/***/
|
|
11455
|
+
/***/ 7365:
|
|
11637
11456
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
11638
11457
|
|
|
11639
11458
|
"use strict";
|
|
@@ -11649,19 +11468,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11649
11468
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11650
11469
|
};
|
|
11651
11470
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11652
|
-
|
|
11653
|
-
__exportStar(__nccwpck_require__(
|
|
11654
|
-
__exportStar(__nccwpck_require__(
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
__exportStar(__nccwpck_require__(54), exports);
|
|
11659
|
-
__exportStar(__nccwpck_require__(6597), exports);
|
|
11471
|
+
__exportStar(__nccwpck_require__(5391), exports);
|
|
11472
|
+
__exportStar(__nccwpck_require__(3636), exports);
|
|
11473
|
+
__exportStar(__nccwpck_require__(9599), exports);
|
|
11474
|
+
__exportStar(__nccwpck_require__(9973), exports);
|
|
11475
|
+
__exportStar(__nccwpck_require__(7889), exports);
|
|
11476
|
+
__exportStar(__nccwpck_require__(3933), exports);
|
|
11660
11477
|
|
|
11661
11478
|
|
|
11662
11479
|
/***/ }),
|
|
11663
11480
|
|
|
11664
|
-
/***/
|
|
11481
|
+
/***/ 9849:
|
|
11665
11482
|
/***/ ((__unused_webpack_module, exports) => {
|
|
11666
11483
|
|
|
11667
11484
|
"use strict";
|
|
@@ -11677,14 +11494,18 @@ var errorUtil;
|
|
|
11677
11494
|
|
|
11678
11495
|
/***/ }),
|
|
11679
11496
|
|
|
11680
|
-
/***/
|
|
11681
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__)
|
|
11497
|
+
/***/ 3636:
|
|
11498
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
11682
11499
|
|
|
11683
11500
|
"use strict";
|
|
11684
11501
|
|
|
11502
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11503
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11504
|
+
};
|
|
11685
11505
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11686
|
-
exports.
|
|
11687
|
-
const
|
|
11506
|
+
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;
|
|
11507
|
+
const errors_1 = __nccwpck_require__(5391);
|
|
11508
|
+
const en_1 = __importDefault(__nccwpck_require__(184));
|
|
11688
11509
|
const makeIssue = (params) => {
|
|
11689
11510
|
const { data, path, errorMaps, issueData } = params;
|
|
11690
11511
|
const fullPath = [...path, ...(issueData.path || [])];
|
|
@@ -11709,15 +11530,15 @@ const makeIssue = (params) => {
|
|
|
11709
11530
|
exports.makeIssue = makeIssue;
|
|
11710
11531
|
exports.EMPTY_PATH = [];
|
|
11711
11532
|
function addIssueToContext(ctx, issueData) {
|
|
11712
|
-
const issue = exports.makeIssue({
|
|
11533
|
+
const issue = (0, exports.makeIssue)({
|
|
11713
11534
|
issueData: issueData,
|
|
11714
11535
|
data: ctx.data,
|
|
11715
11536
|
path: ctx.path,
|
|
11716
11537
|
errorMaps: [
|
|
11717
11538
|
ctx.common.contextualErrorMap,
|
|
11718
11539
|
ctx.schemaErrorMap,
|
|
11719
|
-
|
|
11720
|
-
|
|
11540
|
+
(0, errors_1.getErrorMap)(),
|
|
11541
|
+
en_1.default, // then global default map
|
|
11721
11542
|
].filter((x) => !!x),
|
|
11722
11543
|
});
|
|
11723
11544
|
ctx.common.issues.push(issue);
|
|
@@ -11791,18 +11612,11 @@ const isValid = (x) => x.status === "valid";
|
|
|
11791
11612
|
exports.isValid = isValid;
|
|
11792
11613
|
const isAsync = (x) => typeof Promise !== undefined && x instanceof Promise;
|
|
11793
11614
|
exports.isAsync = isAsync;
|
|
11794
|
-
const jsonStringifyReplacer = (_, value) => {
|
|
11795
|
-
if (typeof value === "bigint") {
|
|
11796
|
-
return value.toString();
|
|
11797
|
-
}
|
|
11798
|
-
return value;
|
|
11799
|
-
};
|
|
11800
|
-
exports.jsonStringifyReplacer = jsonStringifyReplacer;
|
|
11801
11615
|
|
|
11802
11616
|
|
|
11803
11617
|
/***/ }),
|
|
11804
11618
|
|
|
11805
|
-
/***/
|
|
11619
|
+
/***/ 9599:
|
|
11806
11620
|
/***/ ((__unused_webpack_module, exports) => {
|
|
11807
11621
|
|
|
11808
11622
|
"use strict";
|
|
@@ -11812,7 +11626,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
11812
11626
|
|
|
11813
11627
|
/***/ }),
|
|
11814
11628
|
|
|
11815
|
-
/***/
|
|
11629
|
+
/***/ 9973:
|
|
11816
11630
|
/***/ ((__unused_webpack_module, exports) => {
|
|
11817
11631
|
|
|
11818
11632
|
"use strict";
|
|
@@ -11875,6 +11689,12 @@ var util;
|
|
|
11875
11689
|
.join(separator);
|
|
11876
11690
|
}
|
|
11877
11691
|
util.joinValues = joinValues;
|
|
11692
|
+
util.jsonStringifyReplacer = (_, value) => {
|
|
11693
|
+
if (typeof value === "bigint") {
|
|
11694
|
+
return value.toString();
|
|
11695
|
+
}
|
|
11696
|
+
return value;
|
|
11697
|
+
};
|
|
11878
11698
|
})(util = exports.util || (exports.util = {}));
|
|
11879
11699
|
exports.ZodParsedType = util.arrayToEnum([
|
|
11880
11700
|
"string",
|
|
@@ -11913,6 +11733,8 @@ const getParsedType = (data) => {
|
|
|
11913
11733
|
return exports.ZodParsedType.function;
|
|
11914
11734
|
case "bigint":
|
|
11915
11735
|
return exports.ZodParsedType.bigint;
|
|
11736
|
+
case "symbol":
|
|
11737
|
+
return exports.ZodParsedType.symbol;
|
|
11916
11738
|
case "object":
|
|
11917
11739
|
if (Array.isArray(data)) {
|
|
11918
11740
|
return exports.ZodParsedType.array;
|
|
@@ -11945,7 +11767,7 @@ exports.getParsedType = getParsedType;
|
|
|
11945
11767
|
|
|
11946
11768
|
/***/ }),
|
|
11947
11769
|
|
|
11948
|
-
/***/
|
|
11770
|
+
/***/ 6319:
|
|
11949
11771
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
11950
11772
|
|
|
11951
11773
|
"use strict";
|
|
@@ -11974,26 +11796,152 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11974
11796
|
};
|
|
11975
11797
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11976
11798
|
exports.z = void 0;
|
|
11977
|
-
const mod = __importStar(__nccwpck_require__(
|
|
11799
|
+
const mod = __importStar(__nccwpck_require__(7365));
|
|
11978
11800
|
exports.z = mod;
|
|
11979
|
-
__exportStar(__nccwpck_require__(
|
|
11801
|
+
__exportStar(__nccwpck_require__(7365), exports);
|
|
11980
11802
|
exports["default"] = mod;
|
|
11981
11803
|
|
|
11982
11804
|
|
|
11983
11805
|
/***/ }),
|
|
11984
11806
|
|
|
11985
|
-
/***/
|
|
11807
|
+
/***/ 184:
|
|
11808
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11809
|
+
|
|
11810
|
+
"use strict";
|
|
11811
|
+
|
|
11812
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11813
|
+
const util_1 = __nccwpck_require__(9973);
|
|
11814
|
+
const ZodError_1 = __nccwpck_require__(3933);
|
|
11815
|
+
const errorMap = (issue, _ctx) => {
|
|
11816
|
+
let message;
|
|
11817
|
+
switch (issue.code) {
|
|
11818
|
+
case ZodError_1.ZodIssueCode.invalid_type:
|
|
11819
|
+
if (issue.received === util_1.ZodParsedType.undefined) {
|
|
11820
|
+
message = "Required";
|
|
11821
|
+
}
|
|
11822
|
+
else {
|
|
11823
|
+
message = `Expected ${issue.expected}, received ${issue.received}`;
|
|
11824
|
+
}
|
|
11825
|
+
break;
|
|
11826
|
+
case ZodError_1.ZodIssueCode.invalid_literal:
|
|
11827
|
+
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_1.util.jsonStringifyReplacer)}`;
|
|
11828
|
+
break;
|
|
11829
|
+
case ZodError_1.ZodIssueCode.unrecognized_keys:
|
|
11830
|
+
message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`;
|
|
11831
|
+
break;
|
|
11832
|
+
case ZodError_1.ZodIssueCode.invalid_union:
|
|
11833
|
+
message = `Invalid input`;
|
|
11834
|
+
break;
|
|
11835
|
+
case ZodError_1.ZodIssueCode.invalid_union_discriminator:
|
|
11836
|
+
message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;
|
|
11837
|
+
break;
|
|
11838
|
+
case ZodError_1.ZodIssueCode.invalid_enum_value:
|
|
11839
|
+
message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
11840
|
+
break;
|
|
11841
|
+
case ZodError_1.ZodIssueCode.invalid_arguments:
|
|
11842
|
+
message = `Invalid function arguments`;
|
|
11843
|
+
break;
|
|
11844
|
+
case ZodError_1.ZodIssueCode.invalid_return_type:
|
|
11845
|
+
message = `Invalid function return type`;
|
|
11846
|
+
break;
|
|
11847
|
+
case ZodError_1.ZodIssueCode.invalid_date:
|
|
11848
|
+
message = `Invalid date`;
|
|
11849
|
+
break;
|
|
11850
|
+
case ZodError_1.ZodIssueCode.invalid_string:
|
|
11851
|
+
if (typeof issue.validation === "object") {
|
|
11852
|
+
if ("startsWith" in issue.validation) {
|
|
11853
|
+
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
11854
|
+
}
|
|
11855
|
+
else if ("endsWith" in issue.validation) {
|
|
11856
|
+
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
11857
|
+
}
|
|
11858
|
+
else {
|
|
11859
|
+
util_1.util.assertNever(issue.validation);
|
|
11860
|
+
}
|
|
11861
|
+
}
|
|
11862
|
+
else if (issue.validation !== "regex") {
|
|
11863
|
+
message = `Invalid ${issue.validation}`;
|
|
11864
|
+
}
|
|
11865
|
+
else {
|
|
11866
|
+
message = "Invalid";
|
|
11867
|
+
}
|
|
11868
|
+
break;
|
|
11869
|
+
case ZodError_1.ZodIssueCode.too_small:
|
|
11870
|
+
if (issue.type === "array")
|
|
11871
|
+
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
11872
|
+
else if (issue.type === "string")
|
|
11873
|
+
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
11874
|
+
else if (issue.type === "number")
|
|
11875
|
+
message = `Number must be ${issue.exact
|
|
11876
|
+
? `exactly equal to `
|
|
11877
|
+
: issue.inclusive
|
|
11878
|
+
? `greater than or equal to `
|
|
11879
|
+
: `greater than `}${issue.minimum}`;
|
|
11880
|
+
else if (issue.type === "date")
|
|
11881
|
+
message = `Date must be ${issue.exact
|
|
11882
|
+
? `exactly equal to `
|
|
11883
|
+
: issue.inclusive
|
|
11884
|
+
? `greater than or equal to `
|
|
11885
|
+
: `greater than `}${new Date(issue.minimum)}`;
|
|
11886
|
+
else
|
|
11887
|
+
message = "Invalid input";
|
|
11888
|
+
break;
|
|
11889
|
+
case ZodError_1.ZodIssueCode.too_big:
|
|
11890
|
+
if (issue.type === "array")
|
|
11891
|
+
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
11892
|
+
else if (issue.type === "string")
|
|
11893
|
+
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
11894
|
+
else if (issue.type === "number")
|
|
11895
|
+
message = `Number must be ${issue.exact
|
|
11896
|
+
? `exactly`
|
|
11897
|
+
: issue.inclusive
|
|
11898
|
+
? `less than or equal to`
|
|
11899
|
+
: `less than`} ${issue.maximum}`;
|
|
11900
|
+
else if (issue.type === "date")
|
|
11901
|
+
message = `Date must be ${issue.exact
|
|
11902
|
+
? `exactly`
|
|
11903
|
+
: issue.inclusive
|
|
11904
|
+
? `smaller than or equal to`
|
|
11905
|
+
: `smaller than`} ${new Date(issue.maximum)}`;
|
|
11906
|
+
else
|
|
11907
|
+
message = "Invalid input";
|
|
11908
|
+
break;
|
|
11909
|
+
case ZodError_1.ZodIssueCode.custom:
|
|
11910
|
+
message = `Invalid input`;
|
|
11911
|
+
break;
|
|
11912
|
+
case ZodError_1.ZodIssueCode.invalid_intersection_types:
|
|
11913
|
+
message = `Intersection results could not be merged`;
|
|
11914
|
+
break;
|
|
11915
|
+
case ZodError_1.ZodIssueCode.not_multiple_of:
|
|
11916
|
+
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
11917
|
+
break;
|
|
11918
|
+
case ZodError_1.ZodIssueCode.not_finite:
|
|
11919
|
+
message = "Number must be finite";
|
|
11920
|
+
break;
|
|
11921
|
+
default:
|
|
11922
|
+
message = _ctx.defaultError;
|
|
11923
|
+
util_1.util.assertNever(issue);
|
|
11924
|
+
}
|
|
11925
|
+
return { message };
|
|
11926
|
+
};
|
|
11927
|
+
exports["default"] = errorMap;
|
|
11928
|
+
|
|
11929
|
+
|
|
11930
|
+
/***/ }),
|
|
11931
|
+
|
|
11932
|
+
/***/ 7889:
|
|
11986
11933
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11987
11934
|
|
|
11988
11935
|
"use strict";
|
|
11989
11936
|
|
|
11990
11937
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11991
|
-
exports
|
|
11992
|
-
exports["void"] = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports["null"] = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports["instanceof"] = void 0;
|
|
11993
|
-
const
|
|
11994
|
-
const
|
|
11995
|
-
const
|
|
11996
|
-
const
|
|
11938
|
+
exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.objectUtil = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
|
|
11939
|
+
exports.NEVER = exports["void"] = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports["null"] = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports["instanceof"] = exports["function"] = exports["enum"] = exports.effect = exports.discriminatedUnion = void 0;
|
|
11940
|
+
const errors_1 = __nccwpck_require__(5391);
|
|
11941
|
+
const errorUtil_1 = __nccwpck_require__(9849);
|
|
11942
|
+
const parseUtil_1 = __nccwpck_require__(3636);
|
|
11943
|
+
const util_1 = __nccwpck_require__(9973);
|
|
11944
|
+
const ZodError_1 = __nccwpck_require__(3933);
|
|
11997
11945
|
class ParseInputLazyPath {
|
|
11998
11946
|
constructor(parent, value, path, key) {
|
|
11999
11947
|
this.parent = parent;
|
|
@@ -12006,7 +11954,7 @@ class ParseInputLazyPath {
|
|
|
12006
11954
|
}
|
|
12007
11955
|
}
|
|
12008
11956
|
const handleResult = (ctx, result) => {
|
|
12009
|
-
if (parseUtil_1.isValid(result)) {
|
|
11957
|
+
if ((0, parseUtil_1.isValid)(result)) {
|
|
12010
11958
|
return { success: true, data: result.value };
|
|
12011
11959
|
}
|
|
12012
11960
|
else {
|
|
@@ -12022,7 +11970,7 @@ function processCreateParams(params) {
|
|
|
12022
11970
|
return {};
|
|
12023
11971
|
const { errorMap, invalid_type_error, required_error, description } = params;
|
|
12024
11972
|
if (errorMap && (invalid_type_error || required_error)) {
|
|
12025
|
-
throw new Error(`Can't use "
|
|
11973
|
+
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
12026
11974
|
}
|
|
12027
11975
|
if (errorMap)
|
|
12028
11976
|
return { errorMap: errorMap, description };
|
|
@@ -12040,7 +11988,6 @@ class ZodType {
|
|
|
12040
11988
|
constructor(def) {
|
|
12041
11989
|
/** Alias of safeParseAsync */
|
|
12042
11990
|
this.spa = this.safeParseAsync;
|
|
12043
|
-
this.superRefine = this._refinement;
|
|
12044
11991
|
this._def = def;
|
|
12045
11992
|
this.parse = this.parse.bind(this);
|
|
12046
11993
|
this.safeParse = this.safeParse.bind(this);
|
|
@@ -12058,8 +12005,11 @@ class ZodType {
|
|
|
12058
12005
|
this.or = this.or.bind(this);
|
|
12059
12006
|
this.and = this.and.bind(this);
|
|
12060
12007
|
this.transform = this.transform.bind(this);
|
|
12008
|
+
this.brand = this.brand.bind(this);
|
|
12061
12009
|
this.default = this.default.bind(this);
|
|
12010
|
+
this.catch = this.catch.bind(this);
|
|
12062
12011
|
this.describe = this.describe.bind(this);
|
|
12012
|
+
this.pipe = this.pipe.bind(this);
|
|
12063
12013
|
this.isNullable = this.isNullable.bind(this);
|
|
12064
12014
|
this.isOptional = this.isOptional.bind(this);
|
|
12065
12015
|
}
|
|
@@ -12067,13 +12017,13 @@ class ZodType {
|
|
|
12067
12017
|
return this._def.description;
|
|
12068
12018
|
}
|
|
12069
12019
|
_getType(input) {
|
|
12070
|
-
return util_1.getParsedType(input.data);
|
|
12020
|
+
return (0, util_1.getParsedType)(input.data);
|
|
12071
12021
|
}
|
|
12072
12022
|
_getOrReturnCtx(input, ctx) {
|
|
12073
12023
|
return (ctx || {
|
|
12074
12024
|
common: input.parent.common,
|
|
12075
12025
|
data: input.data,
|
|
12076
|
-
parsedType: util_1.getParsedType(input.data),
|
|
12026
|
+
parsedType: (0, util_1.getParsedType)(input.data),
|
|
12077
12027
|
schemaErrorMap: this._def.errorMap,
|
|
12078
12028
|
path: input.path,
|
|
12079
12029
|
parent: input.parent,
|
|
@@ -12085,7 +12035,7 @@ class ZodType {
|
|
|
12085
12035
|
ctx: {
|
|
12086
12036
|
common: input.parent.common,
|
|
12087
12037
|
data: input.data,
|
|
12088
|
-
parsedType: util_1.getParsedType(input.data),
|
|
12038
|
+
parsedType: (0, util_1.getParsedType)(input.data),
|
|
12089
12039
|
schemaErrorMap: this._def.errorMap,
|
|
12090
12040
|
path: input.path,
|
|
12091
12041
|
parent: input.parent,
|
|
@@ -12094,7 +12044,7 @@ class ZodType {
|
|
|
12094
12044
|
}
|
|
12095
12045
|
_parseSync(input) {
|
|
12096
12046
|
const result = this._parse(input);
|
|
12097
|
-
if (parseUtil_1.isAsync(result)) {
|
|
12047
|
+
if ((0, parseUtil_1.isAsync)(result)) {
|
|
12098
12048
|
throw new Error("Synchronous parse encountered promise.");
|
|
12099
12049
|
}
|
|
12100
12050
|
return result;
|
|
@@ -12121,7 +12071,7 @@ class ZodType {
|
|
|
12121
12071
|
schemaErrorMap: this._def.errorMap,
|
|
12122
12072
|
parent: null,
|
|
12123
12073
|
data,
|
|
12124
|
-
parsedType: util_1.getParsedType(data),
|
|
12074
|
+
parsedType: (0, util_1.getParsedType)(data),
|
|
12125
12075
|
};
|
|
12126
12076
|
const result = this._parseSync({ data, path: ctx.path, parent: ctx });
|
|
12127
12077
|
return handleResult(ctx, result);
|
|
@@ -12143,10 +12093,10 @@ class ZodType {
|
|
|
12143
12093
|
schemaErrorMap: this._def.errorMap,
|
|
12144
12094
|
parent: null,
|
|
12145
12095
|
data,
|
|
12146
|
-
parsedType: util_1.getParsedType(data),
|
|
12096
|
+
parsedType: (0, util_1.getParsedType)(data),
|
|
12147
12097
|
};
|
|
12148
|
-
const maybeAsyncResult = this._parse({ data, path:
|
|
12149
|
-
const result = await (parseUtil_1.isAsync(maybeAsyncResult)
|
|
12098
|
+
const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
|
|
12099
|
+
const result = await ((0, parseUtil_1.isAsync)(maybeAsyncResult)
|
|
12150
12100
|
? maybeAsyncResult
|
|
12151
12101
|
: Promise.resolve(maybeAsyncResult));
|
|
12152
12102
|
return handleResult(ctx, result);
|
|
@@ -12209,6 +12159,9 @@ class ZodType {
|
|
|
12209
12159
|
effect: { type: "refinement", refinement },
|
|
12210
12160
|
});
|
|
12211
12161
|
}
|
|
12162
|
+
superRefine(refinement) {
|
|
12163
|
+
return this._refinement(refinement);
|
|
12164
|
+
}
|
|
12212
12165
|
optional() {
|
|
12213
12166
|
return ZodOptional.create(this);
|
|
12214
12167
|
}
|
|
@@ -12252,13 +12205,24 @@ class ZodType {
|
|
|
12252
12205
|
...processCreateParams(undefined),
|
|
12253
12206
|
});
|
|
12254
12207
|
}
|
|
12255
|
-
|
|
12256
|
-
const
|
|
12257
|
-
return new
|
|
12258
|
-
|
|
12208
|
+
catch(def) {
|
|
12209
|
+
const defaultValueFunc = typeof def === "function" ? def : () => def;
|
|
12210
|
+
return new ZodCatch({
|
|
12211
|
+
innerType: this,
|
|
12212
|
+
defaultValue: defaultValueFunc,
|
|
12213
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
12214
|
+
});
|
|
12215
|
+
}
|
|
12216
|
+
describe(description) {
|
|
12217
|
+
const This = this.constructor;
|
|
12218
|
+
return new This({
|
|
12219
|
+
...this._def,
|
|
12259
12220
|
description,
|
|
12260
12221
|
});
|
|
12261
12222
|
}
|
|
12223
|
+
pipe(target) {
|
|
12224
|
+
return ZodPipeline.create(this, target);
|
|
12225
|
+
}
|
|
12262
12226
|
isOptional() {
|
|
12263
12227
|
return this.safeParse(undefined).success;
|
|
12264
12228
|
}
|
|
@@ -12276,6 +12240,39 @@ const uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-
|
|
|
12276
12240
|
// const emailRegex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
|
|
12277
12241
|
// eslint-disable-next-line
|
|
12278
12242
|
const emailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
|
12243
|
+
// interface IsDateStringOptions extends StringDateOptions {
|
|
12244
|
+
/**
|
|
12245
|
+
* Match any configuration
|
|
12246
|
+
*/
|
|
12247
|
+
// any?: boolean;
|
|
12248
|
+
// }
|
|
12249
|
+
// Adapted from https://stackoverflow.com/a/3143231
|
|
12250
|
+
const datetimeRegex = (args) => {
|
|
12251
|
+
if (args.precision) {
|
|
12252
|
+
if (args.offset) {
|
|
12253
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
12254
|
+
}
|
|
12255
|
+
else {
|
|
12256
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
|
12257
|
+
}
|
|
12258
|
+
}
|
|
12259
|
+
else if (args.precision === 0) {
|
|
12260
|
+
if (args.offset) {
|
|
12261
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
12262
|
+
}
|
|
12263
|
+
else {
|
|
12264
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
|
12265
|
+
}
|
|
12266
|
+
}
|
|
12267
|
+
else {
|
|
12268
|
+
if (args.offset) {
|
|
12269
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$`);
|
|
12270
|
+
}
|
|
12271
|
+
else {
|
|
12272
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
|
12273
|
+
}
|
|
12274
|
+
}
|
|
12275
|
+
};
|
|
12279
12276
|
class ZodString extends ZodType {
|
|
12280
12277
|
constructor() {
|
|
12281
12278
|
super(...arguments);
|
|
@@ -12295,10 +12292,13 @@ class ZodString extends ZodType {
|
|
|
12295
12292
|
});
|
|
12296
12293
|
}
|
|
12297
12294
|
_parse(input) {
|
|
12295
|
+
if (this._def.coerce) {
|
|
12296
|
+
input.data = String(input.data);
|
|
12297
|
+
}
|
|
12298
12298
|
const parsedType = this._getType(input);
|
|
12299
12299
|
if (parsedType !== util_1.ZodParsedType.string) {
|
|
12300
12300
|
const ctx = this._getOrReturnCtx(input);
|
|
12301
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12301
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12302
12302
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12303
12303
|
expected: util_1.ZodParsedType.string,
|
|
12304
12304
|
received: ctx.parsedType,
|
|
@@ -12313,11 +12313,12 @@ class ZodString extends ZodType {
|
|
|
12313
12313
|
if (check.kind === "min") {
|
|
12314
12314
|
if (input.data.length < check.value) {
|
|
12315
12315
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12316
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12316
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12317
12317
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
12318
12318
|
minimum: check.value,
|
|
12319
12319
|
type: "string",
|
|
12320
12320
|
inclusive: true,
|
|
12321
|
+
exact: false,
|
|
12321
12322
|
message: check.message,
|
|
12322
12323
|
});
|
|
12323
12324
|
status.dirty();
|
|
@@ -12326,20 +12327,49 @@ class ZodString extends ZodType {
|
|
|
12326
12327
|
else if (check.kind === "max") {
|
|
12327
12328
|
if (input.data.length > check.value) {
|
|
12328
12329
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12329
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12330
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12330
12331
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
12331
12332
|
maximum: check.value,
|
|
12332
12333
|
type: "string",
|
|
12333
12334
|
inclusive: true,
|
|
12335
|
+
exact: false,
|
|
12334
12336
|
message: check.message,
|
|
12335
12337
|
});
|
|
12336
12338
|
status.dirty();
|
|
12337
12339
|
}
|
|
12338
12340
|
}
|
|
12341
|
+
else if (check.kind === "length") {
|
|
12342
|
+
const tooBig = input.data.length > check.value;
|
|
12343
|
+
const tooSmall = input.data.length < check.value;
|
|
12344
|
+
if (tooBig || tooSmall) {
|
|
12345
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
12346
|
+
if (tooBig) {
|
|
12347
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12348
|
+
code: ZodError_1.ZodIssueCode.too_big,
|
|
12349
|
+
maximum: check.value,
|
|
12350
|
+
type: "string",
|
|
12351
|
+
inclusive: true,
|
|
12352
|
+
exact: true,
|
|
12353
|
+
message: check.message,
|
|
12354
|
+
});
|
|
12355
|
+
}
|
|
12356
|
+
else if (tooSmall) {
|
|
12357
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12358
|
+
code: ZodError_1.ZodIssueCode.too_small,
|
|
12359
|
+
minimum: check.value,
|
|
12360
|
+
type: "string",
|
|
12361
|
+
inclusive: true,
|
|
12362
|
+
exact: true,
|
|
12363
|
+
message: check.message,
|
|
12364
|
+
});
|
|
12365
|
+
}
|
|
12366
|
+
status.dirty();
|
|
12367
|
+
}
|
|
12368
|
+
}
|
|
12339
12369
|
else if (check.kind === "email") {
|
|
12340
12370
|
if (!emailRegex.test(input.data)) {
|
|
12341
12371
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12342
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12372
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12343
12373
|
validation: "email",
|
|
12344
12374
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12345
12375
|
message: check.message,
|
|
@@ -12350,7 +12380,7 @@ class ZodString extends ZodType {
|
|
|
12350
12380
|
else if (check.kind === "uuid") {
|
|
12351
12381
|
if (!uuidRegex.test(input.data)) {
|
|
12352
12382
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12353
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12383
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12354
12384
|
validation: "uuid",
|
|
12355
12385
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12356
12386
|
message: check.message,
|
|
@@ -12361,7 +12391,7 @@ class ZodString extends ZodType {
|
|
|
12361
12391
|
else if (check.kind === "cuid") {
|
|
12362
12392
|
if (!cuidRegex.test(input.data)) {
|
|
12363
12393
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12364
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12394
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12365
12395
|
validation: "cuid",
|
|
12366
12396
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12367
12397
|
message: check.message,
|
|
@@ -12375,7 +12405,7 @@ class ZodString extends ZodType {
|
|
|
12375
12405
|
}
|
|
12376
12406
|
catch (_a) {
|
|
12377
12407
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12378
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12408
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12379
12409
|
validation: "url",
|
|
12380
12410
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12381
12411
|
message: check.message,
|
|
@@ -12388,7 +12418,7 @@ class ZodString extends ZodType {
|
|
|
12388
12418
|
const testResult = check.regex.test(input.data);
|
|
12389
12419
|
if (!testResult) {
|
|
12390
12420
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12391
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12421
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12392
12422
|
validation: "regex",
|
|
12393
12423
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12394
12424
|
message: check.message,
|
|
@@ -12402,7 +12432,7 @@ class ZodString extends ZodType {
|
|
|
12402
12432
|
else if (check.kind === "startsWith") {
|
|
12403
12433
|
if (!input.data.startsWith(check.value)) {
|
|
12404
12434
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12405
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12435
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12406
12436
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12407
12437
|
validation: { startsWith: check.value },
|
|
12408
12438
|
message: check.message,
|
|
@@ -12413,7 +12443,7 @@ class ZodString extends ZodType {
|
|
|
12413
12443
|
else if (check.kind === "endsWith") {
|
|
12414
12444
|
if (!input.data.endsWith(check.value)) {
|
|
12415
12445
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12416
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12446
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12417
12447
|
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12418
12448
|
validation: { endsWith: check.value },
|
|
12419
12449
|
message: check.message,
|
|
@@ -12421,6 +12451,18 @@ class ZodString extends ZodType {
|
|
|
12421
12451
|
status.dirty();
|
|
12422
12452
|
}
|
|
12423
12453
|
}
|
|
12454
|
+
else if (check.kind === "datetime") {
|
|
12455
|
+
const regex = datetimeRegex(check);
|
|
12456
|
+
if (!regex.test(input.data)) {
|
|
12457
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
12458
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12459
|
+
code: ZodError_1.ZodIssueCode.invalid_string,
|
|
12460
|
+
validation: "datetime",
|
|
12461
|
+
message: check.message,
|
|
12462
|
+
});
|
|
12463
|
+
status.dirty();
|
|
12464
|
+
}
|
|
12465
|
+
}
|
|
12424
12466
|
else {
|
|
12425
12467
|
util_1.util.assertNever(check);
|
|
12426
12468
|
}
|
|
@@ -12445,6 +12487,23 @@ class ZodString extends ZodType {
|
|
|
12445
12487
|
cuid(message) {
|
|
12446
12488
|
return this._addCheck({ kind: "cuid", ...errorUtil_1.errorUtil.errToObj(message) });
|
|
12447
12489
|
}
|
|
12490
|
+
datetime(options) {
|
|
12491
|
+
var _a;
|
|
12492
|
+
if (typeof options === "string") {
|
|
12493
|
+
return this._addCheck({
|
|
12494
|
+
kind: "datetime",
|
|
12495
|
+
precision: null,
|
|
12496
|
+
offset: false,
|
|
12497
|
+
message: options,
|
|
12498
|
+
});
|
|
12499
|
+
}
|
|
12500
|
+
return this._addCheck({
|
|
12501
|
+
kind: "datetime",
|
|
12502
|
+
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
|
12503
|
+
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
|
|
12504
|
+
...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
|
|
12505
|
+
});
|
|
12506
|
+
}
|
|
12448
12507
|
regex(regex, message) {
|
|
12449
12508
|
return this._addCheck({
|
|
12450
12509
|
kind: "regex",
|
|
@@ -12481,7 +12540,14 @@ class ZodString extends ZodType {
|
|
|
12481
12540
|
});
|
|
12482
12541
|
}
|
|
12483
12542
|
length(len, message) {
|
|
12484
|
-
return this.
|
|
12543
|
+
return this._addCheck({
|
|
12544
|
+
kind: "length",
|
|
12545
|
+
value: len,
|
|
12546
|
+
...errorUtil_1.errorUtil.errToObj(message),
|
|
12547
|
+
});
|
|
12548
|
+
}
|
|
12549
|
+
get isDatetime() {
|
|
12550
|
+
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
|
12485
12551
|
}
|
|
12486
12552
|
get isEmail() {
|
|
12487
12553
|
return !!this._def.checks.find((ch) => ch.kind === "email");
|
|
@@ -12518,9 +12584,11 @@ class ZodString extends ZodType {
|
|
|
12518
12584
|
}
|
|
12519
12585
|
exports.ZodString = ZodString;
|
|
12520
12586
|
ZodString.create = (params) => {
|
|
12587
|
+
var _a;
|
|
12521
12588
|
return new ZodString({
|
|
12522
12589
|
checks: [],
|
|
12523
12590
|
typeName: ZodFirstPartyTypeKind.ZodString,
|
|
12591
|
+
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
|
|
12524
12592
|
...processCreateParams(params),
|
|
12525
12593
|
});
|
|
12526
12594
|
};
|
|
@@ -12541,10 +12609,13 @@ class ZodNumber extends ZodType {
|
|
|
12541
12609
|
this.step = this.multipleOf;
|
|
12542
12610
|
}
|
|
12543
12611
|
_parse(input) {
|
|
12612
|
+
if (this._def.coerce) {
|
|
12613
|
+
input.data = Number(input.data);
|
|
12614
|
+
}
|
|
12544
12615
|
const parsedType = this._getType(input);
|
|
12545
12616
|
if (parsedType !== util_1.ZodParsedType.number) {
|
|
12546
12617
|
const ctx = this._getOrReturnCtx(input);
|
|
12547
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12618
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12548
12619
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12549
12620
|
expected: util_1.ZodParsedType.number,
|
|
12550
12621
|
received: ctx.parsedType,
|
|
@@ -12557,7 +12628,7 @@ class ZodNumber extends ZodType {
|
|
|
12557
12628
|
if (check.kind === "int") {
|
|
12558
12629
|
if (!util_1.util.isInteger(input.data)) {
|
|
12559
12630
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12560
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12631
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12561
12632
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12562
12633
|
expected: "integer",
|
|
12563
12634
|
received: "float",
|
|
@@ -12572,11 +12643,12 @@ class ZodNumber extends ZodType {
|
|
|
12572
12643
|
: input.data <= check.value;
|
|
12573
12644
|
if (tooSmall) {
|
|
12574
12645
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12575
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12646
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12576
12647
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
12577
12648
|
minimum: check.value,
|
|
12578
12649
|
type: "number",
|
|
12579
12650
|
inclusive: check.inclusive,
|
|
12651
|
+
exact: false,
|
|
12580
12652
|
message: check.message,
|
|
12581
12653
|
});
|
|
12582
12654
|
status.dirty();
|
|
@@ -12588,11 +12660,12 @@ class ZodNumber extends ZodType {
|
|
|
12588
12660
|
: input.data >= check.value;
|
|
12589
12661
|
if (tooBig) {
|
|
12590
12662
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12591
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12663
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12592
12664
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
12593
12665
|
maximum: check.value,
|
|
12594
12666
|
type: "number",
|
|
12595
12667
|
inclusive: check.inclusive,
|
|
12668
|
+
exact: false,
|
|
12596
12669
|
message: check.message,
|
|
12597
12670
|
});
|
|
12598
12671
|
status.dirty();
|
|
@@ -12601,7 +12674,7 @@ class ZodNumber extends ZodType {
|
|
|
12601
12674
|
else if (check.kind === "multipleOf") {
|
|
12602
12675
|
if (floatSafeRemainder(input.data, check.value) !== 0) {
|
|
12603
12676
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12604
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12677
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12605
12678
|
code: ZodError_1.ZodIssueCode.not_multiple_of,
|
|
12606
12679
|
multipleOf: check.value,
|
|
12607
12680
|
message: check.message,
|
|
@@ -12609,6 +12682,16 @@ class ZodNumber extends ZodType {
|
|
|
12609
12682
|
status.dirty();
|
|
12610
12683
|
}
|
|
12611
12684
|
}
|
|
12685
|
+
else if (check.kind === "finite") {
|
|
12686
|
+
if (!Number.isFinite(input.data)) {
|
|
12687
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
12688
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12689
|
+
code: ZodError_1.ZodIssueCode.not_finite,
|
|
12690
|
+
message: check.message,
|
|
12691
|
+
});
|
|
12692
|
+
status.dirty();
|
|
12693
|
+
}
|
|
12694
|
+
}
|
|
12612
12695
|
else {
|
|
12613
12696
|
util_1.util.assertNever(check);
|
|
12614
12697
|
}
|
|
@@ -12692,6 +12775,12 @@ class ZodNumber extends ZodType {
|
|
|
12692
12775
|
message: errorUtil_1.errorUtil.toString(message),
|
|
12693
12776
|
});
|
|
12694
12777
|
}
|
|
12778
|
+
finite(message) {
|
|
12779
|
+
return this._addCheck({
|
|
12780
|
+
kind: "finite",
|
|
12781
|
+
message: errorUtil_1.errorUtil.toString(message),
|
|
12782
|
+
});
|
|
12783
|
+
}
|
|
12695
12784
|
get minValue() {
|
|
12696
12785
|
let min = null;
|
|
12697
12786
|
for (const ch of this._def.checks) {
|
|
@@ -12721,59 +12810,72 @@ ZodNumber.create = (params) => {
|
|
|
12721
12810
|
return new ZodNumber({
|
|
12722
12811
|
checks: [],
|
|
12723
12812
|
typeName: ZodFirstPartyTypeKind.ZodNumber,
|
|
12813
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
12724
12814
|
...processCreateParams(params),
|
|
12725
12815
|
});
|
|
12726
12816
|
};
|
|
12727
12817
|
class ZodBigInt extends ZodType {
|
|
12728
12818
|
_parse(input) {
|
|
12819
|
+
if (this._def.coerce) {
|
|
12820
|
+
input.data = BigInt(input.data);
|
|
12821
|
+
}
|
|
12729
12822
|
const parsedType = this._getType(input);
|
|
12730
12823
|
if (parsedType !== util_1.ZodParsedType.bigint) {
|
|
12731
12824
|
const ctx = this._getOrReturnCtx(input);
|
|
12732
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12825
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12733
12826
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12734
12827
|
expected: util_1.ZodParsedType.bigint,
|
|
12735
12828
|
received: ctx.parsedType,
|
|
12736
12829
|
});
|
|
12737
12830
|
return parseUtil_1.INVALID;
|
|
12738
12831
|
}
|
|
12739
|
-
return parseUtil_1.OK(input.data);
|
|
12832
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12740
12833
|
}
|
|
12741
12834
|
}
|
|
12742
12835
|
exports.ZodBigInt = ZodBigInt;
|
|
12743
12836
|
ZodBigInt.create = (params) => {
|
|
12837
|
+
var _a;
|
|
12744
12838
|
return new ZodBigInt({
|
|
12745
12839
|
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
|
12840
|
+
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
|
|
12746
12841
|
...processCreateParams(params),
|
|
12747
12842
|
});
|
|
12748
12843
|
};
|
|
12749
12844
|
class ZodBoolean extends ZodType {
|
|
12750
12845
|
_parse(input) {
|
|
12846
|
+
if (this._def.coerce) {
|
|
12847
|
+
input.data = Boolean(input.data);
|
|
12848
|
+
}
|
|
12751
12849
|
const parsedType = this._getType(input);
|
|
12752
12850
|
if (parsedType !== util_1.ZodParsedType.boolean) {
|
|
12753
12851
|
const ctx = this._getOrReturnCtx(input);
|
|
12754
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12852
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12755
12853
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12756
12854
|
expected: util_1.ZodParsedType.boolean,
|
|
12757
12855
|
received: ctx.parsedType,
|
|
12758
12856
|
});
|
|
12759
12857
|
return parseUtil_1.INVALID;
|
|
12760
12858
|
}
|
|
12761
|
-
return parseUtil_1.OK(input.data);
|
|
12859
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12762
12860
|
}
|
|
12763
12861
|
}
|
|
12764
12862
|
exports.ZodBoolean = ZodBoolean;
|
|
12765
12863
|
ZodBoolean.create = (params) => {
|
|
12766
12864
|
return new ZodBoolean({
|
|
12767
12865
|
typeName: ZodFirstPartyTypeKind.ZodBoolean,
|
|
12866
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
12768
12867
|
...processCreateParams(params),
|
|
12769
12868
|
});
|
|
12770
12869
|
};
|
|
12771
12870
|
class ZodDate extends ZodType {
|
|
12772
12871
|
_parse(input) {
|
|
12872
|
+
if (this._def.coerce) {
|
|
12873
|
+
input.data = new Date(input.data);
|
|
12874
|
+
}
|
|
12773
12875
|
const parsedType = this._getType(input);
|
|
12774
12876
|
if (parsedType !== util_1.ZodParsedType.date) {
|
|
12775
12877
|
const ctx = this._getOrReturnCtx(input);
|
|
12776
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12878
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12777
12879
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12778
12880
|
expected: util_1.ZodParsedType.date,
|
|
12779
12881
|
received: ctx.parsedType,
|
|
@@ -12782,7 +12884,7 @@ class ZodDate extends ZodType {
|
|
|
12782
12884
|
}
|
|
12783
12885
|
if (isNaN(input.data.getTime())) {
|
|
12784
12886
|
const ctx = this._getOrReturnCtx(input);
|
|
12785
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12887
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12786
12888
|
code: ZodError_1.ZodIssueCode.invalid_date,
|
|
12787
12889
|
});
|
|
12788
12890
|
return parseUtil_1.INVALID;
|
|
@@ -12793,10 +12895,11 @@ class ZodDate extends ZodType {
|
|
|
12793
12895
|
if (check.kind === "min") {
|
|
12794
12896
|
if (input.data.getTime() < check.value) {
|
|
12795
12897
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12796
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12898
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12797
12899
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
12798
12900
|
message: check.message,
|
|
12799
12901
|
inclusive: true,
|
|
12902
|
+
exact: false,
|
|
12800
12903
|
minimum: check.value,
|
|
12801
12904
|
type: "date",
|
|
12802
12905
|
});
|
|
@@ -12806,10 +12909,11 @@ class ZodDate extends ZodType {
|
|
|
12806
12909
|
else if (check.kind === "max") {
|
|
12807
12910
|
if (input.data.getTime() > check.value) {
|
|
12808
12911
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
12809
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
12912
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12810
12913
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
12811
12914
|
message: check.message,
|
|
12812
12915
|
inclusive: true,
|
|
12916
|
+
exact: false,
|
|
12813
12917
|
maximum: check.value,
|
|
12814
12918
|
type: "date",
|
|
12815
12919
|
});
|
|
@@ -12870,23 +12974,46 @@ exports.ZodDate = ZodDate;
|
|
|
12870
12974
|
ZodDate.create = (params) => {
|
|
12871
12975
|
return new ZodDate({
|
|
12872
12976
|
checks: [],
|
|
12977
|
+
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
|
|
12873
12978
|
typeName: ZodFirstPartyTypeKind.ZodDate,
|
|
12874
12979
|
...processCreateParams(params),
|
|
12875
12980
|
});
|
|
12876
12981
|
};
|
|
12982
|
+
class ZodSymbol extends ZodType {
|
|
12983
|
+
_parse(input) {
|
|
12984
|
+
const parsedType = this._getType(input);
|
|
12985
|
+
if (parsedType !== util_1.ZodParsedType.symbol) {
|
|
12986
|
+
const ctx = this._getOrReturnCtx(input);
|
|
12987
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12988
|
+
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12989
|
+
expected: util_1.ZodParsedType.symbol,
|
|
12990
|
+
received: ctx.parsedType,
|
|
12991
|
+
});
|
|
12992
|
+
return parseUtil_1.INVALID;
|
|
12993
|
+
}
|
|
12994
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12995
|
+
}
|
|
12996
|
+
}
|
|
12997
|
+
exports.ZodSymbol = ZodSymbol;
|
|
12998
|
+
ZodSymbol.create = (params) => {
|
|
12999
|
+
return new ZodSymbol({
|
|
13000
|
+
typeName: ZodFirstPartyTypeKind.ZodSymbol,
|
|
13001
|
+
...processCreateParams(params),
|
|
13002
|
+
});
|
|
13003
|
+
};
|
|
12877
13004
|
class ZodUndefined extends ZodType {
|
|
12878
13005
|
_parse(input) {
|
|
12879
13006
|
const parsedType = this._getType(input);
|
|
12880
13007
|
if (parsedType !== util_1.ZodParsedType.undefined) {
|
|
12881
13008
|
const ctx = this._getOrReturnCtx(input);
|
|
12882
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13009
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12883
13010
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12884
13011
|
expected: util_1.ZodParsedType.undefined,
|
|
12885
13012
|
received: ctx.parsedType,
|
|
12886
13013
|
});
|
|
12887
13014
|
return parseUtil_1.INVALID;
|
|
12888
13015
|
}
|
|
12889
|
-
return parseUtil_1.OK(input.data);
|
|
13016
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12890
13017
|
}
|
|
12891
13018
|
}
|
|
12892
13019
|
exports.ZodUndefined = ZodUndefined;
|
|
@@ -12901,14 +13028,14 @@ class ZodNull extends ZodType {
|
|
|
12901
13028
|
const parsedType = this._getType(input);
|
|
12902
13029
|
if (parsedType !== util_1.ZodParsedType.null) {
|
|
12903
13030
|
const ctx = this._getOrReturnCtx(input);
|
|
12904
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13031
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12905
13032
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12906
13033
|
expected: util_1.ZodParsedType.null,
|
|
12907
13034
|
received: ctx.parsedType,
|
|
12908
13035
|
});
|
|
12909
13036
|
return parseUtil_1.INVALID;
|
|
12910
13037
|
}
|
|
12911
|
-
return parseUtil_1.OK(input.data);
|
|
13038
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12912
13039
|
}
|
|
12913
13040
|
}
|
|
12914
13041
|
exports.ZodNull = ZodNull;
|
|
@@ -12925,7 +13052,7 @@ class ZodAny extends ZodType {
|
|
|
12925
13052
|
this._any = true;
|
|
12926
13053
|
}
|
|
12927
13054
|
_parse(input) {
|
|
12928
|
-
return parseUtil_1.OK(input.data);
|
|
13055
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12929
13056
|
}
|
|
12930
13057
|
}
|
|
12931
13058
|
exports.ZodAny = ZodAny;
|
|
@@ -12942,7 +13069,7 @@ class ZodUnknown extends ZodType {
|
|
|
12942
13069
|
this._unknown = true;
|
|
12943
13070
|
}
|
|
12944
13071
|
_parse(input) {
|
|
12945
|
-
return parseUtil_1.OK(input.data);
|
|
13072
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12946
13073
|
}
|
|
12947
13074
|
}
|
|
12948
13075
|
exports.ZodUnknown = ZodUnknown;
|
|
@@ -12955,7 +13082,7 @@ ZodUnknown.create = (params) => {
|
|
|
12955
13082
|
class ZodNever extends ZodType {
|
|
12956
13083
|
_parse(input) {
|
|
12957
13084
|
const ctx = this._getOrReturnCtx(input);
|
|
12958
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13085
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12959
13086
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12960
13087
|
expected: util_1.ZodParsedType.never,
|
|
12961
13088
|
received: ctx.parsedType,
|
|
@@ -12975,14 +13102,14 @@ class ZodVoid extends ZodType {
|
|
|
12975
13102
|
const parsedType = this._getType(input);
|
|
12976
13103
|
if (parsedType !== util_1.ZodParsedType.undefined) {
|
|
12977
13104
|
const ctx = this._getOrReturnCtx(input);
|
|
12978
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13105
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
12979
13106
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
12980
13107
|
expected: util_1.ZodParsedType.void,
|
|
12981
13108
|
received: ctx.parsedType,
|
|
12982
13109
|
});
|
|
12983
13110
|
return parseUtil_1.INVALID;
|
|
12984
13111
|
}
|
|
12985
|
-
return parseUtil_1.OK(input.data);
|
|
13112
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
12986
13113
|
}
|
|
12987
13114
|
}
|
|
12988
13115
|
exports.ZodVoid = ZodVoid;
|
|
@@ -12997,20 +13124,37 @@ class ZodArray extends ZodType {
|
|
|
12997
13124
|
const { ctx, status } = this._processInputParams(input);
|
|
12998
13125
|
const def = this._def;
|
|
12999
13126
|
if (ctx.parsedType !== util_1.ZodParsedType.array) {
|
|
13000
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13127
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13001
13128
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13002
13129
|
expected: util_1.ZodParsedType.array,
|
|
13003
13130
|
received: ctx.parsedType,
|
|
13004
13131
|
});
|
|
13005
13132
|
return parseUtil_1.INVALID;
|
|
13006
13133
|
}
|
|
13134
|
+
if (def.exactLength !== null) {
|
|
13135
|
+
const tooBig = ctx.data.length > def.exactLength.value;
|
|
13136
|
+
const tooSmall = ctx.data.length < def.exactLength.value;
|
|
13137
|
+
if (tooBig || tooSmall) {
|
|
13138
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13139
|
+
code: tooBig ? ZodError_1.ZodIssueCode.too_big : ZodError_1.ZodIssueCode.too_small,
|
|
13140
|
+
minimum: (tooSmall ? def.exactLength.value : undefined),
|
|
13141
|
+
maximum: (tooBig ? def.exactLength.value : undefined),
|
|
13142
|
+
type: "array",
|
|
13143
|
+
inclusive: true,
|
|
13144
|
+
exact: true,
|
|
13145
|
+
message: def.exactLength.message,
|
|
13146
|
+
});
|
|
13147
|
+
status.dirty();
|
|
13148
|
+
}
|
|
13149
|
+
}
|
|
13007
13150
|
if (def.minLength !== null) {
|
|
13008
13151
|
if (ctx.data.length < def.minLength.value) {
|
|
13009
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13152
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13010
13153
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
13011
13154
|
minimum: def.minLength.value,
|
|
13012
13155
|
type: "array",
|
|
13013
13156
|
inclusive: true,
|
|
13157
|
+
exact: false,
|
|
13014
13158
|
message: def.minLength.message,
|
|
13015
13159
|
});
|
|
13016
13160
|
status.dirty();
|
|
@@ -13018,11 +13162,12 @@ class ZodArray extends ZodType {
|
|
|
13018
13162
|
}
|
|
13019
13163
|
if (def.maxLength !== null) {
|
|
13020
13164
|
if (ctx.data.length > def.maxLength.value) {
|
|
13021
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13165
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13022
13166
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
13023
13167
|
maximum: def.maxLength.value,
|
|
13024
13168
|
type: "array",
|
|
13025
13169
|
inclusive: true,
|
|
13170
|
+
exact: false,
|
|
13026
13171
|
message: def.maxLength.message,
|
|
13027
13172
|
});
|
|
13028
13173
|
status.dirty();
|
|
@@ -13056,7 +13201,10 @@ class ZodArray extends ZodType {
|
|
|
13056
13201
|
});
|
|
13057
13202
|
}
|
|
13058
13203
|
length(len, message) {
|
|
13059
|
-
return
|
|
13204
|
+
return new ZodArray({
|
|
13205
|
+
...this._def,
|
|
13206
|
+
exactLength: { value: len, message: errorUtil_1.errorUtil.toString(message) },
|
|
13207
|
+
});
|
|
13060
13208
|
}
|
|
13061
13209
|
nonempty(message) {
|
|
13062
13210
|
return this.min(1, message);
|
|
@@ -13068,6 +13216,7 @@ ZodArray.create = (schema, params) => {
|
|
|
13068
13216
|
type: schema,
|
|
13069
13217
|
minLength: null,
|
|
13070
13218
|
maxLength: null,
|
|
13219
|
+
exactLength: null,
|
|
13071
13220
|
typeName: ZodFirstPartyTypeKind.ZodArray,
|
|
13072
13221
|
...processCreateParams(params),
|
|
13073
13222
|
});
|
|
@@ -13084,7 +13233,7 @@ var objectUtil;
|
|
|
13084
13233
|
objectUtil.mergeShapes = (first, second) => {
|
|
13085
13234
|
return {
|
|
13086
13235
|
...first,
|
|
13087
|
-
...second,
|
|
13236
|
+
...second, // second overwrites first
|
|
13088
13237
|
};
|
|
13089
13238
|
};
|
|
13090
13239
|
})(objectUtil = exports.objectUtil || (exports.objectUtil = {}));
|
|
@@ -13148,7 +13297,7 @@ class ZodObject extends ZodType {
|
|
|
13148
13297
|
const parsedType = this._getType(input);
|
|
13149
13298
|
if (parsedType !== util_1.ZodParsedType.object) {
|
|
13150
13299
|
const ctx = this._getOrReturnCtx(input);
|
|
13151
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13300
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13152
13301
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13153
13302
|
expected: util_1.ZodParsedType.object,
|
|
13154
13303
|
received: ctx.parsedType,
|
|
@@ -13158,9 +13307,12 @@ class ZodObject extends ZodType {
|
|
|
13158
13307
|
const { status, ctx } = this._processInputParams(input);
|
|
13159
13308
|
const { shape, keys: shapeKeys } = this._getCached();
|
|
13160
13309
|
const extraKeys = [];
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13310
|
+
if (!(this._def.catchall instanceof ZodNever &&
|
|
13311
|
+
this._def.unknownKeys === "strip")) {
|
|
13312
|
+
for (const key in ctx.data) {
|
|
13313
|
+
if (!shapeKeys.includes(key)) {
|
|
13314
|
+
extraKeys.push(key);
|
|
13315
|
+
}
|
|
13164
13316
|
}
|
|
13165
13317
|
}
|
|
13166
13318
|
const pairs = [];
|
|
@@ -13185,7 +13337,7 @@ class ZodObject extends ZodType {
|
|
|
13185
13337
|
}
|
|
13186
13338
|
else if (unknownKeys === "strict") {
|
|
13187
13339
|
if (extraKeys.length > 0) {
|
|
13188
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13340
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13189
13341
|
code: ZodError_1.ZodIssueCode.unrecognized_keys,
|
|
13190
13342
|
keys: extraKeys,
|
|
13191
13343
|
});
|
|
@@ -13351,15 +13503,32 @@ class ZodObject extends ZodType {
|
|
|
13351
13503
|
shape: () => newShape,
|
|
13352
13504
|
});
|
|
13353
13505
|
}
|
|
13354
|
-
required() {
|
|
13506
|
+
required(mask) {
|
|
13355
13507
|
const newShape = {};
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13508
|
+
if (mask) {
|
|
13509
|
+
util_1.util.objectKeys(this.shape).map((key) => {
|
|
13510
|
+
if (util_1.util.objectKeys(mask).indexOf(key) === -1) {
|
|
13511
|
+
newShape[key] = this.shape[key];
|
|
13512
|
+
}
|
|
13513
|
+
else {
|
|
13514
|
+
const fieldSchema = this.shape[key];
|
|
13515
|
+
let newField = fieldSchema;
|
|
13516
|
+
while (newField instanceof ZodOptional) {
|
|
13517
|
+
newField = newField._def.innerType;
|
|
13518
|
+
}
|
|
13519
|
+
newShape[key] = newField;
|
|
13520
|
+
}
|
|
13521
|
+
});
|
|
13522
|
+
}
|
|
13523
|
+
else {
|
|
13524
|
+
for (const key in this.shape) {
|
|
13525
|
+
const fieldSchema = this.shape[key];
|
|
13526
|
+
let newField = fieldSchema;
|
|
13527
|
+
while (newField instanceof ZodOptional) {
|
|
13528
|
+
newField = newField._def.innerType;
|
|
13529
|
+
}
|
|
13530
|
+
newShape[key] = newField;
|
|
13361
13531
|
}
|
|
13362
|
-
newShape[key] = newField;
|
|
13363
13532
|
}
|
|
13364
13533
|
return new ZodObject({
|
|
13365
13534
|
...this._def,
|
|
@@ -13418,7 +13587,7 @@ class ZodUnion extends ZodType {
|
|
|
13418
13587
|
}
|
|
13419
13588
|
// return invalid
|
|
13420
13589
|
const unionErrors = results.map((result) => new ZodError_1.ZodError(result.ctx.common.issues));
|
|
13421
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13590
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13422
13591
|
code: ZodError_1.ZodIssueCode.invalid_union,
|
|
13423
13592
|
unionErrors,
|
|
13424
13593
|
});
|
|
@@ -13476,7 +13645,7 @@ class ZodUnion extends ZodType {
|
|
|
13476
13645
|
return dirty.result;
|
|
13477
13646
|
}
|
|
13478
13647
|
const unionErrors = issues.map((issues) => new ZodError_1.ZodError(issues));
|
|
13479
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13648
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13480
13649
|
code: ZodError_1.ZodIssueCode.invalid_union,
|
|
13481
13650
|
unionErrors,
|
|
13482
13651
|
});
|
|
@@ -13495,11 +13664,48 @@ ZodUnion.create = (types, params) => {
|
|
|
13495
13664
|
...processCreateParams(params),
|
|
13496
13665
|
});
|
|
13497
13666
|
};
|
|
13667
|
+
/////////////////////////////////////////////////////
|
|
13668
|
+
/////////////////////////////////////////////////////
|
|
13669
|
+
////////// //////////
|
|
13670
|
+
////////// ZodDiscriminatedUnion //////////
|
|
13671
|
+
////////// //////////
|
|
13672
|
+
/////////////////////////////////////////////////////
|
|
13673
|
+
/////////////////////////////////////////////////////
|
|
13674
|
+
const getDiscriminator = (type) => {
|
|
13675
|
+
if (type instanceof ZodLazy) {
|
|
13676
|
+
return getDiscriminator(type.schema);
|
|
13677
|
+
}
|
|
13678
|
+
else if (type instanceof ZodEffects) {
|
|
13679
|
+
return getDiscriminator(type.innerType());
|
|
13680
|
+
}
|
|
13681
|
+
else if (type instanceof ZodLiteral) {
|
|
13682
|
+
return [type.value];
|
|
13683
|
+
}
|
|
13684
|
+
else if (type instanceof ZodEnum) {
|
|
13685
|
+
return type.options;
|
|
13686
|
+
}
|
|
13687
|
+
else if (type instanceof ZodNativeEnum) {
|
|
13688
|
+
// eslint-disable-next-line ban/ban
|
|
13689
|
+
return Object.keys(type.enum);
|
|
13690
|
+
}
|
|
13691
|
+
else if (type instanceof ZodDefault) {
|
|
13692
|
+
return getDiscriminator(type._def.innerType);
|
|
13693
|
+
}
|
|
13694
|
+
else if (type instanceof ZodUndefined) {
|
|
13695
|
+
return [undefined];
|
|
13696
|
+
}
|
|
13697
|
+
else if (type instanceof ZodNull) {
|
|
13698
|
+
return [null];
|
|
13699
|
+
}
|
|
13700
|
+
else {
|
|
13701
|
+
return null;
|
|
13702
|
+
}
|
|
13703
|
+
};
|
|
13498
13704
|
class ZodDiscriminatedUnion extends ZodType {
|
|
13499
13705
|
_parse(input) {
|
|
13500
13706
|
const { ctx } = this._processInputParams(input);
|
|
13501
13707
|
if (ctx.parsedType !== util_1.ZodParsedType.object) {
|
|
13502
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13708
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13503
13709
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13504
13710
|
expected: util_1.ZodParsedType.object,
|
|
13505
13711
|
received: ctx.parsedType,
|
|
@@ -13508,11 +13714,11 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
13508
13714
|
}
|
|
13509
13715
|
const discriminator = this.discriminator;
|
|
13510
13716
|
const discriminatorValue = ctx.data[discriminator];
|
|
13511
|
-
const option = this.
|
|
13717
|
+
const option = this.optionsMap.get(discriminatorValue);
|
|
13512
13718
|
if (!option) {
|
|
13513
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13719
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13514
13720
|
code: ZodError_1.ZodIssueCode.invalid_union_discriminator,
|
|
13515
|
-
options: this.
|
|
13721
|
+
options: Array.from(this.optionsMap.keys()),
|
|
13516
13722
|
path: [discriminator],
|
|
13517
13723
|
});
|
|
13518
13724
|
return parseUtil_1.INVALID;
|
|
@@ -13535,12 +13741,12 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
13535
13741
|
get discriminator() {
|
|
13536
13742
|
return this._def.discriminator;
|
|
13537
13743
|
}
|
|
13538
|
-
get validDiscriminatorValues() {
|
|
13539
|
-
return Array.from(this.options.keys());
|
|
13540
|
-
}
|
|
13541
13744
|
get options() {
|
|
13542
13745
|
return this._def.options;
|
|
13543
13746
|
}
|
|
13747
|
+
get optionsMap() {
|
|
13748
|
+
return this._def.optionsMap;
|
|
13749
|
+
}
|
|
13544
13750
|
/**
|
|
13545
13751
|
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
13546
13752
|
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
@@ -13549,34 +13755,35 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
13549
13755
|
* @param types an array of object schemas
|
|
13550
13756
|
* @param params
|
|
13551
13757
|
*/
|
|
13552
|
-
static create(discriminator,
|
|
13758
|
+
static create(discriminator, options, params) {
|
|
13553
13759
|
// Get all the valid discriminator values
|
|
13554
|
-
const
|
|
13555
|
-
try {
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13760
|
+
const optionsMap = new Map();
|
|
13761
|
+
// try {
|
|
13762
|
+
for (const type of options) {
|
|
13763
|
+
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
|
13764
|
+
if (!discriminatorValues) {
|
|
13765
|
+
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
13766
|
+
}
|
|
13767
|
+
for (const value of discriminatorValues) {
|
|
13768
|
+
if (optionsMap.has(value)) {
|
|
13769
|
+
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
13770
|
+
}
|
|
13771
|
+
optionsMap.set(value, type);
|
|
13772
|
+
}
|
|
13567
13773
|
}
|
|
13568
13774
|
return new ZodDiscriminatedUnion({
|
|
13569
13775
|
typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
|
|
13570
13776
|
discriminator,
|
|
13571
13777
|
options,
|
|
13778
|
+
optionsMap,
|
|
13572
13779
|
...processCreateParams(params),
|
|
13573
13780
|
});
|
|
13574
13781
|
}
|
|
13575
13782
|
}
|
|
13576
13783
|
exports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;
|
|
13577
13784
|
function mergeValues(a, b) {
|
|
13578
|
-
const aType = util_1.getParsedType(a);
|
|
13579
|
-
const bType = util_1.getParsedType(b);
|
|
13785
|
+
const aType = (0, util_1.getParsedType)(a);
|
|
13786
|
+
const bType = (0, util_1.getParsedType)(b);
|
|
13580
13787
|
if (a === b) {
|
|
13581
13788
|
return { valid: true, data: a };
|
|
13582
13789
|
}
|
|
@@ -13624,17 +13831,17 @@ class ZodIntersection extends ZodType {
|
|
|
13624
13831
|
_parse(input) {
|
|
13625
13832
|
const { status, ctx } = this._processInputParams(input);
|
|
13626
13833
|
const handleParsed = (parsedLeft, parsedRight) => {
|
|
13627
|
-
if (parseUtil_1.isAborted(parsedLeft) || parseUtil_1.isAborted(parsedRight)) {
|
|
13834
|
+
if ((0, parseUtil_1.isAborted)(parsedLeft) || (0, parseUtil_1.isAborted)(parsedRight)) {
|
|
13628
13835
|
return parseUtil_1.INVALID;
|
|
13629
13836
|
}
|
|
13630
13837
|
const merged = mergeValues(parsedLeft.value, parsedRight.value);
|
|
13631
13838
|
if (!merged.valid) {
|
|
13632
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13839
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13633
13840
|
code: ZodError_1.ZodIssueCode.invalid_intersection_types,
|
|
13634
13841
|
});
|
|
13635
13842
|
return parseUtil_1.INVALID;
|
|
13636
13843
|
}
|
|
13637
|
-
if (parseUtil_1.isDirty(parsedLeft) || parseUtil_1.isDirty(parsedRight)) {
|
|
13844
|
+
if ((0, parseUtil_1.isDirty)(parsedLeft) || (0, parseUtil_1.isDirty)(parsedRight)) {
|
|
13638
13845
|
status.dirty();
|
|
13639
13846
|
}
|
|
13640
13847
|
return { status: status.value, value: merged.data };
|
|
@@ -13679,7 +13886,7 @@ class ZodTuple extends ZodType {
|
|
|
13679
13886
|
_parse(input) {
|
|
13680
13887
|
const { status, ctx } = this._processInputParams(input);
|
|
13681
13888
|
if (ctx.parsedType !== util_1.ZodParsedType.array) {
|
|
13682
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13889
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13683
13890
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13684
13891
|
expected: util_1.ZodParsedType.array,
|
|
13685
13892
|
received: ctx.parsedType,
|
|
@@ -13687,20 +13894,22 @@ class ZodTuple extends ZodType {
|
|
|
13687
13894
|
return parseUtil_1.INVALID;
|
|
13688
13895
|
}
|
|
13689
13896
|
if (ctx.data.length < this._def.items.length) {
|
|
13690
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13897
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13691
13898
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
13692
13899
|
minimum: this._def.items.length,
|
|
13693
13900
|
inclusive: true,
|
|
13901
|
+
exact: false,
|
|
13694
13902
|
type: "array",
|
|
13695
13903
|
});
|
|
13696
13904
|
return parseUtil_1.INVALID;
|
|
13697
13905
|
}
|
|
13698
13906
|
const rest = this._def.rest;
|
|
13699
13907
|
if (!rest && ctx.data.length > this._def.items.length) {
|
|
13700
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13908
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13701
13909
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
13702
13910
|
maximum: this._def.items.length,
|
|
13703
13911
|
inclusive: true,
|
|
13912
|
+
exact: false,
|
|
13704
13913
|
type: "array",
|
|
13705
13914
|
});
|
|
13706
13915
|
status.dirty();
|
|
@@ -13734,6 +13943,9 @@ class ZodTuple extends ZodType {
|
|
|
13734
13943
|
}
|
|
13735
13944
|
exports.ZodTuple = ZodTuple;
|
|
13736
13945
|
ZodTuple.create = (schemas, params) => {
|
|
13946
|
+
if (!Array.isArray(schemas)) {
|
|
13947
|
+
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
13948
|
+
}
|
|
13737
13949
|
return new ZodTuple({
|
|
13738
13950
|
items: schemas,
|
|
13739
13951
|
typeName: ZodFirstPartyTypeKind.ZodTuple,
|
|
@@ -13751,7 +13963,7 @@ class ZodRecord extends ZodType {
|
|
|
13751
13963
|
_parse(input) {
|
|
13752
13964
|
const { status, ctx } = this._processInputParams(input);
|
|
13753
13965
|
if (ctx.parsedType !== util_1.ZodParsedType.object) {
|
|
13754
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
13966
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13755
13967
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13756
13968
|
expected: util_1.ZodParsedType.object,
|
|
13757
13969
|
received: ctx.parsedType,
|
|
@@ -13799,7 +14011,7 @@ class ZodMap extends ZodType {
|
|
|
13799
14011
|
_parse(input) {
|
|
13800
14012
|
const { status, ctx } = this._processInputParams(input);
|
|
13801
14013
|
if (ctx.parsedType !== util_1.ZodParsedType.map) {
|
|
13802
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14014
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13803
14015
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13804
14016
|
expected: util_1.ZodParsedType.map,
|
|
13805
14017
|
received: ctx.parsedType,
|
|
@@ -13861,7 +14073,7 @@ class ZodSet extends ZodType {
|
|
|
13861
14073
|
_parse(input) {
|
|
13862
14074
|
const { status, ctx } = this._processInputParams(input);
|
|
13863
14075
|
if (ctx.parsedType !== util_1.ZodParsedType.set) {
|
|
13864
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14076
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13865
14077
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13866
14078
|
expected: util_1.ZodParsedType.set,
|
|
13867
14079
|
received: ctx.parsedType,
|
|
@@ -13871,11 +14083,12 @@ class ZodSet extends ZodType {
|
|
|
13871
14083
|
const def = this._def;
|
|
13872
14084
|
if (def.minSize !== null) {
|
|
13873
14085
|
if (ctx.data.size < def.minSize.value) {
|
|
13874
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14086
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13875
14087
|
code: ZodError_1.ZodIssueCode.too_small,
|
|
13876
14088
|
minimum: def.minSize.value,
|
|
13877
14089
|
type: "set",
|
|
13878
14090
|
inclusive: true,
|
|
14091
|
+
exact: false,
|
|
13879
14092
|
message: def.minSize.message,
|
|
13880
14093
|
});
|
|
13881
14094
|
status.dirty();
|
|
@@ -13883,11 +14096,12 @@ class ZodSet extends ZodType {
|
|
|
13883
14096
|
}
|
|
13884
14097
|
if (def.maxSize !== null) {
|
|
13885
14098
|
if (ctx.data.size > def.maxSize.value) {
|
|
13886
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14099
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13887
14100
|
code: ZodError_1.ZodIssueCode.too_big,
|
|
13888
14101
|
maximum: def.maxSize.value,
|
|
13889
14102
|
type: "set",
|
|
13890
14103
|
inclusive: true,
|
|
14104
|
+
exact: false,
|
|
13891
14105
|
message: def.maxSize.message,
|
|
13892
14106
|
});
|
|
13893
14107
|
status.dirty();
|
|
@@ -13950,7 +14164,7 @@ class ZodFunction extends ZodType {
|
|
|
13950
14164
|
_parse(input) {
|
|
13951
14165
|
const { ctx } = this._processInputParams(input);
|
|
13952
14166
|
if (ctx.parsedType !== util_1.ZodParsedType.function) {
|
|
13953
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14167
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
13954
14168
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
13955
14169
|
expected: util_1.ZodParsedType.function,
|
|
13956
14170
|
received: ctx.parsedType,
|
|
@@ -13958,14 +14172,14 @@ class ZodFunction extends ZodType {
|
|
|
13958
14172
|
return parseUtil_1.INVALID;
|
|
13959
14173
|
}
|
|
13960
14174
|
function makeArgsIssue(args, error) {
|
|
13961
|
-
return parseUtil_1.makeIssue({
|
|
14175
|
+
return (0, parseUtil_1.makeIssue)({
|
|
13962
14176
|
data: args,
|
|
13963
14177
|
path: ctx.path,
|
|
13964
14178
|
errorMaps: [
|
|
13965
14179
|
ctx.common.contextualErrorMap,
|
|
13966
14180
|
ctx.schemaErrorMap,
|
|
13967
|
-
|
|
13968
|
-
|
|
14181
|
+
(0, errors_1.getErrorMap)(),
|
|
14182
|
+
errors_1.defaultErrorMap,
|
|
13969
14183
|
].filter((x) => !!x),
|
|
13970
14184
|
issueData: {
|
|
13971
14185
|
code: ZodError_1.ZodIssueCode.invalid_arguments,
|
|
@@ -13974,14 +14188,14 @@ class ZodFunction extends ZodType {
|
|
|
13974
14188
|
});
|
|
13975
14189
|
}
|
|
13976
14190
|
function makeReturnsIssue(returns, error) {
|
|
13977
|
-
return parseUtil_1.makeIssue({
|
|
14191
|
+
return (0, parseUtil_1.makeIssue)({
|
|
13978
14192
|
data: returns,
|
|
13979
14193
|
path: ctx.path,
|
|
13980
14194
|
errorMaps: [
|
|
13981
14195
|
ctx.common.contextualErrorMap,
|
|
13982
14196
|
ctx.schemaErrorMap,
|
|
13983
|
-
|
|
13984
|
-
|
|
14197
|
+
(0, errors_1.getErrorMap)(),
|
|
14198
|
+
errors_1.defaultErrorMap,
|
|
13985
14199
|
].filter((x) => !!x),
|
|
13986
14200
|
issueData: {
|
|
13987
14201
|
code: ZodError_1.ZodIssueCode.invalid_return_type,
|
|
@@ -13992,7 +14206,7 @@ class ZodFunction extends ZodType {
|
|
|
13992
14206
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
13993
14207
|
const fn = ctx.data;
|
|
13994
14208
|
if (this._def.returns instanceof ZodPromise) {
|
|
13995
|
-
return parseUtil_1.OK(async (...args) => {
|
|
14209
|
+
return (0, parseUtil_1.OK)(async (...args) => {
|
|
13996
14210
|
const error = new ZodError_1.ZodError([]);
|
|
13997
14211
|
const parsedArgs = await this._def.args
|
|
13998
14212
|
.parseAsync(args, params)
|
|
@@ -14011,7 +14225,7 @@ class ZodFunction extends ZodType {
|
|
|
14011
14225
|
});
|
|
14012
14226
|
}
|
|
14013
14227
|
else {
|
|
14014
|
-
return parseUtil_1.OK((...args) => {
|
|
14228
|
+
return (0, parseUtil_1.OK)((...args) => {
|
|
14015
14229
|
const parsedArgs = this._def.args.safeParse(args, params);
|
|
14016
14230
|
if (!parsedArgs.success) {
|
|
14017
14231
|
throw new ZodError_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
@@ -14051,18 +14265,18 @@ class ZodFunction extends ZodType {
|
|
|
14051
14265
|
const validatedFunc = this.parse(func);
|
|
14052
14266
|
return validatedFunc;
|
|
14053
14267
|
}
|
|
14268
|
+
static create(args, returns, params) {
|
|
14269
|
+
return new ZodFunction({
|
|
14270
|
+
args: (args
|
|
14271
|
+
? args
|
|
14272
|
+
: ZodTuple.create([]).rest(ZodUnknown.create())),
|
|
14273
|
+
returns: returns || ZodUnknown.create(),
|
|
14274
|
+
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
|
14275
|
+
...processCreateParams(params),
|
|
14276
|
+
});
|
|
14277
|
+
}
|
|
14054
14278
|
}
|
|
14055
14279
|
exports.ZodFunction = ZodFunction;
|
|
14056
|
-
ZodFunction.create = (args, returns, params) => {
|
|
14057
|
-
return new ZodFunction({
|
|
14058
|
-
args: (args
|
|
14059
|
-
? args.rest(ZodUnknown.create())
|
|
14060
|
-
: ZodTuple.create([]).rest(ZodUnknown.create())),
|
|
14061
|
-
returns: returns || ZodUnknown.create(),
|
|
14062
|
-
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
|
14063
|
-
...processCreateParams(params),
|
|
14064
|
-
});
|
|
14065
|
-
};
|
|
14066
14280
|
class ZodLazy extends ZodType {
|
|
14067
14281
|
get schema() {
|
|
14068
14282
|
return this._def.getter();
|
|
@@ -14085,7 +14299,7 @@ class ZodLiteral extends ZodType {
|
|
|
14085
14299
|
_parse(input) {
|
|
14086
14300
|
if (input.data !== this._def.value) {
|
|
14087
14301
|
const ctx = this._getOrReturnCtx(input);
|
|
14088
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14302
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14089
14303
|
code: ZodError_1.ZodIssueCode.invalid_literal,
|
|
14090
14304
|
expected: this._def.value,
|
|
14091
14305
|
});
|
|
@@ -14117,7 +14331,7 @@ class ZodEnum extends ZodType {
|
|
|
14117
14331
|
if (typeof input.data !== "string") {
|
|
14118
14332
|
const ctx = this._getOrReturnCtx(input);
|
|
14119
14333
|
const expectedValues = this._def.values;
|
|
14120
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14334
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14121
14335
|
expected: util_1.util.joinValues(expectedValues),
|
|
14122
14336
|
received: ctx.parsedType,
|
|
14123
14337
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
@@ -14127,14 +14341,14 @@ class ZodEnum extends ZodType {
|
|
|
14127
14341
|
if (this._def.values.indexOf(input.data) === -1) {
|
|
14128
14342
|
const ctx = this._getOrReturnCtx(input);
|
|
14129
14343
|
const expectedValues = this._def.values;
|
|
14130
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14344
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14131
14345
|
received: ctx.data,
|
|
14132
14346
|
code: ZodError_1.ZodIssueCode.invalid_enum_value,
|
|
14133
14347
|
options: expectedValues,
|
|
14134
14348
|
});
|
|
14135
14349
|
return parseUtil_1.INVALID;
|
|
14136
14350
|
}
|
|
14137
|
-
return parseUtil_1.OK(input.data);
|
|
14351
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
14138
14352
|
}
|
|
14139
14353
|
get options() {
|
|
14140
14354
|
return this._def.values;
|
|
@@ -14170,7 +14384,7 @@ class ZodNativeEnum extends ZodType {
|
|
|
14170
14384
|
if (ctx.parsedType !== util_1.ZodParsedType.string &&
|
|
14171
14385
|
ctx.parsedType !== util_1.ZodParsedType.number) {
|
|
14172
14386
|
const expectedValues = util_1.util.objectValues(nativeEnumValues);
|
|
14173
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14387
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14174
14388
|
expected: util_1.util.joinValues(expectedValues),
|
|
14175
14389
|
received: ctx.parsedType,
|
|
14176
14390
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
@@ -14179,14 +14393,14 @@ class ZodNativeEnum extends ZodType {
|
|
|
14179
14393
|
}
|
|
14180
14394
|
if (nativeEnumValues.indexOf(input.data) === -1) {
|
|
14181
14395
|
const expectedValues = util_1.util.objectValues(nativeEnumValues);
|
|
14182
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14396
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14183
14397
|
received: ctx.data,
|
|
14184
14398
|
code: ZodError_1.ZodIssueCode.invalid_enum_value,
|
|
14185
14399
|
options: expectedValues,
|
|
14186
14400
|
});
|
|
14187
14401
|
return parseUtil_1.INVALID;
|
|
14188
14402
|
}
|
|
14189
|
-
return parseUtil_1.OK(input.data);
|
|
14403
|
+
return (0, parseUtil_1.OK)(input.data);
|
|
14190
14404
|
}
|
|
14191
14405
|
get enum() {
|
|
14192
14406
|
return this._def.values;
|
|
@@ -14205,7 +14419,7 @@ class ZodPromise extends ZodType {
|
|
|
14205
14419
|
const { ctx } = this._processInputParams(input);
|
|
14206
14420
|
if (ctx.parsedType !== util_1.ZodParsedType.promise &&
|
|
14207
14421
|
ctx.common.async === false) {
|
|
14208
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14422
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14209
14423
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
14210
14424
|
expected: util_1.ZodParsedType.promise,
|
|
14211
14425
|
received: ctx.parsedType,
|
|
@@ -14215,7 +14429,7 @@ class ZodPromise extends ZodType {
|
|
|
14215
14429
|
const promisified = ctx.parsedType === util_1.ZodParsedType.promise
|
|
14216
14430
|
? ctx.data
|
|
14217
14431
|
: Promise.resolve(ctx.data);
|
|
14218
|
-
return parseUtil_1.OK(promisified.then((data) => {
|
|
14432
|
+
return (0, parseUtil_1.OK)(promisified.then((data) => {
|
|
14219
14433
|
return this._def.type.parseAsync(data, {
|
|
14220
14434
|
path: ctx.path,
|
|
14221
14435
|
errorMap: ctx.common.contextualErrorMap,
|
|
@@ -14235,6 +14449,11 @@ class ZodEffects extends ZodType {
|
|
|
14235
14449
|
innerType() {
|
|
14236
14450
|
return this._def.schema;
|
|
14237
14451
|
}
|
|
14452
|
+
sourceType() {
|
|
14453
|
+
return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects
|
|
14454
|
+
? this._def.schema.sourceType()
|
|
14455
|
+
: this._def.schema;
|
|
14456
|
+
}
|
|
14238
14457
|
_parse(input) {
|
|
14239
14458
|
const { status, ctx } = this._processInputParams(input);
|
|
14240
14459
|
const effect = this._def.effect || null;
|
|
@@ -14259,7 +14478,7 @@ class ZodEffects extends ZodType {
|
|
|
14259
14478
|
}
|
|
14260
14479
|
const checkCtx = {
|
|
14261
14480
|
addIssue: (arg) => {
|
|
14262
|
-
parseUtil_1.addIssueToContext(ctx, arg);
|
|
14481
|
+
(0, parseUtil_1.addIssueToContext)(ctx, arg);
|
|
14263
14482
|
if (arg.fatal) {
|
|
14264
14483
|
status.abort();
|
|
14265
14484
|
}
|
|
@@ -14324,7 +14543,7 @@ class ZodEffects extends ZodType {
|
|
|
14324
14543
|
// if (base.status === "dirty") {
|
|
14325
14544
|
// return { status: "dirty", value: base.value };
|
|
14326
14545
|
// }
|
|
14327
|
-
if (!parseUtil_1.isValid(base))
|
|
14546
|
+
if (!(0, parseUtil_1.isValid)(base))
|
|
14328
14547
|
return base;
|
|
14329
14548
|
const result = effect.transform(base.value, checkCtx);
|
|
14330
14549
|
if (result instanceof Promise) {
|
|
@@ -14336,7 +14555,7 @@ class ZodEffects extends ZodType {
|
|
|
14336
14555
|
return this._def.schema
|
|
14337
14556
|
._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
|
|
14338
14557
|
.then((base) => {
|
|
14339
|
-
if (!parseUtil_1.isValid(base))
|
|
14558
|
+
if (!(0, parseUtil_1.isValid)(base))
|
|
14340
14559
|
return base;
|
|
14341
14560
|
// if (base.status === "aborted") return INVALID;
|
|
14342
14561
|
// if (base.status === "dirty") {
|
|
@@ -14371,7 +14590,7 @@ class ZodOptional extends ZodType {
|
|
|
14371
14590
|
_parse(input) {
|
|
14372
14591
|
const parsedType = this._getType(input);
|
|
14373
14592
|
if (parsedType === util_1.ZodParsedType.undefined) {
|
|
14374
|
-
return parseUtil_1.OK(undefined);
|
|
14593
|
+
return (0, parseUtil_1.OK)(undefined);
|
|
14375
14594
|
}
|
|
14376
14595
|
return this._def.innerType._parse(input);
|
|
14377
14596
|
}
|
|
@@ -14391,7 +14610,7 @@ class ZodNullable extends ZodType {
|
|
|
14391
14610
|
_parse(input) {
|
|
14392
14611
|
const parsedType = this._getType(input);
|
|
14393
14612
|
if (parsedType === util_1.ZodParsedType.null) {
|
|
14394
|
-
return parseUtil_1.OK(null);
|
|
14613
|
+
return (0, parseUtil_1.OK)(null);
|
|
14395
14614
|
}
|
|
14396
14615
|
return this._def.innerType._parse(input);
|
|
14397
14616
|
}
|
|
@@ -14426,9 +14645,50 @@ class ZodDefault extends ZodType {
|
|
|
14426
14645
|
}
|
|
14427
14646
|
exports.ZodDefault = ZodDefault;
|
|
14428
14647
|
ZodDefault.create = (type, params) => {
|
|
14429
|
-
return new
|
|
14648
|
+
return new ZodDefault({
|
|
14430
14649
|
innerType: type,
|
|
14431
|
-
typeName: ZodFirstPartyTypeKind.
|
|
14650
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
14651
|
+
defaultValue: typeof params.default === "function"
|
|
14652
|
+
? params.default
|
|
14653
|
+
: () => params.default,
|
|
14654
|
+
...processCreateParams(params),
|
|
14655
|
+
});
|
|
14656
|
+
};
|
|
14657
|
+
class ZodCatch extends ZodType {
|
|
14658
|
+
_parse(input) {
|
|
14659
|
+
const { ctx } = this._processInputParams(input);
|
|
14660
|
+
const result = this._def.innerType._parse({
|
|
14661
|
+
data: ctx.data,
|
|
14662
|
+
path: ctx.path,
|
|
14663
|
+
parent: ctx,
|
|
14664
|
+
});
|
|
14665
|
+
if ((0, parseUtil_1.isAsync)(result)) {
|
|
14666
|
+
return result.then((result) => {
|
|
14667
|
+
return {
|
|
14668
|
+
status: "valid",
|
|
14669
|
+
value: result.status === "valid" ? result.value : this._def.defaultValue(),
|
|
14670
|
+
};
|
|
14671
|
+
});
|
|
14672
|
+
}
|
|
14673
|
+
else {
|
|
14674
|
+
return {
|
|
14675
|
+
status: "valid",
|
|
14676
|
+
value: result.status === "valid" ? result.value : this._def.defaultValue(),
|
|
14677
|
+
};
|
|
14678
|
+
}
|
|
14679
|
+
}
|
|
14680
|
+
removeDefault() {
|
|
14681
|
+
return this._def.innerType;
|
|
14682
|
+
}
|
|
14683
|
+
}
|
|
14684
|
+
exports.ZodCatch = ZodCatch;
|
|
14685
|
+
ZodCatch.create = (type, params) => {
|
|
14686
|
+
return new ZodCatch({
|
|
14687
|
+
innerType: type,
|
|
14688
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
14689
|
+
defaultValue: typeof params.default === "function"
|
|
14690
|
+
? params.default
|
|
14691
|
+
: () => params.default,
|
|
14432
14692
|
...processCreateParams(params),
|
|
14433
14693
|
});
|
|
14434
14694
|
};
|
|
@@ -14437,7 +14697,7 @@ class ZodNaN extends ZodType {
|
|
|
14437
14697
|
const parsedType = this._getType(input);
|
|
14438
14698
|
if (parsedType !== util_1.ZodParsedType.nan) {
|
|
14439
14699
|
const ctx = this._getOrReturnCtx(input);
|
|
14440
|
-
parseUtil_1.addIssueToContext(ctx, {
|
|
14700
|
+
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
14441
14701
|
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
14442
14702
|
expected: util_1.ZodParsedType.nan,
|
|
14443
14703
|
received: ctx.parsedType,
|
|
@@ -14470,6 +14730,65 @@ class ZodBranded extends ZodType {
|
|
|
14470
14730
|
}
|
|
14471
14731
|
}
|
|
14472
14732
|
exports.ZodBranded = ZodBranded;
|
|
14733
|
+
class ZodPipeline extends ZodType {
|
|
14734
|
+
_parse(input) {
|
|
14735
|
+
const { status, ctx } = this._processInputParams(input);
|
|
14736
|
+
if (ctx.common.async) {
|
|
14737
|
+
const handleAsync = async () => {
|
|
14738
|
+
const inResult = await this._def.in._parseAsync({
|
|
14739
|
+
data: ctx.data,
|
|
14740
|
+
path: ctx.path,
|
|
14741
|
+
parent: ctx,
|
|
14742
|
+
});
|
|
14743
|
+
if (inResult.status === "aborted")
|
|
14744
|
+
return parseUtil_1.INVALID;
|
|
14745
|
+
if (inResult.status === "dirty") {
|
|
14746
|
+
status.dirty();
|
|
14747
|
+
return (0, parseUtil_1.DIRTY)(inResult.value);
|
|
14748
|
+
}
|
|
14749
|
+
else {
|
|
14750
|
+
return this._def.out._parseAsync({
|
|
14751
|
+
data: inResult.value,
|
|
14752
|
+
path: ctx.path,
|
|
14753
|
+
parent: ctx,
|
|
14754
|
+
});
|
|
14755
|
+
}
|
|
14756
|
+
};
|
|
14757
|
+
return handleAsync();
|
|
14758
|
+
}
|
|
14759
|
+
else {
|
|
14760
|
+
const inResult = this._def.in._parseSync({
|
|
14761
|
+
data: ctx.data,
|
|
14762
|
+
path: ctx.path,
|
|
14763
|
+
parent: ctx,
|
|
14764
|
+
});
|
|
14765
|
+
if (inResult.status === "aborted")
|
|
14766
|
+
return parseUtil_1.INVALID;
|
|
14767
|
+
if (inResult.status === "dirty") {
|
|
14768
|
+
status.dirty();
|
|
14769
|
+
return {
|
|
14770
|
+
status: "dirty",
|
|
14771
|
+
value: inResult.value,
|
|
14772
|
+
};
|
|
14773
|
+
}
|
|
14774
|
+
else {
|
|
14775
|
+
return this._def.out._parseSync({
|
|
14776
|
+
data: inResult.value,
|
|
14777
|
+
path: ctx.path,
|
|
14778
|
+
parent: ctx,
|
|
14779
|
+
});
|
|
14780
|
+
}
|
|
14781
|
+
}
|
|
14782
|
+
}
|
|
14783
|
+
static create(a, b) {
|
|
14784
|
+
return new ZodPipeline({
|
|
14785
|
+
in: a,
|
|
14786
|
+
out: b,
|
|
14787
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline,
|
|
14788
|
+
});
|
|
14789
|
+
}
|
|
14790
|
+
}
|
|
14791
|
+
exports.ZodPipeline = ZodPipeline;
|
|
14473
14792
|
const custom = (check, params = {}, fatal) => {
|
|
14474
14793
|
if (check)
|
|
14475
14794
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
@@ -14493,6 +14812,7 @@ var ZodFirstPartyTypeKind;
|
|
|
14493
14812
|
ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt";
|
|
14494
14813
|
ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean";
|
|
14495
14814
|
ZodFirstPartyTypeKind["ZodDate"] = "ZodDate";
|
|
14815
|
+
ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol";
|
|
14496
14816
|
ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined";
|
|
14497
14817
|
ZodFirstPartyTypeKind["ZodNull"] = "ZodNull";
|
|
14498
14818
|
ZodFirstPartyTypeKind["ZodAny"] = "ZodAny";
|
|
@@ -14517,12 +14837,21 @@ var ZodFirstPartyTypeKind;
|
|
|
14517
14837
|
ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional";
|
|
14518
14838
|
ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable";
|
|
14519
14839
|
ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault";
|
|
14840
|
+
ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch";
|
|
14520
14841
|
ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
|
|
14521
14842
|
ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
|
|
14843
|
+
ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
|
|
14522
14844
|
})(ZodFirstPartyTypeKind = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));
|
|
14523
|
-
|
|
14845
|
+
// new approach that works for abstract classes
|
|
14846
|
+
// but requires TS 4.4+
|
|
14847
|
+
class Class {
|
|
14848
|
+
constructor(..._) { }
|
|
14849
|
+
}
|
|
14850
|
+
const instanceOfType = (
|
|
14851
|
+
// const instanceOfType = <T extends new (...args: any[]) => any>(
|
|
14852
|
+
cls, params = {
|
|
14524
14853
|
message: `Input not instance of ${cls.name}`,
|
|
14525
|
-
}) => exports.custom((data) => data instanceof cls, params, true);
|
|
14854
|
+
}) => (0, exports.custom)((data) => data instanceof cls, params, true);
|
|
14526
14855
|
exports["instanceof"] = instanceOfType;
|
|
14527
14856
|
const stringType = ZodString.create;
|
|
14528
14857
|
exports.string = stringType;
|
|
@@ -14536,6 +14865,8 @@ const booleanType = ZodBoolean.create;
|
|
|
14536
14865
|
exports.boolean = booleanType;
|
|
14537
14866
|
const dateType = ZodDate.create;
|
|
14538
14867
|
exports.date = dateType;
|
|
14868
|
+
const symbolType = ZodSymbol.create;
|
|
14869
|
+
exports.symbol = symbolType;
|
|
14539
14870
|
const undefinedType = ZodUndefined.create;
|
|
14540
14871
|
exports.undefined = undefinedType;
|
|
14541
14872
|
const nullType = ZodNull.create;
|
|
@@ -14589,24 +14920,34 @@ const nullableType = ZodNullable.create;
|
|
|
14589
14920
|
exports.nullable = nullableType;
|
|
14590
14921
|
const preprocessType = ZodEffects.createWithPreprocess;
|
|
14591
14922
|
exports.preprocess = preprocessType;
|
|
14923
|
+
const pipelineType = ZodPipeline.create;
|
|
14924
|
+
exports.pipeline = pipelineType;
|
|
14592
14925
|
const ostring = () => stringType().optional();
|
|
14593
14926
|
exports.ostring = ostring;
|
|
14594
14927
|
const onumber = () => numberType().optional();
|
|
14595
14928
|
exports.onumber = onumber;
|
|
14596
14929
|
const oboolean = () => booleanType().optional();
|
|
14597
14930
|
exports.oboolean = oboolean;
|
|
14931
|
+
exports.coerce = {
|
|
14932
|
+
string: ((arg) => ZodString.create({ ...arg, coerce: true })),
|
|
14933
|
+
number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),
|
|
14934
|
+
boolean: ((arg) => ZodBoolean.create({ ...arg, coerce: true })),
|
|
14935
|
+
bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
|
|
14936
|
+
date: ((arg) => ZodDate.create({ ...arg, coerce: true })),
|
|
14937
|
+
};
|
|
14938
|
+
exports.NEVER = parseUtil_1.INVALID;
|
|
14598
14939
|
|
|
14599
14940
|
|
|
14600
14941
|
/***/ }),
|
|
14601
14942
|
|
|
14602
|
-
/***/
|
|
14943
|
+
/***/ 2124:
|
|
14603
14944
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
14604
14945
|
|
|
14605
14946
|
"use strict";
|
|
14606
14947
|
|
|
14607
14948
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14608
14949
|
exports.defaultTimeout = exports.defaultMetadata = exports.scope = exports.userInfoEndpoint = exports.accessTokenEndpoint = exports.authorizationEndpoint = void 0;
|
|
14609
|
-
const connector_kit_1 = __nccwpck_require__(
|
|
14950
|
+
const connector_kit_1 = __nccwpck_require__(4758);
|
|
14610
14951
|
exports.authorizationEndpoint = 'https://accounts.google.com/o/oauth2/v2/auth';
|
|
14611
14952
|
exports.accessTokenEndpoint = 'https://oauth2.googleapis.com/token';
|
|
14612
14953
|
exports.userInfoEndpoint = 'https://openidconnect.googleapis.com/v1/userinfo';
|
|
@@ -14637,7 +14978,7 @@ exports.defaultTimeout = 5000;
|
|
|
14637
14978
|
|
|
14638
14979
|
/***/ }),
|
|
14639
14980
|
|
|
14640
|
-
/***/
|
|
14981
|
+
/***/ 616:
|
|
14641
14982
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
14642
14983
|
|
|
14643
14984
|
"use strict";
|
|
@@ -14667,15 +15008,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
14667
15008
|
};
|
|
14668
15009
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14669
15010
|
exports.getAccessToken = void 0;
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
const
|
|
14675
|
-
const essentials_1 = __nccwpck_require__(8138);
|
|
14676
|
-
const got_1 = __importStar(__nccwpck_require__(5569));
|
|
14677
|
-
const constant_1 = __nccwpck_require__(87);
|
|
14678
|
-
const types_1 = __nccwpck_require__(7760);
|
|
15011
|
+
const connector_kit_1 = __nccwpck_require__(4758);
|
|
15012
|
+
const essentials_1 = __nccwpck_require__(5254);
|
|
15013
|
+
const got_1 = __importStar(__nccwpck_require__(9235));
|
|
15014
|
+
const constant_1 = __nccwpck_require__(2124);
|
|
15015
|
+
const types_1 = __nccwpck_require__(2174);
|
|
14679
15016
|
const getAuthorizationUri = (getConfig) => async ({ state, redirectUri }) => {
|
|
14680
15017
|
const config = await getConfig(constant_1.defaultMetadata.id);
|
|
14681
15018
|
(0, connector_kit_1.validateConfig)(config, types_1.googleConfigGuard);
|
|
@@ -14771,14 +15108,14 @@ exports["default"] = createGoogleConnector;
|
|
|
14771
15108
|
|
|
14772
15109
|
/***/ }),
|
|
14773
15110
|
|
|
14774
|
-
/***/
|
|
15111
|
+
/***/ 2174:
|
|
14775
15112
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
14776
15113
|
|
|
14777
15114
|
"use strict";
|
|
14778
15115
|
|
|
14779
15116
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14780
15117
|
exports.authResponseGuard = exports.userInfoResponseGuard = exports.accessTokenResponseGuard = exports.googleConfigGuard = void 0;
|
|
14781
|
-
const zod_1 = __nccwpck_require__(
|
|
15118
|
+
const zod_1 = __nccwpck_require__(6319);
|
|
14782
15119
|
exports.googleConfigGuard = zod_1.z.object({
|
|
14783
15120
|
clientId: zod_1.z.string(),
|
|
14784
15121
|
clientSecret: zod_1.z.string(),
|
|
@@ -14886,7 +15223,7 @@ module.exports = require("stream");
|
|
|
14886
15223
|
|
|
14887
15224
|
/***/ }),
|
|
14888
15225
|
|
|
14889
|
-
/***/
|
|
15226
|
+
/***/ 6821:
|
|
14890
15227
|
/***/ ((module) => {
|
|
14891
15228
|
|
|
14892
15229
|
"use strict";
|
|
@@ -14916,6 +15253,337 @@ module.exports = require("util");
|
|
|
14916
15253
|
"use strict";
|
|
14917
15254
|
module.exports = require("zlib");
|
|
14918
15255
|
|
|
15256
|
+
/***/ }),
|
|
15257
|
+
|
|
15258
|
+
/***/ 4758:
|
|
15259
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
15260
|
+
|
|
15261
|
+
"use strict";
|
|
15262
|
+
|
|
15263
|
+
|
|
15264
|
+
var types = __nccwpck_require__(1876);
|
|
15265
|
+
|
|
15266
|
+
function validateConfig(config, guard) {
|
|
15267
|
+
const result = guard.safeParse(config);
|
|
15268
|
+
if (!result.success) {
|
|
15269
|
+
throw new types.ConnectorError(types.ConnectorErrorCodes.InvalidConfig, result.error);
|
|
15270
|
+
}
|
|
15271
|
+
}
|
|
15272
|
+
const parseJson = (jsonString, errorCode = types.ConnectorErrorCodes.InvalidResponse, errorPayload) => {
|
|
15273
|
+
try {
|
|
15274
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
15275
|
+
return JSON.parse(jsonString);
|
|
15276
|
+
}
|
|
15277
|
+
catch {
|
|
15278
|
+
throw new types.ConnectorError(errorCode, errorPayload ?? jsonString);
|
|
15279
|
+
}
|
|
15280
|
+
};
|
|
15281
|
+
|
|
15282
|
+
exports.ConnectorError = types.ConnectorError;
|
|
15283
|
+
Object.defineProperty(exports, "ConnectorErrorCodes", ({
|
|
15284
|
+
enumerable: true,
|
|
15285
|
+
get: function () { return types.ConnectorErrorCodes; }
|
|
15286
|
+
}));
|
|
15287
|
+
Object.defineProperty(exports, "ConnectorPlatform", ({
|
|
15288
|
+
enumerable: true,
|
|
15289
|
+
get: function () { return types.ConnectorPlatform; }
|
|
15290
|
+
}));
|
|
15291
|
+
Object.defineProperty(exports, "ConnectorType", ({
|
|
15292
|
+
enumerable: true,
|
|
15293
|
+
get: function () { return types.ConnectorType; }
|
|
15294
|
+
}));
|
|
15295
|
+
Object.defineProperty(exports, "MessageTypes", ({
|
|
15296
|
+
enumerable: true,
|
|
15297
|
+
get: function () { return types.MessageTypes; }
|
|
15298
|
+
}));
|
|
15299
|
+
exports.configurableConnectorMetadataGuard = types.configurableConnectorMetadataGuard;
|
|
15300
|
+
exports.connectorSessionGuard = types.connectorSessionGuard;
|
|
15301
|
+
exports.i18nPhrasesGuard = types.i18nPhrasesGuard;
|
|
15302
|
+
exports.messageTypesGuard = types.messageTypesGuard;
|
|
15303
|
+
exports.parseJson = parseJson;
|
|
15304
|
+
exports.validateConfig = validateConfig;
|
|
15305
|
+
|
|
15306
|
+
|
|
15307
|
+
/***/ }),
|
|
15308
|
+
|
|
15309
|
+
/***/ 1876:
|
|
15310
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
15311
|
+
|
|
15312
|
+
"use strict";
|
|
15313
|
+
|
|
15314
|
+
|
|
15315
|
+
var languageKit = __nccwpck_require__(1230);
|
|
15316
|
+
var zod = __nccwpck_require__(6319);
|
|
15317
|
+
|
|
15318
|
+
// MARK: Foundation
|
|
15319
|
+
exports.ConnectorType = void 0;
|
|
15320
|
+
(function (ConnectorType) {
|
|
15321
|
+
ConnectorType["Email"] = "Email";
|
|
15322
|
+
ConnectorType["Sms"] = "Sms";
|
|
15323
|
+
ConnectorType["Social"] = "Social";
|
|
15324
|
+
})(exports.ConnectorType || (exports.ConnectorType = {}));
|
|
15325
|
+
exports.ConnectorPlatform = void 0;
|
|
15326
|
+
(function (ConnectorPlatform) {
|
|
15327
|
+
ConnectorPlatform["Native"] = "Native";
|
|
15328
|
+
ConnectorPlatform["Universal"] = "Universal";
|
|
15329
|
+
ConnectorPlatform["Web"] = "Web";
|
|
15330
|
+
})(exports.ConnectorPlatform || (exports.ConnectorPlatform = {}));
|
|
15331
|
+
const i18nPhrasesGuard = zod.z
|
|
15332
|
+
.object({ en: zod.z.string() })
|
|
15333
|
+
.and(zod.z.record(zod.z.string()))
|
|
15334
|
+
.refine((i18nObject) => {
|
|
15335
|
+
const keys = Object.keys(i18nObject);
|
|
15336
|
+
if (!keys.includes('en')) {
|
|
15337
|
+
return false;
|
|
15338
|
+
}
|
|
15339
|
+
for (const value of keys) {
|
|
15340
|
+
if (!languageKit.isLanguageTag(value)) {
|
|
15341
|
+
return false;
|
|
15342
|
+
}
|
|
15343
|
+
}
|
|
15344
|
+
return true;
|
|
15345
|
+
});
|
|
15346
|
+
exports.ConnectorErrorCodes = void 0;
|
|
15347
|
+
(function (ConnectorErrorCodes) {
|
|
15348
|
+
ConnectorErrorCodes["General"] = "general";
|
|
15349
|
+
ConnectorErrorCodes["InvalidMetadata"] = "invalid_metadata";
|
|
15350
|
+
ConnectorErrorCodes["UnexpectedType"] = "unexpected_type";
|
|
15351
|
+
ConnectorErrorCodes["InvalidConfigGuard"] = "invalid_config_guard";
|
|
15352
|
+
ConnectorErrorCodes["InvalidRequestParameters"] = "invalid_request_parameters";
|
|
15353
|
+
ConnectorErrorCodes["InsufficientRequestParameters"] = "insufficient_request_parameters";
|
|
15354
|
+
ConnectorErrorCodes["InvalidConfig"] = "invalid_config";
|
|
15355
|
+
ConnectorErrorCodes["InvalidResponse"] = "invalid_response";
|
|
15356
|
+
ConnectorErrorCodes["TemplateNotFound"] = "template_not_found";
|
|
15357
|
+
ConnectorErrorCodes["NotImplemented"] = "not_implemented";
|
|
15358
|
+
ConnectorErrorCodes["SocialAuthCodeInvalid"] = "social_auth_code_invalid";
|
|
15359
|
+
ConnectorErrorCodes["SocialAccessTokenInvalid"] = "social_invalid_access_token";
|
|
15360
|
+
ConnectorErrorCodes["SocialIdTokenInvalid"] = "social_invalid_id_token";
|
|
15361
|
+
ConnectorErrorCodes["AuthorizationFailed"] = "authorization_failed";
|
|
15362
|
+
})(exports.ConnectorErrorCodes || (exports.ConnectorErrorCodes = {}));
|
|
15363
|
+
class ConnectorError extends Error {
|
|
15364
|
+
constructor(code, data) {
|
|
15365
|
+
const message = typeof data === 'string' ? data : 'Connector error occurred.';
|
|
15366
|
+
super(message);
|
|
15367
|
+
this.code = code;
|
|
15368
|
+
this.data = typeof data === 'string' ? { message: data } : data;
|
|
15369
|
+
}
|
|
15370
|
+
}
|
|
15371
|
+
exports.MessageTypes = void 0;
|
|
15372
|
+
(function (MessageTypes) {
|
|
15373
|
+
MessageTypes["SignIn"] = "SignIn";
|
|
15374
|
+
MessageTypes["Register"] = "Register";
|
|
15375
|
+
MessageTypes["ForgotPassword"] = "ForgotPassword";
|
|
15376
|
+
MessageTypes["Continue"] = "Continue";
|
|
15377
|
+
MessageTypes["Test"] = "Test";
|
|
15378
|
+
})(exports.MessageTypes || (exports.MessageTypes = {}));
|
|
15379
|
+
const messageTypesGuard = zod.z.nativeEnum(exports.MessageTypes);
|
|
15380
|
+
const connectorMetadataGuard = zod.z.object({
|
|
15381
|
+
id: zod.z.string(),
|
|
15382
|
+
target: zod.z.string(),
|
|
15383
|
+
platform: zod.z.nativeEnum(exports.ConnectorPlatform).nullable(),
|
|
15384
|
+
name: i18nPhrasesGuard,
|
|
15385
|
+
logo: zod.z.string(),
|
|
15386
|
+
logoDark: zod.z.string().nullable(),
|
|
15387
|
+
description: i18nPhrasesGuard,
|
|
15388
|
+
isStandard: zod.z.boolean().optional(),
|
|
15389
|
+
readme: zod.z.string(),
|
|
15390
|
+
configTemplate: zod.z.string(),
|
|
15391
|
+
});
|
|
15392
|
+
const configurableConnectorMetadataGuard = connectorMetadataGuard
|
|
15393
|
+
.pick({
|
|
15394
|
+
target: true,
|
|
15395
|
+
name: true,
|
|
15396
|
+
logo: true,
|
|
15397
|
+
logoDark: true,
|
|
15398
|
+
})
|
|
15399
|
+
.partial();
|
|
15400
|
+
const connectorSessionGuard = zod.z.object({
|
|
15401
|
+
nonce: zod.z.string().optional(),
|
|
15402
|
+
redirectUri: zod.z.string().optional(),
|
|
15403
|
+
});
|
|
15404
|
+
|
|
15405
|
+
exports.ConnectorError = ConnectorError;
|
|
15406
|
+
exports.configurableConnectorMetadataGuard = configurableConnectorMetadataGuard;
|
|
15407
|
+
exports.connectorSessionGuard = connectorSessionGuard;
|
|
15408
|
+
exports.i18nPhrasesGuard = i18nPhrasesGuard;
|
|
15409
|
+
exports.messageTypesGuard = messageTypesGuard;
|
|
15410
|
+
|
|
15411
|
+
|
|
15412
|
+
/***/ }),
|
|
15413
|
+
|
|
15414
|
+
/***/ 8670:
|
|
15415
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
15416
|
+
|
|
15417
|
+
"use strict";
|
|
15418
|
+
|
|
15419
|
+
|
|
15420
|
+
const languages = Object.freeze({
|
|
15421
|
+
'af-ZA': 'Afrikaans',
|
|
15422
|
+
'am-ET': 'አማርኛ',
|
|
15423
|
+
'ar-AR': 'العربية',
|
|
15424
|
+
'as-IN': 'অসমীয়া',
|
|
15425
|
+
'az-AZ': 'Azərbaycan dili',
|
|
15426
|
+
'be-BY': 'Беларуская',
|
|
15427
|
+
'bg-BG': 'Български',
|
|
15428
|
+
'bn-IN': 'বাংলা',
|
|
15429
|
+
'br-FR': 'Brezhoneg',
|
|
15430
|
+
'bs-BA': 'Bosanski',
|
|
15431
|
+
'ca-ES': 'Català',
|
|
15432
|
+
'cb-IQ': 'کوردیی ناوەندی',
|
|
15433
|
+
'co-FR': 'Corsu',
|
|
15434
|
+
'cs-CZ': 'Čeština',
|
|
15435
|
+
'cx-PH': 'Bisaya',
|
|
15436
|
+
'cy-GB': 'Cymraeg',
|
|
15437
|
+
'da-DK': 'Dansk',
|
|
15438
|
+
de: 'Deutsch',
|
|
15439
|
+
'de-DE': 'Deutsch (Deutschland)',
|
|
15440
|
+
'el-GR': 'Ελληνικά',
|
|
15441
|
+
en: 'English',
|
|
15442
|
+
'en-GB': 'English (UK)',
|
|
15443
|
+
'en-US': 'English (US)',
|
|
15444
|
+
'eo-EO': 'Esperanto',
|
|
15445
|
+
es: 'Español',
|
|
15446
|
+
'es-ES': 'Español (España)',
|
|
15447
|
+
'es-419': 'Español (Latinoamérica)',
|
|
15448
|
+
'et-EE': 'Eesti',
|
|
15449
|
+
'eu-ES': 'Euskara',
|
|
15450
|
+
'fa-IR': 'فارسی',
|
|
15451
|
+
'ff-NG': 'Fula',
|
|
15452
|
+
'fi-FI': 'Suomi',
|
|
15453
|
+
'fo-FO': 'Føroyskt',
|
|
15454
|
+
fr: 'Français',
|
|
15455
|
+
'fr-CA': 'Français (Canada)',
|
|
15456
|
+
'fr-FR': 'Français (France)',
|
|
15457
|
+
'fy-NL': 'Frysk',
|
|
15458
|
+
'ga-IE': 'Gaeilge',
|
|
15459
|
+
'gl-ES': 'Galego',
|
|
15460
|
+
'gn-PY': 'Guarani',
|
|
15461
|
+
'gu-IN': 'ગુજરાતી',
|
|
15462
|
+
'ha-NG': 'Hausa',
|
|
15463
|
+
'he-IL': 'עברית',
|
|
15464
|
+
'hi-IN': 'हिन्दी',
|
|
15465
|
+
'hr-HR': 'Hrvatski',
|
|
15466
|
+
'ht-HT': 'Kreyòl Ayisyen',
|
|
15467
|
+
'hu-HU': 'Magyar',
|
|
15468
|
+
'hy-AM': 'Հայերեն',
|
|
15469
|
+
'id-ID': 'Bahasa Indonesia',
|
|
15470
|
+
'ik-US': 'Iñupiatun',
|
|
15471
|
+
'is-IS': 'Íslenska',
|
|
15472
|
+
it: 'Italiano',
|
|
15473
|
+
'it-IT': 'italiano (Italia)',
|
|
15474
|
+
'iu-CA': 'Inuktitut',
|
|
15475
|
+
ja: '日本語',
|
|
15476
|
+
'ja-JP': '日本語',
|
|
15477
|
+
'ja-KS': '日本語(関西)',
|
|
15478
|
+
'jv-ID': 'Basa Jawa',
|
|
15479
|
+
'ka-GE': 'ქართული',
|
|
15480
|
+
'kk-KZ': 'Қазақша',
|
|
15481
|
+
'km-KH': 'ភាសាខ្មែរ',
|
|
15482
|
+
'kn-IN': 'ಕನ್ನಡ',
|
|
15483
|
+
ko: '한국어',
|
|
15484
|
+
'ko-KR': '한국어',
|
|
15485
|
+
'ku-TR': 'Kurdî (Kurmancî)',
|
|
15486
|
+
'ky-KG': 'кыргызча',
|
|
15487
|
+
'lo-LA': 'ພາສາລາວ',
|
|
15488
|
+
'lt-LT': 'Lietuvių',
|
|
15489
|
+
'lv-LV': 'Latviešu',
|
|
15490
|
+
'mg-MG': 'Malagasy',
|
|
15491
|
+
'mk-MK': 'Македонски',
|
|
15492
|
+
'ml-IN': 'മലയാളം',
|
|
15493
|
+
'mn-MN': 'Монгол',
|
|
15494
|
+
'mr-IN': 'मराठी',
|
|
15495
|
+
'ms-MY': 'Bahasa Melayu',
|
|
15496
|
+
'mt-MT': 'Malti',
|
|
15497
|
+
'my-MM': 'မြန်မာဘာသာ',
|
|
15498
|
+
'nb-NO': 'Norsk (bokmål)',
|
|
15499
|
+
'ne-NP': 'नेपाली',
|
|
15500
|
+
'nl-BE': 'Vlaams',
|
|
15501
|
+
'nl-NL': 'Nederlands',
|
|
15502
|
+
'nn-NO': 'Norsk (nynorsk)',
|
|
15503
|
+
'or-IN': 'ଓଡ଼ିଆ',
|
|
15504
|
+
'pa-IN': 'ਪੰਜਾਬੀ',
|
|
15505
|
+
'pl-PL': 'Polski',
|
|
15506
|
+
'ps-AF': 'پښتو',
|
|
15507
|
+
pt: 'português',
|
|
15508
|
+
'pt-BR': 'Português (Brasil)',
|
|
15509
|
+
'pt-PT': 'português (Portugal)',
|
|
15510
|
+
'ro-RO': 'Română',
|
|
15511
|
+
ru: 'Русский',
|
|
15512
|
+
'ru-RU': 'Русский',
|
|
15513
|
+
'rw-RW': 'Ikinyarwanda',
|
|
15514
|
+
'sc-IT': 'Sardu',
|
|
15515
|
+
'si-LK': 'සිංහල',
|
|
15516
|
+
'sk-SK': 'Slovenčina',
|
|
15517
|
+
'sl-SI': 'Slovenščina',
|
|
15518
|
+
'sn-ZW': 'Shona',
|
|
15519
|
+
'sq-AL': 'Shqip',
|
|
15520
|
+
'sr-RS': 'Српски',
|
|
15521
|
+
'sv-SE': 'Svenska',
|
|
15522
|
+
'sw-KE': 'Kiswahili',
|
|
15523
|
+
'sy-SY': 'ܣܘܪܝܝܐ',
|
|
15524
|
+
'sz-PL': 'ślōnskŏ gŏdka',
|
|
15525
|
+
'ta-IN': 'தமிழ்',
|
|
15526
|
+
'te-IN': 'తెలుగు',
|
|
15527
|
+
'tg-TJ': 'Тоҷикӣ',
|
|
15528
|
+
'th-TH': 'ภาษาไทย',
|
|
15529
|
+
'tl-PH': 'Filipino',
|
|
15530
|
+
tr: 'Türkçe',
|
|
15531
|
+
'tr-TR': 'Türkçe',
|
|
15532
|
+
'tt-RU': 'Татарча',
|
|
15533
|
+
'tz-MA': 'ⵜⴰⵎⴰⵣⵉⵖⵜ',
|
|
15534
|
+
'uk-UA': 'Українська',
|
|
15535
|
+
'ur-PK': 'اردو',
|
|
15536
|
+
'uz-UZ': "O'zbek",
|
|
15537
|
+
'vi-VN': 'Tiếng Việt',
|
|
15538
|
+
zh: '中文',
|
|
15539
|
+
'zh-CN': '简体中文',
|
|
15540
|
+
'zh-HK': '繁體中文(香港)',
|
|
15541
|
+
'zh-MO': '繁體中文(澳門)',
|
|
15542
|
+
'zh-TW': '繁體中文(台灣)',
|
|
15543
|
+
'zz-TR': 'Zaza',
|
|
15544
|
+
});
|
|
15545
|
+
|
|
15546
|
+
exports.languages = languages;
|
|
15547
|
+
|
|
15548
|
+
|
|
15549
|
+
/***/ }),
|
|
15550
|
+
|
|
15551
|
+
/***/ 1230:
|
|
15552
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
15553
|
+
|
|
15554
|
+
"use strict";
|
|
15555
|
+
|
|
15556
|
+
|
|
15557
|
+
var _const = __nccwpck_require__(8670);
|
|
15558
|
+
var utility = __nccwpck_require__(2304);
|
|
15559
|
+
|
|
15560
|
+
|
|
15561
|
+
|
|
15562
|
+
exports.languages = _const.languages;
|
|
15563
|
+
exports.isLanguageTag = utility.isLanguageTag;
|
|
15564
|
+
exports.languageTagGuard = utility.languageTagGuard;
|
|
15565
|
+
|
|
15566
|
+
|
|
15567
|
+
/***/ }),
|
|
15568
|
+
|
|
15569
|
+
/***/ 2304:
|
|
15570
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
15571
|
+
|
|
15572
|
+
"use strict";
|
|
15573
|
+
|
|
15574
|
+
|
|
15575
|
+
var zod = __nccwpck_require__(6319);
|
|
15576
|
+
var _const = __nccwpck_require__(8670);
|
|
15577
|
+
|
|
15578
|
+
const isLanguageTag = (value) => typeof value === 'string' && value in _const.languages;
|
|
15579
|
+
const languageTagGuard = zod.z
|
|
15580
|
+
.any()
|
|
15581
|
+
.refine((value) => isLanguageTag(value));
|
|
15582
|
+
|
|
15583
|
+
exports.isLanguageTag = isLanguageTag;
|
|
15584
|
+
exports.languageTagGuard = languageTagGuard;
|
|
15585
|
+
|
|
15586
|
+
|
|
14919
15587
|
/***/ })
|
|
14920
15588
|
|
|
14921
15589
|
/******/ });
|
|
@@ -14972,7 +15640,7 @@ module.exports = require("zlib");
|
|
|
14972
15640
|
/******/ // startup
|
|
14973
15641
|
/******/ // Load entry module and return exports
|
|
14974
15642
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
14975
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
15643
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(616);
|
|
14976
15644
|
/******/ module.exports = __webpack_exports__;
|
|
14977
15645
|
/******/
|
|
14978
15646
|
/******/ })()
|