vite 6.0.0-beta.9 → 6.0.1
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/LICENSE.md +247 -13
- package/client.d.ts +4 -0
- package/dist/client/client.mjs +23 -4
- package/dist/node/chunks/dep-3RmXg9uo.js +553 -0
- package/dist/node/chunks/{dep-CG5ueZZV.js → dep-BcnkIxro.js} +20845 -16266
- package/dist/node/chunks/dep-BnwAUvl5.js +822 -0
- package/dist/node/chunks/{dep-CdoEeCn3.js → dep-DnSxfB-q.js} +0 -4
- package/dist/node/chunks/dep-ab_8SKHY.js +7002 -0
- package/dist/node/cli.js +7 -8
- package/dist/node/constants.js +13 -18
- package/dist/node/index.d.ts +235 -111
- package/dist/node/index.js +5 -6
- package/dist/node/module-runner.d.ts +5 -3
- package/dist/node/module-runner.js +61 -33
- package/dist/node-cjs/publicUtils.cjs +2699 -2747
- package/index.cjs +35 -3
- package/misc/false.js +1 -0
- package/misc/true.js +1 -0
- package/package.json +27 -26
- package/dist/node/chunks/dep-BLfo3Ie2.js +0 -7377
- package/dist/node/chunks/dep-DIgjieZc.js +0 -913
- package/dist/node/chunks/dep-mtw2NpNs.js +0 -589
package/LICENSE.md
CHANGED
@@ -401,20 +401,26 @@ Repository: rollup/plugins
|
|
401
401
|
|
402
402
|
---------------------------------------
|
403
403
|
|
404
|
-
##
|
405
|
-
License:
|
406
|
-
By:
|
407
|
-
|
404
|
+
## anymatch
|
405
|
+
License: ISC
|
406
|
+
By: Elan Shanker
|
407
|
+
Repository: https://github.com/micromatch/anymatch
|
408
408
|
|
409
|
-
>
|
410
|
-
>
|
411
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
409
|
+
> The ISC License
|
412
410
|
>
|
413
|
-
>
|
411
|
+
> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
|
414
412
|
>
|
415
|
-
>
|
413
|
+
> Permission to use, copy, modify, and/or distribute this software for any
|
414
|
+
> purpose with or without fee is hereby granted, provided that the above
|
415
|
+
> copyright notice and this permission notice appear in all copies.
|
416
416
|
>
|
417
|
-
> THE SOFTWARE IS PROVIDED "AS IS"
|
417
|
+
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
418
|
+
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
419
|
+
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
420
|
+
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
421
|
+
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
422
|
+
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
423
|
+
> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
418
424
|
|
419
425
|
---------------------------------------
|
420
426
|
|
@@ -448,6 +454,78 @@ Repository: git+https://github.com/sapphi-red/artichokie.git
|
|
448
454
|
|
449
455
|
---------------------------------------
|
450
456
|
|
457
|
+
## binary-extensions
|
458
|
+
License: MIT
|
459
|
+
By: Sindre Sorhus
|
460
|
+
Repository: sindresorhus/binary-extensions
|
461
|
+
|
462
|
+
> MIT License
|
463
|
+
>
|
464
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
465
|
+
> Copyright (c) Paul Miller (https://paulmillr.com)
|
466
|
+
>
|
467
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
468
|
+
>
|
469
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
470
|
+
>
|
471
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
472
|
+
|
473
|
+
---------------------------------------
|
474
|
+
|
475
|
+
## braces, fill-range, is-number
|
476
|
+
License: MIT
|
477
|
+
By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
|
478
|
+
Repository: micromatch/braces
|
479
|
+
|
480
|
+
License: MIT
|
481
|
+
By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
|
482
|
+
Repository: jonschlinkert/fill-range
|
483
|
+
|
484
|
+
License: MIT
|
485
|
+
By: Jon Schlinkert, Olsten Larck, Rouven Weßling
|
486
|
+
Repository: jonschlinkert/is-number
|
487
|
+
|
488
|
+
> The MIT License (MIT)
|
489
|
+
>
|
490
|
+
> Copyright (c) 2014-present, Jon Schlinkert.
|
491
|
+
>
|
492
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
493
|
+
> of this software and associated documentation files (the "Software"), to deal
|
494
|
+
> in the Software without restriction, including without limitation the rights
|
495
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
496
|
+
> copies of the Software, and to permit persons to whom the Software is
|
497
|
+
> furnished to do so, subject to the following conditions:
|
498
|
+
>
|
499
|
+
> The above copyright notice and this permission notice shall be included in
|
500
|
+
> all copies or substantial portions of the Software.
|
501
|
+
>
|
502
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
503
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
504
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
505
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
506
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
507
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
508
|
+
> THE SOFTWARE.
|
509
|
+
|
510
|
+
---------------------------------------
|
511
|
+
|
512
|
+
## bundle-name, default-browser, default-browser-id, define-lazy-prop, is-docker, is-inside-container, is-wsl, open, run-applescript
|
513
|
+
License: MIT
|
514
|
+
By: Sindre Sorhus
|
515
|
+
Repositories: sindresorhus/bundle-name, sindresorhus/default-browser, sindresorhus/default-browser-id, sindresorhus/define-lazy-prop, sindresorhus/is-docker, sindresorhus/is-inside-container, sindresorhus/is-wsl, sindresorhus/open, sindresorhus/run-applescript
|
516
|
+
|
517
|
+
> MIT License
|
518
|
+
>
|
519
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
520
|
+
>
|
521
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
522
|
+
>
|
523
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
524
|
+
>
|
525
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
526
|
+
|
527
|
+
---------------------------------------
|
528
|
+
|
451
529
|
## cac
|
452
530
|
License: MIT
|
453
531
|
By: egoist
|
@@ -479,12 +557,12 @@ Repository: egoist/cac
|
|
479
557
|
|
480
558
|
## chokidar
|
481
559
|
License: MIT
|
482
|
-
By: Paul Miller
|
560
|
+
By: Paul Miller, Elan Shanker
|
483
561
|
Repository: git+https://github.com/paulmillr/chokidar.git
|
484
562
|
|
485
563
|
> The MIT License (MIT)
|
486
564
|
>
|
487
|
-
> Copyright (c) 2012 Paul Miller (https://paulmillr.com), Elan Shanker
|
565
|
+
> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
|
488
566
|
>
|
489
567
|
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
490
568
|
> of this software and associated documentation files (the “Software”), to deal
|
@@ -1026,7 +1104,7 @@ Repository: pillarjs/finalhandler
|
|
1026
1104
|
## follow-redirects
|
1027
1105
|
License: MIT
|
1028
1106
|
By: Ruben Verborgh, Olivier Lalonde, James Talmage
|
1029
|
-
Repository: git@github.com
|
1107
|
+
Repository: git+ssh://git@github.com/follow-redirects/follow-redirects.git
|
1030
1108
|
|
1031
1109
|
> Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh
|
1032
1110
|
>
|
@@ -1078,6 +1156,29 @@ Repository: git+https://github.com/css-modules/generic-names.git
|
|
1078
1156
|
|
1079
1157
|
---------------------------------------
|
1080
1158
|
|
1159
|
+
## glob-parent
|
1160
|
+
License: ISC
|
1161
|
+
By: Gulp Team, Elan Shanker, Blaine Bublitz
|
1162
|
+
Repository: gulpjs/glob-parent
|
1163
|
+
|
1164
|
+
> The ISC License
|
1165
|
+
>
|
1166
|
+
> Copyright (c) 2015, 2019 Elan Shanker
|
1167
|
+
>
|
1168
|
+
> Permission to use, copy, modify, and/or distribute this software for any
|
1169
|
+
> purpose with or without fee is hereby granted, provided that the above
|
1170
|
+
> copyright notice and this permission notice appear in all copies.
|
1171
|
+
>
|
1172
|
+
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
1173
|
+
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
1174
|
+
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
1175
|
+
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
1176
|
+
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
1177
|
+
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
1178
|
+
> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
1179
|
+
|
1180
|
+
---------------------------------------
|
1181
|
+
|
1081
1182
|
## http-proxy
|
1082
1183
|
License: MIT
|
1083
1184
|
By: Charlie Robbins, jcrugzz <jcrugzz@gmail.com>
|
@@ -1122,6 +1223,81 @@ Repository: git+https://github.com/css-modules/icss-utils.git
|
|
1122
1223
|
|
1123
1224
|
---------------------------------------
|
1124
1225
|
|
1226
|
+
## is-binary-path
|
1227
|
+
License: MIT
|
1228
|
+
By: Sindre Sorhus
|
1229
|
+
Repository: sindresorhus/is-binary-path
|
1230
|
+
|
1231
|
+
> MIT License
|
1232
|
+
>
|
1233
|
+
> Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
|
1234
|
+
>
|
1235
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1236
|
+
>
|
1237
|
+
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
1238
|
+
>
|
1239
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1240
|
+
|
1241
|
+
---------------------------------------
|
1242
|
+
|
1243
|
+
## is-extglob
|
1244
|
+
License: MIT
|
1245
|
+
By: Jon Schlinkert
|
1246
|
+
Repository: jonschlinkert/is-extglob
|
1247
|
+
|
1248
|
+
> The MIT License (MIT)
|
1249
|
+
>
|
1250
|
+
> Copyright (c) 2014-2016, Jon Schlinkert
|
1251
|
+
>
|
1252
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1253
|
+
> of this software and associated documentation files (the "Software"), to deal
|
1254
|
+
> in the Software without restriction, including without limitation the rights
|
1255
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1256
|
+
> copies of the Software, and to permit persons to whom the Software is
|
1257
|
+
> furnished to do so, subject to the following conditions:
|
1258
|
+
>
|
1259
|
+
> The above copyright notice and this permission notice shall be included in
|
1260
|
+
> all copies or substantial portions of the Software.
|
1261
|
+
>
|
1262
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1263
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1264
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1265
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1266
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1267
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1268
|
+
> THE SOFTWARE.
|
1269
|
+
|
1270
|
+
---------------------------------------
|
1271
|
+
|
1272
|
+
## is-glob
|
1273
|
+
License: MIT
|
1274
|
+
By: Jon Schlinkert, Brian Woodward, Daniel Perez
|
1275
|
+
Repository: micromatch/is-glob
|
1276
|
+
|
1277
|
+
> The MIT License (MIT)
|
1278
|
+
>
|
1279
|
+
> Copyright (c) 2014-2017, Jon Schlinkert.
|
1280
|
+
>
|
1281
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1282
|
+
> of this software and associated documentation files (the "Software"), to deal
|
1283
|
+
> in the Software without restriction, including without limitation the rights
|
1284
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1285
|
+
> copies of the Software, and to permit persons to whom the Software is
|
1286
|
+
> furnished to do so, subject to the following conditions:
|
1287
|
+
>
|
1288
|
+
> The above copyright notice and this permission notice shall be included in
|
1289
|
+
> all copies or substantial portions of the Software.
|
1290
|
+
>
|
1291
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1292
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1293
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1294
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1295
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1296
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1297
|
+
> THE SOFTWARE.
|
1298
|
+
|
1299
|
+
---------------------------------------
|
1300
|
+
|
1125
1301
|
## is-reference
|
1126
1302
|
License: MIT
|
1127
1303
|
By: Rich Harris
|
@@ -1422,6 +1598,35 @@ Repository: vercel/ms
|
|
1422
1598
|
|
1423
1599
|
---------------------------------------
|
1424
1600
|
|
1601
|
+
## normalize-path
|
1602
|
+
License: MIT
|
1603
|
+
By: Jon Schlinkert, Blaine Bublitz
|
1604
|
+
Repository: jonschlinkert/normalize-path
|
1605
|
+
|
1606
|
+
> The MIT License (MIT)
|
1607
|
+
>
|
1608
|
+
> Copyright (c) 2014-2018, Jon Schlinkert.
|
1609
|
+
>
|
1610
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1611
|
+
> of this software and associated documentation files (the "Software"), to deal
|
1612
|
+
> in the Software without restriction, including without limitation the rights
|
1613
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1614
|
+
> copies of the Software, and to permit persons to whom the Software is
|
1615
|
+
> furnished to do so, subject to the following conditions:
|
1616
|
+
>
|
1617
|
+
> The above copyright notice and this permission notice shall be included in
|
1618
|
+
> all copies or substantial portions of the Software.
|
1619
|
+
>
|
1620
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1621
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1622
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1623
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1624
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1625
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1626
|
+
> THE SOFTWARE.
|
1627
|
+
|
1628
|
+
---------------------------------------
|
1629
|
+
|
1425
1630
|
## object-assign
|
1426
1631
|
License: MIT
|
1427
1632
|
By: Sindre Sorhus
|
@@ -2044,6 +2249,35 @@ Repository: git+https://github.com/SuperchupuDev/tinyglobby.git
|
|
2044
2249
|
|
2045
2250
|
---------------------------------------
|
2046
2251
|
|
2252
|
+
## to-regex-range
|
2253
|
+
License: MIT
|
2254
|
+
By: Jon Schlinkert, Rouven Weßling
|
2255
|
+
Repository: micromatch/to-regex-range
|
2256
|
+
|
2257
|
+
> The MIT License (MIT)
|
2258
|
+
>
|
2259
|
+
> Copyright (c) 2015-present, Jon Schlinkert.
|
2260
|
+
>
|
2261
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
2262
|
+
> of this software and associated documentation files (the "Software"), to deal
|
2263
|
+
> in the Software without restriction, including without limitation the rights
|
2264
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2265
|
+
> copies of the Software, and to permit persons to whom the Software is
|
2266
|
+
> furnished to do so, subject to the following conditions:
|
2267
|
+
>
|
2268
|
+
> The above copyright notice and this permission notice shall be included in
|
2269
|
+
> all copies or substantial portions of the Software.
|
2270
|
+
>
|
2271
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2272
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2273
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2274
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2275
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2276
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2277
|
+
> THE SOFTWARE.
|
2278
|
+
|
2279
|
+
---------------------------------------
|
2280
|
+
|
2047
2281
|
## tsconfck
|
2048
2282
|
License: MIT
|
2049
2283
|
By: dominikg
|
package/client.d.ts
CHANGED
package/dist/client/client.mjs
CHANGED
@@ -130,7 +130,9 @@ class HMRClient {
|
|
130
130
|
}
|
131
131
|
}
|
132
132
|
send(payload) {
|
133
|
-
this.transport.send(payload)
|
133
|
+
this.transport.send(payload).catch((err) => {
|
134
|
+
this.logger.error(err);
|
135
|
+
});
|
134
136
|
}
|
135
137
|
clear() {
|
136
138
|
this.hotModulesMap.clear();
|
@@ -235,6 +237,15 @@ function promiseWithResolvers() {
|
|
235
237
|
return { promise, resolve, reject };
|
236
238
|
}
|
237
239
|
|
240
|
+
function reviveInvokeError(e) {
|
241
|
+
const error = new Error(e.message || "Unknown invoke error");
|
242
|
+
Object.assign(error, e, {
|
243
|
+
// pass the whole error instead of just the stacktrace
|
244
|
+
// so that it gets formatted nicely with console.log
|
245
|
+
runnerError: new Error("RunnerError")
|
246
|
+
});
|
247
|
+
return error;
|
248
|
+
}
|
238
249
|
const createInvokeableTransport = (transport) => {
|
239
250
|
if (transport.invoke) {
|
240
251
|
return {
|
@@ -250,7 +261,7 @@ const createInvokeableTransport = (transport) => {
|
|
250
261
|
}
|
251
262
|
});
|
252
263
|
if ("e" in result) {
|
253
|
-
throw result.e;
|
264
|
+
throw reviveInvokeError(result.e);
|
254
265
|
}
|
255
266
|
return result.r;
|
256
267
|
}
|
@@ -337,7 +348,11 @@ const createInvokeableTransport = (transport) => {
|
|
337
348
|
reject(err);
|
338
349
|
});
|
339
350
|
}
|
340
|
-
|
351
|
+
try {
|
352
|
+
return await promise;
|
353
|
+
} catch (err) {
|
354
|
+
throw reviveInvokeError(err);
|
355
|
+
}
|
341
356
|
}
|
342
357
|
};
|
343
358
|
};
|
@@ -955,7 +970,11 @@ const enableOverlay = __HMR_ENABLE_OVERLAY__;
|
|
955
970
|
const hasDocument = "document" in globalThis;
|
956
971
|
function createErrorOverlay(err) {
|
957
972
|
clearErrorOverlay();
|
958
|
-
|
973
|
+
const { customElements } = globalThis;
|
974
|
+
if (customElements) {
|
975
|
+
const ErrorOverlayConstructor = customElements.get(overlayId);
|
976
|
+
document.body.appendChild(new ErrorOverlayConstructor(err));
|
977
|
+
}
|
959
978
|
}
|
960
979
|
function clearErrorOverlay() {
|
961
980
|
document.querySelectorAll(overlayId).forEach((n) => n.close());
|