vite 6.0.7 → 6.0.9
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/dist/client/client.mjs +14 -8
- package/dist/node/chunks/{dep-BJP6rrE_.js → dep-BdTvomPN.js} +501 -310
- package/dist/node/chunks/{dep-DB1BmmOk.js → dep-BurZv_3i.js} +63 -66
- package/dist/node/chunks/{dep-Cpceb51t.js → dep-CgjxNdwk.js} +1 -1
- package/dist/node/chunks/{dep-DnSxfB-q.js → dep-DcIXjcop.js} +17 -17
- package/dist/node/cli.js +19 -18
- package/dist/node/index.d.ts +49 -2
- package/dist/node/index.js +4 -3
- package/dist/node-cjs/publicUtils.cjs +5 -5
- package/package.json +5 -5
@@ -6,8 +6,9 @@ import require$$1$1, { fileURLToPath as fileURLToPath$1, URL as URL$3, pathToFil
|
|
6
6
|
import { promisify as promisify$4, format as format$2, inspect, stripVTControlCharacters } from 'node:util';
|
7
7
|
import { performance } from 'node:perf_hooks';
|
8
8
|
import require$$0$6, { createRequire as createRequire$1, builtinModules } from 'node:module';
|
9
|
+
import crypto$2 from 'node:crypto';
|
9
10
|
import esbuild, { transform as transform$1, formatMessages, build as build$b } from 'esbuild';
|
10
|
-
import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, wildcardHosts, loopbackHosts, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, DEFAULT_ASSETS_INLINE_LIMIT, ENV_ENTRY,
|
11
|
+
import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, wildcardHosts, loopbackHosts, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, DEFAULT_ASSETS_INLINE_LIMIT, ENV_ENTRY, DEP_VERSION_RE, SPECIAL_QUERY_RE, DEV_PROD_CONDITION, JS_TYPES_RE, KNOWN_ASSET_TYPES, CSS_LANGS_RE, METADATA_FILENAME, ESBUILD_MODULES_TARGET, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, VITE_PACKAGE_DIR, DEFAULT_DEV_PORT, CLIENT_DIR, VERSION, ROLLUP_HOOKS, DEFAULT_PREVIEW_PORT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_SERVER_MAIN_FIELDS, DEFAULT_CLIENT_CONDITIONS, DEFAULT_SERVER_CONDITIONS } from '../constants.js';
|
11
12
|
import require$$0$2, { posix, win32, isAbsolute, resolve as resolve$3, relative as relative$1, basename as basename$1, extname, dirname as dirname$1, join, sep } from 'path';
|
12
13
|
import require$$0$3, { existsSync, readFileSync, statSync, readdirSync } from 'fs';
|
13
14
|
import childProcess$2, { exec, execFile, execSync } from 'node:child_process';
|
@@ -23,7 +24,6 @@ import require$$0$8 from 'stream';
|
|
23
24
|
import require$$2 from 'os';
|
24
25
|
import require$$2$1 from 'child_process';
|
25
26
|
import os$3 from 'node:os';
|
26
|
-
import crypto$2 from 'node:crypto';
|
27
27
|
import { promises } from 'node:dns';
|
28
28
|
import { ModuleRunner, ESModulesEvaluator } from 'vite/module-runner';
|
29
29
|
import { parseAstAsync, parseAst } from 'rollup/parseAst';
|
@@ -40,6 +40,7 @@ import zlib$1 from 'zlib';
|
|
40
40
|
import require$$0$9 from 'buffer';
|
41
41
|
import require$$1$3 from 'https';
|
42
42
|
import require$$4$2 from 'tls';
|
43
|
+
import net$1 from 'node:net';
|
43
44
|
import require$$4$3 from 'assert';
|
44
45
|
import * as qs from 'node:querystring';
|
45
46
|
import { gzip } from 'node:zlib';
|
@@ -1640,7 +1641,7 @@ const parse$h = (input, options) => {
|
|
1640
1641
|
}
|
1641
1642
|
|
1642
1643
|
if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
|
1643
|
-
const end = rest[1] !==
|
1644
|
+
const end = rest[1] !== undefined ? '|$' : '';
|
1644
1645
|
|
1645
1646
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
1646
1647
|
prior.output = `(?:${prior.output}`;
|
@@ -2764,7 +2765,7 @@ const dataToEsm = function dataToEsm(data, options = {}) {
|
|
2764
2765
|
}
|
2765
2766
|
let maxUnderbarPrefixLength = 0;
|
2766
2767
|
for (const key of Object.keys(data)) {
|
2767
|
-
const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a ===
|
2768
|
+
const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === undefined ? undefined : _a[0].length) !== null && _b !== undefined ? _b : 0;
|
2768
2769
|
if (underbarPrefixLength > maxUnderbarPrefixLength) {
|
2769
2770
|
maxUnderbarPrefixLength = underbarPrefixLength;
|
2770
2771
|
}
|
@@ -2842,7 +2843,7 @@ var walker = {};
|
|
2842
2843
|
var utils$8 = {};
|
2843
2844
|
|
2844
2845
|
Object.defineProperty(utils$8, "__esModule", { value: true });
|
2845
|
-
utils$8.normalizePath = utils$8.convertSlashes = utils$8.cleanPath =
|
2846
|
+
utils$8.normalizePath = utils$8.convertSlashes = utils$8.cleanPath = undefined;
|
2846
2847
|
const path_1$4 = require$$0$2;
|
2847
2848
|
function cleanPath(path) {
|
2848
2849
|
let normalized = (0, path_1$4.normalize)(path);
|
@@ -2876,7 +2877,7 @@ utils$8.normalizePath = normalizePath$5;
|
|
2876
2877
|
var joinPath$2 = {};
|
2877
2878
|
|
2878
2879
|
Object.defineProperty(joinPath$2, "__esModule", { value: true });
|
2879
|
-
joinPath$2.build = joinPath$2.joinDirectoryPath = joinPath$2.joinPathWithBasePath =
|
2880
|
+
joinPath$2.build = joinPath$2.joinDirectoryPath = joinPath$2.joinPathWithBasePath = undefined;
|
2880
2881
|
const path_1$3 = require$$0$2;
|
2881
2882
|
const utils_1$1 = utils$8;
|
2882
2883
|
function joinPathWithBasePath(filename, directoryPath) {
|
@@ -2914,7 +2915,7 @@ joinPath$2.build = build$a;
|
|
2914
2915
|
var pushDirectory$2 = {};
|
2915
2916
|
|
2916
2917
|
Object.defineProperty(pushDirectory$2, "__esModule", { value: true });
|
2917
|
-
pushDirectory$2.build =
|
2918
|
+
pushDirectory$2.build = undefined;
|
2918
2919
|
function pushDirectoryWithRelativePath(root) {
|
2919
2920
|
return function (directoryPath, paths) {
|
2920
2921
|
paths.push(directoryPath.substring(root.length) || ".");
|
@@ -2953,7 +2954,7 @@ pushDirectory$2.build = build$9;
|
|
2953
2954
|
var pushFile$2 = {};
|
2954
2955
|
|
2955
2956
|
Object.defineProperty(pushFile$2, "__esModule", { value: true });
|
2956
|
-
pushFile$2.build =
|
2957
|
+
pushFile$2.build = undefined;
|
2957
2958
|
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
2958
2959
|
if (filters.every((filter) => filter(filename, false)))
|
2959
2960
|
counts.files++;
|
@@ -2988,7 +2989,7 @@ pushFile$2.build = build$8;
|
|
2988
2989
|
var getArray$2 = {};
|
2989
2990
|
|
2990
2991
|
Object.defineProperty(getArray$2, "__esModule", { value: true });
|
2991
|
-
getArray$2.build =
|
2992
|
+
getArray$2.build = undefined;
|
2992
2993
|
const getArray$1 = (paths) => {
|
2993
2994
|
return paths;
|
2994
2995
|
};
|
@@ -3003,7 +3004,7 @@ getArray$2.build = build$7;
|
|
3003
3004
|
var groupFiles$2 = {};
|
3004
3005
|
|
3005
3006
|
Object.defineProperty(groupFiles$2, "__esModule", { value: true });
|
3006
|
-
groupFiles$2.build =
|
3007
|
+
groupFiles$2.build = undefined;
|
3007
3008
|
const groupFiles$1 = (groups, directory, files) => {
|
3008
3009
|
groups.push({ directory, files, dir: directory });
|
3009
3010
|
};
|
@@ -3015,11 +3016,11 @@ groupFiles$2.build = build$6;
|
|
3015
3016
|
|
3016
3017
|
var resolveSymlink$1 = {};
|
3017
3018
|
|
3018
|
-
var __importDefault$1 = (resolveSymlink$1
|
3019
|
+
var __importDefault$1 = (resolveSymlink$1.__importDefault) || function (mod) {
|
3019
3020
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
3020
3021
|
};
|
3021
3022
|
Object.defineProperty(resolveSymlink$1, "__esModule", { value: true });
|
3022
|
-
resolveSymlink$1.build =
|
3023
|
+
resolveSymlink$1.build = undefined;
|
3023
3024
|
const fs_1$1 = __importDefault$1(require$$0$3);
|
3024
3025
|
const path_1$2 = require$$0$2;
|
3025
3026
|
const resolveSymlinksAsync = function (path, state, callback) {
|
@@ -3085,7 +3086,7 @@ function isRecursiveUsingRealPaths(resolved, state) {
|
|
3085
3086
|
var invokeCallback$1 = {};
|
3086
3087
|
|
3087
3088
|
Object.defineProperty(invokeCallback$1, "__esModule", { value: true });
|
3088
|
-
invokeCallback$1.build =
|
3089
|
+
invokeCallback$1.build = undefined;
|
3089
3090
|
const onlyCountsSync = (state) => {
|
3090
3091
|
return state.counts;
|
3091
3092
|
};
|
@@ -3143,11 +3144,11 @@ invokeCallback$1.build = build$4;
|
|
3143
3144
|
|
3144
3145
|
var walkDirectory$1 = {};
|
3145
3146
|
|
3146
|
-
var __importDefault = (walkDirectory$1
|
3147
|
+
var __importDefault = (walkDirectory$1.__importDefault) || function (mod) {
|
3147
3148
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
3148
3149
|
};
|
3149
3150
|
Object.defineProperty(walkDirectory$1, "__esModule", { value: true });
|
3150
|
-
walkDirectory$1.build =
|
3151
|
+
walkDirectory$1.build = undefined;
|
3151
3152
|
const fs_1 = __importDefault(require$$0$3);
|
3152
3153
|
const readdirOpts = { withFileTypes: true };
|
3153
3154
|
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback) => {
|
@@ -3186,7 +3187,7 @@ walkDirectory$1.build = build$3;
|
|
3186
3187
|
var queue = {};
|
3187
3188
|
|
3188
3189
|
Object.defineProperty(queue, "__esModule", { value: true });
|
3189
|
-
queue.Queue =
|
3190
|
+
queue.Queue = undefined;
|
3190
3191
|
/**
|
3191
3192
|
* This is a custom stateless queue to track concurrent async fs calls.
|
3192
3193
|
* It increments a counter whenever a call is queued and decrements it
|
@@ -3211,7 +3212,7 @@ queue.Queue = Queue;
|
|
3211
3212
|
var counter = {};
|
3212
3213
|
|
3213
3214
|
Object.defineProperty(counter, "__esModule", { value: true });
|
3214
|
-
counter.Counter =
|
3215
|
+
counter.Counter = undefined;
|
3215
3216
|
class Counter {
|
3216
3217
|
_files = 0;
|
3217
3218
|
_directories = 0;
|
@@ -3237,7 +3238,7 @@ class Counter {
|
|
3237
3238
|
}
|
3238
3239
|
counter.Counter = Counter;
|
3239
3240
|
|
3240
|
-
var __createBinding = (walker
|
3241
|
+
var __createBinding = (walker.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3241
3242
|
if (k2 === undefined) k2 = k;
|
3242
3243
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
3243
3244
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
@@ -3248,12 +3249,12 @@ var __createBinding = (walker && walker.__createBinding) || (Object.create ? (fu
|
|
3248
3249
|
if (k2 === undefined) k2 = k;
|
3249
3250
|
o[k2] = m[k];
|
3250
3251
|
}));
|
3251
|
-
var __setModuleDefault = (walker
|
3252
|
+
var __setModuleDefault = (walker.__setModuleDefault) || (Object.create ? (function(o, v) {
|
3252
3253
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
3253
3254
|
}) : function(o, v) {
|
3254
3255
|
o["default"] = v;
|
3255
3256
|
});
|
3256
|
-
var __importStar = (walker
|
3257
|
+
var __importStar = (walker.__importStar) || function (mod) {
|
3257
3258
|
if (mod && mod.__esModule) return mod;
|
3258
3259
|
var result = {};
|
3259
3260
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
@@ -3261,7 +3262,7 @@ var __importStar = (walker && walker.__importStar) || function (mod) {
|
|
3261
3262
|
return result;
|
3262
3263
|
};
|
3263
3264
|
Object.defineProperty(walker, "__esModule", { value: true });
|
3264
|
-
walker.Walker =
|
3265
|
+
walker.Walker = undefined;
|
3265
3266
|
const path_1$1 = require$$0$2;
|
3266
3267
|
const utils_1 = utils$8;
|
3267
3268
|
const joinPath = __importStar(joinPath$2);
|
@@ -3362,7 +3363,7 @@ class Walker {
|
|
3362
3363
|
walker.Walker = Walker;
|
3363
3364
|
|
3364
3365
|
Object.defineProperty(async, "__esModule", { value: true });
|
3365
|
-
async.callback = async.promise =
|
3366
|
+
async.callback = async.promise = undefined;
|
3366
3367
|
const walker_1$1 = walker;
|
3367
3368
|
function promise(root, options) {
|
3368
3369
|
return new Promise((resolve, reject) => {
|
@@ -3383,7 +3384,7 @@ async.callback = callback;
|
|
3383
3384
|
var sync$2 = {};
|
3384
3385
|
|
3385
3386
|
Object.defineProperty(sync$2, "__esModule", { value: true });
|
3386
|
-
sync$2.sync =
|
3387
|
+
sync$2.sync = undefined;
|
3387
3388
|
const walker_1 = walker;
|
3388
3389
|
function sync$1(root, options) {
|
3389
3390
|
const walker = new walker_1.Walker(root, options);
|
@@ -3392,7 +3393,7 @@ function sync$1(root, options) {
|
|
3392
3393
|
sync$2.sync = sync$1;
|
3393
3394
|
|
3394
3395
|
Object.defineProperty(apiBuilder, "__esModule", { value: true });
|
3395
|
-
apiBuilder.APIBuilder =
|
3396
|
+
apiBuilder.APIBuilder = undefined;
|
3396
3397
|
const async_1 = async;
|
3397
3398
|
const sync_1 = sync$2;
|
3398
3399
|
class APIBuilder {
|
@@ -3415,7 +3416,7 @@ class APIBuilder {
|
|
3415
3416
|
apiBuilder.APIBuilder = APIBuilder;
|
3416
3417
|
|
3417
3418
|
Object.defineProperty(builder, "__esModule", { value: true });
|
3418
|
-
builder.Builder =
|
3419
|
+
builder.Builder = undefined;
|
3419
3420
|
const path_1 = require$$0$2;
|
3420
3421
|
const api_builder_1 = apiBuilder;
|
3421
3422
|
var pm = null;
|
@@ -3555,7 +3556,7 @@ var types$1 = {};
|
|
3555
3556
|
Object.defineProperty(types$1, "__esModule", { value: true });
|
3556
3557
|
|
3557
3558
|
(function (exports) {
|
3558
|
-
var __createBinding = (dist
|
3559
|
+
var __createBinding = (dist.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3559
3560
|
if (k2 === undefined) k2 = k;
|
3560
3561
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
3561
3562
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
@@ -3566,11 +3567,11 @@ Object.defineProperty(types$1, "__esModule", { value: true });
|
|
3566
3567
|
if (k2 === undefined) k2 = k;
|
3567
3568
|
o[k2] = m[k];
|
3568
3569
|
}));
|
3569
|
-
var __exportStar = (dist
|
3570
|
+
var __exportStar = (dist.__exportStar) || function(m, exports) {
|
3570
3571
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
3571
3572
|
};
|
3572
3573
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3573
|
-
exports.fdir =
|
3574
|
+
exports.fdir = undefined;
|
3574
3575
|
const builder_1 = builder;
|
3575
3576
|
Object.defineProperty(exports, "fdir", { enumerable: true, get: function () { return builder_1.Builder; } });
|
3576
3577
|
__exportStar(types$1, exports);
|
@@ -3599,7 +3600,7 @@ function decodeInteger(reader, relative) {
|
|
3599
3600
|
const shouldNegate = value & 1;
|
3600
3601
|
value >>>= 1;
|
3601
3602
|
if (shouldNegate) {
|
3602
|
-
value = -
|
3603
|
+
value = -2147483648 | -value;
|
3603
3604
|
}
|
3604
3605
|
return relative + value;
|
3605
3606
|
}
|
@@ -7814,7 +7815,7 @@ function cast$2(map) {
|
|
7814
7815
|
function encodedMappings(map) {
|
7815
7816
|
var _a;
|
7816
7817
|
var _b;
|
7817
|
-
return ((_a = (_b = cast$2(map))._encoded) !== null && _a !==
|
7818
|
+
return ((_a = (_b = cast$2(map))._encoded) !== null && _a !== undefined ? _a : (_b._encoded = encode$1(cast$2(map)._decoded)));
|
7818
7819
|
}
|
7819
7820
|
/**
|
7820
7821
|
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
|
@@ -8308,7 +8309,7 @@ class SourceMap {
|
|
8308
8309
|
* VLQ encoded) mappings.
|
8309
8310
|
*/
|
8310
8311
|
function remapping(input, loader, options) {
|
8311
|
-
const opts = { excludeContent:
|
8312
|
+
const opts = { excludeContent: false, decodedMappings: false };
|
8312
8313
|
const tree = buildSourceMapTree(input, loader);
|
8313
8314
|
return new SourceMap(traceMappings(tree), opts);
|
8314
8315
|
}
|
@@ -9879,7 +9880,7 @@ function numberToPos(source, offset) {
|
|
9879
9880
|
function generateCodeFrame(source, start = 0, end) {
|
9880
9881
|
start = Math.max(posToNumber(source, start), 0);
|
9881
9882
|
end = Math.min(
|
9882
|
-
end !==
|
9883
|
+
end !== undefined ? posToNumber(source, end) : start,
|
9883
9884
|
source.length
|
9884
9885
|
);
|
9885
9886
|
const lines = source.split(splitRE);
|
@@ -10135,7 +10136,7 @@ function combineSourcemaps(filename, sourcemapList) {
|
|
10135
10136
|
});
|
10136
10137
|
let map;
|
10137
10138
|
let mapIndex = 1;
|
10138
|
-
const useArrayInterface = sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) ===
|
10139
|
+
const useArrayInterface = sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) === undefined;
|
10139
10140
|
if (useArrayInterface) {
|
10140
10141
|
map = remapping(sourcemapList, () => null);
|
10141
10142
|
} else {
|
@@ -10166,21 +10167,21 @@ async function getLocalhostAddressIfDiffersFromDNS() {
|
|
10166
10167
|
promises.lookup("localhost", { verbatim: true })
|
10167
10168
|
]);
|
10168
10169
|
const isSame = nodeResult.family === dnsResult.family && nodeResult.address === dnsResult.address;
|
10169
|
-
return isSame ?
|
10170
|
+
return isSame ? undefined : nodeResult.address;
|
10170
10171
|
}
|
10171
10172
|
function diffDnsOrderChange(oldUrls, newUrls) {
|
10172
10173
|
return !(oldUrls === newUrls || oldUrls && newUrls && arrayEqual(oldUrls.local, newUrls.local) && arrayEqual(oldUrls.network, newUrls.network));
|
10173
10174
|
}
|
10174
10175
|
async function resolveHostname(optionsHost) {
|
10175
10176
|
let host;
|
10176
|
-
if (optionsHost ===
|
10177
|
+
if (optionsHost === undefined || optionsHost === false) {
|
10177
10178
|
host = "localhost";
|
10178
10179
|
} else if (optionsHost === true) {
|
10179
|
-
host =
|
10180
|
+
host = undefined;
|
10180
10181
|
} else {
|
10181
10182
|
host = optionsHost;
|
10182
10183
|
}
|
10183
|
-
let name = host ===
|
10184
|
+
let name = host === undefined || wildcardHosts.has(host) ? "localhost" : host;
|
10184
10185
|
if (host === "localhost") {
|
10185
10186
|
const localhostAddr = await getLocalhostAddressIfDiffersFromDNS();
|
10186
10187
|
if (localhostAddr) {
|
@@ -10201,7 +10202,7 @@ async function resolveServerUrls(server, options, config) {
|
|
10201
10202
|
const protocol = options.https ? "https" : "http";
|
10202
10203
|
const port = address.port;
|
10203
10204
|
const base = config.rawBase === "./" || config.rawBase === "" ? "/" : config.rawBase;
|
10204
|
-
if (hostname.host !==
|
10205
|
+
if (hostname.host !== undefined && !wildcardHosts.has(hostname.host)) {
|
10205
10206
|
let hostnameName = hostname.name;
|
10206
10207
|
if (hostnameName.includes(":")) {
|
10207
10208
|
hostnameName = `[${hostnameName}]`;
|
@@ -10295,9 +10296,9 @@ function mergeWithDefaultsRecursively(defaults, values) {
|
|
10295
10296
|
const merged = defaults;
|
10296
10297
|
for (const key in values) {
|
10297
10298
|
const value = values[key];
|
10298
|
-
if (value ===
|
10299
|
+
if (value === undefined) continue;
|
10299
10300
|
const existing = merged[key];
|
10300
|
-
if (existing ===
|
10301
|
+
if (existing === undefined) {
|
10301
10302
|
merged[key] = value;
|
10302
10303
|
continue;
|
10303
10304
|
}
|
@@ -10515,7 +10516,7 @@ function createSerialPromiseQueue() {
|
|
10515
10516
|
previousTask = depTasks;
|
10516
10517
|
const [, result] = await depTasks;
|
10517
10518
|
if (previousTask === depTasks) {
|
10518
|
-
previousTask =
|
10519
|
+
previousTask = undefined;
|
10519
10520
|
}
|
10520
10521
|
return result;
|
10521
10522
|
}
|
@@ -10536,9 +10537,12 @@ function displayTime(time) {
|
|
10536
10537
|
if (time < 60) {
|
10537
10538
|
return `${time.toFixed(2)}s`;
|
10538
10539
|
}
|
10539
|
-
const mins =
|
10540
|
-
const seconds = time % 60;
|
10541
|
-
|
10540
|
+
const mins = Math.floor(time / 60);
|
10541
|
+
const seconds = Math.round(time % 60);
|
10542
|
+
if (seconds === 60) {
|
10543
|
+
return `${mins + 1}m`;
|
10544
|
+
}
|
10545
|
+
return `${mins}m${seconds < 1 ? "" : ` ${seconds}s`}`;
|
10542
10546
|
}
|
10543
10547
|
function encodeURIPath(uri) {
|
10544
10548
|
if (uri.startsWith("data:")) return uri;
|
@@ -10552,16 +10556,26 @@ function partialEncodeURIPath(uri) {
|
|
10552
10556
|
const postfix = filePath !== uri ? uri.slice(filePath.length) : "";
|
10553
10557
|
return filePath.replaceAll("%", "%25") + postfix;
|
10554
10558
|
}
|
10559
|
+
const sigtermCallbacks = /* @__PURE__ */ new Set();
|
10560
|
+
const parentSigtermCallback = async (signal, exitCode) => {
|
10561
|
+
await Promise.all([...sigtermCallbacks].map((cb) => cb(signal, exitCode)));
|
10562
|
+
};
|
10555
10563
|
const setupSIGTERMListener = (callback) => {
|
10556
|
-
|
10557
|
-
|
10558
|
-
process.
|
10564
|
+
if (sigtermCallbacks.size === 0) {
|
10565
|
+
process.once("SIGTERM", parentSigtermCallback);
|
10566
|
+
if (process.env.CI !== "true") {
|
10567
|
+
process.stdin.on("end", parentSigtermCallback);
|
10568
|
+
}
|
10559
10569
|
}
|
10570
|
+
sigtermCallbacks.add(callback);
|
10560
10571
|
};
|
10561
10572
|
const teardownSIGTERMListener = (callback) => {
|
10562
|
-
|
10563
|
-
if (
|
10564
|
-
process.
|
10573
|
+
sigtermCallbacks.delete(callback);
|
10574
|
+
if (sigtermCallbacks.size === 0) {
|
10575
|
+
process.off("SIGTERM", parentSigtermCallback);
|
10576
|
+
if (process.env.CI !== "true") {
|
10577
|
+
process.stdin.off("end", parentSigtermCallback);
|
10578
|
+
}
|
10565
10579
|
}
|
10566
10580
|
};
|
10567
10581
|
|
@@ -10583,7 +10597,7 @@ function clearScreen() {
|
|
10583
10597
|
}
|
10584
10598
|
let timeFormatter;
|
10585
10599
|
function getTimeFormatter() {
|
10586
|
-
timeFormatter ??= new Intl.DateTimeFormat(
|
10600
|
+
timeFormatter ??= new Intl.DateTimeFormat(undefined, {
|
10587
10601
|
hour: "numeric",
|
10588
10602
|
minute: "numeric",
|
10589
10603
|
second: "numeric"
|
@@ -10687,7 +10701,7 @@ function printServerUrls(urls, optionsHost, info) {
|
|
10687
10701
|
for (const url of urls.network) {
|
10688
10702
|
info(` ${colors$1.green("\u279C")} ${colors$1.bold("Network")}: ${colorUrl(url)}`);
|
10689
10703
|
}
|
10690
|
-
if (urls.network.length === 0 && optionsHost ===
|
10704
|
+
if (urls.network.length === 0 && optionsHost === undefined) {
|
10691
10705
|
info(
|
10692
10706
|
colors$1.dim(` ${colors$1.green("\u279C")} ${colors$1.bold("Network")}: use `) + colors$1.bold("--host") + colors$1.dim(" to expose")
|
10693
10707
|
);
|
@@ -12151,14 +12165,14 @@ async function transformWithEsbuild(code, filename, options, inMap, config, watc
|
|
12151
12165
|
...compilerOptionsForFile,
|
12152
12166
|
...tsconfigRaw?.compilerOptions
|
12153
12167
|
};
|
12154
|
-
if (compilerOptions.useDefineForClassFields ===
|
12168
|
+
if (compilerOptions.useDefineForClassFields === undefined && compilerOptions.target === undefined) {
|
12155
12169
|
compilerOptions.useDefineForClassFields = false;
|
12156
12170
|
}
|
12157
12171
|
if (options) {
|
12158
|
-
if (options.jsx) compilerOptions.jsx =
|
12159
|
-
if (options.jsxFactory) compilerOptions.jsxFactory =
|
12160
|
-
if (options.jsxFragment) compilerOptions.jsxFragmentFactory =
|
12161
|
-
if (options.jsxImportSource) compilerOptions.jsxImportSource =
|
12172
|
+
if (options.jsx) compilerOptions.jsx = undefined;
|
12173
|
+
if (options.jsxFactory) compilerOptions.jsxFactory = undefined;
|
12174
|
+
if (options.jsxFragment) compilerOptions.jsxFragmentFactory = undefined;
|
12175
|
+
if (options.jsxImportSource) compilerOptions.jsxImportSource = undefined;
|
12162
12176
|
}
|
12163
12177
|
tsconfigRaw = {
|
12164
12178
|
...tsconfigRaw,
|
@@ -12243,7 +12257,7 @@ function esbuildPlugin(config) {
|
|
12243
12257
|
code,
|
12244
12258
|
id,
|
12245
12259
|
transformOptions,
|
12246
|
-
|
12260
|
+
undefined,
|
12247
12261
|
config,
|
12248
12262
|
server?.watcher
|
12249
12263
|
);
|
@@ -12274,7 +12288,7 @@ const rollupToEsbuildFormatMap = {
|
|
12274
12288
|
// that `{ treeShaking: true }` removes a top-level no-side-effect variable
|
12275
12289
|
// like: `var Lib = 1`, which becomes `` after esbuild transforming,
|
12276
12290
|
// but thankfully rollup does not do this optimization now
|
12277
|
-
iife:
|
12291
|
+
iife: undefined
|
12278
12292
|
};
|
12279
12293
|
const buildEsbuildPlugin = () => {
|
12280
12294
|
return {
|
@@ -12295,7 +12309,7 @@ const buildEsbuildPlugin = () => {
|
|
12295
12309
|
code,
|
12296
12310
|
chunk.fileName,
|
12297
12311
|
options,
|
12298
|
-
|
12312
|
+
undefined,
|
12299
12313
|
config
|
12300
12314
|
);
|
12301
12315
|
if (config.build.lib) {
|
@@ -12322,7 +12336,7 @@ function resolveEsbuildTranspileOptions(config, format) {
|
|
12322
12336
|
charset: "utf8",
|
12323
12337
|
...esbuildOptions,
|
12324
12338
|
loader: "js",
|
12325
|
-
target: target ||
|
12339
|
+
target: target || undefined,
|
12326
12340
|
format: rollupToEsbuildFormatMap[format],
|
12327
12341
|
supported: {
|
12328
12342
|
...defaultEsbuildSupported,
|
@@ -12772,7 +12786,7 @@ var WorkerWithFallback = class {
|
|
12772
12786
|
/** @internal */
|
12773
12787
|
_shouldUseFake;
|
12774
12788
|
constructor(fn, options) {
|
12775
|
-
this._disableReal = options.max !==
|
12789
|
+
this._disableReal = options.max !== undefined && options.max <= 0;
|
12776
12790
|
this._realWorker = new Worker(fn, options);
|
12777
12791
|
this._fakeWorker = new FakeWorker(fn, options);
|
12778
12792
|
this._shouldUseFake = options.shouldUseFake;
|
@@ -13353,13 +13367,13 @@ function checkPublicFile(url, config) {
|
|
13353
13367
|
const fileName = cleanUrl(url);
|
13354
13368
|
const publicFiles = getPublicFiles(config);
|
13355
13369
|
if (publicFiles) {
|
13356
|
-
return publicFiles.has(fileName) ? normalizePath$3(path$d.join(publicDir, fileName)) :
|
13370
|
+
return publicFiles.has(fileName) ? normalizePath$3(path$d.join(publicDir, fileName)) : undefined;
|
13357
13371
|
}
|
13358
13372
|
const publicFile = normalizePath$3(path$d.join(publicDir, fileName));
|
13359
13373
|
if (!publicFile.startsWith(withTrailingSlash(publicDir))) {
|
13360
13374
|
return;
|
13361
13375
|
}
|
13362
|
-
return fs__default.existsSync(publicFile) ? publicFile :
|
13376
|
+
return fs__default.existsSync(publicFile) ? publicFile : undefined;
|
13363
13377
|
}
|
13364
13378
|
|
13365
13379
|
const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g;
|
@@ -13467,7 +13481,7 @@ function assetPlugin(config) {
|
|
13467
13481
|
// Force rollup to keep this module from being shared between other entry points if it's an entrypoint.
|
13468
13482
|
// If the resulting chunk is empty, it will be removed in generateBundle.
|
13469
13483
|
moduleSideEffects: config.command === "build" && this.getModuleInfo(id)?.isEntry ? "no-treeshake" : false,
|
13470
|
-
meta: config.command === "build" ? { "vite:asset": true } :
|
13484
|
+
meta: config.command === "build" ? { "vite:asset": true } : undefined
|
13471
13485
|
};
|
13472
13486
|
},
|
13473
13487
|
renderChunk(code, chunk, opts) {
|
@@ -13517,7 +13531,7 @@ async function fileToDevUrl(environment, id, skipBase = false) {
|
|
13517
13531
|
if (svgExtRE.test(id)) {
|
13518
13532
|
const file = publicFile || cleanUrl(id);
|
13519
13533
|
const content = await fsp.readFile(file);
|
13520
|
-
if (shouldInline(environment, file, id, content,
|
13534
|
+
if (shouldInline(environment, file, id, content, undefined, undefined)) {
|
13521
13535
|
return assetToDataURL(environment, file, content);
|
13522
13536
|
}
|
13523
13537
|
}
|
@@ -13620,7 +13634,7 @@ function shouldInline(environment, file, id, content, buildPluginContext, forceI
|
|
13620
13634
|
if (environment.config.build.lib) return true;
|
13621
13635
|
if (buildPluginContext.getModuleInfo(id)?.isEntry) return false;
|
13622
13636
|
}
|
13623
|
-
if (forceInline !==
|
13637
|
+
if (forceInline !== undefined) return forceInline;
|
13624
13638
|
if (file.endsWith(".html")) return false;
|
13625
13639
|
if (file.endsWith(".svg") && id.includes("#")) return false;
|
13626
13640
|
let limit;
|
@@ -13688,7 +13702,7 @@ function manifestPlugin() {
|
|
13688
13702
|
function getInternalImports(imports) {
|
13689
13703
|
const filteredImports = [];
|
13690
13704
|
for (const file of imports) {
|
13691
|
-
if (bundle[file] ===
|
13705
|
+
if (bundle[file] === undefined) {
|
13692
13706
|
continue;
|
13693
13707
|
}
|
13694
13708
|
filteredImports.push(getChunkName(bundle[file]));
|
@@ -13773,7 +13787,7 @@ function manifestPlugin() {
|
|
13773
13787
|
this.emitFile({
|
13774
13788
|
fileName: typeof buildOptions.manifest === "string" ? buildOptions.manifest : ".vite/manifest.json",
|
13775
13789
|
type: "asset",
|
13776
|
-
source: JSON.stringify(sortObjectKeys(manifest),
|
13790
|
+
source: JSON.stringify(sortObjectKeys(manifest), undefined, 2)
|
13777
13791
|
});
|
13778
13792
|
}
|
13779
13793
|
}
|
@@ -13784,7 +13798,7 @@ function getChunkOriginalFileName(chunk, root, format) {
|
|
13784
13798
|
let name = normalizePath$3(path$d.relative(root, chunk.facadeModuleId));
|
13785
13799
|
if (format === "system" && !chunk.name.includes("-legacy")) {
|
13786
13800
|
const ext = path$d.extname(name);
|
13787
|
-
const endPos = ext.length !== 0 ? -ext.length :
|
13801
|
+
const endPos = ext.length !== 0 ? -ext.length : undefined;
|
13788
13802
|
name = `${name.slice(0, endPos)}-legacy${ext}`;
|
13789
13803
|
}
|
13790
13804
|
return name.replace(/\0/g, "");
|
@@ -13832,8 +13846,8 @@ function dataURIPlugin() {
|
|
13832
13846
|
};
|
13833
13847
|
}
|
13834
13848
|
|
13835
|
-
/* es-module-lexer 1.
|
13836
|
-
var ImportType;!function(A){A[A.Static=1]="Static",A[A.Dynamic=2]="Dynamic",A[A.ImportMeta=3]="ImportMeta",A[A.StaticSourcePhase=4]="StaticSourcePhase",A[A.DynamicSourcePhase=5]="DynamicSourcePhase";}(ImportType||(ImportType={}));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,w=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;w>0&&C.memory.grow(Math.ceil(w/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=[],o=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.it(),g=C.ai(),I=C.id(),w=C.ss(),K=C.se();let o;C.ip()&&(o=k(E.slice(-1===I?A-1:A,-1===I?Q+1:Q))),D.push({n:o,t:B,s:A,e:Q,ss:w,se:K,d:I,a:g});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),w=I[0],K=B<0?void 0:E.slice(B,g),D=K?K[0]:"";o.push({s:A,e:Q,ls:B,le:g,n:'"'===w||"'"===w?k(I):I,ln:'"'===D||"'"===D?k(K):K});}function k(A){try{return (0, eval)(A)}catch(A){}}return [D,o,!!C.f(),!!C.ms()]}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="AGFzbQEAAAABKwhgAX8Bf2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0EAIAJBBGo2ArAKQQEQKSECQQAoArAKIQUCQAJAIAJBIkYNACACQSdGDQAgAhAsGkEAKAKwCiEEDAELIAIQGkEAQQAoArAKQQJqIgQ2ArAKC0EBECkhA0EAKAKwCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKwCiEAQQAoArQKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKwChAlQQAPC0EAIAI2ArAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=","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;
|
13849
|
+
/* es-module-lexer 1.6.0 */
|
13850
|
+
var ImportType;!function(A){A[A.Static=1]="Static",A[A.Dynamic=2]="Dynamic",A[A.ImportMeta=3]="ImportMeta",A[A.StaticSourcePhase=4]="StaticSourcePhase",A[A.DynamicSourcePhase=5]="DynamicSourcePhase";}(ImportType||(ImportType={}));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,w=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;w>0&&C.memory.grow(Math.ceil(w/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 o=[],D=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.it(),g=C.ai(),I=C.id(),w=C.ss(),K=C.se();let D;C.ip()&&(D=k(E.slice(-1===I?A-1:A,-1===I?Q+1:Q))),o.push({n:D,t:B,s:A,e:Q,ss:w,se:K,d:I,a:g});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),w=I[0],K=B<0?undefined:E.slice(B,g),o=K?K[0]:"";D.push({s:A,e:Q,ls:B,le:g,n:'"'===w||"'"===w?k(I):I,ln:'"'===o||"'"===o?k(K):K});}function k(A){try{return (0, eval)(A)}catch(A){}}return [o,D,!!C.f(),!!C.ms()]}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 E=()=>{return A="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKm0Ew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Qd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=","undefined"!=typeof Buffer?Buffer.from(A,"base64"):Uint8Array.from(atob(A),(A=>A.charCodeAt(0)));var A;};const init=WebAssembly.compile(E()).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));
|
13837
13851
|
|
13838
13852
|
var convertSourceMap$1 = {};
|
13839
13853
|
|
@@ -14144,7 +14158,7 @@ function getCodeWithSourcemap(type, code, map) {
|
|
14144
14158
|
}
|
14145
14159
|
function applySourcemapIgnoreList(map, sourcemapPath, sourcemapIgnoreList, logger) {
|
14146
14160
|
let { x_google_ignoreList } = map;
|
14147
|
-
if (x_google_ignoreList ===
|
14161
|
+
if (x_google_ignoreList === undefined) {
|
14148
14162
|
x_google_ignoreList = [];
|
14149
14163
|
}
|
14150
14164
|
for (let sourcesIndex = 0; sourcesIndex < map.sources.length; ++sourcesIndex) {
|
@@ -15067,7 +15081,7 @@ function normalizePattern(pattern, expandDirectories, cwd, properties, isIgnore)
|
|
15067
15081
|
result = posix.normalize(result);
|
15068
15082
|
}
|
15069
15083
|
const parentDirectoryMatch = /^(\/?\.\.)+/.exec(result);
|
15070
|
-
if (parentDirectoryMatch == null ?
|
15084
|
+
if (parentDirectoryMatch == null ? undefined : parentDirectoryMatch[0]) {
|
15071
15085
|
const potentialRoot = posix.join(cwd, parentDirectoryMatch[0]);
|
15072
15086
|
if (properties.root.length > potentialRoot.length) {
|
15073
15087
|
properties.root = potentialRoot;
|
@@ -15182,7 +15196,7 @@ function crawl(options, cwd, sync) {
|
|
15182
15196
|
return sync ? api.sync().map((p) => getRelativePath(p, cwd, properties.root) + (!p || p.endsWith("/") ? "/" : "")) : api.withPromise().then((paths) => paths.map((p) => getRelativePath(p, cwd, properties.root) + (!p || p.endsWith("/") ? "/" : "")));
|
15183
15197
|
}
|
15184
15198
|
async function glob(patternsOrOptions, options) {
|
15185
|
-
if (patternsOrOptions && (options == null ?
|
15199
|
+
if (patternsOrOptions && (options == null ? undefined : options.patterns)) {
|
15186
15200
|
throw new Error("Cannot pass patterns as both an argument and an option");
|
15187
15201
|
}
|
15188
15202
|
const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions;
|
@@ -15190,7 +15204,7 @@ async function glob(patternsOrOptions, options) {
|
|
15190
15204
|
return crawl(opts, cwd, false);
|
15191
15205
|
}
|
15192
15206
|
function globSync(patternsOrOptions, options) {
|
15193
|
-
if (patternsOrOptions && (options == null ?
|
15207
|
+
if (patternsOrOptions && (options == null ? undefined : options.patterns)) {
|
15194
15208
|
throw new Error("Cannot pass patterns as both an argument and an option");
|
15195
15209
|
}
|
15196
15210
|
const opts = Array.isArray(patternsOrOptions) || typeof patternsOrOptions === "string" ? { ...options, patterns: patternsOrOptions } : patternsOrOptions;
|
@@ -15258,7 +15272,7 @@ function alias$1(options = {}) {
|
|
15258
15272
|
return {
|
15259
15273
|
name: 'alias',
|
15260
15274
|
async buildStart(inputOptions) {
|
15261
|
-
await Promise.all([...(Array.isArray(options.entries) ? options.entries : []), options].map(({ customResolver }) => { var _a; return customResolver && ((_a = getHookFunction(customResolver.buildStart)) === null || _a ===
|
15275
|
+
await Promise.all([...(Array.isArray(options.entries) ? options.entries : []), options].map(({ customResolver }) => { var _a; return customResolver && ((_a = getHookFunction(customResolver.buildStart)) === null || _a === undefined ? undefined : _a.call(this, inputOptions)); }));
|
15262
15276
|
},
|
15263
15277
|
resolveId(importee, importer, resolveOptions) {
|
15264
15278
|
// First match is supposed to be the correct one
|
@@ -15284,7 +15298,7 @@ function alias$1(options = {}) {
|
|
15284
15298
|
};
|
15285
15299
|
}
|
15286
15300
|
|
15287
|
-
function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(
|
15301
|
+
function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(undefined===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("*",1),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)+"$").exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):f.test(r)?r+n:r;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:"./"===f.slice(0,2)?f:"./"+f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}function f(e,r,t){if(e.imports)return n(e.name,e.imports,r,t)}
|
15288
15302
|
|
15289
15303
|
const HASH_RE = /#/g;
|
15290
15304
|
const AMPERSAND_RE = /&/g;
|
@@ -15317,7 +15331,7 @@ function encodeQueryItem(key, value) {
|
|
15317
15331
|
return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;
|
15318
15332
|
}
|
15319
15333
|
function stringifyQuery(query) {
|
15320
|
-
return Object.keys(query).filter((k) => query[k] !==
|
15334
|
+
return Object.keys(query).filter((k) => query[k] !== undefined).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&");
|
15321
15335
|
}
|
15322
15336
|
|
15323
15337
|
new Set(builtinModules);
|
@@ -15327,7 +15341,7 @@ function clearImports(imports) {
|
|
15327
15341
|
function getImportNames(cleanedImports) {
|
15328
15342
|
const topLevelImports = cleanedImports.replace(/{([^}]*)}/, "");
|
15329
15343
|
const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1];
|
15330
|
-
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() ||
|
15344
|
+
const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || undefined;
|
15331
15345
|
return {
|
15332
15346
|
namespacedImport,
|
15333
15347
|
defaultImport
|
@@ -15882,7 +15896,7 @@ function createIsConfiguredAsExternal(environment) {
|
|
15882
15896
|
const { config } = environment;
|
15883
15897
|
const { root, resolve } = config;
|
15884
15898
|
const { external, noExternal } = resolve;
|
15885
|
-
const noExternalFilter = typeof noExternal !== "boolean" && !(Array.isArray(noExternal) && noExternal.length === 0) && createFilter(
|
15899
|
+
const noExternalFilter = typeof noExternal !== "boolean" && !(Array.isArray(noExternal) && noExternal.length === 0) && createFilter(undefined, noExternal, { resolve: false });
|
15886
15900
|
const targetConditions = resolve.externalConditions;
|
15887
15901
|
const resolveOptions = {
|
15888
15902
|
...resolve,
|
@@ -15900,9 +15914,9 @@ function createIsConfiguredAsExternal(environment) {
|
|
15900
15914
|
id,
|
15901
15915
|
// Skip passing importer in build to avoid externalizing non-hoisted dependencies
|
15902
15916
|
// unresolvable from root (which would be unresolvable from output bundles also)
|
15903
|
-
config.command === "build" ?
|
15917
|
+
config.command === "build" ? undefined : importer,
|
15904
15918
|
resolveOptions,
|
15905
|
-
|
15919
|
+
undefined,
|
15906
15920
|
false
|
15907
15921
|
);
|
15908
15922
|
if (!resolved) {
|
@@ -15987,7 +16001,7 @@ function resolvePlugin(resolveOptions) {
|
|
15987
16001
|
id.startsWith("/virtual:")) {
|
15988
16002
|
return;
|
15989
16003
|
}
|
15990
|
-
const depsOptimizer = resolveOptions.optimizeDeps && this.environment.mode === "dev" ? this.environment.depsOptimizer :
|
16004
|
+
const depsOptimizer = resolveOptions.optimizeDeps && this.environment.mode === "dev" ? this.environment.depsOptimizer : undefined;
|
15991
16005
|
if (id.startsWith(browserExternalId)) {
|
15992
16006
|
return id;
|
15993
16007
|
}
|
@@ -16483,7 +16497,7 @@ function resolveExportsOrImports(pkg, key, options, type) {
|
|
16483
16497
|
}
|
16484
16498
|
const fn = type === "imports" ? f : o;
|
16485
16499
|
const result = fn(pkg, key, { conditions, unsafe: true });
|
16486
|
-
return result ? result[0] :
|
16500
|
+
return result ? result[0] : undefined;
|
16487
16501
|
}
|
16488
16502
|
function resolveDeepImport(id, { setResolvedCache, getResolvedCache, dir, data }, options) {
|
16489
16503
|
const cache = getResolvedCache(id, options);
|
@@ -16496,13 +16510,13 @@ function resolveDeepImport(id, { setResolvedCache, getResolvedCache, dir, data }
|
|
16496
16510
|
if (isObject$2(exportsField) && !Array.isArray(exportsField)) {
|
16497
16511
|
const { file, postfix } = splitFileAndPostfix(relativeId);
|
16498
16512
|
const exportsId = resolveExportsOrImports(data, file, options, "exports");
|
16499
|
-
if (exportsId !==
|
16513
|
+
if (exportsId !== undefined) {
|
16500
16514
|
relativeId = exportsId + postfix;
|
16501
16515
|
} else {
|
16502
|
-
relativeId =
|
16516
|
+
relativeId = undefined;
|
16503
16517
|
}
|
16504
16518
|
} else {
|
16505
|
-
relativeId =
|
16519
|
+
relativeId = undefined;
|
16506
16520
|
}
|
16507
16521
|
if (!relativeId) {
|
16508
16522
|
throw new Error(
|
@@ -16546,8 +16560,8 @@ function tryResolveBrowserMapping(id, importer, options, isFilePath, externalize
|
|
16546
16560
|
browserMappedPath,
|
16547
16561
|
importer,
|
16548
16562
|
options,
|
16549
|
-
|
16550
|
-
|
16563
|
+
undefined,
|
16564
|
+
undefined
|
16551
16565
|
)?.id : tryFsResolve(path$d.join(pkg.dir, browserMappedPath), options)) {
|
16552
16566
|
debug$e?.(`[browser mapped] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
|
16553
16567
|
let result = { id: res };
|
@@ -16790,7 +16804,7 @@ function esbuildDepPlugin(environment, qualified, external) {
|
|
16790
16804
|
let entry;
|
16791
16805
|
if (!importer) {
|
16792
16806
|
if (entry = resolveEntry(id)) return entry;
|
16793
|
-
const aliased = await _resolve(environment, id,
|
16807
|
+
const aliased = await _resolve(environment, id, undefined, true);
|
16794
16808
|
if (aliased && (entry = resolveEntry(aliased))) {
|
16795
16809
|
return entry;
|
16796
16810
|
}
|
@@ -17074,7 +17088,7 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
17074
17088
|
yield ({
|
17075
17089
|
type: "RegularExpressionLiteral",
|
17076
17090
|
value: match[0],
|
17077
|
-
closed: match[1] !==
|
17091
|
+
closed: match[1] !== undefined && match[1] !== "\\"
|
17078
17092
|
});
|
17079
17093
|
continue;
|
17080
17094
|
}
|
@@ -17212,7 +17226,7 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
17212
17226
|
yield ({
|
17213
17227
|
type: "StringLiteral",
|
17214
17228
|
value: match[0],
|
17215
|
-
closed: match[2] !==
|
17229
|
+
closed: match[2] !== undefined
|
17216
17230
|
});
|
17217
17231
|
continue;
|
17218
17232
|
}
|
@@ -17313,7 +17327,7 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
17313
17327
|
yield ({
|
17314
17328
|
type: "JSXString",
|
17315
17329
|
value: match[0],
|
17316
|
-
closed: match[2] !==
|
17330
|
+
closed: match[2] !== undefined
|
17317
17331
|
});
|
17318
17332
|
continue;
|
17319
17333
|
}
|
@@ -17388,7 +17402,7 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
17388
17402
|
yield ({
|
17389
17403
|
type: "MultiLineComment",
|
17390
17404
|
value: match[0],
|
17391
|
-
closed: match[1] !==
|
17405
|
+
closed: match[1] !== undefined
|
17392
17406
|
});
|
17393
17407
|
continue;
|
17394
17408
|
}
|
@@ -17411,7 +17425,7 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
17411
17425
|
value: firstCodePoint
|
17412
17426
|
});
|
17413
17427
|
}
|
17414
|
-
return
|
17428
|
+
return undefined;
|
17415
17429
|
};
|
17416
17430
|
|
17417
17431
|
var jsTokens = /*@__PURE__*/getDefaultExportFromCjs(jsTokens_1);
|
@@ -17541,7 +17555,7 @@ function importGlobPlugin(config) {
|
|
17541
17555
|
if (mod) modules.push(mod);
|
17542
17556
|
}
|
17543
17557
|
}
|
17544
|
-
return modules.length > 0 ? [...oldModules, ...modules] :
|
17558
|
+
return modules.length > 0 ? [...oldModules, ...modules] : undefined;
|
17545
17559
|
}
|
17546
17560
|
};
|
17547
17561
|
}
|
@@ -17752,10 +17766,10 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
17752
17766
|
id = slash$1(id);
|
17753
17767
|
root = slash$1(root);
|
17754
17768
|
const isVirtual = isVirtualModule(id);
|
17755
|
-
const dir = isVirtual ?
|
17769
|
+
const dir = isVirtual ? undefined : dirname(id);
|
17756
17770
|
const matches = await parseImportGlob(
|
17757
17771
|
code,
|
17758
|
-
isVirtual ?
|
17772
|
+
isVirtual ? undefined : id,
|
17759
17773
|
root,
|
17760
17774
|
resolveId,
|
17761
17775
|
logger
|
@@ -17820,7 +17834,7 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
17820
17834
|
importQuery = `${importQuery}&lang.${fileExtension}`;
|
17821
17835
|
}
|
17822
17836
|
importPath = `${importPath}${importQuery}`;
|
17823
|
-
const importKey = options.import && options.import !== "*" ? options.import :
|
17837
|
+
const importKey = options.import && options.import !== "*" ? options.import : undefined;
|
17824
17838
|
if (options.eager) {
|
17825
17839
|
const variableName = `${importPrefix}${index}_${i}`;
|
17826
17840
|
const expression = importKey ? `{ ${importKey} as ${variableName} }` : `* as ${variableName}`;
|
@@ -18083,10 +18097,10 @@ async function computeEntries(environment) {
|
|
18083
18097
|
entries = await globEntries(explicitEntryPatterns, environment);
|
18084
18098
|
} else if (buildInput) {
|
18085
18099
|
const resolvePath = async (p) => {
|
18086
|
-
const id = (await environment.pluginContainer.resolveId(p,
|
18100
|
+
const id = (await environment.pluginContainer.resolveId(p, undefined, {
|
18087
18101
|
scan: true
|
18088
18102
|
}))?.id;
|
18089
|
-
if (id ===
|
18103
|
+
if (id === undefined) {
|
18090
18104
|
throw new Error(
|
18091
18105
|
`failed to resolve rollupOptions.input value: ${JSON.stringify(p)}.`
|
18092
18106
|
);
|
@@ -18365,7 +18379,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
18365
18379
|
}
|
18366
18380
|
return externalUnlessEntry({ path: id });
|
18367
18381
|
} else if (isScannable(resolved, optimizeDepsOptions.extensions)) {
|
18368
|
-
const namespace = htmlTypesRE.test(resolved) ? "html" :
|
18382
|
+
const namespace = htmlTypesRE.test(resolved) ? "html" : undefined;
|
18369
18383
|
return {
|
18370
18384
|
path: path$d.resolve(resolved),
|
18371
18385
|
namespace
|
@@ -18407,7 +18421,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
18407
18421
|
if (shouldExternalizeDep(resolved, id) || !isScannable(resolved, optimizeDepsOptions.extensions)) {
|
18408
18422
|
return externalUnlessEntry({ path: id });
|
18409
18423
|
}
|
18410
|
-
const namespace = htmlTypesRE.test(resolved) ? "html" :
|
18424
|
+
const namespace = htmlTypesRE.test(resolved) ? "html" : undefined;
|
18411
18425
|
return {
|
18412
18426
|
path: path$d.resolve(cleanUrl(resolved)),
|
18413
18427
|
namespace
|
@@ -18482,7 +18496,7 @@ function createOptimizeDepsIncludeResolver(environment) {
|
|
18482
18496
|
return async (id) => {
|
18483
18497
|
const lastArrowIndex = id.lastIndexOf(">");
|
18484
18498
|
if (lastArrowIndex === -1) {
|
18485
|
-
return await resolve(environment, id,
|
18499
|
+
return await resolve(environment, id, undefined);
|
18486
18500
|
}
|
18487
18501
|
const nestedRoot = id.substring(0, lastArrowIndex).trim();
|
18488
18502
|
const nestedPath = id.substring(lastArrowIndex + 1).trim();
|
@@ -18954,7 +18968,7 @@ async function prepareEsbuildOptimizerRun(environment, depsInfo, processingCache
|
|
18954
18968
|
idToExports[id] = exportsData;
|
18955
18969
|
})
|
18956
18970
|
);
|
18957
|
-
if (optimizerContext.cancelled) return { context:
|
18971
|
+
if (optimizerContext.cancelled) return { context: undefined, idToExports };
|
18958
18972
|
const define = {
|
18959
18973
|
"process.env.NODE_ENV": environment.config.keepProcessEnv ? (
|
18960
18974
|
// define process.env.NODE_ENV even for keepProcessEnv === true
|
@@ -18982,7 +18996,7 @@ async function prepareEsbuildOptimizerRun(environment, depsInfo, processingCache
|
|
18982
18996
|
// See https://github.com/evanw/esbuild/issues/1921#issuecomment-1152991694
|
18983
18997
|
banner: platform === "node" ? {
|
18984
18998
|
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
|
18985
|
-
} :
|
18999
|
+
} : undefined,
|
18986
19000
|
target: ESBUILD_MODULES_TARGET,
|
18987
19001
|
external,
|
18988
19002
|
logLevel: "error",
|
@@ -19209,7 +19223,7 @@ async function extractExportsData(environment, filePath) {
|
|
19209
19223
|
entryContent,
|
19210
19224
|
filePath,
|
19211
19225
|
{ loader },
|
19212
|
-
|
19226
|
+
undefined,
|
19213
19227
|
environment.config
|
19214
19228
|
);
|
19215
19229
|
parseResult = parse$e(transformed.code);
|
@@ -19245,34 +19259,45 @@ function isSingleDefaultExport(exports) {
|
|
19245
19259
|
const lockfileFormats = [
|
19246
19260
|
{
|
19247
19261
|
path: "node_modules/.package-lock.json",
|
19248
|
-
|
19262
|
+
checkPatchesDir: "patches",
|
19249
19263
|
manager: "npm"
|
19250
19264
|
},
|
19251
19265
|
{
|
19252
19266
|
// Yarn non-PnP
|
19253
19267
|
path: "node_modules/.yarn-state.yml",
|
19254
|
-
|
19268
|
+
checkPatchesDir: false,
|
19255
19269
|
manager: "yarn"
|
19256
19270
|
},
|
19257
19271
|
{
|
19258
|
-
// Yarn PnP
|
19259
|
-
path: ".
|
19260
|
-
|
19272
|
+
// Yarn v3+ PnP
|
19273
|
+
path: ".pnp.cjs",
|
19274
|
+
checkPatchesDir: ".yarn/patches",
|
19275
|
+
manager: "yarn"
|
19276
|
+
},
|
19277
|
+
{
|
19278
|
+
// Yarn v2 PnP
|
19279
|
+
path: ".pnp.js",
|
19280
|
+
checkPatchesDir: ".yarn/patches",
|
19261
19281
|
manager: "yarn"
|
19262
19282
|
},
|
19263
19283
|
{
|
19264
19284
|
// yarn 1
|
19265
19285
|
path: "node_modules/.yarn-integrity",
|
19266
|
-
|
19286
|
+
checkPatchesDir: "patches",
|
19267
19287
|
manager: "yarn"
|
19268
19288
|
},
|
19269
19289
|
{
|
19270
19290
|
path: "node_modules/.pnpm/lock.yaml",
|
19271
19291
|
// Included in lockfile
|
19272
|
-
|
19292
|
+
checkPatchesDir: false,
|
19273
19293
|
manager: "pnpm"
|
19274
19294
|
},
|
19275
|
-
{
|
19295
|
+
{
|
19296
|
+
name: "bun.lockb",
|
19297
|
+
path: "bun.lockb",
|
19298
|
+
checkPatchesDir: "patches",
|
19299
|
+
manager: "bun"
|
19300
|
+
}
|
19276
19301
|
].sort((_, { manager }) => {
|
19277
19302
|
return process.env.npm_config_user_agent?.startsWith(manager) ? 1 : -1;
|
19278
19303
|
});
|
@@ -19288,8 +19313,8 @@ function getConfigHash(environment) {
|
|
19288
19313
|
assetsInclude: config.assetsInclude,
|
19289
19314
|
plugins: config.plugins.map((p) => p.name),
|
19290
19315
|
optimizeDeps: {
|
19291
|
-
include: optimizeDeps2.include ? unique(optimizeDeps2.include).sort() :
|
19292
|
-
exclude: optimizeDeps2.exclude ? unique(optimizeDeps2.exclude).sort() :
|
19316
|
+
include: optimizeDeps2.include ? unique(optimizeDeps2.include).sort() : undefined,
|
19317
|
+
exclude: optimizeDeps2.exclude ? unique(optimizeDeps2.exclude).sort() : undefined,
|
19293
19318
|
esbuildOptions: {
|
19294
19319
|
...optimizeDeps2.esbuildOptions,
|
19295
19320
|
plugins: optimizeDeps2.esbuildOptions?.plugins?.map((p) => p.name)
|
@@ -19313,9 +19338,12 @@ function getLockfileHash(environment) {
|
|
19313
19338
|
const lockfileFormat = lockfileFormats.find(
|
19314
19339
|
(f) => normalizedLockfilePath.endsWith(f.path)
|
19315
19340
|
);
|
19316
|
-
if (lockfileFormat.
|
19341
|
+
if (lockfileFormat.checkPatchesDir) {
|
19317
19342
|
const baseDir = lockfilePath.slice(0, -lockfileFormat.path.length);
|
19318
|
-
const fullPath = path$d.join(
|
19343
|
+
const fullPath = path$d.join(
|
19344
|
+
baseDir,
|
19345
|
+
lockfileFormat.checkPatchesDir
|
19346
|
+
);
|
19319
19347
|
const stat = tryStatSync(fullPath);
|
19320
19348
|
if (stat?.isDirectory()) {
|
19321
19349
|
content += stat.mtimeMs.toString();
|
@@ -19353,7 +19381,7 @@ function findOptimizedDepInfoInRecord(dependenciesInfo, callbackFn) {
|
|
19353
19381
|
}
|
19354
19382
|
async function optimizedDepNeedsInterop(environment, metadata, file) {
|
19355
19383
|
const depInfo = optimizedDepInfoFromFile(metadata, file);
|
19356
|
-
if (depInfo?.src && depInfo.needsInterop ===
|
19384
|
+
if (depInfo?.src && depInfo.needsInterop === undefined) {
|
19357
19385
|
depInfo.exportsData ??= extractExportsData(environment, depInfo.src);
|
19358
19386
|
depInfo.needsInterop = needsInterop(
|
19359
19387
|
environment,
|
@@ -19473,7 +19501,7 @@ function jsonPlugin(options, isBuild) {
|
|
19473
19501
|
json = JSON.stringify(JSON.parse(json));
|
19474
19502
|
}
|
19475
19503
|
return {
|
19476
|
-
code: `export default JSON.parse(${JSON.stringify(json)})`,
|
19504
|
+
code: `export default /* #__PURE__ */ JSON.parse(${JSON.stringify(json)})`,
|
19477
19505
|
map: { mappings: "" }
|
19478
19506
|
};
|
19479
19507
|
}
|
@@ -19496,7 +19524,7 @@ function jsonPlugin(options, isBuild) {
|
|
19496
19524
|
function serializeValue(value) {
|
19497
19525
|
const valueAsString = JSON.stringify(value);
|
19498
19526
|
if (typeof value === "object" && value != null && valueAsString.length > 10 * 1e3) {
|
19499
|
-
return
|
19527
|
+
return `/* #__PURE__ */ JSON.parse(${JSON.stringify(valueAsString)})`;
|
19500
19528
|
}
|
19501
19529
|
return valueAsString;
|
19502
19530
|
}
|
@@ -19505,7 +19533,7 @@ function extractJsonErrorPosition(errorMessage, inputLength) {
|
|
19505
19533
|
return inputLength - 1;
|
19506
19534
|
}
|
19507
19535
|
const errorMessageList = /at position (\d+)/.exec(errorMessage);
|
19508
|
-
return errorMessageList ? Math.max(parseInt(errorMessageList[1], 10) - 1, 0) :
|
19536
|
+
return errorMessageList ? Math.max(parseInt(errorMessageList[1], 10) - 1, 0) : undefined;
|
19509
19537
|
}
|
19510
19538
|
|
19511
19539
|
const debug$b = createDebugger("vite:optimize-deps");
|
@@ -19528,7 +19556,7 @@ function optimizedDepsPlugin() {
|
|
19528
19556
|
const metadata = depsOptimizer.metadata;
|
19529
19557
|
const file = cleanUrl(id);
|
19530
19558
|
const versionMatch = DEP_VERSION_RE.exec(file);
|
19531
|
-
const browserHash = versionMatch ? versionMatch[1].split("=")[1] :
|
19559
|
+
const browserHash = versionMatch ? versionMatch[1].split("=")[1] : undefined;
|
19532
19560
|
const info = optimizedDepInfoFromFile(metadata, file);
|
19533
19561
|
if (info) {
|
19534
19562
|
if (browserHash && info.browserHash !== browserHash) {
|
@@ -20148,13 +20176,13 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
|
|
20148
20176
|
return Object.entries(parse_1$3(fs__default.readFileSync(filePath)));
|
20149
20177
|
})
|
20150
20178
|
);
|
20151
|
-
if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV ===
|
20179
|
+
if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {
|
20152
20180
|
process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV;
|
20153
20181
|
}
|
20154
|
-
if (parsed.BROWSER && process.env.BROWSER ===
|
20182
|
+
if (parsed.BROWSER && process.env.BROWSER === undefined) {
|
20155
20183
|
process.env.BROWSER = parsed.BROWSER;
|
20156
20184
|
}
|
20157
|
-
if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS ===
|
20185
|
+
if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {
|
20158
20186
|
process.env.BROWSER_ARGS = parsed.BROWSER_ARGS;
|
20159
20187
|
}
|
20160
20188
|
const processEnv = { ...process.env };
|
@@ -24623,7 +24651,7 @@ const parse$a = (input, options) => {
|
|
24623
24651
|
}
|
24624
24652
|
|
24625
24653
|
if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
|
24626
|
-
const end = rest[1] !==
|
24654
|
+
const end = rest[1] !== undefined ? '|$' : '';
|
24627
24655
|
|
24628
24656
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
24629
24657
|
prior.output = `(?:${prior.output}`;
|
@@ -26014,7 +26042,7 @@ const toRegexRange$1 = (min, max, options) => {
|
|
26014
26042
|
throw new TypeError('toRegexRange: expected the first argument to be a number');
|
26015
26043
|
}
|
26016
26044
|
|
26017
|
-
if (max ===
|
26045
|
+
if (max === undefined || min === max) {
|
26018
26046
|
return String(min);
|
26019
26047
|
}
|
26020
26048
|
|
@@ -26086,9 +26114,9 @@ const toRegexRange$1 = (min, max, options) => {
|
|
26086
26114
|
};
|
26087
26115
|
|
26088
26116
|
function collatePatterns(neg, pos, options) {
|
26089
|
-
let onlyNegative = filterPatterns(neg, pos, '-', false)
|
26090
|
-
let onlyPositive = filterPatterns(pos, neg, '', false)
|
26091
|
-
let intersected = filterPatterns(neg, pos, '-?', true)
|
26117
|
+
let onlyNegative = filterPatterns(neg, pos, '-', false);
|
26118
|
+
let onlyPositive = filterPatterns(pos, neg, '', false);
|
26119
|
+
let intersected = filterPatterns(neg, pos, '-?', true);
|
26092
26120
|
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
26093
26121
|
return subpatterns.join('|');
|
26094
26122
|
}
|
@@ -29854,7 +29882,7 @@ function parseInternal(string, env, opts) {
|
|
29854
29882
|
return matches.map(function (match) {
|
29855
29883
|
var s = match[0];
|
29856
29884
|
if (!s || commented) {
|
29857
|
-
return
|
29885
|
+
return undefined;
|
29858
29886
|
}
|
29859
29887
|
if (controlRE.test(s)) {
|
29860
29888
|
return { op: s };
|
@@ -30513,7 +30541,7 @@ async function resolveHttpServer({ proxy }, app, httpsOptions) {
|
|
30513
30541
|
}
|
30514
30542
|
}
|
30515
30543
|
async function resolveHttpsConfig(https) {
|
30516
|
-
if (!https) return
|
30544
|
+
if (!https) return undefined;
|
30517
30545
|
const [ca, cert, key, pfx] = await Promise.all([
|
30518
30546
|
readFileIfExists(https.ca),
|
30519
30547
|
readFileIfExists(https.cert),
|
@@ -30574,7 +30602,7 @@ function setClientErrorHandler(server, logger) {
|
|
30574
30602
|
|
30575
30603
|
let offset;
|
30576
30604
|
function calculateOffsetOnce() {
|
30577
|
-
if (offset !==
|
30605
|
+
if (offset !== undefined) {
|
30578
30606
|
return;
|
30579
30607
|
}
|
30580
30608
|
try {
|
@@ -32769,7 +32797,7 @@ async function startBrowserProcess(browser, browserArgs, url, logger) {
|
|
32769
32797
|
}
|
32770
32798
|
}
|
32771
32799
|
if (process.platform === "darwin" && browser === "open") {
|
32772
|
-
browser =
|
32800
|
+
browser = undefined;
|
32773
32801
|
}
|
32774
32802
|
try {
|
32775
32803
|
const options = browser ? { app: { name: browser, arguments: browserArgs } } : {};
|
@@ -37642,6 +37670,100 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
37642
37670
|
|
37643
37671
|
var WebSocketServerRaw_ = /*@__PURE__*/getDefaultExportFromCjs(websocketServer);
|
37644
37672
|
|
37673
|
+
const allowedHostsCache = /* @__PURE__ */ new WeakMap();
|
37674
|
+
const isFileOrExtensionProtocolRE = /^(?:file|.+-extension):/i;
|
37675
|
+
function getAdditionalAllowedHosts(resolvedServerOptions, resolvedPreviewOptions) {
|
37676
|
+
const list = [];
|
37677
|
+
if (typeof resolvedServerOptions.host === "string" && resolvedServerOptions.host) {
|
37678
|
+
list.push(resolvedServerOptions.host);
|
37679
|
+
}
|
37680
|
+
if (typeof resolvedServerOptions.hmr === "object" && resolvedServerOptions.hmr.host) {
|
37681
|
+
list.push(resolvedServerOptions.hmr.host);
|
37682
|
+
}
|
37683
|
+
if (typeof resolvedPreviewOptions.host === "string" && resolvedPreviewOptions.host) {
|
37684
|
+
list.push(resolvedPreviewOptions.host);
|
37685
|
+
}
|
37686
|
+
if (resolvedServerOptions.origin) {
|
37687
|
+
const serverOriginUrl = new URL(resolvedServerOptions.origin);
|
37688
|
+
list.push(serverOriginUrl.hostname);
|
37689
|
+
}
|
37690
|
+
return list;
|
37691
|
+
}
|
37692
|
+
function isHostAllowedWithoutCache(allowedHosts, additionalAllowedHosts, host) {
|
37693
|
+
if (isFileOrExtensionProtocolRE.test(host)) {
|
37694
|
+
return true;
|
37695
|
+
}
|
37696
|
+
const trimmedHost = host.trim();
|
37697
|
+
if (trimmedHost[0] === "[") {
|
37698
|
+
const endIpv6 = trimmedHost.indexOf("]");
|
37699
|
+
if (endIpv6 < 0) {
|
37700
|
+
return false;
|
37701
|
+
}
|
37702
|
+
return net$1.isIP(trimmedHost.slice(1, endIpv6)) === 6;
|
37703
|
+
}
|
37704
|
+
const colonPos = trimmedHost.indexOf(":");
|
37705
|
+
const hostname = colonPos === -1 ? trimmedHost : trimmedHost.slice(0, colonPos);
|
37706
|
+
if (net$1.isIP(hostname) === 4) {
|
37707
|
+
return true;
|
37708
|
+
}
|
37709
|
+
if (hostname === "localhost" || hostname.endsWith(".localhost")) {
|
37710
|
+
return true;
|
37711
|
+
}
|
37712
|
+
for (const additionalAllowedHost of additionalAllowedHosts) {
|
37713
|
+
if (additionalAllowedHost === hostname) {
|
37714
|
+
return true;
|
37715
|
+
}
|
37716
|
+
}
|
37717
|
+
for (const allowedHost of allowedHosts) {
|
37718
|
+
if (allowedHost === hostname) {
|
37719
|
+
return true;
|
37720
|
+
}
|
37721
|
+
if (allowedHost[0] === "." && (allowedHost.slice(1) === hostname || hostname.endsWith(allowedHost))) {
|
37722
|
+
return true;
|
37723
|
+
}
|
37724
|
+
}
|
37725
|
+
return false;
|
37726
|
+
}
|
37727
|
+
function isHostAllowed(config, host) {
|
37728
|
+
if (config.server.allowedHosts === true) {
|
37729
|
+
return true;
|
37730
|
+
}
|
37731
|
+
if (!allowedHostsCache.has(config)) {
|
37732
|
+
allowedHostsCache.set(config, /* @__PURE__ */ new Set());
|
37733
|
+
}
|
37734
|
+
const allowedHosts = allowedHostsCache.get(config);
|
37735
|
+
if (allowedHosts.has(host)) {
|
37736
|
+
return true;
|
37737
|
+
}
|
37738
|
+
const result = isHostAllowedWithoutCache(
|
37739
|
+
config.server.allowedHosts,
|
37740
|
+
config.additionalAllowedHosts,
|
37741
|
+
host
|
37742
|
+
);
|
37743
|
+
if (result) {
|
37744
|
+
allowedHosts.add(host);
|
37745
|
+
}
|
37746
|
+
return result;
|
37747
|
+
}
|
37748
|
+
function hostCheckMiddleware(config) {
|
37749
|
+
return function viteHostCheckMiddleware(req, res, next) {
|
37750
|
+
const hostHeader = req.headers.host;
|
37751
|
+
if (!hostHeader || !isHostAllowed(config, hostHeader)) {
|
37752
|
+
const hostname = hostHeader?.replace(/:\d+$/, "");
|
37753
|
+
const hostnameWithQuotes = JSON.stringify(hostname);
|
37754
|
+
res.writeHead(403, {
|
37755
|
+
"Content-Type": "text/plain"
|
37756
|
+
});
|
37757
|
+
res.end(
|
37758
|
+
`Blocked request. This host (${hostnameWithQuotes}) is not allowed.
|
37759
|
+
To allow this host, add ${hostnameWithQuotes} to \`server.allowedHosts\` in vite.config.js.`
|
37760
|
+
);
|
37761
|
+
return;
|
37762
|
+
}
|
37763
|
+
return next();
|
37764
|
+
};
|
37765
|
+
}
|
37766
|
+
|
37645
37767
|
const WebSocketServerRaw = process.versions.bun ? (
|
37646
37768
|
// @ts-expect-error: Bun defines `import.meta.require`
|
37647
37769
|
import.meta.require("ws").WebSocketServer
|
@@ -37657,6 +37779,19 @@ const wsServerEvents = [
|
|
37657
37779
|
];
|
37658
37780
|
function noop$3() {
|
37659
37781
|
}
|
37782
|
+
function hasValidToken(config, url) {
|
37783
|
+
const token = url.searchParams.get("token");
|
37784
|
+
if (!token) return false;
|
37785
|
+
try {
|
37786
|
+
const isValidToken = crypto$2.timingSafeEqual(
|
37787
|
+
Buffer.from(token),
|
37788
|
+
Buffer.from(config.webSocketToken)
|
37789
|
+
);
|
37790
|
+
return isValidToken;
|
37791
|
+
} catch {
|
37792
|
+
}
|
37793
|
+
return false;
|
37794
|
+
}
|
37660
37795
|
function createWebSocketServer(server, config, httpsOptions) {
|
37661
37796
|
if (config.server.ws === false) {
|
37662
37797
|
return {
|
@@ -37680,8 +37815,7 @@ function createWebSocketServer(server, config, httpsOptions) {
|
|
37680
37815
|
send: noop$3
|
37681
37816
|
};
|
37682
37817
|
}
|
37683
|
-
let
|
37684
|
-
let wsHttpServer = void 0;
|
37818
|
+
let wsHttpServer = undefined;
|
37685
37819
|
const hmr = isObject$2(config.server.hmr) && config.server.hmr;
|
37686
37820
|
const hmrServer = hmr && hmr.server;
|
37687
37821
|
const hmrPort = hmr && hmr.port;
|
@@ -37691,21 +37825,48 @@ function createWebSocketServer(server, config, httpsOptions) {
|
|
37691
37825
|
const customListeners = /* @__PURE__ */ new Map();
|
37692
37826
|
const clientsMap = /* @__PURE__ */ new WeakMap();
|
37693
37827
|
const port = hmrPort || 24678;
|
37694
|
-
const host = hmr && hmr.host ||
|
37828
|
+
const host = hmr && hmr.host || undefined;
|
37829
|
+
const shouldHandle = (req) => {
|
37830
|
+
const protocol = req.headers["sec-websocket-protocol"];
|
37831
|
+
if (protocol === "vite-ping") return true;
|
37832
|
+
const hostHeader = req.headers.host;
|
37833
|
+
if (!hostHeader || !isHostAllowed(config, hostHeader)) {
|
37834
|
+
return false;
|
37835
|
+
}
|
37836
|
+
if (config.legacy?.skipWebSocketTokenCheck) {
|
37837
|
+
return true;
|
37838
|
+
}
|
37839
|
+
if (req.headers.origin) {
|
37840
|
+
const parsedUrl = new URL(`http://example.com${req.url}`);
|
37841
|
+
return hasValidToken(config, parsedUrl);
|
37842
|
+
}
|
37843
|
+
return true;
|
37844
|
+
};
|
37845
|
+
const handleUpgrade = (req, socket, head, isPing) => {
|
37846
|
+
wss.handleUpgrade(req, socket, head, (ws) => {
|
37847
|
+
if (isPing) {
|
37848
|
+
ws.close(
|
37849
|
+
/* Normal Closure */
|
37850
|
+
1e3
|
37851
|
+
);
|
37852
|
+
return;
|
37853
|
+
}
|
37854
|
+
wss.emit("connection", ws, req);
|
37855
|
+
});
|
37856
|
+
};
|
37857
|
+
const wss = new WebSocketServerRaw({ noServer: true });
|
37858
|
+
wss.shouldHandle = shouldHandle;
|
37695
37859
|
if (wsServer) {
|
37696
37860
|
let hmrBase = config.base;
|
37697
|
-
const hmrPath = hmr ? hmr.path :
|
37861
|
+
const hmrPath = hmr ? hmr.path : undefined;
|
37698
37862
|
if (hmrPath) {
|
37699
37863
|
hmrBase = path$d.posix.join(hmrBase, hmrPath);
|
37700
37864
|
}
|
37701
|
-
wss = new WebSocketServerRaw({ noServer: true });
|
37702
37865
|
hmrServerWsListener = (req, socket, head) => {
|
37703
|
-
|
37704
|
-
|
37705
|
-
) &&
|
37706
|
-
|
37707
|
-
wss.emit("connection", ws, req);
|
37708
|
-
});
|
37866
|
+
const protocol = req.headers["sec-websocket-protocol"];
|
37867
|
+
const parsedUrl = new URL(`http://example.com${req.url}`);
|
37868
|
+
if ([HMR_HEADER, "vite-ping"].includes(protocol) && parsedUrl.pathname === hmrBase) {
|
37869
|
+
handleUpgrade(req, socket, head, protocol === "vite-ping");
|
37709
37870
|
}
|
37710
37871
|
};
|
37711
37872
|
wsServer.on("upgrade", hmrServerWsListener);
|
@@ -37726,16 +37887,13 @@ function createWebSocketServer(server, config, httpsOptions) {
|
|
37726
37887
|
} else {
|
37727
37888
|
wsHttpServer = createServer$3(route);
|
37728
37889
|
}
|
37729
|
-
wss = new WebSocketServerRaw({ noServer: true });
|
37730
37890
|
wsHttpServer.on("upgrade", (req, socket, head) => {
|
37731
37891
|
const protocol = req.headers["sec-websocket-protocol"];
|
37732
37892
|
if (protocol === "vite-ping" && server && !server.listening) {
|
37733
37893
|
req.destroy();
|
37734
37894
|
return;
|
37735
37895
|
}
|
37736
|
-
|
37737
|
-
wss.emit("connection", ws, req);
|
37738
|
-
});
|
37896
|
+
handleUpgrade(req, socket, head, protocol === "vite-ping");
|
37739
37897
|
});
|
37740
37898
|
wsHttpServer.on("error", (e) => {
|
37741
37899
|
if (e.code === "EADDRINUSE") {
|
@@ -37753,9 +37911,6 @@ ${e.stack || e.message}`),
|
|
37753
37911
|
});
|
37754
37912
|
}
|
37755
37913
|
wss.on("connection", (socket) => {
|
37756
|
-
if (socket.protocol === "vite-ping") {
|
37757
|
-
return;
|
37758
|
-
}
|
37759
37914
|
socket.on("message", (raw) => {
|
37760
37915
|
if (!customListeners.size) return;
|
37761
37916
|
let parsed;
|
@@ -40156,7 +40311,7 @@ ${err.stack}`,
|
|
40156
40311
|
const [proxy, opts] = proxies[context];
|
40157
40312
|
if (opts.ws || opts.target?.toString().startsWith("ws:") || opts.target?.toString().startsWith("wss:")) {
|
40158
40313
|
if (opts.bypass) {
|
40159
|
-
const bypassResult = opts.bypass(req,
|
40314
|
+
const bypassResult = opts.bypass(req, undefined, opts);
|
40160
40315
|
if (typeof bypassResult === "string") {
|
40161
40316
|
req.url = bypassResult;
|
40162
40317
|
debug$5?.(`bypass: ${req.url} -> ${bypassResult}`);
|
@@ -40218,7 +40373,7 @@ function htmlFallbackMiddleware(root, spaFallback) {
|
|
40218
40373
|
// Only accept GET or HEAD
|
40219
40374
|
req.method !== "GET" && req.method !== "HEAD" || // Exclude default favicon requests
|
40220
40375
|
req.url === "/favicon.ico" || // Require Accept: text/html or */*
|
40221
|
-
!(req.headers.accept ===
|
40376
|
+
!(req.headers.accept === undefined || // equivalent to `Accept: */*`
|
40222
40377
|
req.headers.accept === "" || // equivalent to `Accept: */*`
|
40223
40378
|
req.headers.accept.includes("text/html") || req.headers.accept.includes("*/*"))
|
40224
40379
|
) {
|
@@ -40748,10 +40903,12 @@ function serveStaticMiddleware(server) {
|
|
40748
40903
|
);
|
40749
40904
|
return function viteServeStaticMiddleware(req, res, next) {
|
40750
40905
|
const cleanedUrl = cleanUrl(req.url);
|
40751
|
-
if (cleanedUrl[cleanedUrl.length - 1] === "/" || path$d.extname(cleanedUrl) === ".html" || isInternalRequest(req.url)
|
40906
|
+
if (cleanedUrl[cleanedUrl.length - 1] === "/" || path$d.extname(cleanedUrl) === ".html" || isInternalRequest(req.url) || // skip url starting with // as these will be interpreted as
|
40907
|
+
// scheme relative URLs by new URL() and will not be a valid file path
|
40908
|
+
req.url?.startsWith("//")) {
|
40752
40909
|
return next();
|
40753
40910
|
}
|
40754
|
-
const url = new URL(req.url
|
40911
|
+
const url = new URL(req.url, "http://example.com");
|
40755
40912
|
const pathname = decodeURI(url.pathname);
|
40756
40913
|
let redirectedPathname;
|
40757
40914
|
for (const { find, replacement } of server.config.resolve.alias) {
|
@@ -40787,8 +40944,8 @@ function serveRawFsMiddleware(server) {
|
|
40787
40944
|
sirvOptions({ getHeaders: () => server.config.server.headers })
|
40788
40945
|
);
|
40789
40946
|
return function viteServeRawFsMiddleware(req, res, next) {
|
40790
|
-
|
40791
|
-
|
40947
|
+
if (req.url.startsWith(FS_PREFIX)) {
|
40948
|
+
const url = new URL(req.url, "http://example.com");
|
40792
40949
|
const pathname = decodeURI(url.pathname);
|
40793
40950
|
if (!ensureServingAccess(
|
40794
40951
|
slash$1(path$d.resolve(fsPathFromId(pathname))),
|
@@ -40913,11 +41070,11 @@ async function doTransform(environment, url, options, timestamp) {
|
|
40913
41070
|
);
|
40914
41071
|
if (cached) return cached;
|
40915
41072
|
}
|
40916
|
-
const resolved = module ?
|
41073
|
+
const resolved = module ? undefined : await pluginContainer.resolveId(url, undefined) ?? undefined;
|
40917
41074
|
const id = module?.id ?? resolved?.id ?? url;
|
40918
41075
|
module ??= environment.moduleGraph.getModuleById(id);
|
40919
41076
|
if (module) {
|
40920
|
-
await environment.moduleGraph._ensureEntryFromUrl(url,
|
41077
|
+
await environment.moduleGraph._ensureEntryFromUrl(url, undefined, resolved);
|
40921
41078
|
const cached = await getCachedTransformResult(
|
40922
41079
|
environment,
|
40923
41080
|
url,
|
@@ -41029,7 +41186,7 @@ ${e}`, {
|
|
41029
41186
|
}
|
41030
41187
|
if (environment._closing && environment.config.dev.recoverable)
|
41031
41188
|
throwClosedServerError();
|
41032
|
-
mod ??= await moduleGraph._ensureEntryFromUrl(url,
|
41189
|
+
mod ??= await moduleGraph._ensureEntryFromUrl(url, undefined, resolved);
|
41033
41190
|
const transformStart = debugTransform ? performance.now() : 0;
|
41034
41191
|
const transformResult = await pluginContainer.transform(code, id, {
|
41035
41192
|
inMap: map
|
@@ -41097,7 +41254,7 @@ ${e}`, {
|
|
41097
41254
|
}
|
41098
41255
|
async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
41099
41256
|
const transformResult = mod.invalidationState;
|
41100
|
-
mod.invalidationState =
|
41257
|
+
mod.invalidationState = undefined;
|
41101
41258
|
if (!transformResult || transformResult === "HARD_INVALIDATED") return;
|
41102
41259
|
if (mod.transformResult) {
|
41103
41260
|
throw new Error(
|
@@ -41111,7 +41268,7 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
41111
41268
|
await init;
|
41112
41269
|
const source = transformResult.code;
|
41113
41270
|
const s = new MagicString(source);
|
41114
|
-
const [imports] = parse$e(source, mod.id ||
|
41271
|
+
const [imports] = parse$e(source, mod.id || undefined);
|
41115
41272
|
for (const imp of imports) {
|
41116
41273
|
let rawUrl = source.slice(imp.s, imp.e);
|
41117
41274
|
if (rawUrl === "import.meta") continue;
|
@@ -41254,7 +41411,7 @@ function getNodeAssetAttributes(node) {
|
|
41254
41411
|
return actions;
|
41255
41412
|
}
|
41256
41413
|
function getAttrKey(attr) {
|
41257
|
-
return attr.prefix ===
|
41414
|
+
return attr.prefix === undefined ? attr.name : `${attr.prefix}:${attr.name}`;
|
41258
41415
|
}
|
41259
41416
|
|
41260
41417
|
const modulePreloadPolyfillId = "vite/modulepreload-polyfill";
|
@@ -41393,7 +41550,7 @@ function traverseNodes(node, visitor) {
|
|
41393
41550
|
}
|
41394
41551
|
}
|
41395
41552
|
async function traverseHtml(html, filePath, visitor) {
|
41396
|
-
const { parse } = await import('./dep-
|
41553
|
+
const { parse } = await import('./dep-DcIXjcop.js');
|
41397
41554
|
const ast = parse(html, {
|
41398
41555
|
scriptingEnabled: false,
|
41399
41556
|
// parse inside <noscript>
|
@@ -41411,7 +41568,7 @@ function getScriptInfo(node) {
|
|
41411
41568
|
let isAsync = false;
|
41412
41569
|
let isIgnored = false;
|
41413
41570
|
for (const p of node.attrs) {
|
41414
|
-
if (p.prefix !==
|
41571
|
+
if (p.prefix !== undefined) continue;
|
41415
41572
|
if (p.name === "src") {
|
41416
41573
|
if (!src) {
|
41417
41574
|
src = p;
|
@@ -41680,7 +41837,7 @@ import ${JSON.stringify(url)}`;
|
|
41680
41837
|
const isNoInlineLink = node.nodeName === "link" && attr.attributes.rel && parseRelAttr(attr.attributes.rel).some(
|
41681
41838
|
(v) => noInlineLinkRels.has(v)
|
41682
41839
|
);
|
41683
|
-
const shouldInline = isNoInlineLink ? false :
|
41840
|
+
const shouldInline = isNoInlineLink ? false : undefined;
|
41684
41841
|
assetUrlsPromises.push(
|
41685
41842
|
(async () => {
|
41686
41843
|
const processedUrl = await processAssetUrl(
|
@@ -41994,10 +42151,10 @@ function parseRelAttr(attr) {
|
|
41994
42151
|
}
|
41995
42152
|
function findNeedTransformStyleAttribute(node) {
|
41996
42153
|
const attr = node.attrs.find(
|
41997
|
-
(prop) => prop.prefix ===
|
42154
|
+
(prop) => prop.prefix === undefined && prop.name === "style" && // only url(...) or image-set(...) in css need to emit file
|
41998
42155
|
(prop.value.includes("url(") || prop.value.includes("image-set("))
|
41999
42156
|
);
|
42000
|
-
if (!attr) return
|
42157
|
+
if (!attr) return undefined;
|
42001
42158
|
const location = node.sourceCodeLocation?.attrs?.["style"];
|
42002
42159
|
return { attr, location };
|
42003
42160
|
}
|
@@ -42161,7 +42318,7 @@ function resolveHtmlTransforms(plugins, logger) {
|
|
42161
42318
|
)
|
42162
42319
|
);
|
42163
42320
|
}
|
42164
|
-
const order = hook.order ?? (hook.enforce === "pre" ? "pre" :
|
42321
|
+
const order = hook.order ?? (hook.enforce === "pre" ? "pre" : undefined);
|
42165
42322
|
const handler = hook.handler ?? hook.transform;
|
42166
42323
|
if (order === "pre") {
|
42167
42324
|
preHooks.push(handler);
|
@@ -42935,7 +43092,7 @@ class ModuleNode {
|
|
42935
43092
|
_getModuleInfoUnion(prop) {
|
42936
43093
|
const _clientValue = this._clientModule?.[prop];
|
42937
43094
|
const _ssrValue = this._ssrModule?.[prop];
|
42938
|
-
if (_clientValue == null && _ssrValue == null) return
|
43095
|
+
if (_clientValue == null && _ssrValue == null) return undefined;
|
42939
43096
|
return new Proxy({}, {
|
42940
43097
|
get: (_, key) => {
|
42941
43098
|
if (key === "meta") {
|
@@ -42957,7 +43114,7 @@ class ModuleNode {
|
|
42957
43114
|
_getModuleObjectUnion(prop) {
|
42958
43115
|
const _clientValue = this._clientModule?.[prop];
|
42959
43116
|
const _ssrValue = this._ssrModule?.[prop];
|
42960
|
-
if (_clientValue == null && _ssrValue == null) return
|
43117
|
+
if (_clientValue == null && _ssrValue == null) return undefined;
|
42961
43118
|
const info = {};
|
42962
43119
|
if (_ssrValue) {
|
42963
43120
|
Object.assign(info, _ssrValue);
|
@@ -43152,7 +43309,7 @@ class ModuleGraph {
|
|
43152
43309
|
const clientModules = this._client.getModulesByFile(file);
|
43153
43310
|
const ssrModules = this._ssr.getModulesByFile(file);
|
43154
43311
|
if (!clientModules && !ssrModules) {
|
43155
|
-
return
|
43312
|
+
return undefined;
|
43156
43313
|
}
|
43157
43314
|
const result = /* @__PURE__ */ new Set();
|
43158
43315
|
if (clientModules) {
|
@@ -43260,12 +43417,12 @@ class ModuleGraph {
|
|
43260
43417
|
getBackwardCompatibleBrowserModuleNode(clientModule) {
|
43261
43418
|
return this.getBackwardCompatibleModuleNodeDual(
|
43262
43419
|
clientModule,
|
43263
|
-
clientModule.id ? this._ssr.getModuleById(clientModule.id) :
|
43420
|
+
clientModule.id ? this._ssr.getModuleById(clientModule.id) : undefined
|
43264
43421
|
);
|
43265
43422
|
}
|
43266
43423
|
getBackwardCompatibleServerModuleNode(ssrModule) {
|
43267
43424
|
return this.getBackwardCompatibleModuleNodeDual(
|
43268
|
-
ssrModule.id ? this._client.getModuleById(ssrModule.id) :
|
43425
|
+
ssrModule.id ? this._client.getModuleById(ssrModule.id) : undefined,
|
43269
43426
|
ssrModule
|
43270
43427
|
);
|
43271
43428
|
}
|
@@ -43310,7 +43467,7 @@ function createBackwardCompatibleModuleSet(moduleGraph, prop, module) {
|
|
43310
43467
|
return false;
|
43311
43468
|
}
|
43312
43469
|
const keyModule = moduleGraph._getModuleGraph(module.environment).getModuleById(key.id);
|
43313
|
-
return keyModule !==
|
43470
|
+
return keyModule !== undefined && module[prop].has(keyModule);
|
43314
43471
|
},
|
43315
43472
|
values() {
|
43316
43473
|
return this.keys();
|
@@ -43603,6 +43760,25 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43603
43760
|
const pluginContainer = createPluginContainer(environments);
|
43604
43761
|
const closeHttpServer = createServerCloseFn(httpServer);
|
43605
43762
|
const devHtmlTransformFn = createDevHtmlTransformFn(config);
|
43763
|
+
let closeServerPromise;
|
43764
|
+
const closeServer = async () => {
|
43765
|
+
if (!middlewareMode) {
|
43766
|
+
teardownSIGTERMListener(closeServerAndExit);
|
43767
|
+
}
|
43768
|
+
await Promise.allSettled([
|
43769
|
+
watcher.close(),
|
43770
|
+
ws.close(),
|
43771
|
+
Promise.allSettled(
|
43772
|
+
Object.values(server.environments).map(
|
43773
|
+
(environment) => environment.close()
|
43774
|
+
)
|
43775
|
+
),
|
43776
|
+
closeHttpServer(),
|
43777
|
+
server._ssrCompatModuleRunner?.close()
|
43778
|
+
]);
|
43779
|
+
server.resolvedUrls = null;
|
43780
|
+
server._ssrCompatModuleRunner = undefined;
|
43781
|
+
};
|
43606
43782
|
let server = {
|
43607
43783
|
config,
|
43608
43784
|
middlewares,
|
@@ -43725,22 +43901,10 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43725
43901
|
}
|
43726
43902
|
},
|
43727
43903
|
async close() {
|
43728
|
-
if (!
|
43729
|
-
|
43730
|
-
}
|
43731
|
-
|
43732
|
-
watcher.close(),
|
43733
|
-
ws.close(),
|
43734
|
-
Promise.allSettled(
|
43735
|
-
Object.values(server.environments).map(
|
43736
|
-
(environment) => environment.close()
|
43737
|
-
)
|
43738
|
-
),
|
43739
|
-
closeHttpServer(),
|
43740
|
-
server._ssrCompatModuleRunner?.close()
|
43741
|
-
]);
|
43742
|
-
server.resolvedUrls = null;
|
43743
|
-
server._ssrCompatModuleRunner = void 0;
|
43904
|
+
if (!closeServerPromise) {
|
43905
|
+
closeServerPromise = closeServer();
|
43906
|
+
}
|
43907
|
+
return closeServerPromise;
|
43744
43908
|
},
|
43745
43909
|
printUrls() {
|
43746
43910
|
if (server.resolvedUrls) {
|
@@ -43779,7 +43943,7 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43779
43943
|
_importGlobMap: /* @__PURE__ */ new Map(),
|
43780
43944
|
_restartPromise: null,
|
43781
43945
|
_forceOptimizeOnRestart: false,
|
43782
|
-
_shortcutsOptions:
|
43946
|
+
_shortcutsOptions: undefined
|
43783
43947
|
};
|
43784
43948
|
const reflexServer = new Proxy(server, {
|
43785
43949
|
get: (_, property) => {
|
@@ -43794,7 +43958,7 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43794
43958
|
try {
|
43795
43959
|
await server.close();
|
43796
43960
|
} finally {
|
43797
|
-
process.exitCode ??= exitCode ? 128 + exitCode :
|
43961
|
+
process.exitCode ??= exitCode ? 128 + exitCode : undefined;
|
43798
43962
|
process.exit();
|
43799
43963
|
}
|
43800
43964
|
};
|
@@ -43864,6 +44028,10 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43864
44028
|
if (cors !== false) {
|
43865
44029
|
middlewares.use(corsMiddleware(typeof cors === "boolean" ? {} : cors));
|
43866
44030
|
}
|
44031
|
+
const { allowedHosts } = serverConfig;
|
44032
|
+
if (allowedHosts !== true && !serverConfig.https) {
|
44033
|
+
middlewares.use(hostCheckMiddleware(config));
|
44034
|
+
}
|
43867
44035
|
middlewares.use(cachedTransformMiddleware(server));
|
43868
44036
|
const { proxy } = serverConfig;
|
43869
44037
|
if (proxy) {
|
@@ -43908,7 +44076,7 @@ async function _createServer(inlineConfig = {}, options) {
|
|
43908
44076
|
Object.values(environments).map((e) => e.listen(server))
|
43909
44077
|
);
|
43910
44078
|
}
|
43911
|
-
initingServer =
|
44079
|
+
initingServer = undefined;
|
43912
44080
|
serverInited = true;
|
43913
44081
|
}();
|
43914
44082
|
return initingServer;
|
@@ -43984,10 +44152,11 @@ const serverConfigDefaults = Object.freeze({
|
|
43984
44152
|
port: DEFAULT_DEV_PORT,
|
43985
44153
|
strictPort: false,
|
43986
44154
|
host: "localhost",
|
43987
|
-
|
44155
|
+
allowedHosts: [],
|
44156
|
+
https: undefined,
|
43988
44157
|
open: false,
|
43989
|
-
proxy:
|
43990
|
-
cors:
|
44158
|
+
proxy: undefined,
|
44159
|
+
cors: false,
|
43991
44160
|
headers: {},
|
43992
44161
|
// hmr
|
43993
44162
|
// ws
|
@@ -44012,7 +44181,7 @@ function resolveServerOptions(root, raw, logger) {
|
|
44012
44181
|
const _server = mergeWithDefaults(
|
44013
44182
|
{
|
44014
44183
|
...serverConfigDefaults,
|
44015
|
-
host:
|
44184
|
+
host: undefined,
|
44016
44185
|
// do not set here to detect whether host is set or not
|
44017
44186
|
sourcemapIgnoreList: isInNodeModules$1
|
44018
44187
|
},
|
@@ -44465,7 +44634,7 @@ async function handleHMRUpdate(type, file, server) {
|
|
44465
44634
|
throw error2;
|
44466
44635
|
}
|
44467
44636
|
if (!options.modules.length) {
|
44468
|
-
if (file.endsWith(".html")) {
|
44637
|
+
if (file.endsWith(".html") && environment.name === "client") {
|
44469
44638
|
environment.logger.info(
|
44470
44639
|
colors$1.green(`page reload `) + colors$1.dim(shortFile),
|
44471
44640
|
{
|
@@ -44574,7 +44743,7 @@ function propagateUpdate(node, traversedModules, boundaries, currentChain = [nod
|
|
44574
44743
|
return false;
|
44575
44744
|
}
|
44576
44745
|
traversedModules.add(node);
|
44577
|
-
if (node.id && node.isSelfAccepting ===
|
44746
|
+
if (node.id && node.isSelfAccepting === undefined) {
|
44578
44747
|
debugHmr?.(
|
44579
44748
|
`[propagate update] stop propagation because not analyzed: ${colors$1.dim(
|
44580
44749
|
node.id
|
@@ -45228,7 +45397,7 @@ function webWorkerPlugin(config) {
|
|
45228
45397
|
injectEnv = "";
|
45229
45398
|
} else {
|
45230
45399
|
const environment = this.environment;
|
45231
|
-
const moduleGraph = environment.mode === "dev" ? environment.moduleGraph :
|
45400
|
+
const moduleGraph = environment.mode === "dev" ? environment.moduleGraph : undefined;
|
45232
45401
|
const module = moduleGraph?.getModuleById(ENV_ENTRY);
|
45233
45402
|
injectEnv = module?.transformResult?.code || "";
|
45234
45403
|
}
|
@@ -45405,7 +45574,7 @@ function preAliasPlugin(config) {
|
|
45405
45574
|
async resolveId(id, importer, options) {
|
45406
45575
|
const { environment } = this;
|
45407
45576
|
const ssr = environment.config.consumer === "server";
|
45408
|
-
const depsOptimizer = environment.mode === "dev" ? environment.depsOptimizer :
|
45577
|
+
const depsOptimizer = environment.mode === "dev" ? environment.depsOptimizer : undefined;
|
45409
45578
|
if (importer && depsOptimizer && bareImportRE.test(id) && !options.scan && id !== "@vite/client" && id !== "@vite/env") {
|
45410
45579
|
if (findPatterns.find((pattern) => matches(pattern, id))) {
|
45411
45580
|
const optimizedId = await tryOptimizedResolve(
|
@@ -45590,7 +45759,7 @@ function importAnalysisPlugin(config) {
|
|
45590
45759
|
importer,
|
45591
45760
|
source
|
45592
45761
|
);
|
45593
|
-
this.error(message, showCodeFrame ? e.idx :
|
45762
|
+
this.error(message, showCodeFrame ? e.idx : undefined);
|
45594
45763
|
}
|
45595
45764
|
const depsOptimizer = environment.depsOptimizer;
|
45596
45765
|
const importerModule = moduleGraph.getModuleById(importer);
|
@@ -45735,7 +45904,7 @@ function importAnalysisPlugin(config) {
|
|
45735
45904
|
if (!isDynamicImport && attributeIndex > -1) {
|
45736
45905
|
str().remove(end + 1, expEnd);
|
45737
45906
|
}
|
45738
|
-
if (specifier !==
|
45907
|
+
if (specifier !== undefined) {
|
45739
45908
|
if (isExternalUrl(specifier) && !specifier.startsWith("file://") || isDataUrl(specifier)) {
|
45740
45909
|
return;
|
45741
45910
|
}
|
@@ -45769,7 +45938,7 @@ function importAnalysisPlugin(config) {
|
|
45769
45938
|
depsOptimizer.metadata,
|
45770
45939
|
file
|
45771
45940
|
);
|
45772
|
-
if (needsInterop ===
|
45941
|
+
if (needsInterop === undefined) {
|
45773
45942
|
if (!optimizedDepDynamicRE.test(file)) {
|
45774
45943
|
config.logger.error(
|
45775
45944
|
colors$1.red(
|
@@ -46125,7 +46294,7 @@ function clientInjectionsPlugin(config) {
|
|
46125
46294
|
const devBase = config.base;
|
46126
46295
|
const serverHost = `${resolvedServerHostname}:${resolvedServerPort}${devBase}`;
|
46127
46296
|
let hmrConfig = config.server.hmr;
|
46128
|
-
hmrConfig = isObject$2(hmrConfig) ? hmrConfig :
|
46297
|
+
hmrConfig = isObject$2(hmrConfig) ? hmrConfig : undefined;
|
46129
46298
|
const host = hmrConfig?.host || null;
|
46130
46299
|
const protocol = hmrConfig?.protocol || null;
|
46131
46300
|
const timeout = hmrConfig?.timeout || 3e4;
|
@@ -46154,8 +46323,9 @@ function clientInjectionsPlugin(config) {
|
|
46154
46323
|
const hmrTimeoutReplacement = escapeReplacement(timeout);
|
46155
46324
|
const hmrEnableOverlayReplacement = escapeReplacement(overlay);
|
46156
46325
|
const hmrConfigNameReplacement = escapeReplacement(hmrConfigName);
|
46326
|
+
const wsTokenReplacement = escapeReplacement(config.webSocketToken);
|
46157
46327
|
injectConfigValues = (code) => {
|
46158
|
-
return code.replace(`__MODE__`, modeReplacement).replace(/__BASE__/g, baseReplacement).replace(`__SERVER_HOST__`, serverHostReplacement).replace(`__HMR_PROTOCOL__`, hmrProtocolReplacement).replace(`__HMR_HOSTNAME__`, hmrHostnameReplacement).replace(`__HMR_PORT__`, hmrPortReplacement).replace(`__HMR_DIRECT_TARGET__`, hmrDirectTargetReplacement).replace(`__HMR_BASE__`, hmrBaseReplacement).replace(`__HMR_TIMEOUT__`, hmrTimeoutReplacement).replace(`__HMR_ENABLE_OVERLAY__`, hmrEnableOverlayReplacement).replace(`__HMR_CONFIG_NAME__`, hmrConfigNameReplacement);
|
46328
|
+
return code.replace(`__MODE__`, modeReplacement).replace(/__BASE__/g, baseReplacement).replace(`__SERVER_HOST__`, serverHostReplacement).replace(`__HMR_PROTOCOL__`, hmrProtocolReplacement).replace(`__HMR_HOSTNAME__`, hmrHostnameReplacement).replace(`__HMR_PORT__`, hmrPortReplacement).replace(`__HMR_DIRECT_TARGET__`, hmrDirectTargetReplacement).replace(`__HMR_BASE__`, hmrBaseReplacement).replace(`__HMR_TIMEOUT__`, hmrTimeoutReplacement).replace(`__HMR_ENABLE_OVERLAY__`, hmrEnableOverlayReplacement).replace(`__HMR_CONFIG_NAME__`, hmrConfigNameReplacement).replace(`__WS_TOKEN__`, wsTokenReplacement);
|
46159
46329
|
};
|
46160
46330
|
},
|
46161
46331
|
async transform(code, id, options) {
|
@@ -46990,7 +47160,7 @@ class EnvironmentPluginContainer {
|
|
46990
47160
|
const utils = createPluginHookUtils(plugins);
|
46991
47161
|
this.getSortedPlugins = utils.getSortedPlugins;
|
46992
47162
|
this.getSortedPluginHooks = utils.getSortedPluginHooks;
|
46993
|
-
this.moduleGraph = environment.mode === "dev" ? environment.moduleGraph :
|
47163
|
+
this.moduleGraph = environment.mode === "dev" ? environment.moduleGraph : undefined;
|
46994
47164
|
}
|
46995
47165
|
_pluginContextMap = /* @__PURE__ */ new Map();
|
46996
47166
|
_resolvedRollupOptions;
|
@@ -47032,7 +47202,7 @@ class EnvironmentPluginContainer {
|
|
47032
47202
|
return info[key];
|
47033
47203
|
}
|
47034
47204
|
if (key === "then") {
|
47035
|
-
return
|
47205
|
+
return undefined;
|
47036
47206
|
}
|
47037
47207
|
throw Error(
|
47038
47208
|
`[vite] The "${key}" property of ModuleInfo is not supported.`
|
@@ -47111,7 +47281,7 @@ class EnvironmentPluginContainer {
|
|
47111
47281
|
)
|
47112
47282
|
);
|
47113
47283
|
await this._buildStartPromise;
|
47114
|
-
this._buildStartPromise =
|
47284
|
+
this._buildStartPromise = undefined;
|
47115
47285
|
}
|
47116
47286
|
async resolveId(rawId, importer = join$1(
|
47117
47287
|
this.environment.config.root,
|
@@ -47233,7 +47403,7 @@ class EnvironmentPluginContainer {
|
|
47233
47403
|
prettifyUrl(id, this.environment.config.root)
|
47234
47404
|
);
|
47235
47405
|
if (isObject$2(result)) {
|
47236
|
-
if (result.code !==
|
47406
|
+
if (result.code !== undefined) {
|
47237
47407
|
code = result.code;
|
47238
47408
|
if (result.map) {
|
47239
47409
|
if (debugSourcemapCombine) {
|
@@ -47740,7 +47910,7 @@ function resolveCSSOptions(options) {
|
|
47740
47910
|
resolved.lightningcss ??= {};
|
47741
47911
|
resolved.lightningcss.targets ??= convertTargets(ESBUILD_MODULES_TARGET);
|
47742
47912
|
} else {
|
47743
|
-
resolved.lightningcss =
|
47913
|
+
resolved.lightningcss = undefined;
|
47744
47914
|
}
|
47745
47915
|
return resolved;
|
47746
47916
|
}
|
@@ -48030,7 +48200,7 @@ function cssPostPlugin(config) {
|
|
48030
48200
|
const resolveAssetUrlsInCss = (chunkCSS2, cssAssetName) => {
|
48031
48201
|
const encodedPublicUrls = encodePublicUrlsInCSS(config);
|
48032
48202
|
const relative = config.base === "./" || config.base === "";
|
48033
|
-
const cssAssetDirname = encodedPublicUrls || relative ? slash$1(getCssAssetDirname(cssAssetName)) :
|
48203
|
+
const cssAssetDirname = encodedPublicUrls || relative ? slash$1(getCssAssetDirname(cssAssetName)) : undefined;
|
48034
48204
|
const toRelative = (filename) => {
|
48035
48205
|
const relativePath = normalizePath$3(
|
48036
48206
|
path$d.relative(cssAssetDirname, filename)
|
@@ -48073,7 +48243,7 @@ function cssPostPlugin(config) {
|
|
48073
48243
|
};
|
48074
48244
|
function ensureFileExt(name, ext) {
|
48075
48245
|
return normalizePath$3(
|
48076
|
-
path$d.format({ ...path$d.parse(name), base:
|
48246
|
+
path$d.format({ ...path$d.parse(name), base: undefined, ext })
|
48077
48247
|
);
|
48078
48248
|
}
|
48079
48249
|
let s;
|
@@ -48397,7 +48567,7 @@ function createCSSResolvers(config) {
|
|
48397
48567
|
args[1] = fileURLToPath$1(args[1], {
|
48398
48568
|
windows: (
|
48399
48569
|
// file:///foo cannot be converted to path with windows mode
|
48400
|
-
isWindows$3 && args[1].startsWith("file:///") ? false :
|
48570
|
+
isWindows$3 && args[1].startsWith("file:///") ? false : undefined
|
48401
48571
|
)
|
48402
48572
|
});
|
48403
48573
|
}
|
@@ -48646,11 +48816,11 @@ ${generateCodeFrame(
|
|
48646
48816
|
column: warning.column - 1
|
48647
48817
|
// 1-based
|
48648
48818
|
},
|
48649
|
-
warning.endLine !==
|
48819
|
+
warning.endLine !== undefined && warning.endColumn !== undefined ? {
|
48650
48820
|
line: warning.endLine,
|
48651
48821
|
column: warning.endColumn - 1
|
48652
48822
|
// 1-based
|
48653
|
-
} :
|
48823
|
+
} : undefined
|
48654
48824
|
)}`;
|
48655
48825
|
environment.logger.warn(colors$1.yellow(msg));
|
48656
48826
|
}
|
@@ -48702,8 +48872,8 @@ function createCachedImport(imp) {
|
|
48702
48872
|
return cached;
|
48703
48873
|
};
|
48704
48874
|
}
|
48705
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
48706
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
48875
|
+
const importPostcssImport = createCachedImport(() => import('./dep-CgjxNdwk.js').then(function (n) { return n.i; }));
|
48876
|
+
const importPostcssModules = createCachedImport(() => import('./dep-BurZv_3i.js').then(function (n) { return n.i; }));
|
48707
48877
|
const importPostcss = createCachedImport(() => import('postcss'));
|
48708
48878
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
48709
48879
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -48759,7 +48929,7 @@ async function finalizeCss(css, minify, config) {
|
|
48759
48929
|
}
|
48760
48930
|
async function resolvePostcssConfig(config) {
|
48761
48931
|
let result = postcssConfigCache.get(config);
|
48762
|
-
if (result !==
|
48932
|
+
if (result !== undefined) {
|
48763
48933
|
return await result;
|
48764
48934
|
}
|
48765
48935
|
const inlineOptions = config.css.postcss;
|
@@ -48927,7 +49097,7 @@ async function minifyCSS(css, config, inlined) {
|
|
48927
49097
|
const { code, warnings } = (await importLightningCSS()).transform({
|
48928
49098
|
...config.css.lightningcss,
|
48929
49099
|
targets: convertTargets(config.build.cssTarget),
|
48930
|
-
cssModules:
|
49100
|
+
cssModules: undefined,
|
48931
49101
|
// TODO: Pass actual filename here, which can also be passed to esbuild's
|
48932
49102
|
// `sourcefile` option below to improve error messages
|
48933
49103
|
filename: defaultCssBundleName,
|
@@ -48965,7 +49135,7 @@ ${messages.join("\n")}`)
|
|
48965
49135
|
try {
|
48966
49136
|
const { code, warnings } = await transform$1(css, {
|
48967
49137
|
loader: "css",
|
48968
|
-
target: config.build.cssTarget ||
|
49138
|
+
target: config.build.cssTarget || undefined,
|
48969
49139
|
...resolveMinifyCssEsbuildOptions(config.esbuild || {})
|
48970
49140
|
});
|
48971
49141
|
if (warnings.length) {
|
@@ -49239,7 +49409,7 @@ const makeModernScssWorker = (environment, resolvers, alias, maxWorkers) => {
|
|
49239
49409
|
const result = await sass.compileStringAsync(data, sassOptions);
|
49240
49410
|
return {
|
49241
49411
|
css: result.css,
|
49242
|
-
map: result.sourceMap ? JSON.stringify(result.sourceMap) :
|
49412
|
+
map: result.sourceMap ? JSON.stringify(result.sourceMap) : undefined,
|
49243
49413
|
stats: {
|
49244
49414
|
includedFiles: result.loadedUrls.filter((url) => url.protocol === "file:").map((url) => fileURLToPath2(url))
|
49245
49415
|
}
|
@@ -49308,7 +49478,7 @@ const makeModernCompilerScssWorker = (environment, resolvers, alias, _maxWorkers
|
|
49308
49478
|
const result = await compiler.compileStringAsync(data, sassOptions);
|
49309
49479
|
return {
|
49310
49480
|
css: result.css,
|
49311
|
-
map: result.sourceMap ? JSON.stringify(result.sourceMap) :
|
49481
|
+
map: result.sourceMap ? JSON.stringify(result.sourceMap) : undefined,
|
49312
49482
|
stats: {
|
49313
49483
|
includedFiles: result.loadedUrls.filter((url) => url.protocol === "file:").map((url) => fileURLToPath$1(url))
|
49314
49484
|
}
|
@@ -49316,7 +49486,7 @@ const makeModernCompilerScssWorker = (environment, resolvers, alias, _maxWorkers
|
|
49316
49486
|
},
|
49317
49487
|
async stop() {
|
49318
49488
|
(await compilerPromise)?.dispose();
|
49319
|
-
compilerPromise =
|
49489
|
+
compilerPromise = undefined;
|
49320
49490
|
}
|
49321
49491
|
};
|
49322
49492
|
return worker;
|
@@ -49361,7 +49531,7 @@ const scssProcessor = (maxWorkers) => {
|
|
49361
49531
|
);
|
49362
49532
|
const optionsWithoutAdditionalData = {
|
49363
49533
|
...options,
|
49364
|
-
additionalData:
|
49534
|
+
additionalData: undefined
|
49365
49535
|
};
|
49366
49536
|
try {
|
49367
49537
|
const result = await worker.run(
|
@@ -49371,7 +49541,7 @@ const scssProcessor = (maxWorkers) => {
|
|
49371
49541
|
optionsWithoutAdditionalData
|
49372
49542
|
);
|
49373
49543
|
const deps = result.stats.includedFiles.map((f) => cleanScssBugUrl(f));
|
49374
|
-
const map2 = result.map ? JSON.parse(result.map.toString()) :
|
49544
|
+
const map2 = result.map ? JSON.parse(result.map.toString()) : undefined;
|
49375
49545
|
if (map2) {
|
49376
49546
|
map2.sources = map2.sources.map(
|
49377
49547
|
(url) => url.startsWith("file://") ? normalizePath$3(fileURLToPath$1(url)) : url
|
@@ -49446,7 +49616,7 @@ const makeLessWorker = (environment, resolvers, alias, maxWorkers) => {
|
|
49446
49616
|
filename,
|
49447
49617
|
path$d.join(dir, "*")
|
49448
49618
|
);
|
49449
|
-
if (!resolved) return
|
49619
|
+
if (!resolved) return undefined;
|
49450
49620
|
const result = await rebaseUrls(
|
49451
49621
|
environment,
|
49452
49622
|
resolved,
|
@@ -49457,7 +49627,7 @@ const makeLessWorker = (environment, resolvers, alias, maxWorkers) => {
|
|
49457
49627
|
);
|
49458
49628
|
return {
|
49459
49629
|
resolved,
|
49460
|
-
contents: "contents" in result ? result.contents :
|
49630
|
+
contents: "contents" in result ? result.contents : undefined
|
49461
49631
|
};
|
49462
49632
|
};
|
49463
49633
|
const worker = new WorkerWithFallback(
|
@@ -49555,7 +49725,7 @@ const lessProcessor = (maxWorkers) => {
|
|
49555
49725
|
let result;
|
49556
49726
|
const optionsWithoutAdditionalData = {
|
49557
49727
|
...options,
|
49558
|
-
additionalData:
|
49728
|
+
additionalData: undefined
|
49559
49729
|
};
|
49560
49730
|
try {
|
49561
49731
|
result = await worker.run(
|
@@ -49653,7 +49823,7 @@ const stylProcessor = (maxWorkers) => {
|
|
49653
49823
|
);
|
49654
49824
|
const optionsWithoutAdditionalData = {
|
49655
49825
|
...options,
|
49656
|
-
additionalData:
|
49826
|
+
additionalData: undefined
|
49657
49827
|
};
|
49658
49828
|
try {
|
49659
49829
|
const { code, map: map2, deps } = await worker.run(
|
@@ -49679,7 +49849,7 @@ const stylProcessor = (maxWorkers) => {
|
|
49679
49849
|
};
|
49680
49850
|
};
|
49681
49851
|
function formatStylusSourceMap(mapBefore, root) {
|
49682
|
-
if (!mapBefore) return
|
49852
|
+
if (!mapBefore) return undefined;
|
49683
49853
|
const map2 = { ...mapBefore };
|
49684
49854
|
const resolveFromRoot = (p) => normalizePath$3(path$d.resolve(root, p));
|
49685
49855
|
if (map2.file) {
|
@@ -49739,8 +49909,8 @@ const createPreprocessorWorkerController = (maxWorkers) => {
|
|
49739
49909
|
};
|
49740
49910
|
};
|
49741
49911
|
const normalizeMaxWorkers = (maxWorker) => {
|
49742
|
-
if (maxWorker ===
|
49743
|
-
if (maxWorker === true) return
|
49912
|
+
if (maxWorker === undefined) return 0;
|
49913
|
+
if (maxWorker === true) return undefined;
|
49744
49914
|
return maxWorker;
|
49745
49915
|
};
|
49746
49916
|
const preprocessorSet = /* @__PURE__ */ new Set([
|
@@ -49799,7 +49969,7 @@ async function compileLightningCSS(id, src, environment, urlReplacer) {
|
|
49799
49969
|
minify: config.isProduction && !!config.build.cssMinify,
|
49800
49970
|
sourceMap: config.command === "build" ? !!config.build.sourcemap : config.css.devSourcemap,
|
49801
49971
|
analyzeDependencies: true,
|
49802
|
-
cssModules: cssModuleRE.test(id) ? config.css.lightningcss?.cssModules ?? true :
|
49972
|
+
cssModules: cssModuleRE.test(id) ? config.css.lightningcss?.cssModules ?? true : undefined
|
49803
49973
|
});
|
49804
49974
|
} catch (e) {
|
49805
49975
|
e.message = `[lightningcss] ${e.message}`;
|
@@ -49866,7 +50036,7 @@ ${generateCodeFrame(src, {
|
|
49866
50036
|
}
|
49867
50037
|
return {
|
49868
50038
|
code: css,
|
49869
|
-
map: "map" in res ? res.map?.toString() :
|
50039
|
+
map: "map" in res ? res.map?.toString() : undefined,
|
49870
50040
|
deps,
|
49871
50041
|
modules
|
49872
50042
|
};
|
@@ -49947,7 +50117,7 @@ function resolveLibCssFilename(libOptions, root, packageCache) {
|
|
49947
50117
|
return `${libOptions.fileName}.css`;
|
49948
50118
|
}
|
49949
50119
|
const packageJson = findNearestPackageData(root, packageCache)?.data;
|
49950
|
-
const name = packageJson ? getPkgName(packageJson.name) :
|
50120
|
+
const name = packageJson ? getPkgName(packageJson.name) : undefined;
|
49951
50121
|
if (!name)
|
49952
50122
|
throw new Error(
|
49953
50123
|
'Name in package.json is required if option "build.lib.cssFileName" is not provided.'
|
@@ -50085,7 +50255,7 @@ function buildImportAnalysisPlugin(config) {
|
|
50085
50255
|
importer,
|
50086
50256
|
source
|
50087
50257
|
);
|
50088
|
-
this.error(message, showCodeFrame ? e.idx :
|
50258
|
+
this.error(message, showCodeFrame ? e.idx : undefined);
|
50089
50259
|
}
|
50090
50260
|
if (!imports.length) {
|
50091
50261
|
return null;
|
@@ -50282,7 +50452,7 @@ function buildImportAnalysisPlugin(config) {
|
|
50282
50452
|
}
|
50283
50453
|
const deps = /* @__PURE__ */ new Set();
|
50284
50454
|
let hasRemovedPureCssChunk = false;
|
50285
|
-
let normalizedFile =
|
50455
|
+
let normalizedFile = undefined;
|
50286
50456
|
if (url) {
|
50287
50457
|
normalizedFile = path$d.posix.join(
|
50288
50458
|
path$d.posix.dirname(chunk.fileName),
|
@@ -50334,7 +50504,7 @@ function buildImportAnalysisPlugin(config) {
|
|
50334
50504
|
// we still need to pass these deps to the preload helper in dynamic imports.
|
50335
50505
|
[...deps].filter((d) => d.endsWith(".css"))
|
50336
50506
|
) : [...deps] : [];
|
50337
|
-
const resolveDependencies = modulePreload ? modulePreload.resolveDependencies :
|
50507
|
+
const resolveDependencies = modulePreload ? modulePreload.resolveDependencies : undefined;
|
50338
50508
|
if (resolveDependencies && normalizedFile) {
|
50339
50509
|
const cssDeps = [];
|
50340
50510
|
const otherDeps = [];
|
@@ -50523,7 +50693,7 @@ function ssrManifestPlugin() {
|
|
50523
50693
|
this.emitFile({
|
50524
50694
|
fileName: typeof config.build.ssrManifest === "string" ? config.build.ssrManifest : ".vite/ssr-manifest.json",
|
50525
50695
|
type: "asset",
|
50526
|
-
source: JSON.stringify(sortObjectKeys(ssrManifest),
|
50696
|
+
source: JSON.stringify(sortObjectKeys(ssrManifest), undefined, 2)
|
50527
50697
|
});
|
50528
50698
|
}
|
50529
50699
|
};
|
@@ -50606,12 +50776,12 @@ function resolveBuildEnvironmentOptions(raw, logger, consumer) {
|
|
50606
50776
|
const deprecatedPolyfillModulePreload = raw.polyfillModulePreload;
|
50607
50777
|
const { polyfillModulePreload, ...rest } = raw;
|
50608
50778
|
raw = rest;
|
50609
|
-
if (deprecatedPolyfillModulePreload !==
|
50779
|
+
if (deprecatedPolyfillModulePreload !== undefined) {
|
50610
50780
|
logger.warn(
|
50611
50781
|
"polyfillModulePreload is deprecated. Use modulePreload.polyfill instead."
|
50612
50782
|
);
|
50613
50783
|
}
|
50614
|
-
if (deprecatedPolyfillModulePreload === false && raw.modulePreload ===
|
50784
|
+
if (deprecatedPolyfillModulePreload === false && raw.modulePreload === undefined) {
|
50615
50785
|
raw.modulePreload = { polyfill: false };
|
50616
50786
|
}
|
50617
50787
|
const merged = mergeWithDefaults(
|
@@ -50731,7 +50901,7 @@ async function buildEnvironment(environment) {
|
|
50731
50901
|
);
|
50732
50902
|
const rollupOptions = {
|
50733
50903
|
preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
|
50734
|
-
cache: options.watch ?
|
50904
|
+
cache: options.watch ? undefined : false,
|
50735
50905
|
...options.rollupOptions,
|
50736
50906
|
output: options.rollupOptions.output,
|
50737
50907
|
input,
|
@@ -50773,7 +50943,7 @@ file: ${colors$1.cyan(
|
|
50773
50943
|
` + colors$1.yellow(normalizeCodeFrame(e.frame));
|
50774
50944
|
}
|
50775
50945
|
e.message = msg;
|
50776
|
-
if (stackOnly !==
|
50946
|
+
if (stackOnly !== undefined) {
|
50777
50947
|
e.stack = `${e.message}
|
50778
50948
|
${stackOnly}`;
|
50779
50949
|
}
|
@@ -50816,8 +50986,8 @@ ${stackOnly}`;
|
|
50816
50986
|
format,
|
50817
50987
|
exports: "auto",
|
50818
50988
|
sourcemap: options.sourcemap,
|
50819
|
-
name: libOptions ? libOptions.name :
|
50820
|
-
hoistTransitiveImports: libOptions ? false :
|
50989
|
+
name: libOptions ? libOptions.name : undefined,
|
50990
|
+
hoistTransitiveImports: libOptions ? false : undefined,
|
50821
50991
|
// es2015 enables `generatedCode.symbols`
|
50822
50992
|
// - #764 add `Symbol.toStringTag` when build es module into cjs chunk
|
50823
50993
|
// - #1048 add `Symbol.toStringTag` for module default export
|
@@ -50915,7 +51085,7 @@ build started...`));
|
|
50915
51085
|
logger.error(
|
50916
51086
|
`${colors$1.red("x")} Build failed in ${displayTime(Date.now() - startTime)}`
|
50917
51087
|
);
|
50918
|
-
startTime =
|
51088
|
+
startTime = undefined;
|
50919
51089
|
}
|
50920
51090
|
throw e;
|
50921
51091
|
} finally {
|
@@ -51641,7 +51811,7 @@ function createDepsOptimizer(environment) {
|
|
51641
51811
|
devToScanEnvironment(environment)
|
51642
51812
|
);
|
51643
51813
|
const deps = await discover.result;
|
51644
|
-
discover =
|
51814
|
+
discover = undefined;
|
51645
51815
|
const manuallyIncluded = Object.keys(manuallyIncludedDepsInfo);
|
51646
51816
|
discoveredDepsWhileScanning.push(
|
51647
51817
|
...Object.keys(metadata.discovered).filter(
|
@@ -51659,7 +51829,7 @@ function createDepsOptimizer(environment) {
|
|
51659
51829
|
if (!holdUntilCrawlEnd) {
|
51660
51830
|
optimizationResult.result.then((result) => {
|
51661
51831
|
if (!waitingForCrawlEnd) return;
|
51662
|
-
optimizationResult =
|
51832
|
+
optimizationResult = undefined;
|
51663
51833
|
runOptimizer(result);
|
51664
51834
|
});
|
51665
51835
|
}
|
@@ -51667,7 +51837,7 @@ function createDepsOptimizer(environment) {
|
|
51667
51837
|
logger.error(e.stack || e.message);
|
51668
51838
|
} finally {
|
51669
51839
|
resolve();
|
51670
|
-
depsOptimizer.scanProcessing =
|
51840
|
+
depsOptimizer.scanProcessing = undefined;
|
51671
51841
|
}
|
51672
51842
|
})();
|
51673
51843
|
});
|
@@ -51694,7 +51864,7 @@ function createDepsOptimizer(environment) {
|
|
51694
51864
|
async function runOptimizer(preRunResult) {
|
51695
51865
|
const isRerun = firstRunCalled;
|
51696
51866
|
firstRunCalled = true;
|
51697
|
-
enqueuedRerun =
|
51867
|
+
enqueuedRerun = undefined;
|
51698
51868
|
if (debounceProcessingHandle) clearTimeout(debounceProcessingHandle);
|
51699
51869
|
if (closed) {
|
51700
51870
|
currentlyProcessing = false;
|
@@ -51712,7 +51882,7 @@ function createDepsOptimizer(environment) {
|
|
51712
51882
|
startNextDiscoveredBatch();
|
51713
51883
|
optimizationResult = runOptimizeDeps(environment, knownDeps);
|
51714
51884
|
processingResult = await optimizationResult.result;
|
51715
|
-
optimizationResult =
|
51885
|
+
optimizationResult = undefined;
|
51716
51886
|
}
|
51717
51887
|
if (closed) {
|
51718
51888
|
currentlyProcessing = false;
|
@@ -51751,7 +51921,7 @@ function createDepsOptimizer(environment) {
|
|
51751
51921
|
discovered.browserHash = optimized.browserHash;
|
51752
51922
|
discovered.fileHash = optimized.fileHash;
|
51753
51923
|
discovered.needsInterop = optimized.needsInterop;
|
51754
|
-
discovered.processing =
|
51924
|
+
discovered.processing = undefined;
|
51755
51925
|
}
|
51756
51926
|
}
|
51757
51927
|
if (isRerun) {
|
@@ -51769,7 +51939,7 @@ function createDepsOptimizer(environment) {
|
|
51769
51939
|
if (!debug$1) {
|
51770
51940
|
if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle);
|
51771
51941
|
newDepsToLogHandle = setTimeout(() => {
|
51772
|
-
newDepsToLogHandle =
|
51942
|
+
newDepsToLogHandle = undefined;
|
51773
51943
|
logNewlyDiscoveredDeps();
|
51774
51944
|
if (warnAboutMissedDependencies) {
|
51775
51945
|
logDiscoveredDepsWhileScanning();
|
@@ -51801,7 +51971,7 @@ function createDepsOptimizer(environment) {
|
|
51801
51971
|
await commitProcessing();
|
51802
51972
|
if (!debug$1) {
|
51803
51973
|
if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle);
|
51804
|
-
newDepsToLogHandle =
|
51974
|
+
newDepsToLogHandle = undefined;
|
51805
51975
|
logNewlyDiscoveredDeps();
|
51806
51976
|
if (warnAboutMissedDependencies) {
|
51807
51977
|
logDiscoveredDepsWhileScanning();
|
@@ -51904,12 +52074,12 @@ ${e.stack}`),
|
|
51904
52074
|
});
|
51905
52075
|
}
|
51906
52076
|
function debouncedProcessing(timeout = debounceMs) {
|
51907
|
-
enqueuedRerun =
|
52077
|
+
enqueuedRerun = undefined;
|
51908
52078
|
if (debounceProcessingHandle) clearTimeout(debounceProcessingHandle);
|
51909
52079
|
if (newDepsToLogHandle) clearTimeout(newDepsToLogHandle);
|
51910
|
-
newDepsToLogHandle =
|
52080
|
+
newDepsToLogHandle = undefined;
|
51911
52081
|
debounceProcessingHandle = setTimeout(() => {
|
51912
|
-
debounceProcessingHandle =
|
52082
|
+
debounceProcessingHandle = undefined;
|
51913
52083
|
enqueuedRerun = rerun;
|
51914
52084
|
if (!currentlyProcessing) {
|
51915
52085
|
enqueuedRerun();
|
@@ -51925,7 +52095,7 @@ ${e.stack}`),
|
|
51925
52095
|
await depsOptimizer.scanProcessing;
|
51926
52096
|
if (optimizationResult && !options.noDiscovery) {
|
51927
52097
|
const afterScanResult = optimizationResult.result;
|
51928
|
-
optimizationResult =
|
52098
|
+
optimizationResult = undefined;
|
51929
52099
|
const result = await afterScanResult;
|
51930
52100
|
currentlyProcessing = false;
|
51931
52101
|
const crawlDeps = Object.keys(metadata.discovered);
|
@@ -52029,7 +52199,7 @@ function findInteropMismatches(discovered, optimized) {
|
|
52029
52199
|
const needsInteropMismatch = [];
|
52030
52200
|
for (const dep in discovered) {
|
52031
52201
|
const discoveredDepInfo = discovered[dep];
|
52032
|
-
if (discoveredDepInfo.needsInterop ===
|
52202
|
+
if (discoveredDepInfo.needsInterop === undefined) continue;
|
52033
52203
|
const depInfo = optimized[dep];
|
52034
52204
|
if (!depInfo) continue;
|
52035
52205
|
if (depInfo.needsInterop !== discoveredDepInfo.needsInterop) {
|
@@ -52506,7 +52676,7 @@ class DevEnvironment extends BaseEnvironment {
|
|
52506
52676
|
this._pendingRequests = /* @__PURE__ */ new Map();
|
52507
52677
|
this.moduleGraph = new EnvironmentModuleGraph(
|
52508
52678
|
name,
|
52509
|
-
(url) => this.pluginContainer.resolveId(url,
|
52679
|
+
(url) => this.pluginContainer.resolveId(url, undefined)
|
52510
52680
|
);
|
52511
52681
|
this._crawlEndFinder = setupOnCrawlEnd();
|
52512
52682
|
this._remoteRunnerOptions = context.remoteRunner ?? {};
|
@@ -52526,7 +52696,7 @@ class DevEnvironment extends BaseEnvironment {
|
|
52526
52696
|
if (context.depsOptimizer) {
|
52527
52697
|
this.depsOptimizer = context.depsOptimizer;
|
52528
52698
|
} else if (isDepOptimizationDisabled(optimizeDeps)) {
|
52529
|
-
this.depsOptimizer =
|
52699
|
+
this.depsOptimizer = undefined;
|
52530
52700
|
} else {
|
52531
52701
|
this.depsOptimizer = (optimizeDeps.noDiscovery ? createExplicitDepsOptimizer : createDepsOptimizer)(this);
|
52532
52702
|
}
|
@@ -52846,6 +53016,7 @@ function resolvePreviewOptions(preview2, server) {
|
|
52846
53016
|
port: preview2?.port ?? DEFAULT_PREVIEW_PORT,
|
52847
53017
|
strictPort: preview2?.strictPort ?? server.strictPort,
|
52848
53018
|
host: preview2?.host ?? server.host,
|
53019
|
+
allowedHosts: preview2?.allowedHosts ?? server.allowedHosts,
|
52849
53020
|
https: preview2?.https ?? server.https,
|
52850
53021
|
open: preview2?.open ?? server.open,
|
52851
53022
|
proxy: preview2?.proxy ?? server.proxy,
|
@@ -52881,14 +53052,21 @@ async function preview(inlineConfig = {}) {
|
|
52881
53052
|
const options = config.preview;
|
52882
53053
|
const logger = config.logger;
|
52883
53054
|
const closeHttpServer = createServerCloseFn(httpServer);
|
53055
|
+
let closeServerPromise;
|
53056
|
+
const closeServer = async () => {
|
53057
|
+
teardownSIGTERMListener(closeServerAndExit);
|
53058
|
+
await closeHttpServer();
|
53059
|
+
server.resolvedUrls = null;
|
53060
|
+
};
|
52884
53061
|
const server = {
|
52885
53062
|
config,
|
52886
53063
|
middlewares: app,
|
52887
53064
|
httpServer,
|
52888
53065
|
async close() {
|
52889
|
-
|
52890
|
-
|
52891
|
-
|
53066
|
+
if (!closeServerPromise) {
|
53067
|
+
closeServerPromise = closeServer();
|
53068
|
+
}
|
53069
|
+
return closeServerPromise;
|
52892
53070
|
},
|
52893
53071
|
resolvedUrls: null,
|
52894
53072
|
printUrls() {
|
@@ -52906,7 +53084,7 @@ async function preview(inlineConfig = {}) {
|
|
52906
53084
|
try {
|
52907
53085
|
await server.close();
|
52908
53086
|
} finally {
|
52909
|
-
process.exitCode ??= exitCode ? 128 + exitCode :
|
53087
|
+
process.exitCode ??= exitCode ? 128 + exitCode : undefined;
|
52910
53088
|
process.exit();
|
52911
53089
|
}
|
52912
53090
|
};
|
@@ -52919,6 +53097,10 @@ async function preview(inlineConfig = {}) {
|
|
52919
53097
|
if (cors !== false) {
|
52920
53098
|
app.use(corsMiddleware(typeof cors === "boolean" ? {} : cors));
|
52921
53099
|
}
|
53100
|
+
const { allowedHosts } = config.preview;
|
53101
|
+
if (allowedHosts !== true && !config.preview.https) {
|
53102
|
+
app.use(hostCheckMiddleware(config));
|
53103
|
+
}
|
52922
53104
|
const { proxy } = config.preview;
|
52923
53105
|
if (proxy) {
|
52924
53106
|
app.use(proxyMiddleware(httpServer, proxy, config));
|
@@ -52992,7 +53174,7 @@ function resolveSSROptions(ssr, preserveSymlinks) {
|
|
52992
53174
|
const defaults = mergeWithDefaults(ssrConfigDefaults, {
|
52993
53175
|
optimizeDeps: { esbuildOptions: { preserveSymlinks } }
|
52994
53176
|
});
|
52995
|
-
return mergeWithDefaults(defaults, ssr
|
53177
|
+
return mergeWithDefaults(defaults, ssr);
|
52996
53178
|
}
|
52997
53179
|
|
52998
53180
|
const debug = createDebugger("vite:config", { depth: 10 });
|
@@ -53016,7 +53198,7 @@ const configDefaults = Object.freeze({
|
|
53016
53198
|
// preTransformRequests
|
53017
53199
|
/** @experimental */
|
53018
53200
|
sourcemap: { js: true },
|
53019
|
-
sourcemapIgnoreList:
|
53201
|
+
sourcemapIgnoreList: undefined
|
53020
53202
|
// createEnvironment
|
53021
53203
|
// recoverable
|
53022
53204
|
// moduleRunnerTransform
|
@@ -53041,7 +53223,7 @@ const configDefaults = Object.freeze({
|
|
53041
53223
|
// mode
|
53042
53224
|
plugins: [],
|
53043
53225
|
html: {
|
53044
|
-
cspNonce:
|
53226
|
+
cspNonce: undefined
|
53045
53227
|
},
|
53046
53228
|
css: cssConfigDefaults,
|
53047
53229
|
json: {
|
@@ -53049,7 +53231,7 @@ const configDefaults = Object.freeze({
|
|
53049
53231
|
stringify: "auto"
|
53050
53232
|
},
|
53051
53233
|
// esbuild
|
53052
|
-
assetsInclude:
|
53234
|
+
assetsInclude: undefined,
|
53053
53235
|
/** @experimental */
|
53054
53236
|
builder: builderOptionsDefaults,
|
53055
53237
|
server: serverConfigDefaults,
|
@@ -53066,25 +53248,26 @@ const configDefaults = Object.freeze({
|
|
53066
53248
|
/** @experimental */
|
53067
53249
|
experimental: {
|
53068
53250
|
importGlobRestoreExtension: false,
|
53069
|
-
renderBuiltUrl:
|
53251
|
+
renderBuiltUrl: undefined,
|
53070
53252
|
hmrPartialAccept: false,
|
53071
53253
|
skipSsrTransform: false
|
53072
53254
|
},
|
53073
53255
|
future: {
|
53074
|
-
removePluginHookHandleHotUpdate:
|
53075
|
-
removePluginHookSsrArgument:
|
53076
|
-
removeServerModuleGraph:
|
53077
|
-
removeServerHot:
|
53078
|
-
removeServerTransformRequest:
|
53079
|
-
removeSsrLoadModule:
|
53256
|
+
removePluginHookHandleHotUpdate: undefined,
|
53257
|
+
removePluginHookSsrArgument: undefined,
|
53258
|
+
removeServerModuleGraph: undefined,
|
53259
|
+
removeServerHot: undefined,
|
53260
|
+
removeServerTransformRequest: undefined,
|
53261
|
+
removeSsrLoadModule: undefined
|
53080
53262
|
},
|
53081
53263
|
legacy: {
|
53082
|
-
proxySsrExternalModules: false
|
53264
|
+
proxySsrExternalModules: false,
|
53265
|
+
skipWebSocketTokenCheck: false
|
53083
53266
|
},
|
53084
53267
|
logLevel: "info",
|
53085
|
-
customLogger:
|
53268
|
+
customLogger: undefined,
|
53086
53269
|
clearScreen: true,
|
53087
|
-
envDir:
|
53270
|
+
envDir: undefined,
|
53088
53271
|
envPrefix: "VITE_",
|
53089
53272
|
worker: {
|
53090
53273
|
format: "iife",
|
@@ -53119,7 +53302,7 @@ function resolveDevEnvironmentOptions(dev, environmentName, consumer, skipSsrTra
|
|
53119
53302
|
preTransformRequests: consumer === "client",
|
53120
53303
|
createEnvironment: environmentName === "client" ? defaultCreateClientDevEnvironment : defaultCreateDevEnvironment,
|
53121
53304
|
recoverable: consumer === "client",
|
53122
|
-
moduleRunnerTransform: skipSsrTransform !==
|
53305
|
+
moduleRunnerTransform: skipSsrTransform !== undefined && consumer === "server" ? skipSsrTransform : consumer === "server"
|
53123
53306
|
},
|
53124
53307
|
dev ?? {}
|
53125
53308
|
);
|
@@ -53169,8 +53352,8 @@ function getDefaultEnvironmentOptions(config) {
|
|
53169
53352
|
resolve: {
|
53170
53353
|
...config.resolve,
|
53171
53354
|
// mainFields and conditions are not inherited
|
53172
|
-
mainFields:
|
53173
|
-
conditions:
|
53355
|
+
mainFields: undefined,
|
53356
|
+
conditions: undefined
|
53174
53357
|
},
|
53175
53358
|
dev: config.dev,
|
53176
53359
|
build: config.build
|
@@ -53210,8 +53393,8 @@ function resolveEnvironmentResolveOptions(resolve, alias, preserveSymlinks, logg
|
|
53210
53393
|
const resolvedResolve = mergeWithDefaults(
|
53211
53394
|
{
|
53212
53395
|
...configDefaults.resolve,
|
53213
|
-
mainFields: consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
|
53214
|
-
conditions: consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_CONDITIONS : DEFAULT_SERVER_CONDITIONS.filter((c) => c !== "browser"),
|
53396
|
+
mainFields: consumer === undefined || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
|
53397
|
+
conditions: consumer === undefined || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_CONDITIONS : DEFAULT_SERVER_CONDITIONS.filter((c) => c !== "browser"),
|
53215
53398
|
enableBuiltinNoExternalCheck: !!isSsrTargetWebworkerEnvironment
|
53216
53399
|
},
|
53217
53400
|
resolve ?? {}
|
@@ -53247,14 +53430,14 @@ function resolveResolveOptions(resolve, logger) {
|
|
53247
53430
|
alias,
|
53248
53431
|
preserveSymlinks,
|
53249
53432
|
logger,
|
53250
|
-
|
53433
|
+
undefined
|
53251
53434
|
);
|
53252
53435
|
}
|
53253
53436
|
function resolveDepOptimizationOptions(optimizeDeps, preserveSymlinks, consumer) {
|
53254
53437
|
return mergeWithDefaults(
|
53255
53438
|
{
|
53256
53439
|
...configDefaults.optimizeDeps,
|
53257
|
-
disabled:
|
53440
|
+
disabled: undefined,
|
53258
53441
|
// do not set here to avoid deprecation warning
|
53259
53442
|
noDiscovery: consumer !== "client",
|
53260
53443
|
esbuildOptions: {
|
@@ -53264,7 +53447,7 @@ function resolveDepOptimizationOptions(optimizeDeps, preserveSymlinks, consumer)
|
|
53264
53447
|
optimizeDeps ?? {}
|
53265
53448
|
);
|
53266
53449
|
}
|
53267
|
-
async function resolveConfig(inlineConfig, command, defaultMode = "development", defaultNodeEnv = "development", isPreview = false, patchConfig =
|
53450
|
+
async function resolveConfig(inlineConfig, command, defaultMode = "development", defaultNodeEnv = "development", isPreview = false, patchConfig = undefined, patchPlugins = undefined) {
|
53268
53451
|
let config = inlineConfig;
|
53269
53452
|
let configFileDependencies = [];
|
53270
53453
|
let mode = inlineConfig.mode || defaultMode;
|
@@ -53358,7 +53541,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53358
53541
|
configEnvironmentsSsr.resolve ?? {}
|
53359
53542
|
);
|
53360
53543
|
}
|
53361
|
-
if (config.build?.ssrEmitAssets !==
|
53544
|
+
if (config.build?.ssrEmitAssets !== undefined) {
|
53362
53545
|
configEnvironmentsSsr ??= {};
|
53363
53546
|
configEnvironmentsSsr.build ??= {};
|
53364
53547
|
configEnvironmentsSsr.build.emitAssets = config.build.ssrEmitAssets;
|
@@ -53379,12 +53562,12 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53379
53562
|
...defaultEnvironmentOptions,
|
53380
53563
|
dev: {
|
53381
53564
|
...defaultEnvironmentOptions.dev,
|
53382
|
-
createEnvironment:
|
53383
|
-
warmup:
|
53565
|
+
createEnvironment: undefined,
|
53566
|
+
warmup: undefined
|
53384
53567
|
},
|
53385
53568
|
build: {
|
53386
53569
|
...defaultEnvironmentOptions.build,
|
53387
|
-
createEnvironment:
|
53570
|
+
createEnvironment: undefined
|
53388
53571
|
}
|
53389
53572
|
};
|
53390
53573
|
for (const name of Object.keys(config.environments)) {
|
@@ -53419,13 +53602,13 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53419
53602
|
const resolvedDevEnvironmentOptions = resolveDevEnvironmentOptions(
|
53420
53603
|
config.dev,
|
53421
53604
|
// default environment options
|
53422
|
-
|
53423
|
-
|
53605
|
+
undefined,
|
53606
|
+
undefined
|
53424
53607
|
);
|
53425
53608
|
const resolvedBuildOptions = resolveBuildEnvironmentOptions(
|
53426
53609
|
config.build ?? {},
|
53427
53610
|
logger,
|
53428
|
-
|
53611
|
+
undefined
|
53429
53612
|
);
|
53430
53613
|
const patchedConfigSsr = {
|
53431
53614
|
...config.ssr,
|
@@ -53524,8 +53707,9 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53524
53707
|
rollupOptions: config.worker?.rollupOptions || {}
|
53525
53708
|
};
|
53526
53709
|
const base = withTrailingSlash(resolvedBase);
|
53710
|
+
const preview = resolvePreviewOptions(config.preview, server);
|
53527
53711
|
resolved = {
|
53528
|
-
configFile: configFile ? normalizePath$3(configFile) :
|
53712
|
+
configFile: configFile ? normalizePath$3(configFile) : undefined,
|
53529
53713
|
configFileDependencies: configFileDependencies.map(
|
53530
53714
|
(name) => normalizePath$3(path$d.resolve(name))
|
53531
53715
|
),
|
@@ -53552,7 +53736,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53552
53736
|
},
|
53553
53737
|
server,
|
53554
53738
|
builder,
|
53555
|
-
preview
|
53739
|
+
preview,
|
53556
53740
|
envDir,
|
53557
53741
|
env: {
|
53558
53742
|
...userEnv,
|
@@ -53580,8 +53764,14 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53580
53764
|
dev: resolvedDevEnvironmentOptions,
|
53581
53765
|
build: resolvedBuildOptions,
|
53582
53766
|
environments: resolvedEnvironments,
|
53583
|
-
|
53584
|
-
|
53767
|
+
// random 72 bits (12 base64 chars)
|
53768
|
+
// at least 64bits is recommended
|
53769
|
+
// https://owasp.org/www-community/vulnerabilities/Insufficient_Session-ID_Length
|
53770
|
+
webSocketToken: Buffer.from(
|
53771
|
+
crypto$2.getRandomValues(new Uint8Array(9))
|
53772
|
+
).toString("base64url"),
|
53773
|
+
getSortedPlugins: undefined,
|
53774
|
+
getSortedPluginHooks: undefined,
|
53585
53775
|
/**
|
53586
53776
|
* createResolver is deprecated. It only works for the client and ssr
|
53587
53777
|
* environments. The `aliasOnly` option is also not being used any more
|
@@ -53618,7 +53808,8 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53618
53808
|
dot: true
|
53619
53809
|
}
|
53620
53810
|
),
|
53621
|
-
safeModulePaths: /* @__PURE__ */ new Set()
|
53811
|
+
safeModulePaths: /* @__PURE__ */ new Set(),
|
53812
|
+
additionalAllowedHosts: getAdditionalAllowedHosts(server, preview)
|
53622
53813
|
};
|
53623
53814
|
resolved = {
|
53624
53815
|
...config,
|
@@ -53908,7 +54099,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
53908
54099
|
const _require = createRequire$1(import.meta.url);
|
53909
54100
|
async function loadConfigFromBundledFile(fileName, bundledCode, isESM) {
|
53910
54101
|
if (isESM) {
|
53911
|
-
let nodeModulesDir = typeof process.versions.deno === "string" ?
|
54102
|
+
let nodeModulesDir = typeof process.versions.deno === "string" ? undefined : findNearestNodeModules(path$d.dirname(fileName));
|
53912
54103
|
if (nodeModulesDir) {
|
53913
54104
|
try {
|
53914
54105
|
await fsp.mkdir(path$d.resolve(nodeModulesDir, ".vite-temp/"), {
|
@@ -53916,7 +54107,7 @@ async function loadConfigFromBundledFile(fileName, bundledCode, isESM) {
|
|
53916
54107
|
});
|
53917
54108
|
} catch (e) {
|
53918
54109
|
if (e.code === "EACCES") {
|
53919
|
-
nodeModulesDir =
|
54110
|
+
nodeModulesDir = undefined;
|
53920
54111
|
} else {
|
53921
54112
|
throw e;
|
53922
54113
|
}
|
@@ -53982,14 +54173,14 @@ async function runConfigEnvironmentHook(environments, plugins, configEnv, isSsrT
|
|
53982
54173
|
}
|
53983
54174
|
function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps, optimizeDepsPath = "") {
|
53984
54175
|
const optimizeDepsDisabled = optimizeDeps.disabled;
|
53985
|
-
if (optimizeDepsDisabled !==
|
54176
|
+
if (optimizeDepsDisabled !== undefined) {
|
53986
54177
|
if (optimizeDepsDisabled === true || optimizeDepsDisabled === "dev") {
|
53987
54178
|
const commonjsOptionsInclude = resolved.build.commonjsOptions.include;
|
53988
54179
|
const commonjsPluginDisabled = Array.isArray(commonjsOptionsInclude) && commonjsOptionsInclude.length === 0;
|
53989
54180
|
optimizeDeps.noDiscovery = true;
|
53990
|
-
optimizeDeps.include =
|
54181
|
+
optimizeDeps.include = undefined;
|
53991
54182
|
if (commonjsPluginDisabled) {
|
53992
|
-
resolved.build.commonjsOptions.include =
|
54183
|
+
resolved.build.commonjsOptions.include = undefined;
|
53993
54184
|
}
|
53994
54185
|
resolved.logger.warn(
|
53995
54186
|
colors$1.yellow(`(!) Experimental ${optimizeDepsPath}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
|