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