vite 4.0.4 → 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 +39 -12
- package/dist/client/client.mjs +16 -2
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-5e7f419b.js → dep-387affca.js} +924 -717
- 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-3049ac5d.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 +21 -9
- package/dist/node/index.js +6 -1
- package/dist/node-cjs/publicUtils.cjs +9 -2
- package/package.json +25 -17
- package/types/metadata.d.ts +10 -0
|
@@ -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; },
|
|
@@ -2639,11 +2610,11 @@ const attachScopes = function attachScopes(ast, propertyName = 'scope') {
|
|
|
2639
2610
|
};
|
|
2640
2611
|
|
|
2641
2612
|
// Helper since Typescript can't detect readonly arrays with Array.isArray
|
|
2642
|
-
function isArray$
|
|
2613
|
+
function isArray$2(arg) {
|
|
2643
2614
|
return Array.isArray(arg);
|
|
2644
2615
|
}
|
|
2645
2616
|
function ensureArray(thing) {
|
|
2646
|
-
if (isArray$
|
|
2617
|
+
if (isArray$2(thing))
|
|
2647
2618
|
return thing;
|
|
2648
2619
|
if (thing == null)
|
|
2649
2620
|
return [];
|
|
@@ -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
|
},
|
|
@@ -12803,25 +12774,7 @@ function displaySize(bytes) {
|
|
|
12803
12774
|
})} kB`;
|
|
12804
12775
|
}
|
|
12805
12776
|
|
|
12806
|
-
|
|
12807
|
-
var __defProps = Object.defineProperties;
|
|
12808
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
12809
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
12810
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12811
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12812
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12813
|
-
var __spreadValues = (a, b) => {
|
|
12814
|
-
for (var prop in b || (b = {}))
|
|
12815
|
-
if (__hasOwnProp.call(b, prop))
|
|
12816
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12817
|
-
if (__getOwnPropSymbols)
|
|
12818
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12819
|
-
if (__propIsEnum.call(b, prop))
|
|
12820
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12821
|
-
}
|
|
12822
|
-
return a;
|
|
12823
|
-
};
|
|
12824
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
12777
|
+
// src/find.ts
|
|
12825
12778
|
async function find(filename, options) {
|
|
12826
12779
|
let dir = require$$0$4.dirname(require$$0$4.resolve(filename));
|
|
12827
12780
|
const root = (options == null ? void 0 : options.root) ? require$$0$4.resolve(options.root) : null;
|
|
@@ -12999,7 +12952,9 @@ var NATIVE_SEP_RE = new RegExp("\\" + require$$0$4.sep, "g");
|
|
|
12999
12952
|
var PATTERN_REGEX_CACHE = /* @__PURE__ */ new Map();
|
|
13000
12953
|
var GLOB_ALL_PATTERN = `**/*`;
|
|
13001
12954
|
var DEFAULT_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
|
|
13002
|
-
var DEFAULT_EXTENSIONS_RE_GROUP = `\\.(?:${DEFAULT_EXTENSIONS.map((ext) => ext.substring(1)).join(
|
|
12955
|
+
var DEFAULT_EXTENSIONS_RE_GROUP = `\\.(?:${DEFAULT_EXTENSIONS.map((ext) => ext.substring(1)).join(
|
|
12956
|
+
"|"
|
|
12957
|
+
)})`;
|
|
13003
12958
|
new Function("path", "return import(path).then(m => m.default)");
|
|
13004
12959
|
async function resolveTSConfig(filename) {
|
|
13005
12960
|
if (require$$0$4.extname(filename) !== ".json") {
|
|
@@ -13028,7 +12983,9 @@ function resolve2posix(dir, filename) {
|
|
|
13028
12983
|
if (require$$0$4.sep === require$$0$4.posix.sep) {
|
|
13029
12984
|
return dir ? require$$0$4.resolve(dir, filename) : require$$0$4.resolve(filename);
|
|
13030
12985
|
}
|
|
13031
|
-
return native2posix(
|
|
12986
|
+
return native2posix(
|
|
12987
|
+
dir ? require$$0$4.resolve(posix2native(dir), posix2native(filename)) : require$$0$4.resolve(posix2native(filename))
|
|
12988
|
+
);
|
|
13032
12989
|
}
|
|
13033
12990
|
function resolveReferencedTSConfigFiles(result) {
|
|
13034
12991
|
const dir = require$$0$4.dirname(result.tsconfigFile);
|
|
@@ -13039,11 +12996,14 @@ function resolveReferencedTSConfigFiles(result) {
|
|
|
13039
12996
|
}
|
|
13040
12997
|
function resolveSolutionTSConfig(filename, result) {
|
|
13041
12998
|
if (result.referenced && DEFAULT_EXTENSIONS.some((ext) => filename.endsWith(ext)) && !isIncluded(filename, result)) {
|
|
13042
|
-
const solutionTSConfig = result.referenced.find(
|
|
12999
|
+
const solutionTSConfig = result.referenced.find(
|
|
13000
|
+
(referenced) => isIncluded(filename, referenced)
|
|
13001
|
+
);
|
|
13043
13002
|
if (solutionTSConfig) {
|
|
13044
|
-
return
|
|
13003
|
+
return {
|
|
13004
|
+
...solutionTSConfig,
|
|
13045
13005
|
solution: result
|
|
13046
|
-
}
|
|
13006
|
+
};
|
|
13047
13007
|
}
|
|
13048
13008
|
}
|
|
13049
13009
|
return result;
|
|
@@ -13055,7 +13015,11 @@ function isIncluded(filename, result) {
|
|
|
13055
13015
|
if (files.includes(filename)) {
|
|
13056
13016
|
return true;
|
|
13057
13017
|
}
|
|
13058
|
-
const isIncluded2 = isGlobMatch(
|
|
13018
|
+
const isIncluded2 = isGlobMatch(
|
|
13019
|
+
absoluteFilename,
|
|
13020
|
+
dir,
|
|
13021
|
+
result.tsconfig.include || (result.tsconfig.files ? [] : [GLOB_ALL_PATTERN])
|
|
13022
|
+
);
|
|
13059
13023
|
if (isIncluded2) {
|
|
13060
13024
|
const isExcluded = isGlobMatch(absoluteFilename, dir, result.tsconfig.exclude || []);
|
|
13061
13025
|
return !isExcluded;
|
|
@@ -13181,7 +13145,12 @@ async function parseFile$1(tsconfigFile, cache) {
|
|
|
13181
13145
|
cache == null ? void 0 : cache.set(tsconfigFile, result);
|
|
13182
13146
|
return result;
|
|
13183
13147
|
} catch (e) {
|
|
13184
|
-
throw new TSConfckParseError(
|
|
13148
|
+
throw new TSConfckParseError(
|
|
13149
|
+
`parsing ${tsconfigFile} failed: ${e}`,
|
|
13150
|
+
"PARSE_FILE",
|
|
13151
|
+
tsconfigFile,
|
|
13152
|
+
e
|
|
13153
|
+
);
|
|
13185
13154
|
}
|
|
13186
13155
|
}
|
|
13187
13156
|
function normalizeTSConfig(tsconfig, dir) {
|
|
@@ -13212,7 +13181,11 @@ async function parseExtends(result, cache) {
|
|
|
13212
13181
|
const extendedTSConfigFile = resolveExtends(extending.tsconfig.extends, extending.tsconfigFile);
|
|
13213
13182
|
if (extended.some((x) => x.tsconfigFile === extendedTSConfigFile)) {
|
|
13214
13183
|
const circle = extended.concat({ tsconfigFile: extendedTSConfigFile, tsconfig: null }).map((e) => e.tsconfigFile).join(" -> ");
|
|
13215
|
-
throw new TSConfckParseError(
|
|
13184
|
+
throw new TSConfckParseError(
|
|
13185
|
+
`Circular dependency in "extends": ${circle}`,
|
|
13186
|
+
"EXTENDS_CIRCULAR",
|
|
13187
|
+
result.tsconfigFile
|
|
13188
|
+
);
|
|
13216
13189
|
}
|
|
13217
13190
|
extended.push(await parseFile$1(extendedTSConfigFile, cache));
|
|
13218
13191
|
}
|
|
@@ -13236,7 +13209,12 @@ function resolveExtends(extended, from) {
|
|
|
13236
13209
|
error = e;
|
|
13237
13210
|
}
|
|
13238
13211
|
}
|
|
13239
|
-
throw new TSConfckParseError(
|
|
13212
|
+
throw new TSConfckParseError(
|
|
13213
|
+
`failed to resolve "extends":"${extended}" in ${from}`,
|
|
13214
|
+
"EXTENDS_RESOLVE",
|
|
13215
|
+
from,
|
|
13216
|
+
error
|
|
13217
|
+
);
|
|
13240
13218
|
}
|
|
13241
13219
|
var EXTENDABLE_KEYS = [
|
|
13242
13220
|
"compilerOptions",
|
|
@@ -13251,7 +13229,9 @@ var EXTENDABLE_KEYS = [
|
|
|
13251
13229
|
function extendTSConfig(extending, extended) {
|
|
13252
13230
|
const extendingConfig = extending.tsconfig;
|
|
13253
13231
|
const extendedConfig = extended.tsconfig;
|
|
13254
|
-
const relativePath = native2posix(
|
|
13232
|
+
const relativePath = native2posix(
|
|
13233
|
+
require$$0$4.relative(require$$0$4.dirname(extending.tsconfigFile), require$$0$4.dirname(extended.tsconfigFile))
|
|
13234
|
+
);
|
|
13255
13235
|
for (const key of Object.keys(extendedConfig).filter((key2) => EXTENDABLE_KEYS.includes(key2))) {
|
|
13256
13236
|
if (key === "compilerOptions") {
|
|
13257
13237
|
if (!extendingConfig.compilerOptions) {
|
|
@@ -13261,13 +13241,21 @@ function extendTSConfig(extending, extended) {
|
|
|
13261
13241
|
if (Object.prototype.hasOwnProperty.call(extendingConfig.compilerOptions, option)) {
|
|
13262
13242
|
continue;
|
|
13263
13243
|
}
|
|
13264
|
-
extendingConfig.compilerOptions[option] = rebaseRelative(
|
|
13244
|
+
extendingConfig.compilerOptions[option] = rebaseRelative(
|
|
13245
|
+
option,
|
|
13246
|
+
extendedConfig.compilerOptions[option],
|
|
13247
|
+
relativePath
|
|
13248
|
+
);
|
|
13265
13249
|
}
|
|
13266
13250
|
} else if (extendingConfig[key] === void 0) {
|
|
13267
13251
|
if (key === "watchOptions") {
|
|
13268
13252
|
extendingConfig.watchOptions = {};
|
|
13269
13253
|
for (const option of Object.keys(extendedConfig.watchOptions)) {
|
|
13270
|
-
extendingConfig.watchOptions[option] = rebaseRelative(
|
|
13254
|
+
extendingConfig.watchOptions[option] = rebaseRelative(
|
|
13255
|
+
option,
|
|
13256
|
+
extendedConfig.watchOptions[option],
|
|
13257
|
+
relativePath
|
|
13258
|
+
);
|
|
13271
13259
|
}
|
|
13272
13260
|
} else {
|
|
13273
13261
|
extendingConfig[key] = rebaseRelative(key, extendedConfig[key], relativePath);
|
|
@@ -13691,6 +13679,9 @@ async function loadTsconfigJsonForFile(filename) {
|
|
|
13691
13679
|
}
|
|
13692
13680
|
}
|
|
13693
13681
|
function reloadOnTsconfigChange(changedFile) {
|
|
13682
|
+
// server could be closed externally after a file change is detected
|
|
13683
|
+
if (!server)
|
|
13684
|
+
return;
|
|
13694
13685
|
// any tsconfig.json that's added in the workspace could be closer to a code file than a previously cached one
|
|
13695
13686
|
// any json file in the tsconfig cache could have been used to compile ts
|
|
13696
13687
|
if (path$o.basename(changedFile) === 'tsconfig.json' ||
|
|
@@ -13873,6 +13864,90 @@ function terserPlugin(config) {
|
|
|
13873
13864
|
};
|
|
13874
13865
|
}
|
|
13875
13866
|
|
|
13867
|
+
var json = JSON;
|
|
13868
|
+
|
|
13869
|
+
var isArray$1 = Array.isArray || function (x) {
|
|
13870
|
+
return {}.toString.call(x) === '[object Array]';
|
|
13871
|
+
};
|
|
13872
|
+
|
|
13873
|
+
var objectKeys = Object.keys || function (obj) {
|
|
13874
|
+
var has = Object.prototype.hasOwnProperty || function () { return true; };
|
|
13875
|
+
var keys = [];
|
|
13876
|
+
for (var key in obj) {
|
|
13877
|
+
if (has.call(obj, key)) { keys.push(key); }
|
|
13878
|
+
}
|
|
13879
|
+
return keys;
|
|
13880
|
+
};
|
|
13881
|
+
|
|
13882
|
+
var jsonStableStringify = function (obj, opts) {
|
|
13883
|
+
if (!opts) { opts = {}; }
|
|
13884
|
+
if (typeof opts === 'function') { opts = { cmp: opts }; }
|
|
13885
|
+
var space = opts.space || '';
|
|
13886
|
+
if (typeof space === 'number') { space = Array(space + 1).join(' '); }
|
|
13887
|
+
var cycles = typeof opts.cycles === 'boolean' ? opts.cycles : false;
|
|
13888
|
+
var replacer = opts.replacer || function (key, value) { return value; };
|
|
13889
|
+
|
|
13890
|
+
var cmp = opts.cmp && (function (f) {
|
|
13891
|
+
return function (node) {
|
|
13892
|
+
return function (a, b) {
|
|
13893
|
+
var aobj = { key: a, value: node[a] };
|
|
13894
|
+
var bobj = { key: b, value: node[b] };
|
|
13895
|
+
return f(aobj, bobj);
|
|
13896
|
+
};
|
|
13897
|
+
};
|
|
13898
|
+
}(opts.cmp));
|
|
13899
|
+
|
|
13900
|
+
var seen = [];
|
|
13901
|
+
return (function stringify(parent, key, node, level) {
|
|
13902
|
+
var indent = space ? '\n' + new Array(level + 1).join(space) : '';
|
|
13903
|
+
var colonSeparator = space ? ': ' : ':';
|
|
13904
|
+
|
|
13905
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
13906
|
+
node = node.toJSON();
|
|
13907
|
+
}
|
|
13908
|
+
|
|
13909
|
+
node = replacer.call(parent, key, node);
|
|
13910
|
+
|
|
13911
|
+
if (node === undefined) {
|
|
13912
|
+
return;
|
|
13913
|
+
}
|
|
13914
|
+
if (typeof node !== 'object' || node === null) {
|
|
13915
|
+
return json.stringify(node);
|
|
13916
|
+
}
|
|
13917
|
+
if (isArray$1(node)) {
|
|
13918
|
+
var out = [];
|
|
13919
|
+
for (var i = 0; i < node.length; i++) {
|
|
13920
|
+
var item = stringify(node, i, node[i], level + 1) || json.stringify(null);
|
|
13921
|
+
out.push(indent + space + item);
|
|
13922
|
+
}
|
|
13923
|
+
return '[' + out.join(',') + indent + ']';
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13926
|
+
if (seen.indexOf(node) !== -1) {
|
|
13927
|
+
if (cycles) { return json.stringify('__cycle__'); }
|
|
13928
|
+
throw new TypeError('Converting circular structure to JSON');
|
|
13929
|
+
} else { seen.push(node); }
|
|
13930
|
+
|
|
13931
|
+
var keys = objectKeys(node).sort(cmp && cmp(node));
|
|
13932
|
+
var out = [];
|
|
13933
|
+
for (var i = 0; i < keys.length; i++) {
|
|
13934
|
+
var key = keys[i];
|
|
13935
|
+
var value = stringify(node, key, node[key], level + 1);
|
|
13936
|
+
|
|
13937
|
+
if (!value) { continue; }
|
|
13938
|
+
|
|
13939
|
+
var keyValue = json.stringify(key)
|
|
13940
|
+
+ colonSeparator
|
|
13941
|
+
+ value;
|
|
13942
|
+
|
|
13943
|
+
out.push(indent + space + keyValue);
|
|
13944
|
+
}
|
|
13945
|
+
seen.splice(seen.indexOf(node), 1);
|
|
13946
|
+
return '{' + out.join(',') + indent + '}';
|
|
13947
|
+
|
|
13948
|
+
}({ '': obj }, '', obj, 0));
|
|
13949
|
+
};
|
|
13950
|
+
|
|
13876
13951
|
const mimes$1 = {
|
|
13877
13952
|
"ez": "application/andrew-inset",
|
|
13878
13953
|
"aw": "application/applixware",
|
|
@@ -14397,7 +14472,9 @@ function assetPlugin(config) {
|
|
|
14397
14472
|
},
|
|
14398
14473
|
generateBundle(_, bundle) {
|
|
14399
14474
|
// do not emit assets for SSR build
|
|
14400
|
-
if (config.command === 'build' &&
|
|
14475
|
+
if (config.command === 'build' &&
|
|
14476
|
+
config.build.ssr &&
|
|
14477
|
+
!config.build.ssrEmitAssets) {
|
|
14401
14478
|
for (const file in bundle) {
|
|
14402
14479
|
if (bundle[file].type === 'asset' &&
|
|
14403
14480
|
!file.endsWith('ssr-manifest.json') &&
|
|
@@ -14653,7 +14730,7 @@ function manifestPlugin(config) {
|
|
|
14653
14730
|
? config.build.manifest
|
|
14654
14731
|
: 'manifest.json',
|
|
14655
14732
|
type: 'asset',
|
|
14656
|
-
source:
|
|
14733
|
+
source: jsonStableStringify(manifest, { space: 2 }),
|
|
14657
14734
|
});
|
|
14658
14735
|
}
|
|
14659
14736
|
},
|
|
@@ -14757,134 +14834,24 @@ function getCodeWithSourcemap(type, code, map) {
|
|
|
14757
14834
|
code += `\n/*${JSON.stringify(map, null, 2).replace(/\*\//g, '*\\/')}*/\n`;
|
|
14758
14835
|
}
|
|
14759
14836
|
if (type === 'js') {
|
|
14760
|
-
code += `\n//# sourceMappingURL=${genSourceMapUrl(map
|
|
14837
|
+
code += `\n//# sourceMappingURL=${genSourceMapUrl(map)}`;
|
|
14761
14838
|
}
|
|
14762
14839
|
else if (type === 'css') {
|
|
14763
|
-
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map
|
|
14840
|
+
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map)} */`;
|
|
14764
14841
|
}
|
|
14765
14842
|
return code;
|
|
14766
14843
|
}
|
|
14767
14844
|
|
|
14768
|
-
|
|
14769
|
-
* @param {object} exports
|
|
14770
|
-
* @param {Set<string>} keys
|
|
14771
|
-
*/
|
|
14772
|
-
function loop(exports, keys) {
|
|
14773
|
-
if (typeof exports === 'string') {
|
|
14774
|
-
return exports;
|
|
14775
|
-
}
|
|
14776
|
-
|
|
14777
|
-
if (exports) {
|
|
14778
|
-
let idx, tmp;
|
|
14779
|
-
if (Array.isArray(exports)) {
|
|
14780
|
-
for (idx=0; idx < exports.length; idx++) {
|
|
14781
|
-
if (tmp = loop(exports[idx], keys)) return tmp;
|
|
14782
|
-
}
|
|
14783
|
-
} else {
|
|
14784
|
-
for (idx in exports) {
|
|
14785
|
-
if (keys.has(idx)) {
|
|
14786
|
-
return loop(exports[idx], keys);
|
|
14787
|
-
}
|
|
14788
|
-
}
|
|
14789
|
-
}
|
|
14790
|
-
}
|
|
14791
|
-
}
|
|
14792
|
-
|
|
14793
|
-
/**
|
|
14794
|
-
* @param {string} name The package name
|
|
14795
|
-
* @param {string} entry The target entry, eg "."
|
|
14796
|
-
* @param {number} [condition] Unmatched condition?
|
|
14797
|
-
*/
|
|
14798
|
-
function bail(name, entry, condition) {
|
|
14799
|
-
throw new Error(
|
|
14800
|
-
condition
|
|
14801
|
-
? `No known conditions for "${entry}" entry in "${name}" package`
|
|
14802
|
-
: `Missing "${entry}" export in "${name}" package`
|
|
14803
|
-
);
|
|
14804
|
-
}
|
|
14805
|
-
|
|
14806
|
-
/**
|
|
14807
|
-
* @param {string} name the package name
|
|
14808
|
-
* @param {string} entry the target path/import
|
|
14809
|
-
*/
|
|
14810
|
-
function toName(name, entry) {
|
|
14811
|
-
return entry === name ? '.'
|
|
14812
|
-
: entry[0] === '.' ? entry
|
|
14813
|
-
: entry.replace(new RegExp('^' + name + '\/'), './');
|
|
14814
|
-
}
|
|
14815
|
-
|
|
14816
|
-
/**
|
|
14817
|
-
* @param {object} pkg package.json contents
|
|
14818
|
-
* @param {string} [entry] entry name or import path
|
|
14819
|
-
* @param {object} [options]
|
|
14820
|
-
* @param {boolean} [options.browser]
|
|
14821
|
-
* @param {boolean} [options.require]
|
|
14822
|
-
* @param {string[]} [options.conditions]
|
|
14823
|
-
* @param {boolean} [options.unsafe]
|
|
14824
|
-
*/
|
|
14825
|
-
function resolve$1(pkg, entry='.', options={}) {
|
|
14826
|
-
let { name, exports } = pkg;
|
|
14827
|
-
|
|
14828
|
-
if (exports) {
|
|
14829
|
-
let { browser, require, unsafe, conditions=[] } = options;
|
|
14830
|
-
|
|
14831
|
-
let target = toName(name, entry);
|
|
14832
|
-
if (target[0] !== '.') target = './' + target;
|
|
14833
|
-
|
|
14834
|
-
if (typeof exports === 'string') {
|
|
14835
|
-
return target === '.' ? exports : bail(name, target);
|
|
14836
|
-
}
|
|
14837
|
-
|
|
14838
|
-
let allows = new Set(['default', ...conditions]);
|
|
14839
|
-
unsafe || allows.add(require ? 'require' : 'import');
|
|
14840
|
-
unsafe || allows.add(browser ? 'browser' : 'node');
|
|
14841
|
-
|
|
14842
|
-
let key, tmp, isSingle=false;
|
|
14843
|
-
|
|
14844
|
-
for (key in exports) {
|
|
14845
|
-
isSingle = key[0] !== '.';
|
|
14846
|
-
break;
|
|
14847
|
-
}
|
|
14848
|
-
|
|
14849
|
-
if (isSingle) {
|
|
14850
|
-
return target === '.'
|
|
14851
|
-
? loop(exports, allows) || bail(name, target, 1)
|
|
14852
|
-
: bail(name, target);
|
|
14853
|
-
}
|
|
14854
|
-
|
|
14855
|
-
if (tmp = exports[target]) {
|
|
14856
|
-
return loop(tmp, allows) || bail(name, target, 1);
|
|
14857
|
-
}
|
|
14858
|
-
|
|
14859
|
-
for (key in exports) {
|
|
14860
|
-
tmp = key[key.length - 1];
|
|
14861
|
-
if (tmp === '/' && target.startsWith(key)) {
|
|
14862
|
-
return (tmp = loop(exports[key], allows))
|
|
14863
|
-
? (tmp + target.substring(key.length))
|
|
14864
|
-
: bail(name, target, 1);
|
|
14865
|
-
}
|
|
14866
|
-
if (tmp === '*' && target.startsWith(key.slice(0, -1))) {
|
|
14867
|
-
// do not trigger if no *content* to inject
|
|
14868
|
-
if (target.substring(key.length - 1).length > 0) {
|
|
14869
|
-
return (tmp = loop(exports[key], allows))
|
|
14870
|
-
? tmp.replace('*', target.substring(key.length - 1))
|
|
14871
|
-
: bail(name, target, 1);
|
|
14872
|
-
}
|
|
14873
|
-
}
|
|
14874
|
-
}
|
|
14875
|
-
|
|
14876
|
-
return bail(name, target);
|
|
14877
|
-
}
|
|
14878
|
-
}
|
|
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)}}
|
|
14879
14846
|
|
|
14880
14847
|
// This file was generated. Do not modify manually!
|
|
14881
|
-
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];
|
|
14882
14849
|
|
|
14883
14850
|
// This file was generated. Do not modify manually!
|
|
14884
|
-
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];
|
|
14885
14852
|
|
|
14886
14853
|
// This file was generated. Do not modify manually!
|
|
14887
|
-
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";
|
|
14888
14855
|
|
|
14889
14856
|
// This file was generated. Do not modify manually!
|
|
14890
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";
|
|
@@ -14929,6 +14896,7 @@ function isInAstralSet(code, set) {
|
|
|
14929
14896
|
pos += set[i + 1];
|
|
14930
14897
|
if (pos >= code) { return true }
|
|
14931
14898
|
}
|
|
14899
|
+
return false
|
|
14932
14900
|
}
|
|
14933
14901
|
|
|
14934
14902
|
// Test whether a given character code starts an identifier.
|
|
@@ -15314,7 +15282,7 @@ function getOptions(opts) {
|
|
|
15314
15282
|
if (options.allowReserved == null)
|
|
15315
15283
|
{ options.allowReserved = options.ecmaVersion < 5; }
|
|
15316
15284
|
|
|
15317
|
-
if (opts.allowHashBang == null)
|
|
15285
|
+
if (!opts || opts.allowHashBang == null)
|
|
15318
15286
|
{ options.allowHashBang = options.ecmaVersion >= 14; }
|
|
15319
15287
|
|
|
15320
15288
|
if (isArray(options.onToken)) {
|
|
@@ -15714,10 +15682,10 @@ pp$8.isLet = function(context) {
|
|
|
15714
15682
|
// Statement) is allowed here. If context is not empty then only a Statement
|
|
15715
15683
|
// is allowed. However, `let [` is an explicit negative lookahead for
|
|
15716
15684
|
// ExpressionStatement, so special-case it first.
|
|
15717
|
-
if (nextCh === 91 || nextCh === 92
|
|
15685
|
+
if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
|
|
15718
15686
|
if (context) { return false }
|
|
15719
15687
|
|
|
15720
|
-
if (nextCh === 123) { return true } // '{'
|
|
15688
|
+
if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
|
|
15721
15689
|
if (isIdentifierStart(nextCh, true)) {
|
|
15722
15690
|
var pos = next + 1;
|
|
15723
15691
|
while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }
|
|
@@ -16450,7 +16418,7 @@ pp$8.parseClassId = function(node, isStatement) {
|
|
|
16450
16418
|
};
|
|
16451
16419
|
|
|
16452
16420
|
pp$8.parseClassSuper = function(node) {
|
|
16453
|
-
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(false) : null;
|
|
16421
|
+
node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
|
|
16454
16422
|
};
|
|
16455
16423
|
|
|
16456
16424
|
pp$8.enterClassBody = function() {
|
|
@@ -17995,7 +17963,7 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
|
|
17995
17963
|
if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
|
|
17996
17964
|
isAsync = true;
|
|
17997
17965
|
isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
|
|
17998
|
-
this.parsePropertyName(prop
|
|
17966
|
+
this.parsePropertyName(prop);
|
|
17999
17967
|
} else {
|
|
18000
17968
|
isAsync = false;
|
|
18001
17969
|
}
|
|
@@ -18244,7 +18212,7 @@ pp$5.checkUnreserved = function(ref) {
|
|
|
18244
18212
|
// when parsing properties), it will also convert keywords into
|
|
18245
18213
|
// identifiers.
|
|
18246
18214
|
|
|
18247
|
-
pp$5.parseIdent = function(liberal
|
|
18215
|
+
pp$5.parseIdent = function(liberal) {
|
|
18248
18216
|
var node = this.startNode();
|
|
18249
18217
|
if (this.type === types$1.name) {
|
|
18250
18218
|
node.name = this.value;
|
|
@@ -18487,8 +18455,8 @@ pp$2.copyNode = function(node) {
|
|
|
18487
18455
|
return newNode
|
|
18488
18456
|
};
|
|
18489
18457
|
|
|
18490
|
-
// This file contains Unicode properties extracted from the ECMAScript
|
|
18491
|
-
//
|
|
18458
|
+
// This file contains Unicode properties extracted from the ECMAScript specification.
|
|
18459
|
+
// The lists are extracted like so:
|
|
18492
18460
|
// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)
|
|
18493
18461
|
|
|
18494
18462
|
// #table-binary-unicode-properties
|
|
@@ -18497,12 +18465,15 @@ var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
|
|
18497
18465
|
var ecma11BinaryProperties = ecma10BinaryProperties;
|
|
18498
18466
|
var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
|
|
18499
18467
|
var ecma13BinaryProperties = ecma12BinaryProperties;
|
|
18468
|
+
var ecma14BinaryProperties = ecma13BinaryProperties;
|
|
18469
|
+
|
|
18500
18470
|
var unicodeBinaryProperties = {
|
|
18501
18471
|
9: ecma9BinaryProperties,
|
|
18502
18472
|
10: ecma10BinaryProperties,
|
|
18503
18473
|
11: ecma11BinaryProperties,
|
|
18504
18474
|
12: ecma12BinaryProperties,
|
|
18505
|
-
13: ecma13BinaryProperties
|
|
18475
|
+
13: ecma13BinaryProperties,
|
|
18476
|
+
14: ecma14BinaryProperties
|
|
18506
18477
|
};
|
|
18507
18478
|
|
|
18508
18479
|
// #table-unicode-general-category-values
|
|
@@ -18514,12 +18485,15 @@ var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Han
|
|
|
18514
18485
|
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
|
18515
18486
|
var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
|
|
18516
18487
|
var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
|
|
18488
|
+
var ecma14ScriptValues = ecma13ScriptValues + " Kawi Nag_Mundari Nagm";
|
|
18489
|
+
|
|
18517
18490
|
var unicodeScriptValues = {
|
|
18518
18491
|
9: ecma9ScriptValues,
|
|
18519
18492
|
10: ecma10ScriptValues,
|
|
18520
18493
|
11: ecma11ScriptValues,
|
|
18521
18494
|
12: ecma12ScriptValues,
|
|
18522
|
-
13: ecma13ScriptValues
|
|
18495
|
+
13: ecma13ScriptValues,
|
|
18496
|
+
14: ecma14ScriptValues
|
|
18523
18497
|
};
|
|
18524
18498
|
|
|
18525
18499
|
var data = {};
|
|
@@ -18538,7 +18512,7 @@ function buildUnicodeData(ecmaVersion) {
|
|
|
18538
18512
|
d.nonBinary.scx = d.nonBinary.Script_Extensions;
|
|
18539
18513
|
}
|
|
18540
18514
|
|
|
18541
|
-
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) {
|
|
18542
18516
|
var ecmaVersion = list[i$1];
|
|
18543
18517
|
|
|
18544
18518
|
buildUnicodeData(ecmaVersion);
|
|
@@ -18549,7 +18523,7 @@ var pp$1 = Parser$1.prototype;
|
|
|
18549
18523
|
var RegExpValidationState = function RegExpValidationState(parser) {
|
|
18550
18524
|
this.parser = parser;
|
|
18551
18525
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
|
|
18552
|
-
this.unicodeProperties = data[parser.options.ecmaVersion >=
|
|
18526
|
+
this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];
|
|
18553
18527
|
this.source = "";
|
|
18554
18528
|
this.flags = "";
|
|
18555
18529
|
this.start = 0;
|
|
@@ -20311,8 +20285,6 @@ pp.readEscapedChar = function(inTemplate) {
|
|
|
20311
20285
|
codePos,
|
|
20312
20286
|
"Invalid escape sequence in template string"
|
|
20313
20287
|
);
|
|
20314
|
-
|
|
20315
|
-
return null
|
|
20316
20288
|
}
|
|
20317
20289
|
default:
|
|
20318
20290
|
if (ch >= 48 && ch <= 55) {
|
|
@@ -20400,7 +20372,7 @@ pp.readWord = function() {
|
|
|
20400
20372
|
|
|
20401
20373
|
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
|
20402
20374
|
|
|
20403
|
-
var version$2 = "8.8.
|
|
20375
|
+
var version$2 = "8.8.2";
|
|
20404
20376
|
|
|
20405
20377
|
Parser$1.acorn = {
|
|
20406
20378
|
Parser: Parser$1,
|
|
@@ -20451,29 +20423,29 @@ function tokenizer(input, options) {
|
|
|
20451
20423
|
}
|
|
20452
20424
|
|
|
20453
20425
|
var acorn = {
|
|
20454
|
-
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
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
|
|
20477
20449
|
};
|
|
20478
20450
|
|
|
20479
20451
|
const HASH_RE = /#/g;
|
|
@@ -20527,197 +20499,382 @@ function matchAll(regex, string, addition) {
|
|
|
20527
20499
|
return matches;
|
|
20528
20500
|
}
|
|
20529
20501
|
|
|
20530
|
-
|
|
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
|
+
|
|
20531
20515
|
const own$1 = {}.hasOwnProperty;
|
|
20532
|
-
|
|
20533
|
-
|
|
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} */
|
|
20534
20538
|
let userStackTraceLimit;
|
|
20539
|
+
|
|
20535
20540
|
createError(
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
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
|
+
}`
|
|
20539
20551
|
},
|
|
20540
20552
|
TypeError
|
|
20541
20553
|
);
|
|
20554
|
+
|
|
20542
20555
|
createError(
|
|
20543
|
-
|
|
20556
|
+
'ERR_INVALID_PACKAGE_CONFIG',
|
|
20557
|
+
/**
|
|
20558
|
+
* @param {string} path
|
|
20559
|
+
* @param {string} [base]
|
|
20560
|
+
* @param {string} [message]
|
|
20561
|
+
*/
|
|
20544
20562
|
(path, base, message) => {
|
|
20545
|
-
return `Invalid package config ${path}${
|
|
20563
|
+
return `Invalid package config ${path}${
|
|
20564
|
+
base ? ` while importing ${base}` : ''
|
|
20565
|
+
}${message ? `. ${message}` : ''}`
|
|
20546
20566
|
},
|
|
20547
20567
|
Error
|
|
20548
20568
|
);
|
|
20569
|
+
|
|
20549
20570
|
createError(
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
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 === '.') {
|
|
20554
20586
|
assert$1(isImport === false);
|
|
20555
|
-
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
|
+
)
|
|
20556
20593
|
}
|
|
20557
|
-
|
|
20594
|
+
|
|
20595
|
+
return `Invalid "${
|
|
20596
|
+
isImport ? 'imports' : 'exports'
|
|
20597
|
+
}" target ${JSON.stringify(
|
|
20558
20598
|
target
|
|
20559
|
-
)} 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 "./"' : ''}`
|
|
20560
20602
|
},
|
|
20561
20603
|
Error
|
|
20562
20604
|
);
|
|
20605
|
+
|
|
20563
20606
|
createError(
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
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}`
|
|
20567
20615
|
},
|
|
20568
20616
|
Error
|
|
20569
20617
|
);
|
|
20618
|
+
|
|
20619
|
+
createError(
|
|
20620
|
+
'ERR_NETWORK_IMPORT_DISALLOWED',
|
|
20621
|
+
"import of '%s' by %s is not supported: %s",
|
|
20622
|
+
Error
|
|
20623
|
+
);
|
|
20624
|
+
|
|
20570
20625
|
createError(
|
|
20571
|
-
|
|
20626
|
+
'ERR_PACKAGE_IMPORT_NOT_DEFINED',
|
|
20627
|
+
/**
|
|
20628
|
+
* @param {string} specifier
|
|
20629
|
+
* @param {string} packagePath
|
|
20630
|
+
* @param {string} base
|
|
20631
|
+
*/
|
|
20572
20632
|
(specifier, packagePath, base) => {
|
|
20573
|
-
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}`
|
|
20574
20636
|
},
|
|
20575
20637
|
TypeError
|
|
20576
20638
|
);
|
|
20639
|
+
|
|
20577
20640
|
createError(
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
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
|
+
}`
|
|
20584
20655
|
},
|
|
20585
20656
|
Error
|
|
20586
20657
|
);
|
|
20658
|
+
|
|
20587
20659
|
createError(
|
|
20588
|
-
|
|
20589
|
-
"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',
|
|
20590
20663
|
Error
|
|
20591
20664
|
);
|
|
20665
|
+
|
|
20592
20666
|
createError(
|
|
20593
|
-
|
|
20594
|
-
|
|
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
|
+
},
|
|
20595
20675
|
TypeError
|
|
20596
20676
|
);
|
|
20677
|
+
|
|
20597
20678
|
createError(
|
|
20598
|
-
|
|
20599
|
-
|
|
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') => {
|
|
20600
20686
|
let inspected = inspect(value);
|
|
20687
|
+
|
|
20601
20688
|
if (inspected.length > 128) {
|
|
20602
20689
|
inspected = `${inspected.slice(0, 128)}...`;
|
|
20603
20690
|
}
|
|
20604
|
-
|
|
20605
|
-
|
|
20691
|
+
|
|
20692
|
+
const type = name.includes('.') ? 'property' : 'argument';
|
|
20693
|
+
|
|
20694
|
+
return `The ${type} '${name}' ${reason}. Received ${inspected}`
|
|
20606
20695
|
},
|
|
20607
20696
|
TypeError
|
|
20697
|
+
// Note: extra classes have been shaken out.
|
|
20698
|
+
// , RangeError
|
|
20608
20699
|
);
|
|
20700
|
+
|
|
20609
20701
|
createError(
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
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
|
+
|
|
20613
20712
|
if (isWindows$3 && url.protocol.length === 2) {
|
|
20614
|
-
message +=
|
|
20713
|
+
message += '. On Windows, absolute paths must be valid file:// URLs';
|
|
20615
20714
|
}
|
|
20715
|
+
|
|
20616
20716
|
message += `. Received protocol '${url.protocol}'`;
|
|
20617
|
-
return message
|
|
20717
|
+
return message
|
|
20618
20718
|
},
|
|
20619
20719
|
Error
|
|
20620
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
|
+
*/
|
|
20621
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.
|
|
20622
20733
|
messages.set(sym, value);
|
|
20623
|
-
|
|
20734
|
+
|
|
20735
|
+
return makeNodeErrorWithCode(def, sym)
|
|
20624
20736
|
}
|
|
20737
|
+
|
|
20738
|
+
/**
|
|
20739
|
+
* @param {ErrorConstructor} Base
|
|
20740
|
+
* @param {string} key
|
|
20741
|
+
* @returns {ErrorConstructor}
|
|
20742
|
+
*/
|
|
20625
20743
|
function makeNodeErrorWithCode(Base, key) {
|
|
20626
|
-
|
|
20744
|
+
// @ts-expect-error It’s a Node error.
|
|
20745
|
+
return NodeError
|
|
20746
|
+
/**
|
|
20747
|
+
* @param {Array<unknown>} args
|
|
20748
|
+
*/
|
|
20627
20749
|
function NodeError(...args) {
|
|
20628
20750
|
const limit = Error.stackTraceLimit;
|
|
20629
|
-
if (isErrorStackTraceLimitWritable())
|
|
20630
|
-
Error.stackTraceLimit = 0;
|
|
20631
|
-
}
|
|
20751
|
+
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
20632
20752
|
const error = new Base();
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
}
|
|
20753
|
+
// Reset the limit and setting the name property.
|
|
20754
|
+
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
|
|
20636
20755
|
const message = getMessage(key, args, error);
|
|
20637
|
-
Object.
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
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
|
|
20646
20764
|
},
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
error.code = key;
|
|
20653
|
-
return error;
|
|
20654
|
-
}
|
|
20655
|
-
}
|
|
20656
|
-
const addCodeToName = hideStackFrames(
|
|
20657
|
-
function(error, name, code) {
|
|
20658
|
-
error = captureLargerStackTrace(error);
|
|
20659
|
-
error.name = `${name} [${code}]`;
|
|
20660
|
-
if (name === "SystemError") {
|
|
20661
|
-
Object.defineProperty(error, "name", {
|
|
20662
|
-
value: name,
|
|
20765
|
+
toString: {
|
|
20766
|
+
/** @this {Error} */
|
|
20767
|
+
value() {
|
|
20768
|
+
return `${this.name} [${key}]: ${this.message}`
|
|
20769
|
+
},
|
|
20663
20770
|
enumerable: false,
|
|
20664
20771
|
writable: true,
|
|
20665
20772
|
configurable: true
|
|
20666
|
-
}
|
|
20667
|
-
}
|
|
20668
|
-
|
|
20669
|
-
|
|
20773
|
+
}
|
|
20774
|
+
});
|
|
20775
|
+
|
|
20776
|
+
captureLargerStackTrace(error);
|
|
20777
|
+
// @ts-expect-error It’s a Node error.
|
|
20778
|
+
error.code = key;
|
|
20779
|
+
return error
|
|
20670
20780
|
}
|
|
20671
|
-
|
|
20781
|
+
}
|
|
20782
|
+
|
|
20783
|
+
/**
|
|
20784
|
+
* @returns {boolean}
|
|
20785
|
+
*/
|
|
20672
20786
|
function isErrorStackTraceLimitWritable() {
|
|
20673
|
-
|
|
20674
|
-
|
|
20675
|
-
|
|
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)
|
|
20676
20799
|
}
|
|
20677
|
-
|
|
20800
|
+
|
|
20801
|
+
return own$1.call(desc, 'writable') && desc.writable !== undefined
|
|
20802
|
+
? desc.writable
|
|
20803
|
+
: desc.set !== undefined
|
|
20678
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
|
+
*/
|
|
20679
20812
|
function hideStackFrames(fn) {
|
|
20813
|
+
// We rename the functions that will be hidden to cut off the stacktrace
|
|
20814
|
+
// at the outermost one
|
|
20680
20815
|
const hidden = nodeInternalPrefix + fn.name;
|
|
20681
|
-
Object.defineProperty(fn,
|
|
20682
|
-
return fn
|
|
20816
|
+
Object.defineProperty(fn, 'name', {value: hidden});
|
|
20817
|
+
return fn
|
|
20683
20818
|
}
|
|
20819
|
+
|
|
20684
20820
|
const captureLargerStackTrace = hideStackFrames(
|
|
20685
|
-
|
|
20821
|
+
/**
|
|
20822
|
+
* @param {Error} error
|
|
20823
|
+
* @returns {Error}
|
|
20824
|
+
*/
|
|
20825
|
+
// @ts-expect-error: fine
|
|
20826
|
+
function (error) {
|
|
20686
20827
|
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
20687
20828
|
if (stackTraceLimitIsWritable) {
|
|
20688
20829
|
userStackTraceLimit = Error.stackTraceLimit;
|
|
20689
20830
|
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
20690
20831
|
}
|
|
20832
|
+
|
|
20691
20833
|
Error.captureStackTrace(error);
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20834
|
+
|
|
20835
|
+
// Reset the limit
|
|
20836
|
+
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
20837
|
+
|
|
20838
|
+
return error
|
|
20696
20839
|
}
|
|
20697
20840
|
);
|
|
20841
|
+
|
|
20842
|
+
/**
|
|
20843
|
+
* @param {string} key
|
|
20844
|
+
* @param {Array<unknown>} args
|
|
20845
|
+
* @param {Error} self
|
|
20846
|
+
* @returns {string}
|
|
20847
|
+
*/
|
|
20698
20848
|
function getMessage(key, args, self) {
|
|
20699
20849
|
const message = messages.get(key);
|
|
20700
|
-
|
|
20850
|
+
assert$1(typeof message !== 'undefined', 'expected `message` to be found');
|
|
20851
|
+
|
|
20852
|
+
if (typeof message === 'function') {
|
|
20701
20853
|
assert$1(
|
|
20702
|
-
message.length <= args.length,
|
|
20703
|
-
`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}).`
|
|
20704
20857
|
);
|
|
20705
|
-
return Reflect.apply(message, self, args)
|
|
20858
|
+
return Reflect.apply(message, self, args)
|
|
20706
20859
|
}
|
|
20707
|
-
|
|
20860
|
+
|
|
20861
|
+
const regex = /%[dfijoOs]/g;
|
|
20862
|
+
let expectedLength = 0;
|
|
20863
|
+
while (regex.exec(message) !== null) expectedLength++;
|
|
20708
20864
|
assert$1(
|
|
20709
20865
|
expectedLength === args.length,
|
|
20710
|
-
`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}).`
|
|
20711
20868
|
);
|
|
20712
|
-
if (args.length === 0)
|
|
20713
|
-
|
|
20714
|
-
}
|
|
20869
|
+
if (args.length === 0) return message
|
|
20870
|
+
|
|
20715
20871
|
args.unshift(message);
|
|
20716
|
-
return Reflect.apply(format$2, null, args)
|
|
20872
|
+
return Reflect.apply(format$2, null, args)
|
|
20717
20873
|
}
|
|
20718
20874
|
pathToFileURL(process.cwd());
|
|
20719
20875
|
|
|
20720
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/;
|
|
20721
20878
|
function findStaticImports(code) {
|
|
20722
20879
|
return matchAll(ESM_STATIC_IMPORT_RE, code, { type: "static" });
|
|
20723
20880
|
}
|
|
@@ -20726,7 +20883,7 @@ function parseStaticImport(matched) {
|
|
|
20726
20883
|
const namedImports = {};
|
|
20727
20884
|
for (const namedImport of cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []) {
|
|
20728
20885
|
const [, source = namedImport.trim(), importName = source] = namedImport.match(/^\s*(\S*) as (\S*)\s*$/) || [];
|
|
20729
|
-
if (source) {
|
|
20886
|
+
if (source && !TYPE_RE.test(source)) {
|
|
20730
20887
|
namedImports[source] = importName;
|
|
20731
20888
|
}
|
|
20732
20889
|
}
|
|
@@ -20804,7 +20961,20 @@ function loadPackageData(pkgPath, preserveSymlinks, packageCache) {
|
|
|
20804
20961
|
hasSideEffects = () => sideEffects;
|
|
20805
20962
|
}
|
|
20806
20963
|
else if (Array.isArray(sideEffects)) {
|
|
20807
|
-
|
|
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
|
+
});
|
|
20808
20978
|
}
|
|
20809
20979
|
else {
|
|
20810
20980
|
hasSideEffects = () => true;
|
|
@@ -20946,14 +21116,7 @@ async function serialBundleWorkerEntry(config, id, query) {
|
|
|
20946
21116
|
function emitSourcemapForWorkerEntry(config, query, chunk) {
|
|
20947
21117
|
const { map: sourcemap } = chunk;
|
|
20948
21118
|
if (sourcemap) {
|
|
20949
|
-
if (config.build.sourcemap === '
|
|
20950
|
-
// Manually add the sourcemap to the code if configured for inline sourcemaps.
|
|
20951
|
-
// TODO: Remove when https://github.com/rollup/rollup/issues/3913 is resolved
|
|
20952
|
-
// Currently seems that it won't be resolved until Rollup 3
|
|
20953
|
-
const dataUrl = sourcemap.toUrl();
|
|
20954
|
-
chunk.code += `//# sourceMappingURL=${dataUrl}`;
|
|
20955
|
-
}
|
|
20956
|
-
else if (config.build.sourcemap === 'hidden' ||
|
|
21119
|
+
if (config.build.sourcemap === 'hidden' ||
|
|
20957
21120
|
config.build.sourcemap === true) {
|
|
20958
21121
|
const data = sourcemap.toString();
|
|
20959
21122
|
const mapFileName = chunk.fileName + '.map';
|
|
@@ -20962,18 +21125,6 @@ function emitSourcemapForWorkerEntry(config, query, chunk) {
|
|
|
20962
21125
|
type: 'asset',
|
|
20963
21126
|
source: data,
|
|
20964
21127
|
});
|
|
20965
|
-
// Emit the comment that tells the JS debugger where it can find the
|
|
20966
|
-
// sourcemap file.
|
|
20967
|
-
// 'hidden' causes the sourcemap file to be created but
|
|
20968
|
-
// the comment in the file to be omitted.
|
|
20969
|
-
if (config.build.sourcemap === true) {
|
|
20970
|
-
// inline web workers need to use the full sourcemap path
|
|
20971
|
-
// non-inline web workers can use a relative path
|
|
20972
|
-
const sourceMapUrl = query?.inline != null
|
|
20973
|
-
? mapFileName
|
|
20974
|
-
: path$o.relative(config.build.assetsDir, mapFileName);
|
|
20975
|
-
chunk.code += `//# sourceMappingURL=${sourceMapUrl}`;
|
|
20976
|
-
}
|
|
20977
21128
|
}
|
|
20978
21129
|
}
|
|
20979
21130
|
return chunk;
|
|
@@ -21419,13 +21570,16 @@ function tryFsResolve(fsPath, options, tryIndex = true, targetWeb = true) {
|
|
|
21419
21570
|
}
|
|
21420
21571
|
for (const ext of options.extensions) {
|
|
21421
21572
|
if (postfix &&
|
|
21422
|
-
(res = tryResolveFile(fsPath + ext, '', options, false, targetWeb, options.tryPrefix, options.skipPackageJson))) {
|
|
21573
|
+
(res = tryResolveFile(fsPath + ext, '', options, false, targetWeb, options.tryPrefix, options.skipPackageJson, false))) {
|
|
21423
21574
|
return res;
|
|
21424
21575
|
}
|
|
21425
|
-
if ((res = tryResolveFile(file + ext, postfix, options, false, targetWeb, options.tryPrefix, options.skipPackageJson))) {
|
|
21576
|
+
if ((res = tryResolveFile(file + ext, postfix, options, false, targetWeb, options.tryPrefix, options.skipPackageJson, false))) {
|
|
21426
21577
|
return res;
|
|
21427
21578
|
}
|
|
21428
21579
|
}
|
|
21580
|
+
// if `tryIndex` false, skip as we've already tested above
|
|
21581
|
+
if (!tryIndex)
|
|
21582
|
+
return;
|
|
21429
21583
|
if (postfix &&
|
|
21430
21584
|
(res = tryResolveFile(fsPath, '', options, tryIndex, targetWeb, options.tryPrefix, options.skipPackageJson))) {
|
|
21431
21585
|
return res;
|
|
@@ -21434,9 +21588,10 @@ function tryFsResolve(fsPath, options, tryIndex = true, targetWeb = true) {
|
|
|
21434
21588
|
return res;
|
|
21435
21589
|
}
|
|
21436
21590
|
}
|
|
21437
|
-
function tryResolveFile(file, postfix, options, tryIndex, targetWeb, tryPrefix, skipPackageJson) {
|
|
21438
|
-
|
|
21439
|
-
|
|
21591
|
+
function tryResolveFile(file, postfix, options, tryIndex, targetWeb, tryPrefix, skipPackageJson, skipTsExtension) {
|
|
21592
|
+
const stat = fs$l.statSync(file, { throwIfNoEntry: false });
|
|
21593
|
+
if (stat) {
|
|
21594
|
+
if (!stat.isDirectory()) {
|
|
21440
21595
|
return getRealPath(file, options.preserveSymlinks) + postfix;
|
|
21441
21596
|
}
|
|
21442
21597
|
else if (tryIndex) {
|
|
@@ -21459,11 +21614,13 @@ function tryResolveFile(file, postfix, options, tryIndex, targetWeb, tryPrefix,
|
|
|
21459
21614
|
return index + postfix;
|
|
21460
21615
|
}
|
|
21461
21616
|
}
|
|
21462
|
-
|
|
21463
|
-
if (
|
|
21617
|
+
// try resolve .js import to typescript file
|
|
21618
|
+
if (!skipTsExtension &&
|
|
21619
|
+
options.isFromTsImporter &&
|
|
21620
|
+
isPossibleTsOutput(file)) {
|
|
21464
21621
|
const tsSrcPaths = getPotentialTsSrcPaths(file);
|
|
21465
21622
|
for (const srcPath of tsSrcPaths) {
|
|
21466
|
-
const res = tryResolveFile(srcPath, postfix, options, tryIndex, targetWeb, tryPrefix, skipPackageJson);
|
|
21623
|
+
const res = tryResolveFile(srcPath, postfix, options, tryIndex, targetWeb, tryPrefix, skipPackageJson, true);
|
|
21467
21624
|
if (res)
|
|
21468
21625
|
return res;
|
|
21469
21626
|
}
|
|
@@ -21520,21 +21677,22 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr, ex
|
|
|
21520
21677
|
if (nestedRoot) {
|
|
21521
21678
|
basedir = nestedResolveFrom(nestedRoot, basedir, preserveSymlinks);
|
|
21522
21679
|
}
|
|
21680
|
+
let pkg;
|
|
21681
|
+
let pkgId;
|
|
21523
21682
|
// nearest package.json
|
|
21524
21683
|
let nearestPkg;
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21684
|
+
const rootPkgId = possiblePkgIds[0];
|
|
21685
|
+
const rootPkg = resolvePackageData(rootPkgId, basedir, preserveSymlinks, packageCache);
|
|
21686
|
+
const nearestPkgId = [...possiblePkgIds].reverse().find((pkgId) => {
|
|
21528
21687
|
nearestPkg = resolvePackageData(pkgId, basedir, preserveSymlinks, packageCache);
|
|
21529
21688
|
return nearestPkg;
|
|
21530
21689
|
});
|
|
21531
|
-
const rootPkgId = possiblePkgIds[0];
|
|
21532
|
-
const rootPkg = resolvePackageData(rootPkgId, basedir, preserveSymlinks, packageCache);
|
|
21533
21690
|
if (rootPkg?.data?.exports) {
|
|
21534
|
-
pkg = rootPkg;
|
|
21535
21691
|
pkgId = rootPkgId;
|
|
21692
|
+
pkg = rootPkg;
|
|
21536
21693
|
}
|
|
21537
21694
|
else {
|
|
21695
|
+
pkgId = nearestPkgId;
|
|
21538
21696
|
pkg = nearestPkg;
|
|
21539
21697
|
}
|
|
21540
21698
|
if (!pkg || !nearestPkg) {
|
|
@@ -21748,6 +21906,7 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
|
|
|
21748
21906
|
if (data.exports) {
|
|
21749
21907
|
entryPoint = resolveExports(data, '.', options, targetWeb);
|
|
21750
21908
|
}
|
|
21909
|
+
const resolvedFromExports = !!entryPoint;
|
|
21751
21910
|
// if exports resolved to .mjs, still resolve other fields.
|
|
21752
21911
|
// This is because .mjs files can technically import .cjs files which would
|
|
21753
21912
|
// make them invalid for pure ESM environments - so if other module/browser
|
|
@@ -21790,7 +21949,9 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
|
|
|
21790
21949
|
}
|
|
21791
21950
|
}
|
|
21792
21951
|
}
|
|
21793
|
-
if
|
|
21952
|
+
// fallback to mainFields if still not resolved
|
|
21953
|
+
// TODO: review if `.mjs` check is still needed
|
|
21954
|
+
if (!resolvedFromExports && (!entryPoint || entryPoint.endsWith('.mjs'))) {
|
|
21794
21955
|
for (const field of options.mainFields) {
|
|
21795
21956
|
if (field === 'browser')
|
|
21796
21957
|
continue; // already checked above
|
|
@@ -21862,11 +22023,12 @@ function resolveExports(pkg, key, options, targetWeb) {
|
|
|
21862
22023
|
else if (options.conditions.length > 0) {
|
|
21863
22024
|
conditions.push(...options.conditions);
|
|
21864
22025
|
}
|
|
21865
|
-
|
|
22026
|
+
const result = o(pkg, key, {
|
|
21866
22027
|
browser: targetWeb && !conditions.includes('node'),
|
|
21867
22028
|
require: options.isRequire && !conditions.includes('import'),
|
|
21868
22029
|
conditions,
|
|
21869
22030
|
});
|
|
22031
|
+
return result ? result[0] : undefined;
|
|
21870
22032
|
}
|
|
21871
22033
|
function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolvedCache, dir, data, }, targetWeb, options) {
|
|
21872
22034
|
const cache = getResolvedCache(id, targetWeb);
|
|
@@ -27504,7 +27666,7 @@ function isCollection$1(node) {
|
|
|
27504
27666
|
}
|
|
27505
27667
|
return false;
|
|
27506
27668
|
}
|
|
27507
|
-
function isNode(node) {
|
|
27669
|
+
function isNode$1(node) {
|
|
27508
27670
|
if (node && typeof node === 'object')
|
|
27509
27671
|
switch (node[NODE_TYPE]) {
|
|
27510
27672
|
case ALIAS:
|
|
@@ -27583,7 +27745,7 @@ visit$1.SKIP = SKIP$1;
|
|
|
27583
27745
|
visit$1.REMOVE = REMOVE$1;
|
|
27584
27746
|
function visit_(key, node, visitor, path) {
|
|
27585
27747
|
const ctrl = callVisitor(key, node, visitor, path);
|
|
27586
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
27748
|
+
if (isNode$1(ctrl) || isPair(ctrl)) {
|
|
27587
27749
|
replaceNode(key, path, ctrl);
|
|
27588
27750
|
return visit_(key, ctrl, visitor, path);
|
|
27589
27751
|
}
|
|
@@ -27670,7 +27832,7 @@ visitAsync.SKIP = SKIP$1;
|
|
|
27670
27832
|
visitAsync.REMOVE = REMOVE$1;
|
|
27671
27833
|
async function visitAsync_(key, node, visitor, path) {
|
|
27672
27834
|
const ctrl = await callVisitor(key, node, visitor, path);
|
|
27673
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
27835
|
+
if (isNode$1(ctrl) || isPair(ctrl)) {
|
|
27674
27836
|
replaceNode(key, path, ctrl);
|
|
27675
27837
|
return visitAsync_(key, ctrl, visitor, path);
|
|
27676
27838
|
}
|
|
@@ -27902,10 +28064,10 @@ class Directives {
|
|
|
27902
28064
|
: [];
|
|
27903
28065
|
const tagEntries = Object.entries(this.tags);
|
|
27904
28066
|
let tagNames;
|
|
27905
|
-
if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
|
|
28067
|
+
if (doc && tagEntries.length > 0 && isNode$1(doc.contents)) {
|
|
27906
28068
|
const tags = {};
|
|
27907
28069
|
visit$1(doc.contents, (_key, node) => {
|
|
27908
|
-
if (isNode(node) && node.tag)
|
|
28070
|
+
if (isNode$1(node) && node.tag)
|
|
27909
28071
|
tags[node.tag] = true;
|
|
27910
28072
|
});
|
|
27911
28073
|
tagNames = Object.keys(tags);
|
|
@@ -28148,7 +28310,7 @@ function findTagObject(value, tagName, tags) {
|
|
|
28148
28310
|
function createNode(value, tagName, ctx) {
|
|
28149
28311
|
if (isDocument(value))
|
|
28150
28312
|
value = value.contents;
|
|
28151
|
-
if (isNode(value))
|
|
28313
|
+
if (isNode$1(value))
|
|
28152
28314
|
return value;
|
|
28153
28315
|
if (isPair(value)) {
|
|
28154
28316
|
const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
@@ -28260,7 +28422,7 @@ class Collection extends NodeBase {
|
|
|
28260
28422
|
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
28261
28423
|
if (schema)
|
|
28262
28424
|
copy.schema = schema;
|
|
28263
|
-
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);
|
|
28264
28426
|
if (this.range)
|
|
28265
28427
|
copy.range = this.range.slice();
|
|
28266
28428
|
return copy;
|
|
@@ -28916,7 +29078,7 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
|
|
|
28916
29078
|
}
|
|
28917
29079
|
}
|
|
28918
29080
|
let tagObj = undefined;
|
|
28919
|
-
const node = isNode(item)
|
|
29081
|
+
const node = isNode$1(item)
|
|
28920
29082
|
? item
|
|
28921
29083
|
: ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
|
|
28922
29084
|
if (!tagObj)
|
|
@@ -28938,7 +29100,7 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
|
|
|
28938
29100
|
|
|
28939
29101
|
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
28940
29102
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
28941
|
-
let keyComment = (isNode(key) && key.comment) || null;
|
|
29103
|
+
let keyComment = (isNode$1(key) && key.comment) || null;
|
|
28942
29104
|
if (simpleKeys) {
|
|
28943
29105
|
if (keyComment) {
|
|
28944
29106
|
throw new Error('With simple keys, key nodes cannot have comments');
|
|
@@ -28998,7 +29160,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
|
28998
29160
|
}
|
|
28999
29161
|
let vcb = '';
|
|
29000
29162
|
let valueComment = null;
|
|
29001
|
-
if (isNode(value)) {
|
|
29163
|
+
if (isNode$1(value)) {
|
|
29002
29164
|
if (value.spaceBefore)
|
|
29003
29165
|
vcb = '\n';
|
|
29004
29166
|
if (value.commentBefore) {
|
|
@@ -29141,7 +29303,7 @@ function stringifyKey(key, jsKey, ctx) {
|
|
|
29141
29303
|
return '';
|
|
29142
29304
|
if (typeof jsKey !== 'object')
|
|
29143
29305
|
return String(jsKey);
|
|
29144
|
-
if (isNode(key) && ctx && ctx.doc) {
|
|
29306
|
+
if (isNode$1(key) && ctx && ctx.doc) {
|
|
29145
29307
|
const strCtx = createStringifyContext(ctx.doc, {});
|
|
29146
29308
|
strCtx.anchors = new Set();
|
|
29147
29309
|
for (const node of ctx.anchors.keys())
|
|
@@ -29174,9 +29336,9 @@ class Pair {
|
|
|
29174
29336
|
}
|
|
29175
29337
|
clone(schema) {
|
|
29176
29338
|
let { key, value } = this;
|
|
29177
|
-
if (isNode(key))
|
|
29339
|
+
if (isNode$1(key))
|
|
29178
29340
|
key = key.clone(schema);
|
|
29179
|
-
if (isNode(value))
|
|
29341
|
+
if (isNode$1(value))
|
|
29180
29342
|
value = value.clone(schema);
|
|
29181
29343
|
return new Pair(key, value);
|
|
29182
29344
|
}
|
|
@@ -29204,7 +29366,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
|
|
|
29204
29366
|
for (let i = 0; i < items.length; ++i) {
|
|
29205
29367
|
const item = items[i];
|
|
29206
29368
|
let comment = null;
|
|
29207
|
-
if (isNode(item)) {
|
|
29369
|
+
if (isNode$1(item)) {
|
|
29208
29370
|
if (!chompKeep && item.spaceBefore)
|
|
29209
29371
|
lines.push('');
|
|
29210
29372
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
@@ -29212,7 +29374,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
|
|
|
29212
29374
|
comment = item.comment;
|
|
29213
29375
|
}
|
|
29214
29376
|
else if (isPair(item)) {
|
|
29215
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
29377
|
+
const ik = isNode$1(item.key) ? item.key : null;
|
|
29216
29378
|
if (ik) {
|
|
29217
29379
|
if (!chompKeep && ik.spaceBefore)
|
|
29218
29380
|
lines.push('');
|
|
@@ -29261,7 +29423,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29261
29423
|
for (let i = 0; i < items.length; ++i) {
|
|
29262
29424
|
const item = items[i];
|
|
29263
29425
|
let comment = null;
|
|
29264
|
-
if (isNode(item)) {
|
|
29426
|
+
if (isNode$1(item)) {
|
|
29265
29427
|
if (item.spaceBefore)
|
|
29266
29428
|
lines.push('');
|
|
29267
29429
|
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
@@ -29269,7 +29431,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29269
29431
|
comment = item.comment;
|
|
29270
29432
|
}
|
|
29271
29433
|
else if (isPair(item)) {
|
|
29272
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
29434
|
+
const ik = isNode$1(item.key) ? item.key : null;
|
|
29273
29435
|
if (ik) {
|
|
29274
29436
|
if (ik.spaceBefore)
|
|
29275
29437
|
lines.push('');
|
|
@@ -29277,7 +29439,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
|
|
29277
29439
|
if (ik.comment)
|
|
29278
29440
|
reqNewline = true;
|
|
29279
29441
|
}
|
|
29280
|
-
const iv = isNode(item.value) ? item.value : null;
|
|
29442
|
+
const iv = isNode$1(item.value) ? item.value : null;
|
|
29281
29443
|
if (iv) {
|
|
29282
29444
|
if (iv.comment)
|
|
29283
29445
|
comment = iv.comment;
|
|
@@ -30467,7 +30629,7 @@ function stringifyDocument(doc, options) {
|
|
|
30467
30629
|
let chompKeep = false;
|
|
30468
30630
|
let contentComment = null;
|
|
30469
30631
|
if (doc.contents) {
|
|
30470
|
-
if (isNode(doc.contents)) {
|
|
30632
|
+
if (isNode$1(doc.contents)) {
|
|
30471
30633
|
if (doc.contents.spaceBefore && hasDirectives)
|
|
30472
30634
|
lines.push('');
|
|
30473
30635
|
if (doc.contents.commentBefore) {
|
|
@@ -30636,7 +30798,7 @@ class Document {
|
|
|
30636
30798
|
if (this.directives)
|
|
30637
30799
|
copy.directives = this.directives.clone();
|
|
30638
30800
|
copy.schema = this.schema.clone();
|
|
30639
|
-
copy.contents = isNode(this.contents)
|
|
30801
|
+
copy.contents = isNode$1(this.contents)
|
|
30640
30802
|
? this.contents.clone(copy.schema)
|
|
30641
30803
|
: this.contents;
|
|
30642
30804
|
if (this.range)
|
|
@@ -31548,7 +31710,7 @@ function composeCollection(CN, ctx, token, tagToken, onError) {
|
|
|
31548
31710
|
}
|
|
31549
31711
|
}
|
|
31550
31712
|
const res = tag.resolve(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options);
|
|
31551
|
-
const node = isNode(res)
|
|
31713
|
+
const node = isNode$1(res)
|
|
31552
31714
|
? res
|
|
31553
31715
|
: new Scalar(res);
|
|
31554
31716
|
node.range = coll.range;
|
|
@@ -32852,20 +33014,20 @@ function tokenType(source) {
|
|
|
32852
33014
|
}
|
|
32853
33015
|
|
|
32854
33016
|
var cst = {
|
|
32855
|
-
|
|
32856
|
-
|
|
32857
|
-
|
|
32858
|
-
|
|
32859
|
-
|
|
32860
|
-
|
|
32861
|
-
|
|
32862
|
-
|
|
32863
|
-
|
|
32864
|
-
|
|
32865
|
-
|
|
32866
|
-
|
|
32867
|
-
|
|
32868
|
-
|
|
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
|
|
32869
33031
|
};
|
|
32870
33032
|
|
|
32871
33033
|
/*
|
|
@@ -34642,72 +34804,72 @@ function stringify(value, replacer, options) {
|
|
|
34642
34804
|
}
|
|
34643
34805
|
|
|
34644
34806
|
var YAML = {
|
|
34645
|
-
|
|
34646
|
-
|
|
34647
|
-
|
|
34648
|
-
|
|
34649
|
-
|
|
34650
|
-
|
|
34651
|
-
|
|
34652
|
-
|
|
34653
|
-
|
|
34654
|
-
|
|
34655
|
-
|
|
34656
|
-
|
|
34657
|
-
|
|
34658
|
-
|
|
34659
|
-
|
|
34660
|
-
|
|
34661
|
-
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34665
|
-
|
|
34666
|
-
|
|
34667
|
-
|
|
34668
|
-
|
|
34669
|
-
|
|
34670
|
-
|
|
34671
|
-
|
|
34672
|
-
|
|
34673
|
-
|
|
34674
|
-
|
|
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
|
|
34675
34837
|
};
|
|
34676
34838
|
|
|
34677
34839
|
// `export * as default from ...` fails on Webpack v4
|
|
34678
34840
|
|
|
34679
34841
|
var browser$1 = {
|
|
34680
|
-
|
|
34681
|
-
|
|
34682
|
-
|
|
34683
|
-
|
|
34684
|
-
|
|
34685
|
-
|
|
34686
|
-
|
|
34687
|
-
|
|
34688
|
-
|
|
34689
|
-
|
|
34690
|
-
|
|
34691
|
-
|
|
34692
|
-
|
|
34693
|
-
|
|
34694
|
-
|
|
34695
|
-
|
|
34696
|
-
|
|
34697
|
-
|
|
34698
|
-
|
|
34699
|
-
|
|
34700
|
-
|
|
34701
|
-
|
|
34702
|
-
|
|
34703
|
-
|
|
34704
|
-
|
|
34705
|
-
|
|
34706
|
-
|
|
34707
|
-
|
|
34708
|
-
|
|
34709
|
-
|
|
34710
|
-
|
|
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
|
|
34711
34873
|
};
|
|
34712
34874
|
|
|
34713
34875
|
var require$$3$1 = /*@__PURE__*/getAugmentedNamespace(browser$1);
|
|
@@ -35246,7 +35408,7 @@ function traverseNodes(node, visitor) {
|
|
|
35246
35408
|
}
|
|
35247
35409
|
async function traverseHtml(html, filePath, visitor) {
|
|
35248
35410
|
// lazy load compiler
|
|
35249
|
-
const { parse } = await import('./dep-
|
|
35411
|
+
const { parse } = await import('./dep-98d07f71.js');
|
|
35250
35412
|
const ast = parse(html, {
|
|
35251
35413
|
sourceCodeLocationInfo: true,
|
|
35252
35414
|
onParseError: (e) => {
|
|
@@ -36526,7 +36688,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
36526
36688
|
}));
|
|
36527
36689
|
}
|
|
36528
36690
|
if (isModule) {
|
|
36529
|
-
postcssPlugins.unshift((await import('./dep-
|
|
36691
|
+
postcssPlugins.unshift((await import('./dep-f597f42f.js').then(function (n) { return n.i; })).default({
|
|
36530
36692
|
...modulesOptions,
|
|
36531
36693
|
localsConvention: modulesOptions?.localsConvention,
|
|
36532
36694
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -38049,12 +38211,12 @@ async function handleHMRUpdate(file, server) {
|
|
|
38049
38211
|
}
|
|
38050
38212
|
updateModules(shortFile, hmrContext.modules, timestamp, server);
|
|
38051
38213
|
}
|
|
38052
|
-
function updateModules(file, modules, timestamp, { config, ws }, afterInvalidation) {
|
|
38214
|
+
function updateModules(file, modules, timestamp, { config, ws, moduleGraph }, afterInvalidation) {
|
|
38053
38215
|
const updates = [];
|
|
38054
38216
|
const invalidatedModules = new Set();
|
|
38055
38217
|
let needFullReload = false;
|
|
38056
38218
|
for (const mod of modules) {
|
|
38057
|
-
|
|
38219
|
+
moduleGraph.invalidateModule(mod, invalidatedModules, timestamp, true);
|
|
38058
38220
|
if (needFullReload) {
|
|
38059
38221
|
continue;
|
|
38060
38222
|
}
|
|
@@ -38181,22 +38343,6 @@ function propagateUpdate(node, boundaries, currentChain = [node]) {
|
|
|
38181
38343
|
}
|
|
38182
38344
|
return false;
|
|
38183
38345
|
}
|
|
38184
|
-
function invalidate(mod, timestamp, seen) {
|
|
38185
|
-
if (seen.has(mod)) {
|
|
38186
|
-
return;
|
|
38187
|
-
}
|
|
38188
|
-
seen.add(mod);
|
|
38189
|
-
mod.lastHMRTimestamp = timestamp;
|
|
38190
|
-
mod.transformResult = null;
|
|
38191
|
-
mod.ssrModule = null;
|
|
38192
|
-
mod.ssrError = null;
|
|
38193
|
-
mod.ssrTransformResult = null;
|
|
38194
|
-
mod.importers.forEach((importer) => {
|
|
38195
|
-
if (!importer.acceptedHmrDeps.has(mod)) {
|
|
38196
|
-
invalidate(importer, timestamp, seen);
|
|
38197
|
-
}
|
|
38198
|
-
});
|
|
38199
|
-
}
|
|
38200
38346
|
function handlePrunedModules(mods, { ws }) {
|
|
38201
38347
|
// update the disposed modules' hmr timestamp
|
|
38202
38348
|
// since if it's re-imported, it should re-apply side effects
|
|
@@ -38396,7 +38542,7 @@ var etag_1 = etag;
|
|
|
38396
38542
|
* @private
|
|
38397
38543
|
*/
|
|
38398
38544
|
|
|
38399
|
-
var crypto = require$$5;
|
|
38545
|
+
var crypto = require$$5$1;
|
|
38400
38546
|
var Stats = require$$0__default.Stats;
|
|
38401
38547
|
|
|
38402
38548
|
/**
|
|
@@ -38746,7 +38892,7 @@ var convertSourceMap = {};
|
|
|
38746
38892
|
} (convertSourceMap));
|
|
38747
38893
|
|
|
38748
38894
|
function totalist(dir, callback, pre='') {
|
|
38749
|
-
dir = resolve$
|
|
38895
|
+
dir = resolve$3('.', dir);
|
|
38750
38896
|
let arr = readdirSync(dir);
|
|
38751
38897
|
let i=0, abs, stats;
|
|
38752
38898
|
for (; i < arr.length; i++) {
|
|
@@ -38906,7 +39052,7 @@ function toHeaders(name, stats, isEtag) {
|
|
|
38906
39052
|
}
|
|
38907
39053
|
|
|
38908
39054
|
function sirv (dir, opts={}) {
|
|
38909
|
-
dir = resolve$
|
|
39055
|
+
dir = resolve$3(dir || '.');
|
|
38910
39056
|
|
|
38911
39057
|
let isNotFound = opts.onNoMatch || is404;
|
|
38912
39058
|
let setHeaders = opts.setHeaders || noop$2;
|
|
@@ -39332,7 +39478,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
|
|
|
39332
39478
|
await injectSourcesContent(map, mod.file, logger);
|
|
39333
39479
|
}
|
|
39334
39480
|
}
|
|
39335
|
-
const result = ssr
|
|
39481
|
+
const result = ssr && !server.config.experimental.skipSsrTransform
|
|
39336
39482
|
? await server.ssrTransform(code, map, url, originalCode)
|
|
39337
39483
|
: {
|
|
39338
39484
|
code,
|
|
@@ -39997,10 +40143,11 @@ function clientInjectionsPlugin(config) {
|
|
|
39997
40143
|
const protocol = hmrConfig?.protocol || null;
|
|
39998
40144
|
const timeout = hmrConfig?.timeout || 30000;
|
|
39999
40145
|
const overlay = hmrConfig?.overlay !== false;
|
|
40146
|
+
const isHmrServerSpecified = !!hmrConfig?.server;
|
|
40000
40147
|
// hmr.clientPort -> hmr.port
|
|
40001
|
-
// -> (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
|
|
40002
40149
|
let port = hmrConfig?.clientPort || hmrConfig?.port || null;
|
|
40003
|
-
if (config.server.middlewareMode) {
|
|
40150
|
+
if (config.server.middlewareMode && !isHmrServerSpecified) {
|
|
40004
40151
|
port || (port = 24678);
|
|
40005
40152
|
}
|
|
40006
40153
|
let directTarget = hmrConfig?.host || resolvedServerHostname;
|
|
@@ -42103,14 +42250,12 @@ async function createDepsOptimizer(config, server) {
|
|
|
42103
42250
|
addMissingDep(id, deps[id]);
|
|
42104
42251
|
}
|
|
42105
42252
|
}
|
|
42106
|
-
|
|
42107
|
-
|
|
42108
|
-
|
|
42109
|
-
|
|
42110
|
-
|
|
42111
|
-
|
|
42112
|
-
postScanOptimizationResult = runOptimizeDeps(config, knownDeps);
|
|
42113
|
-
}
|
|
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);
|
|
42114
42259
|
}
|
|
42115
42260
|
catch (e) {
|
|
42116
42261
|
logger.error(e.message);
|
|
@@ -43096,13 +43241,8 @@ async function extractExportsData(filePath, config, ssr) {
|
|
|
43096
43241
|
};
|
|
43097
43242
|
return exportsData;
|
|
43098
43243
|
}
|
|
43099
|
-
// https://github.com/vitejs/vite/issues/1724#issuecomment-767619642
|
|
43100
|
-
// a list of modules that pretends to be ESM but still uses `require`.
|
|
43101
|
-
// this causes esbuild to wrap them as CJS even when its entry appears to be ESM.
|
|
43102
|
-
const KNOWN_INTEROP_IDS = new Set(['moment']);
|
|
43103
43244
|
function needsInterop(config, ssr, id, exportsData, output) {
|
|
43104
|
-
if (getDepOptimizationConfig(config, ssr)?.needsInterop?.includes(id)
|
|
43105
|
-
KNOWN_INTEROP_IDS.has(id)) {
|
|
43245
|
+
if (getDepOptimizationConfig(config, ssr)?.needsInterop?.includes(id)) {
|
|
43106
43246
|
return true;
|
|
43107
43247
|
}
|
|
43108
43248
|
const { hasImports, exports } = exportsData;
|
|
@@ -43202,34 +43342,34 @@ async function optimizedDepNeedsInterop(metadata, file, config, ssr) {
|
|
|
43202
43342
|
}
|
|
43203
43343
|
|
|
43204
43344
|
var index$1 = {
|
|
43205
|
-
|
|
43206
|
-
|
|
43207
|
-
|
|
43208
|
-
|
|
43209
|
-
|
|
43210
|
-
|
|
43211
|
-
|
|
43212
|
-
|
|
43213
|
-
|
|
43214
|
-
|
|
43215
|
-
|
|
43216
|
-
|
|
43217
|
-
|
|
43218
|
-
|
|
43219
|
-
|
|
43220
|
-
|
|
43221
|
-
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
|
|
43225
|
-
|
|
43226
|
-
|
|
43227
|
-
|
|
43228
|
-
|
|
43229
|
-
|
|
43230
|
-
|
|
43231
|
-
|
|
43232
|
-
|
|
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
|
|
43233
43373
|
};
|
|
43234
43374
|
|
|
43235
43375
|
/**
|
|
@@ -43751,7 +43891,7 @@ function ssrManifestPlugin(config) {
|
|
|
43751
43891
|
? config.build.ssrManifest
|
|
43752
43892
|
: 'ssr-manifest.json',
|
|
43753
43893
|
type: 'asset',
|
|
43754
|
-
source:
|
|
43894
|
+
source: jsonStableStringify(ssrManifest, { space: 2 }),
|
|
43755
43895
|
});
|
|
43756
43896
|
},
|
|
43757
43897
|
};
|
|
@@ -44181,6 +44321,13 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
|
44181
44321
|
if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {
|
|
44182
44322
|
process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV;
|
|
44183
44323
|
}
|
|
44324
|
+
// support BROWSER and BROWSER_ARGS env variables
|
|
44325
|
+
if (parsed.BROWSER && process.env.BROWSER === undefined) {
|
|
44326
|
+
process.env.BROWSER = parsed.BROWSER;
|
|
44327
|
+
}
|
|
44328
|
+
if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {
|
|
44329
|
+
process.env.BROWSER_ARGS = parsed.BROWSER_ARGS;
|
|
44330
|
+
}
|
|
44184
44331
|
try {
|
|
44185
44332
|
// let environment variables use each other
|
|
44186
44333
|
expand_1({ parsed });
|
|
@@ -44249,6 +44396,7 @@ function resolveBuildOptions(raw, logger) {
|
|
|
44249
44396
|
lib: false,
|
|
44250
44397
|
ssr: false,
|
|
44251
44398
|
ssrManifest: false,
|
|
44399
|
+
ssrEmitAssets: false,
|
|
44252
44400
|
reportCompressedSize: true,
|
|
44253
44401
|
chunkSizeWarningLimit: 500,
|
|
44254
44402
|
watch: null,
|
|
@@ -44329,32 +44477,11 @@ async function resolveBuildPlugins(config) {
|
|
|
44329
44477
|
],
|
|
44330
44478
|
};
|
|
44331
44479
|
}
|
|
44332
|
-
/**
|
|
44333
|
-
* Track parallel build calls and only stop the esbuild service when all
|
|
44334
|
-
* builds are done. (#1098)
|
|
44335
|
-
*/
|
|
44336
|
-
let parallelCallCounts = 0;
|
|
44337
|
-
// we use a separate counter to track since the call may error before the
|
|
44338
|
-
// bundle is even pushed.
|
|
44339
|
-
const parallelBuilds = [];
|
|
44340
44480
|
/**
|
|
44341
44481
|
* Bundles the app for production.
|
|
44342
44482
|
* Returns a Promise containing the build result.
|
|
44343
44483
|
*/
|
|
44344
44484
|
async function build(inlineConfig = {}) {
|
|
44345
|
-
parallelCallCounts++;
|
|
44346
|
-
try {
|
|
44347
|
-
return await doBuild(inlineConfig);
|
|
44348
|
-
}
|
|
44349
|
-
finally {
|
|
44350
|
-
parallelCallCounts--;
|
|
44351
|
-
if (parallelCallCounts <= 0) {
|
|
44352
|
-
await Promise.all(parallelBuilds.map((bundle) => bundle.close()));
|
|
44353
|
-
parallelBuilds.length = 0;
|
|
44354
|
-
}
|
|
44355
|
-
}
|
|
44356
|
-
}
|
|
44357
|
-
async function doBuild(inlineConfig = {}) {
|
|
44358
44485
|
const config = await resolveConfig(inlineConfig, 'build', 'production', 'production');
|
|
44359
44486
|
const options = config.build;
|
|
44360
44487
|
const ssr = !!options.ssr;
|
|
@@ -44399,6 +44526,7 @@ async function doBuild(inlineConfig = {}) {
|
|
|
44399
44526
|
: libOptions
|
|
44400
44527
|
? 'strict'
|
|
44401
44528
|
: false,
|
|
44529
|
+
cache: config.build.watch ? undefined : false,
|
|
44402
44530
|
...options.rollupOptions,
|
|
44403
44531
|
input,
|
|
44404
44532
|
plugins,
|
|
@@ -44417,6 +44545,7 @@ async function doBuild(inlineConfig = {}) {
|
|
|
44417
44545
|
}
|
|
44418
44546
|
config.logger.error(msg, { error: e });
|
|
44419
44547
|
};
|
|
44548
|
+
let bundle;
|
|
44420
44549
|
try {
|
|
44421
44550
|
const buildOutputOptions = (output = {}) => {
|
|
44422
44551
|
// @ts-expect-error See https://github.com/vitejs/vite/issues/5812#issuecomment-984345618
|
|
@@ -44505,17 +44634,13 @@ async function doBuild(inlineConfig = {}) {
|
|
|
44505
44634
|
}
|
|
44506
44635
|
// write or generate files with rollup
|
|
44507
44636
|
const { rollup } = await import('rollup');
|
|
44508
|
-
|
|
44509
|
-
parallelBuilds.push(bundle);
|
|
44510
|
-
const generate = (output = {}) => {
|
|
44511
|
-
return bundle[options.write ? 'write' : 'generate'](output);
|
|
44512
|
-
};
|
|
44637
|
+
bundle = await rollup(rollupOptions);
|
|
44513
44638
|
if (options.write) {
|
|
44514
44639
|
prepareOutDir(outDirs, options.emptyOutDir, config);
|
|
44515
44640
|
}
|
|
44516
44641
|
const res = [];
|
|
44517
44642
|
for (const output of normalizedOutputs) {
|
|
44518
|
-
res.push(await generate(output));
|
|
44643
|
+
res.push(await bundle[options.write ? 'write' : 'generate'](output));
|
|
44519
44644
|
}
|
|
44520
44645
|
return Array.isArray(outputs) ? res : res[0];
|
|
44521
44646
|
}
|
|
@@ -44523,6 +44648,10 @@ async function doBuild(inlineConfig = {}) {
|
|
|
44523
44648
|
outputBuildError(e);
|
|
44524
44649
|
throw e;
|
|
44525
44650
|
}
|
|
44651
|
+
finally {
|
|
44652
|
+
if (bundle)
|
|
44653
|
+
bundle.close();
|
|
44654
|
+
}
|
|
44526
44655
|
}
|
|
44527
44656
|
function prepareOutDir(outDirs, emptyOutDir, config) {
|
|
44528
44657
|
const nonDuplicateDirs = new Set(outDirs);
|
|
@@ -44856,18 +44985,18 @@ const toOutputFilePathInCss = toOutputFilePathWithoutRuntime;
|
|
|
44856
44985
|
const toOutputFilePathInHtml = toOutputFilePathWithoutRuntime;
|
|
44857
44986
|
|
|
44858
44987
|
var build$1 = {
|
|
44859
|
-
|
|
44860
|
-
|
|
44861
|
-
|
|
44862
|
-
|
|
44863
|
-
|
|
44864
|
-
|
|
44865
|
-
|
|
44866
|
-
|
|
44867
|
-
|
|
44868
|
-
|
|
44869
|
-
|
|
44870
|
-
|
|
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
|
|
44871
45000
|
};
|
|
44872
45001
|
|
|
44873
45002
|
var srcExports = {};
|
|
@@ -51344,14 +51473,14 @@ function setClientErrorHandler(server, logger) {
|
|
|
51344
51473
|
});
|
|
51345
51474
|
}
|
|
51346
51475
|
|
|
51347
|
-
|
|
51348
|
-
|
|
51349
|
-
|
|
51350
|
-
|
|
51351
|
-
|
|
51352
|
-
|
|
51353
|
-
|
|
51354
|
-
|
|
51476
|
+
/**
|
|
51477
|
+
* @typedef { import('estree').Node} Node
|
|
51478
|
+
* @typedef {{
|
|
51479
|
+
* skip: () => void;
|
|
51480
|
+
* remove: () => void;
|
|
51481
|
+
* replace: (node: Node) => void;
|
|
51482
|
+
* }} WalkerContext
|
|
51483
|
+
*/
|
|
51355
51484
|
|
|
51356
51485
|
class WalkerBase {
|
|
51357
51486
|
constructor() {
|
|
@@ -51361,7 +51490,7 @@ class WalkerBase {
|
|
|
51361
51490
|
/** @type {boolean} */
|
|
51362
51491
|
this.should_remove = false;
|
|
51363
51492
|
|
|
51364
|
-
/** @type {
|
|
51493
|
+
/** @type {Node | null} */
|
|
51365
51494
|
this.replacement = null;
|
|
51366
51495
|
|
|
51367
51496
|
/** @type {WalkerContext} */
|
|
@@ -51373,32 +51502,32 @@ class WalkerBase {
|
|
|
51373
51502
|
}
|
|
51374
51503
|
|
|
51375
51504
|
/**
|
|
51376
|
-
*
|
|
51377
|
-
* @param {
|
|
51378
|
-
* @param {
|
|
51379
|
-
* @param {number} index
|
|
51380
|
-
* @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
|
|
51381
51510
|
*/
|
|
51382
51511
|
replace(parent, prop, index, node) {
|
|
51383
|
-
if (parent) {
|
|
51384
|
-
if (index
|
|
51385
|
-
parent[prop][index] = node;
|
|
51512
|
+
if (parent && prop) {
|
|
51513
|
+
if (index != null) {
|
|
51514
|
+
/** @type {Array<Node>} */ (parent[prop])[index] = node;
|
|
51386
51515
|
} else {
|
|
51387
|
-
parent[prop] = node;
|
|
51516
|
+
/** @type {Node} */ (parent[prop]) = node;
|
|
51388
51517
|
}
|
|
51389
51518
|
}
|
|
51390
51519
|
}
|
|
51391
51520
|
|
|
51392
51521
|
/**
|
|
51393
|
-
*
|
|
51394
|
-
* @param {
|
|
51395
|
-
* @param {
|
|
51396
|
-
* @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
|
|
51397
51526
|
*/
|
|
51398
51527
|
remove(parent, prop, index) {
|
|
51399
|
-
if (parent) {
|
|
51400
|
-
if (index !== null) {
|
|
51401
|
-
parent[prop].splice(index, 1);
|
|
51528
|
+
if (parent && prop) {
|
|
51529
|
+
if (index !== null && index !== undefined) {
|
|
51530
|
+
/** @type {Array<Node>} */ (parent[prop]).splice(index, 1);
|
|
51402
51531
|
} else {
|
|
51403
51532
|
delete parent[prop];
|
|
51404
51533
|
}
|
|
@@ -51406,42 +51535,57 @@ class WalkerBase {
|
|
|
51406
51535
|
}
|
|
51407
51536
|
}
|
|
51408
51537
|
|
|
51409
|
-
|
|
51410
|
-
|
|
51411
|
-
|
|
51412
|
-
|
|
51413
|
-
|
|
51414
|
-
/** @typedef {(
|
|
51538
|
+
/**
|
|
51539
|
+
* @typedef { import('estree').Node} Node
|
|
51540
|
+
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
51541
|
+
* @typedef {(
|
|
51415
51542
|
* this: WalkerContext,
|
|
51416
|
-
* node:
|
|
51417
|
-
* parent:
|
|
51418
|
-
* key: string,
|
|
51419
|
-
* index: number
|
|
51420
|
-
* ) => 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
|
+
*/
|
|
51421
51549
|
|
|
51422
51550
|
class SyncWalker extends WalkerBase {
|
|
51423
51551
|
/**
|
|
51424
51552
|
*
|
|
51425
|
-
* @param {SyncHandler} enter
|
|
51426
|
-
* @param {SyncHandler} leave
|
|
51553
|
+
* @param {SyncHandler} [enter]
|
|
51554
|
+
* @param {SyncHandler} [leave]
|
|
51427
51555
|
*/
|
|
51428
51556
|
constructor(enter, leave) {
|
|
51429
51557
|
super();
|
|
51430
51558
|
|
|
51431
|
-
/** @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} */
|
|
51432
51576
|
this.enter = enter;
|
|
51433
51577
|
|
|
51434
|
-
/** @type {SyncHandler} */
|
|
51578
|
+
/** @type {SyncHandler | undefined} */
|
|
51435
51579
|
this.leave = leave;
|
|
51436
51580
|
}
|
|
51437
51581
|
|
|
51438
51582
|
/**
|
|
51439
|
-
*
|
|
51440
|
-
* @param {
|
|
51441
|
-
* @param {
|
|
51442
|
-
* @param {
|
|
51443
|
-
* @param {number} [index]
|
|
51444
|
-
* @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}
|
|
51445
51589
|
*/
|
|
51446
51590
|
visit(node, parent, prop, index) {
|
|
51447
51591
|
if (node) {
|
|
@@ -51475,22 +51619,28 @@ class SyncWalker extends WalkerBase {
|
|
|
51475
51619
|
if (removed) return null;
|
|
51476
51620
|
}
|
|
51477
51621
|
|
|
51478
|
-
|
|
51622
|
+
/** @type {keyof Node} */
|
|
51623
|
+
let key;
|
|
51624
|
+
|
|
51625
|
+
for (key in node) {
|
|
51626
|
+
/** @type {unknown} */
|
|
51479
51627
|
const value = node[key];
|
|
51480
51628
|
|
|
51481
|
-
if (typeof value
|
|
51482
|
-
|
|
51483
|
-
|
|
51484
|
-
|
|
51485
|
-
|
|
51486
|
-
if (
|
|
51487
|
-
|
|
51488
|
-
|
|
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
|
+
}
|
|
51489
51639
|
}
|
|
51490
51640
|
}
|
|
51641
|
+
} else if (isNode(value)) {
|
|
51642
|
+
this.visit(value, node, key, null);
|
|
51491
51643
|
}
|
|
51492
|
-
} else if (value !== null && typeof value.type === "string") {
|
|
51493
|
-
this.visit(value, node, key, null);
|
|
51494
51644
|
}
|
|
51495
51645
|
}
|
|
51496
51646
|
|
|
@@ -51524,20 +51674,31 @@ class SyncWalker extends WalkerBase {
|
|
|
51524
51674
|
}
|
|
51525
51675
|
}
|
|
51526
51676
|
|
|
51527
|
-
|
|
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
|
+
}
|
|
51528
51688
|
|
|
51529
|
-
/**
|
|
51530
|
-
|
|
51531
|
-
|
|
51689
|
+
/**
|
|
51690
|
+
* @typedef {import('estree').Node} Node
|
|
51691
|
+
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
51692
|
+
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
51693
|
+
*/
|
|
51532
51694
|
|
|
51533
51695
|
/**
|
|
51534
|
-
*
|
|
51535
|
-
* @param {BaseNode} ast
|
|
51696
|
+
* @param {Node} ast
|
|
51536
51697
|
* @param {{
|
|
51537
51698
|
* enter?: SyncHandler
|
|
51538
51699
|
* leave?: SyncHandler
|
|
51539
51700
|
* }} walker
|
|
51540
|
-
* @returns {
|
|
51701
|
+
* @returns {Node | null}
|
|
51541
51702
|
*/
|
|
51542
51703
|
function walk$1(ast, { enter, leave }) {
|
|
51543
51704
|
const instance = new SyncWalker(enter, leave);
|
|
@@ -51949,6 +52110,9 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
|
|
|
51949
52110
|
handlePattern(node.id, parentFunction);
|
|
51950
52111
|
}
|
|
51951
52112
|
}
|
|
52113
|
+
else if (node.type === 'CatchClause' && node.param) {
|
|
52114
|
+
handlePattern(node.param, node);
|
|
52115
|
+
}
|
|
51952
52116
|
},
|
|
51953
52117
|
leave(node, parent) {
|
|
51954
52118
|
// untrack parent stack from above
|
|
@@ -52024,10 +52188,11 @@ const functionNodeTypeRE = /Function(?:Expression|Declaration)$|Method$/;
|
|
|
52024
52188
|
function isFunction(node) {
|
|
52025
52189
|
return functionNodeTypeRE.test(node.type);
|
|
52026
52190
|
}
|
|
52027
|
-
const scopeNodeTypeRE = /(?:Function|Class)(?:Expression|Declaration)$|Method$|^IfStatement$/;
|
|
52028
52191
|
function findParentScope(parentStack, isVar = false) {
|
|
52029
|
-
const
|
|
52030
|
-
|
|
52192
|
+
const predicate = isVar
|
|
52193
|
+
? isFunction
|
|
52194
|
+
: (node) => node.type === 'BlockStatement';
|
|
52195
|
+
return parentStack.find(predicate);
|
|
52031
52196
|
}
|
|
52032
52197
|
function isInDestructuringAssignment(parent, parentStack) {
|
|
52033
52198
|
if (parent &&
|
|
@@ -53350,7 +53515,10 @@ function openBrowser(url, opt, logger) {
|
|
|
53350
53515
|
return executeNodeScript(browser, url, logger);
|
|
53351
53516
|
}
|
|
53352
53517
|
else if (browser.toLowerCase() !== 'none') {
|
|
53353
|
-
|
|
53518
|
+
const browserArgs = process.env.BROWSER_ARGS
|
|
53519
|
+
? process.env.BROWSER_ARGS.split(' ')
|
|
53520
|
+
: [];
|
|
53521
|
+
return startBrowserProcess(browser, browserArgs, url);
|
|
53354
53522
|
}
|
|
53355
53523
|
return false;
|
|
53356
53524
|
}
|
|
@@ -53376,7 +53544,7 @@ const supportedChromiumBrowsers = [
|
|
|
53376
53544
|
'Vivaldi',
|
|
53377
53545
|
'Chromium',
|
|
53378
53546
|
];
|
|
53379
|
-
function startBrowserProcess(browser, url) {
|
|
53547
|
+
function startBrowserProcess(browser, browserArgs, url) {
|
|
53380
53548
|
// If we're on OS X, the user hasn't specifically
|
|
53381
53549
|
// requested a different browser, we can try opening
|
|
53382
53550
|
// a Chromium browser with AppleScript. This lets us reuse an
|
|
@@ -53414,7 +53582,9 @@ function startBrowserProcess(browser, url) {
|
|
|
53414
53582
|
// Fallback to open
|
|
53415
53583
|
// (It will always open new tab)
|
|
53416
53584
|
try {
|
|
53417
|
-
const options = browser
|
|
53585
|
+
const options = browser
|
|
53586
|
+
? { app: { name: browser, arguments: browserArgs } }
|
|
53587
|
+
: {};
|
|
53418
53588
|
open_1(url, options).catch(() => { }); // Prevent `unhandledRejection` error.
|
|
53419
53589
|
return true;
|
|
53420
53590
|
}
|
|
@@ -53441,7 +53611,7 @@ function bindShortcuts(server, opts) {
|
|
|
53441
53611
|
const onInput = async (input) => {
|
|
53442
53612
|
// ctrl+c or ctrl+d
|
|
53443
53613
|
if (input === '\x03' || input === '\x04') {
|
|
53444
|
-
process.
|
|
53614
|
+
await server.close().finally(() => process.exit(1));
|
|
53445
53615
|
return;
|
|
53446
53616
|
}
|
|
53447
53617
|
if (actionRunning)
|
|
@@ -53496,6 +53666,13 @@ const BASE_SHORTCUTS = [
|
|
|
53496
53666
|
openBrowser(url, true, server.config.logger);
|
|
53497
53667
|
},
|
|
53498
53668
|
},
|
|
53669
|
+
{
|
|
53670
|
+
key: 'c',
|
|
53671
|
+
description: 'clear console',
|
|
53672
|
+
action(server) {
|
|
53673
|
+
server.config.logger.clearScreen('error');
|
|
53674
|
+
},
|
|
53675
|
+
},
|
|
53499
53676
|
{
|
|
53500
53677
|
key: 'q',
|
|
53501
53678
|
description: 'quit',
|
|
@@ -53524,6 +53701,8 @@ var constants = {
|
|
|
53524
53701
|
|
|
53525
53702
|
const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = constants;
|
|
53526
53703
|
|
|
53704
|
+
const FastBuffer$2 = Buffer[Symbol.species];
|
|
53705
|
+
|
|
53527
53706
|
/**
|
|
53528
53707
|
* Merges an array of buffers into a new buffer.
|
|
53529
53708
|
*
|
|
@@ -53545,7 +53724,9 @@ function concat$1(list, totalLength) {
|
|
|
53545
53724
|
offset += buf.length;
|
|
53546
53725
|
}
|
|
53547
53726
|
|
|
53548
|
-
if (offset < totalLength)
|
|
53727
|
+
if (offset < totalLength) {
|
|
53728
|
+
return new FastBuffer$2(target.buffer, target.byteOffset, offset);
|
|
53729
|
+
}
|
|
53549
53730
|
|
|
53550
53731
|
return target;
|
|
53551
53732
|
}
|
|
@@ -53587,11 +53768,11 @@ function _unmask(buffer, mask) {
|
|
|
53587
53768
|
* @public
|
|
53588
53769
|
*/
|
|
53589
53770
|
function toArrayBuffer$1(buf) {
|
|
53590
|
-
if (buf.
|
|
53771
|
+
if (buf.length === buf.buffer.byteLength) {
|
|
53591
53772
|
return buf.buffer;
|
|
53592
53773
|
}
|
|
53593
53774
|
|
|
53594
|
-
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.
|
|
53775
|
+
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
|
|
53595
53776
|
}
|
|
53596
53777
|
|
|
53597
53778
|
/**
|
|
@@ -53610,9 +53791,9 @@ function toBuffer$2(data) {
|
|
|
53610
53791
|
let buf;
|
|
53611
53792
|
|
|
53612
53793
|
if (data instanceof ArrayBuffer) {
|
|
53613
|
-
buf =
|
|
53794
|
+
buf = new FastBuffer$2(data);
|
|
53614
53795
|
} else if (ArrayBuffer.isView(data)) {
|
|
53615
|
-
buf =
|
|
53796
|
+
buf = new FastBuffer$2(data.buffer, data.byteOffset, data.byteLength);
|
|
53616
53797
|
} else {
|
|
53617
53798
|
buf = Buffer.from(data);
|
|
53618
53799
|
toBuffer$2.readOnly = false;
|
|
@@ -53708,6 +53889,7 @@ const bufferUtil = bufferUtilExports;
|
|
|
53708
53889
|
const Limiter = limiter;
|
|
53709
53890
|
const { kStatusCode: kStatusCode$2 } = constants;
|
|
53710
53891
|
|
|
53892
|
+
const FastBuffer$1 = Buffer[Symbol.species];
|
|
53711
53893
|
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
|
|
53712
53894
|
const kPerMessageDeflate = Symbol('permessage-deflate');
|
|
53713
53895
|
const kTotalLength = Symbol('total-length');
|
|
@@ -54139,7 +54321,9 @@ let PerMessageDeflate$4 = class PerMessageDeflate {
|
|
|
54139
54321
|
this._deflate[kTotalLength]
|
|
54140
54322
|
);
|
|
54141
54323
|
|
|
54142
|
-
if (fin)
|
|
54324
|
+
if (fin) {
|
|
54325
|
+
data = new FastBuffer$1(data.buffer, data.byteOffset, data.length - 4);
|
|
54326
|
+
}
|
|
54143
54327
|
|
|
54144
54328
|
//
|
|
54145
54329
|
// Ensure that the callback will not be called again in
|
|
@@ -54218,6 +54402,8 @@ var validation = {
|
|
|
54218
54402
|
set exports(v){ validationExports = v; },
|
|
54219
54403
|
};
|
|
54220
54404
|
|
|
54405
|
+
const { isUtf8 } = require$$0$b;
|
|
54406
|
+
|
|
54221
54407
|
//
|
|
54222
54408
|
// Allowed token characters:
|
|
54223
54409
|
//
|
|
@@ -54329,13 +54515,16 @@ validation.exports = {
|
|
|
54329
54515
|
tokenChars: tokenChars$2
|
|
54330
54516
|
};
|
|
54331
54517
|
|
|
54332
|
-
|
|
54333
|
-
|
|
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) {
|
|
54334
54523
|
try {
|
|
54335
54524
|
const isValidUTF8 = require('utf-8-validate');
|
|
54336
54525
|
|
|
54337
54526
|
validationExports.isValidUTF8 = function (buf) {
|
|
54338
|
-
return buf.length <
|
|
54527
|
+
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
54339
54528
|
};
|
|
54340
54529
|
} catch (e) {
|
|
54341
54530
|
// Continue regardless of the error.
|
|
@@ -54354,6 +54543,7 @@ const {
|
|
|
54354
54543
|
const { concat, toArrayBuffer, unmask } = bufferUtilExports;
|
|
54355
54544
|
const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExports;
|
|
54356
54545
|
|
|
54546
|
+
const FastBuffer = Buffer[Symbol.species];
|
|
54357
54547
|
const GET_INFO = 0;
|
|
54358
54548
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
54359
54549
|
const GET_PAYLOAD_LENGTH_64 = 2;
|
|
@@ -54439,8 +54629,13 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54439
54629
|
|
|
54440
54630
|
if (n < this._buffers[0].length) {
|
|
54441
54631
|
const buf = this._buffers[0];
|
|
54442
|
-
this._buffers[0] =
|
|
54443
|
-
|
|
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);
|
|
54444
54639
|
}
|
|
54445
54640
|
|
|
54446
54641
|
const dst = Buffer.allocUnsafe(n);
|
|
@@ -54453,7 +54648,11 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54453
54648
|
dst.set(this._buffers.shift(), offset);
|
|
54454
54649
|
} else {
|
|
54455
54650
|
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
|
|
54456
|
-
this._buffers[0] =
|
|
54651
|
+
this._buffers[0] = new FastBuffer(
|
|
54652
|
+
buf.buffer,
|
|
54653
|
+
buf.byteOffset + n,
|
|
54654
|
+
buf.length - n
|
|
54655
|
+
);
|
|
54457
54656
|
}
|
|
54458
54657
|
|
|
54459
54658
|
n -= buf.length;
|
|
@@ -54601,7 +54800,10 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54601
54800
|
);
|
|
54602
54801
|
}
|
|
54603
54802
|
|
|
54604
|
-
if (
|
|
54803
|
+
if (
|
|
54804
|
+
this._payloadLength > 0x7d ||
|
|
54805
|
+
(this._opcode === 0x08 && this._payloadLength === 1)
|
|
54806
|
+
) {
|
|
54605
54807
|
this._loop = false;
|
|
54606
54808
|
return error(
|
|
54607
54809
|
RangeError,
|
|
@@ -54888,14 +55090,6 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54888
55090
|
if (data.length === 0) {
|
|
54889
55091
|
this.emit('conclude', 1005, EMPTY_BUFFER$2);
|
|
54890
55092
|
this.end();
|
|
54891
|
-
} else if (data.length === 1) {
|
|
54892
|
-
return error(
|
|
54893
|
-
RangeError,
|
|
54894
|
-
'invalid payload length 1',
|
|
54895
|
-
true,
|
|
54896
|
-
1002,
|
|
54897
|
-
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
|
|
54898
|
-
);
|
|
54899
55093
|
} else {
|
|
54900
55094
|
const code = data.readUInt16BE(0);
|
|
54901
55095
|
|
|
@@ -54909,7 +55103,11 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
54909
55103
|
);
|
|
54910
55104
|
}
|
|
54911
55105
|
|
|
54912
|
-
const buf =
|
|
55106
|
+
const buf = new FastBuffer(
|
|
55107
|
+
data.buffer,
|
|
55108
|
+
data.byteOffset + 2,
|
|
55109
|
+
data.length - 2
|
|
55110
|
+
);
|
|
54913
55111
|
|
|
54914
55112
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
54915
55113
|
return error(
|
|
@@ -54960,7 +55158,7 @@ function error(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
|
54960
55158
|
}
|
|
54961
55159
|
|
|
54962
55160
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls$" }] */
|
|
54963
|
-
const { randomFillSync } = require$$5;
|
|
55161
|
+
const { randomFillSync } = require$$5$1;
|
|
54964
55162
|
|
|
54965
55163
|
const PerMessageDeflate$2 = permessageDeflate;
|
|
54966
55164
|
const { EMPTY_BUFFER: EMPTY_BUFFER$1 } = constants;
|
|
@@ -55933,7 +56131,7 @@ const https$2 = require$$1$2;
|
|
|
55933
56131
|
const http$3 = require$$1$1;
|
|
55934
56132
|
const net = require$$3$2;
|
|
55935
56133
|
const tls = require$$4;
|
|
55936
|
-
const { randomBytes, createHash: createHash$1 } = require$$5;
|
|
56134
|
+
const { randomBytes, createHash: createHash$1 } = require$$5$1;
|
|
55937
56135
|
const { URL: URL$2 } = require$$0$9;
|
|
55938
56136
|
|
|
55939
56137
|
const PerMessageDeflate$1 = permessageDeflate;
|
|
@@ -56207,7 +56405,8 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
56207
56405
|
if (this.readyState === WebSocket$1.CLOSED) return;
|
|
56208
56406
|
if (this.readyState === WebSocket$1.CONNECTING) {
|
|
56209
56407
|
const msg = 'WebSocket was closed before the connection was established';
|
|
56210
|
-
|
|
56408
|
+
abortHandshake$1(this, this._req, msg);
|
|
56409
|
+
return;
|
|
56211
56410
|
}
|
|
56212
56411
|
|
|
56213
56412
|
if (this.readyState === WebSocket$1.CLOSING) {
|
|
@@ -56402,7 +56601,8 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
56402
56601
|
if (this.readyState === WebSocket$1.CLOSED) return;
|
|
56403
56602
|
if (this.readyState === WebSocket$1.CONNECTING) {
|
|
56404
56603
|
const msg = 'WebSocket was closed before the connection was established';
|
|
56405
|
-
|
|
56604
|
+
abortHandshake$1(this, this._req, msg);
|
|
56605
|
+
return;
|
|
56406
56606
|
}
|
|
56407
56607
|
|
|
56408
56608
|
if (this._socket) {
|
|
@@ -57021,7 +57221,7 @@ function sendAfterClose(websocket, data, cb) {
|
|
|
57021
57221
|
`WebSocket is not open: readyState ${websocket.readyState} ` +
|
|
57022
57222
|
`(${readyStates[websocket.readyState]})`
|
|
57023
57223
|
);
|
|
57024
|
-
cb
|
|
57224
|
+
process.nextTick(cb, err);
|
|
57025
57225
|
}
|
|
57026
57226
|
}
|
|
57027
57227
|
|
|
@@ -57294,7 +57494,7 @@ var subprotocol$1 = { parse };
|
|
|
57294
57494
|
|
|
57295
57495
|
const EventEmitter = require$$0$5;
|
|
57296
57496
|
const http$2 = require$$1$1;
|
|
57297
|
-
const { createHash } = require$$5;
|
|
57497
|
+
const { createHash } = require$$5$1;
|
|
57298
57498
|
|
|
57299
57499
|
const extension = extension$1;
|
|
57300
57500
|
const PerMessageDeflate = permessageDeflate;
|
|
@@ -58877,7 +59077,7 @@ var URL$1 = url.URL;
|
|
|
58877
59077
|
var http$1 = require$$1$1;
|
|
58878
59078
|
var https$1 = require$$1$2;
|
|
58879
59079
|
var Writable = require$$0$7.Writable;
|
|
58880
|
-
var assert =
|
|
59080
|
+
var assert = require$$5;
|
|
58881
59081
|
var debug$2 = debug_1;
|
|
58882
59082
|
|
|
58883
59083
|
// Create handlers that pass events from native requests
|
|
@@ -60744,15 +60944,6 @@ class ModuleNode {
|
|
|
60744
60944
|
}
|
|
60745
60945
|
}
|
|
60746
60946
|
}
|
|
60747
|
-
function invalidateSSRModule(mod, seen) {
|
|
60748
|
-
if (seen.has(mod)) {
|
|
60749
|
-
return;
|
|
60750
|
-
}
|
|
60751
|
-
seen.add(mod);
|
|
60752
|
-
mod.ssrModule = null;
|
|
60753
|
-
mod.ssrError = null;
|
|
60754
|
-
mod.importers.forEach((importer) => invalidateSSRModule(importer, seen));
|
|
60755
|
-
}
|
|
60756
60947
|
class ModuleGraph {
|
|
60757
60948
|
constructor(resolveId) {
|
|
60758
60949
|
this.resolveId = resolveId;
|
|
@@ -60781,15 +60972,30 @@ class ModuleGraph {
|
|
|
60781
60972
|
});
|
|
60782
60973
|
}
|
|
60783
60974
|
}
|
|
60784
|
-
invalidateModule(mod, seen = new Set(), timestamp = Date.now()) {
|
|
60785
|
-
|
|
60786
|
-
|
|
60787
|
-
|
|
60975
|
+
invalidateModule(mod, seen = new Set(), timestamp = Date.now(), isHmr = false) {
|
|
60976
|
+
if (seen.has(mod)) {
|
|
60977
|
+
return;
|
|
60978
|
+
}
|
|
60979
|
+
seen.add(mod);
|
|
60980
|
+
if (isHmr) {
|
|
60981
|
+
mod.lastHMRTimestamp = timestamp;
|
|
60982
|
+
}
|
|
60983
|
+
else {
|
|
60984
|
+
// Save the timestamp for this invalidation, so we can avoid caching the result of possible already started
|
|
60985
|
+
// processing being done for this module
|
|
60986
|
+
mod.lastInvalidationTimestamp = timestamp;
|
|
60987
|
+
}
|
|
60788
60988
|
// Don't invalidate mod.info and mod.meta, as they are part of the processing pipeline
|
|
60789
60989
|
// Invalidating the transform result is enough to ensure this module is re-processed next time it is requested
|
|
60790
60990
|
mod.transformResult = null;
|
|
60791
60991
|
mod.ssrTransformResult = null;
|
|
60792
|
-
|
|
60992
|
+
mod.ssrModule = null;
|
|
60993
|
+
mod.ssrError = null;
|
|
60994
|
+
mod.importers.forEach((importer) => {
|
|
60995
|
+
if (!importer.acceptedHmrDeps.has(mod)) {
|
|
60996
|
+
this.invalidateModule(importer, seen, timestamp, isHmr);
|
|
60997
|
+
}
|
|
60998
|
+
});
|
|
60793
60999
|
}
|
|
60794
61000
|
invalidateAll() {
|
|
60795
61001
|
const timestamp = Date.now();
|
|
@@ -61181,7 +61387,7 @@ async function startServer(server, inlinePort, isRestart = false) {
|
|
|
61181
61387
|
throw new Error('Cannot call server.listen in middleware mode.');
|
|
61182
61388
|
}
|
|
61183
61389
|
const options = server.config.server;
|
|
61184
|
-
const port = inlinePort ?? options.port ??
|
|
61390
|
+
const port = inlinePort ?? options.port ?? DEFAULT_DEV_PORT;
|
|
61185
61391
|
const hostname = await resolveHostname(options.host);
|
|
61186
61392
|
const protocol = options.https ? 'https' : 'http';
|
|
61187
61393
|
const serverPort = await httpServerStart(httpServer, {
|
|
@@ -61290,7 +61496,8 @@ async function restartServer(server) {
|
|
|
61290
61496
|
if (!middlewareMode) {
|
|
61291
61497
|
await server.listen(port, true);
|
|
61292
61498
|
logger.info('server restarted.', { timestamp: true });
|
|
61293
|
-
if ((port ??
|
|
61499
|
+
if ((port ?? DEFAULT_DEV_PORT) !== (prevPort ?? DEFAULT_DEV_PORT) ||
|
|
61500
|
+
host !== prevHost) {
|
|
61294
61501
|
logger.info('');
|
|
61295
61502
|
server.printUrls();
|
|
61296
61503
|
}
|
|
@@ -61327,10 +61534,10 @@ async function updateCjsSsrExternals(server) {
|
|
|
61327
61534
|
}
|
|
61328
61535
|
|
|
61329
61536
|
var index = {
|
|
61330
|
-
|
|
61331
|
-
|
|
61332
|
-
|
|
61333
|
-
|
|
61537
|
+
__proto__: null,
|
|
61538
|
+
createServer: createServer,
|
|
61539
|
+
resolveServerOptions: resolveServerOptions,
|
|
61540
|
+
searchForWorkspaceRoot: searchForWorkspaceRoot
|
|
61334
61541
|
};
|
|
61335
61542
|
|
|
61336
61543
|
/* eslint-disable */
|
|
@@ -61499,7 +61706,7 @@ async function preview(inlineConfig = {}) {
|
|
|
61499
61706
|
postHooks.forEach((fn) => fn && fn());
|
|
61500
61707
|
const options = config.preview;
|
|
61501
61708
|
const hostname = await resolveHostname(options.host);
|
|
61502
|
-
const port = options.port ??
|
|
61709
|
+
const port = options.port ?? DEFAULT_PREVIEW_PORT;
|
|
61503
61710
|
const protocol = options.https ? 'https' : 'http';
|
|
61504
61711
|
const logger = config.logger;
|
|
61505
61712
|
const serverPort = await httpServerStart(httpServer, {
|
|
@@ -61526,9 +61733,9 @@ async function preview(inlineConfig = {}) {
|
|
|
61526
61733
|
}
|
|
61527
61734
|
|
|
61528
61735
|
var preview$1 = {
|
|
61529
|
-
|
|
61530
|
-
|
|
61531
|
-
|
|
61736
|
+
__proto__: null,
|
|
61737
|
+
preview: preview,
|
|
61738
|
+
resolvePreviewOptions: resolvePreviewOptions
|
|
61532
61739
|
};
|
|
61533
61740
|
|
|
61534
61741
|
function resolveSSROptions(ssr, preserveSymlinks, buildSsrCjsExternalHeuristics) {
|
|
@@ -62138,4 +62345,4 @@ function isDepsOptimizerEnabled(config, ssr) {
|
|
|
62138
62345
|
(command === 'serve' && disabled === 'dev'));
|
|
62139
62346
|
}
|
|
62140
62347
|
|
|
62141
|
-
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 };
|