vite 5.0.0-beta.2 → 5.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +29 -2
- package/dist/client/client.mjs.map +1 -1
- package/dist/client/env.mjs.map +1 -1
- package/dist/node/chunks/{dep-82f73734.js → dep-69dc786c.js} +548 -545
- package/dist/node/chunks/{dep-13ae786e.js → dep-a86a117b.js} +1 -1
- package/dist/node/chunks/{dep-5c5f3875.js → dep-ae1dfb84.js} +1 -1
- package/dist/node/cli.js +11 -7
- package/dist/node/index.d.ts +20 -57
- package/dist/node/index.js +3 -2
- package/dist/node-cjs/publicUtils.cjs +110 -78
- package/index.cjs +14 -0
- package/index.d.cts +6 -0
- package/package.json +33 -27
|
@@ -13,7 +13,7 @@ import require$$0__default, { existsSync, readFileSync, statSync as statSync$1,
|
|
|
13
13
|
import require$$0$5 from 'events';
|
|
14
14
|
import require$$5 from 'assert';
|
|
15
15
|
import require$$0$6 from 'util';
|
|
16
|
-
import require$$
|
|
16
|
+
import require$$4$1 from 'net';
|
|
17
17
|
import require$$0$9 from 'url';
|
|
18
18
|
import require$$1$1 from 'http';
|
|
19
19
|
import require$$0$7 from 'stream';
|
|
@@ -27,19 +27,20 @@ import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, wildcardHosts, loopbackHosts, VALID
|
|
|
27
27
|
import require$$3$1 from 'crypto';
|
|
28
28
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
29
29
|
import require$$0$8, { createRequire as createRequire$2 } from 'module';
|
|
30
|
+
import { VERSION } from 'rollup';
|
|
30
31
|
import assert$1 from 'node:assert';
|
|
31
32
|
import process$1 from 'node:process';
|
|
32
33
|
import v8 from 'node:v8';
|
|
33
|
-
import { VERSION } from 'rollup';
|
|
34
34
|
import { createServer as createServer$3, STATUS_CODES } from 'node:http';
|
|
35
35
|
import { createServer as createServer$2 } from 'node:https';
|
|
36
36
|
import require$$0$a from 'zlib';
|
|
37
37
|
import require$$0$b from 'buffer';
|
|
38
38
|
import require$$1$2 from 'https';
|
|
39
|
-
import require$$4$
|
|
39
|
+
import require$$4$2 from 'tls';
|
|
40
40
|
import require$$1 from 'worker_threads';
|
|
41
41
|
import * as qs from 'querystring';
|
|
42
42
|
import readline from 'node:readline';
|
|
43
|
+
import { EventEmitter as EventEmitter$4 } from 'node:events';
|
|
43
44
|
import zlib$1, { gzip } from 'node:zlib';
|
|
44
45
|
|
|
45
46
|
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
|
@@ -208,9 +209,6 @@ function alias$1(options = {}) {
|
|
|
208
209
|
await Promise.all([...(Array.isArray(options.entries) ? options.entries : []), options].map(({ customResolver }) => { var _a; return customResolver && ((_a = getHookFunction(customResolver.buildStart)) === null || _a === void 0 ? void 0 : _a.call(this, inputOptions)); }));
|
|
209
210
|
},
|
|
210
211
|
resolveId(importee, importer, resolveOptions) {
|
|
211
|
-
if (!importer) {
|
|
212
|
-
return null;
|
|
213
|
-
}
|
|
214
212
|
// First match is supposed to be the correct one
|
|
215
213
|
const matchedEntry = entries.find((entry) => matches$1(entry.find, importee));
|
|
216
214
|
if (!matchedEntry) {
|
|
@@ -2646,7 +2644,7 @@ const normalizePath$5 = function normalizePath(filename) {
|
|
|
2646
2644
|
};
|
|
2647
2645
|
|
|
2648
2646
|
function getMatcherString(id, resolutionBase) {
|
|
2649
|
-
if (resolutionBase === false || isAbsolute$1(id) || id.startsWith('
|
|
2647
|
+
if (resolutionBase === false || isAbsolute$1(id) || id.startsWith('**')) {
|
|
2650
2648
|
return normalizePath$5(id);
|
|
2651
2649
|
}
|
|
2652
2650
|
// resolve('') is valid and will default to process.cwd()
|
|
@@ -2695,8 +2693,8 @@ const createFilter$1 = function createFilter(include, exclude, options) {
|
|
|
2695
2693
|
};
|
|
2696
2694
|
|
|
2697
2695
|
const reservedWords$1 = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
|
|
2698
|
-
const builtins
|
|
2699
|
-
const forbiddenIdentifiers = new Set(`${reservedWords$1} ${builtins
|
|
2696
|
+
const builtins = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
|
|
2697
|
+
const forbiddenIdentifiers = new Set(`${reservedWords$1} ${builtins}`.split(' '));
|
|
2700
2698
|
forbiddenIdentifiers.add('');
|
|
2701
2699
|
const makeLegalIdentifier = function makeLegalIdentifier(str) {
|
|
2702
2700
|
let identifier = str
|
|
@@ -3625,7 +3623,9 @@ minimatch$1.match = (list, pattern, options = {}) => {
|
|
|
3625
3623
|
|
|
3626
3624
|
// replace stuff like \* with *
|
|
3627
3625
|
const globUnescape = s => s.replace(/\\(.)/g, '$1');
|
|
3626
|
+
const charUnescape = s => s.replace(/\\([^-\]])/g, '$1');
|
|
3628
3627
|
const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
3628
|
+
const braExpEscape = s => s.replace(/[[\]\\]/g, '\\$&');
|
|
3629
3629
|
|
|
3630
3630
|
let Minimatch$1 = class Minimatch {
|
|
3631
3631
|
constructor (pattern, options) {
|
|
@@ -3711,7 +3711,7 @@ let Minimatch$1 = class Minimatch {
|
|
|
3711
3711
|
negateOffset++;
|
|
3712
3712
|
}
|
|
3713
3713
|
|
|
3714
|
-
if (negateOffset) this.pattern = pattern.
|
|
3714
|
+
if (negateOffset) this.pattern = pattern.slice(negateOffset);
|
|
3715
3715
|
this.negate = negate;
|
|
3716
3716
|
}
|
|
3717
3717
|
|
|
@@ -3893,7 +3893,7 @@ let Minimatch$1 = class Minimatch {
|
|
|
3893
3893
|
if (pattern === '') return ''
|
|
3894
3894
|
|
|
3895
3895
|
let re = '';
|
|
3896
|
-
let hasMagic =
|
|
3896
|
+
let hasMagic = false;
|
|
3897
3897
|
let escaping = false;
|
|
3898
3898
|
// ? => one single character
|
|
3899
3899
|
const patternListStack = [];
|
|
@@ -3906,11 +3906,23 @@ let Minimatch$1 = class Minimatch {
|
|
|
3906
3906
|
let pl;
|
|
3907
3907
|
let sp;
|
|
3908
3908
|
// . and .. never match anything that doesn't start with .,
|
|
3909
|
-
// even when options.dot is set.
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3909
|
+
// even when options.dot is set. However, if the pattern
|
|
3910
|
+
// starts with ., then traversal patterns can match.
|
|
3911
|
+
let dotTravAllowed = pattern.charAt(0) === '.';
|
|
3912
|
+
let dotFileAllowed = options.dot || dotTravAllowed;
|
|
3913
|
+
const patternStart = () =>
|
|
3914
|
+
dotTravAllowed
|
|
3915
|
+
? ''
|
|
3916
|
+
: dotFileAllowed
|
|
3917
|
+
? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))'
|
|
3918
|
+
: '(?!\\.)';
|
|
3919
|
+
const subPatternStart = (p) =>
|
|
3920
|
+
p.charAt(0) === '.'
|
|
3921
|
+
? ''
|
|
3922
|
+
: options.dot
|
|
3923
|
+
? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))'
|
|
3924
|
+
: '(?!\\.)';
|
|
3925
|
+
|
|
3914
3926
|
|
|
3915
3927
|
const clearStateChar = () => {
|
|
3916
3928
|
if (stateChar) {
|
|
@@ -3960,6 +3972,11 @@ let Minimatch$1 = class Minimatch {
|
|
|
3960
3972
|
}
|
|
3961
3973
|
|
|
3962
3974
|
case '\\':
|
|
3975
|
+
if (inClass && pattern.charAt(i + 1) === '-') {
|
|
3976
|
+
re += c;
|
|
3977
|
+
continue
|
|
3978
|
+
}
|
|
3979
|
+
|
|
3963
3980
|
clearStateChar();
|
|
3964
3981
|
escaping = true;
|
|
3965
3982
|
continue
|
|
@@ -3994,7 +4011,7 @@ let Minimatch$1 = class Minimatch {
|
|
|
3994
4011
|
if (options.noext) clearStateChar();
|
|
3995
4012
|
continue
|
|
3996
4013
|
|
|
3997
|
-
case '(':
|
|
4014
|
+
case '(': {
|
|
3998
4015
|
if (inClass) {
|
|
3999
4016
|
re += '(';
|
|
4000
4017
|
continue
|
|
@@ -4005,46 +4022,64 @@ let Minimatch$1 = class Minimatch {
|
|
|
4005
4022
|
continue
|
|
4006
4023
|
}
|
|
4007
4024
|
|
|
4008
|
-
|
|
4025
|
+
const plEntry = {
|
|
4009
4026
|
type: stateChar,
|
|
4010
4027
|
start: i - 1,
|
|
4011
4028
|
reStart: re.length,
|
|
4012
4029
|
open: plTypes[stateChar].open,
|
|
4013
|
-
close: plTypes[stateChar].close
|
|
4014
|
-
}
|
|
4015
|
-
|
|
4016
|
-
|
|
4030
|
+
close: plTypes[stateChar].close,
|
|
4031
|
+
};
|
|
4032
|
+
this.debug(this.pattern, '\t', plEntry);
|
|
4033
|
+
patternListStack.push(plEntry);
|
|
4034
|
+
// negation is (?:(?!(?:js)(?:<rest>))[^/]*)
|
|
4035
|
+
re += plEntry.open;
|
|
4036
|
+
// next entry starts with a dot maybe?
|
|
4037
|
+
if (plEntry.start === 0 && plEntry.type !== '!') {
|
|
4038
|
+
dotTravAllowed = true;
|
|
4039
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
4040
|
+
}
|
|
4017
4041
|
this.debug('plType %j %j', stateChar, re);
|
|
4018
4042
|
stateChar = false;
|
|
4019
|
-
|
|
4043
|
+
continue
|
|
4044
|
+
}
|
|
4020
4045
|
|
|
4021
|
-
case ')':
|
|
4022
|
-
|
|
4046
|
+
case ')': {
|
|
4047
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
4048
|
+
if (inClass || !plEntry) {
|
|
4023
4049
|
re += '\\)';
|
|
4024
4050
|
continue
|
|
4025
4051
|
}
|
|
4052
|
+
patternListStack.pop();
|
|
4026
4053
|
|
|
4054
|
+
// closing an extglob
|
|
4027
4055
|
clearStateChar();
|
|
4028
4056
|
hasMagic = true;
|
|
4029
|
-
pl =
|
|
4057
|
+
pl = plEntry;
|
|
4030
4058
|
// negation is (?:(?!js)[^/]*)
|
|
4031
4059
|
// The others are (?:<pattern>)<type>
|
|
4032
4060
|
re += pl.close;
|
|
4033
4061
|
if (pl.type === '!') {
|
|
4034
|
-
negativeLists.push(pl);
|
|
4062
|
+
negativeLists.push(Object.assign(pl, { reEnd: re.length }));
|
|
4035
4063
|
}
|
|
4036
|
-
|
|
4037
|
-
|
|
4064
|
+
continue
|
|
4065
|
+
}
|
|
4038
4066
|
|
|
4039
|
-
case '|':
|
|
4040
|
-
|
|
4067
|
+
case '|': {
|
|
4068
|
+
const plEntry = patternListStack[patternListStack.length - 1];
|
|
4069
|
+
if (inClass || !plEntry) {
|
|
4041
4070
|
re += '\\|';
|
|
4042
4071
|
continue
|
|
4043
4072
|
}
|
|
4044
4073
|
|
|
4045
4074
|
clearStateChar();
|
|
4046
4075
|
re += '|';
|
|
4047
|
-
|
|
4076
|
+
// next subpattern can start with a dot?
|
|
4077
|
+
if (plEntry.start === 0 && plEntry.type !== '!') {
|
|
4078
|
+
dotTravAllowed = true;
|
|
4079
|
+
re += subPatternStart(pattern.slice(i + 1));
|
|
4080
|
+
}
|
|
4081
|
+
continue
|
|
4082
|
+
}
|
|
4048
4083
|
|
|
4049
4084
|
// these are mostly the same in regexp and glob
|
|
4050
4085
|
case '[':
|
|
@@ -4072,8 +4107,6 @@ let Minimatch$1 = class Minimatch {
|
|
|
4072
4107
|
continue
|
|
4073
4108
|
}
|
|
4074
4109
|
|
|
4075
|
-
// handle the case where we left a class open.
|
|
4076
|
-
// "[z-a]" is valid, equivalent to "\[z-a\]"
|
|
4077
4110
|
// split where the last [ was, make sure we don't have
|
|
4078
4111
|
// an invalid re. if so, re-walk the contents of the
|
|
4079
4112
|
// would-be class to re-translate any characters that
|
|
@@ -4082,11 +4115,17 @@ let Minimatch$1 = class Minimatch {
|
|
|
4082
4115
|
// without a try/catch and a new RegExp, but it's tricky
|
|
4083
4116
|
// to do safely. For now, this is safe and works.
|
|
4084
4117
|
cs = pattern.substring(classStart + 1, i);
|
|
4085
|
-
|
|
4086
|
-
|
|
4118
|
+
try {
|
|
4119
|
+
RegExp('[' + braExpEscape(charUnescape(cs)) + ']');
|
|
4120
|
+
// looks good, finish up the class.
|
|
4121
|
+
re += c;
|
|
4122
|
+
} catch (er) {
|
|
4123
|
+
// out of order ranges in JS are errors, but in glob syntax,
|
|
4124
|
+
// they're just a range that matches nothing.
|
|
4125
|
+
re = re.substring(0, reClassStart) + '(?:$.)'; // match nothing ever
|
|
4126
|
+
}
|
|
4087
4127
|
hasMagic = true;
|
|
4088
4128
|
inClass = false;
|
|
4089
|
-
re += c;
|
|
4090
4129
|
continue
|
|
4091
4130
|
|
|
4092
4131
|
default:
|
|
@@ -4110,9 +4149,9 @@ let Minimatch$1 = class Minimatch {
|
|
|
4110
4149
|
// this is a huge pita. We now have to re-walk
|
|
4111
4150
|
// the contents of the would-be class to re-translate
|
|
4112
4151
|
// any characters that were passed through as-is
|
|
4113
|
-
cs = pattern.
|
|
4152
|
+
cs = pattern.slice(classStart + 1);
|
|
4114
4153
|
sp = this.parse(cs, SUBPARSE);
|
|
4115
|
-
re = re.
|
|
4154
|
+
re = re.substring(0, reClassStart) + '\\[' + sp[0];
|
|
4116
4155
|
hasMagic = hasMagic || sp[1];
|
|
4117
4156
|
}
|
|
4118
4157
|
|
|
@@ -4179,14 +4218,16 @@ let Minimatch$1 = class Minimatch {
|
|
|
4179
4218
|
// Handle nested stuff like *(*.js|!(*.json)), where open parens
|
|
4180
4219
|
// mean that we should *not* include the ) in the bit that is considered
|
|
4181
4220
|
// "after" the negated section.
|
|
4182
|
-
const
|
|
4221
|
+
const closeParensBefore = nlBefore.split(')').length;
|
|
4222
|
+
const openParensBefore = nlBefore.split('(').length - closeParensBefore;
|
|
4183
4223
|
let cleanAfter = nlAfter;
|
|
4184
4224
|
for (let i = 0; i < openParensBefore; i++) {
|
|
4185
4225
|
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
|
|
4186
4226
|
}
|
|
4187
4227
|
nlAfter = cleanAfter;
|
|
4188
4228
|
|
|
4189
|
-
const dollar = nlAfter === '' && isSub !== SUBPARSE ? '
|
|
4229
|
+
const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : '';
|
|
4230
|
+
|
|
4190
4231
|
re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
|
|
4191
4232
|
}
|
|
4192
4233
|
|
|
@@ -4198,7 +4239,7 @@ let Minimatch$1 = class Minimatch {
|
|
|
4198
4239
|
}
|
|
4199
4240
|
|
|
4200
4241
|
if (addPatternStart) {
|
|
4201
|
-
re = patternStart + re;
|
|
4242
|
+
re = patternStart() + re;
|
|
4202
4243
|
}
|
|
4203
4244
|
|
|
4204
4245
|
// parsing just a piece of a larger pattern.
|
|
@@ -4206,6 +4247,11 @@ let Minimatch$1 = class Minimatch {
|
|
|
4206
4247
|
return [re, hasMagic]
|
|
4207
4248
|
}
|
|
4208
4249
|
|
|
4250
|
+
// if it's nocase, and the lcase/uppercase don't match, it's magic
|
|
4251
|
+
if (options.nocase && !hasMagic) {
|
|
4252
|
+
hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4209
4255
|
// skip the regexp for non-magical patterns
|
|
4210
4256
|
// unescape anything in it, though, so that it'll be
|
|
4211
4257
|
// an exact match against a file etc.
|
|
@@ -4475,6 +4521,12 @@ function setopts (self, pattern, options) {
|
|
|
4475
4521
|
pattern = "**/" + pattern;
|
|
4476
4522
|
}
|
|
4477
4523
|
|
|
4524
|
+
self.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||
|
|
4525
|
+
options.allowWindowsEscape === false;
|
|
4526
|
+
if (self.windowsPathsNoEscape) {
|
|
4527
|
+
pattern = pattern.replace(/\\/g, '/');
|
|
4528
|
+
}
|
|
4529
|
+
|
|
4478
4530
|
self.silent = !!options.silent;
|
|
4479
4531
|
self.pattern = pattern;
|
|
4480
4532
|
self.strict = options.strict !== false;
|
|
@@ -4530,8 +4582,6 @@ function setopts (self, pattern, options) {
|
|
|
4530
4582
|
// Note that they are not supported in Glob itself anyway.
|
|
4531
4583
|
options.nonegate = true;
|
|
4532
4584
|
options.nocomment = true;
|
|
4533
|
-
// always treat \ in patterns as escapes, not path separators
|
|
4534
|
-
options.allowWindowsEscape = true;
|
|
4535
4585
|
|
|
4536
4586
|
self.minimatch = new Minimatch(pattern, options);
|
|
4537
4587
|
self.options = self.minimatch.options;
|
|
@@ -6079,15 +6129,15 @@ function requireGlob () {
|
|
|
6079
6129
|
var globExports = requireGlob();
|
|
6080
6130
|
var glob$1 = /*@__PURE__*/getDefaultExportFromCjs(globExports);
|
|
6081
6131
|
|
|
6082
|
-
const comma
|
|
6132
|
+
const comma = ','.charCodeAt(0);
|
|
6083
6133
|
const semicolon = ';'.charCodeAt(0);
|
|
6084
|
-
const chars$
|
|
6085
|
-
const intToChar
|
|
6086
|
-
const charToInt
|
|
6087
|
-
for (let i = 0; i < chars$
|
|
6088
|
-
const c = chars$
|
|
6089
|
-
intToChar
|
|
6090
|
-
charToInt
|
|
6134
|
+
const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
6135
|
+
const intToChar = new Uint8Array(64); // 64 possible chars.
|
|
6136
|
+
const charToInt = new Uint8Array(128); // z is 122 in ASCII
|
|
6137
|
+
for (let i = 0; i < chars$1.length; i++) {
|
|
6138
|
+
const c = chars$1.charCodeAt(i);
|
|
6139
|
+
intToChar[i] = c;
|
|
6140
|
+
charToInt[c] = i;
|
|
6091
6141
|
}
|
|
6092
6142
|
// Provide a fallback for older environments.
|
|
6093
6143
|
const td = typeof TextDecoder !== 'undefined'
|
|
@@ -6108,6 +6158,80 @@ const td = typeof TextDecoder !== 'undefined'
|
|
|
6108
6158
|
return out;
|
|
6109
6159
|
},
|
|
6110
6160
|
};
|
|
6161
|
+
function decode(mappings) {
|
|
6162
|
+
const state = new Int32Array(5);
|
|
6163
|
+
const decoded = [];
|
|
6164
|
+
let index = 0;
|
|
6165
|
+
do {
|
|
6166
|
+
const semi = indexOf(mappings, index);
|
|
6167
|
+
const line = [];
|
|
6168
|
+
let sorted = true;
|
|
6169
|
+
let lastCol = 0;
|
|
6170
|
+
state[0] = 0;
|
|
6171
|
+
for (let i = index; i < semi; i++) {
|
|
6172
|
+
let seg;
|
|
6173
|
+
i = decodeInteger(mappings, i, state, 0); // genColumn
|
|
6174
|
+
const col = state[0];
|
|
6175
|
+
if (col < lastCol)
|
|
6176
|
+
sorted = false;
|
|
6177
|
+
lastCol = col;
|
|
6178
|
+
if (hasMoreVlq(mappings, i, semi)) {
|
|
6179
|
+
i = decodeInteger(mappings, i, state, 1); // sourcesIndex
|
|
6180
|
+
i = decodeInteger(mappings, i, state, 2); // sourceLine
|
|
6181
|
+
i = decodeInteger(mappings, i, state, 3); // sourceColumn
|
|
6182
|
+
if (hasMoreVlq(mappings, i, semi)) {
|
|
6183
|
+
i = decodeInteger(mappings, i, state, 4); // namesIndex
|
|
6184
|
+
seg = [col, state[1], state[2], state[3], state[4]];
|
|
6185
|
+
}
|
|
6186
|
+
else {
|
|
6187
|
+
seg = [col, state[1], state[2], state[3]];
|
|
6188
|
+
}
|
|
6189
|
+
}
|
|
6190
|
+
else {
|
|
6191
|
+
seg = [col];
|
|
6192
|
+
}
|
|
6193
|
+
line.push(seg);
|
|
6194
|
+
}
|
|
6195
|
+
if (!sorted)
|
|
6196
|
+
sort(line);
|
|
6197
|
+
decoded.push(line);
|
|
6198
|
+
index = semi + 1;
|
|
6199
|
+
} while (index <= mappings.length);
|
|
6200
|
+
return decoded;
|
|
6201
|
+
}
|
|
6202
|
+
function indexOf(mappings, index) {
|
|
6203
|
+
const idx = mappings.indexOf(';', index);
|
|
6204
|
+
return idx === -1 ? mappings.length : idx;
|
|
6205
|
+
}
|
|
6206
|
+
function decodeInteger(mappings, pos, state, j) {
|
|
6207
|
+
let value = 0;
|
|
6208
|
+
let shift = 0;
|
|
6209
|
+
let integer = 0;
|
|
6210
|
+
do {
|
|
6211
|
+
const c = mappings.charCodeAt(pos++);
|
|
6212
|
+
integer = charToInt[c];
|
|
6213
|
+
value |= (integer & 31) << shift;
|
|
6214
|
+
shift += 5;
|
|
6215
|
+
} while (integer & 32);
|
|
6216
|
+
const shouldNegate = value & 1;
|
|
6217
|
+
value >>>= 1;
|
|
6218
|
+
if (shouldNegate) {
|
|
6219
|
+
value = -0x80000000 | -value;
|
|
6220
|
+
}
|
|
6221
|
+
state[j] += value;
|
|
6222
|
+
return pos;
|
|
6223
|
+
}
|
|
6224
|
+
function hasMoreVlq(mappings, i, length) {
|
|
6225
|
+
if (i >= length)
|
|
6226
|
+
return false;
|
|
6227
|
+
return mappings.charCodeAt(i) !== comma;
|
|
6228
|
+
}
|
|
6229
|
+
function sort(line) {
|
|
6230
|
+
line.sort(sortComparator$1);
|
|
6231
|
+
}
|
|
6232
|
+
function sortComparator$1(a, b) {
|
|
6233
|
+
return a[0] - b[0];
|
|
6234
|
+
}
|
|
6111
6235
|
function encode$1(decoded) {
|
|
6112
6236
|
const state = new Int32Array(5);
|
|
6113
6237
|
const bufLength = 1024 * 16;
|
|
@@ -6138,7 +6262,7 @@ function encode$1(decoded) {
|
|
|
6138
6262
|
pos -= subLength;
|
|
6139
6263
|
}
|
|
6140
6264
|
if (j > 0)
|
|
6141
|
-
buf[pos++] = comma
|
|
6265
|
+
buf[pos++] = comma;
|
|
6142
6266
|
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
|
|
6143
6267
|
if (segment.length === 1)
|
|
6144
6268
|
continue;
|
|
@@ -6162,7 +6286,7 @@ function encodeInteger(buf, pos, state, segment, j) {
|
|
|
6162
6286
|
num >>>= 5;
|
|
6163
6287
|
if (num > 0)
|
|
6164
6288
|
clamped |= 0b100000;
|
|
6165
|
-
buf[pos++] = intToChar
|
|
6289
|
+
buf[pos++] = intToChar[clamped];
|
|
6166
6290
|
} while (num > 0);
|
|
6167
6291
|
return pos;
|
|
6168
6292
|
}
|
|
@@ -7336,7 +7460,7 @@ function isReference(node, parent) {
|
|
|
7336
7460
|
return false;
|
|
7337
7461
|
}
|
|
7338
7462
|
|
|
7339
|
-
var version$3 = "25.0.
|
|
7463
|
+
var version$3 = "25.0.4";
|
|
7340
7464
|
var peerDependencies = {
|
|
7341
7465
|
rollup: "^2.68.0||^3.0.0"
|
|
7342
7466
|
};
|
|
@@ -9591,90 +9715,6 @@ function commonjs(options = {}) {
|
|
|
9591
9715
|
};
|
|
9592
9716
|
}
|
|
9593
9717
|
|
|
9594
|
-
const comma = ','.charCodeAt(0);
|
|
9595
|
-
const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
9596
|
-
const intToChar = new Uint8Array(64); // 64 possible chars.
|
|
9597
|
-
const charToInt = new Uint8Array(128); // z is 122 in ASCII
|
|
9598
|
-
for (let i = 0; i < chars$1.length; i++) {
|
|
9599
|
-
const c = chars$1.charCodeAt(i);
|
|
9600
|
-
intToChar[i] = c;
|
|
9601
|
-
charToInt[c] = i;
|
|
9602
|
-
}
|
|
9603
|
-
function decode(mappings) {
|
|
9604
|
-
const state = new Int32Array(5);
|
|
9605
|
-
const decoded = [];
|
|
9606
|
-
let index = 0;
|
|
9607
|
-
do {
|
|
9608
|
-
const semi = indexOf(mappings, index);
|
|
9609
|
-
const line = [];
|
|
9610
|
-
let sorted = true;
|
|
9611
|
-
let lastCol = 0;
|
|
9612
|
-
state[0] = 0;
|
|
9613
|
-
for (let i = index; i < semi; i++) {
|
|
9614
|
-
let seg;
|
|
9615
|
-
i = decodeInteger(mappings, i, state, 0); // genColumn
|
|
9616
|
-
const col = state[0];
|
|
9617
|
-
if (col < lastCol)
|
|
9618
|
-
sorted = false;
|
|
9619
|
-
lastCol = col;
|
|
9620
|
-
if (hasMoreVlq(mappings, i, semi)) {
|
|
9621
|
-
i = decodeInteger(mappings, i, state, 1); // sourcesIndex
|
|
9622
|
-
i = decodeInteger(mappings, i, state, 2); // sourceLine
|
|
9623
|
-
i = decodeInteger(mappings, i, state, 3); // sourceColumn
|
|
9624
|
-
if (hasMoreVlq(mappings, i, semi)) {
|
|
9625
|
-
i = decodeInteger(mappings, i, state, 4); // namesIndex
|
|
9626
|
-
seg = [col, state[1], state[2], state[3], state[4]];
|
|
9627
|
-
}
|
|
9628
|
-
else {
|
|
9629
|
-
seg = [col, state[1], state[2], state[3]];
|
|
9630
|
-
}
|
|
9631
|
-
}
|
|
9632
|
-
else {
|
|
9633
|
-
seg = [col];
|
|
9634
|
-
}
|
|
9635
|
-
line.push(seg);
|
|
9636
|
-
}
|
|
9637
|
-
if (!sorted)
|
|
9638
|
-
sort(line);
|
|
9639
|
-
decoded.push(line);
|
|
9640
|
-
index = semi + 1;
|
|
9641
|
-
} while (index <= mappings.length);
|
|
9642
|
-
return decoded;
|
|
9643
|
-
}
|
|
9644
|
-
function indexOf(mappings, index) {
|
|
9645
|
-
const idx = mappings.indexOf(';', index);
|
|
9646
|
-
return idx === -1 ? mappings.length : idx;
|
|
9647
|
-
}
|
|
9648
|
-
function decodeInteger(mappings, pos, state, j) {
|
|
9649
|
-
let value = 0;
|
|
9650
|
-
let shift = 0;
|
|
9651
|
-
let integer = 0;
|
|
9652
|
-
do {
|
|
9653
|
-
const c = mappings.charCodeAt(pos++);
|
|
9654
|
-
integer = charToInt[c];
|
|
9655
|
-
value |= (integer & 31) << shift;
|
|
9656
|
-
shift += 5;
|
|
9657
|
-
} while (integer & 32);
|
|
9658
|
-
const shouldNegate = value & 1;
|
|
9659
|
-
value >>>= 1;
|
|
9660
|
-
if (shouldNegate) {
|
|
9661
|
-
value = -0x80000000 | -value;
|
|
9662
|
-
}
|
|
9663
|
-
state[j] += value;
|
|
9664
|
-
return pos;
|
|
9665
|
-
}
|
|
9666
|
-
function hasMoreVlq(mappings, i, length) {
|
|
9667
|
-
if (i >= length)
|
|
9668
|
-
return false;
|
|
9669
|
-
return mappings.charCodeAt(i) !== comma;
|
|
9670
|
-
}
|
|
9671
|
-
function sort(line) {
|
|
9672
|
-
line.sort(sortComparator$1);
|
|
9673
|
-
}
|
|
9674
|
-
function sortComparator$1(a, b) {
|
|
9675
|
-
return a[0] - b[0];
|
|
9676
|
-
}
|
|
9677
|
-
|
|
9678
9718
|
// Matches the scheme of a URL, eg "http://"
|
|
9679
9719
|
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
9680
9720
|
/**
|
|
@@ -11620,16 +11660,16 @@ function findNearestPackageData(basedir, packageCache) {
|
|
|
11620
11660
|
return cached;
|
|
11621
11661
|
}
|
|
11622
11662
|
const pkgPath = path$o.join(basedir, 'package.json');
|
|
11623
|
-
|
|
11624
|
-
|
|
11663
|
+
if (tryStatSync(pkgPath)?.isFile()) {
|
|
11664
|
+
try {
|
|
11625
11665
|
const pkgData = loadPackageData(pkgPath);
|
|
11626
11666
|
if (packageCache) {
|
|
11627
11667
|
setFnpdCache(packageCache, pkgData, basedir, originalBasedir);
|
|
11628
11668
|
}
|
|
11629
11669
|
return pkgData;
|
|
11630
11670
|
}
|
|
11671
|
+
catch { }
|
|
11631
11672
|
}
|
|
11632
|
-
catch { }
|
|
11633
11673
|
const nextBasedir = path$o.dirname(basedir);
|
|
11634
11674
|
if (nextBasedir === basedir)
|
|
11635
11675
|
break;
|
|
@@ -11834,28 +11874,26 @@ const flattenId = (id) => id
|
|
|
11834
11874
|
.replace(replaceNestedIdRE, '___')
|
|
11835
11875
|
.replace(replaceHashRE, '____');
|
|
11836
11876
|
const normalizeId = (id) => id.replace(replaceNestedIdRE, ' > ');
|
|
11837
|
-
//
|
|
11838
|
-
const builtins = new Set([
|
|
11839
|
-
...builtinModules,
|
|
11840
|
-
'assert/strict',
|
|
11841
|
-
'diagnostics_channel',
|
|
11842
|
-
'dns/promises',
|
|
11843
|
-
'fs/promises',
|
|
11844
|
-
'path/posix',
|
|
11845
|
-
'path/win32',
|
|
11846
|
-
'readline/promises',
|
|
11847
|
-
'stream/consumers',
|
|
11848
|
-
'stream/promises',
|
|
11849
|
-
'stream/web',
|
|
11850
|
-
'timers/promises',
|
|
11851
|
-
'util/types',
|
|
11852
|
-
'wasi',
|
|
11853
|
-
]);
|
|
11877
|
+
// Supported by Node, Deno, Bun
|
|
11854
11878
|
const NODE_BUILTIN_NAMESPACE = 'node:';
|
|
11879
|
+
// Supported by Deno
|
|
11880
|
+
const NPM_BUILTIN_NAMESPACE = 'npm:';
|
|
11881
|
+
// Supported by Bun
|
|
11882
|
+
const BUN_BUILTIN_NAMESPACE = 'bun:';
|
|
11883
|
+
// Some runtimes like Bun injects namespaced modules here, which is not a node builtin
|
|
11884
|
+
const nodeBuiltins = builtinModules.filter((id) => !id.includes(':'));
|
|
11885
|
+
// TODO: Use `isBuiltin` from `node:module`, but Deno doesn't support it
|
|
11855
11886
|
function isBuiltin(id) {
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11887
|
+
if (process.versions.deno && id.startsWith(NPM_BUILTIN_NAMESPACE))
|
|
11888
|
+
return true;
|
|
11889
|
+
if (process.versions.bun && id.startsWith(BUN_BUILTIN_NAMESPACE))
|
|
11890
|
+
return true;
|
|
11891
|
+
return isNodeBuiltin(id);
|
|
11892
|
+
}
|
|
11893
|
+
function isNodeBuiltin(id) {
|
|
11894
|
+
if (id.startsWith(NODE_BUILTIN_NAMESPACE))
|
|
11895
|
+
return true;
|
|
11896
|
+
return nodeBuiltins.includes(id);
|
|
11859
11897
|
}
|
|
11860
11898
|
function isInNodeModules$1(id) {
|
|
11861
11899
|
return id.includes('node_modules');
|
|
@@ -11871,7 +11909,7 @@ function isOptimizable(id, optimizeDeps) {
|
|
|
11871
11909
|
const bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/;
|
|
11872
11910
|
const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//;
|
|
11873
11911
|
// TODO: use import()
|
|
11874
|
-
const _require$
|
|
11912
|
+
const _require$2 = createRequire$1(import.meta.url);
|
|
11875
11913
|
// set in bin/vite.js
|
|
11876
11914
|
const filter = process.env.VITE_DEBUG_FILTER;
|
|
11877
11915
|
const DEBUG = process.env.DEBUG;
|
|
@@ -12061,6 +12099,7 @@ function isDefined(value) {
|
|
|
12061
12099
|
}
|
|
12062
12100
|
function tryStatSync(file) {
|
|
12063
12101
|
try {
|
|
12102
|
+
// The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
|
|
12064
12103
|
return fs$l.statSync(file, { throwIfNoEntry: false });
|
|
12065
12104
|
}
|
|
12066
12105
|
catch {
|
|
@@ -12152,11 +12191,10 @@ function generateCodeFrame(source, start = 0, end) {
|
|
|
12152
12191
|
return res.join('\n');
|
|
12153
12192
|
}
|
|
12154
12193
|
function isFileReadable(filename) {
|
|
12194
|
+
if (!tryStatSync(filename)) {
|
|
12195
|
+
return false;
|
|
12196
|
+
}
|
|
12155
12197
|
try {
|
|
12156
|
-
// The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
|
|
12157
|
-
if (!fs$l.statSync(filename, { throwIfNoEntry: false })) {
|
|
12158
|
-
return false;
|
|
12159
|
-
}
|
|
12160
12198
|
// Check if current process has read permission to the file
|
|
12161
12199
|
fs$l.accessSync(filename, fs$l.constants.R_OK);
|
|
12162
12200
|
return true;
|
|
@@ -12253,9 +12291,9 @@ function windowsSafeRealPathSync(path) {
|
|
|
12253
12291
|
return fs$l.realpathSync(path);
|
|
12254
12292
|
}
|
|
12255
12293
|
function optimizeSafeRealPathSync() {
|
|
12256
|
-
// Skip if using Node <
|
|
12294
|
+
// Skip if using Node <18.10 due to MAX_PATH issue: https://github.com/vitejs/vite/issues/12931
|
|
12257
12295
|
const nodeVersion = process.versions.node.split('.').map(Number);
|
|
12258
|
-
if (nodeVersion[0] <
|
|
12296
|
+
if (nodeVersion[0] < 18 || (nodeVersion[0] === 18 && nodeVersion[1] < 10)) {
|
|
12259
12297
|
safeRealpathSync = fs$l.realpathSync;
|
|
12260
12298
|
return;
|
|
12261
12299
|
}
|
|
@@ -12540,7 +12578,7 @@ const usingDynamicImport = typeof jest === 'undefined';
|
|
|
12540
12578
|
*/
|
|
12541
12579
|
const dynamicImport = usingDynamicImport
|
|
12542
12580
|
? new Function('file', 'return import(file)')
|
|
12543
|
-
: _require$
|
|
12581
|
+
: _require$2;
|
|
12544
12582
|
function parseRequest(id) {
|
|
12545
12583
|
const [_, search] = id.split(requestQuerySplitRE, 2);
|
|
12546
12584
|
if (!search) {
|
|
@@ -12565,7 +12603,7 @@ const requireResolveFromRootWithFallback = (root, id) => {
|
|
|
12565
12603
|
}
|
|
12566
12604
|
// actually resolve
|
|
12567
12605
|
// Search in the root directory first, and fallback to the default require paths.
|
|
12568
|
-
return _require$
|
|
12606
|
+
return _require$2.resolve(id, { paths: [root, _dirname] });
|
|
12569
12607
|
};
|
|
12570
12608
|
function emptyCssComments(raw) {
|
|
12571
12609
|
return raw.replace(multilineCommentsRE$1, (s) => ' '.repeat(s.length));
|
|
@@ -14683,11 +14721,14 @@ const loadTerserPath = (root) => {
|
|
|
14683
14721
|
return terserPath;
|
|
14684
14722
|
};
|
|
14685
14723
|
function terserPlugin(config) {
|
|
14724
|
+
const { maxWorkers, ...terserOptions } = config.build.terserOptions;
|
|
14686
14725
|
const makeWorker = () => new Worker_1(async (terserPath, code, options) => {
|
|
14687
14726
|
// test fails when using `import`. maybe related: https://github.com/nodejs/node/issues/43205
|
|
14688
14727
|
// eslint-disable-next-line no-restricted-globals -- this function runs inside cjs
|
|
14689
14728
|
const terser = require(terserPath);
|
|
14690
14729
|
return terser.minify(code, options);
|
|
14730
|
+
}, {
|
|
14731
|
+
max: maxWorkers,
|
|
14691
14732
|
});
|
|
14692
14733
|
let worker;
|
|
14693
14734
|
return {
|
|
@@ -14711,7 +14752,7 @@ function terserPlugin(config) {
|
|
|
14711
14752
|
const terserPath = loadTerserPath(config.root);
|
|
14712
14753
|
const res = await worker.run(terserPath, code, {
|
|
14713
14754
|
safari10: true,
|
|
14714
|
-
...
|
|
14755
|
+
...terserOptions,
|
|
14715
14756
|
sourceMap: !!outputOptions.sourcemap,
|
|
14716
14757
|
module: outputOptions.format.startsWith('es'),
|
|
14717
14758
|
toplevel: outputOptions.format === 'cjs',
|
|
@@ -15337,6 +15378,13 @@ class Chunk {
|
|
|
15337
15378
|
this.end = index;
|
|
15338
15379
|
|
|
15339
15380
|
if (this.edited) {
|
|
15381
|
+
// after split we should save the edit content record into the correct chunk
|
|
15382
|
+
// to make sure sourcemap correct
|
|
15383
|
+
// For example:
|
|
15384
|
+
// ' test'.trim()
|
|
15385
|
+
// split -> ' ' + 'test'
|
|
15386
|
+
// ✔️ edit -> '' + 'test'
|
|
15387
|
+
// ✖️ edit -> 'test' + ''
|
|
15340
15388
|
// TODO is this block necessary?...
|
|
15341
15389
|
newChunk.edit('', false);
|
|
15342
15390
|
this.content = '';
|
|
@@ -15365,6 +15413,10 @@ class Chunk {
|
|
|
15365
15413
|
if (trimmed.length) {
|
|
15366
15414
|
if (trimmed !== this.content) {
|
|
15367
15415
|
this.split(this.start + trimmed.length).edit('', undefined, true);
|
|
15416
|
+
if (this.edited) {
|
|
15417
|
+
// save the change, if it has been edited
|
|
15418
|
+
this.edit(trimmed, this.storeName, true);
|
|
15419
|
+
}
|
|
15368
15420
|
}
|
|
15369
15421
|
return true;
|
|
15370
15422
|
} else {
|
|
@@ -15383,7 +15435,11 @@ class Chunk {
|
|
|
15383
15435
|
|
|
15384
15436
|
if (trimmed.length) {
|
|
15385
15437
|
if (trimmed !== this.content) {
|
|
15386
|
-
this.split(this.end - trimmed.length);
|
|
15438
|
+
const newChunk = this.split(this.end - trimmed.length);
|
|
15439
|
+
if (this.edited) {
|
|
15440
|
+
// save the change, if it has been edited
|
|
15441
|
+
newChunk.edit(trimmed, this.storeName, true);
|
|
15442
|
+
}
|
|
15387
15443
|
this.edit('', undefined, true);
|
|
15388
15444
|
}
|
|
15389
15445
|
return true;
|
|
@@ -16773,7 +16829,7 @@ function manifestPlugin(config) {
|
|
|
16773
16829
|
this.emitFile({
|
|
16774
16830
|
fileName: typeof config.build.manifest === 'string'
|
|
16775
16831
|
? config.build.manifest
|
|
16776
|
-
: 'manifest.json',
|
|
16832
|
+
: '.vite/manifest.json',
|
|
16777
16833
|
type: 'asset',
|
|
16778
16834
|
source: jsonStableStringify$1(manifest, { space: 2 }),
|
|
16779
16835
|
});
|
|
@@ -16830,8 +16886,8 @@ function dataURIPlugin() {
|
|
|
16830
16886
|
};
|
|
16831
16887
|
}
|
|
16832
16888
|
|
|
16833
|
-
/* es-module-lexer 1.3.
|
|
16834
|
-
const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse$e(E,g="@"){if(!C)return init.then((()=>parse$e(E)));const I=E.length+1,o=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;o>0&&C.memory.grow(Math.ceil(o/65536));const D=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,D,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const K=[],k=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.ai(),g=C.id(),I=C.ss(),o=C.se();let D;C.ip()&&(D=J(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),K.push({n:D,s:A,e:Q,ss:I,se:o,d:g,a:B});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),o=I[0],D=B<0?void 0:E.slice(B,g),K=D?D[0]:"";k.push({s:A,e:Q,ls:B,le:g,n:'"'===o||"'"===o?J(I):I,ln:'"'===K||"'"===K?J(D):D});}function J(A){try{return (0, eval)(A)}catch(A){}}return [K,k,!!C.f()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++);}let C;const init=WebAssembly.compile((E="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMvLgABAQICAgICAgICAgICAgICAgIAAwMDBAQAAAADAAAAAAMDAAUGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUGw8gALfwBBsPIACwdwEwZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAmFpAAgCaWQACQJpcAAKAmVzAAsCZWUADANlbHMADQNlbGUADgJyaQAPAnJlABABZgARBXBhcnNlABILX19oZWFwX2Jhc2UDAQqsPS5oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2AvgJQQAgADYC/AlBAEEANgLUCUEAQQA2AuQJQQBBADYC3AlBAEEANgLYCUEAQQA2AuwJQQBBADYC4AkgAQufAQEDf0EAKALkCSEEQQBBACgC/AkiBTYC5AlBACAENgLoCUEAIAVBIGo2AvwJIARBHGpB1AkgBBsgBTYCAEEAKALICSEEQQAoAsQJIQYgBSABNgIAIAUgADYCCCAFIAIgAkECakEAIAYgA0YbIAQgA0YbNgIMIAUgAzYCFCAFQQA2AhAgBSACNgIEIAVBADYCHCAFQQAoAsQJIANGOgAYC1YBAX9BACgC7AkiBEEQakHYCSAEG0EAKAL8CSIENgIAQQAgBDYC7AlBACAEQRRqNgL8CSAEQQA2AhAgBCADNgIMIAQgAjYCCCAEIAE2AgQgBCAANgIACwgAQQAoAoAKCxUAQQAoAtwJKAIAQQAoAtAJa0EBdQseAQF/QQAoAtwJKAIEIgBBACgC0AlrQQF1QX8gABsLFQBBACgC3AkoAghBACgC0AlrQQF1Cx4BAX9BACgC3AkoA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YQByAG8AbQB1AG4AYwB0AGkAbwBuAHMAcwBlAHIAdAB2AG8AeQBpAGUAZABlAGwAZQBjAG8AbgB0AGkAbgBpAG4AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcwAAQcQJCxABAAAAAgAAAAAEAAAwOQAA","undefined"!=typeof Buffer?Buffer.from(E,"base64"):Uint8Array.from(atob(E),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));var E;
|
|
16889
|
+
/* es-module-lexer 1.3.1 */
|
|
16890
|
+
const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse$e(E,g="@"){if(!C)return init.then((()=>parse$e(E)));const I=E.length+1,o=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;o>0&&C.memory.grow(Math.ceil(o/65536));const K=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,K,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const D=[],k=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.ai(),g=C.id(),I=C.ss(),o=C.se();let K;C.ip()&&(K=J(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),D.push({n:K,s:A,e:Q,ss:I,se:o,d:g,a:B});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),o=I[0],K=B<0?void 0:E.slice(B,g),D=K?K[0]:"";k.push({s:A,e:Q,ls:B,le:g,n:'"'===o||"'"===o?J(I):I,ln:'"'===D||"'"===D?J(K):K});}function J(A){try{return (0, eval)(A)}catch(A){}}return [D,k,!!C.f()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++);}let C;const init=WebAssembly.compile((E="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMvLgABAQICAgICAgICAgICAgICAgIAAwMDBAQAAAADAAAAAAMDAAUGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUGw8gALfwBBsPIACwdwEwZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAmFpAAgCaWQACQJpcAAKAmVzAAsCZWUADANlbHMADQNlbGUADgJyaQAPAnJlABABZgARBXBhcnNlABILX19oZWFwX2Jhc2UDAQqpPS5oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2AvgJQQAgADYC/AlBAEEANgLUCUEAQQA2AuQJQQBBADYC3AlBAEEANgLYCUEAQQA2AuwJQQBBADYC4AkgAQufAQEDf0EAKALkCSEEQQBBACgC/AkiBTYC5AlBACAENgLoCUEAIAVBIGo2AvwJIARBHGpB1AkgBBsgBTYCAEEAKALICSEEQQAoAsQJIQYgBSABNgIAIAUgADYCCCAFIAIgAkECakEAIAYgA0YbIAQgA0YbNgIMIAUgAzYCFCAFQQA2AhAgBSACNgIEIAVBADYCHCAFQQAoAsQJIANGOgAYC1YBAX9BACgC7AkiBEEQakHYCSAEG0EAKAL8CSIENgIAQQAgBDYC7AlBACAEQRRqNgL8CSAEQQA2AhAgBCADNgIMIAQgAjYCCCAEIAE2AgQgBCAANgIACwgAQQAoAoAKCxUAQQAoAtwJKAIAQQAoAtAJa0EBdQseAQF/QQAoAtwJKAIEIgBBACgC0AlrQQF1QX8gABsLFQBBACgC3AkoAghBACgC0AlrQQF1Cx4BAX9BACgC3AkoAgwiAEEAKALQCWtBAXVBfyAAGwseAQF/QQAoAtwJKAIQIgBBACgC0AlrQQF1QX8g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AZQBjAG8AbgB0AGkAbgBpAG4AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcwAAQcQJCxABAAAAAgAAAAAEAAAwOQAA","undefined"!=typeof Buffer?Buffer.from(E,"base64"):Uint8Array.from(atob(E),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));var E;
|
|
16835
16891
|
|
|
16836
16892
|
var convertSourceMap$1 = {};
|
|
16837
16893
|
|
|
@@ -20025,12 +20081,12 @@ function getSettings$2(settingsOrOptions = {}) {
|
|
|
20025
20081
|
|
|
20026
20082
|
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
20027
20083
|
|
|
20028
|
-
let promise;
|
|
20084
|
+
let promise$1;
|
|
20029
20085
|
|
|
20030
20086
|
var queueMicrotask_1 = typeof queueMicrotask === 'function'
|
|
20031
20087
|
? queueMicrotask.bind(typeof window !== 'undefined' ? window : commonjsGlobal)
|
|
20032
20088
|
// reuse resolved promise, and allocate it lazily
|
|
20033
|
-
: cb => (promise || (promise = Promise.resolve()))
|
|
20089
|
+
: cb => (promise$1 || (promise$1 = Promise.resolve()))
|
|
20034
20090
|
.then(cb)
|
|
20035
20091
|
.catch(err => setTimeout(() => { throw err }, 0));
|
|
20036
20092
|
|
|
@@ -28768,8 +28824,10 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr = f
|
|
|
28768
28824
|
bareImportRE.test(id)) {
|
|
28769
28825
|
const mainPkg = findNearestMainPackageData(basedir, packageCache)?.data;
|
|
28770
28826
|
if (mainPkg) {
|
|
28771
|
-
|
|
28772
|
-
|
|
28827
|
+
const pkgName = getNpmPackageName(id);
|
|
28828
|
+
if (pkgName != null &&
|
|
28829
|
+
mainPkg.peerDependencies?.[pkgName] &&
|
|
28830
|
+
mainPkg.peerDependenciesMeta?.[pkgName]?.optional) {
|
|
28773
28831
|
return {
|
|
28774
28832
|
id: `${optionalPeerDepId}:${id}:${mainPkg.name}`,
|
|
28775
28833
|
};
|
|
@@ -37058,7 +37116,7 @@ function _stripLiteralAcorn(code, options) {
|
|
|
37058
37116
|
|
|
37059
37117
|
const multilineCommentsRE = /\/\*([^*\/])*?\*\//gms;
|
|
37060
37118
|
const singlelineCommentsRE = /(?:^|\n|\r)\s*\/\/.*(?:\r|\n|$)/gm;
|
|
37061
|
-
const templateLiteralRE = /\$\{(\s*(?:|{.*}|(?!\$\{).|\n|\r)*?\s*)\}/g;
|
|
37119
|
+
const templateLiteralRE$1 = /\$\{(\s*(?:|{.*}|(?!\$\{).|\n|\r)*?\s*)\}/g;
|
|
37062
37120
|
const quotesRE = [
|
|
37063
37121
|
/(["'`])((?:\\\1|(?!\1)|.|\r)*?)\1/gm,
|
|
37064
37122
|
/([`])((?:\\\1|(?!\1)|.|\n|\r)*?)\1/gm
|
|
@@ -37072,7 +37130,7 @@ function stripLiteralRegex(code, options) {
|
|
|
37072
37130
|
let expanded = code;
|
|
37073
37131
|
for (let i = 0; i < 16; i++) {
|
|
37074
37132
|
const before = expanded;
|
|
37075
|
-
expanded = expanded.replace(templateLiteralRE, "` $1`");
|
|
37133
|
+
expanded = expanded.replace(templateLiteralRE$1, "` $1`");
|
|
37076
37134
|
if (expanded === before)
|
|
37077
37135
|
break;
|
|
37078
37136
|
}
|
|
@@ -37503,48 +37561,59 @@ main$1.exports.populate = DotenvModule.populate;
|
|
|
37503
37561
|
|
|
37504
37562
|
main$1.exports = DotenvModule;
|
|
37505
37563
|
|
|
37564
|
+
// like String.prototype.search but returns the last index
|
|
37565
|
+
function _searchLast (str, rgx) {
|
|
37566
|
+
const matches = Array.from(str.matchAll(rgx));
|
|
37567
|
+
return matches.length > 0 ? matches.slice(-1)[0].index : -1
|
|
37568
|
+
}
|
|
37569
|
+
|
|
37506
37570
|
function _interpolate (envValue, environment, config) {
|
|
37507
|
-
|
|
37571
|
+
// find the last unescaped dollar sign in the
|
|
37572
|
+
// value so that we can evaluate it
|
|
37573
|
+
const lastUnescapedDollarSignIndex = _searchLast(envValue, /(?!(?<=\\))\$/g);
|
|
37508
37574
|
|
|
37509
|
-
|
|
37510
|
-
|
|
37511
|
-
|
|
37512
|
-
return newEnv
|
|
37513
|
-
}
|
|
37575
|
+
// If we couldn't match any unescaped dollar sign
|
|
37576
|
+
// let's return the string as is
|
|
37577
|
+
if (lastUnescapedDollarSignIndex === -1) return envValue
|
|
37514
37578
|
|
|
37515
|
-
|
|
37579
|
+
// This is the right-most group of variables in the string
|
|
37580
|
+
const rightMostGroup = envValue.slice(lastUnescapedDollarSignIndex);
|
|
37516
37581
|
|
|
37517
|
-
|
|
37582
|
+
/**
|
|
37583
|
+
* This finds the inner most variable/group divided
|
|
37584
|
+
* by variable name and default value (if present)
|
|
37585
|
+
* (
|
|
37586
|
+
* (?!(?<=\\))\$ // only match dollar signs that are not escaped
|
|
37587
|
+
* {? // optional opening curly brace
|
|
37588
|
+
* ([\w]+) // match the variable name
|
|
37589
|
+
* (?::-([^}\\]*))? // match an optional default value
|
|
37590
|
+
* }? // optional closing curly brace
|
|
37591
|
+
* )
|
|
37592
|
+
*/
|
|
37593
|
+
const matchGroup = /((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/;
|
|
37594
|
+
const match = rightMostGroup.match(matchGroup);
|
|
37595
|
+
|
|
37596
|
+
if (match != null) {
|
|
37597
|
+
const [, group, variableName, defaultValue] = match;
|
|
37598
|
+
|
|
37599
|
+
return _interpolate(
|
|
37600
|
+
envValue.replace(
|
|
37601
|
+
group,
|
|
37602
|
+
environment[variableName] ||
|
|
37603
|
+
defaultValue ||
|
|
37604
|
+
config.parsed[variableName] ||
|
|
37605
|
+
''
|
|
37606
|
+
),
|
|
37607
|
+
environment,
|
|
37608
|
+
config
|
|
37609
|
+
)
|
|
37610
|
+
}
|
|
37518
37611
|
|
|
37519
|
-
|
|
37520
|
-
|
|
37521
|
-
value = replacePart.replace('\\$', '$');
|
|
37522
|
-
} else {
|
|
37523
|
-
// PATCH: compatible with env variables ended with unescaped $
|
|
37524
|
-
if(!parts[2]) {
|
|
37525
|
-
return newEnv
|
|
37526
|
-
}
|
|
37527
|
-
const keyParts = parts[2].split(':-');
|
|
37528
|
-
const key = keyParts[0];
|
|
37529
|
-
replacePart = parts[0].substring(prefix.length);
|
|
37530
|
-
// process.env value 'wins' over .env file's value
|
|
37531
|
-
value = Object.prototype.hasOwnProperty.call(environment, key)
|
|
37532
|
-
? environment[key]
|
|
37533
|
-
: (config.parsed[key] || keyParts[1] || '');
|
|
37534
|
-
|
|
37535
|
-
// If the value is found, remove nested expansions.
|
|
37536
|
-
if (keyParts.length > 1 && value) {
|
|
37537
|
-
const replaceNested = matches[index + 1];
|
|
37538
|
-
matches[index + 1] = '';
|
|
37539
|
-
|
|
37540
|
-
newEnv = newEnv.replace(replaceNested, '');
|
|
37541
|
-
}
|
|
37542
|
-
// Resolve recursive interpolations
|
|
37543
|
-
value = _interpolate(value, environment, config);
|
|
37544
|
-
}
|
|
37612
|
+
return envValue
|
|
37613
|
+
}
|
|
37545
37614
|
|
|
37546
|
-
|
|
37547
|
-
|
|
37615
|
+
function _resolveEscapeSequences (value) {
|
|
37616
|
+
return value.replace(/\\\$/g, '$')
|
|
37548
37617
|
}
|
|
37549
37618
|
|
|
37550
37619
|
function expand (config) {
|
|
@@ -37552,9 +37621,13 @@ function expand (config) {
|
|
|
37552
37621
|
const environment = config.ignoreProcessEnv ? {} : process.env;
|
|
37553
37622
|
|
|
37554
37623
|
for (const configKey in config.parsed) {
|
|
37555
|
-
const value = Object.prototype.hasOwnProperty.call(environment, configKey)
|
|
37624
|
+
const value = Object.prototype.hasOwnProperty.call(environment, configKey)
|
|
37625
|
+
? environment[configKey]
|
|
37626
|
+
: config.parsed[configKey];
|
|
37556
37627
|
|
|
37557
|
-
config.parsed[configKey] =
|
|
37628
|
+
config.parsed[configKey] = _resolveEscapeSequences(
|
|
37629
|
+
_interpolate(value, environment, config)
|
|
37630
|
+
);
|
|
37558
37631
|
}
|
|
37559
37632
|
|
|
37560
37633
|
// PATCH: don't write to process.env
|
|
@@ -37567,6 +37640,14 @@ function expand (config) {
|
|
|
37567
37640
|
|
|
37568
37641
|
var expand_1 = expand;
|
|
37569
37642
|
|
|
37643
|
+
function getEnvFilesForMode(mode) {
|
|
37644
|
+
return [
|
|
37645
|
+
/** default file */ `.env`,
|
|
37646
|
+
/** local file */ `.env.local`,
|
|
37647
|
+
/** mode file */ `.env.${mode}`,
|
|
37648
|
+
/** mode local file */ `.env.${mode}.local`,
|
|
37649
|
+
];
|
|
37650
|
+
}
|
|
37570
37651
|
function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
37571
37652
|
if (mode === 'local') {
|
|
37572
37653
|
throw new Error(`"local" cannot be used as a mode name because it conflicts with ` +
|
|
@@ -37574,12 +37655,7 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
|
37574
37655
|
}
|
|
37575
37656
|
prefixes = arraify(prefixes);
|
|
37576
37657
|
const env = {};
|
|
37577
|
-
const envFiles =
|
|
37578
|
-
/** default file */ `.env`,
|
|
37579
|
-
/** local file */ `.env.local`,
|
|
37580
|
-
/** mode file */ `.env.${mode}`,
|
|
37581
|
-
/** mode local file */ `.env.${mode}.local`,
|
|
37582
|
-
];
|
|
37658
|
+
const envFiles = getEnvFilesForMode(mode);
|
|
37583
37659
|
const parsed = Object.fromEntries(envFiles.flatMap((file) => {
|
|
37584
37660
|
const filePath = path$o.join(envDir, file);
|
|
37585
37661
|
if (!tryStatSync(filePath)?.isFile())
|
|
@@ -38688,8 +38764,8 @@ function cssPostPlugin(config) {
|
|
|
38688
38764
|
let pureCssChunks;
|
|
38689
38765
|
// when there are multiple rollup outputs and extracting CSS, only emit once,
|
|
38690
38766
|
// since output formats have no effect on the generated CSS.
|
|
38691
|
-
let outputToExtractedCSSMap;
|
|
38692
38767
|
let hasEmitted = false;
|
|
38768
|
+
let chunkCSSMap;
|
|
38693
38769
|
const rollupOptionsOutput = config.build.rollupOptions.output;
|
|
38694
38770
|
const assetFileNames = (Array.isArray(rollupOptionsOutput)
|
|
38695
38771
|
? rollupOptionsOutput[0]
|
|
@@ -38714,8 +38790,8 @@ function cssPostPlugin(config) {
|
|
|
38714
38790
|
renderStart() {
|
|
38715
38791
|
// Ensure new caches for every build (i.e. rebuilding in watch mode)
|
|
38716
38792
|
pureCssChunks = new Set();
|
|
38717
|
-
outputToExtractedCSSMap = new Map();
|
|
38718
38793
|
hasEmitted = false;
|
|
38794
|
+
chunkCSSMap = new Map();
|
|
38719
38795
|
emitTasks = [];
|
|
38720
38796
|
},
|
|
38721
38797
|
async transform(css, id, options) {
|
|
@@ -38944,7 +39020,7 @@ function cssPostPlugin(config) {
|
|
|
38944
39020
|
else {
|
|
38945
39021
|
chunkCSS = resolveAssetUrlsInCss(chunkCSS, cssBundleName);
|
|
38946
39022
|
// finalizeCss is called for the aggregated chunk in generateBundle
|
|
38947
|
-
|
|
39023
|
+
chunkCSSMap.set(chunk.fileName, chunkCSS);
|
|
38948
39024
|
}
|
|
38949
39025
|
return null;
|
|
38950
39026
|
},
|
|
@@ -39005,8 +39081,26 @@ function cssPostPlugin(config) {
|
|
|
39005
39081
|
delete bundle[`${fileName}.map`];
|
|
39006
39082
|
});
|
|
39007
39083
|
}
|
|
39008
|
-
|
|
39009
|
-
|
|
39084
|
+
function extractCss() {
|
|
39085
|
+
let css = '';
|
|
39086
|
+
const collected = new Set();
|
|
39087
|
+
const prelimaryNameToChunkMap = new Map(Object.values(bundle)
|
|
39088
|
+
.filter((chunk) => chunk.type === 'chunk')
|
|
39089
|
+
.map((chunk) => [chunk.preliminaryFileName, chunk]));
|
|
39090
|
+
function collect(fileName) {
|
|
39091
|
+
const chunk = bundle[fileName];
|
|
39092
|
+
if (!chunk || chunk.type !== 'chunk' || collected.has(chunk))
|
|
39093
|
+
return;
|
|
39094
|
+
collected.add(chunk);
|
|
39095
|
+
chunk.imports.forEach(collect);
|
|
39096
|
+
css += chunkCSSMap.get(chunk.preliminaryFileName) ?? '';
|
|
39097
|
+
}
|
|
39098
|
+
for (const chunkName of chunkCSSMap.keys())
|
|
39099
|
+
collect(prelimaryNameToChunkMap.get(chunkName)?.fileName ?? '');
|
|
39100
|
+
return css;
|
|
39101
|
+
}
|
|
39102
|
+
let extractedCss = !hasEmitted && extractCss();
|
|
39103
|
+
if (extractedCss) {
|
|
39010
39104
|
hasEmitted = true;
|
|
39011
39105
|
extractedCss = await finalizeCss(extractedCss, true, config);
|
|
39012
39106
|
this.emitFile({
|
|
@@ -39313,8 +39407,8 @@ function createCachedImport(imp) {
|
|
|
39313
39407
|
return cached;
|
|
39314
39408
|
};
|
|
39315
39409
|
}
|
|
39316
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
|
39317
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
|
39410
|
+
const importPostcssImport = createCachedImport(() => import('./dep-a86a117b.js').then(function (n) { return n.i; }));
|
|
39411
|
+
const importPostcssModules = createCachedImport(() => import('./dep-ae1dfb84.js').then(function (n) { return n.i; }));
|
|
39318
39412
|
const importPostcss = createCachedImport(() => import('postcss'));
|
|
39319
39413
|
/**
|
|
39320
39414
|
* @experimental
|
|
@@ -39613,14 +39707,14 @@ async function hoistAtRules(css) {
|
|
|
39613
39707
|
}
|
|
39614
39708
|
const loadedPreprocessors = {};
|
|
39615
39709
|
// TODO: use dynamic import
|
|
39616
|
-
const _require$
|
|
39710
|
+
const _require$1 = createRequire$1(import.meta.url);
|
|
39617
39711
|
function loadPreprocessor(lang, root) {
|
|
39618
39712
|
if (lang in loadedPreprocessors) {
|
|
39619
39713
|
return loadedPreprocessors[lang];
|
|
39620
39714
|
}
|
|
39621
39715
|
try {
|
|
39622
39716
|
const resolved = requireResolveFromRootWithFallback(root, lang);
|
|
39623
|
-
return (loadedPreprocessors[lang] = _require$
|
|
39717
|
+
return (loadedPreprocessors[lang] = _require$1(resolved));
|
|
39624
39718
|
}
|
|
39625
39719
|
catch (e) {
|
|
39626
39720
|
if (e.code === 'MODULE_NOT_FOUND') {
|
|
@@ -40636,55 +40730,6 @@ function importAssertions(Parser) {
|
|
|
40636
40730
|
}
|
|
40637
40731
|
|
|
40638
40732
|
const debug$d = createDebugger('vite:ssr-external');
|
|
40639
|
-
/**
|
|
40640
|
-
* Converts "parent > child" syntax to just "child"
|
|
40641
|
-
*/
|
|
40642
|
-
function stripNesting(packages) {
|
|
40643
|
-
return packages.map((s) => {
|
|
40644
|
-
const arr = s.split('>');
|
|
40645
|
-
return arr[arr.length - 1].trim();
|
|
40646
|
-
});
|
|
40647
|
-
}
|
|
40648
|
-
/**
|
|
40649
|
-
* Heuristics for determining whether a dependency should be externalized for
|
|
40650
|
-
* server-side rendering.
|
|
40651
|
-
*/
|
|
40652
|
-
function cjsSsrResolveExternals(config, knownImports) {
|
|
40653
|
-
// strip nesting since knownImports may be passed in from optimizeDeps which
|
|
40654
|
-
// supports a "parent > child" syntax
|
|
40655
|
-
knownImports = stripNesting(knownImports);
|
|
40656
|
-
const ssrConfig = config.ssr;
|
|
40657
|
-
if (ssrConfig?.noExternal === true) {
|
|
40658
|
-
return [];
|
|
40659
|
-
}
|
|
40660
|
-
const ssrExternals = new Set();
|
|
40661
|
-
const seen = new Set();
|
|
40662
|
-
ssrConfig?.external?.forEach((id) => {
|
|
40663
|
-
ssrExternals.add(id);
|
|
40664
|
-
seen.add(id);
|
|
40665
|
-
});
|
|
40666
|
-
cjsSsrCollectExternals(config.root, config.resolve, ssrExternals, seen, config.logger);
|
|
40667
|
-
const importedDeps = knownImports.map(getNpmPackageName).filter(isDefined);
|
|
40668
|
-
for (const dep of importedDeps) {
|
|
40669
|
-
// Assume external if not yet seen
|
|
40670
|
-
// At this point, the project root and any linked packages have had their dependencies checked,
|
|
40671
|
-
// so we can safely mark any knownImports not yet seen as external. They are guaranteed to be
|
|
40672
|
-
// dependencies of packages in node_modules.
|
|
40673
|
-
if (!seen.has(dep)) {
|
|
40674
|
-
ssrExternals.add(dep);
|
|
40675
|
-
}
|
|
40676
|
-
}
|
|
40677
|
-
// ensure `vite/dynamic-import-polyfill` is bundled (issue #1865)
|
|
40678
|
-
ssrExternals.delete('vite');
|
|
40679
|
-
let externals = [...ssrExternals];
|
|
40680
|
-
if (ssrConfig?.noExternal) {
|
|
40681
|
-
externals = externals.filter(createFilter(undefined, ssrConfig.noExternal, { resolve: false }));
|
|
40682
|
-
}
|
|
40683
|
-
return externals;
|
|
40684
|
-
}
|
|
40685
|
-
const CJS_CONTENT_RE = /\bmodule\.exports\b|\bexports[.[]|\brequire\s*\(|\bObject\.(?:defineProperty|defineProperties|assign)\s*\(\s*exports\b/;
|
|
40686
|
-
// TODO: use import()
|
|
40687
|
-
const _require$1 = createRequire$1(import.meta.url);
|
|
40688
40733
|
const isSsrExternalCache = new WeakMap();
|
|
40689
40734
|
function shouldExternalizeForSSR(id, importer, config) {
|
|
40690
40735
|
let isSsrExternal = isSsrExternalCache.get(config);
|
|
@@ -40774,115 +40819,6 @@ function createIsSsrExternal(config) {
|
|
|
40774
40819
|
return external;
|
|
40775
40820
|
};
|
|
40776
40821
|
}
|
|
40777
|
-
// When config.experimental.buildSsrCjsExternalHeuristics is enabled, this function
|
|
40778
|
-
// is used reverting to the Vite 2.9 SSR externalization heuristics
|
|
40779
|
-
function cjsSsrCollectExternals(root, resolveOptions, ssrExternals, seen, logger) {
|
|
40780
|
-
const rootPkgPath = lookupFile(root, ['package.json']);
|
|
40781
|
-
if (!rootPkgPath) {
|
|
40782
|
-
return;
|
|
40783
|
-
}
|
|
40784
|
-
const rootPkgContent = fs$l.readFileSync(rootPkgPath, 'utf-8');
|
|
40785
|
-
if (!rootPkgContent) {
|
|
40786
|
-
return;
|
|
40787
|
-
}
|
|
40788
|
-
const rootPkg = JSON.parse(rootPkgContent);
|
|
40789
|
-
const deps = {
|
|
40790
|
-
...rootPkg.devDependencies,
|
|
40791
|
-
...rootPkg.dependencies,
|
|
40792
|
-
};
|
|
40793
|
-
const internalResolveOptions = {
|
|
40794
|
-
...resolveOptions,
|
|
40795
|
-
root,
|
|
40796
|
-
isProduction: false,
|
|
40797
|
-
isBuild: true,
|
|
40798
|
-
};
|
|
40799
|
-
const depsToTrace = new Set();
|
|
40800
|
-
for (const id in deps) {
|
|
40801
|
-
if (seen.has(id))
|
|
40802
|
-
continue;
|
|
40803
|
-
seen.add(id);
|
|
40804
|
-
let esmEntry;
|
|
40805
|
-
let requireEntry;
|
|
40806
|
-
try {
|
|
40807
|
-
esmEntry = tryNodeResolve(id, undefined, internalResolveOptions, true, // we set `targetWeb` to `true` to get the ESM entry
|
|
40808
|
-
undefined, true)?.id;
|
|
40809
|
-
// normalizePath required for windows. tryNodeResolve uses normalizePath
|
|
40810
|
-
// which returns with '/', require.resolve returns with '\\'
|
|
40811
|
-
requireEntry = normalizePath$3(_require$1.resolve(id, { paths: [root] }));
|
|
40812
|
-
}
|
|
40813
|
-
catch (e) {
|
|
40814
|
-
// no main entry, but deep imports may be allowed
|
|
40815
|
-
const pkgDir = resolvePackageData(id, root)?.dir;
|
|
40816
|
-
if (pkgDir) {
|
|
40817
|
-
if (isInNodeModules$1(pkgDir)) {
|
|
40818
|
-
ssrExternals.add(id);
|
|
40819
|
-
}
|
|
40820
|
-
else {
|
|
40821
|
-
depsToTrace.add(path$o.dirname(pkgDir));
|
|
40822
|
-
}
|
|
40823
|
-
continue;
|
|
40824
|
-
}
|
|
40825
|
-
// resolve failed, assume include
|
|
40826
|
-
debug$d?.(`Failed to resolve entries for package "${id}"\n`, e);
|
|
40827
|
-
continue;
|
|
40828
|
-
}
|
|
40829
|
-
// no esm entry but has require entry
|
|
40830
|
-
if (!esmEntry) {
|
|
40831
|
-
ssrExternals.add(id);
|
|
40832
|
-
}
|
|
40833
|
-
// trace the dependencies of linked packages
|
|
40834
|
-
else if (!isInNodeModules$1(esmEntry)) {
|
|
40835
|
-
const pkgDir = resolvePackageData(id, root)?.dir;
|
|
40836
|
-
if (pkgDir) {
|
|
40837
|
-
depsToTrace.add(pkgDir);
|
|
40838
|
-
}
|
|
40839
|
-
}
|
|
40840
|
-
// has separate esm/require entry, assume require entry is cjs
|
|
40841
|
-
else if (esmEntry !== requireEntry) {
|
|
40842
|
-
ssrExternals.add(id);
|
|
40843
|
-
}
|
|
40844
|
-
// if we're externalizing ESM and CJS should basically just always do it?
|
|
40845
|
-
// or are there others like SystemJS / AMD that we'd need to handle?
|
|
40846
|
-
// for now, we'll just leave this as is
|
|
40847
|
-
else if (/\.m?js$/.test(esmEntry)) {
|
|
40848
|
-
const pkg = resolvePackageData(id, root)?.data;
|
|
40849
|
-
if (!pkg) {
|
|
40850
|
-
continue;
|
|
40851
|
-
}
|
|
40852
|
-
if (pkg.type === 'module' || esmEntry.endsWith('.mjs')) {
|
|
40853
|
-
ssrExternals.add(id);
|
|
40854
|
-
continue;
|
|
40855
|
-
}
|
|
40856
|
-
// check if the entry is cjs
|
|
40857
|
-
const content = fs$l.readFileSync(esmEntry, 'utf-8');
|
|
40858
|
-
if (CJS_CONTENT_RE.test(content)) {
|
|
40859
|
-
ssrExternals.add(id);
|
|
40860
|
-
continue;
|
|
40861
|
-
}
|
|
40862
|
-
logger.warn(`${id} doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.`);
|
|
40863
|
-
}
|
|
40864
|
-
}
|
|
40865
|
-
for (const depRoot of depsToTrace) {
|
|
40866
|
-
cjsSsrCollectExternals(depRoot, resolveOptions, ssrExternals, seen, logger);
|
|
40867
|
-
}
|
|
40868
|
-
}
|
|
40869
|
-
function cjsShouldExternalizeForSSR(id, externals) {
|
|
40870
|
-
if (!externals) {
|
|
40871
|
-
return false;
|
|
40872
|
-
}
|
|
40873
|
-
const should = externals.some((e) => {
|
|
40874
|
-
if (id === e) {
|
|
40875
|
-
return true;
|
|
40876
|
-
}
|
|
40877
|
-
// deep imports, check ext before externalizing - only externalize
|
|
40878
|
-
// extension-less imports and explicit .js imports
|
|
40879
|
-
if (id.startsWith(withTrailingSlash(e)) &&
|
|
40880
|
-
(!path$o.extname(id) || id.endsWith('.js'))) {
|
|
40881
|
-
return true;
|
|
40882
|
-
}
|
|
40883
|
-
});
|
|
40884
|
-
return should;
|
|
40885
|
-
}
|
|
40886
40822
|
|
|
40887
40823
|
/**
|
|
40888
40824
|
* https://github.com/rollup/plugins/blob/master/packages/json/src/index.js
|
|
@@ -41788,7 +41724,7 @@ async function handleHMRUpdate(file, server, configOnly) {
|
|
|
41788
41724
|
const isConfig = file === config.configFile;
|
|
41789
41725
|
const isConfigDependency = config.configFileDependencies.some((name) => file === name);
|
|
41790
41726
|
const isEnv = config.inlineConfig.envFile !== false &&
|
|
41791
|
-
(
|
|
41727
|
+
getEnvFilesForMode(config.mode).includes(fileName);
|
|
41792
41728
|
if (isConfig || isConfigDependency || isEnv) {
|
|
41793
41729
|
// auto restart server
|
|
41794
41730
|
debugHmr?.(`[config change] ${colors$1.dim(shortFile)}`);
|
|
@@ -42170,6 +42106,7 @@ const hasImportInQueryParamsRE = /[?&]import=?\b/;
|
|
|
42170
42106
|
const hasViteIgnoreRE = /\/\*\s*@vite-ignore\s*\*\//;
|
|
42171
42107
|
const cleanUpRawUrlRE = /\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm;
|
|
42172
42108
|
const urlIsStringRE = /^(?:'.*'|".*"|`.*`)$/;
|
|
42109
|
+
const templateLiteralRE = /^\s*`(.*)`\s*$/;
|
|
42173
42110
|
function isExplicitImportRequired(url) {
|
|
42174
42111
|
return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url);
|
|
42175
42112
|
}
|
|
@@ -42327,7 +42264,6 @@ function importAnalysisPlugin(config) {
|
|
|
42327
42264
|
let needQueryInjectHelper = false;
|
|
42328
42265
|
let s;
|
|
42329
42266
|
const str = () => s || (s = new MagicString(source));
|
|
42330
|
-
const importedUrls = new Set();
|
|
42331
42267
|
let isPartiallySelfAccepting = false;
|
|
42332
42268
|
const importedBindings = enablePartialAccept
|
|
42333
42269
|
? new Map()
|
|
@@ -42428,13 +42364,14 @@ function importAnalysisPlugin(config) {
|
|
|
42428
42364
|
}
|
|
42429
42365
|
return [url, resolved.id];
|
|
42430
42366
|
};
|
|
42367
|
+
const orderedImportedUrls = new Array(imports.length);
|
|
42431
42368
|
const orderedAcceptedUrls = new Array(imports.length);
|
|
42432
42369
|
const orderedAcceptedExports = new Array(imports.length);
|
|
42433
42370
|
await Promise.all(imports.map(async (importSpecifier, index) => {
|
|
42434
|
-
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex,
|
|
42371
|
+
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: assertIndex, } = importSpecifier;
|
|
42435
42372
|
// #2083 User may use escape path,
|
|
42436
42373
|
// so use imports[index].n to get the unescaped string
|
|
42437
|
-
|
|
42374
|
+
let specifier = importSpecifier.n;
|
|
42438
42375
|
const rawUrl = source.slice(start, end);
|
|
42439
42376
|
// check import.meta usage
|
|
42440
42377
|
if (rawUrl === 'import.meta') {
|
|
@@ -42464,6 +42401,15 @@ function importAnalysisPlugin(config) {
|
|
|
42464
42401
|
}
|
|
42465
42402
|
return;
|
|
42466
42403
|
}
|
|
42404
|
+
else if (templateLiteralRE.test(rawUrl)) {
|
|
42405
|
+
// If the import has backticks but isn't transformed as a glob import
|
|
42406
|
+
// (as there's nothing to glob), check if it's simply a plain string.
|
|
42407
|
+
// If so, we can replace the specifier as a plain string to prevent
|
|
42408
|
+
// an incorrect "cannot be analyzed" warning.
|
|
42409
|
+
if (!(rawUrl.includes('${') && rawUrl.includes('}'))) {
|
|
42410
|
+
specifier = rawUrl.replace(templateLiteralRE, '$1');
|
|
42411
|
+
}
|
|
42412
|
+
}
|
|
42467
42413
|
const isDynamicImport = dynamicIndex > -1;
|
|
42468
42414
|
// strip import assertions as we can process them ourselves
|
|
42469
42415
|
if (!isDynamicImport && assertIndex > -1) {
|
|
@@ -42478,12 +42424,7 @@ function importAnalysisPlugin(config) {
|
|
|
42478
42424
|
}
|
|
42479
42425
|
// skip ssr external
|
|
42480
42426
|
if (ssr) {
|
|
42481
|
-
if (config
|
|
42482
|
-
if (cjsShouldExternalizeForSSR(specifier, server._ssrExternals)) {
|
|
42483
|
-
return;
|
|
42484
|
-
}
|
|
42485
|
-
}
|
|
42486
|
-
else if (shouldExternalizeForSSR(specifier, importer, config)) {
|
|
42427
|
+
if (shouldExternalizeForSSR(specifier, importer, config)) {
|
|
42487
42428
|
return;
|
|
42488
42429
|
}
|
|
42489
42430
|
if (isBuiltin(specifier)) {
|
|
@@ -42556,7 +42497,7 @@ function importAnalysisPlugin(config) {
|
|
|
42556
42497
|
const hmrUrl = unwrapId(stripBase(url, base));
|
|
42557
42498
|
const isLocalImport = !isExternalUrl(hmrUrl) && !isDataUrl(hmrUrl);
|
|
42558
42499
|
if (isLocalImport) {
|
|
42559
|
-
|
|
42500
|
+
orderedImportedUrls[index] = hmrUrl;
|
|
42560
42501
|
}
|
|
42561
42502
|
if (enablePartialAccept && importedBindings) {
|
|
42562
42503
|
extractImportedBindings(resolvedId, source, importSpecifier, importedBindings);
|
|
@@ -42607,6 +42548,7 @@ function importAnalysisPlugin(config) {
|
|
|
42607
42548
|
}
|
|
42608
42549
|
}
|
|
42609
42550
|
}));
|
|
42551
|
+
const importedUrls = new Set(orderedImportedUrls.filter(Boolean));
|
|
42610
42552
|
const acceptedUrls = mergeAcceptedUrls(orderedAcceptedUrls);
|
|
42611
42553
|
const acceptedExports = mergeAcceptedUrls(orderedAcceptedExports);
|
|
42612
42554
|
if (hasEnv) {
|
|
@@ -43859,6 +43801,33 @@ function metadataPlugin() {
|
|
|
43859
43801
|
};
|
|
43860
43802
|
}
|
|
43861
43803
|
|
|
43804
|
+
// Astring is a tiny and fast JavaScript code generator from an ESTree-compliant AST.
|
|
43805
|
+
//
|
|
43806
|
+
// Astring was written by David Bonnet and released under an MIT license.
|
|
43807
|
+
//
|
|
43808
|
+
// The Git repository for Astring is available at:
|
|
43809
|
+
// https://github.com/davidbonnet/astring.git
|
|
43810
|
+
//
|
|
43811
|
+
// Please use the GitHub bug tracker to report issues:
|
|
43812
|
+
// https://github.com/davidbonnet/astring/issues
|
|
43813
|
+
|
|
43814
|
+
|
|
43815
|
+
/* c8 ignore if */
|
|
43816
|
+
if (!String.prototype.repeat) {
|
|
43817
|
+
/* c8 ignore next */
|
|
43818
|
+
throw new Error(
|
|
43819
|
+
'String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation',
|
|
43820
|
+
)
|
|
43821
|
+
}
|
|
43822
|
+
|
|
43823
|
+
/* c8 ignore if */
|
|
43824
|
+
if (!String.prototype.endsWith) {
|
|
43825
|
+
/* c8 ignore next */
|
|
43826
|
+
throw new Error(
|
|
43827
|
+
'String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation',
|
|
43828
|
+
)
|
|
43829
|
+
}
|
|
43830
|
+
|
|
43862
43831
|
class VariableDynamicImportError extends Error {}
|
|
43863
43832
|
|
|
43864
43833
|
/* eslint-disable-next-line no-template-curly-in-string */
|
|
@@ -44172,7 +44141,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
|
|
44172
44141
|
ssrConfig: config.ssr,
|
|
44173
44142
|
asSrc: true,
|
|
44174
44143
|
getDepsOptimizer: (ssr) => getDepsOptimizer(config, ssr),
|
|
44175
|
-
shouldExternalize: isBuild && config.build.ssr
|
|
44144
|
+
shouldExternalize: isBuild && config.build.ssr
|
|
44176
44145
|
? (id, importer) => shouldExternalizeForSSR(id, importer, config)
|
|
44177
44146
|
: undefined,
|
|
44178
44147
|
}),
|
|
@@ -46289,6 +46258,7 @@ async function loadCachedDepOptimizationMetadata(config, ssr, force = config.opt
|
|
|
46289
46258
|
config.logger.info('Forced re-optimization of dependencies');
|
|
46290
46259
|
}
|
|
46291
46260
|
// Start with a fresh cache
|
|
46261
|
+
debug$8?.(colors$1.green(`removing old cache dir ${depsCacheDir}`));
|
|
46292
46262
|
await fsp.rm(depsCacheDir, { recursive: true, force: true });
|
|
46293
46263
|
}
|
|
46294
46264
|
/**
|
|
@@ -46347,6 +46317,7 @@ function runOptimizeDeps(resolvedConfig, depsInfo, ssr = resolvedConfig.command
|
|
|
46347
46317
|
fs$l.mkdirSync(processingCacheDir, { recursive: true });
|
|
46348
46318
|
// a hint for Node.js
|
|
46349
46319
|
// all files in the cache directory should be recognized as ES modules
|
|
46320
|
+
debug$8?.(colors$1.green(`creating package.json in ${processingCacheDir}`));
|
|
46350
46321
|
fs$l.writeFileSync(path$o.resolve(processingCacheDir, 'package.json'), `{\n "type": "module"\n}\n`);
|
|
46351
46322
|
const metadata = initDepsOptimizerMetadata(config, ssr);
|
|
46352
46323
|
metadata.browserHash = getOptimizedBrowserHash(metadata.hash, depsFromOptimizedDepInfo(depsInfo));
|
|
@@ -46363,6 +46334,7 @@ function runOptimizeDeps(resolvedConfig, depsInfo, ssr = resolvedConfig.command
|
|
|
46363
46334
|
cleaned = true;
|
|
46364
46335
|
// No need to wait, we can clean up in the background because temp folders
|
|
46365
46336
|
// are unique per run
|
|
46337
|
+
debug$8?.(colors$1.green(`removing cache dir ${processingCacheDir}`));
|
|
46366
46338
|
fsp.rm(processingCacheDir, { recursive: true, force: true }).catch(() => {
|
|
46367
46339
|
// Ignore errors
|
|
46368
46340
|
});
|
|
@@ -46381,6 +46353,7 @@ function runOptimizeDeps(resolvedConfig, depsInfo, ssr = resolvedConfig.command
|
|
|
46381
46353
|
// Write metadata file, then commit the processing folder to the global deps cache
|
|
46382
46354
|
// Rewire the file paths from the temporal processing dir to the final deps cache dir
|
|
46383
46355
|
const dataPath = path$o.join(processingCacheDir, '_metadata.json');
|
|
46356
|
+
debug$8?.(colors$1.green(`creating _metadata.json in ${processingCacheDir}`));
|
|
46384
46357
|
fs$l.writeFileSync(dataPath, stringifyDepsOptimizerMetadata(metadata, depsCacheDir));
|
|
46385
46358
|
// In order to minimize the time where the deps folder isn't in a consistent state,
|
|
46386
46359
|
// we first rename the old depsCacheDir to a temporal path, then we rename the
|
|
@@ -46393,18 +46366,26 @@ function runOptimizeDeps(resolvedConfig, depsInfo, ssr = resolvedConfig.command
|
|
|
46393
46366
|
const temporalPath = depsCacheDir + getTempSuffix();
|
|
46394
46367
|
const depsCacheDirPresent = fs$l.existsSync(depsCacheDir);
|
|
46395
46368
|
if (isWindows$4) {
|
|
46396
|
-
if (depsCacheDirPresent)
|
|
46369
|
+
if (depsCacheDirPresent) {
|
|
46370
|
+
debug$8?.(colors$1.green(`renaming ${depsCacheDir} to ${temporalPath}`));
|
|
46397
46371
|
await safeRename(depsCacheDir, temporalPath);
|
|
46372
|
+
}
|
|
46373
|
+
debug$8?.(colors$1.green(`renaming ${processingCacheDir} to ${depsCacheDir}`));
|
|
46398
46374
|
await safeRename(processingCacheDir, depsCacheDir);
|
|
46399
46375
|
}
|
|
46400
46376
|
else {
|
|
46401
|
-
if (depsCacheDirPresent)
|
|
46377
|
+
if (depsCacheDirPresent) {
|
|
46378
|
+
debug$8?.(colors$1.green(`renaming ${depsCacheDir} to ${temporalPath}`));
|
|
46402
46379
|
fs$l.renameSync(depsCacheDir, temporalPath);
|
|
46380
|
+
}
|
|
46381
|
+
debug$8?.(colors$1.green(`renaming ${processingCacheDir} to ${depsCacheDir}`));
|
|
46403
46382
|
fs$l.renameSync(processingCacheDir, depsCacheDir);
|
|
46404
46383
|
}
|
|
46405
46384
|
// Delete temporal path in the background
|
|
46406
|
-
if (depsCacheDirPresent)
|
|
46385
|
+
if (depsCacheDirPresent) {
|
|
46386
|
+
debug$8?.(colors$1.green(`removing cache temp dir ${temporalPath}`));
|
|
46407
46387
|
fsp.rm(temporalPath, { recursive: true, force: true });
|
|
46388
|
+
}
|
|
46408
46389
|
},
|
|
46409
46390
|
};
|
|
46410
46391
|
if (!qualifiedIds.length) {
|
|
@@ -46601,11 +46582,6 @@ async function prepareEsbuildOptimizerRun(resolvedConfig, depsInfo, ssr, process
|
|
|
46601
46582
|
});
|
|
46602
46583
|
return { context, idToExports };
|
|
46603
46584
|
}
|
|
46604
|
-
async function findKnownImports(config, ssr) {
|
|
46605
|
-
const { deps } = await scanImports(config).result;
|
|
46606
|
-
await addManuallyIncludedOptimizeDeps(deps, config, ssr);
|
|
46607
|
-
return Object.keys(deps);
|
|
46608
|
-
}
|
|
46609
46585
|
async function addManuallyIncludedOptimizeDeps(deps, config, ssr, extra = [], filter) {
|
|
46610
46586
|
const { logger } = config;
|
|
46611
46587
|
const optimizeDeps = getDepOptimizationConfig(config, ssr);
|
|
@@ -46957,6 +46933,7 @@ async function cleanupDepsCacheStaleDirs(config) {
|
|
|
46957
46933
|
const stats = await fsp.stat(tempDirPath).catch((_) => null);
|
|
46958
46934
|
if (stats?.mtime &&
|
|
46959
46935
|
Date.now() - stats.mtime.getTime() > MAX_TEMP_DIR_AGE_MS) {
|
|
46936
|
+
debug$8?.(`removing stale cache temp dir ${tempDirPath}`);
|
|
46960
46937
|
await fsp.rm(tempDirPath, { recursive: true, force: true });
|
|
46961
46938
|
}
|
|
46962
46939
|
}
|
|
@@ -47013,7 +46990,6 @@ var index$1 = {
|
|
|
47013
46990
|
depsLogString: depsLogString,
|
|
47014
46991
|
discoverProjectDependencies: discoverProjectDependencies,
|
|
47015
46992
|
extractExportsData: extractExportsData,
|
|
47016
|
-
findKnownImports: findKnownImports,
|
|
47017
46993
|
getDepHash: getDepHash,
|
|
47018
46994
|
getDepsCacheDir: getDepsCacheDir,
|
|
47019
46995
|
getDepsOptimizer: getDepsOptimizer,
|
|
@@ -47582,7 +47558,7 @@ function ssrManifestPlugin(config) {
|
|
|
47582
47558
|
this.emitFile({
|
|
47583
47559
|
fileName: typeof config.build.ssrManifest === 'string'
|
|
47584
47560
|
? config.build.ssrManifest
|
|
47585
|
-
: 'ssr-manifest.json',
|
|
47561
|
+
: '.vite/ssr-manifest.json',
|
|
47586
47562
|
type: 'asset',
|
|
47587
47563
|
source: jsonStableStringify$1(ssrManifest, { space: 2 }),
|
|
47588
47564
|
});
|
|
@@ -47624,6 +47600,28 @@ function resolveChokidarOptions(config, options) {
|
|
|
47624
47600
|
};
|
|
47625
47601
|
return resolvedWatchOptions;
|
|
47626
47602
|
}
|
|
47603
|
+
class NoopWatcher extends EventEmitter$4 {
|
|
47604
|
+
options;
|
|
47605
|
+
constructor(options) {
|
|
47606
|
+
super();
|
|
47607
|
+
this.options = options;
|
|
47608
|
+
}
|
|
47609
|
+
add() {
|
|
47610
|
+
return this;
|
|
47611
|
+
}
|
|
47612
|
+
unwatch() {
|
|
47613
|
+
return this;
|
|
47614
|
+
}
|
|
47615
|
+
getWatched() {
|
|
47616
|
+
return {};
|
|
47617
|
+
}
|
|
47618
|
+
async close() {
|
|
47619
|
+
// noop
|
|
47620
|
+
}
|
|
47621
|
+
}
|
|
47622
|
+
function createNoopWatcher(options) {
|
|
47623
|
+
return new NoopWatcher(options);
|
|
47624
|
+
}
|
|
47627
47625
|
|
|
47628
47626
|
/**
|
|
47629
47627
|
* make sure systemjs register wrap to had complete parameters in system format
|
|
@@ -47851,8 +47849,13 @@ function hasWorkspacePackageJSON(root) {
|
|
|
47851
47849
|
if (!isFileReadable(path)) {
|
|
47852
47850
|
return false;
|
|
47853
47851
|
}
|
|
47854
|
-
|
|
47855
|
-
|
|
47852
|
+
try {
|
|
47853
|
+
const content = JSON.parse(fs$l.readFileSync(path, 'utf-8')) || {};
|
|
47854
|
+
return !!content.workspaces;
|
|
47855
|
+
}
|
|
47856
|
+
catch {
|
|
47857
|
+
return false;
|
|
47858
|
+
}
|
|
47856
47859
|
}
|
|
47857
47860
|
function hasRootFile(root) {
|
|
47858
47861
|
return ROOT_FILES.some((file) => fs$l.existsSync(join$2(root, file)));
|
|
@@ -48539,14 +48542,6 @@ async function build(inlineConfig = {}) {
|
|
|
48539
48542
|
const outDir = resolve(options.outDir);
|
|
48540
48543
|
// inject ssr arg to plugin load/transform hooks
|
|
48541
48544
|
const plugins = (ssr ? config.plugins.map((p) => injectSsrFlagToHooks(p)) : config.plugins);
|
|
48542
|
-
const userExternal = options.rollupOptions?.external;
|
|
48543
|
-
let external = userExternal;
|
|
48544
|
-
// In CJS, we can pass the externals to rollup as is. In ESM, we need to
|
|
48545
|
-
// do it in the resolve plugin so we can add the resolved extension for
|
|
48546
|
-
// deep node_modules imports
|
|
48547
|
-
if (ssr && config.legacy?.buildSsrCjsExternalHeuristics) {
|
|
48548
|
-
external = await cjsSsrResolveExternal(config, userExternal);
|
|
48549
|
-
}
|
|
48550
48545
|
if (isDepsOptimizerEnabled(config, ssr)) {
|
|
48551
48546
|
await initDepsOptimizer(config);
|
|
48552
48547
|
}
|
|
@@ -48560,7 +48555,7 @@ async function build(inlineConfig = {}) {
|
|
|
48560
48555
|
...options.rollupOptions,
|
|
48561
48556
|
input,
|
|
48562
48557
|
plugins,
|
|
48563
|
-
external,
|
|
48558
|
+
external: options.rollupOptions?.external,
|
|
48564
48559
|
onwarn(warning, warn) {
|
|
48565
48560
|
onRollupWarning(warning, warn, config);
|
|
48566
48561
|
},
|
|
@@ -48586,8 +48581,7 @@ async function build(inlineConfig = {}) {
|
|
|
48586
48581
|
}
|
|
48587
48582
|
const ssrNodeBuild = ssr && config.ssr.target === 'node';
|
|
48588
48583
|
const ssrWorkerBuild = ssr && config.ssr.target === 'webworker';
|
|
48589
|
-
const
|
|
48590
|
-
const format = output.format || (cjsSsrBuild ? 'cjs' : 'es');
|
|
48584
|
+
const format = output.format || 'es';
|
|
48591
48585
|
const jsExt = ssrNodeBuild || libOptions
|
|
48592
48586
|
? resolveOutputJsExtension(format, findNearestPackageData(config.root, config.packageCache)?.data
|
|
48593
48587
|
.type)
|
|
@@ -48596,7 +48590,7 @@ async function build(inlineConfig = {}) {
|
|
|
48596
48590
|
dir: outDir,
|
|
48597
48591
|
// Default format is 'es' for regular and for SSR builds
|
|
48598
48592
|
format,
|
|
48599
|
-
exports:
|
|
48593
|
+
exports: 'auto',
|
|
48600
48594
|
sourcemap: options.sourcemap,
|
|
48601
48595
|
name: libOptions ? libOptions.name : undefined,
|
|
48602
48596
|
// es2015 enables `generatedCode.symbols`
|
|
@@ -48837,30 +48831,6 @@ function onRollupWarning(warning, warn, config) {
|
|
|
48837
48831
|
viteWarn(warning);
|
|
48838
48832
|
}
|
|
48839
48833
|
}
|
|
48840
|
-
async function cjsSsrResolveExternal(config, user) {
|
|
48841
|
-
// see if we have cached deps data available
|
|
48842
|
-
let knownImports;
|
|
48843
|
-
const dataPath = path$o.join(getDepsCacheDir(config, false), '_metadata.json');
|
|
48844
|
-
try {
|
|
48845
|
-
const data = JSON.parse(fs$l.readFileSync(dataPath, 'utf-8'));
|
|
48846
|
-
knownImports = Object.keys(data.optimized);
|
|
48847
|
-
}
|
|
48848
|
-
catch (e) { }
|
|
48849
|
-
if (!knownImports) {
|
|
48850
|
-
// no dev deps optimization data, do a fresh scan
|
|
48851
|
-
knownImports = await findKnownImports(config, false); // needs to use non-ssr
|
|
48852
|
-
}
|
|
48853
|
-
const ssrExternals = cjsSsrResolveExternals(config, knownImports);
|
|
48854
|
-
return (id, parentId, isResolved) => {
|
|
48855
|
-
const isExternal = cjsShouldExternalizeForSSR(id, ssrExternals);
|
|
48856
|
-
if (isExternal) {
|
|
48857
|
-
return true;
|
|
48858
|
-
}
|
|
48859
|
-
if (user) {
|
|
48860
|
-
return resolveUserExternal(user, id, parentId, isResolved);
|
|
48861
|
-
}
|
|
48862
|
-
};
|
|
48863
|
-
}
|
|
48864
48834
|
function resolveUserExternal(user, id, parentId, isResolved) {
|
|
48865
48835
|
if (typeof user === 'function') {
|
|
48866
48836
|
return user(id, parentId, isResolved);
|
|
@@ -49848,7 +49818,7 @@ function requireNode () {
|
|
|
49848
49818
|
|
|
49849
49819
|
case 'PIPE':
|
|
49850
49820
|
case 'TCP':
|
|
49851
|
-
var net = require$$
|
|
49821
|
+
var net = require$$4$1;
|
|
49852
49822
|
stream = new net.Socket({
|
|
49853
49823
|
fd: fd,
|
|
49854
49824
|
readable: false,
|
|
@@ -56664,7 +56634,7 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
|
|
|
56664
56634
|
// In node@12+ we can use dynamic import to load CJS and ESM
|
|
56665
56635
|
async function nodeImport(id, importer, resolveOptions) {
|
|
56666
56636
|
let url;
|
|
56667
|
-
if (id.startsWith('
|
|
56637
|
+
if (id.startsWith('data:') || isBuiltin(id)) {
|
|
56668
56638
|
url = id;
|
|
56669
56639
|
}
|
|
56670
56640
|
else {
|
|
@@ -57884,7 +57854,7 @@ function bindCLIShortcuts(server, opts) {
|
|
|
57884
57854
|
if (opts?.print) {
|
|
57885
57855
|
server.config.logger.info(colors$1.dim(colors$1.green(' ➜')) +
|
|
57886
57856
|
colors$1.dim(' press ') +
|
|
57887
|
-
colors$1.bold('h') +
|
|
57857
|
+
colors$1.bold('h + enter') +
|
|
57888
57858
|
colors$1.dim(' to show help'));
|
|
57889
57859
|
}
|
|
57890
57860
|
const shortcuts = (opts?.customShortcuts ?? [])
|
|
@@ -57893,21 +57863,6 @@ function bindCLIShortcuts(server, opts) {
|
|
|
57893
57863
|
.concat(isDev ? BASE_DEV_SHORTCUTS : BASE_PREVIEW_SHORTCUTS);
|
|
57894
57864
|
let actionRunning = false;
|
|
57895
57865
|
const onInput = async (input) => {
|
|
57896
|
-
// ctrl+c or ctrl+d
|
|
57897
|
-
if (input === '\x03' || input === '\x04') {
|
|
57898
|
-
try {
|
|
57899
|
-
if (isDev) {
|
|
57900
|
-
await server.close();
|
|
57901
|
-
}
|
|
57902
|
-
else {
|
|
57903
|
-
server.httpServer.close();
|
|
57904
|
-
}
|
|
57905
|
-
}
|
|
57906
|
-
finally {
|
|
57907
|
-
process.exit(1);
|
|
57908
|
-
}
|
|
57909
|
-
return;
|
|
57910
|
-
}
|
|
57911
57866
|
if (actionRunning)
|
|
57912
57867
|
return;
|
|
57913
57868
|
if (input === 'h') {
|
|
@@ -57915,7 +57870,7 @@ function bindCLIShortcuts(server, opts) {
|
|
|
57915
57870
|
'',
|
|
57916
57871
|
colors$1.bold(' Shortcuts'),
|
|
57917
57872
|
...shortcuts.map((shortcut) => colors$1.dim(' press ') +
|
|
57918
|
-
colors$1.bold(shortcut.key) +
|
|
57873
|
+
colors$1.bold(`${shortcut.key} + enter`) +
|
|
57919
57874
|
colors$1.dim(` to ${shortcut.description}`)),
|
|
57920
57875
|
].join('\n'));
|
|
57921
57876
|
}
|
|
@@ -57926,11 +57881,9 @@ function bindCLIShortcuts(server, opts) {
|
|
|
57926
57881
|
await shortcut.action(server);
|
|
57927
57882
|
actionRunning = false;
|
|
57928
57883
|
};
|
|
57929
|
-
process.stdin
|
|
57930
|
-
|
|
57931
|
-
server.httpServer.on('close', () =>
|
|
57932
|
-
process.stdin.off('data', onInput).pause();
|
|
57933
|
-
});
|
|
57884
|
+
const rl = readline.createInterface({ input: process.stdin });
|
|
57885
|
+
rl.on('line', onInput);
|
|
57886
|
+
server.httpServer.on('close', () => rl.close());
|
|
57934
57887
|
}
|
|
57935
57888
|
function isDevServer(server) {
|
|
57936
57889
|
return 'pluginContainer' in server;
|
|
@@ -58859,12 +58812,21 @@ const { concat, toArrayBuffer, unmask } = bufferUtilExports;
|
|
|
58859
58812
|
const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExports;
|
|
58860
58813
|
|
|
58861
58814
|
const FastBuffer = Buffer[Symbol.species];
|
|
58815
|
+
const promise = Promise.resolve();
|
|
58816
|
+
|
|
58817
|
+
//
|
|
58818
|
+
// `queueMicrotask()` is not available in Node.js < 11.
|
|
58819
|
+
//
|
|
58820
|
+
const queueTask =
|
|
58821
|
+
typeof queueMicrotask === 'function' ? queueMicrotask : queueMicrotaskShim;
|
|
58822
|
+
|
|
58862
58823
|
const GET_INFO = 0;
|
|
58863
58824
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
58864
58825
|
const GET_PAYLOAD_LENGTH_64 = 2;
|
|
58865
58826
|
const GET_MASK = 3;
|
|
58866
58827
|
const GET_DATA = 4;
|
|
58867
58828
|
const INFLATING = 5;
|
|
58829
|
+
const WAIT_MICROTASK = 6;
|
|
58868
58830
|
|
|
58869
58831
|
/**
|
|
58870
58832
|
* HyBi Receiver implementation.
|
|
@@ -59003,9 +58965,19 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
59003
58965
|
case GET_DATA:
|
|
59004
58966
|
err = this.getData(cb);
|
|
59005
58967
|
break;
|
|
58968
|
+
case INFLATING:
|
|
58969
|
+
this._loop = false;
|
|
58970
|
+
return;
|
|
59006
58971
|
default:
|
|
59007
|
-
//
|
|
58972
|
+
//
|
|
58973
|
+
// `WAIT_MICROTASK`.
|
|
58974
|
+
//
|
|
59008
58975
|
this._loop = false;
|
|
58976
|
+
|
|
58977
|
+
queueTask(() => {
|
|
58978
|
+
this._state = GET_INFO;
|
|
58979
|
+
this.startLoop(cb);
|
|
58980
|
+
});
|
|
59009
58981
|
return;
|
|
59010
58982
|
}
|
|
59011
58983
|
} while (this._loop);
|
|
@@ -59388,7 +59360,7 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
59388
59360
|
}
|
|
59389
59361
|
}
|
|
59390
59362
|
|
|
59391
|
-
this._state =
|
|
59363
|
+
this._state = WAIT_MICROTASK;
|
|
59392
59364
|
}
|
|
59393
59365
|
|
|
59394
59366
|
/**
|
|
@@ -59405,6 +59377,8 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
59405
59377
|
if (data.length === 0) {
|
|
59406
59378
|
this.emit('conclude', 1005, EMPTY_BUFFER$2);
|
|
59407
59379
|
this.end();
|
|
59380
|
+
|
|
59381
|
+
this._state = GET_INFO;
|
|
59408
59382
|
} else {
|
|
59409
59383
|
const code = data.readUInt16BE(0);
|
|
59410
59384
|
|
|
@@ -59436,14 +59410,16 @@ let Receiver$1 = class Receiver extends Writable$1 {
|
|
|
59436
59410
|
|
|
59437
59411
|
this.emit('conclude', code, buf);
|
|
59438
59412
|
this.end();
|
|
59413
|
+
|
|
59414
|
+
this._state = GET_INFO;
|
|
59439
59415
|
}
|
|
59440
59416
|
} else if (this._opcode === 0x09) {
|
|
59441
59417
|
this.emit('ping', data);
|
|
59418
|
+
this._state = WAIT_MICROTASK;
|
|
59442
59419
|
} else {
|
|
59443
59420
|
this.emit('pong', data);
|
|
59421
|
+
this._state = WAIT_MICROTASK;
|
|
59444
59422
|
}
|
|
59445
|
-
|
|
59446
|
-
this._state = GET_INFO;
|
|
59447
59423
|
}
|
|
59448
59424
|
};
|
|
59449
59425
|
|
|
@@ -59472,7 +59448,36 @@ function error(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
|
59472
59448
|
return err;
|
|
59473
59449
|
}
|
|
59474
59450
|
|
|
59475
|
-
|
|
59451
|
+
/**
|
|
59452
|
+
* A shim for `queueMicrotask()`.
|
|
59453
|
+
*
|
|
59454
|
+
* @param {Function} cb Callback
|
|
59455
|
+
*/
|
|
59456
|
+
function queueMicrotaskShim(cb) {
|
|
59457
|
+
promise.then(cb).catch(throwErrorNextTick);
|
|
59458
|
+
}
|
|
59459
|
+
|
|
59460
|
+
/**
|
|
59461
|
+
* Throws an error.
|
|
59462
|
+
*
|
|
59463
|
+
* @param {Error} err The error to throw
|
|
59464
|
+
* @private
|
|
59465
|
+
*/
|
|
59466
|
+
function throwError(err) {
|
|
59467
|
+
throw err;
|
|
59468
|
+
}
|
|
59469
|
+
|
|
59470
|
+
/**
|
|
59471
|
+
* Throws an error in the next tick.
|
|
59472
|
+
*
|
|
59473
|
+
* @param {Error} err The error to throw
|
|
59474
|
+
* @private
|
|
59475
|
+
*/
|
|
59476
|
+
function throwErrorNextTick(err) {
|
|
59477
|
+
process.nextTick(throwError, err);
|
|
59478
|
+
}
|
|
59479
|
+
|
|
59480
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */
|
|
59476
59481
|
const { randomFillSync } = require$$3$1;
|
|
59477
59482
|
|
|
59478
59483
|
const PerMessageDeflate$2 = permessageDeflate;
|
|
@@ -59490,7 +59495,7 @@ let Sender$1 = class Sender {
|
|
|
59490
59495
|
/**
|
|
59491
59496
|
* Creates a Sender instance.
|
|
59492
59497
|
*
|
|
59493
|
-
* @param {
|
|
59498
|
+
* @param {Duplex} socket The connection socket
|
|
59494
59499
|
* @param {Object} [extensions] An object containing the negotiated extensions
|
|
59495
59500
|
* @param {Function} [generateMask] The function used to generate the masking
|
|
59496
59501
|
* key
|
|
@@ -60439,13 +60444,13 @@ function format$1(extensions) {
|
|
|
60439
60444
|
|
|
60440
60445
|
var extension$1 = { format: format$1, parse: parse$2 };
|
|
60441
60446
|
|
|
60442
|
-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */
|
|
60447
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$" }] */
|
|
60443
60448
|
|
|
60444
60449
|
const EventEmitter$1 = require$$0$5;
|
|
60445
60450
|
const https$2 = require$$1$2;
|
|
60446
60451
|
const http$3 = require$$1$1;
|
|
60447
|
-
const net = require$$
|
|
60448
|
-
const tls = require$$4$
|
|
60452
|
+
const net = require$$4$1;
|
|
60453
|
+
const tls = require$$4$2;
|
|
60449
60454
|
const { randomBytes, createHash: createHash$1 } = require$$3$1;
|
|
60450
60455
|
const { URL: URL$2 } = require$$0$9;
|
|
60451
60456
|
|
|
@@ -60627,8 +60632,7 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
60627
60632
|
/**
|
|
60628
60633
|
* Set up the socket and the internal resources.
|
|
60629
60634
|
*
|
|
60630
|
-
* @param {
|
|
60631
|
-
* server and client
|
|
60635
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
60632
60636
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
60633
60637
|
* @param {Object} options Options object
|
|
60634
60638
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
@@ -60661,8 +60665,11 @@ let WebSocket$1 = class WebSocket extends EventEmitter$1 {
|
|
|
60661
60665
|
receiver.on('ping', receiverOnPing);
|
|
60662
60666
|
receiver.on('pong', receiverOnPong);
|
|
60663
60667
|
|
|
60664
|
-
|
|
60665
|
-
socket
|
|
60668
|
+
//
|
|
60669
|
+
// These methods may not be available if `socket` is just a `Duplex`.
|
|
60670
|
+
//
|
|
60671
|
+
if (socket.setTimeout) socket.setTimeout(0);
|
|
60672
|
+
if (socket.setNoDelay) socket.setNoDelay();
|
|
60666
60673
|
|
|
60667
60674
|
if (head.length > 0) socket.unshift(head);
|
|
60668
60675
|
|
|
@@ -61105,24 +61112,30 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
61105
61112
|
|
|
61106
61113
|
if (address instanceof URL$2) {
|
|
61107
61114
|
parsedUrl = address;
|
|
61108
|
-
websocket._url = address.href;
|
|
61109
61115
|
} else {
|
|
61110
61116
|
try {
|
|
61111
61117
|
parsedUrl = new URL$2(address);
|
|
61112
61118
|
} catch (e) {
|
|
61113
61119
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
61114
61120
|
}
|
|
61121
|
+
}
|
|
61115
61122
|
|
|
61116
|
-
|
|
61123
|
+
if (parsedUrl.protocol === 'http:') {
|
|
61124
|
+
parsedUrl.protocol = 'ws:';
|
|
61125
|
+
} else if (parsedUrl.protocol === 'https:') {
|
|
61126
|
+
parsedUrl.protocol = 'wss:';
|
|
61117
61127
|
}
|
|
61118
61128
|
|
|
61129
|
+
websocket._url = parsedUrl.href;
|
|
61130
|
+
|
|
61119
61131
|
const isSecure = parsedUrl.protocol === 'wss:';
|
|
61120
61132
|
const isIpcUrl = parsedUrl.protocol === 'ws+unix:';
|
|
61121
61133
|
let invalidUrlMessage;
|
|
61122
61134
|
|
|
61123
61135
|
if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) {
|
|
61124
61136
|
invalidUrlMessage =
|
|
61125
|
-
'The URL\'s protocol must be one of "ws:", "wss:",
|
|
61137
|
+
'The URL\'s protocol must be one of "ws:", "wss:", ' +
|
|
61138
|
+
'"http:", "https", or "ws+unix:"';
|
|
61126
61139
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
61127
61140
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
61128
61141
|
} else if (parsedUrl.hash) {
|
|
@@ -61656,7 +61669,7 @@ function resume(stream) {
|
|
|
61656
61669
|
}
|
|
61657
61670
|
|
|
61658
61671
|
/**
|
|
61659
|
-
* The listener of the
|
|
61672
|
+
* The listener of the socket `'close'` event.
|
|
61660
61673
|
*
|
|
61661
61674
|
* @private
|
|
61662
61675
|
*/
|
|
@@ -61707,7 +61720,7 @@ function socketOnClose() {
|
|
|
61707
61720
|
}
|
|
61708
61721
|
|
|
61709
61722
|
/**
|
|
61710
|
-
* The listener of the
|
|
61723
|
+
* The listener of the socket `'data'` event.
|
|
61711
61724
|
*
|
|
61712
61725
|
* @param {Buffer} chunk A chunk of data
|
|
61713
61726
|
* @private
|
|
@@ -61719,7 +61732,7 @@ function socketOnData(chunk) {
|
|
|
61719
61732
|
}
|
|
61720
61733
|
|
|
61721
61734
|
/**
|
|
61722
|
-
* The listener of the
|
|
61735
|
+
* The listener of the socket `'end'` event.
|
|
61723
61736
|
*
|
|
61724
61737
|
* @private
|
|
61725
61738
|
*/
|
|
@@ -61732,7 +61745,7 @@ function socketOnEnd() {
|
|
|
61732
61745
|
}
|
|
61733
61746
|
|
|
61734
61747
|
/**
|
|
61735
|
-
* The listener of the
|
|
61748
|
+
* The listener of the socket `'error'` event.
|
|
61736
61749
|
*
|
|
61737
61750
|
* @private
|
|
61738
61751
|
*/
|
|
@@ -61809,7 +61822,7 @@ function parse(header) {
|
|
|
61809
61822
|
|
|
61810
61823
|
var subprotocol$1 = { parse };
|
|
61811
61824
|
|
|
61812
|
-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^
|
|
61825
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$" }] */
|
|
61813
61826
|
|
|
61814
61827
|
const EventEmitter = require$$0$5;
|
|
61815
61828
|
const http$2 = require$$1$1;
|
|
@@ -62027,8 +62040,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
62027
62040
|
* Handle a HTTP Upgrade request.
|
|
62028
62041
|
*
|
|
62029
62042
|
* @param {http.IncomingMessage} req The request object
|
|
62030
|
-
* @param {
|
|
62031
|
-
* server and client
|
|
62043
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
62032
62044
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
62033
62045
|
* @param {Function} cb Callback
|
|
62034
62046
|
* @public
|
|
@@ -62152,8 +62164,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
62152
62164
|
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
|
62153
62165
|
* @param {Set} protocols The subprotocols
|
|
62154
62166
|
* @param {http.IncomingMessage} req The request object
|
|
62155
|
-
* @param {
|
|
62156
|
-
* server and client
|
|
62167
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
62157
62168
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
62158
62169
|
* @param {Function} cb Callback
|
|
62159
62170
|
* @throws {Error} If called more than once with the same socket
|
|
@@ -62283,7 +62294,7 @@ function socketOnError() {
|
|
|
62283
62294
|
/**
|
|
62284
62295
|
* Close the connection when preconditions are not fulfilled.
|
|
62285
62296
|
*
|
|
62286
|
-
* @param {
|
|
62297
|
+
* @param {Duplex} socket The socket of the upgrade request
|
|
62287
62298
|
* @param {Number} code The HTTP response status code
|
|
62288
62299
|
* @param {String} [message] The HTTP response body
|
|
62289
62300
|
* @param {Object} [headers] Additional HTTP response headers
|
|
@@ -62324,7 +62335,7 @@ function abortHandshake(socket, code, message, headers) {
|
|
|
62324
62335
|
*
|
|
62325
62336
|
* @param {WebSocketServer} server The WebSocket server
|
|
62326
62337
|
* @param {http.IncomingMessage} req The request object
|
|
62327
|
-
* @param {
|
|
62338
|
+
* @param {Duplex} socket The socket of the upgrade request
|
|
62328
62339
|
* @param {Number} code The HTTP response status code
|
|
62329
62340
|
* @param {String} message The HTTP response body
|
|
62330
62341
|
* @private
|
|
@@ -64893,11 +64904,16 @@ function htmlFallbackMiddleware(root, spaFallback) {
|
|
|
64893
64904
|
return spaFallback ? `/index.html` : request.url;
|
|
64894
64905
|
},
|
|
64895
64906
|
},
|
|
64896
|
-
// don't rewrite paths ending with .html
|
|
64897
64907
|
{
|
|
64898
64908
|
from: /\.html$/,
|
|
64899
|
-
to({ request }) {
|
|
64900
|
-
|
|
64909
|
+
to({ parsedUrl, request }) {
|
|
64910
|
+
// .html files are not handled by serveStaticMiddleware
|
|
64911
|
+
// so we need to check if the file exists
|
|
64912
|
+
const pathname = decodeURIComponent(parsedUrl.pathname);
|
|
64913
|
+
if (fs$l.existsSync(path$o.join(root, pathname))) {
|
|
64914
|
+
return request.url;
|
|
64915
|
+
}
|
|
64916
|
+
return spaFallback ? `/index.html` : request.url;
|
|
64901
64917
|
},
|
|
64902
64918
|
},
|
|
64903
64919
|
],
|
|
@@ -65670,9 +65686,13 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
65670
65686
|
if (httpServer) {
|
|
65671
65687
|
setClientErrorHandler(httpServer, config.logger);
|
|
65672
65688
|
}
|
|
65673
|
-
|
|
65674
|
-
|
|
65675
|
-
|
|
65689
|
+
// eslint-disable-next-line eqeqeq
|
|
65690
|
+
const watchEnabled = serverConfig.watch !== null;
|
|
65691
|
+
const watcher = watchEnabled
|
|
65692
|
+
? chokidar.watch(
|
|
65693
|
+
// config file dependencies and env file might be outside of root
|
|
65694
|
+
[root, ...config.configFileDependencies, config.envDir], resolvedWatchOptions)
|
|
65695
|
+
: createNoopWatcher(resolvedWatchOptions);
|
|
65676
65696
|
const moduleGraph = new ModuleGraph((url, ssr) => container.resolveId(url, undefined, { ssr }));
|
|
65677
65697
|
const container = await createPluginContainer(config, moduleGraph, watcher);
|
|
65678
65698
|
const closeHttpServer = createServerCloseFn(httpServer);
|
|
@@ -65697,9 +65717,6 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
65697
65717
|
if (isDepsOptimizerEnabled(config, true)) {
|
|
65698
65718
|
await initDevSsrDepsOptimizer(config, server);
|
|
65699
65719
|
}
|
|
65700
|
-
if (config.legacy?.buildSsrCjsExternalHeuristics) {
|
|
65701
|
-
await updateCjsSsrExternals(server);
|
|
65702
|
-
}
|
|
65703
65720
|
return ssrLoadModule(url, server, undefined, undefined, opts?.fixStacktrace);
|
|
65704
65721
|
},
|
|
65705
65722
|
ssrFixStacktrace(e) {
|
|
@@ -65785,7 +65802,6 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
65785
65802
|
}
|
|
65786
65803
|
return server._restartPromise;
|
|
65787
65804
|
},
|
|
65788
|
-
_ssrExternals: null,
|
|
65789
65805
|
_restartPromise: null,
|
|
65790
65806
|
_importGlobMap: new Map(),
|
|
65791
65807
|
_forceOptimizeOnRestart: false,
|
|
@@ -66091,26 +66107,6 @@ async function restartServer(server) {
|
|
|
66091
66107
|
bindCLIShortcuts(newServer, shortcutsOptions);
|
|
66092
66108
|
}
|
|
66093
66109
|
}
|
|
66094
|
-
async function updateCjsSsrExternals(server) {
|
|
66095
|
-
if (!server._ssrExternals) {
|
|
66096
|
-
let knownImports = [];
|
|
66097
|
-
// Important! We use the non-ssr optimized deps to find known imports
|
|
66098
|
-
// Only the explicitly defined deps are optimized during dev SSR, so
|
|
66099
|
-
// we use the generated list from the scanned deps in regular dev.
|
|
66100
|
-
// This is part of the v2 externalization heuristics and it is kept
|
|
66101
|
-
// for backwards compatibility in case user needs to fallback to the
|
|
66102
|
-
// legacy scheme. It may be removed in a future v3 minor.
|
|
66103
|
-
const depsOptimizer = getDepsOptimizer(server.config, false); // non-ssr
|
|
66104
|
-
if (depsOptimizer) {
|
|
66105
|
-
await depsOptimizer.scanProcessing;
|
|
66106
|
-
knownImports = [
|
|
66107
|
-
...Object.keys(depsOptimizer.metadata.optimized),
|
|
66108
|
-
...Object.keys(depsOptimizer.metadata.discovered),
|
|
66109
|
-
];
|
|
66110
|
-
}
|
|
66111
|
-
server._ssrExternals = cjsSsrResolveExternals(server.config, knownImports);
|
|
66112
|
-
}
|
|
66113
|
-
}
|
|
66114
66110
|
|
|
66115
66111
|
var index = {
|
|
66116
66112
|
__proto__: null,
|
|
@@ -66301,6 +66297,7 @@ async function preview(inlineConfig = {}) {
|
|
|
66301
66297
|
etag: true,
|
|
66302
66298
|
dev: true,
|
|
66303
66299
|
single: config.appType === 'spa',
|
|
66300
|
+
ignores: false,
|
|
66304
66301
|
setHeaders(res) {
|
|
66305
66302
|
if (headers) {
|
|
66306
66303
|
for (const name in headers) {
|
|
@@ -66340,13 +66337,11 @@ var preview$1 = {
|
|
|
66340
66337
|
resolvePreviewOptions: resolvePreviewOptions
|
|
66341
66338
|
};
|
|
66342
66339
|
|
|
66343
|
-
function resolveSSROptions(ssr, preserveSymlinks
|
|
66340
|
+
function resolveSSROptions(ssr, preserveSymlinks) {
|
|
66344
66341
|
ssr ??= {};
|
|
66345
66342
|
const optimizeDeps = ssr.optimizeDeps ?? {};
|
|
66346
|
-
const format = buildSsrCjsExternalHeuristics ? 'cjs' : 'esm';
|
|
66347
66343
|
const target = 'node';
|
|
66348
66344
|
return {
|
|
66349
|
-
format,
|
|
66350
66345
|
target,
|
|
66351
66346
|
...ssr,
|
|
66352
66347
|
optimizeDeps: {
|
|
@@ -66433,6 +66428,10 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
|
|
|
66433
66428
|
allowClearScreen: config.clearScreen,
|
|
66434
66429
|
customLogger: config.customLogger,
|
|
66435
66430
|
});
|
|
66431
|
+
let foundDiscouragedVariableName;
|
|
66432
|
+
if ((foundDiscouragedVariableName = Object.keys(config.define ?? {}).find((k) => ['process', 'global'].includes(k)))) {
|
|
66433
|
+
logger.warn(colors$1.yellow(`Replacing ${colors$1.bold(foundDiscouragedVariableName)} using the define option is discouraged. See https://vitejs.dev/config/shared-options.html#define for more details.`));
|
|
66434
|
+
}
|
|
66436
66435
|
// resolve root
|
|
66437
66436
|
const resolvedRoot = normalizePath$3(config.root ? path$o.resolve(config.root) : process.cwd());
|
|
66438
66437
|
if (resolvedRoot.includes('#')) {
|
|
@@ -66552,7 +66551,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
|
|
|
66552
66551
|
? path$o.resolve(resolvedRoot, typeof publicDir === 'string' ? publicDir : 'public')
|
|
66553
66552
|
: '';
|
|
66554
66553
|
const server = resolveServerOptions(resolvedRoot, config.server, logger);
|
|
66555
|
-
const ssr = resolveSSROptions(config.ssr, resolveOptions.preserveSymlinks
|
|
66554
|
+
const ssr = resolveSSROptions(config.ssr, resolveOptions.preserveSymlinks);
|
|
66556
66555
|
const middlewareMode = config?.server?.middlewareMode;
|
|
66557
66556
|
const optimizeDeps = config.optimizeDeps || {};
|
|
66558
66557
|
const BASE_URL = resolvedBase;
|
|
@@ -66698,11 +66697,14 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
|
|
|
66698
66697
|
}
|
|
66699
66698
|
}
|
|
66700
66699
|
// Warn about removal of experimental features
|
|
66701
|
-
if (
|
|
66700
|
+
if (
|
|
66701
|
+
// @ts-expect-error Option removed
|
|
66702
|
+
config.legacy?.buildSsrCjsExternalHeuristics ||
|
|
66703
|
+
// @ts-expect-error Option removed
|
|
66702
66704
|
config.ssr?.format === 'cjs') {
|
|
66703
66705
|
resolved.logger.warn(colors$1.yellow(`
|
|
66704
|
-
(!) Experimental legacy.buildSsrCjsExternalHeuristics and ssr.format
|
|
66705
|
-
Find more information
|
|
66706
|
+
(!) Experimental legacy.buildSsrCjsExternalHeuristics and ssr.format were be removed in Vite 5.
|
|
66707
|
+
The only SSR Output format is ESM. Find more information at https://github.com/vitejs/vite/discussions/13816.
|
|
66706
66708
|
`));
|
|
66707
66709
|
}
|
|
66708
66710
|
return resolved;
|
|
@@ -66816,7 +66818,6 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
66816
66818
|
const result = await build$3({
|
|
66817
66819
|
absWorkingDir: process.cwd(),
|
|
66818
66820
|
entryPoints: [fileName],
|
|
66819
|
-
outfile: 'out.js',
|
|
66820
66821
|
write: false,
|
|
66821
66822
|
target: ['node18'],
|
|
66822
66823
|
platform: 'node',
|
|
@@ -66865,11 +66866,13 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
66865
66866
|
build.onResolve({ filter: /^[^.].*/ }, async ({ path: id, importer, kind }) => {
|
|
66866
66867
|
if (kind === 'entry-point' ||
|
|
66867
66868
|
path$o.isAbsolute(id) ||
|
|
66868
|
-
|
|
66869
|
+
isNodeBuiltin(id)) {
|
|
66869
66870
|
return;
|
|
66870
66871
|
}
|
|
66871
|
-
//
|
|
66872
|
-
|
|
66872
|
+
// With the `isNodeBuiltin` check above, this check captures if the builtin is a
|
|
66873
|
+
// non-node built-in, which esbuild doesn't know how to handle. In that case, we
|
|
66874
|
+
// externalize it so the non-node runtime handles it instead.
|
|
66875
|
+
if (isBuiltin(id)) {
|
|
66873
66876
|
return { external: true };
|
|
66874
66877
|
}
|
|
66875
66878
|
const isImport = isESM || kind === 'dynamic-import';
|