@voidzero-dev/vite-plus-core 0.1.13-alpha.4 → 0.1.13
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/rolldown/cli.mjs +211 -73
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +8 -8
- package/dist/rolldown/experimental-index.d.mts +7 -7
- package/dist/rolldown/experimental-index.mjs +12 -13
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +3 -3
- package/dist/rolldown/index.mjs +9 -9
- package/dist/rolldown/parallel-plugin-worker.mjs +5 -5
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +2 -2
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +3 -3
- package/dist/rolldown/shared/{binding-BohGL_65.d.mts → binding-Dsq9Azhm.d.mts} +14 -17
- package/dist/rolldown/shared/{bindingify-input-options-D6u7COm1.mjs → bindingify-input-options-nddSVL89.mjs} +16 -11
- package/dist/rolldown/shared/{constructors-DNuo4d0H.d.mts → constructors-DfpIbfMG.d.mts} +7 -3
- package/dist/rolldown/shared/{constructors-Ctal_Rbv.mjs → constructors-DqC7XSXy.mjs} +8 -2
- package/dist/rolldown/shared/{define-config-cG45vHwf.d.mts → define-config-CV9D_Qea.d.mts} +19 -12
- package/dist/rolldown/shared/{error-CP8smW_P.mjs → error-BO4SlZV_.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-CjCoDD5h.mjs → load-config-CDqvxxnl.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-C5RWbu3O.mjs → normalize-string-or-regex-D7wlw16t.mjs} +1 -1
- package/dist/rolldown/shared/{parse-BhVn_3w_.mjs → parse-WOgXxW4-.mjs} +1 -1
- package/dist/rolldown/shared/{transform-BfdLLNnY.mjs → resolve-tsconfig-C3OzszY-.mjs} +28 -5
- package/dist/rolldown/shared/{rolldown-B7hI_r7G.mjs → rolldown-DUOYLKyH.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-CYoDea9V.mjs → rolldown-build-C7TjtSci.mjs} +4 -4
- package/dist/rolldown/shared/{transform-BoJxrM-e.d.mts → transform-B5D1aA1B.d.mts} +19 -2
- package/dist/rolldown/shared/{watch-CAj7leYN.mjs → watch-BV1BB_LU.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +2 -2
- package/dist/rolldown/utils-index.mjs +4 -5
- package/dist/tsdown/{build-CoLhkNXE-DtR1EaBG.js → build-CoLhkNXE-CdsPtxD4.js} +50 -50
- package/dist/tsdown/{build-dhDyu66J-DxSssGzc.js → build-dhDyu66J-C_jUIuMF.js} +2 -2
- package/dist/tsdown/{debug-C4FmgzkJ-Co4tnxmE.js → debug-C4FmgzkJ-BxvFHEjv.js} +2 -2
- package/dist/tsdown/{detect-DN3DXXYt-BiiMP_XL.js → detect-DN3DXXYt-CgZGWZG7.js} +1 -1
- package/dist/tsdown/{dist-dJp148cE.js → dist-CtF_Stv5.js} +3 -3
- package/dist/tsdown/{dist-BWGgEAtQ.js → dist-DUfkEqWP.js} +12 -12
- package/dist/tsdown/index-types.d.ts +6 -6
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/{main-JovZVvCY.js → main-CU_sednE.js} +2 -2
- package/dist/tsdown/run.js +3 -3
- package/dist/vite/client/client.mjs +5 -5
- package/dist/vite/node/chunks/build2.js +5 -14
- package/dist/vite/node/chunks/dist.js +6 -11
- package/dist/vite/node/chunks/dist2.js +1 -4
- package/dist/vite/node/chunks/logger.js +1 -1
- package/dist/vite/node/chunks/node.js +98 -83
- package/dist/vite/node/index.d.ts +3 -3
- package/dist/vite/node/module-runner.js +2 -2
- package/package.json +7 -7
- /package/dist/rolldown/shared/{binding-C5G6_6ql.mjs → binding-BV_UWDF3.mjs} +0 -0
|
@@ -20,7 +20,7 @@ import { promises } from "node:dns";
|
|
|
20
20
|
import { isatty } from "node:tty";
|
|
21
21
|
import path$1, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize as normalize$1, posix as posix$1, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 } from "path";
|
|
22
22
|
import { exactRegex, makeIdFiltersToMatchWithQuery, prefixRegex, withFilter } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
23
|
-
import { dev, resolveTsconfig, scan, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteDynamicImportVarsPlugin, viteImportGlobPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
23
|
+
import { dev, oxcRuntimePlugin, resolveTsconfig, scan, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteDynamicImportVarsPlugin, viteImportGlobPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
24
24
|
import readline from "node:readline";
|
|
25
25
|
import { MessageChannel, Worker } from "node:worker_threads";
|
|
26
26
|
import isModuleSyncConditionEnabled from "#module-sync-enabled";
|
|
@@ -1436,15 +1436,12 @@ var require_picomatch$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1436
1436
|
const state = regex.state;
|
|
1437
1437
|
delete regex.state;
|
|
1438
1438
|
let isIgnored = () => false;
|
|
1439
|
-
if (opts.ignore) {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
};
|
|
1446
|
-
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
1447
|
-
}
|
|
1439
|
+
if (opts.ignore) isIgnored = picomatch(opts.ignore, {
|
|
1440
|
+
...options,
|
|
1441
|
+
ignore: null,
|
|
1442
|
+
onMatch: null,
|
|
1443
|
+
onResult: null
|
|
1444
|
+
}, returnState);
|
|
1448
1445
|
const matcher = (input, returnObject = false) => {
|
|
1449
1446
|
const { isMatch, match, output } = picomatch.test(input, regex, options, {
|
|
1450
1447
|
glob,
|
|
@@ -2634,8 +2631,7 @@ function setup(useColors, colors, log, load, save, formatArgs, init) {
|
|
|
2634
2631
|
index++;
|
|
2635
2632
|
const formatter = createDebug.formatters[format];
|
|
2636
2633
|
if (typeof formatter === "function") {
|
|
2637
|
-
|
|
2638
|
-
match = formatter.call(debug, value);
|
|
2634
|
+
match = formatter.call(debug, args[index]);
|
|
2639
2635
|
args.splice(index, 1);
|
|
2640
2636
|
index--;
|
|
2641
2637
|
}
|
|
@@ -3212,8 +3208,9 @@ const replaceSlashOrColonRE = /[/:]/g;
|
|
|
3212
3208
|
const replaceDotRE = /\./g;
|
|
3213
3209
|
const replaceNestedIdRE = /\s*>\s*/g;
|
|
3214
3210
|
const replaceHashRE = /#/g;
|
|
3211
|
+
const replacePlusRE = /\+/g;
|
|
3215
3212
|
const flattenId = (id) => {
|
|
3216
|
-
return limitFlattenIdLength(id.replace(replaceSlashOrColonRE, "_").replace(replaceDotRE, "__").replace(replaceNestedIdRE, "___").replace(replaceHashRE, "____"));
|
|
3213
|
+
return limitFlattenIdLength(id.replace(replaceSlashOrColonRE, "_").replace(replaceDotRE, "__").replace(replaceNestedIdRE, "___").replace(replaceHashRE, "____").replace(replacePlusRE, "_____"));
|
|
3217
3214
|
};
|
|
3218
3215
|
const FLATTEN_ID_HASH_LENGTH = 8;
|
|
3219
3216
|
const FLATTEN_ID_MAX_FILE_LENGTH = 170;
|
|
@@ -3333,13 +3330,12 @@ const isJSRequest = (url) => {
|
|
|
3333
3330
|
const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
|
|
3334
3331
|
const importQueryRE = /(\?|&)import=?(?:&|$)/;
|
|
3335
3332
|
const directRequestRE$1 = /(\?|&)direct=?(?:&|$)/;
|
|
3336
|
-
const
|
|
3333
|
+
const InternalPrefixRE = new RegExp(`^(?:${[
|
|
3337
3334
|
FS_PREFIX,
|
|
3338
3335
|
VALID_ID_PREFIX,
|
|
3339
3336
|
CLIENT_PUBLIC_PATH,
|
|
3340
3337
|
ENV_PUBLIC_PATH
|
|
3341
|
-
];
|
|
3342
|
-
const InternalPrefixRE = new RegExp(`^(?:${internalPrefixes.join("|")})`);
|
|
3338
|
+
].join("|")})`);
|
|
3343
3339
|
const trailingSeparatorRE = /[?&]$/;
|
|
3344
3340
|
const isImportRequest = (url) => importQueryRE.test(url);
|
|
3345
3341
|
const isInternalRequest = (url) => InternalPrefixRE.test(url);
|
|
@@ -4855,6 +4851,7 @@ function encodeQueryItem(key, value) {
|
|
|
4855
4851
|
function stringifyQuery(query) {
|
|
4856
4852
|
return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&");
|
|
4857
4853
|
}
|
|
4854
|
+
new Set(builtinModules);
|
|
4858
4855
|
function clearImports(imports) {
|
|
4859
4856
|
return (imports || "").replace(/\/\/[^\n]*\n|\/\*.*\*\//g, "").replace(/\s+/g, " ");
|
|
4860
4857
|
}
|
|
@@ -5196,7 +5193,8 @@ function determineSpecificType(value) {
|
|
|
5196
5193
|
if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;
|
|
5197
5194
|
return `type ${typeof value} (${inspected})`;
|
|
5198
5195
|
}
|
|
5199
|
-
Object.freeze(["node", "import"]);
|
|
5196
|
+
const DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
|
|
5197
|
+
new Set(DEFAULT_CONDITIONS);
|
|
5200
5198
|
const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*(?:[\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;
|
|
5201
5199
|
const TYPE_RE = /^\s*?type\s/;
|
|
5202
5200
|
function parseStaticImport(matched) {
|
|
@@ -6220,20 +6218,12 @@ function oxcPlugin(config) {
|
|
|
6220
6218
|
if (jsxRefreshFilter?.(id) && !JS_TYPES_RE.test(cleanUrl(id))) result.lang = "js";
|
|
6221
6219
|
return result;
|
|
6222
6220
|
};
|
|
6223
|
-
const runtimeResolveBase = normalizePath$1(path.join(VITE_PACKAGE_DIR, "package.json"));
|
|
6224
6221
|
let server;
|
|
6225
6222
|
return {
|
|
6226
6223
|
name: "vite:oxc",
|
|
6227
6224
|
configureServer(_server) {
|
|
6228
6225
|
server = _server;
|
|
6229
6226
|
},
|
|
6230
|
-
...config.command === "serve" ? { resolveId: {
|
|
6231
|
-
filter: { id: prefixRegex("@oxc-project/runtime/") },
|
|
6232
|
-
async handler(id, _importer, opts) {
|
|
6233
|
-
return await this.resolve(id, runtimeResolveBase, opts);
|
|
6234
|
-
},
|
|
6235
|
-
order: "pre"
|
|
6236
|
-
} } : {},
|
|
6237
6227
|
async transform(code, id) {
|
|
6238
6228
|
if (filter(id) || filter(cleanUrl(id)) || jsxRefreshFilter?.(id)) {
|
|
6239
6229
|
const result = await transformWithOxc(code, id, getModifiedOxcTransformOptions(oxcTransformOptions, id, code, this.environment), void 0, config, server?.watcher);
|
|
@@ -7743,8 +7733,7 @@ var require_debug$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7743
7733
|
index++;
|
|
7744
7734
|
var formatter = exports.formatters[format];
|
|
7745
7735
|
if ("function" === typeof formatter) {
|
|
7746
|
-
|
|
7747
|
-
match = formatter.call(self, val);
|
|
7736
|
+
match = formatter.call(self, args[index]);
|
|
7748
7737
|
args.splice(index, 1);
|
|
7749
7738
|
index--;
|
|
7750
7739
|
}
|
|
@@ -10900,15 +10889,12 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10900
10889
|
const state = regex.state;
|
|
10901
10890
|
delete regex.state;
|
|
10902
10891
|
let isIgnored = () => false;
|
|
10903
|
-
if (opts.ignore) {
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
};
|
|
10910
|
-
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
10911
|
-
}
|
|
10892
|
+
if (opts.ignore) isIgnored = picomatch(opts.ignore, {
|
|
10893
|
+
...options,
|
|
10894
|
+
ignore: null,
|
|
10895
|
+
onMatch: null,
|
|
10896
|
+
onResult: null
|
|
10897
|
+
}, returnState);
|
|
10912
10898
|
const matcher = (input, returnObject = false) => {
|
|
10913
10899
|
const { isMatch, match, output } = picomatch.test(input, regex, options, {
|
|
10914
10900
|
glob,
|
|
@@ -15067,7 +15053,7 @@ var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports,
|
|
|
15067
15053
|
};
|
|
15068
15054
|
}));
|
|
15069
15055
|
//#endregion
|
|
15070
|
-
//#region ../../node_modules/.pnpm/@vercel+detect-agent@1.1
|
|
15056
|
+
//#region ../../node_modules/.pnpm/@vercel+detect-agent@1.2.1/node_modules/@vercel/detect-agent/dist/index.js
|
|
15071
15057
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15072
15058
|
var __defProp = Object.defineProperty;
|
|
15073
15059
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -15101,30 +15087,43 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15101
15087
|
const CURSOR = "cursor";
|
|
15102
15088
|
const CURSOR_CLI = "cursor-cli";
|
|
15103
15089
|
const CLAUDE = "claude";
|
|
15090
|
+
const COWORK = "cowork";
|
|
15104
15091
|
const DEVIN = "devin";
|
|
15105
15092
|
const REPLIT = "replit";
|
|
15106
15093
|
const GEMINI = "gemini";
|
|
15107
15094
|
const CODEX = "codex";
|
|
15095
|
+
const ANTIGRAVITY = "antigravity";
|
|
15108
15096
|
const AUGMENT_CLI = "augment-cli";
|
|
15109
15097
|
const OPENCODE = "opencode";
|
|
15098
|
+
const GITHUB_COPILOT = "github-copilot";
|
|
15099
|
+
const GITHUB_COPILOT_CLI = "github-copilot-cli";
|
|
15110
15100
|
const KNOWN_AGENTS = {
|
|
15111
15101
|
CURSOR,
|
|
15112
15102
|
CURSOR_CLI,
|
|
15113
15103
|
CLAUDE,
|
|
15104
|
+
COWORK,
|
|
15114
15105
|
DEVIN,
|
|
15115
15106
|
REPLIT,
|
|
15116
15107
|
GEMINI,
|
|
15117
15108
|
CODEX,
|
|
15109
|
+
ANTIGRAVITY,
|
|
15118
15110
|
AUGMENT_CLI,
|
|
15119
|
-
OPENCODE
|
|
15111
|
+
OPENCODE,
|
|
15112
|
+
GITHUB_COPILOT
|
|
15120
15113
|
};
|
|
15121
15114
|
async function determineAgent() {
|
|
15122
15115
|
if (process.env.AI_AGENT) {
|
|
15123
15116
|
const name = process.env.AI_AGENT.trim();
|
|
15124
|
-
if (name)
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15117
|
+
if (name) {
|
|
15118
|
+
if (name === GITHUB_COPILOT || name === GITHUB_COPILOT_CLI) return {
|
|
15119
|
+
isAgent: true,
|
|
15120
|
+
agent: { name: GITHUB_COPILOT }
|
|
15121
|
+
};
|
|
15122
|
+
return {
|
|
15123
|
+
isAgent: true,
|
|
15124
|
+
agent: { name }
|
|
15125
|
+
};
|
|
15126
|
+
}
|
|
15128
15127
|
}
|
|
15129
15128
|
if (process.env.CURSOR_TRACE_ID) return {
|
|
15130
15129
|
isAgent: true,
|
|
@@ -15138,10 +15137,14 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15138
15137
|
isAgent: true,
|
|
15139
15138
|
agent: { name: GEMINI }
|
|
15140
15139
|
};
|
|
15141
|
-
if (process.env.CODEX_SANDBOX) return {
|
|
15140
|
+
if (process.env.CODEX_SANDBOX || process.env.CODEX_CI || process.env.CODEX_THREAD_ID) return {
|
|
15142
15141
|
isAgent: true,
|
|
15143
15142
|
agent: { name: CODEX }
|
|
15144
15143
|
};
|
|
15144
|
+
if (process.env.ANTIGRAVITY_AGENT) return {
|
|
15145
|
+
isAgent: true,
|
|
15146
|
+
agent: { name: ANTIGRAVITY }
|
|
15147
|
+
};
|
|
15145
15148
|
if (process.env.AUGMENT_AGENT) return {
|
|
15146
15149
|
isAgent: true,
|
|
15147
15150
|
agent: { name: AUGMENT_CLI }
|
|
@@ -15150,21 +15153,31 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15150
15153
|
isAgent: true,
|
|
15151
15154
|
agent: { name: OPENCODE }
|
|
15152
15155
|
};
|
|
15153
|
-
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE)
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15156
|
+
if (process.env.CLAUDECODE || process.env.CLAUDE_CODE) {
|
|
15157
|
+
if (process.env.CLAUDE_CODE_IS_COWORK) return {
|
|
15158
|
+
isAgent: true,
|
|
15159
|
+
agent: { name: COWORK }
|
|
15160
|
+
};
|
|
15161
|
+
return {
|
|
15162
|
+
isAgent: true,
|
|
15163
|
+
agent: { name: CLAUDE }
|
|
15164
|
+
};
|
|
15165
|
+
}
|
|
15157
15166
|
if (process.env.REPL_ID) return {
|
|
15158
15167
|
isAgent: true,
|
|
15159
15168
|
agent: { name: REPLIT }
|
|
15160
15169
|
};
|
|
15170
|
+
if (process.env.COPILOT_MODEL || process.env.COPILOT_ALLOW_ALL || process.env.COPILOT_GITHUB_TOKEN) return {
|
|
15171
|
+
isAgent: true,
|
|
15172
|
+
agent: { name: GITHUB_COPILOT }
|
|
15173
|
+
};
|
|
15161
15174
|
try {
|
|
15162
15175
|
await (0, import_promises.access)(DEVIN_LOCAL_PATH, import_node_fs.constants.F_OK);
|
|
15163
15176
|
return {
|
|
15164
15177
|
isAgent: true,
|
|
15165
15178
|
agent: { name: DEVIN }
|
|
15166
15179
|
};
|
|
15167
|
-
} catch (
|
|
15180
|
+
} catch (_error) {}
|
|
15168
15181
|
return {
|
|
15169
15182
|
isAgent: false,
|
|
15170
15183
|
agent: void 0
|
|
@@ -21110,8 +21123,7 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21110
21123
|
index++;
|
|
21111
21124
|
const formatter = createDebug.formatters[format];
|
|
21112
21125
|
if (typeof formatter === "function") {
|
|
21113
|
-
|
|
21114
|
-
match = formatter.call(self, val);
|
|
21126
|
+
match = formatter.call(self, args[index]);
|
|
21115
21127
|
args.splice(index, 1);
|
|
21116
21128
|
index--;
|
|
21117
21129
|
}
|
|
@@ -23775,13 +23787,12 @@ function getNodeAssetAttributes(node) {
|
|
|
23775
23787
|
value,
|
|
23776
23788
|
attributes
|
|
23777
23789
|
})) return;
|
|
23778
|
-
const location = node.sourceCodeLocation.attrs[key];
|
|
23779
23790
|
actions.push({
|
|
23780
23791
|
type,
|
|
23781
23792
|
key,
|
|
23782
23793
|
value,
|
|
23783
23794
|
attributes,
|
|
23784
|
-
location
|
|
23795
|
+
location: node.sourceCodeLocation.attrs[key]
|
|
23785
23796
|
});
|
|
23786
23797
|
}
|
|
23787
23798
|
matched.srcAttributes?.forEach((key) => handleAttributeKey(key, "src"));
|
|
@@ -27252,7 +27263,7 @@ const esMap = {
|
|
|
27252
27263
|
"opera121"
|
|
27253
27264
|
]
|
|
27254
27265
|
};
|
|
27255
|
-
const esRE = /es(
|
|
27266
|
+
const esRE = /es(6|\d{4})/;
|
|
27256
27267
|
const versionRE = /\d/;
|
|
27257
27268
|
const convertTargetsCache = /* @__PURE__ */ new Map();
|
|
27258
27269
|
const convertTargets = (esbuildTarget) => {
|
|
@@ -27263,7 +27274,7 @@ const convertTargets = (esbuildTarget) => {
|
|
|
27263
27274
|
const entriesWithoutES = arraify(esbuildTarget).flatMap((e) => {
|
|
27264
27275
|
const match = esRE.exec(e);
|
|
27265
27276
|
if (!match) return e;
|
|
27266
|
-
const year = Number(match[1]);
|
|
27277
|
+
const year = match[1] === "6" ? 2015 : Number(match[1]);
|
|
27267
27278
|
if (!esMap[year]) throw new Error(`Unsupported target "${e}"`);
|
|
27268
27279
|
return esMap[year];
|
|
27269
27280
|
});
|
|
@@ -30027,7 +30038,8 @@ var FullBundleDevEnvironment = class extends DevEnvironment {
|
|
|
30027
30038
|
const rolldownOptions = resolveRolldownOptions(this, chunkMetadataMap);
|
|
30028
30039
|
rolldownOptions.experimental ??= {};
|
|
30029
30040
|
rolldownOptions.experimental.devMode = { implement: await getHmrImplementation(this.getTopLevelConfig()) };
|
|
30030
|
-
|
|
30041
|
+
rolldownOptions.optimization ??= {};
|
|
30042
|
+
rolldownOptions.optimization.inlineConst = false;
|
|
30031
30043
|
if (Array.isArray(rolldownOptions.output)) for (const output of rolldownOptions.output) {
|
|
30032
30044
|
output.entryFileNames = "assets/[name].js";
|
|
30033
30045
|
output.chunkFileNames = "assets/[name]-[hash].js";
|
|
@@ -31199,8 +31211,8 @@ function memoryFilesMiddleware(server) {
|
|
|
31199
31211
|
function rejectNoCorsRequestMiddleware() {
|
|
31200
31212
|
return function viteRejectNoCorsRequestMiddleware(req, res, next) {
|
|
31201
31213
|
if (req.headers["sec-fetch-mode"] === "no-cors" && req.headers["sec-fetch-site"] !== "same-origin" && req.headers["sec-fetch-dest"] === "script") {
|
|
31202
|
-
res.
|
|
31203
|
-
res.end("Cross-origin requests for classic scripts must be made with CORS mode enabled. Make sure to set the \"crossorigin\" attribute on your <script> tag.");
|
|
31214
|
+
res.setHeader("Content-Type", "text/javascript");
|
|
31215
|
+
res.end(`throw new Error(${JSON.stringify("[Vite] Cross-origin requests for classic scripts must be made with CORS mode enabled. Make sure to set the \"crossorigin\" attribute on your <script> tag.")});`);
|
|
31204
31216
|
return;
|
|
31205
31217
|
}
|
|
31206
31218
|
return next();
|
|
@@ -31268,10 +31280,9 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
31268
31280
|
await Promise.all(Object.entries(config.environments).map(async ([name, environmentOptions]) => {
|
|
31269
31281
|
const environment = await environmentOptions.dev.createEnvironment(name, config, { ws });
|
|
31270
31282
|
environments[name] = environment;
|
|
31271
|
-
const previousInstance = options.previousEnvironments?.[environment.name];
|
|
31272
31283
|
await environment.init({
|
|
31273
31284
|
watcher,
|
|
31274
|
-
previousInstance
|
|
31285
|
+
previousInstance: options.previousEnvironments?.[environment.name]
|
|
31275
31286
|
});
|
|
31276
31287
|
}));
|
|
31277
31288
|
let moduleGraph = new ModuleGraph({
|
|
@@ -31409,8 +31420,8 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
31409
31420
|
_setInternalServer(_server) {
|
|
31410
31421
|
server = _server;
|
|
31411
31422
|
},
|
|
31412
|
-
_restartPromise: null,
|
|
31413
|
-
_forceOptimizeOnRestart: false,
|
|
31423
|
+
_restartPromise: options.previousRestartPromise ?? null,
|
|
31424
|
+
_forceOptimizeOnRestart: options.previousForceOptimizeOnRestart ?? false,
|
|
31414
31425
|
_shortcutsState: options.previousShortcutsState
|
|
31415
31426
|
};
|
|
31416
31427
|
const reflexServer = new Proxy(server, {
|
|
@@ -31652,7 +31663,9 @@ async function restartServer(server) {
|
|
|
31652
31663
|
newServer = await _createServer(inlineConfig, {
|
|
31653
31664
|
listen: false,
|
|
31654
31665
|
previousEnvironments: server.environments,
|
|
31655
|
-
previousShortcutsState: server._shortcutsState
|
|
31666
|
+
previousShortcutsState: server._shortcutsState,
|
|
31667
|
+
previousRestartPromise: server._restartPromise,
|
|
31668
|
+
previousForceOptimizeOnRestart: server._forceOptimizeOnRestart
|
|
31656
31669
|
});
|
|
31657
31670
|
} catch (err) {
|
|
31658
31671
|
server.config.logger.error(err.message, { timestamp: true });
|
|
@@ -31664,8 +31677,6 @@ async function restartServer(server) {
|
|
|
31664
31677
|
const middlewares = server.middlewares;
|
|
31665
31678
|
newServer._configServerPort = server._configServerPort;
|
|
31666
31679
|
newServer._currentServerPort = server._currentServerPort;
|
|
31667
|
-
newServer._restartPromise = server._restartPromise;
|
|
31668
|
-
newServer._forceOptimizeOnRestart = server._forceOptimizeOnRestart;
|
|
31669
31680
|
Object.assign(server, newServer);
|
|
31670
31681
|
middlewares.stack = newServer.middlewares.stack;
|
|
31671
31682
|
server.middlewares = middlewares;
|
|
@@ -32389,7 +32400,11 @@ async function bundleWorkerEntry(config, id) {
|
|
|
32389
32400
|
".css": "js",
|
|
32390
32401
|
...rollupOptions.moduleTypes
|
|
32391
32402
|
},
|
|
32392
|
-
preserveEntrySignatures: false
|
|
32403
|
+
preserveEntrySignatures: false,
|
|
32404
|
+
experimental: {
|
|
32405
|
+
...rollupOptions.experimental,
|
|
32406
|
+
viteMode: true
|
|
32407
|
+
}
|
|
32393
32408
|
});
|
|
32394
32409
|
let result;
|
|
32395
32410
|
let watchedFiles;
|
|
@@ -32400,10 +32415,10 @@ async function bundleWorkerEntry(config, id) {
|
|
|
32400
32415
|
entryFileNames: path.posix.join(config.build.assetsDir, "[name]-[hash].js"),
|
|
32401
32416
|
chunkFileNames: path.posix.join(config.build.assetsDir, "[name]-[hash].js"),
|
|
32402
32417
|
assetFileNames: path.posix.join(config.build.assetsDir, "[name]-[hash].[ext]"),
|
|
32403
|
-
minify: config.build.minify === "oxc" ? true : config.build.minify === false ? "dce-only" : void 0,
|
|
32418
|
+
minify: workerEnvironment.config.build.minify === "oxc" ? true : workerEnvironment.config.build.minify === false ? "dce-only" : void 0,
|
|
32404
32419
|
...workerConfig,
|
|
32405
32420
|
format,
|
|
32406
|
-
sourcemap: config.build.sourcemap
|
|
32421
|
+
sourcemap: workerEnvironment.config.build.sourcemap
|
|
32407
32422
|
});
|
|
32408
32423
|
watchedFiles = (await bundle.watchFiles).map((f) => normalizePath$1(f));
|
|
32409
32424
|
} catch (e) {
|
|
@@ -33289,7 +33304,7 @@ async function getWorkerType(raw, clean, i) {
|
|
|
33289
33304
|
if (workerOpts.type && (workerOpts.type === "module" || workerOpts.type === "classic")) return workerOpts.type;
|
|
33290
33305
|
return "classic";
|
|
33291
33306
|
}
|
|
33292
|
-
const workerImportMetaUrlRE =
|
|
33307
|
+
const workerImportMetaUrlRE = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\))/dg;
|
|
33293
33308
|
function workerImportMetaUrlPlugin(config) {
|
|
33294
33309
|
const isBundled = config.isBundled;
|
|
33295
33310
|
let workerResolver;
|
|
@@ -33311,9 +33326,9 @@ function workerImportMetaUrlPlugin(config) {
|
|
|
33311
33326
|
async handler(code, id) {
|
|
33312
33327
|
let s;
|
|
33313
33328
|
const cleanString = stripLiteral(code);
|
|
33314
|
-
const
|
|
33329
|
+
const re = new RegExp(workerImportMetaUrlRE);
|
|
33315
33330
|
let match;
|
|
33316
|
-
while (match =
|
|
33331
|
+
while (match = re.exec(cleanString)) {
|
|
33317
33332
|
const [[, endIndex], [expStart, expEnd], [urlStart, urlEnd]] = match.indices;
|
|
33318
33333
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
33319
33334
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) this.error(`\`new URL(url, import.meta.url)\` is not supported in dynamic template string.`, expStart);
|
|
@@ -33662,6 +33677,7 @@ function buildImportAnalysisPlugin(config) {
|
|
|
33662
33677
|
* import.meta.glob('./dir/**.png', { eager: true, import: 'default' })[`./dir/${name}.png`]
|
|
33663
33678
|
* ```
|
|
33664
33679
|
*/
|
|
33680
|
+
const assetImportMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\)/dg;
|
|
33665
33681
|
function assetImportMetaUrlPlugin(config) {
|
|
33666
33682
|
const { publicDir } = config;
|
|
33667
33683
|
let assetResolver;
|
|
@@ -33681,14 +33697,14 @@ function assetImportMetaUrlPlugin(config) {
|
|
|
33681
33697
|
transform: {
|
|
33682
33698
|
filter: {
|
|
33683
33699
|
id: { exclude: [exactRegex(preloadHelperId), exactRegex(CLIENT_ENTRY)] },
|
|
33684
|
-
code:
|
|
33700
|
+
code: assetImportMetaUrlRE
|
|
33685
33701
|
},
|
|
33686
33702
|
async handler(code, id) {
|
|
33687
33703
|
let s;
|
|
33688
|
-
const
|
|
33704
|
+
const re = new RegExp(assetImportMetaUrlRE);
|
|
33689
33705
|
const cleanString = stripLiteral(code);
|
|
33690
33706
|
let match;
|
|
33691
|
-
while (match =
|
|
33707
|
+
while (match = re.exec(cleanString)) {
|
|
33692
33708
|
const [[startIndex, endIndex], [urlStart, urlEnd]] = match.indices;
|
|
33693
33709
|
if (hasViteIgnoreRE.test(code.slice(startIndex, urlStart))) continue;
|
|
33694
33710
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
@@ -34376,7 +34392,7 @@ function createFilterForTransform(idFilter, codeFilter, moduleTypeFilter, cwd) {
|
|
|
34376
34392
|
};
|
|
34377
34393
|
}
|
|
34378
34394
|
//#endregion
|
|
34379
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0
|
|
34395
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0/node_modules/@vitest/utils/dist/helpers.js
|
|
34380
34396
|
function notNullish(v) {
|
|
34381
34397
|
return v != null;
|
|
34382
34398
|
}
|
|
@@ -34384,7 +34400,7 @@ function isPrimitive(value) {
|
|
|
34384
34400
|
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
34385
34401
|
}
|
|
34386
34402
|
//#endregion
|
|
34387
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0
|
|
34403
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
|
|
34388
34404
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
34389
34405
|
function normalizeWindowsPath(input = "") {
|
|
34390
34406
|
if (!input) return input;
|
|
@@ -34463,7 +34479,7 @@ const isAbsolute$2 = function(p) {
|
|
|
34463
34479
|
return _IS_ABSOLUTE_RE.test(p);
|
|
34464
34480
|
};
|
|
34465
34481
|
//#endregion
|
|
34466
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0
|
|
34482
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.0/node_modules/@vitest/utils/dist/source-map.js
|
|
34467
34483
|
var comma = ",".charCodeAt(0);
|
|
34468
34484
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
34469
34485
|
var intToChar = new Uint8Array(64);
|
|
@@ -34973,6 +34989,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
|
|
34973
34989
|
htmlInlineProxyPlugin(config),
|
|
34974
34990
|
cssPlugin(config),
|
|
34975
34991
|
esbuildBannerFooterCompatPlugin(config),
|
|
34992
|
+
config.oxc !== false && !isBundled ? oxcRuntimePlugin() : null,
|
|
34976
34993
|
config.oxc !== false ? oxcPlugin(config) : null,
|
|
34977
34994
|
viteJsonPlugin({
|
|
34978
34995
|
...config.json,
|
|
@@ -36005,10 +36022,8 @@ function rolldownScanPlugin(environment, depImports, missing, entries) {
|
|
|
36005
36022
|
if (lang === "ts" || lang === "tsx" || lang === "jsx") loader = lang;
|
|
36006
36023
|
else if (id.endsWith(".astro")) loader = "ts";
|
|
36007
36024
|
const srcMatch = srcRE.exec(openTag);
|
|
36008
|
-
if (srcMatch) {
|
|
36009
|
-
|
|
36010
|
-
js += `import ${JSON.stringify(src)}\n`;
|
|
36011
|
-
} else if (content.trim()) {
|
|
36025
|
+
if (srcMatch) js += `import ${JSON.stringify(srcMatch[1] || srcMatch[2] || srcMatch[3])}\n`;
|
|
36026
|
+
else if (content.trim()) {
|
|
36012
36027
|
const contents = content + (loader.startsWith("ts") ? extractImportPaths(content) : "");
|
|
36013
36028
|
const key = `${id}?id=${scriptId++}`;
|
|
36014
36029
|
if (contents.includes("import.meta.glob")) scripts[key] = {
|
|
@@ -36415,13 +36430,13 @@ function rolldownDepPlugin(environment, qualified, external) {
|
|
|
36415
36430
|
}
|
|
36416
36431
|
},
|
|
36417
36432
|
transform: {
|
|
36418
|
-
filter: { code:
|
|
36433
|
+
filter: { code: assetImportMetaUrlRE },
|
|
36419
36434
|
async handler(code, id) {
|
|
36420
36435
|
let s;
|
|
36421
|
-
const
|
|
36436
|
+
const re = new RegExp(assetImportMetaUrlRE);
|
|
36422
36437
|
const cleanString = stripLiteral(code);
|
|
36423
36438
|
let match;
|
|
36424
|
-
while (match =
|
|
36439
|
+
while (match = re.exec(cleanString)) {
|
|
36425
36440
|
const [[startIndex, endIndex], [urlStart, urlEnd]] = match.indices;
|
|
36426
36441
|
if (hasViteIgnoreRE.test(code.slice(startIndex, urlStart))) continue;
|
|
36427
36442
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
@@ -31,7 +31,7 @@ import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownA
|
|
|
31
31
|
|
|
32
32
|
//#region \0rolldown/runtime.js
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.
|
|
34
|
+
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.3_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
35
35
|
//#region src/node/cli-commands.d.ts
|
|
36
36
|
interface StartOptions {
|
|
37
37
|
root?: string;
|
|
@@ -41,7 +41,7 @@ interface StartOptions {
|
|
|
41
41
|
open?: boolean;
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.
|
|
44
|
+
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.1.3_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/config.d.ts
|
|
45
45
|
//#region src/node/config.d.ts
|
|
46
46
|
interface DevToolsConfig extends Partial<StartOptions> {
|
|
47
47
|
enabled: boolean;
|
|
@@ -3687,7 +3687,7 @@ declare class RunnableDevEnvironment extends DevEnvironment {
|
|
|
3687
3687
|
private _runnerOptions;
|
|
3688
3688
|
constructor(name: string, config: ResolvedConfig, context: RunnableDevEnvironmentContext);
|
|
3689
3689
|
get runner(): ModuleRunner;
|
|
3690
|
-
close(): Promise<void>;
|
|
3690
|
+
override close(): Promise<void>;
|
|
3691
3691
|
}
|
|
3692
3692
|
//#endregion
|
|
3693
3693
|
//#region src/node/server/environments/fetchableEnvironments.d.ts
|
|
@@ -515,7 +515,7 @@ function analyzeImportedModDifference(mod, rawId, moduleType, metadata) {
|
|
|
515
515
|
let missingBindings = metadata.importedNames.filter((s) => !(s in mod));
|
|
516
516
|
if (missingBindings.length) {
|
|
517
517
|
let lastBinding = missingBindings[missingBindings.length - 1];
|
|
518
|
-
throw moduleType === "module" ?
|
|
518
|
+
throw SyntaxError(moduleType === "module" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\
|
|
519
519
|
[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
520
520
|
CommonJS modules can always be imported via the default export, for example using:
|
|
521
521
|
|
|
@@ -526,7 +526,7 @@ const {${missingBindings.join(", ")}} = pkg;
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
//#endregion
|
|
529
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
|
529
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.7/node_modules/nanoid/non-secure/index.js
|
|
530
530
|
let nanoid = (size = 21) => {
|
|
531
531
|
let id = "", i = size | 0;
|
|
532
532
|
for (; i--;) id += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random() * 64 | 0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vite-plus-core",
|
|
3
|
-
"version": "0.1.13
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "The Unified Toolchain for the Web",
|
|
5
5
|
"homepage": "https://viteplus.dev/guide",
|
|
6
6
|
"bugs": {
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@babel/types": "^7.28.5",
|
|
113
113
|
"@oxc-node/cli": "^0.0.35",
|
|
114
114
|
"@oxc-node/core": "^0.0.35",
|
|
115
|
-
"@vitejs/devtools": "^0.1.
|
|
115
|
+
"@vitejs/devtools": "^0.1.3",
|
|
116
116
|
"es-module-lexer": "^1.7.0",
|
|
117
117
|
"hookable": "^6.0.1",
|
|
118
118
|
"magic-string": "^0.30.21",
|
|
@@ -128,15 +128,15 @@
|
|
|
128
128
|
"tinyglobby": "^0.2.15",
|
|
129
129
|
"tree-kill": "^1.2.2",
|
|
130
130
|
"tsdown": "^0.21.4",
|
|
131
|
-
"rolldown": "1.0.0-rc.
|
|
132
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.13
|
|
131
|
+
"rolldown": "1.0.0-rc.10",
|
|
132
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.13"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"@arethetypeswrong/core": "^0.18.1",
|
|
136
136
|
"@tsdown/css": "0.21.4",
|
|
137
137
|
"@tsdown/exe": "0.21.4",
|
|
138
138
|
"@types/node": "^20.19.0 || >=22.12.0",
|
|
139
|
-
"@vitejs/devtools": "^0.
|
|
139
|
+
"@vitejs/devtools": "^0.1.0",
|
|
140
140
|
"esbuild": "^0.27.0",
|
|
141
141
|
"jiti": ">=1.21.0",
|
|
142
142
|
"less": "^4.0.0",
|
|
@@ -214,8 +214,8 @@
|
|
|
214
214
|
"node": "^20.19.0 || >=22.12.0"
|
|
215
215
|
},
|
|
216
216
|
"bundledVersions": {
|
|
217
|
-
"vite": "8.0.
|
|
218
|
-
"rolldown": "1.0.0-rc.
|
|
217
|
+
"vite": "8.0.1",
|
|
218
|
+
"rolldown": "1.0.0-rc.10",
|
|
219
219
|
"tsdown": "0.21.4"
|
|
220
220
|
},
|
|
221
221
|
"scripts": {
|
|
File without changes
|