@voidzero-dev/vite-plus-core 0.1.13-alpha.2 → 0.1.13-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm-shims.js +9 -0
- package/dist/vite/client/client.mjs +7 -7
- package/dist/vite/client/env.mjs +1 -1
- package/dist/vite/node/chunks/logger.js +3 -3
- package/dist/vite/node/chunks/node.js +95 -95
- package/dist/vite/node/cli.js +1 -1
- package/dist/vite/node/module-runner.js +16 -16
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Shim globals in esm bundle
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
|
|
5
|
+
const getFilename = () => fileURLToPath(import.meta.url)
|
|
6
|
+
const getDirname = () => path.dirname(getFilename())
|
|
7
|
+
|
|
8
|
+
export const __dirname = /* @__PURE__ */ getDirname()
|
|
9
|
+
export const __filename = /* @__PURE__ */ getFilename()
|
|
@@ -37,7 +37,7 @@ function _defineProperty(e, r, t) {
|
|
|
37
37
|
}) : e[r] = t, e;
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region ../../
|
|
40
|
+
//#region ../../vite/packages/vite/src/shared/hmr.ts
|
|
41
41
|
var HMRContext = class {
|
|
42
42
|
constructor(hmrClient, ownerPath) {
|
|
43
43
|
this.hmrClient = hmrClient;
|
|
@@ -229,7 +229,7 @@ let nanoid = (size = 21) => {
|
|
|
229
229
|
return id;
|
|
230
230
|
};
|
|
231
231
|
//#endregion
|
|
232
|
-
//#region ../../
|
|
232
|
+
//#region ../../vite/packages/vite/src/shared/constants.ts
|
|
233
233
|
let SOURCEMAPPING_URL = "sourceMa";
|
|
234
234
|
SOURCEMAPPING_URL += "ppingURL";
|
|
235
235
|
typeof process !== "undefined" && process.platform;
|
|
@@ -247,7 +247,7 @@ function promiseWithResolvers() {
|
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
//#endregion
|
|
250
|
-
//#region ../../
|
|
250
|
+
//#region ../../vite/packages/vite/src/shared/moduleRunnerTransport.ts
|
|
251
251
|
function reviveInvokeError(e) {
|
|
252
252
|
const error = new Error(e.message || "Unknown invoke error");
|
|
253
253
|
Object.assign(error, e, { runnerError: /* @__PURE__ */ new Error("RunnerError") });
|
|
@@ -440,7 +440,7 @@ const createWebSocketModuleRunnerTransport = (options) => {
|
|
|
440
440
|
};
|
|
441
441
|
};
|
|
442
442
|
//#endregion
|
|
443
|
-
//#region ../../
|
|
443
|
+
//#region ../../vite/packages/vite/src/shared/hmrHandler.ts
|
|
444
444
|
function createHMRHandler(handler) {
|
|
445
445
|
const queue = new Queue();
|
|
446
446
|
return (payload) => queue.enqueue(() => handler(payload));
|
|
@@ -473,7 +473,7 @@ var Queue = class {
|
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
475
|
//#endregion
|
|
476
|
-
//#region ../../
|
|
476
|
+
//#region ../../vite/packages/vite/src/shared/forwardConsole.ts
|
|
477
477
|
function setupForwardConsoleHandler(transport, options) {
|
|
478
478
|
if (!options.enabled) return;
|
|
479
479
|
function sendError(type, error) {
|
|
@@ -583,7 +583,7 @@ function stringifyConsoleArg(value) {
|
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
//#endregion
|
|
586
|
-
//#region ../../
|
|
586
|
+
//#region ../../vite/packages/vite/src/client/overlay.ts
|
|
587
587
|
const hmrConfigName = __HMR_CONFIG_NAME__;
|
|
588
588
|
const base$1 = __BASE__ || "/";
|
|
589
589
|
const cspNonce = "document" in globalThis ? document.querySelector("meta[property=csp-nonce]")?.nonce : void 0;
|
|
@@ -825,7 +825,7 @@ const overlayId = "vite-error-overlay";
|
|
|
825
825
|
const { customElements } = globalThis;
|
|
826
826
|
if (customElements && !customElements.get("vite-error-overlay")) customElements.define(overlayId, ErrorOverlay);
|
|
827
827
|
//#endregion
|
|
828
|
-
//#region ../../
|
|
828
|
+
//#region ../../vite/packages/vite/src/client/client.ts
|
|
829
829
|
console.debug("[vite] connecting...");
|
|
830
830
|
const importMetaUrl = new URL(import.meta.url);
|
|
831
831
|
const serverHost = __SERVER_HOST__;
|
package/dist/vite/client/env.mjs
CHANGED
|
@@ -71,10 +71,10 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
71
71
|
module.exports.createColors = createColors;
|
|
72
72
|
}));
|
|
73
73
|
//#endregion
|
|
74
|
-
//#region ../../
|
|
74
|
+
//#region ../../vite/packages/vite/package.json
|
|
75
75
|
var version = "8.0.0";
|
|
76
76
|
//#endregion
|
|
77
|
-
//#region ../../
|
|
77
|
+
//#region ../../vite/packages/vite/src/node/constants.ts
|
|
78
78
|
const ROLLUP_HOOKS = [
|
|
79
79
|
"options",
|
|
80
80
|
"buildStart",
|
|
@@ -227,7 +227,7 @@ const METADATA_FILENAME = "_metadata.json";
|
|
|
227
227
|
const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = "ERR_OPTIMIZE_DEPS_PROCESSING_ERROR";
|
|
228
228
|
const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = "ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR";
|
|
229
229
|
//#endregion
|
|
230
|
-
//#region ../../
|
|
230
|
+
//#region ../../vite/packages/vite/src/node/logger.ts
|
|
231
231
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
232
232
|
const LogLevels = {
|
|
233
233
|
silent: 0,
|
|
@@ -1693,7 +1693,7 @@ var require_picomatch$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1693
1693
|
module.exports = picomatch;
|
|
1694
1694
|
}));
|
|
1695
1695
|
//#endregion
|
|
1696
|
-
//#region ../../
|
|
1696
|
+
//#region ../../vite/packages/vite/src/shared/constants.ts
|
|
1697
1697
|
/**
|
|
1698
1698
|
* Prefix for resolved Ids that are not valid browser import specifiers
|
|
1699
1699
|
*/
|
|
@@ -1715,7 +1715,7 @@ SOURCEMAPPING_URL += "ppingURL";
|
|
|
1715
1715
|
const MODULE_RUNNER_SOURCEMAPPING_SOURCE = "//# sourceMappingSource=vite-generated";
|
|
1716
1716
|
const ERR_OUTDATED_OPTIMIZED_DEP = "ERR_OUTDATED_OPTIMIZED_DEP";
|
|
1717
1717
|
//#endregion
|
|
1718
|
-
//#region ../../
|
|
1718
|
+
//#region ../../vite/packages/vite/src/shared/utils.ts
|
|
1719
1719
|
const isWindows = typeof process !== "undefined" && process.platform === "win32";
|
|
1720
1720
|
/**
|
|
1721
1721
|
* Prepend `/@id/` and replace null byte so the id is URL-safe.
|
|
@@ -1763,7 +1763,7 @@ function promiseWithResolvers() {
|
|
|
1763
1763
|
};
|
|
1764
1764
|
}
|
|
1765
1765
|
//#endregion
|
|
1766
|
-
//#region ../../
|
|
1766
|
+
//#region ../../vite/packages/vite/src/module-runner/importMetaResolver.ts
|
|
1767
1767
|
const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/";
|
|
1768
1768
|
const customizationHooksModule = `
|
|
1769
1769
|
|
|
@@ -2989,14 +2989,14 @@ const dataToEsm = function dataToEsm(data, options = {}) {
|
|
|
2989
2989
|
return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`;
|
|
2990
2990
|
};
|
|
2991
2991
|
//#endregion
|
|
2992
|
-
//#region ../../
|
|
2992
|
+
//#region ../../vite/packages/vite/src/shared/builtin.ts
|
|
2993
2993
|
function createIsBuiltin(builtins) {
|
|
2994
2994
|
const plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin === "string"));
|
|
2995
2995
|
const regexBuiltins = builtins.filter((builtin) => typeof builtin !== "string");
|
|
2996
2996
|
return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));
|
|
2997
2997
|
}
|
|
2998
2998
|
//#endregion
|
|
2999
|
-
//#region ../../
|
|
2999
|
+
//#region ../../vite/packages/vite/src/node/packages.ts
|
|
3000
3000
|
let pnp;
|
|
3001
3001
|
if (process.versions.pnp) try {
|
|
3002
3002
|
pnp = createRequire(
|
|
@@ -3205,7 +3205,7 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
}
|
|
3207
3207
|
//#endregion
|
|
3208
|
-
//#region ../../
|
|
3208
|
+
//#region ../../vite/packages/vite/src/node/utils.ts
|
|
3209
3209
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
3210
3210
|
const createFilter$1 = createFilter$2;
|
|
3211
3211
|
const replaceSlashOrColonRE = /[/:]/g;
|
|
@@ -4167,7 +4167,7 @@ function monotonicDateNow() {
|
|
|
4167
4167
|
return lastDateNow;
|
|
4168
4168
|
}
|
|
4169
4169
|
//#endregion
|
|
4170
|
-
//#region ../../
|
|
4170
|
+
//#region ../../vite/packages/vite/src/node/plugin.ts
|
|
4171
4171
|
async function resolveEnvironmentPlugins(environment) {
|
|
4172
4172
|
const environmentPlugins = [];
|
|
4173
4173
|
for (const plugin of environment.getTopLevelConfig().plugins) {
|
|
@@ -4193,7 +4193,7 @@ function perEnvironmentPlugin(name, applyToEnvironment) {
|
|
|
4193
4193
|
};
|
|
4194
4194
|
}
|
|
4195
4195
|
//#endregion
|
|
4196
|
-
//#region ../../
|
|
4196
|
+
//#region ../../vite/packages/vite/src/node/plugins/reporter.ts
|
|
4197
4197
|
const VITE_VERSION_ONLY_LINE_RE = /^vite v\S+$/;
|
|
4198
4198
|
function buildReporterPlugin(config) {
|
|
4199
4199
|
return perEnvironmentPlugin("native:reporter", (env) => {
|
|
@@ -4216,7 +4216,7 @@ function buildReporterPlugin(config) {
|
|
|
4216
4216
|
});
|
|
4217
4217
|
}
|
|
4218
4218
|
//#endregion
|
|
4219
|
-
//#region ../../
|
|
4219
|
+
//#region ../../vite/packages/vite/src/node/plugins/esbuild.ts
|
|
4220
4220
|
const debug$14 = createDebugger("vite:esbuild");
|
|
4221
4221
|
const IIFE_BEGIN_RE$1 = /(?:const|var)\s+\S+\s*=\s*\(?function\([^()]*\)\s*\{\s*"use strict";/;
|
|
4222
4222
|
const validExtensionRE$1 = /\.\w+$/;
|
|
@@ -6092,7 +6092,7 @@ function globSync(patternsOrOptions, options) {
|
|
|
6092
6092
|
return formatPaths(crawler.sync(), relative);
|
|
6093
6093
|
}
|
|
6094
6094
|
//#endregion
|
|
6095
|
-
//#region ../../
|
|
6095
|
+
//#region ../../vite/packages/vite/src/node/plugins/oxc.ts
|
|
6096
6096
|
const IIFE_BEGIN_RE = /(?:(?:(?:const|var)\s+[^.\s]+|[^.\s]+\.[^.\s]+\.[^.\s]+)\s*=\s*|^|\n)\(?function\([^()]*\)\s*\{(?:\s*"use strict";)?/;
|
|
6097
6097
|
const UMD_BEGIN_RE = /\}\)\((?:this,\s*)?function\([^()]*\)\s*\{(?:\s*"use strict";)?/;
|
|
6098
6098
|
const jsxExtensionsRE = /\.(?:j|t)sx\b/;
|
|
@@ -7278,7 +7278,7 @@ function alias$1(options = {}) {
|
|
|
7278
7278
|
};
|
|
7279
7279
|
}
|
|
7280
7280
|
//#endregion
|
|
7281
|
-
//#region ../../
|
|
7281
|
+
//#region ../../vite/packages/vite/src/node/plugins/optimizedDeps.ts
|
|
7282
7282
|
const debug$13 = createDebugger("vite:optimize-deps");
|
|
7283
7283
|
function optimizedDepsPlugin() {
|
|
7284
7284
|
return {
|
|
@@ -7338,7 +7338,7 @@ function throwFileNotFoundInOptimizedDep(id) {
|
|
|
7338
7338
|
throw err;
|
|
7339
7339
|
}
|
|
7340
7340
|
//#endregion
|
|
7341
|
-
//#region ../../
|
|
7341
|
+
//#region ../../vite/packages/vite/src/node/env.ts
|
|
7342
7342
|
var import_main = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7343
7343
|
function _resolveEscapeSequences(value) {
|
|
7344
7344
|
return value.replace(/\\\$/g, "$");
|
|
@@ -7435,7 +7435,7 @@ function resolveEnvPrefix({ envPrefix = "VITE_" }) {
|
|
|
7435
7435
|
return envPrefix;
|
|
7436
7436
|
}
|
|
7437
7437
|
//#endregion
|
|
7438
|
-
//#region ../../
|
|
7438
|
+
//#region ../../vite/packages/vite/src/node/deprecations.ts
|
|
7439
7439
|
const docsURL = "https://vite.dev";
|
|
7440
7440
|
const deprecationCode = {
|
|
7441
7441
|
removePluginHookSsrArgument: "this-environment-in-hooks",
|
|
@@ -7492,7 +7492,7 @@ function ignoreDeprecationWarnings(fn) {
|
|
|
7492
7492
|
return ret;
|
|
7493
7493
|
}
|
|
7494
7494
|
//#endregion
|
|
7495
|
-
//#region ../../
|
|
7495
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/error.ts
|
|
7496
7496
|
function prepareError(err) {
|
|
7497
7497
|
return {
|
|
7498
7498
|
message: stripVTControlCharacters(err.message),
|
|
@@ -15172,7 +15172,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15172
15172
|
}
|
|
15173
15173
|
}));
|
|
15174
15174
|
//#endregion
|
|
15175
|
-
//#region ../../
|
|
15175
|
+
//#region ../../vite/packages/vite/src/node/http.ts
|
|
15176
15176
|
async function resolveHttpServer(app, httpsOptions) {
|
|
15177
15177
|
if (!httpsOptions) {
|
|
15178
15178
|
const { createServer } = await import("node:http");
|
|
@@ -15269,7 +15269,7 @@ function setClientErrorHandler(server, logger) {
|
|
|
15269
15269
|
});
|
|
15270
15270
|
}
|
|
15271
15271
|
//#endregion
|
|
15272
|
-
//#region ../../
|
|
15272
|
+
//#region ../../vite/packages/vite/src/node/ssr/ssrStacktrace.ts
|
|
15273
15273
|
let offset;
|
|
15274
15274
|
function calculateOffsetOnce() {
|
|
15275
15275
|
if (offset !== void 0) return;
|
|
@@ -15330,7 +15330,7 @@ function ssrFixStacktrace(e, moduleGraph) {
|
|
|
15330
15330
|
rewroteStacktraces.add(e);
|
|
15331
15331
|
}
|
|
15332
15332
|
//#endregion
|
|
15333
|
-
//#region ../../
|
|
15333
|
+
//#region ../../vite/packages/vite/src/node/ssr/runtime/serverModuleRunner.ts
|
|
15334
15334
|
function createHMROptions(environment, options) {
|
|
15335
15335
|
if (environment.config.server.hmr === false || options.hmr === false) return false;
|
|
15336
15336
|
if (!("api" in environment.hot)) return false;
|
|
@@ -15389,7 +15389,7 @@ function createServerModuleRunner(environment, options = {}) {
|
|
|
15389
15389
|
}, options.evaluator);
|
|
15390
15390
|
}
|
|
15391
15391
|
//#endregion
|
|
15392
|
-
//#region ../../
|
|
15392
|
+
//#region ../../vite/packages/vite/src/node/ssr/ssrModuleLoader.ts
|
|
15393
15393
|
async function ssrLoadModule(url, server, fixStacktrace) {
|
|
15394
15394
|
const environment = server.environments.ssr;
|
|
15395
15395
|
if (!isRunnableDevEnvironment(environment)) throw new Error(`ssrLoadModule requires the 'ssr' environment to be a runnable environment.`);
|
|
@@ -15661,11 +15661,11 @@ function walk$1(ast, { enter, leave }) {
|
|
|
15661
15661
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
15662
15662
|
}
|
|
15663
15663
|
//#endregion
|
|
15664
|
-
//#region ../../
|
|
15664
|
+
//#region ../../vite/packages/vite/src/node/plugins/json.ts
|
|
15665
15665
|
const jsonLangRE = new RegExp(`\\.(?:json|json5)(?:$|\\?)`);
|
|
15666
15666
|
const isJSONRequest = (request) => jsonLangRE.test(request);
|
|
15667
15667
|
//#endregion
|
|
15668
|
-
//#region ../../
|
|
15668
|
+
//#region ../../vite/packages/vite/src/node/ssr/ssrTransform.ts
|
|
15669
15669
|
const ssrModuleExportsKey = `__vite_ssr_exports__`;
|
|
15670
15670
|
const ssrImportKey = `__vite_ssr_import__`;
|
|
15671
15671
|
const ssrDynamicImportKey = `__vite_ssr_dynamic_import__`;
|
|
@@ -16792,7 +16792,7 @@ var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16792
16792
|
};
|
|
16793
16793
|
}));
|
|
16794
16794
|
//#endregion
|
|
16795
|
-
//#region ../../
|
|
16795
|
+
//#region ../../vite/packages/vite/src/node/server/openBrowser.ts
|
|
16796
16796
|
/**
|
|
16797
16797
|
* The following is modified based on source found in
|
|
16798
16798
|
* https://github.com/facebook/create-react-app
|
|
@@ -16889,7 +16889,7 @@ function execAsync(command, options) {
|
|
|
16889
16889
|
});
|
|
16890
16890
|
}
|
|
16891
16891
|
//#endregion
|
|
16892
|
-
//#region ../../
|
|
16892
|
+
//#region ../../vite/packages/vite/src/node/shortcuts.ts
|
|
16893
16893
|
function bindCLIShortcuts(server, opts, enabled = process.stdin.isTTY && !process.env.CI) {
|
|
16894
16894
|
if (!server.httpServer || !enabled) return;
|
|
16895
16895
|
const isDev = isDevServer(server);
|
|
@@ -17000,7 +17000,7 @@ const BASE_PREVIEW_SHORTCUTS = [{
|
|
|
17000
17000
|
}
|
|
17001
17001
|
}];
|
|
17002
17002
|
//#endregion
|
|
17003
|
-
//#region ../../
|
|
17003
|
+
//#region ../../vite/packages/vite/src/node/watch.ts
|
|
17004
17004
|
function getResolvedOutDirs(root, outDir, outputOptions) {
|
|
17005
17005
|
const resolvedOutDir = path.resolve(root, outDir);
|
|
17006
17006
|
if (!outputOptions) return new Set([resolvedOutDir]);
|
|
@@ -17064,7 +17064,7 @@ function createNoopWatcher(options) {
|
|
|
17064
17064
|
return new NoopWatcher(options);
|
|
17065
17065
|
}
|
|
17066
17066
|
//#endregion
|
|
17067
|
-
//#region ../../
|
|
17067
|
+
//#region ../../vite/packages/vite/src/node/publicDir.ts
|
|
17068
17068
|
const publicFilesMap = /* @__PURE__ */ new WeakMap();
|
|
17069
17069
|
async function initPublicFiles(config) {
|
|
17070
17070
|
let fileNames;
|
|
@@ -20672,7 +20672,7 @@ function generateDefaultErrorMessage(hostname) {
|
|
|
20672
20672
|
return `Blocked request. This host (${JSON.stringify(hostname)}) is not allowed.`;
|
|
20673
20673
|
}
|
|
20674
20674
|
//#endregion
|
|
20675
|
-
//#region ../../
|
|
20675
|
+
//#region ../../vite/packages/vite/src/node/server/ws.ts
|
|
20676
20676
|
const WebSocketServerRaw = process.versions.bun ? import.meta.require("ws").WebSocketServer : import_websocket_server.default;
|
|
20677
20677
|
const isWebSocketServer = Symbol("isWebSocketServer");
|
|
20678
20678
|
const wsServerEvents = [
|
|
@@ -20891,7 +20891,7 @@ function createWebSocketServer(server, config, httpsOptions) {
|
|
|
20891
20891
|
};
|
|
20892
20892
|
}
|
|
20893
20893
|
//#endregion
|
|
20894
|
-
//#region ../../
|
|
20894
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/base.ts
|
|
20895
20895
|
function baseMiddleware(rawBase, middlewareMode) {
|
|
20896
20896
|
return function viteBaseMiddleware(req, res, next) {
|
|
20897
20897
|
const url = req.url;
|
|
@@ -23031,7 +23031,7 @@ var require_http_proxy = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
23031
23031
|
};
|
|
23032
23032
|
}));
|
|
23033
23033
|
//#endregion
|
|
23034
|
-
//#region ../../
|
|
23034
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/proxy.ts
|
|
23035
23035
|
var import_lib$1 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
23036
23036
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23037
23037
|
exports.numOpenSockets = exports.ProxyServer = void 0;
|
|
@@ -23260,7 +23260,7 @@ var require_etag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
23260
23260
|
}
|
|
23261
23261
|
}));
|
|
23262
23262
|
//#endregion
|
|
23263
|
-
//#region ../../
|
|
23263
|
+
//#region ../../vite/packages/vite/src/node/environment.ts
|
|
23264
23264
|
/**
|
|
23265
23265
|
* Creates a function that hides the complexities of a WeakMap with an initial value
|
|
23266
23266
|
* to implement object metadata. Used by plugins to implement cross hooks per
|
|
@@ -23702,7 +23702,7 @@ function stripLiteral(code, options) {
|
|
|
23702
23702
|
return result;
|
|
23703
23703
|
}
|
|
23704
23704
|
//#endregion
|
|
23705
|
-
//#region ../../
|
|
23705
|
+
//#region ../../vite/packages/vite/src/node/assetSource.ts
|
|
23706
23706
|
const ALLOWED_META_NAME = [
|
|
23707
23707
|
"msapplication-tileimage",
|
|
23708
23708
|
"msapplication-square70x70logo",
|
|
@@ -24239,7 +24239,7 @@ function lookup(extn) {
|
|
|
24239
24239
|
return mimes[!~idx ? tmp : tmp.substring(++idx)];
|
|
24240
24240
|
}
|
|
24241
24241
|
//#endregion
|
|
24242
|
-
//#region ../../
|
|
24242
|
+
//#region ../../vite/packages/vite/src/node/plugins/asset.ts
|
|
24243
24243
|
const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g;
|
|
24244
24244
|
const jsSourceMapRE = /\.[cm]?js\.map$/;
|
|
24245
24245
|
const noInlineRE = /[?&]no-inline\b/;
|
|
@@ -25102,7 +25102,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25102
25102
|
module.exports = rc;
|
|
25103
25103
|
}));
|
|
25104
25104
|
//#endregion
|
|
25105
|
-
//#region ../../
|
|
25105
|
+
//#region ../../vite/packages/vite/src/node/server/sourcemap.ts
|
|
25106
25106
|
var import_convert_source_map = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
25107
25107
|
Object.defineProperty(exports, "commentRegex", { get: function getCommentRegex() {
|
|
25108
25108
|
return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm;
|
|
@@ -25322,7 +25322,7 @@ function createConvertSourceMapReadMap(originalFileName) {
|
|
|
25322
25322
|
};
|
|
25323
25323
|
}
|
|
25324
25324
|
//#endregion
|
|
25325
|
-
//#region ../../
|
|
25325
|
+
//#region ../../vite/packages/vite/src/node/idResolver.ts
|
|
25326
25326
|
/**
|
|
25327
25327
|
* Some projects like Astro were overriding config.createResolver to add a custom
|
|
25328
25328
|
* alias plugin. For the client and ssr environments, we root through it to avoid
|
|
@@ -25375,7 +25375,7 @@ function createIdResolver(config, options) {
|
|
|
25375
25375
|
};
|
|
25376
25376
|
}
|
|
25377
25377
|
//#endregion
|
|
25378
|
-
//#region ../../
|
|
25378
|
+
//#region ../../vite/packages/vite/src/node/baseEnvironment.ts
|
|
25379
25379
|
const environmentColors = [
|
|
25380
25380
|
import_picocolors.default.blue,
|
|
25381
25381
|
import_picocolors.default.magenta,
|
|
@@ -25459,7 +25459,7 @@ var BaseEnvironment = class extends PartialEnvironment {
|
|
|
25459
25459
|
}
|
|
25460
25460
|
};
|
|
25461
25461
|
//#endregion
|
|
25462
|
-
//#region ../../
|
|
25462
|
+
//#region ../../vite/packages/vite/src/node/server/searchRoot.ts
|
|
25463
25463
|
const ROOT_FILES = ["pnpm-workspace.yaml", "lerna.json"];
|
|
25464
25464
|
function hasWorkspacePackageJSON(root) {
|
|
25465
25465
|
const path = join(root, "package.json");
|
|
@@ -25497,7 +25497,7 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
|
|
|
25497
25497
|
return searchForWorkspaceRoot(dir, root);
|
|
25498
25498
|
}
|
|
25499
25499
|
//#endregion
|
|
25500
|
-
//#region ../../
|
|
25500
|
+
//#region ../../vite/packages/vite/src/node/plugins/manifest.ts
|
|
25501
25501
|
const endsWithJSRE = /\.[cm]?js$/;
|
|
25502
25502
|
function manifestPlugin() {
|
|
25503
25503
|
const getState = perEnvironmentState(() => {
|
|
@@ -25592,7 +25592,7 @@ function getChunkOriginalFileName(chunk, root, isLegacy) {
|
|
|
25592
25592
|
}
|
|
25593
25593
|
}
|
|
25594
25594
|
//#endregion
|
|
25595
|
-
//#region ../../
|
|
25595
|
+
//#region ../../vite/packages/vite/src/node/plugins/css.ts
|
|
25596
25596
|
var import_src = /* @__PURE__ */ __toESM(require_src(), 1);
|
|
25597
25597
|
const decoder = new TextDecoder();
|
|
25598
25598
|
const _cssConfigDefaults = Object.freeze({
|
|
@@ -27296,7 +27296,7 @@ function resolveLibCssFilename(libOptions, root, packageCache) {
|
|
|
27296
27296
|
return `${name}.css`;
|
|
27297
27297
|
}
|
|
27298
27298
|
//#endregion
|
|
27299
|
-
//#region ../../
|
|
27299
|
+
//#region ../../vite/packages/vite/src/node/plugins/modulePreloadPolyfill.ts
|
|
27300
27300
|
const modulePreloadPolyfillId = "vite/modulepreload-polyfill";
|
|
27301
27301
|
const resolvedModulePreloadPolyfillId = "\0" + modulePreloadPolyfillId + ".js";
|
|
27302
27302
|
function modulePreloadPolyfillPlugin(config) {
|
|
@@ -27320,7 +27320,7 @@ function modulePreloadPolyfillPlugin(config) {
|
|
|
27320
27320
|
};
|
|
27321
27321
|
}
|
|
27322
27322
|
//#endregion
|
|
27323
|
-
//#region ../../
|
|
27323
|
+
//#region ../../vite/packages/vite/src/node/plugins/html.ts
|
|
27324
27324
|
var import_escape_html = /* @__PURE__ */ __toESM(require_escape_html(), 1);
|
|
27325
27325
|
const htmlProxyRE = /[?&]html-proxy=?(?:&inline-css)?(?:&style-attr)?&index=(\d+)\.(?:js|css)$/;
|
|
27326
27326
|
const isHtmlProxyRE = /[?&]html-proxy\b/;
|
|
@@ -28052,7 +28052,7 @@ function incrementIndent(indent = "") {
|
|
|
28052
28052
|
return `${indent}${indent[0] === " " ? " " : " "}`;
|
|
28053
28053
|
}
|
|
28054
28054
|
//#endregion
|
|
28055
|
-
//#region ../../
|
|
28055
|
+
//#region ../../vite/packages/vite/src/node/plugins/define.ts
|
|
28056
28056
|
const nonJsRe = /\.json(?:$|\?)/;
|
|
28057
28057
|
const isNonJsRequest = (request) => nonJsRe.test(request);
|
|
28058
28058
|
const escapedDotRE = /(?<!\\)\\./g;
|
|
@@ -28186,7 +28186,7 @@ function handleDefineValue(value) {
|
|
|
28186
28186
|
return JSON.stringify(value);
|
|
28187
28187
|
}
|
|
28188
28188
|
//#endregion
|
|
28189
|
-
//#region ../../
|
|
28189
|
+
//#region ../../vite/packages/vite/src/node/plugins/clientInjections.ts
|
|
28190
28190
|
const normalizedClientEntry$1 = normalizePath$1(CLIENT_ENTRY);
|
|
28191
28191
|
const normalizedEnvEntry$1 = normalizePath$1(ENV_ENTRY);
|
|
28192
28192
|
/**
|
|
@@ -28267,7 +28267,7 @@ async function getHmrImplementation(config) {
|
|
|
28267
28267
|
return (await createClientConfigValueReplacer(config))(content).replace(/import\s*['"]@vite\/env['"]/, "");
|
|
28268
28268
|
}
|
|
28269
28269
|
//#endregion
|
|
28270
|
-
//#region ../../
|
|
28270
|
+
//#region ../../vite/packages/vite/src/node/ssr/fetchModule.ts
|
|
28271
28271
|
/**
|
|
28272
28272
|
* Fetch module information for Vite runner.
|
|
28273
28273
|
* @experimental
|
|
@@ -28343,7 +28343,7 @@ function inlineSourceMap(mod, result, startOffset) {
|
|
|
28343
28343
|
return result;
|
|
28344
28344
|
}
|
|
28345
28345
|
//#endregion
|
|
28346
|
-
//#region ../../
|
|
28346
|
+
//#region ../../vite/packages/vite/src/node/optimizer/optimizer.ts
|
|
28347
28347
|
const debug$9 = createDebugger("vite:deps");
|
|
28348
28348
|
/**
|
|
28349
28349
|
* The amount to wait for requests to register newly found dependencies before triggering
|
|
@@ -28710,7 +28710,7 @@ function findInteropMismatches(discovered, optimized) {
|
|
|
28710
28710
|
return needsInteropMismatch;
|
|
28711
28711
|
}
|
|
28712
28712
|
//#endregion
|
|
28713
|
-
//#region ../../
|
|
28713
|
+
//#region ../../vite/packages/vite/src/node/server/moduleGraph.ts
|
|
28714
28714
|
var EnvironmentModuleNode = class {
|
|
28715
28715
|
environment;
|
|
28716
28716
|
/**
|
|
@@ -29203,7 +29203,7 @@ function build_default$1(dir, opts = {}) {
|
|
|
29203
29203
|
};
|
|
29204
29204
|
}
|
|
29205
29205
|
//#endregion
|
|
29206
|
-
//#region ../../
|
|
29206
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/static.ts
|
|
29207
29207
|
const knownJavascriptExtensionRE = /\.(?:[tj]sx?|[cm][tj]s)$/;
|
|
29208
29208
|
const ERR_DENIED_FILE = "ERR_DENIED_FILE";
|
|
29209
29209
|
const sirvOptions = ({ config, getHeaders, disableFsServeCheck }) => {
|
|
@@ -29370,7 +29370,7 @@ function renderRestrictedErrorHTML(msg) {
|
|
|
29370
29370
|
`;
|
|
29371
29371
|
}
|
|
29372
29372
|
//#endregion
|
|
29373
|
-
//#region ../../
|
|
29373
|
+
//#region ../../vite/packages/vite/src/node/server/transformRequest.ts
|
|
29374
29374
|
var import_etag = /* @__PURE__ */ __toESM(require_etag(), 1);
|
|
29375
29375
|
const ERR_LOAD_URL = "ERR_LOAD_URL";
|
|
29376
29376
|
const ERR_LOAD_PUBLIC_URL = "ERR_LOAD_PUBLIC_URL";
|
|
@@ -29610,7 +29610,7 @@ function getModuleTypeFromId(id) {
|
|
|
29610
29610
|
}
|
|
29611
29611
|
}
|
|
29612
29612
|
//#endregion
|
|
29613
|
-
//#region ../../
|
|
29613
|
+
//#region ../../vite/packages/vite/src/node/server/warmup.ts
|
|
29614
29614
|
function warmupFiles(server, environment) {
|
|
29615
29615
|
const { root } = server.config;
|
|
29616
29616
|
mapFiles(environment.config.dev.warmup, root).then((files) => {
|
|
@@ -29660,7 +29660,7 @@ async function mapFiles(files, root) {
|
|
|
29660
29660
|
return result;
|
|
29661
29661
|
}
|
|
29662
29662
|
//#endregion
|
|
29663
|
-
//#region ../../
|
|
29663
|
+
//#region ../../vite/packages/vite/src/node/server/environment.ts
|
|
29664
29664
|
var DevEnvironment = class extends BaseEnvironment {
|
|
29665
29665
|
mode = "dev";
|
|
29666
29666
|
moduleGraph;
|
|
@@ -29858,7 +29858,7 @@ function setupOnCrawlEnd() {
|
|
|
29858
29858
|
};
|
|
29859
29859
|
}
|
|
29860
29860
|
//#endregion
|
|
29861
|
-
//#region ../../
|
|
29861
|
+
//#region ../../vite/packages/vite/src/node/server/environments/fullBundleEnvironment.ts
|
|
29862
29862
|
const debug$8 = createDebugger("vite:full-bundle-mode");
|
|
29863
29863
|
var MemoryFiles = class {
|
|
29864
29864
|
files = /* @__PURE__ */ new Map();
|
|
@@ -30122,7 +30122,7 @@ function debounce(time, cb) {
|
|
|
30122
30122
|
};
|
|
30123
30123
|
}
|
|
30124
30124
|
//#endregion
|
|
30125
|
-
//#region ../../
|
|
30125
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/htmlFallback.ts
|
|
30126
30126
|
const debug$7 = createDebugger("vite:html-fallback");
|
|
30127
30127
|
function htmlFallbackMiddleware(root, spaFallback, clientEnvironment) {
|
|
30128
30128
|
const memoryFiles = clientEnvironment instanceof FullBundleDevEnvironment ? clientEnvironment.memoryFiles : void 0;
|
|
@@ -30165,7 +30165,7 @@ function htmlFallbackMiddleware(root, spaFallback, clientEnvironment) {
|
|
|
30165
30165
|
};
|
|
30166
30166
|
}
|
|
30167
30167
|
//#endregion
|
|
30168
|
-
//#region ../../
|
|
30168
|
+
//#region ../../vite/packages/vite/src/node/server/send.ts
|
|
30169
30169
|
const debug$6 = createDebugger("vite:send", { onlyWhenFocused: true });
|
|
30170
30170
|
const alias = {
|
|
30171
30171
|
js: "text/javascript",
|
|
@@ -30204,7 +30204,7 @@ function send(req, res, content, type, options) {
|
|
|
30204
30204
|
else res.end(content);
|
|
30205
30205
|
}
|
|
30206
30206
|
//#endregion
|
|
30207
|
-
//#region ../../
|
|
30207
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/transform.ts
|
|
30208
30208
|
const debugCache = createDebugger("vite:cache");
|
|
30209
30209
|
const knownIgnoreList = new Set(["/", "/favicon.ico"]);
|
|
30210
30210
|
const documentFetchDests = new Set([
|
|
@@ -30386,7 +30386,7 @@ If you intend to import that asset, put the file in the src directory, and use $
|
|
|
30386
30386
|
}
|
|
30387
30387
|
}
|
|
30388
30388
|
//#endregion
|
|
30389
|
-
//#region ../../
|
|
30389
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/indexHtml.ts
|
|
30390
30390
|
function createDevHtmlTransformFn(config) {
|
|
30391
30391
|
const [preHooks, normalHooks, postHooks] = resolveHtmlTransforms(config.plugins);
|
|
30392
30392
|
const transformHooks = [
|
|
@@ -30680,7 +30680,7 @@ async function generateFallbackHtml(server) {
|
|
|
30680
30680
|
`;
|
|
30681
30681
|
}
|
|
30682
30682
|
//#endregion
|
|
30683
|
-
//#region ../../
|
|
30683
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/time.ts
|
|
30684
30684
|
const logTime = createDebugger("vite:time");
|
|
30685
30685
|
function timeMiddleware(root) {
|
|
30686
30686
|
return function viteTimeMiddleware(req, res, next) {
|
|
@@ -30694,7 +30694,7 @@ function timeMiddleware(root) {
|
|
|
30694
30694
|
};
|
|
30695
30695
|
}
|
|
30696
30696
|
//#endregion
|
|
30697
|
-
//#region ../../
|
|
30697
|
+
//#region ../../vite/packages/vite/src/node/server/mixedModuleGraph.ts
|
|
30698
30698
|
/**
|
|
30699
30699
|
* Backward compatible ModuleNode and ModuleGraph with mixed nodes from both the client and ssr environments
|
|
30700
30700
|
* It would be good to take the types names for the new EnvironmentModuleNode and EnvironmentModuleGraph but we can't
|
|
@@ -31108,7 +31108,7 @@ function createBackwardCompatibleFileToModulesMap(moduleGraph) {
|
|
|
31108
31108
|
};
|
|
31109
31109
|
}
|
|
31110
31110
|
//#endregion
|
|
31111
|
-
//#region ../../
|
|
31111
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/notFound.ts
|
|
31112
31112
|
function notFoundMiddleware() {
|
|
31113
31113
|
return function vite404Middleware(_, res) {
|
|
31114
31114
|
res.statusCode = 404;
|
|
@@ -31116,7 +31116,7 @@ function notFoundMiddleware() {
|
|
|
31116
31116
|
};
|
|
31117
31117
|
}
|
|
31118
31118
|
//#endregion
|
|
31119
|
-
//#region ../../
|
|
31119
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/hostCheck.ts
|
|
31120
31120
|
function getAdditionalAllowedHosts(resolvedServerOptions, resolvedPreviewOptions) {
|
|
31121
31121
|
const list = [];
|
|
31122
31122
|
if (typeof resolvedServerOptions.host === "string" && resolvedServerOptions.host) list.push(resolvedServerOptions.host);
|
|
@@ -31138,7 +31138,7 @@ function hostValidationMiddleware(allowedHosts, isPreview) {
|
|
|
31138
31138
|
});
|
|
31139
31139
|
}
|
|
31140
31140
|
//#endregion
|
|
31141
|
-
//#region ../../
|
|
31141
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/rejectInvalidRequest.ts
|
|
31142
31142
|
/**
|
|
31143
31143
|
* disallows request that contains `#` in the URL
|
|
31144
31144
|
*/
|
|
@@ -31153,7 +31153,7 @@ function rejectInvalidRequestMiddleware() {
|
|
|
31153
31153
|
};
|
|
31154
31154
|
}
|
|
31155
31155
|
//#endregion
|
|
31156
|
-
//#region ../../
|
|
31156
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/memoryFiles.ts
|
|
31157
31157
|
function memoryFilesMiddleware(server) {
|
|
31158
31158
|
const memoryFiles = server.environments.client instanceof FullBundleDevEnvironment ? server.environments.client.memoryFiles : void 0;
|
|
31159
31159
|
if (!memoryFiles) throw new Error("memoryFilesMiddleware can only be used for fullBundleMode");
|
|
@@ -31181,7 +31181,7 @@ function memoryFilesMiddleware(server) {
|
|
|
31181
31181
|
};
|
|
31182
31182
|
}
|
|
31183
31183
|
//#endregion
|
|
31184
|
-
//#region ../../
|
|
31184
|
+
//#region ../../vite/packages/vite/src/node/server/middlewares/rejectNoCorsRequest.ts
|
|
31185
31185
|
/**
|
|
31186
31186
|
* A middleware that rejects no-cors mode requests that are not same-origin.
|
|
31187
31187
|
*
|
|
@@ -31207,7 +31207,7 @@ function rejectNoCorsRequestMiddleware() {
|
|
|
31207
31207
|
};
|
|
31208
31208
|
}
|
|
31209
31209
|
//#endregion
|
|
31210
|
-
//#region ../../
|
|
31210
|
+
//#region ../../vite/packages/vite/src/node/server/index.ts
|
|
31211
31211
|
var import_connect = /* @__PURE__ */ __toESM(require_connect(), 1);
|
|
31212
31212
|
var import_lib = /* @__PURE__ */ __toESM(require_lib$1(), 1);
|
|
31213
31213
|
var import_chokidar = /* @__PURE__ */ __toESM(require_chokidar(), 1);
|
|
@@ -31695,7 +31695,7 @@ async function restartServerWithUrls(server) {
|
|
|
31695
31695
|
}
|
|
31696
31696
|
}
|
|
31697
31697
|
//#endregion
|
|
31698
|
-
//#region ../../
|
|
31698
|
+
//#region ../../vite/packages/vite/src/node/server/hmr.ts
|
|
31699
31699
|
const debugHmr = createDebugger("vite:hmr");
|
|
31700
31700
|
const whitespaceRE = /\s/;
|
|
31701
31701
|
const normalizedClientDir = normalizePath$1(CLIENT_DIR);
|
|
@@ -32235,7 +32235,7 @@ function createServerHotChannel() {
|
|
|
32235
32235
|
};
|
|
32236
32236
|
}
|
|
32237
32237
|
//#endregion
|
|
32238
|
-
//#region ../../
|
|
32238
|
+
//#region ../../vite/packages/vite/src/node/external.ts
|
|
32239
32239
|
const debug$5 = createDebugger("vite:external");
|
|
32240
32240
|
const isExternalCache = /* @__PURE__ */ new WeakMap();
|
|
32241
32241
|
function shouldExternalize(environment, id, importer) {
|
|
@@ -32297,7 +32297,7 @@ function canExternalizeFile(filePath) {
|
|
|
32297
32297
|
return !ext || ext === ".js" || ext === ".mjs" || ext === ".cjs";
|
|
32298
32298
|
}
|
|
32299
32299
|
//#endregion
|
|
32300
|
-
//#region ../../
|
|
32300
|
+
//#region ../../vite/packages/vite/src/node/plugins/worker.ts
|
|
32301
32301
|
var WorkerOutputCache = class {
|
|
32302
32302
|
/**
|
|
32303
32303
|
* worker bundle information for each input id
|
|
@@ -32653,7 +32653,7 @@ function isSameContent(a, b) {
|
|
|
32653
32653
|
return Buffer.from(b).equals(a);
|
|
32654
32654
|
}
|
|
32655
32655
|
//#endregion
|
|
32656
|
-
//#region ../../
|
|
32656
|
+
//#region ../../vite/packages/vite/src/node/plugins/preAlias.ts
|
|
32657
32657
|
/**
|
|
32658
32658
|
* A plugin to avoid an aliased AND optimized dep from being aliased in src
|
|
32659
32659
|
*/
|
|
@@ -32707,7 +32707,7 @@ function getAliasPatternMatcher(entries) {
|
|
|
32707
32707
|
return (importee) => patterns.some((pattern) => matches(pattern, importee));
|
|
32708
32708
|
}
|
|
32709
32709
|
//#endregion
|
|
32710
|
-
//#region ../../
|
|
32710
|
+
//#region ../../vite/packages/vite/src/node/plugins/importAnalysis.ts
|
|
32711
32711
|
const debug$4 = createDebugger("vite:import-analysis");
|
|
32712
32712
|
const clientDir = normalizePath$1(CLIENT_DIR);
|
|
32713
32713
|
const skipRE = /\.(?:map|json)(?:$|\?)/;
|
|
@@ -33130,7 +33130,7 @@ function __vite__injectQuery(url, queryToInject) {
|
|
|
33130
33130
|
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
|
|
33131
33131
|
}
|
|
33132
33132
|
//#endregion
|
|
33133
|
-
//#region ../../
|
|
33133
|
+
//#region ../../vite/packages/vite/src/node/plugins/wasm.ts
|
|
33134
33134
|
const wasmHelperId = "\0vite/wasm-helper.js";
|
|
33135
33135
|
const wasmInitRE = /(?<![?#].*)\.wasm\?init/;
|
|
33136
33136
|
const wasmInitUrlRE = /__VITE_WASM_INIT__([\w$]+)__/g;
|
|
@@ -33224,7 +33224,7 @@ export default ${wasmHelperCode}
|
|
|
33224
33224
|
});
|
|
33225
33225
|
};
|
|
33226
33226
|
//#endregion
|
|
33227
|
-
//#region ../../
|
|
33227
|
+
//#region ../../vite/packages/vite/src/node/plugins/workerImportMetaUrl.ts
|
|
33228
33228
|
function err$1(e, pos) {
|
|
33229
33229
|
const error = new Error(e);
|
|
33230
33230
|
error.pos = pos;
|
|
@@ -33355,7 +33355,7 @@ function workerImportMetaUrlPlugin(config) {
|
|
|
33355
33355
|
};
|
|
33356
33356
|
}
|
|
33357
33357
|
//#endregion
|
|
33358
|
-
//#region ../../
|
|
33358
|
+
//#region ../../vite/packages/vite/src/node/plugins/importAnalysisBuild.ts
|
|
33359
33359
|
/**
|
|
33360
33360
|
* A flag for injected helpers. This flag will be set to `false` if the output
|
|
33361
33361
|
* target is not native es - so that injected helper logic can be conditionally
|
|
@@ -33651,7 +33651,7 @@ function buildImportAnalysisPlugin(config) {
|
|
|
33651
33651
|
})];
|
|
33652
33652
|
}
|
|
33653
33653
|
//#endregion
|
|
33654
|
-
//#region ../../
|
|
33654
|
+
//#region ../../vite/packages/vite/src/node/plugins/assetImportMetaUrl.ts
|
|
33655
33655
|
/**
|
|
33656
33656
|
* Convert `new URL('./foo.png', import.meta.url)` to its resolved built URL
|
|
33657
33657
|
*
|
|
@@ -33831,7 +33831,7 @@ function dynamicImportToGlob(node, sourceString) {
|
|
|
33831
33831
|
return glob;
|
|
33832
33832
|
}
|
|
33833
33833
|
//#endregion
|
|
33834
|
-
//#region ../../
|
|
33834
|
+
//#region ../../vite/packages/vite/src/node/plugins/dynamicImportVars.ts
|
|
33835
33835
|
const dynamicImportHelperId = "\0vite/dynamic-import-helper.js";
|
|
33836
33836
|
const relativePathRE = /^\.{1,2}\//;
|
|
33837
33837
|
const hasDynamicImportRE = /\bimport\s*[(/]/;
|
|
@@ -33964,7 +33964,7 @@ function dynamicImportVarsPlugin(config) {
|
|
|
33964
33964
|
};
|
|
33965
33965
|
}
|
|
33966
33966
|
//#endregion
|
|
33967
|
-
//#region ../../
|
|
33967
|
+
//#region ../../vite/packages/vite/src/node/plugins/importMetaGlob.ts
|
|
33968
33968
|
function importGlobPlugin(config) {
|
|
33969
33969
|
if (config.isBundled) return viteImportGlobPlugin({
|
|
33970
33970
|
root: config.root,
|
|
@@ -34301,7 +34301,7 @@ function isVirtualModule(id) {
|
|
|
34301
34301
|
return id.startsWith("virtual:") || id[0] === "\0" || !id.includes("/");
|
|
34302
34302
|
}
|
|
34303
34303
|
//#endregion
|
|
34304
|
-
//#region ../../
|
|
34304
|
+
//#region ../../vite/packages/vite/src/node/plugins/pluginFilter.ts
|
|
34305
34305
|
function getMatcherString(glob, cwd) {
|
|
34306
34306
|
if (glob.startsWith("**") || path.isAbsolute(glob)) return slash(glob);
|
|
34307
34307
|
return slash(path.join(cwd, glob));
|
|
@@ -34826,7 +34826,7 @@ function getOriginalPosition(map, needle) {
|
|
|
34826
34826
|
return result;
|
|
34827
34827
|
}
|
|
34828
34828
|
//#endregion
|
|
34829
|
-
//#region ../../
|
|
34829
|
+
//#region ../../vite/packages/vite/src/node/plugins/forwardConsole.ts
|
|
34830
34830
|
function forwardConsolePlugin(pluginOpts) {
|
|
34831
34831
|
const sourceMapCache = /* @__PURE__ */ new Map();
|
|
34832
34832
|
return {
|
|
@@ -34896,7 +34896,7 @@ function formatError(payload, environment, sourceMapCache) {
|
|
|
34896
34896
|
return output;
|
|
34897
34897
|
}
|
|
34898
34898
|
//#endregion
|
|
34899
|
-
//#region ../../
|
|
34899
|
+
//#region ../../vite/packages/vite/src/node/plugins/esbuildBannerFooterCompatPlugin.ts
|
|
34900
34900
|
/**
|
|
34901
34901
|
* This plugin supports `esbuild.banner` and `esbuild.footer` options.
|
|
34902
34902
|
* esbuild supported these options and Vite exposed them.
|
|
@@ -34931,7 +34931,7 @@ function esbuildBannerFooterCompatPlugin(config) {
|
|
|
34931
34931
|
};
|
|
34932
34932
|
}
|
|
34933
34933
|
//#endregion
|
|
34934
|
-
//#region ../../
|
|
34934
|
+
//#region ../../vite/packages/vite/src/node/plugins/index.ts
|
|
34935
34935
|
async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
|
34936
34936
|
const isBuild = config.command === "build";
|
|
34937
34937
|
const isBundled = config.isBundled;
|
|
@@ -35082,7 +35082,7 @@ const viteAliasCustomResolver = async function(id, importer, options) {
|
|
|
35082
35082
|
};
|
|
35083
35083
|
};
|
|
35084
35084
|
//#endregion
|
|
35085
|
-
//#region ../../
|
|
35085
|
+
//#region ../../vite/packages/vite/src/node/server/pluginContainer.ts
|
|
35086
35086
|
/**
|
|
35087
35087
|
* This file is refactored into TypeScript based on
|
|
35088
35088
|
* https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/rollup-plugin-container.js
|
|
@@ -35796,7 +35796,7 @@ function createPluginContainer(environments) {
|
|
|
35796
35796
|
return new PluginContainer(environments);
|
|
35797
35797
|
}
|
|
35798
35798
|
//#endregion
|
|
35799
|
-
//#region ../../
|
|
35799
|
+
//#region ../../vite/packages/vite/src/node/optimizer/scan.ts
|
|
35800
35800
|
var ScanEnvironment = class extends BaseEnvironment {
|
|
35801
35801
|
mode = "scan";
|
|
35802
35802
|
get pluginContainer() {
|
|
@@ -36181,7 +36181,7 @@ function isScannable(id, extensions) {
|
|
|
36181
36181
|
return JS_TYPES_RE.test(id) || htmlTypesRE.test(id) || extensions?.includes(path.extname(id)) || false;
|
|
36182
36182
|
}
|
|
36183
36183
|
//#endregion
|
|
36184
|
-
//#region ../../
|
|
36184
|
+
//#region ../../vite/packages/vite/src/node/optimizer/resolve.ts
|
|
36185
36185
|
function createOptimizeDepsIncludeResolver(environment) {
|
|
36186
36186
|
const topLevelConfig = environment.getTopLevelConfig();
|
|
36187
36187
|
const resolve = createBackCompatIdResolver(topLevelConfig, {
|
|
@@ -36265,7 +36265,7 @@ function nestedResolveBasedir(id, basedir, preserveSymlinks = false) {
|
|
|
36265
36265
|
return basedir;
|
|
36266
36266
|
}
|
|
36267
36267
|
//#endregion
|
|
36268
|
-
//#region ../../
|
|
36268
|
+
//#region ../../vite/packages/vite/src/node/optimizer/rolldownDepPlugin.ts
|
|
36269
36269
|
const externalWithConversionNamespace = "vite:dep-pre-bundle:external-conversion";
|
|
36270
36270
|
const convertedExternalPrefix = "vite-dep-pre-bundle-external:";
|
|
36271
36271
|
const cjsExternalFacadeNamespace = "vite:cjs-external-facade";
|
|
@@ -36475,7 +36475,7 @@ module.exports = ${isNodeBuiltin(idWithoutNamespace) ? "m.default" : "{ ...m }"}
|
|
|
36475
36475
|
};
|
|
36476
36476
|
}
|
|
36477
36477
|
//#endregion
|
|
36478
|
-
//#region ../../
|
|
36478
|
+
//#region ../../vite/packages/vite/src/node/optimizer/index.ts
|
|
36479
36479
|
const debug$2 = createDebugger("vite:deps");
|
|
36480
36480
|
const jsExtensionRE = /\.js$/i;
|
|
36481
36481
|
function isDepOptimizationDisabled(optimizeDeps) {
|
|
@@ -37158,7 +37158,7 @@ const safeRename = promisify(function gracefulRename(from, to, cb) {
|
|
|
37158
37158
|
});
|
|
37159
37159
|
});
|
|
37160
37160
|
//#endregion
|
|
37161
|
-
//#region ../../
|
|
37161
|
+
//#region ../../vite/packages/vite/src/node/plugins/resolve.ts
|
|
37162
37162
|
const normalizedClientEntry = normalizePath$1(CLIENT_ENTRY);
|
|
37163
37163
|
const normalizedEnvEntry = normalizePath$1(ENV_ENTRY);
|
|
37164
37164
|
const ERR_RESOLVE_PACKAGE_ENTRY_FAIL = "ERR_RESOLVE_PACKAGE_ENTRY_FAIL";
|
|
@@ -37632,7 +37632,7 @@ function findNearestPackagePath(file, legacyInconsistentCjsInterop, packageCache
|
|
|
37632
37632
|
return pkgData ? path.join(pkgData.dir, "package.json") : null;
|
|
37633
37633
|
}
|
|
37634
37634
|
//#endregion
|
|
37635
|
-
//#region ../../
|
|
37635
|
+
//#region ../../vite/packages/vite/src/node/nodeResolve.ts
|
|
37636
37636
|
/**
|
|
37637
37637
|
* Resolve like Node.js using Vite's resolution algorithm with preconfigured options.
|
|
37638
37638
|
*/
|
|
@@ -37659,7 +37659,7 @@ function nodeResolveWithVite(id, importer, options) {
|
|
|
37659
37659
|
})?.id;
|
|
37660
37660
|
}
|
|
37661
37661
|
//#endregion
|
|
37662
|
-
//#region ../../
|
|
37662
|
+
//#region ../../vite/packages/vite/src/node/plugins/terser.ts
|
|
37663
37663
|
let terserPath;
|
|
37664
37664
|
function loadTerserPath(root) {
|
|
37665
37665
|
if (terserPath) return terserPath;
|
|
@@ -37727,7 +37727,7 @@ function terserPlugin(config) {
|
|
|
37727
37727
|
};
|
|
37728
37728
|
}
|
|
37729
37729
|
//#endregion
|
|
37730
|
-
//#region ../../
|
|
37730
|
+
//#region ../../vite/packages/vite/src/node/ssr/ssrManifestPlugin.ts
|
|
37731
37731
|
function ssrManifestPlugin() {
|
|
37732
37732
|
const getSsrManifest = perEnvironmentState(() => {
|
|
37733
37733
|
return {};
|
|
@@ -37811,7 +37811,7 @@ function ssrManifestPlugin() {
|
|
|
37811
37811
|
};
|
|
37812
37812
|
}
|
|
37813
37813
|
//#endregion
|
|
37814
|
-
//#region ../../
|
|
37814
|
+
//#region ../../vite/packages/vite/src/node/plugins/license.ts
|
|
37815
37815
|
const licenseConfigDefaults = Object.freeze({ fileName: ".vite/license.md" });
|
|
37816
37816
|
const licenseFiles = [
|
|
37817
37817
|
/^license/i,
|
|
@@ -37889,7 +37889,7 @@ function findLicenseFile(pkgDir) {
|
|
|
37889
37889
|
if (matchedFile) return path.join(pkgDir, matchedFile);
|
|
37890
37890
|
}
|
|
37891
37891
|
//#endregion
|
|
37892
|
-
//#region ../../
|
|
37892
|
+
//#region ../../vite/packages/vite/src/node/plugins/prepareOutDir.ts
|
|
37893
37893
|
function prepareOutDirPlugin() {
|
|
37894
37894
|
const rendered = /* @__PURE__ */ new Set();
|
|
37895
37895
|
return {
|
|
@@ -37933,7 +37933,7 @@ function areSeparateFolders(a, b) {
|
|
|
37933
37933
|
return na !== nb && !na.startsWith(withTrailingSlash(nb)) && !nb.startsWith(withTrailingSlash(na));
|
|
37934
37934
|
}
|
|
37935
37935
|
//#endregion
|
|
37936
|
-
//#region ../../
|
|
37936
|
+
//#region ../../vite/packages/vite/src/node/build.ts
|
|
37937
37937
|
const _buildEnvironmentOptionsDefaults = Object.freeze({
|
|
37938
37938
|
target: "baseline-widely-available",
|
|
37939
37939
|
polyfillModulePreload: true,
|
|
@@ -38632,7 +38632,7 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
|
|
|
38632
38632
|
return builder;
|
|
38633
38633
|
}
|
|
38634
38634
|
//#endregion
|
|
38635
|
-
//#region ../../
|
|
38635
|
+
//#region ../../vite/packages/vite/src/node/server/environments/runnableEnvironment.ts
|
|
38636
38636
|
function createRunnableDevEnvironment(name, config, context = {}) {
|
|
38637
38637
|
if (context.transport == null) context.transport = createServerHotChannel();
|
|
38638
38638
|
if (context.hot == null) context.hot = true;
|
|
@@ -38744,7 +38744,7 @@ function build_default({ threshold = 1024, level = -1, brotli = false, gzip = tr
|
|
|
38744
38744
|
};
|
|
38745
38745
|
}
|
|
38746
38746
|
//#endregion
|
|
38747
|
-
//#region ../../
|
|
38747
|
+
//#region ../../vite/packages/vite/src/node/preview.ts
|
|
38748
38748
|
function resolvePreviewOptions(preview, server) {
|
|
38749
38749
|
return {
|
|
38750
38750
|
port: preview?.port ?? 4173,
|
|
@@ -38855,7 +38855,7 @@ async function preview(inlineConfig = {}) {
|
|
|
38855
38855
|
return server;
|
|
38856
38856
|
}
|
|
38857
38857
|
//#endregion
|
|
38858
|
-
//#region ../../
|
|
38858
|
+
//#region ../../vite/packages/vite/src/node/ssr/index.ts
|
|
38859
38859
|
const _ssrConfigDefaults = Object.freeze({
|
|
38860
38860
|
target: "node",
|
|
38861
38861
|
optimizeDeps: {}
|
|
@@ -38865,7 +38865,7 @@ function resolveSSROptions(ssr, preserveSymlinks) {
|
|
|
38865
38865
|
return mergeWithDefaults(mergeWithDefaults(_ssrConfigDefaults, { optimizeDeps: { esbuildOptions: { preserveSymlinks } } }), ssr ?? {});
|
|
38866
38866
|
}
|
|
38867
38867
|
//#endregion
|
|
38868
|
-
//#region ../../
|
|
38868
|
+
//#region ../../vite/packages/vite/src/node/ssr/runnerImport.ts
|
|
38869
38869
|
/**
|
|
38870
38870
|
* Import any file using the default Vite environment.
|
|
38871
38871
|
* @experimental
|
|
@@ -38904,7 +38904,7 @@ async function runnerImport(moduleId, inlineConfig) {
|
|
|
38904
38904
|
}
|
|
38905
38905
|
}
|
|
38906
38906
|
//#endregion
|
|
38907
|
-
//#region ../../
|
|
38907
|
+
//#region ../../vite/packages/vite/src/node/optimizer/pluginConverter.ts
|
|
38908
38908
|
function convertEsbuildPluginToRolldownPlugin(esbuildPlugin) {
|
|
38909
38909
|
const onStartCallbacks = [];
|
|
38910
38910
|
const onEndCallbacks = [];
|
|
@@ -39055,7 +39055,7 @@ function idToPathAndNamespace(id) {
|
|
|
39055
39055
|
else return [id, "file"];
|
|
39056
39056
|
}
|
|
39057
39057
|
//#endregion
|
|
39058
|
-
//#region ../../
|
|
39058
|
+
//#region ../../vite/packages/vite/src/node/config.ts
|
|
39059
39059
|
const debug = createDebugger("vite:config", { depth: 10 });
|
|
39060
39060
|
const promisifiedRealpath = promisify(fs.realpath);
|
|
39061
39061
|
const SYMBOL_RESOLVED_CONFIG = Symbol("vite:resolved-config");
|
|
@@ -39960,7 +39960,7 @@ function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps, optim
|
|
|
39960
39960
|
}
|
|
39961
39961
|
}
|
|
39962
39962
|
//#endregion
|
|
39963
|
-
//#region ../../
|
|
39963
|
+
//#region ../../vite/packages/vite/src/node/server/environments/fetchableEnvironments.ts
|
|
39964
39964
|
function createFetchableDevEnvironment(name, config, context) {
|
|
39965
39965
|
if (typeof Request === "undefined" || typeof Response === "undefined") throw new TypeError("FetchableDevEnvironment requires a global `Request` and `Response` object.");
|
|
39966
39966
|
if (!context.handleRequest) throw new TypeError("FetchableDevEnvironment requires a `handleRequest` method during initialisation.");
|
|
@@ -39983,7 +39983,7 @@ var FetchableDevEnvironment = class extends DevEnvironment {
|
|
|
39983
39983
|
}
|
|
39984
39984
|
};
|
|
39985
39985
|
//#endregion
|
|
39986
|
-
//#region ../../
|
|
39986
|
+
//#region ../../vite/packages/vite/src/node/index.ts
|
|
39987
39987
|
/** @deprecated - use `parse` instead */
|
|
39988
39988
|
const parseAst$1 = parseAst;
|
|
39989
39989
|
/** @deprecated - use `parseAsync` instead */
|
package/dist/vite/node/cli.js
CHANGED
|
@@ -622,7 +622,7 @@ var CAC = class extends EventTarget {
|
|
|
622
622
|
*/
|
|
623
623
|
const cac = (name = "") => new CAC(name);
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region ../../
|
|
625
|
+
//#region ../../vite/packages/vite/src/node/cli.ts
|
|
626
626
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
627
627
|
function checkNodeVersion(nodeVersion) {
|
|
628
628
|
const currentVersion = nodeVersion.split(".");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let SOURCEMAPPING_URL = "sourceMa";
|
|
2
2
|
SOURCEMAPPING_URL += "ppingURL";
|
|
3
3
|
//#endregion
|
|
4
|
-
//#region ../../
|
|
4
|
+
//#region ../../vite/packages/vite/src/shared/utils.ts
|
|
5
5
|
const isWindows = typeof process < "u" && process.platform === "win32";
|
|
6
6
|
/**
|
|
7
7
|
* Undo {@link wrapId}'s `/@id/` and null byte replacements.
|
|
@@ -223,7 +223,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
223
223
|
return found ? index = (bias === -1 ? upperBound : lowerBound)(segments, column, index) : bias === -1 && index++, index === -1 || index === segments.length ? -1 : index;
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
|
-
//#region ../../
|
|
226
|
+
//#region ../../vite/packages/vite/src/module-runner/sourcemap/decoder.ts
|
|
227
227
|
var DecodedMap = class {
|
|
228
228
|
_encoded;
|
|
229
229
|
_decoded;
|
|
@@ -253,7 +253,7 @@ function getOriginalPosition(map, needle) {
|
|
|
253
253
|
return result.column == null ? null : result;
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
256
|
-
//#region ../../
|
|
256
|
+
//#region ../../vite/packages/vite/src/module-runner/evaluatedModules.ts
|
|
257
257
|
const MODULE_RUNNER_SOURCEMAPPING_REGEXP = RegExp(`//# ${SOURCEMAPPING_URL}=data:application/json;base64,(.+)`);
|
|
258
258
|
var EvaluatedModuleNode = class {
|
|
259
259
|
importers = /* @__PURE__ */ new Set();
|
|
@@ -347,7 +347,7 @@ function normalizeModuleId(file) {
|
|
|
347
347
|
return prefixedBuiltins.has(file) ? file : slash(file).replace(/^\/@fs\//, isWindows ? "" : "/").replace(/^node:/, "").replace(/^\/+/, "/").replace(/^file:\/+/, isWindows ? "" : "/");
|
|
348
348
|
}
|
|
349
349
|
//#endregion
|
|
350
|
-
//#region ../../
|
|
350
|
+
//#region ../../vite/packages/vite/src/shared/hmr.ts
|
|
351
351
|
var HMRContext = class {
|
|
352
352
|
newListeners;
|
|
353
353
|
constructor(hmrClient, ownerPath) {
|
|
@@ -504,7 +504,7 @@ var HMRContext = class {
|
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
506
|
//#endregion
|
|
507
|
-
//#region ../../
|
|
507
|
+
//#region ../../vite/packages/vite/src/shared/ssrTransform.ts
|
|
508
508
|
/**
|
|
509
509
|
* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.
|
|
510
510
|
* Top-level imports and dynamic imports work slightly differently in Node.js.
|
|
@@ -533,7 +533,7 @@ let nanoid = (size = 21) => {
|
|
|
533
533
|
return id;
|
|
534
534
|
};
|
|
535
535
|
//#endregion
|
|
536
|
-
//#region ../../
|
|
536
|
+
//#region ../../vite/packages/vite/src/shared/moduleRunnerTransport.ts
|
|
537
537
|
function reviveInvokeError(e) {
|
|
538
538
|
let error = Error(e.message || "Unknown invoke error");
|
|
539
539
|
return Object.assign(error, e, { runnerError: /* @__PURE__ */ Error("RunnerError") }), error;
|
|
@@ -687,13 +687,13 @@ const createInvokeableTransport = (transport) => {
|
|
|
687
687
|
};
|
|
688
688
|
};
|
|
689
689
|
//#endregion
|
|
690
|
-
//#region ../../
|
|
690
|
+
//#region ../../vite/packages/vite/src/shared/builtin.ts
|
|
691
691
|
function createIsBuiltin(builtins) {
|
|
692
692
|
let plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == "string")), regexBuiltins = builtins.filter((builtin) => typeof builtin != "string");
|
|
693
693
|
return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));
|
|
694
694
|
}
|
|
695
695
|
//#endregion
|
|
696
|
-
//#region ../../
|
|
696
|
+
//#region ../../vite/packages/vite/src/module-runner/constants.ts
|
|
697
697
|
const ssrModuleExportsKey = "__vite_ssr_exports__", ssrImportKey = "__vite_ssr_import__", ssrDynamicImportKey = "__vite_ssr_dynamic_import__", ssrExportAllKey = "__vite_ssr_exportAll__", ssrExportNameKey = "__vite_ssr_exportName__", ssrImportMetaKey = "__vite_ssr_import_meta__", noop = () => {}, silentConsole = {
|
|
698
698
|
debug: noop,
|
|
699
699
|
error: noop
|
|
@@ -702,7 +702,7 @@ const ssrModuleExportsKey = "__vite_ssr_exports__", ssrImportKey = "__vite_ssr_i
|
|
|
702
702
|
error: (error) => console.log("[vite]", error)
|
|
703
703
|
};
|
|
704
704
|
//#endregion
|
|
705
|
-
//#region ../../
|
|
705
|
+
//#region ../../vite/packages/vite/src/shared/hmrHandler.ts
|
|
706
706
|
function createHMRHandler(handler) {
|
|
707
707
|
let queue = new Queue();
|
|
708
708
|
return (payload) => queue.enqueue(() => handler(payload));
|
|
@@ -728,7 +728,7 @@ var Queue = class {
|
|
|
728
728
|
}
|
|
729
729
|
};
|
|
730
730
|
//#endregion
|
|
731
|
-
//#region ../../
|
|
731
|
+
//#region ../../vite/packages/vite/src/module-runner/hmrHandler.ts
|
|
732
732
|
function createHMRHandlerForRunner(runner) {
|
|
733
733
|
return createHMRHandler(async (payload) => {
|
|
734
734
|
let hmrClient = runner.hmrClient;
|
|
@@ -794,7 +794,7 @@ function findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {
|
|
|
794
794
|
return entrypoints;
|
|
795
795
|
}
|
|
796
796
|
//#endregion
|
|
797
|
-
//#region ../../
|
|
797
|
+
//#region ../../vite/packages/vite/src/module-runner/sourcemap/interceptor.ts
|
|
798
798
|
const sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {
|
|
799
799
|
for (let handler of handlers) {
|
|
800
800
|
let result = handler(...args);
|
|
@@ -970,7 +970,7 @@ function prepareStackTrace(error, stack) {
|
|
|
970
970
|
return state.curPosition = state.nextPosition = null, errorString + processedStack.reverse().join("");
|
|
971
971
|
}
|
|
972
972
|
//#endregion
|
|
973
|
-
//#region ../../
|
|
973
|
+
//#region ../../vite/packages/vite/src/module-runner/sourcemap/index.ts
|
|
974
974
|
function enableSourceMapSupport(runner) {
|
|
975
975
|
if (runner.options.sourcemapInterceptor === "node") {
|
|
976
976
|
if (typeof process > "u") throw TypeError("Cannot use \"sourcemapInterceptor: 'node'\" because global \"process\" variable is not available.");
|
|
@@ -981,7 +981,7 @@ function enableSourceMapSupport(runner) {
|
|
|
981
981
|
return interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == "object" ? runner.options.sourcemapInterceptor : void 0);
|
|
982
982
|
}
|
|
983
983
|
//#endregion
|
|
984
|
-
//#region ../../
|
|
984
|
+
//#region ../../vite/packages/vite/src/module-runner/esmEvaluator.ts
|
|
985
985
|
var ESModulesEvaluator = class {
|
|
986
986
|
startOffset = getAsyncFunctionDeclarationPaddingLineCount();
|
|
987
987
|
async runInlinedModule(context, code) {
|
|
@@ -992,7 +992,7 @@ var ESModulesEvaluator = class {
|
|
|
992
992
|
}
|
|
993
993
|
};
|
|
994
994
|
//#endregion
|
|
995
|
-
//#region ../../
|
|
995
|
+
//#region ../../vite/packages/vite/src/module-runner/importMetaResolver.ts
|
|
996
996
|
const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/", customizationHooksModule = `
|
|
997
997
|
|
|
998
998
|
export async function resolve(specifier, context, nextResolve) {
|
|
@@ -1041,7 +1041,7 @@ function importMetaResolveWithCustomHook(specifier, importer) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
`${customizationHookNamespace}`;
|
|
1043
1043
|
//#endregion
|
|
1044
|
-
//#region ../../
|
|
1044
|
+
//#region ../../vite/packages/vite/src/module-runner/createImportMeta.ts
|
|
1045
1045
|
const envProxy = new Proxy({}, { get(_, p) {
|
|
1046
1046
|
throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
|
|
1047
1047
|
} });
|
|
@@ -1074,7 +1074,7 @@ function createNodeImportMeta(modulePath) {
|
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
//#endregion
|
|
1077
|
-
//#region ../../
|
|
1077
|
+
//#region ../../vite/packages/vite/src/module-runner/runner.ts
|
|
1078
1078
|
var ModuleRunner = class {
|
|
1079
1079
|
evaluatedModules;
|
|
1080
1080
|
hmrClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vite-plus-core",
|
|
3
|
-
"version": "0.1.13-alpha.
|
|
3
|
+
"version": "0.1.13-alpha.4",
|
|
4
4
|
"description": "The Unified Toolchain for the Web",
|
|
5
5
|
"homepage": "https://viteplus.dev/guide",
|
|
6
6
|
"bugs": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"tree-kill": "^1.2.2",
|
|
130
130
|
"tsdown": "^0.21.4",
|
|
131
131
|
"rolldown": "1.0.0-rc.9",
|
|
132
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.13-alpha.
|
|
132
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.13-alpha.4"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"@arethetypeswrong/core": "^0.18.1",
|