vite 4.1.0-beta.0 → 4.1.0-beta.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 +13 -12
- package/dist/client/client.mjs +15 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-5a9137b7.js → dep-387affca.js} +710 -599
- package/dist/node/chunks/{dep-31fe3c68.js → dep-98d07f71.js} +7 -7
- package/dist/node/chunks/dep-ace95160.js +43 -0
- package/dist/node/chunks/{dep-41ca0ecb.js → dep-f597f42f.js} +3 -3
- package/dist/node/cli.js +10 -5
- package/dist/node/constants.js +3 -1
- package/dist/node/index.d.ts +18 -4
- package/dist/node/index.js +6 -1
- package/dist/node-cjs/publicUtils.cjs +2 -2
- package/package.json +21 -14
|
@@ -5,12 +5,13 @@ import { performance } from 'node:perf_hooks';
|
|
|
5
5
|
import { createRequire as createRequire$1, builtinModules } from 'node:module';
|
|
6
6
|
import require$$0$3 from 'tty';
|
|
7
7
|
import { transform as transform$2, formatMessages, build as build$3 } from 'esbuild';
|
|
8
|
-
import require$$0$4, { win32, posix, isAbsolute as isAbsolute$1, resolve as resolve$
|
|
8
|
+
import require$$0$4, { win32, posix, isAbsolute as isAbsolute$1, resolve as resolve$3, relative as relative$1, basename as basename$1, extname, dirname as dirname$1, join as join$1, sep, normalize } from 'path';
|
|
9
|
+
import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace } from './dep-ace95160.js';
|
|
9
10
|
import * as require$$0$2 from 'fs';
|
|
10
11
|
import require$$0__default, { existsSync, readFileSync, statSync as statSync$1, promises as promises$1, readdirSync } from 'fs';
|
|
11
12
|
import require$$0$5 from 'events';
|
|
12
|
-
import
|
|
13
|
-
import require$$0$6
|
|
13
|
+
import require$$5 from 'assert';
|
|
14
|
+
import require$$0$6 from 'util';
|
|
14
15
|
import require$$3$2 from 'net';
|
|
15
16
|
import require$$0$9 from 'url';
|
|
16
17
|
import require$$1$1 from 'http';
|
|
@@ -19,15 +20,19 @@ import require$$2 from 'os';
|
|
|
19
20
|
import require$$2$1 from 'child_process';
|
|
20
21
|
import os$3 from 'node:os';
|
|
21
22
|
import { createHash as createHash$2 } from 'node:crypto';
|
|
22
|
-
import { promisify as promisify$4 } from 'node:util';
|
|
23
|
+
import { promisify as promisify$4, format as format$2, inspect } from 'node:util';
|
|
23
24
|
import { promises } from 'node:dns';
|
|
24
|
-
import resolve$
|
|
25
|
-
import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, DEFAULT_EXTENSIONS as DEFAULT_EXTENSIONS$1, wildcardHosts, loopbackHosts, VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, ENV_ENTRY, DEFAULT_MAIN_FIELDS, SPECIAL_QUERY_RE, DEP_VERSION_RE, KNOWN_ASSET_TYPES, CSS_LANGS_RE, CLIENT_DIR, JS_TYPES_RE, ESBUILD_MODULES_TARGET, VERSION as VERSION$1, VITE_PACKAGE_DIR, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES } from '../constants.js';
|
|
26
|
-
import require$$5 from 'crypto';
|
|
25
|
+
import resolve$4 from 'resolve';
|
|
26
|
+
import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, DEFAULT_EXTENSIONS as DEFAULT_EXTENSIONS$1, wildcardHosts, loopbackHosts, VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, ENV_ENTRY, DEFAULT_MAIN_FIELDS, SPECIAL_QUERY_RE, DEP_VERSION_RE, KNOWN_ASSET_TYPES, CSS_LANGS_RE, CLIENT_DIR, JS_TYPES_RE, ESBUILD_MODULES_TARGET, VERSION as VERSION$1, VITE_PACKAGE_DIR, DEFAULT_DEV_PORT, DEFAULT_PREVIEW_PORT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES } from '../constants.js';
|
|
27
|
+
import require$$5$1 from 'crypto';
|
|
27
28
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
28
29
|
import require$$0$8, { createRequire as createRequire$2 } from 'module';
|
|
30
|
+
import assert$1 from 'node:assert';
|
|
31
|
+
import process$1 from 'node:process';
|
|
32
|
+
import v8 from 'node:v8';
|
|
29
33
|
import require$$1 from 'worker_threads';
|
|
30
34
|
import require$$0$a from 'zlib';
|
|
35
|
+
import require$$0$b from 'buffer';
|
|
31
36
|
import require$$1$2 from 'https';
|
|
32
37
|
import require$$4 from 'tls';
|
|
33
38
|
import { STATUS_CODES } from 'node:http';
|
|
@@ -46,40 +51,6 @@ const __filename = __cjs_fileURLToPath(import.meta.url);
|
|
|
46
51
|
const __dirname = __cjs_dirname(__filename);
|
|
47
52
|
const require = __cjs_createRequire(import.meta.url);
|
|
48
53
|
const __require = require;
|
|
49
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
50
|
-
|
|
51
|
-
function getDefaultExportFromCjs (x) {
|
|
52
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function getAugmentedNamespace(n) {
|
|
56
|
-
if (n.__esModule) return n;
|
|
57
|
-
var f = n.default;
|
|
58
|
-
if (typeof f == "function") {
|
|
59
|
-
var a = function a () {
|
|
60
|
-
if (this instanceof a) {
|
|
61
|
-
var args = [null];
|
|
62
|
-
args.push.apply(args, arguments);
|
|
63
|
-
var Ctor = Function.bind.apply(f, args);
|
|
64
|
-
return new Ctor();
|
|
65
|
-
}
|
|
66
|
-
return f.apply(this, arguments);
|
|
67
|
-
};
|
|
68
|
-
a.prototype = f.prototype;
|
|
69
|
-
} else a = {};
|
|
70
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
71
|
-
Object.keys(n).forEach(function (k) {
|
|
72
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
73
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function () {
|
|
76
|
-
return n[k];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
return a;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
54
|
var picocolorsExports = {};
|
|
84
55
|
var picocolors = {
|
|
85
56
|
get exports(){ return picocolorsExports; },
|
|
@@ -2659,7 +2630,7 @@ function getMatcherString(id, resolutionBase) {
|
|
|
2659
2630
|
return normalizePath$5(id);
|
|
2660
2631
|
}
|
|
2661
2632
|
// resolve('') is valid and will default to process.cwd()
|
|
2662
|
-
const basePath = normalizePath$5(resolve$
|
|
2633
|
+
const basePath = normalizePath$5(resolve$3(resolutionBase || ''))
|
|
2663
2634
|
// escape all possible (posix + win) path characters that might interfere with regex
|
|
2664
2635
|
.replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
|
|
2665
2636
|
// Note that we use posix.join because:
|
|
@@ -4685,7 +4656,7 @@ function requireSync () {
|
|
|
4685
4656
|
var minimatch = minimatch_1;
|
|
4686
4657
|
requireGlob().Glob;
|
|
4687
4658
|
var path = require$$0$4;
|
|
4688
|
-
var assert =
|
|
4659
|
+
var assert = require$$5;
|
|
4689
4660
|
var isAbsolute = require$$0$4.isAbsolute;
|
|
4690
4661
|
var common = common$c;
|
|
4691
4662
|
var setopts = common.setopts;
|
|
@@ -5352,7 +5323,7 @@ function requireGlob () {
|
|
|
5352
5323
|
var inherits = inheritsExports;
|
|
5353
5324
|
var EE = require$$0$5.EventEmitter;
|
|
5354
5325
|
var path = require$$0$4;
|
|
5355
|
-
var assert =
|
|
5326
|
+
var assert = require$$5;
|
|
5356
5327
|
var isAbsolute = require$$0$4.isAbsolute;
|
|
5357
5328
|
var globSync = requireSync();
|
|
5358
5329
|
var common = common$c;
|
|
@@ -6606,7 +6577,7 @@ class Mappings {
|
|
|
6606
6577
|
}
|
|
6607
6578
|
}
|
|
6608
6579
|
|
|
6609
|
-
const n = '\n';
|
|
6580
|
+
const n$1 = '\n';
|
|
6610
6581
|
|
|
6611
6582
|
const warned = {
|
|
6612
6583
|
insertLeft: false,
|
|
@@ -7071,30 +7042,30 @@ class MagicString {
|
|
|
7071
7042
|
}
|
|
7072
7043
|
|
|
7073
7044
|
lastLine() {
|
|
7074
|
-
let lineIndex = this.outro.lastIndexOf(n);
|
|
7045
|
+
let lineIndex = this.outro.lastIndexOf(n$1);
|
|
7075
7046
|
if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
|
|
7076
7047
|
let lineStr = this.outro;
|
|
7077
7048
|
let chunk = this.lastChunk;
|
|
7078
7049
|
do {
|
|
7079
7050
|
if (chunk.outro.length > 0) {
|
|
7080
|
-
lineIndex = chunk.outro.lastIndexOf(n);
|
|
7051
|
+
lineIndex = chunk.outro.lastIndexOf(n$1);
|
|
7081
7052
|
if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
|
|
7082
7053
|
lineStr = chunk.outro + lineStr;
|
|
7083
7054
|
}
|
|
7084
7055
|
|
|
7085
7056
|
if (chunk.content.length > 0) {
|
|
7086
|
-
lineIndex = chunk.content.lastIndexOf(n);
|
|
7057
|
+
lineIndex = chunk.content.lastIndexOf(n$1);
|
|
7087
7058
|
if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
|
|
7088
7059
|
lineStr = chunk.content + lineStr;
|
|
7089
7060
|
}
|
|
7090
7061
|
|
|
7091
7062
|
if (chunk.intro.length > 0) {
|
|
7092
|
-
lineIndex = chunk.intro.lastIndexOf(n);
|
|
7063
|
+
lineIndex = chunk.intro.lastIndexOf(n$1);
|
|
7093
7064
|
if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
|
|
7094
7065
|
lineStr = chunk.intro + lineStr;
|
|
7095
7066
|
}
|
|
7096
7067
|
} while ((chunk = chunk.previous));
|
|
7097
|
-
lineIndex = this.intro.lastIndexOf(n);
|
|
7068
|
+
lineIndex = this.intro.lastIndexOf(n$1);
|
|
7098
7069
|
if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
|
|
7099
7070
|
return this.intro + lineStr;
|
|
7100
7071
|
}
|
|
@@ -7427,7 +7398,7 @@ function isReference(node, parent) {
|
|
|
7427
7398
|
return false;
|
|
7428
7399
|
}
|
|
7429
7400
|
|
|
7430
|
-
var version$3 = "24.0.
|
|
7401
|
+
var version$3 = "24.0.1";
|
|
7431
7402
|
var peerDependencies = {
|
|
7432
7403
|
rollup: "^2.68.0||^3.0.0"
|
|
7433
7404
|
};
|
|
@@ -7593,11 +7564,11 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
|
|
|
7593
7564
|
? dynamicRequireModules.delete(targetPath)
|
|
7594
7565
|
: dynamicRequireModules.set(targetPath, resolvedPath);
|
|
7595
7566
|
for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
|
|
7596
|
-
const resolvedPath = resolve$
|
|
7567
|
+
const resolvedPath = resolve$3(path);
|
|
7597
7568
|
const requirePath = normalizePathSlashes(resolvedPath);
|
|
7598
7569
|
if (isDirectory(resolvedPath)) {
|
|
7599
7570
|
dirNames.add(resolvedPath);
|
|
7600
|
-
const modulePath = resolve$
|
|
7571
|
+
const modulePath = resolve$3(join$1(resolvedPath, getPackageEntryPoint(path)));
|
|
7601
7572
|
modifyMap(requirePath, modulePath);
|
|
7602
7573
|
modifyMap(normalizePathSlashes(modulePath), modulePath);
|
|
7603
7574
|
} else {
|
|
@@ -7901,7 +7872,7 @@ function resolveExtensions(importee, importer, extensions) {
|
|
|
7901
7872
|
// not our problem
|
|
7902
7873
|
if (importee[0] !== '.' || !importer) return undefined;
|
|
7903
7874
|
|
|
7904
|
-
const resolved = resolve$
|
|
7875
|
+
const resolved = resolve$3(dirname$1(importer), importee);
|
|
7905
7876
|
const candidates = getCandidates(resolved, extensions);
|
|
7906
7877
|
|
|
7907
7878
|
for (let i = 0; i < candidates.length; i += 1) {
|
|
@@ -9411,7 +9382,7 @@ function commonjs(options = {}) {
|
|
|
9411
9382
|
|
|
9412
9383
|
const dynamicRequireRoot =
|
|
9413
9384
|
typeof options.dynamicRequireRoot === 'string'
|
|
9414
|
-
? resolve$
|
|
9385
|
+
? resolve$3(options.dynamicRequireRoot)
|
|
9415
9386
|
: process.cwd();
|
|
9416
9387
|
const { commonDir, dynamicRequireModules } = getDynamicRequireModules(
|
|
9417
9388
|
options.dynamicRequireTargets,
|
|
@@ -9834,7 +9805,7 @@ function normalizePath$4(url, type) {
|
|
|
9834
9805
|
/**
|
|
9835
9806
|
* Attempts to resolve `input` URL/path relative to `base`.
|
|
9836
9807
|
*/
|
|
9837
|
-
function resolve$
|
|
9808
|
+
function resolve$2(input, base) {
|
|
9838
9809
|
if (!input && !base)
|
|
9839
9810
|
return '';
|
|
9840
9811
|
const url = parseUrl$2(input);
|
|
@@ -9894,13 +9865,13 @@ function resolve$3(input, base) {
|
|
|
9894
9865
|
}
|
|
9895
9866
|
}
|
|
9896
9867
|
|
|
9897
|
-
function resolve$
|
|
9868
|
+
function resolve$1(input, base) {
|
|
9898
9869
|
// The base is always treated as a directory, if it's not empty.
|
|
9899
9870
|
// https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327
|
|
9900
9871
|
// https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401
|
|
9901
9872
|
if (base && !base.endsWith('/'))
|
|
9902
9873
|
base += '/';
|
|
9903
|
-
return resolve$
|
|
9874
|
+
return resolve$2(input, base);
|
|
9904
9875
|
}
|
|
9905
9876
|
|
|
9906
9877
|
/**
|
|
@@ -10070,8 +10041,8 @@ class TraceMap {
|
|
|
10070
10041
|
this.sourceRoot = sourceRoot;
|
|
10071
10042
|
this.sources = sources;
|
|
10072
10043
|
this.sourcesContent = sourcesContent;
|
|
10073
|
-
const from = resolve$
|
|
10074
|
-
this.resolvedSources = sources.map((s) => resolve$
|
|
10044
|
+
const from = resolve$1(sourceRoot || '', stripFilename(mapUrl));
|
|
10045
|
+
this.resolvedSources = sources.map((s) => resolve$1(s || '', from));
|
|
10075
10046
|
const { mappings } = parsed;
|
|
10076
10047
|
if (typeof mappings === 'string') {
|
|
10077
10048
|
this._encoded = mappings;
|
|
@@ -11600,7 +11571,7 @@ try {
|
|
|
11600
11571
|
catch { }
|
|
11601
11572
|
const ssrExtensions = ['.js', '.cjs', '.json', '.node'];
|
|
11602
11573
|
function resolveFrom(id, basedir, preserveSymlinks = false, ssr = false) {
|
|
11603
|
-
return resolve$
|
|
11574
|
+
return resolve$4.sync(id, {
|
|
11604
11575
|
basedir,
|
|
11605
11576
|
paths: [],
|
|
11606
11577
|
extensions: ssr ? ssrExtensions : DEFAULT_EXTENSIONS$1,
|
|
@@ -12230,7 +12201,7 @@ const requireResolveFromRootWithFallback = (root, id) => {
|
|
|
12230
12201
|
// Use `resolve` package to check existence first, so if the package is not found,
|
|
12231
12202
|
// it won't be cached by nodejs, since there isn't a way to invalidate them:
|
|
12232
12203
|
// https://github.com/nodejs/node/issues/44663
|
|
12233
|
-
resolve$
|
|
12204
|
+
resolve$4.sync(id, { basedir: root, paths });
|
|
12234
12205
|
// Use `require.resolve` again as the `resolve` package doesn't support the `exports` field
|
|
12235
12206
|
return _require$3.resolve(id, { paths });
|
|
12236
12207
|
};
|
|
@@ -12766,7 +12737,7 @@ function buildReporterPlugin(config) {
|
|
|
12766
12737
|
!config.build.ssr) {
|
|
12767
12738
|
config.logger.warn(picocolorsExports.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kBs after minification. Consider:\n` +
|
|
12768
12739
|
`- Using dynamic import() to code-split the application\n` +
|
|
12769
|
-
`- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/
|
|
12740
|
+
`- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks\n` +
|
|
12770
12741
|
`- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.`));
|
|
12771
12742
|
}
|
|
12772
12743
|
},
|
|
@@ -13708,6 +13679,9 @@ async function loadTsconfigJsonForFile(filename) {
|
|
|
13708
13679
|
}
|
|
13709
13680
|
}
|
|
13710
13681
|
function reloadOnTsconfigChange(changedFile) {
|
|
13682
|
+
// server could be closed externally after a file change is detected
|
|
13683
|
+
if (!server)
|
|
13684
|
+
return;
|
|
13711
13685
|
// any tsconfig.json that's added in the workspace could be closer to a code file than a previously cached one
|
|
13712
13686
|
// any json file in the tsconfig cache could have been used to compile ts
|
|
13713
13687
|
if (path$o.basename(changedFile) === 'tsconfig.json' ||
|
|
@@ -14498,7 +14472,9 @@ function assetPlugin(config) {
|
|
|
14498
14472
|
},
|
|
14499
14473
|
generateBundle(_, bundle) {
|
|
14500
14474
|
// do not emit assets for SSR build
|
|
14501
|
-
if (config.command === 'build' &&
|
|
14475
|
+
if (config.command === 'build' &&
|
|
14476
|
+
config.build.ssr &&
|
|
14477
|
+
!config.build.ssrEmitAssets) {
|
|
14502
14478
|
for (const file in bundle) {
|
|
14503
14479
|
if (bundle[file].type === 'asset' &&
|
|
14504
14480
|
!file.endsWith('ssr-manifest.json') &&
|
|
@@ -14858,134 +14834,24 @@ function getCodeWithSourcemap(type, code, map) {
|
|
|
14858
14834
|
code += `\n/*${JSON.stringify(map, null, 2).replace(/\*\//g, '*\\/')}*/\n`;
|
|
14859
14835
|
}
|
|
14860
14836
|
if (type === 'js') {
|
|
14861
|
-
code += `\n//# sourceMappingURL=${genSourceMapUrl(map
|
|
14837
|
+
code += `\n//# sourceMappingURL=${genSourceMapUrl(map)}`;
|
|
14862
14838
|
}
|
|
14863
14839
|
else if (type === 'css') {
|
|
14864
|
-
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map
|
|
14840
|
+
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map)} */`;
|
|
14865
14841
|
}
|
|
14866
14842
|
return code;
|
|
14867
14843
|
}
|
|
14868
14844
|
|
|
14869
|
-
|
|
14870
|
-
* @param {object} exports
|
|
14871
|
-
* @param {Set<string>} keys
|
|
14872
|
-
*/
|
|
14873
|
-
function loop(exports, keys) {
|
|
14874
|
-
if (typeof exports === 'string') {
|
|
14875
|
-
return exports;
|
|
14876
|
-
}
|
|
14877
|
-
|
|
14878
|
-
if (exports) {
|
|
14879
|
-
let idx, tmp;
|
|
14880
|
-
if (Array.isArray(exports)) {
|
|
14881
|
-
for (idx=0; idx < exports.length; idx++) {
|
|
14882
|
-
if (tmp = loop(exports[idx], keys)) return tmp;
|
|
14883
|
-
}
|
|
14884
|
-
} else {
|
|
14885
|
-
for (idx in exports) {
|
|
14886
|
-
if (keys.has(idx)) {
|
|
14887
|
-
return loop(exports[idx], keys);
|
|
14888
|
-
}
|
|
14889
|
-
}
|
|
14890
|
-
}
|
|
14891
|
-
}
|
|
14892
|
-
}
|
|
14893
|
-
|
|
14894
|
-
/**
|
|
14895
|
-
* @param {string} name The package name
|
|
14896
|
-
* @param {string} entry The target entry, eg "."
|
|
14897
|
-
* @param {number} [condition] Unmatched condition?
|
|
14898
|
-
*/
|
|
14899
|
-
function bail(name, entry, condition) {
|
|
14900
|
-
throw new Error(
|
|
14901
|
-
condition
|
|
14902
|
-
? `No known conditions for "${entry}" entry in "${name}" package`
|
|
14903
|
-
: `Missing "${entry}" export in "${name}" package`
|
|
14904
|
-
);
|
|
14905
|
-
}
|
|
14906
|
-
|
|
14907
|
-
/**
|
|
14908
|
-
* @param {string} name the package name
|
|
14909
|
-
* @param {string} entry the target path/import
|
|
14910
|
-
*/
|
|
14911
|
-
function toName(name, entry) {
|
|
14912
|
-
return entry === name ? '.'
|
|
14913
|
-
: entry[0] === '.' ? entry
|
|
14914
|
-
: entry.replace(new RegExp('^' + name + '\/'), './');
|
|
14915
|
-
}
|
|
14916
|
-
|
|
14917
|
-
/**
|
|
14918
|
-
* @param {object} pkg package.json contents
|
|
14919
|
-
* @param {string} [entry] entry name or import path
|
|
14920
|
-
* @param {object} [options]
|
|
14921
|
-
* @param {boolean} [options.browser]
|
|
14922
|
-
* @param {boolean} [options.require]
|
|
14923
|
-
* @param {string[]} [options.conditions]
|
|
14924
|
-
* @param {boolean} [options.unsafe]
|
|
14925
|
-
*/
|
|
14926
|
-
function resolve$1(pkg, entry='.', options={}) {
|
|
14927
|
-
let { name, exports } = pkg;
|
|
14928
|
-
|
|
14929
|
-
if (exports) {
|
|
14930
|
-
let { browser, require, unsafe, conditions=[] } = options;
|
|
14931
|
-
|
|
14932
|
-
let target = toName(name, entry);
|
|
14933
|
-
if (target[0] !== '.') target = './' + target;
|
|
14934
|
-
|
|
14935
|
-
if (typeof exports === 'string') {
|
|
14936
|
-
return target === '.' ? exports : bail(name, target);
|
|
14937
|
-
}
|
|
14938
|
-
|
|
14939
|
-
let allows = new Set(['default', ...conditions]);
|
|
14940
|
-
unsafe || allows.add(require ? 'require' : 'import');
|
|
14941
|
-
unsafe || allows.add(browser ? 'browser' : 'node');
|
|
14942
|
-
|
|
14943
|
-
let key, tmp, isSingle=false;
|
|
14944
|
-
|
|
14945
|
-
for (key in exports) {
|
|
14946
|
-
isSingle = key[0] !== '.';
|
|
14947
|
-
break;
|
|
14948
|
-
}
|
|
14949
|
-
|
|
14950
|
-
if (isSingle) {
|
|
14951
|
-
return target === '.'
|
|
14952
|
-
? loop(exports, allows) || bail(name, target, 1)
|
|
14953
|
-
: bail(name, target);
|
|
14954
|
-
}
|
|
14955
|
-
|
|
14956
|
-
if (tmp = exports[target]) {
|
|
14957
|
-
return loop(tmp, allows) || bail(name, target, 1);
|
|
14958
|
-
}
|
|
14959
|
-
|
|
14960
|
-
for (key in exports) {
|
|
14961
|
-
tmp = key[key.length - 1];
|
|
14962
|
-
if (tmp === '/' && target.startsWith(key)) {
|
|
14963
|
-
return (tmp = loop(exports[key], allows))
|
|
14964
|
-
? (tmp + target.substring(key.length))
|
|
14965
|
-
: bail(name, target, 1);
|
|
14966
|
-
}
|
|
14967
|
-
if (tmp === '*' && target.startsWith(key.slice(0, -1))) {
|
|
14968
|
-
// do not trigger if no *content* to inject
|
|
14969
|
-
if (target.substring(key.length - 1).length > 0) {
|
|
14970
|
-
return (tmp = loop(exports[key], allows))
|
|
14971
|
-
? tmp.replace('*', target.substring(key.length - 1))
|
|
14972
|
-
: bail(name, target, 1);
|
|
14973
|
-
}
|
|
14974
|
-
}
|
|
14975
|
-
}
|
|
14976
|
-
|
|
14977
|
-
return bail(name, target);
|
|
14978
|
-
}
|
|
14979
|
-
}
|
|
14845
|
+
function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):r+n;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:o||!r?"./"===f.slice(0,2)?f:"./"+f:f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}
|
|
14980
14846
|
|
|
14981
14847
|
// This file was generated. Do not modify manually!
|
|
14982
|
-
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1,
|
|
14848
|
+
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
14983
14849
|
|
|
14984
14850
|
// This file was generated. Do not modify manually!
|
|
14985
|
-
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24,
|
|
14851
|
+
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
|
|
14986
14852
|
|
|
14987
14853
|
// This file was generated. Do not modify manually!
|
|
14988
|
-
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\
|
|
14854
|
+
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
|
14989
14855
|
|
|
14990
14856
|
// This file was generated. Do not modify manually!
|
|
14991
14857
|
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
|
@@ -15030,6 +14896,7 @@ function isInAstralSet(code, set) {
|
|
|
15030
14896
|
pos += set[i + 1];
|
|
15031
14897
|
if (pos >= code) { return true }
|
|
15032
14898
|
}
|
|
14899
|
+
return false
|
|
15033
14900
|
}
|
|
15034
14901
|
|
|
15035
14902
|
// Test whether a given character code starts an identifier.
|
|
@@ -15415,7 +15282,7 @@ function getOptions(opts) {
|
|
|
15415
15282
|
if (options.allowReserved == null)
|
|
15416
15283
|
{ options.allowReserved = options.ecmaVersion < 5; }
|
|
15417
15284
|
|
|
15418
|
-
if (opts.allowHashBang == null)
|
|
15285
|
+
if (!opts || opts.allowHashBang == null)
|
|
15419
15286
|
{ options.allowHashBang = options.ecmaVersion >= 14; }
|
|
15420
15287
|
|
|
15421
15288
|
if (isArray(options.onToken)) {
|
|
@@ -15815,10 +15682,10 @@ pp$8.isLet = function(context) {
|
|
|
15815
15682
|
// Statement) is allowed here. If context is not empty then only a Statement
|
|
15816
15683
|
// is allowed. However, `let [` is an explicit negative lookahead for
|
|
15817
15684
|
// ExpressionStatement, so special-case it first.
|
|
15818
|
-
if (nextCh === 91 || nextCh === 92
|
|
15685
|
+
if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
|
|
15819
15686
|
if (context) { return false }
|
|
15820
15687
|
|
|
15821
|
-
if (nextCh === 123) { return true } // '{'
|
|
15688
|
+
if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
|
|
15822
15689
|
if (isIdentifierStart(nextCh, true)) {
|
|
15823
15690
|
var pos = next + 1;
|
|
15824
15691
|
while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }
|
|
@@ -16551,7 +16418,7 @@ pp$8.parseClassId = function(node, isStatement) {
|
|
|
16551
16418
|
};
|
|
16552
16419
|
|
|
16553
16420
|
pp$8.parseClassSuper = function(node) {
|
|
16554
|
-
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(false) : null;
|
|
16421
|
+
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
|
|
16555
16422
|
};
|
|
16556
16423
|
|
|
16557
16424
|
pp$8.enterClassBody = function() {
|
|
@@ -18096,7 +17963,7 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
|
18096
17963
|
if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
|
|
18097
17964
|
isAsync = true;
|
|
18098
17965
|
isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
|
|
18099
|
-
this.parsePropertyName(prop
|
|
17966
|
+
this.parsePropertyName(prop);
|
|
18100
17967
|
} else {
|
|
18101
17968
|
isAsync = false;
|
|
18102
17969
|
}
|
|
@@ -18345,7 +18212,7 @@ pp$5.checkUnreserved = function(ref) {
|
|
|
18345
18212
|
// when parsing properties), it will also convert keywords into
|
|
18346
18213
|
// identifiers.
|
|
18347
18214
|
|
|
18348
|
-
pp$5.parseIdent = function(liberal
|
|
18215
|
+
pp$5.parseIdent = function(liberal) {
|
|
18349
18216
|
var node = this.startNode();
|
|
18350
18217
|
if (this.type === types$1.name) {
|
|
18351
18218
|
node.name = this.value;
|
|
@@ -18588,8 +18455,8 @@ pp$2.copyNode = function(node) {
|
|
|
18588
18455
|
return newNode
|
|
18589
18456
|
};
|
|
18590
18457
|
|
|
18591
|
-
// This file contains Unicode properties extracted from the ECMAScript
|
|
18592
|
-
//
|
|
18458
|
+
// This file contains Unicode properties extracted from the ECMAScript specification.
|
|
18459
|
+
// The lists are extracted like so:
|
|
18593
18460
|
// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)
|
|
18594
18461
|
|
|
18595
18462
|
// #table-binary-unicode-properties
|
|
@@ -18598,12 +18465,15 @@ var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
|
|
18598
18465
|
var ecma11BinaryProperties = ecma10BinaryProperties;
|
|
18599
18466
|
var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
|
|
18600
18467
|
var ecma13BinaryProperties = ecma12BinaryProperties;
|
|
18468
|
+
var ecma14BinaryProperties = ecma13BinaryProperties;
|
|
18469
|
+
|
|
18601
18470
|
var unicodeBinaryProperties = {
|
|
18602
18471
|
9: ecma9BinaryProperties,
|
|
18603
18472
|
10: ecma10BinaryProperties,
|
|
18604
18473
|
11: ecma11BinaryProperties,
|
|
18605
18474
|
12: ecma12BinaryProperties,
|
|
18606
|
-
13: ecma13BinaryProperties
|
|
18475
|
+
13: ecma13BinaryProperties,
|
|
18476
|
+
14: ecma14BinaryProperties
|
|
18607
18477
|
};
|
|
18608
18478
|
|
|
18609
18479
|
// #table-unicode-general-category-values
|
|
@@ -18615,12 +18485,15 @@ var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Han
|
|
|
18615
18485
|
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
|
18616
18486
|
var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
|
|
18617
18487
|
var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
|
|
18488
|
+
var ecma14ScriptValues = ecma13ScriptValues + " Kawi Nag_Mundari Nagm";
|
|
18489
|
+
|
|
18618
18490
|
var unicodeScriptValues = {
|
|
18619
18491
|
9: ecma9ScriptValues,
|
|
18620
18492
|
10: ecma10ScriptValues,
|
|
18621
18493
|
11: ecma11ScriptValues,
|
|
18622
18494
|
12: ecma12ScriptValues,
|
|
18623
|
-
13: ecma13ScriptValues
|
|
18495
|
+
13: ecma13ScriptValues,
|
|
18496
|
+
14: ecma14ScriptValues
|
|
18624
18497
|
};
|
|
18625
18498
|
|
|
18626
18499
|
var data = {};
|
|
@@ -18639,7 +18512,7 @@ function buildUnicodeData(ecmaVersion) {
|
|
|
18639
18512
|
d.nonBinary.scx = d.nonBinary.Script_Extensions;
|
|
18640
18513
|
}
|
|
18641
18514
|
|
|
18642
|
-
for (var i$1 = 0, list = [9, 10, 11, 12, 13]; i$1 < list.length; i$1 += 1) {
|
|
18515
|
+
for (var i$1 = 0, list = [9, 10, 11, 12, 13, 14]; i$1 < list.length; i$1 += 1) {
|
|
18643
18516
|
var ecmaVersion = list[i$1];
|
|
18644
18517
|
|
|
18645
18518
|
buildUnicodeData(ecmaVersion);
|
|
@@ -18650,7 +18523,7 @@ var pp$1 = Parser$1.prototype;
|
|
|
18650
18523
|
var RegExpValidationState = function RegExpValidationState(parser) {
|
|
18651
18524
|
this.parser = parser;
|
|
18652
18525
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
|
|
18653
|
-
this.unicodeProperties = data[parser.options.ecmaVersion >=
|
|
18526
|
+
this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];
|
|
18654
18527
|
this.source = "";
|
|
18655
18528
|
this.flags = "";
|
|
18656
18529
|
this.start = 0;
|
|
@@ -20412,8 +20285,6 @@ pp.readEscapedChar = function(inTemplate) {
|
|
|
20412
20285
|
codePos,
|
|
20413
20286
|
"Invalid escape sequence in template string"
|
|
20414
20287
|
);
|
|
20415
|
-
|
|
20416
|
-
return null
|
|
20417
20288
|
}
|
|
20418
20289
|
default:
|
|
20419
20290
|
if (ch >= 48 && ch <= 55) {
|
|
@@ -20501,7 +20372,7 @@ pp.readWord = function() {
|
|
|
20501
20372
|
|
|
20502
20373
|
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
|
20503
20374
|
|
|
20504
|
-
var version$2 = "8.8.
|
|
20375
|
+
var version$2 = "8.8.2";
|
|
20505
20376
|
|
|
20506
20377
|
Parser$1.acorn = {
|
|
20507
20378
|
Parser: Parser$1,
|
|
@@ -20552,29 +20423,29 @@ function tokenizer(input, options) {
|
|
|
20552
20423
|
}
|
|
20553
20424
|
|
|
20554
20425
|
var acorn = {
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20426
|
+
__proto__: null,
|
|
20427
|
+
Node: Node,
|
|
20428
|
+
Parser: Parser$1,
|
|
20429
|
+
Position: Position,
|
|
20430
|
+
SourceLocation: SourceLocation,
|
|
20431
|
+
TokContext: TokContext,
|
|
20432
|
+
Token: Token,
|
|
20433
|
+
TokenType: TokenType,
|
|
20434
|
+
defaultOptions: defaultOptions,
|
|
20435
|
+
getLineInfo: getLineInfo,
|
|
20436
|
+
isIdentifierChar: isIdentifierChar,
|
|
20437
|
+
isIdentifierStart: isIdentifierStart,
|
|
20438
|
+
isNewLine: isNewLine,
|
|
20439
|
+
keywordTypes: keywords$2,
|
|
20440
|
+
lineBreak: lineBreak,
|
|
20441
|
+
lineBreakG: lineBreakG,
|
|
20442
|
+
nonASCIIwhitespace: nonASCIIwhitespace,
|
|
20443
|
+
parse: parse$d,
|
|
20444
|
+
parseExpressionAt: parseExpressionAt,
|
|
20445
|
+
tokContexts: types$2,
|
|
20446
|
+
tokTypes: types$1,
|
|
20447
|
+
tokenizer: tokenizer,
|
|
20448
|
+
version: version$2
|
|
20578
20449
|
};
|
|
20579
20450
|
|
|
20580
20451
|
const HASH_RE = /#/g;
|
|
@@ -20628,197 +20499,382 @@ function matchAll(regex, string, addition) {
|
|
|
20628
20499
|
return matches;
|
|
20629
20500
|
}
|
|
20630
20501
|
|
|
20631
|
-
|
|
20502
|
+
/**
|
|
20503
|
+
* @typedef ErrnoExceptionFields
|
|
20504
|
+
* @property {number | undefined} [errnode]
|
|
20505
|
+
* @property {string | undefined} [code]
|
|
20506
|
+
* @property {string | undefined} [path]
|
|
20507
|
+
* @property {string | undefined} [syscall]
|
|
20508
|
+
* @property {string | undefined} [url]
|
|
20509
|
+
*
|
|
20510
|
+
* @typedef {Error & ErrnoExceptionFields} ErrnoException
|
|
20511
|
+
*/
|
|
20512
|
+
|
|
20513
|
+
const isWindows$3 = process$1.platform === 'win32';
|
|
20514
|
+
|
|
20632
20515
|
const own$1 = {}.hasOwnProperty;
|
|
20633
|
-
|
|
20634
|
-
|
|
20516
|
+
|
|
20517
|
+
/**
|
|
20518
|
+
* Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
|
|
20519
|
+
* We cannot use Intl.ListFormat because it's not available in
|
|
20520
|
+
* --without-intl builds.
|
|
20521
|
+
*
|
|
20522
|
+
* @param {Array<string>} array
|
|
20523
|
+
* An array of strings.
|
|
20524
|
+
* @param {string} [type]
|
|
20525
|
+
* The list type to be inserted before the last element.
|
|
20526
|
+
* @returns {string}
|
|
20527
|
+
*/
|
|
20528
|
+
function formatList(array, type = 'and') {
|
|
20529
|
+
return array.length < 3
|
|
20530
|
+
? array.join(` ${type} `)
|
|
20531
|
+
: `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`
|
|
20532
|
+
}
|
|
20533
|
+
|
|
20534
|
+
/** @type {Map<string, MessageFunction|string>} */
|
|
20535
|
+
const messages = new Map();
|
|
20536
|
+
const nodeInternalPrefix = '__node_internal_';
|
|
20537
|
+
/** @type {number} */
|
|
20635
20538
|
let userStackTraceLimit;
|
|
20539
|
+
|
|
20636
20540
|
createError(
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20541
|
+
'ERR_INVALID_MODULE_SPECIFIER',
|
|
20542
|
+
/**
|
|
20543
|
+
* @param {string} request
|
|
20544
|
+
* @param {string} reason
|
|
20545
|
+
* @param {string} [base]
|
|
20546
|
+
*/
|
|
20547
|
+
(request, reason, base = undefined) => {
|
|
20548
|
+
return `Invalid module "${request}" ${reason}${
|
|
20549
|
+
base ? ` imported from ${base}` : ''
|
|
20550
|
+
}`
|
|
20640
20551
|
},
|
|
20641
20552
|
TypeError
|
|
20642
20553
|
);
|
|
20554
|
+
|
|
20643
20555
|
createError(
|
|
20644
|
-
|
|
20556
|
+
'ERR_INVALID_PACKAGE_CONFIG',
|
|
20557
|
+
/**
|
|
20558
|
+
* @param {string} path
|
|
20559
|
+
* @param {string} [base]
|
|
20560
|
+
* @param {string} [message]
|
|
20561
|
+
*/
|
|
20645
20562
|
(path, base, message) => {
|
|
20646
|
-
return `Invalid package config ${path}${
|
|
20563
|
+
return `Invalid package config ${path}${
|
|
20564
|
+
base ? ` while importing ${base}` : ''
|
|
20565
|
+
}${message ? `. ${message}` : ''}`
|
|
20647
20566
|
},
|
|
20648
20567
|
Error
|
|
20649
20568
|
);
|
|
20569
|
+
|
|
20650
20570
|
createError(
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20571
|
+
'ERR_INVALID_PACKAGE_TARGET',
|
|
20572
|
+
/**
|
|
20573
|
+
* @param {string} pkgPath
|
|
20574
|
+
* @param {string} key
|
|
20575
|
+
* @param {unknown} target
|
|
20576
|
+
* @param {boolean} [isImport=false]
|
|
20577
|
+
* @param {string} [base]
|
|
20578
|
+
*/
|
|
20579
|
+
(pkgPath, key, target, isImport = false, base = undefined) => {
|
|
20580
|
+
const relError =
|
|
20581
|
+
typeof target === 'string' &&
|
|
20582
|
+
!isImport &&
|
|
20583
|
+
target.length > 0 &&
|
|
20584
|
+
!target.startsWith('./');
|
|
20585
|
+
if (key === '.') {
|
|
20655
20586
|
assert$1(isImport === false);
|
|
20656
|
-
return
|
|
20587
|
+
return (
|
|
20588
|
+
`Invalid "exports" main target ${JSON.stringify(target)} defined ` +
|
|
20589
|
+
`in the package config ${pkgPath}package.json${
|
|
20590
|
+
base ? ` imported from ${base}` : ''
|
|
20591
|
+
}${relError ? '; targets must start with "./"' : ''}`
|
|
20592
|
+
)
|
|
20657
20593
|
}
|
|
20658
|
-
|
|
20594
|
+
|
|
20595
|
+
return `Invalid "${
|
|
20596
|
+
isImport ? 'imports' : 'exports'
|
|
20597
|
+
}" target ${JSON.stringify(
|
|
20659
20598
|
target
|
|
20660
|
-
)} defined for '${key}' in the package config ${pkgPath}package.json${
|
|
20599
|
+
)} defined for '${key}' in the package config ${pkgPath}package.json${
|
|
20600
|
+
base ? ` imported from ${base}` : ''
|
|
20601
|
+
}${relError ? '; targets must start with "./"' : ''}`
|
|
20661
20602
|
},
|
|
20662
20603
|
Error
|
|
20663
20604
|
);
|
|
20605
|
+
|
|
20664
20606
|
createError(
|
|
20665
|
-
|
|
20666
|
-
|
|
20667
|
-
|
|
20607
|
+
'ERR_MODULE_NOT_FOUND',
|
|
20608
|
+
/**
|
|
20609
|
+
* @param {string} path
|
|
20610
|
+
* @param {string} base
|
|
20611
|
+
* @param {string} [type]
|
|
20612
|
+
*/
|
|
20613
|
+
(path, base, type = 'package') => {
|
|
20614
|
+
return `Cannot find ${type} '${path}' imported from ${base}`
|
|
20668
20615
|
},
|
|
20669
20616
|
Error
|
|
20670
20617
|
);
|
|
20618
|
+
|
|
20671
20619
|
createError(
|
|
20672
|
-
|
|
20620
|
+
'ERR_NETWORK_IMPORT_DISALLOWED',
|
|
20621
|
+
"import of '%s' by %s is not supported: %s",
|
|
20622
|
+
Error
|
|
20623
|
+
);
|
|
20624
|
+
|
|
20625
|
+
createError(
|
|
20626
|
+
'ERR_PACKAGE_IMPORT_NOT_DEFINED',
|
|
20627
|
+
/**
|
|
20628
|
+
* @param {string} specifier
|
|
20629
|
+
* @param {string} packagePath
|
|
20630
|
+
* @param {string} base
|
|
20631
|
+
*/
|
|
20673
20632
|
(specifier, packagePath, base) => {
|
|
20674
|
-
return `Package import specifier "${specifier}" is not defined${
|
|
20633
|
+
return `Package import specifier "${specifier}" is not defined${
|
|
20634
|
+
packagePath ? ` in package ${packagePath}package.json` : ''
|
|
20635
|
+
} imported from ${base}`
|
|
20675
20636
|
},
|
|
20676
20637
|
TypeError
|
|
20677
20638
|
);
|
|
20639
|
+
|
|
20678
20640
|
createError(
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20641
|
+
'ERR_PACKAGE_PATH_NOT_EXPORTED',
|
|
20642
|
+
/**
|
|
20643
|
+
* @param {string} pkgPath
|
|
20644
|
+
* @param {string} subpath
|
|
20645
|
+
* @param {string} [base]
|
|
20646
|
+
*/
|
|
20647
|
+
(pkgPath, subpath, base = undefined) => {
|
|
20648
|
+
if (subpath === '.')
|
|
20649
|
+
return `No "exports" main defined in ${pkgPath}package.json${
|
|
20650
|
+
base ? ` imported from ${base}` : ''
|
|
20651
|
+
}`
|
|
20652
|
+
return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${
|
|
20653
|
+
base ? ` imported from ${base}` : ''
|
|
20654
|
+
}`
|
|
20685
20655
|
},
|
|
20686
20656
|
Error
|
|
20687
20657
|
);
|
|
20658
|
+
|
|
20688
20659
|
createError(
|
|
20689
|
-
|
|
20690
|
-
"Directory import '%s' is not supported
|
|
20660
|
+
'ERR_UNSUPPORTED_DIR_IMPORT',
|
|
20661
|
+
"Directory import '%s' is not supported " +
|
|
20662
|
+
'resolving ES modules imported from %s',
|
|
20691
20663
|
Error
|
|
20692
20664
|
);
|
|
20665
|
+
|
|
20693
20666
|
createError(
|
|
20694
|
-
|
|
20695
|
-
|
|
20667
|
+
'ERR_UNKNOWN_FILE_EXTENSION',
|
|
20668
|
+
/**
|
|
20669
|
+
* @param {string} ext
|
|
20670
|
+
* @param {string} path
|
|
20671
|
+
*/
|
|
20672
|
+
(ext, path) => {
|
|
20673
|
+
return `Unknown file extension "${ext}" for ${path}`
|
|
20674
|
+
},
|
|
20696
20675
|
TypeError
|
|
20697
20676
|
);
|
|
20677
|
+
|
|
20698
20678
|
createError(
|
|
20699
|
-
|
|
20700
|
-
|
|
20679
|
+
'ERR_INVALID_ARG_VALUE',
|
|
20680
|
+
/**
|
|
20681
|
+
* @param {string} name
|
|
20682
|
+
* @param {unknown} value
|
|
20683
|
+
* @param {string} [reason='is invalid']
|
|
20684
|
+
*/
|
|
20685
|
+
(name, value, reason = 'is invalid') => {
|
|
20701
20686
|
let inspected = inspect(value);
|
|
20687
|
+
|
|
20702
20688
|
if (inspected.length > 128) {
|
|
20703
20689
|
inspected = `${inspected.slice(0, 128)}...`;
|
|
20704
20690
|
}
|
|
20705
|
-
|
|
20706
|
-
|
|
20691
|
+
|
|
20692
|
+
const type = name.includes('.') ? 'property' : 'argument';
|
|
20693
|
+
|
|
20694
|
+
return `The ${type} '${name}' ${reason}. Received ${inspected}`
|
|
20707
20695
|
},
|
|
20708
20696
|
TypeError
|
|
20697
|
+
// Note: extra classes have been shaken out.
|
|
20698
|
+
// , RangeError
|
|
20709
20699
|
);
|
|
20700
|
+
|
|
20710
20701
|
createError(
|
|
20711
|
-
|
|
20712
|
-
|
|
20713
|
-
|
|
20702
|
+
'ERR_UNSUPPORTED_ESM_URL_SCHEME',
|
|
20703
|
+
/**
|
|
20704
|
+
* @param {URL} url
|
|
20705
|
+
* @param {Array<string>} supported
|
|
20706
|
+
*/
|
|
20707
|
+
(url, supported) => {
|
|
20708
|
+
let message = `Only URLs with a scheme in: ${formatList(
|
|
20709
|
+
supported
|
|
20710
|
+
)} are supported by the default ESM loader`;
|
|
20711
|
+
|
|
20714
20712
|
if (isWindows$3 && url.protocol.length === 2) {
|
|
20715
|
-
message +=
|
|
20713
|
+
message += '. On Windows, absolute paths must be valid file:// URLs';
|
|
20716
20714
|
}
|
|
20715
|
+
|
|
20717
20716
|
message += `. Received protocol '${url.protocol}'`;
|
|
20718
|
-
return message
|
|
20717
|
+
return message
|
|
20719
20718
|
},
|
|
20720
20719
|
Error
|
|
20721
20720
|
);
|
|
20721
|
+
|
|
20722
|
+
/**
|
|
20723
|
+
* Utility function for registering the error codes. Only used here. Exported
|
|
20724
|
+
* *only* to allow for testing.
|
|
20725
|
+
* @param {string} sym
|
|
20726
|
+
* @param {MessageFunction|string} value
|
|
20727
|
+
* @param {ErrorConstructor} def
|
|
20728
|
+
* @returns {new (...args: Array<any>) => Error}
|
|
20729
|
+
*/
|
|
20722
20730
|
function createError(sym, value, def) {
|
|
20731
|
+
// Special case for SystemError that formats the error message differently
|
|
20732
|
+
// The SystemErrors only have SystemError as their base classes.
|
|
20723
20733
|
messages.set(sym, value);
|
|
20724
|
-
|
|
20734
|
+
|
|
20735
|
+
return makeNodeErrorWithCode(def, sym)
|
|
20725
20736
|
}
|
|
20737
|
+
|
|
20738
|
+
/**
|
|
20739
|
+
* @param {ErrorConstructor} Base
|
|
20740
|
+
* @param {string} key
|
|
20741
|
+
* @returns {ErrorConstructor}
|
|
20742
|
+
*/
|
|
20726
20743
|
function makeNodeErrorWithCode(Base, key) {
|
|
20727
|
-
|
|
20744
|
+
// @ts-expect-error It’s a Node error.
|
|
20745
|
+
return NodeError
|
|
20746
|
+
/**
|
|
20747
|
+
* @param {Array<unknown>} args
|
|
20748
|
+
*/
|
|
20728
20749
|
function NodeError(...args) {
|
|
20729
20750
|
const limit = Error.stackTraceLimit;
|
|
20730
|
-
if (isErrorStackTraceLimitWritable())
|
|
20731
|
-
Error.stackTraceLimit = 0;
|
|
20732
|
-
}
|
|
20751
|
+
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
20733
20752
|
const error = new Base();
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
}
|
|
20753
|
+
// Reset the limit and setting the name property.
|
|
20754
|
+
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
|
|
20737
20755
|
const message = getMessage(key, args, error);
|
|
20738
|
-
Object.
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
return `${this.name} [${key}]: ${this.message}`;
|
|
20756
|
+
Object.defineProperties(error, {
|
|
20757
|
+
// Note: no need to implement `kIsNodeError` symbol, would be hard,
|
|
20758
|
+
// probably.
|
|
20759
|
+
message: {
|
|
20760
|
+
value: message,
|
|
20761
|
+
enumerable: false,
|
|
20762
|
+
writable: true,
|
|
20763
|
+
configurable: true
|
|
20747
20764
|
},
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
error.code = key;
|
|
20754
|
-
return error;
|
|
20755
|
-
}
|
|
20756
|
-
}
|
|
20757
|
-
const addCodeToName = hideStackFrames(
|
|
20758
|
-
function(error, name, code) {
|
|
20759
|
-
error = captureLargerStackTrace(error);
|
|
20760
|
-
error.name = `${name} [${code}]`;
|
|
20761
|
-
if (name === "SystemError") {
|
|
20762
|
-
Object.defineProperty(error, "name", {
|
|
20763
|
-
value: name,
|
|
20765
|
+
toString: {
|
|
20766
|
+
/** @this {Error} */
|
|
20767
|
+
value() {
|
|
20768
|
+
return `${this.name} [${key}]: ${this.message}`
|
|
20769
|
+
},
|
|
20764
20770
|
enumerable: false,
|
|
20765
20771
|
writable: true,
|
|
20766
20772
|
configurable: true
|
|
20767
|
-
}
|
|
20768
|
-
}
|
|
20769
|
-
|
|
20770
|
-
|
|
20773
|
+
}
|
|
20774
|
+
});
|
|
20775
|
+
|
|
20776
|
+
captureLargerStackTrace(error);
|
|
20777
|
+
// @ts-expect-error It’s a Node error.
|
|
20778
|
+
error.code = key;
|
|
20779
|
+
return error
|
|
20771
20780
|
}
|
|
20772
|
-
|
|
20781
|
+
}
|
|
20782
|
+
|
|
20783
|
+
/**
|
|
20784
|
+
* @returns {boolean}
|
|
20785
|
+
*/
|
|
20773
20786
|
function isErrorStackTraceLimitWritable() {
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20787
|
+
// Do no touch Error.stackTraceLimit as V8 would attempt to install
|
|
20788
|
+
// it again during deserialization.
|
|
20789
|
+
try {
|
|
20790
|
+
// @ts-expect-error: not in types?
|
|
20791
|
+
if (v8.startupSnapshot.isBuildingSnapshot()) {
|
|
20792
|
+
return false
|
|
20793
|
+
}
|
|
20794
|
+
} catch {}
|
|
20795
|
+
|
|
20796
|
+
const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');
|
|
20797
|
+
if (desc === undefined) {
|
|
20798
|
+
return Object.isExtensible(Error)
|
|
20777
20799
|
}
|
|
20778
|
-
|
|
20800
|
+
|
|
20801
|
+
return own$1.call(desc, 'writable') && desc.writable !== undefined
|
|
20802
|
+
? desc.writable
|
|
20803
|
+
: desc.set !== undefined
|
|
20779
20804
|
}
|
|
20805
|
+
|
|
20806
|
+
/**
|
|
20807
|
+
* This function removes unnecessary frames from Node.js core errors.
|
|
20808
|
+
* @template {(...args: unknown[]) => unknown} T
|
|
20809
|
+
* @param {T} fn
|
|
20810
|
+
* @returns {T}
|
|
20811
|
+
*/
|
|
20780
20812
|
function hideStackFrames(fn) {
|
|
20813
|
+
// We rename the functions that will be hidden to cut off the stacktrace
|
|
20814
|
+
// at the outermost one
|
|
20781
20815
|
const hidden = nodeInternalPrefix + fn.name;
|
|
20782
|
-
Object.defineProperty(fn,
|
|
20783
|
-
return fn
|
|
20816
|
+
Object.defineProperty(fn, 'name', {value: hidden});
|
|
20817
|
+
return fn
|
|
20784
20818
|
}
|
|
20819
|
+
|
|
20785
20820
|
const captureLargerStackTrace = hideStackFrames(
|
|
20786
|
-
|
|
20821
|
+
/**
|
|
20822
|
+
* @param {Error} error
|
|
20823
|
+
* @returns {Error}
|
|
20824
|
+
*/
|
|
20825
|
+
// @ts-expect-error: fine
|
|
20826
|
+
function (error) {
|
|
20787
20827
|
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
20788
20828
|
if (stackTraceLimitIsWritable) {
|
|
20789
20829
|
userStackTraceLimit = Error.stackTraceLimit;
|
|
20790
20830
|
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
20791
20831
|
}
|
|
20832
|
+
|
|
20792
20833
|
Error.captureStackTrace(error);
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20834
|
+
|
|
20835
|
+
// Reset the limit
|
|
20836
|
+
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
20837
|
+
|
|
20838
|
+
return error
|
|
20797
20839
|
}
|
|
20798
20840
|
);
|
|
20841
|
+
|
|
20842
|
+
/**
|
|
20843
|
+
* @param {string} key
|
|
20844
|
+
* @param {Array<unknown>} args
|
|
20845
|
+
* @param {Error} self
|
|
20846
|
+
* @returns {string}
|
|
20847
|
+
*/
|
|
20799
20848
|
function getMessage(key, args, self) {
|
|
20800
20849
|
const message = messages.get(key);
|
|
20801
|
-
|
|
20850
|
+
assert$1(typeof message !== 'undefined', 'expected `message` to be found');
|
|
20851
|
+
|
|
20852
|
+
if (typeof message === 'function') {
|
|
20802
20853
|
assert$1(
|
|
20803
|
-
message.length <= args.length,
|
|
20804
|
-
`Code: ${key}; The provided arguments length (${args.length}) does not
|
|
20854
|
+
message.length <= args.length, // Default options do not count.
|
|
20855
|
+
`Code: ${key}; The provided arguments length (${args.length}) does not ` +
|
|
20856
|
+
`match the required ones (${message.length}).`
|
|
20805
20857
|
);
|
|
20806
|
-
return Reflect.apply(message, self, args)
|
|
20858
|
+
return Reflect.apply(message, self, args)
|
|
20807
20859
|
}
|
|
20808
|
-
|
|
20860
|
+
|
|
20861
|
+
const regex = /%[dfijoOs]/g;
|
|
20862
|
+
let expectedLength = 0;
|
|
20863
|
+
while (regex.exec(message) !== null) expectedLength++;
|
|
20809
20864
|
assert$1(
|
|
20810
20865
|
expectedLength === args.length,
|
|
20811
|
-
`Code: ${key}; The provided arguments length (${args.length}) does not
|
|
20866
|
+
`Code: ${key}; The provided arguments length (${args.length}) does not ` +
|
|
20867
|
+
`match the required ones (${expectedLength}).`
|
|
20812
20868
|
);
|
|
20813
|
-
if (args.length === 0)
|
|
20814
|
-
|
|
20815
|
-
}
|
|
20869
|
+
if (args.length === 0) return message
|
|
20870
|
+
|
|
20816
20871
|
args.unshift(message);
|
|
20817
|
-
return Reflect.apply(format$2, null, args)
|
|
20872
|
+
return Reflect.apply(format$2, null, args)
|
|
20818
20873
|
}
|
|
20819
20874
|
pathToFileURL(process.cwd());
|
|
20820
20875
|
|
|
20821
20876
|
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;)import\s*([\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm;
|
|
20877
|
+
const TYPE_RE = /^\s*?type\s/;
|
|
20822
20878
|
function findStaticImports(code) {
|
|
20823
20879
|
return matchAll(ESM_STATIC_IMPORT_RE, code, { type: "static" });
|
|
20824
20880
|
}
|
|
@@ -20827,7 +20883,7 @@ function parseStaticImport(matched) {
|
|
|
20827
20883
|
const namedImports = {};
|
|
20828
20884
|
for (const namedImport of cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []) {
|
|
20829
20885
|
const [, source = namedImport.trim(), importName = source] = namedImport.match(/^\s*(\S*) as (\S*)\s*$/) || [];
|
|
20830
|
-
if (source) {
|
|
20886
|
+
if (source && !TYPE_RE.test(source)) {
|
|
20831
20887
|
namedImports[source] = importName;
|
|
20832
20888
|
}
|
|
20833
20889
|
}
|
|
@@ -20905,7 +20961,20 @@ function loadPackageData(pkgPath, preserveSymlinks, packageCache) {
|
|
|
20905
20961
|
hasSideEffects = () => sideEffects;
|
|
20906
20962
|
}
|
|
20907
20963
|
else if (Array.isArray(sideEffects)) {
|
|
20908
|
-
|
|
20964
|
+
const finalPackageSideEffects = sideEffects.map((sideEffect) => {
|
|
20965
|
+
/*
|
|
20966
|
+
* The array accepts simple glob patterns to the relevant files... Patterns like *.css, which do not include a /, will be treated like **\/*.css.
|
|
20967
|
+
* https://webpack.js.org/guides/tree-shaking/
|
|
20968
|
+
* https://github.com/vitejs/vite/pull/11807
|
|
20969
|
+
*/
|
|
20970
|
+
if (sideEffect.includes('/')) {
|
|
20971
|
+
return sideEffect;
|
|
20972
|
+
}
|
|
20973
|
+
return `**/${sideEffect}`;
|
|
20974
|
+
});
|
|
20975
|
+
hasSideEffects = createFilter(finalPackageSideEffects, null, {
|
|
20976
|
+
resolve: pkgDir,
|
|
20977
|
+
});
|
|
20909
20978
|
}
|
|
20910
20979
|
else {
|
|
20911
20980
|
hasSideEffects = () => true;
|
|
@@ -21047,14 +21116,7 @@ async function serialBundleWorkerEntry(config, id, query) {
|
|
|
21047
21116
|
function emitSourcemapForWorkerEntry(config, query, chunk) {
|
|
21048
21117
|
const { map: sourcemap } = chunk;
|
|
21049
21118
|
if (sourcemap) {
|
|
21050
|
-
if (config.build.sourcemap === '
|
|
21051
|
-
// Manually add the sourcemap to the code if configured for inline sourcemaps.
|
|
21052
|
-
// TODO: Remove when https://github.com/rollup/rollup/issues/3913 is resolved
|
|
21053
|
-
// Currently seems that it won't be resolved until Rollup 3
|
|
21054
|
-
const dataUrl = sourcemap.toUrl();
|
|
21055
|
-
chunk.code += `//# sourceMappingURL=${dataUrl}`;
|
|
21056
|
-
}
|
|
21057
|
-
else if (config.build.sourcemap === 'hidden' ||
|
|
21119
|
+
if (config.build.sourcemap === 'hidden' ||
|
|
21058
21120
|
config.build.sourcemap === true) {
|
|
21059
21121
|
const data = sourcemap.toString();
|
|
21060
21122
|
const mapFileName = chunk.fileName + '.map';
|
|
@@ -21063,18 +21125,6 @@ function emitSourcemapForWorkerEntry(config, query, chunk) {
|
|
|
21063
21125
|
type: 'asset',
|
|
21064
21126
|
source: data,
|
|
21065
21127
|
});
|
|
21066
|
-
// Emit the comment that tells the JS debugger where it can find the
|
|
21067
|
-
// sourcemap file.
|
|
21068
|
-
// 'hidden' causes the sourcemap file to be created but
|
|
21069
|
-
// the comment in the file to be omitted.
|
|
21070
|
-
if (config.build.sourcemap === true) {
|
|
21071
|
-
// inline web workers need to use the full sourcemap path
|
|
21072
|
-
// non-inline web workers can use a relative path
|
|
21073
|
-
const sourceMapUrl = query?.inline != null
|
|
21074
|
-
? mapFileName
|
|
21075
|
-
: path$o.relative(config.build.assetsDir, mapFileName);
|
|
21076
|
-
chunk.code += `//# sourceMappingURL=${sourceMapUrl}`;
|
|
21077
|
-
}
|
|
21078
21128
|
}
|
|
21079
21129
|
}
|
|
21080
21130
|
return chunk;
|
|
@@ -21973,11 +22023,12 @@ function resolveExports(pkg, key, options, targetWeb) {
|
|
|
21973
22023
|
else if (options.conditions.length > 0) {
|
|
21974
22024
|
conditions.push(...options.conditions);
|
|
21975
22025
|
}
|
|
21976
|
-
|
|
22026
|
+
const result = o(pkg, key, {
|
|
21977
22027
|
browser: targetWeb && !conditions.includes('node'),
|
|
21978
22028
|
require: options.isRequire && !conditions.includes('import'),
|
|
21979
22029
|
conditions,
|
|
21980
22030
|
});
|
|
22031
|
+
return result ? result[0] : undefined;
|
|
21981
22032
|
}
|
|
21982
22033
|
function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolvedCache, dir, data, }, targetWeb, options) {
|
|
21983
22034
|
const cache = getResolvedCache(id, targetWeb);
|
|
@@ -27615,7 +27666,7 @@ function isCollection$1(node) {
|
|
|
27615
27666
|
}
|
|
27616
27667
|
return false;
|
|
27617
27668
|
}
|
|
27618
|
-
function isNode(node) {
|
|
27669
|
+
function isNode$1(node) {
|
|
27619
27670
|
if (node && typeof node === 'object')
|
|
27620
27671
|
switch (node[NODE_TYPE]) {
|
|
27621
27672
|
case ALIAS:
|
|
@@ -27694,7 +27745,7 @@ visit$1.SKIP = SKIP$1;
|
|
|
27694
27745
|
visit$1.REMOVE = REMOVE$1;
|
|
27695
27746
|
function visit_(key, node, visitor, path) {
|
|
27696
27747
|
const ctrl = callVisitor(key, node, visitor, path);
|
|
27697
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
27748
|
+
if (isNode$1(ctrl) || isPair(ctrl)) {
|
|
27698
27749
|
replaceNode(key, path, ctrl);
|
|
27699
27750
|
return visit_(key, ctrl, visitor, path);
|
|
27700
27751
|
}
|
|
@@ -27781,7 +27832,7 @@ visitAsync.SKIP = SKIP$1;
|
|
|
27781
27832
|
visitAsync.REMOVE = REMOVE$1;
|
|
27782
27833
|
async function visitAsync_(key, node, visitor, path) {
|
|
27783
27834
|
const ctrl = await callVisitor(key, node, visitor, path);
|
|
27784
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
27835
|
+
if (isNode$1(ctrl) || isPair(ctrl)) {
|
|
27785
27836
|
replaceNode(key, path, ctrl);
|
|
27786
27837
|
return visitAsync_(key, ctrl, visitor, path);
|
|
27787
27838
|
}
|
|
@@ -28013,10 +28064,10 @@ class Directives {
|
|
|
28013
28064
|
: [];
|
|
28014
28065
|
const tagEntries = Object.entries(this.tags);
|
|
28015
28066
|
let tagNames;
|
|
28016
|
-
if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
|
|
28067
|
+
if (doc && tagEntries.length > 0 && isNode$1(doc.contents)) {
|
|
28017
28068
|
const tags = {};
|
|
28018
28069
|
visit$1(doc.contents, (_key, node) => {
|
|
28019
|
-
if (isNode(node) && node.tag)
|
|
28070
|
+
if (isNode$1(node) && node.tag)
|
|
28020
28071
|
tags[node.tag] = true;
|
|
28021
28072
|
});
|
|
28022
28073
|
tagNames = Object.keys(tags);
|
|
@@ -28259,7 +28310,7 @@ function findTagObject(value, tagName, tags) {
|
|
|
28259
28310
|
function createNode(value, tagName, ctx) {
|
|
28260
28311
|
if (isDocument(value))
|
|
28261
28312
|
value = value.contents;
|
|
28262
|
-
if (isNode(value))
|
|
28313
|
+
if (isNode$1(value))
|
|
28263
28314
|
return value;
|
|
28264
28315
|
if (isPair(value)) {
|
|
28265
28316
|
const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
@@ -28371,7 +28422,7 @@ class Collection extends NodeBase {
|
|
|
28371
28422
|
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
28372
28423
|
if (schema)
|
|
28373
28424
|
copy.schema = schema;
|
|
28374
|
-
copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it);
|
|
28425
|
+
copy.items = copy.items.map(it => isNode$1(it) || isPair(it) ? it.clone(schema) : it);
|
|
28375
28426
|
if (this.range)
|
|
28376
28427
|
copy.range = this.range.slice();
|
|
28377
28428
|
return copy;
|
|
@@ -29027,7 +29078,7 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
|
|
|
29027
29078
|
}
|
|
29028
29079
|
}
|
|
29029
29080
|
let tagObj = undefined;
|
|
29030
|
-
const node = isNode(item)
|
|
29081
|
+
const node = isNode$1(item)
|
|
29031
29082
|
? item
|
|
29032
29083
|
: ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
|
|
29033
29084
|
if (!tagObj)
|
|
@@ -29049,7 +29100,7 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
|
|
|
29049
29100
|
|
|
29050
29101
|
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
29051
29102
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
29052
|
-
let keyComment = (isNode(key) && key.comment) || null;
|
|
29103
|
+
let keyComment = (isNode$1(key) && key.comment) || null;
|
|
29053
29104
|
if (simpleKeys) {
|
|
29054
29105
|
if (keyComment) {
|
|
29055
29106
|
throw new Error('With simple keys, key nodes cannot have comments');
|
|
@@ -29109,7 +29160,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
|
29109
29160
|
}
|
|
29110
29161
|
let vcb = '';
|
|
29111
29162
|
let valueComment = null;
|
|
29112
|
-
if (isNode(value)) {
|
|
29163
|
+
if (isNode$1(value)) {
|
|
29113
29164
|
if (value.spaceBefore)
|
|
29114
29165
|
vcb = '\n';
|
|
29115
29166
|
if (value.commentBefore) {
|
|
@@ -29252,7 +29303,7 @@ function stringifyKey(key, jsKey, ctx) {
|
|
|
29252
29303
|
return '';
|
|
29253
29304
|
if (typeof jsKey !== 'object')
|
|
29254
29305
|
return String(jsKey);
|
|
29255
|
-
if (isNode(key) && ctx && ctx.doc) {
|
|
29306
|
+
if (isNode$1(key) && ctx && ctx.doc) {
|
|
29256
29307
|
const strCtx = createStringifyContext(ctx.doc, {});
|
|
29257
29308
|
strCtx.anchors = new Set();
|
|
29258
29309
|
for (const node of ctx.anchors.keys())
|
|
@@ -29285,9 +29336,9 @@ class Pair {
|
|
|
29285
29336
|
}
|
|
29286
29337
|
clone(schema) {
|
|
29287
29338
|
let { key, value } = this;
|
|
29288
|
-
if (isNode(key))
|
|
29339
|
+
if (isNode$1(key))
|
|
29289
29340
|
key = key.clone(schema);
|
|
29290
|
-
if (isNode(value))
|
|
29341
|
+
if (isNode$1(value))
|
|
29291
29342
|
value = value.clone(schema);
|
|
29292
29343
|
return new Pair(key, value);
|
|
29293
29344
|
}
|
|
@@ -29315,7 +29366,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
|
|
|
29315
29366
|
for (let i = 0; i < items.length; ++i) {
|
|
29316
29367
|
const item = items[i];
|
|
29317
29368
|
let comment = null;
|
|
29318
|
-
if (isNode(item)) {
|
|
29369
|
+
if (isNode$1(item)) {
|
|
29319
29370
|
if (!chompKeep && item.spaceBefore)
|
|
29320
29371
|
lines.push('');
|
|
29321
29372
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
@@ -29323,7 +29374,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
|
|
|
29323
29374
|
comment = item.comment;
|
|
29324
29375
|
}
|
|
29325
29376
|
else if (isPair(item)) {
|
|
29326
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
29377
|
+
const ik = isNode$1(item.key) ? item.key : null;
|
|
29327
29378
|
if (ik) {
|
|
29328
29379
|
if (!chompKeep && ik.spaceBefore)
|
|
29329
29380
|
lines.push('');
|
|
@@ -29372,7 +29423,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29372
29423
|
for (let i = 0; i < items.length; ++i) {
|
|
29373
29424
|
const item = items[i];
|
|
29374
29425
|
let comment = null;
|
|
29375
|
-
if (isNode(item)) {
|
|
29426
|
+
if (isNode$1(item)) {
|
|
29376
29427
|
if (item.spaceBefore)
|
|
29377
29428
|
lines.push('');
|
|
29378
29429
|
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
@@ -29380,7 +29431,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29380
29431
|
comment = item.comment;
|
|
29381
29432
|
}
|
|
29382
29433
|
else if (isPair(item)) {
|
|
29383
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
29434
|
+
const ik = isNode$1(item.key) ? item.key : null;
|
|
29384
29435
|
if (ik) {
|
|
29385
29436
|
if (ik.spaceBefore)
|
|
29386
29437
|
lines.push('');
|
|
@@ -29388,7 +29439,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29388
29439
|
if (ik.comment)
|
|
29389
29440
|
reqNewline = true;
|
|
29390
29441
|
}
|
|
29391
|
-
const iv = isNode(item.value) ? item.value : null;
|
|
29442
|
+
const iv = isNode$1(item.value) ? item.value : null;
|
|
29392
29443
|
if (iv) {
|
|
29393
29444
|
if (iv.comment)
|
|
29394
29445
|
comment = iv.comment;
|
|
@@ -30578,7 +30629,7 @@ function stringifyDocument(doc, options) {
|
|
|
30578
30629
|
let chompKeep = false;
|
|
30579
30630
|
let contentComment = null;
|
|
30580
30631
|
if (doc.contents) {
|
|
30581
|
-
if (isNode(doc.contents)) {
|
|
30632
|
+
if (isNode$1(doc.contents)) {
|
|
30582
30633
|
if (doc.contents.spaceBefore && hasDirectives)
|
|
30583
30634
|
lines.push('');
|
|
30584
30635
|
if (doc.contents.commentBefore) {
|
|
@@ -30747,7 +30798,7 @@ class Document {
|
|
|
30747
30798
|
if (this.directives)
|
|
30748
30799
|
copy.directives = this.directives.clone();
|
|
30749
30800
|
copy.schema = this.schema.clone();
|
|
30750
|
-
copy.contents = isNode(this.contents)
|
|
30801
|
+
copy.contents = isNode$1(this.contents)
|
|
30751
30802
|
? this.contents.clone(copy.schema)
|
|
30752
30803
|
: this.contents;
|
|
30753
30804
|
if (this.range)
|
|
@@ -31659,7 +31710,7 @@ function composeCollection(CN, ctx, token, tagToken, onError) {
|
|
|
31659
31710
|
}
|
|
31660
31711
|
}
|
|
31661
31712
|
const res = tag.resolve(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options);
|
|
31662
|
-
const node = isNode(res)
|
|
31713
|
+
const node = isNode$1(res)
|
|
31663
31714
|
? res
|
|
31664
31715
|
: new Scalar(res);
|
|
31665
31716
|
node.range = coll.range;
|
|
@@ -32963,20 +33014,20 @@ function tokenType(source) {
|
|
|
32963
33014
|
}
|
|
32964
33015
|
|
|
32965
33016
|
var cst = {
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32974
|
-
|
|
32975
|
-
|
|
32976
|
-
|
|
32977
|
-
|
|
32978
|
-
|
|
32979
|
-
|
|
33017
|
+
__proto__: null,
|
|
33018
|
+
BOM: BOM,
|
|
33019
|
+
DOCUMENT: DOCUMENT,
|
|
33020
|
+
FLOW_END: FLOW_END,
|
|
33021
|
+
SCALAR: SCALAR,
|
|
33022
|
+
createScalarToken: createScalarToken,
|
|
33023
|
+
isCollection: isCollection,
|
|
33024
|
+
isScalar: isScalar,
|
|
33025
|
+
prettyToken: prettyToken,
|
|
33026
|
+
resolveAsScalar: resolveAsScalar,
|
|
33027
|
+
setScalarValue: setScalarValue,
|
|
33028
|
+
stringify: stringify$1,
|
|
33029
|
+
tokenType: tokenType,
|
|
33030
|
+
visit: visit
|
|
32980
33031
|
};
|
|
32981
33032
|
|
|
32982
33033
|
/*
|
|
@@ -34753,72 +34804,72 @@ function stringify(value, replacer, options) {
|
|
|
34753
34804
|
}
|
|
34754
34805
|
|
|
34755
34806
|
var YAML = {
|
|
34756
|
-
|
|
34757
|
-
|
|
34758
|
-
|
|
34759
|
-
|
|
34760
|
-
|
|
34761
|
-
|
|
34762
|
-
|
|
34763
|
-
|
|
34764
|
-
|
|
34765
|
-
|
|
34766
|
-
|
|
34767
|
-
|
|
34768
|
-
|
|
34769
|
-
|
|
34770
|
-
|
|
34771
|
-
|
|
34772
|
-
|
|
34773
|
-
|
|
34774
|
-
|
|
34775
|
-
|
|
34776
|
-
|
|
34777
|
-
|
|
34778
|
-
|
|
34779
|
-
|
|
34780
|
-
|
|
34781
|
-
|
|
34782
|
-
|
|
34783
|
-
|
|
34784
|
-
|
|
34785
|
-
|
|
34807
|
+
__proto__: null,
|
|
34808
|
+
Alias: Alias,
|
|
34809
|
+
CST: cst,
|
|
34810
|
+
Composer: Composer,
|
|
34811
|
+
Document: Document,
|
|
34812
|
+
Lexer: Lexer,
|
|
34813
|
+
LineCounter: LineCounter,
|
|
34814
|
+
Pair: Pair,
|
|
34815
|
+
Parser: Parser,
|
|
34816
|
+
Scalar: Scalar,
|
|
34817
|
+
Schema: Schema,
|
|
34818
|
+
YAMLError: YAMLError,
|
|
34819
|
+
YAMLMap: YAMLMap,
|
|
34820
|
+
YAMLParseError: YAMLParseError,
|
|
34821
|
+
YAMLSeq: YAMLSeq,
|
|
34822
|
+
YAMLWarning: YAMLWarning,
|
|
34823
|
+
isAlias: isAlias,
|
|
34824
|
+
isCollection: isCollection$1,
|
|
34825
|
+
isDocument: isDocument,
|
|
34826
|
+
isMap: isMap,
|
|
34827
|
+
isNode: isNode$1,
|
|
34828
|
+
isPair: isPair,
|
|
34829
|
+
isScalar: isScalar$1,
|
|
34830
|
+
isSeq: isSeq,
|
|
34831
|
+
parse: parse$a,
|
|
34832
|
+
parseAllDocuments: parseAllDocuments,
|
|
34833
|
+
parseDocument: parseDocument,
|
|
34834
|
+
stringify: stringify,
|
|
34835
|
+
visit: visit$1,
|
|
34836
|
+
visitAsync: visitAsync
|
|
34786
34837
|
};
|
|
34787
34838
|
|
|
34788
34839
|
// `export * as default from ...` fails on Webpack v4
|
|
34789
34840
|
|
|
34790
34841
|
var browser$1 = {
|
|
34791
|
-
|
|
34792
|
-
|
|
34793
|
-
|
|
34794
|
-
|
|
34795
|
-
|
|
34796
|
-
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
|
|
34802
|
-
|
|
34803
|
-
|
|
34804
|
-
|
|
34805
|
-
|
|
34806
|
-
|
|
34807
|
-
|
|
34808
|
-
|
|
34809
|
-
|
|
34810
|
-
|
|
34811
|
-
|
|
34812
|
-
|
|
34813
|
-
|
|
34814
|
-
|
|
34815
|
-
|
|
34816
|
-
|
|
34817
|
-
|
|
34818
|
-
|
|
34819
|
-
|
|
34820
|
-
|
|
34821
|
-
|
|
34842
|
+
__proto__: null,
|
|
34843
|
+
Alias: Alias,
|
|
34844
|
+
CST: cst,
|
|
34845
|
+
Composer: Composer,
|
|
34846
|
+
Document: Document,
|
|
34847
|
+
Lexer: Lexer,
|
|
34848
|
+
LineCounter: LineCounter,
|
|
34849
|
+
Pair: Pair,
|
|
34850
|
+
Parser: Parser,
|
|
34851
|
+
Scalar: Scalar,
|
|
34852
|
+
Schema: Schema,
|
|
34853
|
+
YAMLError: YAMLError,
|
|
34854
|
+
YAMLMap: YAMLMap,
|
|
34855
|
+
YAMLParseError: YAMLParseError,
|
|
34856
|
+
YAMLSeq: YAMLSeq,
|
|
34857
|
+
YAMLWarning: YAMLWarning,
|
|
34858
|
+
default: YAML,
|
|
34859
|
+
isAlias: isAlias,
|
|
34860
|
+
isCollection: isCollection$1,
|
|
34861
|
+
isDocument: isDocument,
|
|
34862
|
+
isMap: isMap,
|
|
34863
|
+
isNode: isNode$1,
|
|
34864
|
+
isPair: isPair,
|
|
34865
|
+
isScalar: isScalar$1,
|
|
34866
|
+
isSeq: isSeq,
|
|
34867
|
+
parse: parse$a,
|
|
34868
|
+
parseAllDocuments: parseAllDocuments,
|
|
34869
|
+
parseDocument: parseDocument,
|
|
34870
|
+
stringify: stringify,
|
|
34871
|
+
visit: visit$1,
|
|
34872
|
+
visitAsync: visitAsync
|
|
34822
34873
|
};
|
|
34823
34874
|
|
|
34824
34875
|
var require$$3$1 = /*@__PURE__*/getAugmentedNamespace(browser$1);
|
|
@@ -35357,7 +35408,7 @@ function traverseNodes(node, visitor) {
|
|
|
35357
35408
|
}
|
|
35358
35409
|
async function traverseHtml(html, filePath, visitor) {
|
|
35359
35410
|
// lazy load compiler
|
|
35360
|
-
const { parse } = await import('./dep-
|
|
35411
|
+
const { parse } = await import('./dep-98d07f71.js');
|
|
35361
35412
|
const ast = parse(html, {
|
|
35362
35413
|
sourceCodeLocationInfo: true,
|
|
35363
35414
|
onParseError: (e) => {
|
|
@@ -36637,7 +36688,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
36637
36688
|
}));
|
|
36638
36689
|
}
|
|
36639
36690
|
if (isModule) {
|
|
36640
|
-
postcssPlugins.unshift((await import('./dep-
|
|
36691
|
+
postcssPlugins.unshift((await import('./dep-f597f42f.js').then(function (n) { return n.i; })).default({
|
|
36641
36692
|
...modulesOptions,
|
|
36642
36693
|
localsConvention: modulesOptions?.localsConvention,
|
|
36643
36694
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -38491,7 +38542,7 @@ var etag_1 = etag;
|
|
|
38491
38542
|
* @private
|
|
38492
38543
|
*/
|
|
38493
38544
|
|
|
38494
|
-
var crypto = require$$5;
|
|
38545
|
+
var crypto = require$$5$1;
|
|
38495
38546
|
var Stats = require$$0__default.Stats;
|
|
38496
38547
|
|
|
38497
38548
|
/**
|
|
@@ -38841,7 +38892,7 @@ var convertSourceMap = {};
|
|
|
38841
38892
|
} (convertSourceMap));
|
|
38842
38893
|
|
|
38843
38894
|
function totalist(dir, callback, pre='') {
|
|
38844
|
-
dir = resolve$
|
|
38895
|
+
dir = resolve$3('.', dir);
|
|
38845
38896
|
let arr = readdirSync(dir);
|
|
38846
38897
|
let i=0, abs, stats;
|
|
38847
38898
|
for (; i < arr.length; i++) {
|
|
@@ -39001,7 +39052,7 @@ function toHeaders(name, stats, isEtag) {
|
|
|
39001
39052
|
}
|
|
39002
39053
|
|
|
39003
39054
|
function sirv (dir, opts={}) {
|
|
39004
|
-
dir = resolve$
|
|
39055
|
+
dir = resolve$3(dir || '.');
|
|
39005
39056
|
|
|
39006
39057
|
let isNotFound = opts.onNoMatch || is404;
|
|
39007
39058
|
let setHeaders = opts.setHeaders || noop$2;
|
|
@@ -39427,7 +39478,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
|
|
|
39427
39478
|
await injectSourcesContent(map, mod.file, logger);
|
|
39428
39479
|
}
|
|
39429
39480
|
}
|
|
39430
|
-
const result = ssr
|
|
39481
|
+
const result = ssr && !server.config.experimental.skipSsrTransform
|
|
39431
39482
|
? await server.ssrTransform(code, map, url, originalCode)
|
|
39432
39483
|
: {
|
|
39433
39484
|
code,
|
|
@@ -40092,10 +40143,11 @@ function clientInjectionsPlugin(config) {
|
|
|
40092
40143
|
const protocol = hmrConfig?.protocol || null;
|
|
40093
40144
|
const timeout = hmrConfig?.timeout || 30000;
|
|
40094
40145
|
const overlay = hmrConfig?.overlay !== false;
|
|
40146
|
+
const isHmrServerSpecified = !!hmrConfig?.server;
|
|
40095
40147
|
// hmr.clientPort -> hmr.port
|
|
40096
|
-
// -> (24678 if middleware mode) -> new URL(import.meta.url).port
|
|
40148
|
+
// -> (24678 if middleware mode and HMR server is not specified) -> new URL(import.meta.url).port
|
|
40097
40149
|
let port = hmrConfig?.clientPort || hmrConfig?.port || null;
|
|
40098
|
-
if (config.server.middlewareMode) {
|
|
40150
|
+
if (config.server.middlewareMode && !isHmrServerSpecified) {
|
|
40099
40151
|
port || (port = 24678);
|
|
40100
40152
|
}
|
|
40101
40153
|
let directTarget = hmrConfig?.host || resolvedServerHostname;
|
|
@@ -42198,14 +42250,12 @@ async function createDepsOptimizer(config, server) {
|
|
|
42198
42250
|
addMissingDep(id, deps[id]);
|
|
42199
42251
|
}
|
|
42200
42252
|
}
|
|
42201
|
-
|
|
42202
|
-
|
|
42203
|
-
|
|
42204
|
-
|
|
42205
|
-
|
|
42206
|
-
|
|
42207
|
-
postScanOptimizationResult = runOptimizeDeps(config, knownDeps);
|
|
42208
|
-
}
|
|
42253
|
+
const knownDeps = prepareKnownDeps();
|
|
42254
|
+
// For dev, we run the scanner and the first optimization
|
|
42255
|
+
// run on the background, but we wait until crawling has ended
|
|
42256
|
+
// to decide if we send this result to the browser or we need to
|
|
42257
|
+
// do another optimize step
|
|
42258
|
+
postScanOptimizationResult = runOptimizeDeps(config, knownDeps);
|
|
42209
42259
|
}
|
|
42210
42260
|
catch (e) {
|
|
42211
42261
|
logger.error(e.message);
|
|
@@ -43292,34 +43342,34 @@ async function optimizedDepNeedsInterop(metadata, file, config, ssr) {
|
|
|
43292
43342
|
}
|
|
43293
43343
|
|
|
43294
43344
|
var index$1 = {
|
|
43295
|
-
|
|
43296
|
-
|
|
43297
|
-
|
|
43298
|
-
|
|
43299
|
-
|
|
43300
|
-
|
|
43301
|
-
|
|
43302
|
-
|
|
43303
|
-
|
|
43304
|
-
|
|
43305
|
-
|
|
43306
|
-
|
|
43307
|
-
|
|
43308
|
-
|
|
43309
|
-
|
|
43310
|
-
|
|
43311
|
-
|
|
43312
|
-
|
|
43313
|
-
|
|
43314
|
-
|
|
43315
|
-
|
|
43316
|
-
|
|
43317
|
-
|
|
43318
|
-
|
|
43319
|
-
|
|
43320
|
-
|
|
43321
|
-
|
|
43322
|
-
|
|
43345
|
+
__proto__: null,
|
|
43346
|
+
addManuallyIncludedOptimizeDeps: addManuallyIncludedOptimizeDeps,
|
|
43347
|
+
addOptimizedDepInfo: addOptimizedDepInfo,
|
|
43348
|
+
createIsOptimizedDepUrl: createIsOptimizedDepUrl,
|
|
43349
|
+
debuggerViteDeps: debuggerViteDeps,
|
|
43350
|
+
depsFromOptimizedDepInfo: depsFromOptimizedDepInfo,
|
|
43351
|
+
depsLogString: depsLogString,
|
|
43352
|
+
discoverProjectDependencies: discoverProjectDependencies,
|
|
43353
|
+
extractExportsData: extractExportsData,
|
|
43354
|
+
findKnownImports: findKnownImports,
|
|
43355
|
+
getDepHash: getDepHash,
|
|
43356
|
+
getDepsCacheDir: getDepsCacheDir,
|
|
43357
|
+
getDepsCacheDirPrefix: getDepsCacheDirPrefix,
|
|
43358
|
+
getDepsOptimizer: getDepsOptimizer,
|
|
43359
|
+
getOptimizedDepPath: getOptimizedDepPath,
|
|
43360
|
+
initDepsOptimizer: initDepsOptimizer,
|
|
43361
|
+
initDepsOptimizerMetadata: initDepsOptimizerMetadata,
|
|
43362
|
+
initDevSsrDepsOptimizer: initDevSsrDepsOptimizer,
|
|
43363
|
+
isOptimizedDepFile: isOptimizedDepFile,
|
|
43364
|
+
loadCachedDepOptimizationMetadata: loadCachedDepOptimizationMetadata,
|
|
43365
|
+
newDepOptimizationProcessing: newDepOptimizationProcessing,
|
|
43366
|
+
optimizeDeps: optimizeDeps,
|
|
43367
|
+
optimizeServerSsrDeps: optimizeServerSsrDeps,
|
|
43368
|
+
optimizedDepInfoFromFile: optimizedDepInfoFromFile,
|
|
43369
|
+
optimizedDepInfoFromId: optimizedDepInfoFromId,
|
|
43370
|
+
optimizedDepNeedsInterop: optimizedDepNeedsInterop,
|
|
43371
|
+
runOptimizeDeps: runOptimizeDeps,
|
|
43372
|
+
toDiscoveredDependencies: toDiscoveredDependencies
|
|
43323
43373
|
};
|
|
43324
43374
|
|
|
43325
43375
|
/**
|
|
@@ -44346,6 +44396,7 @@ function resolveBuildOptions(raw, logger) {
|
|
|
44346
44396
|
lib: false,
|
|
44347
44397
|
ssr: false,
|
|
44348
44398
|
ssrManifest: false,
|
|
44399
|
+
ssrEmitAssets: false,
|
|
44349
44400
|
reportCompressedSize: true,
|
|
44350
44401
|
chunkSizeWarningLimit: 500,
|
|
44351
44402
|
watch: null,
|
|
@@ -44934,18 +44985,18 @@ const toOutputFilePathInCss = toOutputFilePathWithoutRuntime;
|
|
|
44934
44985
|
const toOutputFilePathInHtml = toOutputFilePathWithoutRuntime;
|
|
44935
44986
|
|
|
44936
44987
|
var build$1 = {
|
|
44937
|
-
|
|
44938
|
-
|
|
44939
|
-
|
|
44940
|
-
|
|
44941
|
-
|
|
44942
|
-
|
|
44943
|
-
|
|
44944
|
-
|
|
44945
|
-
|
|
44946
|
-
|
|
44947
|
-
|
|
44948
|
-
|
|
44988
|
+
__proto__: null,
|
|
44989
|
+
build: build,
|
|
44990
|
+
createToImportMetaURLBasedRelativeRuntime: createToImportMetaURLBasedRelativeRuntime,
|
|
44991
|
+
onRollupWarning: onRollupWarning,
|
|
44992
|
+
resolveBuildOptions: resolveBuildOptions,
|
|
44993
|
+
resolveBuildOutputs: resolveBuildOutputs,
|
|
44994
|
+
resolveBuildPlugins: resolveBuildPlugins,
|
|
44995
|
+
resolveLibFilename: resolveLibFilename,
|
|
44996
|
+
toOutputFilePathInCss: toOutputFilePathInCss,
|
|
44997
|
+
toOutputFilePathInHtml: toOutputFilePathInHtml,
|
|
44998
|
+
toOutputFilePathInJS: toOutputFilePathInJS,
|
|
44999
|
+
toOutputFilePathWithoutRuntime: toOutputFilePathWithoutRuntime
|
|
44949
45000
|
};
|
|
44950
45001
|
|
|
44951
45002
|
var srcExports = {};
|
|
@@ -51422,14 +51473,14 @@ function setClientErrorHandler(server, logger) {
|
|
|
51422
51473
|
});
|
|
51423
51474
|
}
|
|
51424
51475
|
|
|
51425
|
-
|
|
51426
|
-
|
|
51427
|
-
|
|
51428
|
-
|
|
51429
|
-
|
|
51430
|
-
|
|
51431
|
-
|
|
51432
|
-
|
|
51476
|
+
/**
|
|
51477
|
+
* @typedef { import('estree').Node} Node
|
|
51478
|
+
* @typedef {{
|
|
51479
|
+
* skip: () => void;
|
|
51480
|
+
* remove: () => void;
|
|
51481
|
+
* replace: (node: Node) => void;
|
|
51482
|
+
* }} WalkerContext
|
|
51483
|
+
*/
|
|
51433
51484
|
|
|
51434
51485
|
class WalkerBase {
|
|
51435
51486
|
constructor() {
|
|
@@ -51439,7 +51490,7 @@ class WalkerBase {
|
|
|
51439
51490
|
/** @type {boolean} */
|
|
51440
51491
|
this.should_remove = false;
|
|
51441
51492
|
|
|
51442
|
-
/** @type {
|
|
51493
|
+
/** @type {Node | null} */
|
|
51443
51494
|
this.replacement = null;
|
|
51444
51495
|
|
|
51445
51496
|
/** @type {WalkerContext} */
|
|
@@ -51451,32 +51502,32 @@ class WalkerBase {
|
|
|
51451
51502
|
}
|
|
51452
51503
|
|
|
51453
51504
|
/**
|
|
51454
|
-
*
|
|
51455
|
-
* @param {
|
|
51456
|
-
* @param {
|
|
51457
|
-
* @param {number} index
|
|
51458
|
-
* @param {
|
|
51505
|
+
* @template {Node} Parent
|
|
51506
|
+
* @param {Parent | null | undefined} parent
|
|
51507
|
+
* @param {keyof Parent | null | undefined} prop
|
|
51508
|
+
* @param {number | null | undefined} index
|
|
51509
|
+
* @param {Node} node
|
|
51459
51510
|
*/
|
|
51460
51511
|
replace(parent, prop, index, node) {
|
|
51461
|
-
if (parent) {
|
|
51462
|
-
if (index
|
|
51463
|
-
parent[prop][index] = node;
|
|
51512
|
+
if (parent && prop) {
|
|
51513
|
+
if (index != null) {
|
|
51514
|
+
/** @type {Array<Node>} */ (parent[prop])[index] = node;
|
|
51464
51515
|
} else {
|
|
51465
|
-
parent[prop] = node;
|
|
51516
|
+
/** @type {Node} */ (parent[prop]) = node;
|
|
51466
51517
|
}
|
|
51467
51518
|
}
|
|
51468
51519
|
}
|
|
51469
51520
|
|
|
51470
51521
|
/**
|
|
51471
|
-
*
|
|
51472
|
-
* @param {
|
|
51473
|
-
* @param {
|
|
51474
|
-
* @param {number} index
|
|
51522
|
+
* @template {Node} Parent
|
|
51523
|
+
* @param {Parent | null | undefined} parent
|
|
51524
|
+
* @param {keyof Parent | null | undefined} prop
|
|
51525
|
+
* @param {number | null | undefined} index
|
|
51475
51526
|
*/
|
|
51476
51527
|
remove(parent, prop, index) {
|
|
51477
|
-
if (parent) {
|
|
51478
|
-
if (index !== null) {
|
|
51479
|
-
parent[prop].splice(index, 1);
|
|
51528
|
+
if (parent && prop) {
|
|
51529
|
+
if (index !== null && index !== undefined) {
|
|
51530
|
+
/** @type {Array<Node>} */ (parent[prop]).splice(index, 1);
|
|
51480
51531
|
} else {
|
|
51481
51532
|
delete parent[prop];
|
|
51482
51533
|
}
|
|
@@ -51484,42 +51535,57 @@ class WalkerBase {
|
|
|
51484
51535
|
}
|
|
51485
51536
|
}
|
|
51486
51537
|
|
|
51487
|
-
|
|
51488
|
-
|
|
51489
|
-
|
|
51490
|
-
|
|
51491
|
-
|
|
51492
|
-
/** @typedef {(
|
|
51538
|
+
/**
|
|
51539
|
+
* @typedef { import('estree').Node} Node
|
|
51540
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
51541
|
+
* @typedef {(
|
|
51493
51542
|
* this: WalkerContext,
|
|
51494
|
-
* node:
|
|
51495
|
-
* parent:
|
|
51496
|
-
* key: string,
|
|
51497
|
-
* index: number
|
|
51498
|
-
* ) => void} SyncHandler
|
|
51543
|
+
* node: Node,
|
|
51544
|
+
* parent: Node | null,
|
|
51545
|
+
* key: string | number | symbol | null | undefined,
|
|
51546
|
+
* index: number | null | undefined
|
|
51547
|
+
* ) => void} SyncHandler
|
|
51548
|
+
*/
|
|
51499
51549
|
|
|
51500
51550
|
class SyncWalker extends WalkerBase {
|
|
51501
51551
|
/**
|
|
51502
51552
|
*
|
|
51503
|
-
* @param {SyncHandler} enter
|
|
51504
|
-
* @param {SyncHandler} leave
|
|
51553
|
+
* @param {SyncHandler} [enter]
|
|
51554
|
+
* @param {SyncHandler} [leave]
|
|
51505
51555
|
*/
|
|
51506
51556
|
constructor(enter, leave) {
|
|
51507
51557
|
super();
|
|
51508
51558
|
|
|
51509
|
-
/** @type {
|
|
51559
|
+
/** @type {boolean} */
|
|
51560
|
+
this.should_skip = false;
|
|
51561
|
+
|
|
51562
|
+
/** @type {boolean} */
|
|
51563
|
+
this.should_remove = false;
|
|
51564
|
+
|
|
51565
|
+
/** @type {Node | null} */
|
|
51566
|
+
this.replacement = null;
|
|
51567
|
+
|
|
51568
|
+
/** @type {WalkerContext} */
|
|
51569
|
+
this.context = {
|
|
51570
|
+
skip: () => (this.should_skip = true),
|
|
51571
|
+
remove: () => (this.should_remove = true),
|
|
51572
|
+
replace: (node) => (this.replacement = node)
|
|
51573
|
+
};
|
|
51574
|
+
|
|
51575
|
+
/** @type {SyncHandler | undefined} */
|
|
51510
51576
|
this.enter = enter;
|
|
51511
51577
|
|
|
51512
|
-
/** @type {SyncHandler} */
|
|
51578
|
+
/** @type {SyncHandler | undefined} */
|
|
51513
51579
|
this.leave = leave;
|
|
51514
51580
|
}
|
|
51515
51581
|
|
|
51516
51582
|
/**
|
|
51517
|
-
*
|
|
51518
|
-
* @param {
|
|
51519
|
-
* @param {
|
|
51520
|
-
* @param {
|
|
51521
|
-
* @param {number} [index]
|
|
51522
|
-
* @returns {
|
|
51583
|
+
* @template {Node} Parent
|
|
51584
|
+
* @param {Node} node
|
|
51585
|
+
* @param {Parent | null} parent
|
|
51586
|
+
* @param {keyof Parent} [prop]
|
|
51587
|
+
* @param {number | null} [index]
|
|
51588
|
+
* @returns {Node | null}
|
|
51523
51589
|
*/
|
|
51524
51590
|
visit(node, parent, prop, index) {
|
|
51525
51591
|
if (node) {
|
|
@@ -51553,22 +51619,28 @@ class SyncWalker extends WalkerBase {
|
|
|
51553
51619
|
if (removed) return null;
|
|
51554
51620
|
}
|
|
51555
51621
|
|
|
51556
|
-
|
|
51622
|
+
/** @type {keyof Node} */
|
|
51623
|
+
let key;
|
|
51624
|
+
|
|
51625
|
+
for (key in node) {
|
|
51626
|
+
/** @type {unknown} */
|
|
51557
51627
|
const value = node[key];
|
|
51558
51628
|
|
|
51559
|
-
if (typeof value
|
|
51560
|
-
|
|
51561
|
-
|
|
51562
|
-
|
|
51563
|
-
|
|
51564
|
-
if (
|
|
51565
|
-
|
|
51566
|
-
|
|
51629
|
+
if (value && typeof value === 'object') {
|
|
51630
|
+
if (Array.isArray(value)) {
|
|
51631
|
+
const nodes = /** @type {Array<unknown>} */ (value);
|
|
51632
|
+
for (let i = 0; i < nodes.length; i += 1) {
|
|
51633
|
+
const item = nodes[i];
|
|
51634
|
+
if (isNode(item)) {
|
|
51635
|
+
if (!this.visit(item, node, key, i)) {
|
|
51636
|
+
// removed
|
|
51637
|
+
i--;
|
|
51638
|
+
}
|
|
51567
51639
|
}
|
|
51568
51640
|
}
|
|
51641
|
+
} else if (isNode(value)) {
|
|
51642
|
+
this.visit(value, node, key, null);
|
|
51569
51643
|
}
|
|
51570
|
-
} else if (value !== null && typeof value.type === "string") {
|
|
51571
|
-
this.visit(value, node, key, null);
|
|
51572
51644
|
}
|
|
51573
51645
|
}
|
|
51574
51646
|
|
|
@@ -51602,20 +51674,31 @@ class SyncWalker extends WalkerBase {
|
|
|
51602
51674
|
}
|
|
51603
51675
|
}
|
|
51604
51676
|
|
|
51605
|
-
|
|
51677
|
+
/**
|
|
51678
|
+
* Ducktype a node.
|
|
51679
|
+
*
|
|
51680
|
+
* @param {unknown} value
|
|
51681
|
+
* @returns {value is Node}
|
|
51682
|
+
*/
|
|
51683
|
+
function isNode(value) {
|
|
51684
|
+
return (
|
|
51685
|
+
value !== null && typeof value === 'object' && 'type' in value && typeof value.type === 'string'
|
|
51686
|
+
);
|
|
51687
|
+
}
|
|
51606
51688
|
|
|
51607
|
-
/**
|
|
51608
|
-
|
|
51609
|
-
|
|
51689
|
+
/**
|
|
51690
|
+
* @typedef {import('estree').Node} Node
|
|
51691
|
+
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
51692
|
+
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
51693
|
+
*/
|
|
51610
51694
|
|
|
51611
51695
|
/**
|
|
51612
|
-
*
|
|
51613
|
-
* @param {BaseNode} ast
|
|
51696
|
+
* @param {Node} ast
|
|
51614
51697
|
* @param {{
|
|
51615
51698
|
* enter?: SyncHandler
|
|
51616
51699
|
* leave?: SyncHandler
|
|
51617
51700
|
* }} walker
|
|
51618
|
-
* @returns {
|
|
51701
|
+
* @returns {Node | null}
|
|
51619
51702
|
*/
|
|
51620
51703
|
function walk$1(ast, { enter, leave }) {
|
|
51621
51704
|
const instance = new SyncWalker(enter, leave);
|
|
@@ -52027,6 +52110,9 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
|
|
|
52027
52110
|
handlePattern(node.id, parentFunction);
|
|
52028
52111
|
}
|
|
52029
52112
|
}
|
|
52113
|
+
else if (node.type === 'CatchClause' && node.param) {
|
|
52114
|
+
handlePattern(node.param, node);
|
|
52115
|
+
}
|
|
52030
52116
|
},
|
|
52031
52117
|
leave(node, parent) {
|
|
52032
52118
|
// untrack parent stack from above
|
|
@@ -52102,10 +52188,11 @@ const functionNodeTypeRE = /Function(?:Expression|Declaration)$|Method$/;
|
|
|
52102
52188
|
function isFunction(node) {
|
|
52103
52189
|
return functionNodeTypeRE.test(node.type);
|
|
52104
52190
|
}
|
|
52105
|
-
const scopeNodeTypeRE = /(?:Function|Class)(?:Expression|Declaration)$|Method$|^IfStatement$/;
|
|
52106
52191
|
function findParentScope(parentStack, isVar = false) {
|
|
52107
|
-
const
|
|
52108
|
-
|
|
52192
|
+
const predicate = isVar
|
|
52193
|
+
? isFunction
|
|
52194
|
+
: (node) => node.type === 'BlockStatement';
|
|
52195
|
+
return parentStack.find(predicate);
|
|
52109
52196
|
}
|
|
52110
52197
|
function isInDestructuringAssignment(parent, parentStack) {
|
|
52111
52198
|
if (parent &&
|
|
@@ -53524,7 +53611,7 @@ function bindShortcuts(server, opts) {
|
|
|
53524
53611
|
const onInput = async (input) => {
|
|
53525
53612
|
// ctrl+c or ctrl+d
|
|
53526
53613
|
if (input === '\x03' || input === '\x04') {
|
|
53527
|
-
process.
|
|
53614
|
+
await server.close().finally(() => process.exit(1));
|
|
53528
53615
|
return;
|
|
53529
53616
|
}
|
|
53530
53617
|
if (actionRunning)
|
|
@@ -53614,6 +53701,8 @@ var constants = {
|
|
|
53614
53701
|
|
|
53615
53702
|
const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = constants;
|
|
53616
53703
|
|
|
53704
|
+
const FastBuffer$2 = Buffer[Symbol.species];
|
|
53705
|
+
|
|
53617
53706
|
/**
|
|
53618
53707
|
* Merges an array of buffers into a new buffer.
|
|
53619
53708
|
*
|
|
@@ -53635,7 +53724,9 @@ function concat$1(list, totalLength) {
|
|
|
53635
53724
|
offset += buf.length;
|
|
53636
53725
|
}
|
|
53637
53726
|
|
|
53638
|
-
if (offset < totalLength)
|
|
53727
|
+
if (offset < totalLength) {
|
|
53728
|
+
return new FastBuffer$2(target.buffer, target.byteOffset, offset);
|
|
53729
|
+
}
|
|
53639
53730
|
|
|
53640
53731
|
return target;
|
|
53641
53732
|
}
|
|
@@ -53677,11 +53768,11 @@ function _unmask(buffer, mask) {
|
|
|
53677
53768
|
* @public
|
|
53678
53769
|
*/
|
|
53679
53770
|
function toArrayBuffer$1(buf) {
|
|
53680
|
-
if (buf.
|
|
53771
|
+
if (buf.length === buf.buffer.byteLength) {
|
|
53681
53772
|
return buf.buffer;
|
|
53682
53773
|
}
|
|
53683
53774
|
|
|
53684
|
-
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.
|
|
53775
|
+
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
|
|
53685
53776
|
}
|
|
53686
53777
|
|
|
53687
53778
|
/**
|
|
@@ -53700,9 +53791,9 @@ function toBuffer$2(data) {
|
|
|
53700
53791
|
let buf;
|
|
53701
53792
|
|
|
53702
53793
|
if (data instanceof ArrayBuffer) {
|
|
53703
|
-
buf =
|
|
53794
|
+
buf = new FastBuffer$2(data);
|
|
53704
53795
|
} else if (ArrayBuffer.isView(data)) {
|
|
53705
|
-
buf =
|
|
53796
|
+
buf = new FastBuffer$2(data.buffer, data.byteOffset, data.byteLength);
|
|
53706
53797
|
} else {
|
|
53707
53798
|
buf = Buffer.from(data);
|
|
53708
53799
|
toBuffer$2.readOnly = false;
|
|
@@ -53798,6 +53889,7 @@ const bufferUtil = bufferUtilExports;
|
|
|
53798
53889
|
const Limiter = limiter;
|
|
53799
53890
|
const { kStatusCode: kStatusCode$2 } = constants;
|
|
53800
53891
|
|
|
53892
|
+
const FastBuffer$1 = Buffer[Symbol.species];
|
|
53801
53893
|
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
|
|
53802
53894
|
const kPerMessageDeflate = Symbol('permessage-deflate');
|
|
53803
53895
|
const kTotalLength = Symbol('total-length');
|
|
@@ -54229,7 +54321,9 @@ let PerMessageDeflate$4 = class PerMessageDeflate {
|
|
|
54229
54321
|
this._deflate[kTotalLength]
|
|
54230
54322
|
);
|
|
54231
54323
|
|
|
54232
|
-
if (fin)
|
|
54324
|
+
if (fin) {
|
|
54325
|
+
data = new FastBuffer$1(data.buffer, data.byteOffset, data.length - 4);
|
|
54326
|
+
}
|
|
54233
54327
|
|
|
54234
54328
|
//
|
|
54235
54329
|
// Ensure that the callback will not be called again in
|
|
@@ -54308,6 +54402,8 @@ var validation = {
|
|
|
54308
54402
|
set exports(v){ validationExports = v; },
|
|
54309
54403
|
};
|
|
54310
54404
|
|
|
54405
|
+
const { isUtf8 } = require$$0$b;
|
|
54406
|
+
|
|
54311
54407
|
//
|
|
54312
54408
|
// Allowed token characters:
|
|
54313
54409
|
//
|
|
@@ -54419,13 +54515,16 @@ validation.exports = {
|
|
|
54419
54515
|
tokenChars: tokenChars$2
|
|
54420
54516
|
};
|
|
54421
54517
|
|
|
54422
|
-
|
|
54423
|
-
|
|
54518
|
+
if (isUtf8) {
|
|
54519
|
+
validationExports.isValidUTF8 = function (buf) {
|
|
54520
|
+
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
54521
|
+
};
|
|
54522
|
+
} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
|
|
54424
54523
|
try {
|
|
54425
54524
|
const isValidUTF8 = require('utf-8-validate');
|
|
54426
54525
|
|
|
54427
54526
|
validationExports.isValidUTF8 = function (buf) {
|
|
54428
|
-
return buf.length <
|
|
54527
|
+
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
54429
54528
|
};
|
|
54430
54529
|
} catch (e) {
|
|
54431
54530
|
// Continue regardless of the error.
|
|
@@ -54444,6 +54543,7 @@ const {
|
|
|
54444
54543
|
const { concat, toArrayBuffer, unmask } = bufferUtilExports;
|
|
54445
54544
|
const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExports;
|
|
54446
54545
|
|
|
54546
|
+
const FastBuffer = Buffer[Symbol.species];
|
|
54447
54547
|
const GET_INFO = 0;
|
|
54448
54548
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
54449
54549
|
const GET_PAYLOAD_LENGTH_64 = 2;
|
|
@@ -54529,8 +54629,13 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54529
54629
|
|
|
54530
54630
|
if (n < this._buffers[0].length) {
|
|
54531
54631
|
const buf = this._buffers[0];
|
|
54532
|
-
this._buffers[0] =
|
|
54533
|
-
|
|
54632
|
+
this._buffers[0] = new FastBuffer(
|
|
54633
|
+
buf.buffer,
|
|
54634
|
+
buf.byteOffset + n,
|
|
54635
|
+
buf.length - n
|
|
54636
|
+
);
|
|
54637
|
+
|
|
54638
|
+
return new FastBuffer(buf.buffer, buf.byteOffset, n);
|
|
54534
54639
|
}
|
|
54535
54640
|
|
|
54536
54641
|
const dst = Buffer.allocUnsafe(n);
|
|
@@ -54543,7 +54648,11 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54543
54648
|
dst.set(this._buffers.shift(), offset);
|
|
54544
54649
|
} else {
|
|
54545
54650
|
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
|
|
54546
|
-
this._buffers[0] =
|
|
54651
|
+
this._buffers[0] = new FastBuffer(
|
|
54652
|
+
buf.buffer,
|
|
54653
|
+
buf.byteOffset + n,
|
|
54654
|
+
buf.length - n
|
|
54655
|
+
);
|
|
54547
54656
|
}
|
|
54548
54657
|
|
|
54549
54658
|
n -= buf.length;
|
|
@@ -54691,7 +54800,10 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54691
54800
|
);
|
|
54692
54801
|
}
|
|
54693
54802
|
|
|
54694
|
-
if (
|
|
54803
|
+
if (
|
|
54804
|
+
this._payloadLength > 0x7d ||
|
|
54805
|
+
(this._opcode === 0x08 && this._payloadLength === 1)
|
|
54806
|
+
) {
|
|
54695
54807
|
this._loop = false;
|
|
54696
54808
|
return error(
|
|
54697
54809
|
RangeError,
|
|
@@ -54978,14 +55090,6 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54978
55090
|
if (data.length === 0) {
|
|
54979
55091
|
this.emit('conclude', 1005, EMPTY_BUFFER$2);
|
|
54980
55092
|
this.end();
|
|
54981
|
-
} else if (data.length === 1) {
|
|
54982
|
-
return error(
|
|
54983
|
-
RangeError,
|
|
54984
|
-
'invalid payload length 1',
|
|
54985
|
-
true,
|
|
54986
|
-
1002,
|
|
54987
|
-
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
|
|
54988
|
-
);
|
|
54989
55093
|
} else {
|
|
54990
55094
|
const code = data.readUInt16BE(0);
|
|
54991
55095
|
|
|
@@ -54999,7 +55103,11 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54999
55103
|
);
|
|
55000
55104
|
}
|
|
55001
55105
|
|
|
55002
|
-
const buf =
|
|
55106
|
+
const buf = new FastBuffer(
|
|
55107
|
+
data.buffer,
|
|
55108
|
+
data.byteOffset + 2,
|
|
55109
|
+
data.length - 2
|
|
55110
|
+
);
|
|
55003
55111
|
|
|
55004
55112
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
55005
55113
|
return error(
|
|
@@ -55050,7 +55158,7 @@ function error(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
|
55050
55158
|
}
|
|
55051
55159
|
|
|
55052
55160
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls$" }] */
|
|
55053
|
-
const { randomFillSync } = require$$5;
|
|
55161
|
+
const { randomFillSync } = require$$5$1;
|
|
55054
55162
|
|
|
55055
55163
|
const PerMessageDeflate$2 = permessageDeflate;
|
|
55056
55164
|
const { EMPTY_BUFFER: EMPTY_BUFFER$1 } = constants;
|
|
@@ -56023,7 +56131,7 @@ const https$2 = require$$1$2;
|
|
|
56023
56131
|
const http$3 = require$$1$1;
|
|
56024
56132
|
const net = require$$3$2;
|
|
56025
56133
|
const tls = require$$4;
|
|
56026
|
-
const { randomBytes, createHash: createHash$1 } = require$$5;
|
|
56134
|
+
const { randomBytes, createHash: createHash$1 } = require$$5$1;
|
|
56027
56135
|
const { URL: URL$2 } = require$$0$9;
|
|
56028
56136
|
|
|
56029
56137
|
const PerMessageDeflate$1 = permessageDeflate;
|
|
@@ -56297,7 +56405,8 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
56297
56405
|
if (this.readyState === WebSocket$1.CLOSED) return;
|
|
56298
56406
|
if (this.readyState === WebSocket$1.CONNECTING) {
|
|
56299
56407
|
const msg = 'WebSocket was closed before the connection was established';
|
|
56300
|
-
|
|
56408
|
+
abortHandshake$1(this, this._req, msg);
|
|
56409
|
+
return;
|
|
56301
56410
|
}
|
|
56302
56411
|
|
|
56303
56412
|
if (this.readyState === WebSocket$1.CLOSING) {
|
|
@@ -56492,7 +56601,8 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
56492
56601
|
if (this.readyState === WebSocket$1.CLOSED) return;
|
|
56493
56602
|
if (this.readyState === WebSocket$1.CONNECTING) {
|
|
56494
56603
|
const msg = 'WebSocket was closed before the connection was established';
|
|
56495
|
-
|
|
56604
|
+
abortHandshake$1(this, this._req, msg);
|
|
56605
|
+
return;
|
|
56496
56606
|
}
|
|
56497
56607
|
|
|
56498
56608
|
if (this._socket) {
|
|
@@ -57111,7 +57221,7 @@ function sendAfterClose(websocket, data, cb) {
|
|
|
57111
57221
|
`WebSocket is not open: readyState ${websocket.readyState} ` +
|
|
57112
57222
|
`(${readyStates[websocket.readyState]})`
|
|
57113
57223
|
);
|
|
57114
|
-
cb
|
|
57224
|
+
process.nextTick(cb, err);
|
|
57115
57225
|
}
|
|
57116
57226
|
}
|
|
57117
57227
|
|
|
@@ -57384,7 +57494,7 @@ var subprotocol$1 = { parse };
|
|
|
57384
57494
|
|
|
57385
57495
|
const EventEmitter = require$$0$5;
|
|
57386
57496
|
const http$2 = require$$1$1;
|
|
57387
|
-
const { createHash } = require$$5;
|
|
57497
|
+
const { createHash } = require$$5$1;
|
|
57388
57498
|
|
|
57389
57499
|
const extension = extension$1;
|
|
57390
57500
|
const PerMessageDeflate = permessageDeflate;
|
|
@@ -58967,7 +59077,7 @@ var URL$1 = url.URL;
|
|
|
58967
59077
|
var http$1 = require$$1$1;
|
|
58968
59078
|
var https$1 = require$$1$2;
|
|
58969
59079
|
var Writable = require$$0$7.Writable;
|
|
58970
|
-
var assert =
|
|
59080
|
+
var assert = require$$5;
|
|
58971
59081
|
var debug$2 = debug_1;
|
|
58972
59082
|
|
|
58973
59083
|
// Create handlers that pass events from native requests
|
|
@@ -61277,7 +61387,7 @@ async function startServer(server, inlinePort, isRestart = false) {
|
|
|
61277
61387
|
throw new Error('Cannot call server.listen in middleware mode.');
|
|
61278
61388
|
}
|
|
61279
61389
|
const options = server.config.server;
|
|
61280
|
-
const port = inlinePort ?? options.port ??
|
|
61390
|
+
const port = inlinePort ?? options.port ?? DEFAULT_DEV_PORT;
|
|
61281
61391
|
const hostname = await resolveHostname(options.host);
|
|
61282
61392
|
const protocol = options.https ? 'https' : 'http';
|
|
61283
61393
|
const serverPort = await httpServerStart(httpServer, {
|
|
@@ -61386,7 +61496,8 @@ async function restartServer(server) {
|
|
|
61386
61496
|
if (!middlewareMode) {
|
|
61387
61497
|
await server.listen(port, true);
|
|
61388
61498
|
logger.info('server restarted.', { timestamp: true });
|
|
61389
|
-
if ((port ??
|
|
61499
|
+
if ((port ?? DEFAULT_DEV_PORT) !== (prevPort ?? DEFAULT_DEV_PORT) ||
|
|
61500
|
+
host !== prevHost) {
|
|
61390
61501
|
logger.info('');
|
|
61391
61502
|
server.printUrls();
|
|
61392
61503
|
}
|
|
@@ -61423,10 +61534,10 @@ async function updateCjsSsrExternals(server) {
|
|
|
61423
61534
|
}
|
|
61424
61535
|
|
|
61425
61536
|
var index = {
|
|
61426
|
-
|
|
61427
|
-
|
|
61428
|
-
|
|
61429
|
-
|
|
61537
|
+
__proto__: null,
|
|
61538
|
+
createServer: createServer,
|
|
61539
|
+
resolveServerOptions: resolveServerOptions,
|
|
61540
|
+
searchForWorkspaceRoot: searchForWorkspaceRoot
|
|
61430
61541
|
};
|
|
61431
61542
|
|
|
61432
61543
|
/* eslint-disable */
|
|
@@ -61595,7 +61706,7 @@ async function preview(inlineConfig = {}) {
|
|
|
61595
61706
|
postHooks.forEach((fn) => fn && fn());
|
|
61596
61707
|
const options = config.preview;
|
|
61597
61708
|
const hostname = await resolveHostname(options.host);
|
|
61598
|
-
const port = options.port ??
|
|
61709
|
+
const port = options.port ?? DEFAULT_PREVIEW_PORT;
|
|
61599
61710
|
const protocol = options.https ? 'https' : 'http';
|
|
61600
61711
|
const logger = config.logger;
|
|
61601
61712
|
const serverPort = await httpServerStart(httpServer, {
|
|
@@ -61622,9 +61733,9 @@ async function preview(inlineConfig = {}) {
|
|
|
61622
61733
|
}
|
|
61623
61734
|
|
|
61624
61735
|
var preview$1 = {
|
|
61625
|
-
|
|
61626
|
-
|
|
61627
|
-
|
|
61736
|
+
__proto__: null,
|
|
61737
|
+
preview: preview,
|
|
61738
|
+
resolvePreviewOptions: resolvePreviewOptions
|
|
61628
61739
|
};
|
|
61629
61740
|
|
|
61630
61741
|
function resolveSSROptions(ssr, preserveSymlinks, buildSsrCjsExternalHeuristics) {
|
|
@@ -62234,4 +62345,4 @@ function isDepsOptimizerEnabled(config, ssr) {
|
|
|
62234
62345
|
(command === 'serve' && disabled === 'dev'));
|
|
62235
62346
|
}
|
|
62236
62347
|
|
|
62237
|
-
export { picocolorsExports as A, bindShortcuts as B,
|
|
62348
|
+
export { picocolorsExports as A, bindShortcuts as B, index$1 as C, build$1 as D, index as E, preview$1 as F, preprocessCSS as a, build as b, createServer as c, resolvePackageData as d, buildErrorMessage as e, formatPostcssSourceMap as f, defineConfig as g, resolveConfig as h, resolveBaseUrl as i, getDepOptimizationConfig as j, isDepsOptimizerEnabled as k, loadConfigFromFile as l, mergeConfig as m, normalizePath$3 as n, optimizeDeps as o, preview as p, mergeAlias as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, createFilter as u, send$1 as v, createLogger as w, searchForWorkspaceRoot as x, loadEnv as y, resolveEnvPrefix as z };
|