@rspack/core 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/compiled/browserslist-load-config/index.d.ts +10 -0
- package/compiled/browserslist-load-config/index.js +266 -0
- package/compiled/browserslist-load-config/license +21 -0
- package/compiled/browserslist-load-config/package.json +1 -0
- package/compiled/watchpack/index.js +18 -14
- package/compiled/watchpack/package.json +1 -1
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +7 -3
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +1 -0
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +1 -1
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +1 -1
- package/compiled/zod/index.js +33 -33
- package/compiled/zod/package.json +1 -1
- package/dist/config/browserslistTargetHandler.d.ts +0 -6
- package/dist/exports.d.ts +1 -0
- package/dist/index.js +21 -49
- package/dist/stats/statsFactoryUtils.d.ts +24 -0
- package/module.d.ts +53 -21
- package/package.json +11 -12
- package/compiled/browserslist/index.d.ts +0 -1
- package/compiled/browserslist/index.js +0 -2123
- package/compiled/browserslist/license +0 -20
- package/compiled/browserslist/package.json +0 -1
package/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<picture>
|
2
|
-
<img alt="Rspack Banner" src="https://assets.rspack.
|
2
|
+
<img alt="Rspack Banner" src="https://assets.rspack.rs/rspack/rspack-banner.png">
|
3
3
|
</picture>
|
4
4
|
|
5
5
|
# @rspack/core
|
@@ -8,7 +8,7 @@ The fast Rust-based web bundler with webpack-compatible API.
|
|
8
8
|
|
9
9
|
## Documentation
|
10
10
|
|
11
|
-
See <https://rspack.
|
11
|
+
See <https://rspack.rs> for details.
|
12
12
|
|
13
13
|
## License
|
14
14
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
declare function findConfig(from: string): Record<string, string[]> | undefined;
|
2
|
+
type LoadConfigOptions = {
|
3
|
+
config?: string;
|
4
|
+
path?: string;
|
5
|
+
env?: string;
|
6
|
+
};
|
7
|
+
declare function loadConfig(opts: LoadConfigOptions): string[] | undefined;
|
8
|
+
|
9
|
+
export { findConfig, loadConfig };
|
10
|
+
export type { LoadConfigOptions };
|
@@ -0,0 +1,266 @@
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
2
|
+
/******/ "use strict";
|
3
|
+
/******/ var __webpack_modules__ = ({
|
4
|
+
|
5
|
+
/***/ 24:
|
6
|
+
/***/ ((module) => {
|
7
|
+
|
8
|
+
module.exports = require("node:fs");
|
9
|
+
|
10
|
+
/***/ }),
|
11
|
+
|
12
|
+
/***/ 760:
|
13
|
+
/***/ ((module) => {
|
14
|
+
|
15
|
+
module.exports = require("node:path");
|
16
|
+
|
17
|
+
/***/ }),
|
18
|
+
|
19
|
+
/***/ 725:
|
20
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
21
|
+
|
22
|
+
|
23
|
+
// The require scope
|
24
|
+
var __nested_webpack_require_39__ = {};
|
25
|
+
/************************************************************************/ // webpack/runtime/compat_get_default_export
|
26
|
+
(()=>{
|
27
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
28
|
+
__nested_webpack_require_39__.n = function(module) {
|
29
|
+
var getter = module && module.__esModule ? function() {
|
30
|
+
return module['default'];
|
31
|
+
} : function() {
|
32
|
+
return module;
|
33
|
+
};
|
34
|
+
__nested_webpack_require_39__.d(getter, {
|
35
|
+
a: getter
|
36
|
+
});
|
37
|
+
return getter;
|
38
|
+
};
|
39
|
+
})();
|
40
|
+
// webpack/runtime/define_property_getters
|
41
|
+
(()=>{
|
42
|
+
__nested_webpack_require_39__.d = function(exports1, definition) {
|
43
|
+
for(var key in definition)if (__nested_webpack_require_39__.o(definition, key) && !__nested_webpack_require_39__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
44
|
+
enumerable: true,
|
45
|
+
get: definition[key]
|
46
|
+
});
|
47
|
+
};
|
48
|
+
})();
|
49
|
+
// webpack/runtime/has_own_property
|
50
|
+
(()=>{
|
51
|
+
__nested_webpack_require_39__.o = function(obj, prop) {
|
52
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
53
|
+
};
|
54
|
+
})();
|
55
|
+
// webpack/runtime/make_namespace_object
|
56
|
+
(()=>{
|
57
|
+
// define __esModule on exports
|
58
|
+
__nested_webpack_require_39__.r = function(exports1) {
|
59
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
60
|
+
value: 'Module'
|
61
|
+
});
|
62
|
+
Object.defineProperty(exports1, '__esModule', {
|
63
|
+
value: true
|
64
|
+
});
|
65
|
+
};
|
66
|
+
})();
|
67
|
+
/************************************************************************/ var __nested_webpack_exports__ = {};
|
68
|
+
// ESM COMPAT FLAG
|
69
|
+
__nested_webpack_require_39__.r(__nested_webpack_exports__);
|
70
|
+
// EXPORTS
|
71
|
+
__nested_webpack_require_39__.d(__nested_webpack_exports__, {
|
72
|
+
findConfig: ()=>/* binding */ findConfig,
|
73
|
+
loadConfig: ()=>/* binding */ loadConfig
|
74
|
+
});
|
75
|
+
const external_node_fs_namespaceObject = __nccwpck_require__(24);
|
76
|
+
var external_node_fs_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_fs_namespaceObject);
|
77
|
+
const external_node_path_namespaceObject = __nccwpck_require__(760);
|
78
|
+
var external_node_path_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_path_namespaceObject);
|
79
|
+
function _define_property(obj, key, value) {
|
80
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
81
|
+
value: value,
|
82
|
+
enumerable: true,
|
83
|
+
configurable: true,
|
84
|
+
writable: true
|
85
|
+
});
|
86
|
+
else obj[key] = value;
|
87
|
+
return obj;
|
88
|
+
}
|
89
|
+
class BrowserslistError extends Error {
|
90
|
+
constructor(message){
|
91
|
+
super(message), _define_property(this, "browserslist", void 0);
|
92
|
+
this.name = 'BrowserslistError';
|
93
|
+
this.browserslist = true;
|
94
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, BrowserslistError);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
const isFileCache = {};
|
98
|
+
function isFile(file) {
|
99
|
+
if (file in isFileCache) return isFileCache[file];
|
100
|
+
const result = external_node_fs_default().existsSync(file) && external_node_fs_default().statSync(file).isFile();
|
101
|
+
isFileCache[file] = result;
|
102
|
+
return result;
|
103
|
+
}
|
104
|
+
function check(section) {
|
105
|
+
const FORMAT = 'Browserslist config should be a string or an array of strings with browser queries';
|
106
|
+
if (Array.isArray(section)) {
|
107
|
+
for(let i = 0; i < section.length; i++)if ('string' != typeof section[i]) throw new BrowserslistError(FORMAT);
|
108
|
+
} else if ('string' != typeof section) throw new BrowserslistError(FORMAT);
|
109
|
+
}
|
110
|
+
function parsePackage(file) {
|
111
|
+
const config = JSON.parse(external_node_fs_default().readFileSync(file).toString().replace(/^\uFEFF/m, ''));
|
112
|
+
if (config.browserlist && !config.browserslist) throw new BrowserslistError(`\`browserlist\` key instead of \`browserslist\` in ${file}`);
|
113
|
+
let list = config.browserslist;
|
114
|
+
if (Array.isArray(list)) list = {
|
115
|
+
defaults: list
|
116
|
+
};
|
117
|
+
if ('string' == typeof list) list = parseConfig(list);
|
118
|
+
for(const i in list)check(list[i]);
|
119
|
+
return list;
|
120
|
+
}
|
121
|
+
const IS_SECTION = /^\s*\[(.+)]\s*$/;
|
122
|
+
function parseConfig(string) {
|
123
|
+
const result = {
|
124
|
+
defaults: []
|
125
|
+
};
|
126
|
+
let sections = [
|
127
|
+
'defaults'
|
128
|
+
];
|
129
|
+
string.toString().replace(/#[^\n]*/g, '').split(/\n|,/).map((line)=>line.trim()).filter((line)=>'' !== line).forEach((line)=>{
|
130
|
+
const matched = line.match(IS_SECTION);
|
131
|
+
if (matched) {
|
132
|
+
sections = matched[1].trim().split(' ');
|
133
|
+
sections.forEach((section)=>{
|
134
|
+
if (result[section]) throw new BrowserslistError(`Duplicate section ${section} in Browserslist config`);
|
135
|
+
result[section] = [];
|
136
|
+
});
|
137
|
+
} else sections.forEach((section)=>{
|
138
|
+
result[section].push(line);
|
139
|
+
});
|
140
|
+
});
|
141
|
+
return result;
|
142
|
+
}
|
143
|
+
function readConfig(file) {
|
144
|
+
if (!isFile(file)) throw new BrowserslistError(`Can't read ${file} config`);
|
145
|
+
return parseConfig(external_node_fs_default().readFileSync(file, 'utf-8'));
|
146
|
+
}
|
147
|
+
function parsePackageOrReadConfig(file) {
|
148
|
+
if ('package.json' === external_node_path_default().basename(file)) return parsePackage(file);
|
149
|
+
return readConfig(file);
|
150
|
+
}
|
151
|
+
function pickEnv(config, opts) {
|
152
|
+
if ('object' != typeof config) return config;
|
153
|
+
let name;
|
154
|
+
if ('string' == typeof opts.env) name = opts.env;
|
155
|
+
else if (process.env.BROWSERSLIST_ENV) name = process.env.BROWSERSLIST_ENV;
|
156
|
+
else if (process.env.NODE_ENV) name = process.env.NODE_ENV;
|
157
|
+
else name = 'production';
|
158
|
+
return config[name] || config.defaults;
|
159
|
+
}
|
160
|
+
function eachParent(file, callback) {
|
161
|
+
const dir = isFile(file) ? external_node_path_default().dirname(file) : file;
|
162
|
+
let loc = external_node_path_default().resolve(dir);
|
163
|
+
do {
|
164
|
+
const result = callback(loc);
|
165
|
+
if (void 0 !== result) return result;
|
166
|
+
}while (loc !== (loc = external_node_path_default().dirname(loc)));
|
167
|
+
}
|
168
|
+
function findConfigFile(from) {
|
169
|
+
return eachParent(from, (dir)=>{
|
170
|
+
const config = external_node_path_default().join(dir, 'browserslist');
|
171
|
+
const pkg = external_node_path_default().join(dir, 'package.json');
|
172
|
+
const rc = external_node_path_default().join(dir, '.browserslistrc');
|
173
|
+
let pkgBrowserslist;
|
174
|
+
if (isFile(pkg)) try {
|
175
|
+
pkgBrowserslist = parsePackage(pkg);
|
176
|
+
} catch (e) {
|
177
|
+
if (e instanceof BrowserslistError) throw e;
|
178
|
+
console.warn(`[Browserslist] Could not parse ${pkg}. Ignoring it.`);
|
179
|
+
}
|
180
|
+
if (isFile(config) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both browserslist and package.json with browsers`);
|
181
|
+
if (isFile(rc) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both .browserslistrc and package.json with browsers`);
|
182
|
+
if (isFile(config) && isFile(rc)) throw new BrowserslistError(`${dir} contains both .browserslistrc and browserslist`);
|
183
|
+
if (isFile(config)) return config;
|
184
|
+
if (isFile(rc)) return rc;
|
185
|
+
if (pkgBrowserslist) return pkg;
|
186
|
+
});
|
187
|
+
}
|
188
|
+
const configCache = {};
|
189
|
+
function findConfig(from) {
|
190
|
+
from = external_node_path_default().resolve(from);
|
191
|
+
const fromDir = isFile(from) ? external_node_path_default().dirname(from) : from;
|
192
|
+
if (fromDir in configCache) return configCache[fromDir];
|
193
|
+
let resolved;
|
194
|
+
const configFile = findConfigFile(from);
|
195
|
+
if (configFile) resolved = parsePackageOrReadConfig(configFile);
|
196
|
+
const configDir = configFile && external_node_path_default().dirname(configFile);
|
197
|
+
eachParent(from, (dir)=>{
|
198
|
+
if (resolved) configCache[dir] = resolved;
|
199
|
+
if (dir === configDir) return null;
|
200
|
+
});
|
201
|
+
return resolved;
|
202
|
+
}
|
203
|
+
function loadConfig(opts) {
|
204
|
+
if (opts.config) return pickEnv(parsePackageOrReadConfig(opts.config), opts);
|
205
|
+
if (opts.path) {
|
206
|
+
const config = findConfig(opts.path);
|
207
|
+
if (!config) return;
|
208
|
+
return pickEnv(config, opts);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
var __webpack_export_target__ = exports;
|
212
|
+
for(var i in __nested_webpack_exports__)__webpack_export_target__[i] = __nested_webpack_exports__[i];
|
213
|
+
if (__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
214
|
+
value: true
|
215
|
+
});
|
216
|
+
|
217
|
+
|
218
|
+
/***/ })
|
219
|
+
|
220
|
+
/******/ });
|
221
|
+
/************************************************************************/
|
222
|
+
/******/ // The module cache
|
223
|
+
/******/ var __webpack_module_cache__ = {};
|
224
|
+
/******/
|
225
|
+
/******/ // The require function
|
226
|
+
/******/ function __nccwpck_require__(moduleId) {
|
227
|
+
/******/ // Check if module is in cache
|
228
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
229
|
+
/******/ if (cachedModule !== undefined) {
|
230
|
+
/******/ return cachedModule.exports;
|
231
|
+
/******/ }
|
232
|
+
/******/ // Create a new module (and put it into the cache)
|
233
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
234
|
+
/******/ // no module.id needed
|
235
|
+
/******/ // no module.loaded needed
|
236
|
+
/******/ exports: {}
|
237
|
+
/******/ };
|
238
|
+
/******/
|
239
|
+
/******/ // Execute the module function
|
240
|
+
/******/ var threw = true;
|
241
|
+
/******/ try {
|
242
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
243
|
+
/******/ threw = false;
|
244
|
+
/******/ } finally {
|
245
|
+
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
246
|
+
/******/ }
|
247
|
+
/******/
|
248
|
+
/******/ // Return the exports of the module
|
249
|
+
/******/ return module.exports;
|
250
|
+
/******/ }
|
251
|
+
/******/
|
252
|
+
/************************************************************************/
|
253
|
+
/******/ /* webpack/runtime/compat */
|
254
|
+
/******/
|
255
|
+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
256
|
+
/******/
|
257
|
+
/************************************************************************/
|
258
|
+
/******/
|
259
|
+
/******/ // startup
|
260
|
+
/******/ // Load entry module and return exports
|
261
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
262
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(725);
|
263
|
+
/******/ module.exports = __webpack_exports__;
|
264
|
+
/******/
|
265
|
+
/******/ })()
|
266
|
+
;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Rspack Contrib
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"browserslist-load-config","version":"1.0.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
@@ -138,7 +138,7 @@ module.exports = function (glob, opts) {
|
|
138
138
|
|
139
139
|
/***/ }),
|
140
140
|
|
141
|
-
/***/
|
141
|
+
/***/ 799:
|
142
142
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
143
143
|
|
144
144
|
"use strict";
|
@@ -152,13 +152,15 @@ const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
|
152
152
|
const fs = __nccwpck_require__(923);
|
153
153
|
const path = __nccwpck_require__(928);
|
154
154
|
|
155
|
-
const watchEventSource = __nccwpck_require__(
|
155
|
+
const watchEventSource = __nccwpck_require__(214);
|
156
156
|
|
157
157
|
const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
|
158
158
|
|
159
159
|
let FS_ACCURACY = 2000;
|
160
160
|
|
161
161
|
const IS_OSX = (__nccwpck_require__(857).platform)() === "darwin";
|
162
|
+
const IS_WIN = (__nccwpck_require__(857).platform)() === "win32";
|
163
|
+
|
162
164
|
const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING;
|
163
165
|
const FORCE_POLLING =
|
164
166
|
`${+WATCHPACK_POLLING}` === WATCHPACK_POLLING
|
@@ -777,7 +779,9 @@ class DirectoryWatcher extends EventEmitter {
|
|
777
779
|
err2.code === "ENOENT" ||
|
778
780
|
err2.code === "EPERM" ||
|
779
781
|
err2.code === "EACCES" ||
|
780
|
-
err2.code === "EBUSY"
|
782
|
+
err2.code === "EBUSY" ||
|
783
|
+
// TODO https://github.com/libuv/libuv/pull/4566
|
784
|
+
(err2.code === "EINVAL" && IS_WIN)
|
781
785
|
) {
|
782
786
|
this.setMissing(itemPath, initial, "scan (" + err2.code + ")");
|
783
787
|
} else {
|
@@ -933,7 +937,7 @@ function ensureFsAccuracy(mtime) {
|
|
933
937
|
|
934
938
|
/***/ }),
|
935
939
|
|
936
|
-
/***/
|
940
|
+
/***/ 308:
|
937
941
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
938
942
|
|
939
943
|
"use strict";
|
@@ -1048,7 +1052,7 @@ module.exports = LinkResolver;
|
|
1048
1052
|
|
1049
1053
|
/***/ }),
|
1050
1054
|
|
1051
|
-
/***/
|
1055
|
+
/***/ 847:
|
1052
1056
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1053
1057
|
|
1054
1058
|
"use strict";
|
@@ -1059,7 +1063,7 @@ module.exports = LinkResolver;
|
|
1059
1063
|
|
1060
1064
|
|
1061
1065
|
const path = __nccwpck_require__(928);
|
1062
|
-
const DirectoryWatcher = __nccwpck_require__(
|
1066
|
+
const DirectoryWatcher = __nccwpck_require__(799);
|
1063
1067
|
|
1064
1068
|
class WatcherManager {
|
1065
1069
|
constructor(options) {
|
@@ -1108,7 +1112,7 @@ module.exports.WatcherManager = WatcherManager;
|
|
1108
1112
|
|
1109
1113
|
/***/ }),
|
1110
1114
|
|
1111
|
-
/***/
|
1115
|
+
/***/ 935:
|
1112
1116
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1113
1117
|
|
1114
1118
|
"use strict";
|
@@ -1254,7 +1258,7 @@ module.exports = (plan, limit) => {
|
|
1254
1258
|
|
1255
1259
|
/***/ }),
|
1256
1260
|
|
1257
|
-
/***/
|
1261
|
+
/***/ 214:
|
1258
1262
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
1259
1263
|
|
1260
1264
|
"use strict";
|
@@ -1267,7 +1271,7 @@ module.exports = (plan, limit) => {
|
|
1267
1271
|
const fs = __nccwpck_require__(896);
|
1268
1272
|
const path = __nccwpck_require__(928);
|
1269
1273
|
const { EventEmitter } = __nccwpck_require__(434);
|
1270
|
-
const reducePlan = __nccwpck_require__(
|
1274
|
+
const reducePlan = __nccwpck_require__(935);
|
1271
1275
|
|
1272
1276
|
const IS_OSX = (__nccwpck_require__(857).platform)() === "darwin";
|
1273
1277
|
const IS_WIN = (__nccwpck_require__(857).platform)() === "win32";
|
@@ -1633,7 +1637,7 @@ exports.watcherLimit = watcherLimit;
|
|
1633
1637
|
|
1634
1638
|
/***/ }),
|
1635
1639
|
|
1636
|
-
/***/
|
1640
|
+
/***/ 882:
|
1637
1641
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1638
1642
|
|
1639
1643
|
"use strict";
|
@@ -1643,11 +1647,11 @@ exports.watcherLimit = watcherLimit;
|
|
1643
1647
|
*/
|
1644
1648
|
|
1645
1649
|
|
1646
|
-
const getWatcherManager = __nccwpck_require__(
|
1647
|
-
const LinkResolver = __nccwpck_require__(
|
1650
|
+
const getWatcherManager = __nccwpck_require__(847);
|
1651
|
+
const LinkResolver = __nccwpck_require__(308);
|
1648
1652
|
const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
1649
1653
|
const globToRegExp = __nccwpck_require__(137);
|
1650
|
-
const watchEventSource = __nccwpck_require__(
|
1654
|
+
const watchEventSource = __nccwpck_require__(214);
|
1651
1655
|
|
1652
1656
|
const EMPTY_ARRAY = [];
|
1653
1657
|
const EMPTY_OPTIONS = {};
|
@@ -2116,7 +2120,7 @@ module.exports = require("path");
|
|
2116
2120
|
/******/ // startup
|
2117
2121
|
/******/ // Load entry module and return exports
|
2118
2122
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
2119
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
2123
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(882);
|
2120
2124
|
/******/ module.exports = __webpack_exports__;
|
2121
2125
|
/******/
|
2122
2126
|
/******/ })()
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"watchpack","author":"Tobias Koppers @sokra","version":"2.4.
|
1
|
+
{"name":"watchpack","author":"Tobias Koppers @sokra","version":"2.4.4","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
@@ -399,6 +399,7 @@ export interface ZodArray<T extends core.$ZodType = core.$ZodType> extends ZodTy
|
|
399
399
|
nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
|
400
400
|
max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
|
401
401
|
length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
|
402
|
+
unwrap(): T;
|
402
403
|
}
|
403
404
|
export declare const ZodArray: core.$constructor<ZodArray>;
|
404
405
|
export declare function array<T extends core.$ZodType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
|
@@ -421,10 +422,13 @@ out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.
|
|
421
422
|
strip(): ZodObject<Shape, core.$strict>;
|
422
423
|
extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.$ZodType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
|
423
424
|
/**
|
424
|
-
* @deprecated Use
|
425
|
+
* @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
|
425
426
|
*
|
426
427
|
* ```ts
|
427
|
-
* z.object({
|
428
|
+
* const A = z.object({ a: z.string() });
|
429
|
+
* const B = z.object({ b: z.number() });
|
430
|
+
*
|
431
|
+
* const C = z.object({
|
428
432
|
* ...A.shape,
|
429
433
|
* ...B.shape
|
430
434
|
* });
|
@@ -637,7 +641,7 @@ export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: str
|
|
637
641
|
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
638
642
|
export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>, params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
639
643
|
type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
|
640
|
-
declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>>;
|
644
|
+
declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
|
641
645
|
export { _instanceof as instanceof };
|
642
646
|
export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodPipe<ZodUnknown, ZodBoolean>;
|
643
647
|
export type ZodJSONSchema = ZodUnion<[
|
@@ -36,6 +36,7 @@ export declare const ip: RegExp;
|
|
36
36
|
export declare const base64: RegExp;
|
37
37
|
export declare const base64url: RegExp;
|
38
38
|
export declare const hostname: RegExp;
|
39
|
+
export declare const domain: RegExp;
|
39
40
|
export declare const e164: RegExp;
|
40
41
|
export declare const date: RegExp;
|
41
42
|
export declare function time(args: {
|
@@ -22,7 +22,7 @@ export interface ParsePayload<T = unknown> {
|
|
22
22
|
}
|
23
23
|
export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
|
24
24
|
export interface $ZodTypeDef {
|
25
|
-
type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "
|
25
|
+
type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "custom";
|
26
26
|
error?: errors.$ZodErrorMap<never> | undefined;
|
27
27
|
checks?: checks.$ZodCheck<never>[];
|
28
28
|
}
|
@@ -388,7 +388,7 @@ export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _p
|
|
388
388
|
declare abstract class Class {
|
389
389
|
constructor(..._args: any[]);
|
390
390
|
}
|
391
|
-
declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>>;
|
391
|
+
declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>, InstanceType<T>>;
|
392
392
|
export { _instanceof as instanceof };
|
393
393
|
export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniPipe<ZodMiniUnknown, ZodMiniBoolean<boolean>>;
|
394
394
|
export type ZodMiniJSONSchema = ZodMiniLazy<ZodMiniUnion<[
|