@voidzero-dev/vite-plus-core 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -1
- package/dist/rolldown/cli.mjs +30 -27
- package/dist/rolldown/config.d.mts +3 -3
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +27 -27
- package/dist/rolldown/experimental-index.mjs +8 -8
- package/dist/rolldown/experimental-runtime-types.d.ts +15 -2
- package/dist/rolldown/experimental-runtime.d.ts +15 -2
- package/dist/rolldown/experimental-runtime.mjs +19 -2
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +1 -1
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +3 -3
- package/dist/rolldown/parse-ast-index.d.mts +5 -6
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +4 -4
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-B4m_2rFW.mjs → binding-DlR5d34p.mjs} +27 -27
- package/dist/rolldown/shared/{bindingify-input-options-YtcpaV3r.mjs → bindingify-input-options-DhjlrWZE.mjs} +13 -13
- package/dist/rolldown/shared/{constructors-DDRbtWM1.mjs → constructors-B2hkJoIA.mjs} +1 -1
- package/dist/rolldown/shared/{constructors-CGQ9ItSV.d.mts → constructors-Dw9H1IvX.d.mts} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-CFtx335R.mjs → create-bundler-option-1AEe_J0o.mjs} +22 -5
- package/dist/rolldown/shared/{define-config-kIZKjX8Q.d.mts → define-config-CGhm2DU-.d.mts} +24 -5
- package/dist/rolldown/shared/{error-Bj1xBdEY.mjs → error-Dsqzw0Oa.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-CiFPv7UH.mjs → load-config-bvw8z7Ft.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-xyy0kCQR.mjs → normalize-string-or-regex-B7Gsiuz7.mjs} +1 -1
- package/dist/rolldown/shared/{parse-Zii6QoPp.mjs → parse-BCSSrLHf.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-DRWFAQ3v.mjs → resolve-tsconfig-DyR2RUTm.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-BCQsxZbq.mjs → rolldown-C8QomUuX.mjs} +4 -4
- package/dist/rolldown/shared/{watch-CXhrnblH.mjs → watch-CPI70Lkn.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-JVmLFaZt-k6Y-YuG9.js → build-KEepWO_k-BOsPZ2cH.js} +26 -25
- package/dist/tsdown/{debug-CpC4hV25-D_60QWpz.js → debug-DKTolR2K-BMJOFfj2.js} +4 -5
- package/dist/tsdown/{detect-Bg-d8iUV--_V5C4Db.js → detect-DHDepxVX-CpWW52Jd.js} +38 -34
- package/dist/tsdown/dist-BebyOHRu.js +6224 -0
- package/dist/tsdown/index-types.d.ts +216 -216
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/{main-CyNcZUzu.js → main-Du9xCnhX.js} +105 -19
- package/dist/tsdown/npm_entry_picomatch.cjs +36 -25
- package/dist/tsdown/{resolver-DE0_sy8o-Pz8aksn9.js → resolver-DE0_sy8o-DNoi-dFQ.js} +3 -2
- package/dist/tsdown/run.js +28 -26
- package/dist/tsdown/{src-pN7Bl6zo.js → src-CBWRkeF5.js} +4 -4
- package/dist/tsdown/{target-DgdLrXba-BygiKCU8.js → target-HZbF5Cux-Cmv1LI5D.js} +175 -9
- package/dist/tsdown/{tsc-2xhsE0Bf.js → tsc-YwU2b8yT.js} +4 -4
- package/dist/tsdown/tsdown-css.js +4 -4
- package/dist/tsdown/tsdown-exe.js +5 -43
- package/dist/vite/client/bundledDevClient.mjs +38 -20
- package/dist/vite/client/client.mjs +10 -9
- package/dist/vite/node/chunks/build.js +19 -19
- package/dist/vite/node/chunks/node.js +4409 -4358
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +24 -21
- package/dist/vite/node/index.d.ts +2 -1
- package/dist/vite/node/index.js +1 -2
- package/dist/vite/node/internal.js +1 -2
- package/dist/vite/node/module-runner.d.ts +1 -0
- package/dist/vite/node/module-runner.js +16 -25
- package/package.json +26 -27
- package/dist/tsdown/dist-DquISSoY.js +0 -2952
- package/dist/tsdown/require-BbBF8Ii0-S6Y65RhW.js +0 -320
- package/dist/tsdown/style-DiMP8pYv-DIC5PXeH.js +0 -88
- package/dist/tsdown/version-CQ98ZBpL-CKvh-HCu.js +0 -169
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mt as __require, pt as __commonJSMin } from "./node.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/format-import-prelude.js
|
|
4
4
|
var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
module.exports = function formatImportPrelude(layer, media, supports) {
|
|
6
6
|
const parts = [];
|
|
@@ -15,7 +15,7 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
15
15
|
};
|
|
16
16
|
}));
|
|
17
17
|
//#endregion
|
|
18
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
18
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/base64-encoded-import.js
|
|
19
19
|
var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20
20
|
const formatImportPrelude = require_format_import_prelude();
|
|
21
21
|
module.exports = function base64EncodedConditionalImport(prelude, conditions) {
|
|
@@ -28,7 +28,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
28
28
|
};
|
|
29
29
|
}));
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
31
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/apply-conditions.js
|
|
32
32
|
var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33
33
|
const base64EncodedConditionalImport = require_base64_encoded_import();
|
|
34
34
|
module.exports = function applyConditions(bundle, atRule) {
|
|
@@ -103,7 +103,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
103
103
|
};
|
|
104
104
|
}));
|
|
105
105
|
//#endregion
|
|
106
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
106
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/apply-raws.js
|
|
107
107
|
var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108
108
|
module.exports = function applyRaws(bundle) {
|
|
109
109
|
bundle.forEach((stmt, index) => {
|
|
@@ -114,7 +114,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
114
114
|
};
|
|
115
115
|
}));
|
|
116
116
|
//#endregion
|
|
117
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
117
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/apply-styles.js
|
|
118
118
|
var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
119
119
|
module.exports = function applyStyles(bundle, styles) {
|
|
120
120
|
styles.nodes = [];
|
|
@@ -134,7 +134,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
134
134
|
};
|
|
135
135
|
}));
|
|
136
136
|
//#endregion
|
|
137
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
137
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/data-url.js
|
|
138
138
|
var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
139
139
|
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
|
140
140
|
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
|
@@ -153,7 +153,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
153
153
|
};
|
|
154
154
|
}));
|
|
155
155
|
//#endregion
|
|
156
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
156
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/parse-statements.js
|
|
157
157
|
var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
158
158
|
const valueParser = require_lib();
|
|
159
159
|
const { stringify } = valueParser;
|
|
@@ -278,7 +278,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
278
278
|
}
|
|
279
279
|
}));
|
|
280
280
|
//#endregion
|
|
281
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
281
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/process-content.js
|
|
282
282
|
var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
283
283
|
const path$2 = __require("path");
|
|
284
284
|
let sugarss;
|
|
@@ -312,7 +312,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
312
312
|
}
|
|
313
313
|
}));
|
|
314
314
|
//#endregion
|
|
315
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
315
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/lib/parse-styles.js
|
|
316
316
|
var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
317
317
|
const path$1 = __require("path");
|
|
318
318
|
const dataURL = require_data_url();
|
|
@@ -416,7 +416,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
416
416
|
module.exports = parseStyles;
|
|
417
417
|
}));
|
|
418
418
|
//#endregion
|
|
419
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.
|
|
419
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.29/node_modules/postcss-import/index.js
|
|
420
420
|
var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
421
421
|
const path = __require("path");
|
|
422
422
|
const applyConditions = require_apply_conditions();
|
package/dist/vite/node/cli.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { performance } from "node:perf_hooks";
|
|
5
5
|
import { inspect } from "node:util";
|
|
6
|
-
//#region ../../node_modules/.pnpm/cac@7.0.
|
|
6
|
+
//#region ../../node_modules/.pnpm/cac@7.0.1/node_modules/cac/dist/index.js
|
|
7
7
|
function toArr(any) {
|
|
8
8
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
9
9
|
}
|
|
@@ -104,23 +104,23 @@ function findAllBrackets(v) {
|
|
|
104
104
|
}
|
|
105
105
|
function getMriOptions(options) {
|
|
106
106
|
const result = {
|
|
107
|
-
alias:
|
|
107
|
+
alias: Object.create(null),
|
|
108
108
|
boolean: []
|
|
109
109
|
};
|
|
110
110
|
for (const [index, option] of options.entries()) {
|
|
111
111
|
if (option.names.length > 1) result.alias[option.names[0]] = option.names.slice(1);
|
|
112
|
-
if (option.isBoolean)
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
if (option.isBoolean) {
|
|
113
|
+
if (option.negated) {
|
|
114
|
+
if (!options.some((o, i) => {
|
|
115
|
+
return i !== index && o.names.some((name) => option.names.includes(name)) && typeof o.required === "boolean";
|
|
116
|
+
})) result.boolean.push(option.names[0]);
|
|
117
|
+
} else result.boolean.push(option.names[0]);
|
|
118
|
+
}
|
|
117
119
|
}
|
|
118
120
|
return result;
|
|
119
121
|
}
|
|
120
122
|
function findLongest(arr) {
|
|
121
|
-
return arr.sort((a, b) =>
|
|
122
|
-
return a.length > b.length ? -1 : 1;
|
|
123
|
-
})[0];
|
|
123
|
+
return arr.sort((a, b) => b.length - a.length)[0];
|
|
124
124
|
}
|
|
125
125
|
function padRight(str, length) {
|
|
126
126
|
return str.length >= length ? str : `${str}${" ".repeat(length - str.length)}`;
|
|
@@ -130,7 +130,13 @@ function camelcase(input) {
|
|
|
130
130
|
return p1 + p2.toUpperCase();
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
+
const UNSAFE_KEYS = /* @__PURE__ */ new Set([
|
|
134
|
+
"__proto__",
|
|
135
|
+
"constructor",
|
|
136
|
+
"prototype"
|
|
137
|
+
]);
|
|
133
138
|
function setDotProp(obj, keys, val) {
|
|
139
|
+
if (keys.some((key) => UNSAFE_KEYS.has(key))) return;
|
|
134
140
|
let current = obj;
|
|
135
141
|
for (let i = 0; i < keys.length; i++) {
|
|
136
142
|
const key = keys[i];
|
|
@@ -146,12 +152,9 @@ function setDotProp(obj, keys, val) {
|
|
|
146
152
|
}
|
|
147
153
|
}
|
|
148
154
|
function setByType(obj, transforms) {
|
|
149
|
-
for (const key of Object.
|
|
150
|
-
|
|
151
|
-
if (transform.
|
|
152
|
-
obj[key] = [obj[key]].flat();
|
|
153
|
-
if (typeof transform.transformFunction === "function") obj[key] = obj[key].map(transform.transformFunction);
|
|
154
|
-
}
|
|
155
|
+
for (const [key, transform] of Object.entries(transforms)) if (transform.shouldTransform) {
|
|
156
|
+
obj[key] = [obj[key]].flat();
|
|
157
|
+
if (typeof transform.transformFunction === "function") obj[key] = obj[key].map(transform.transformFunction);
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
function getFileName(input) {
|
|
@@ -194,7 +197,7 @@ var Option = class {
|
|
|
194
197
|
name = name.replace(/^no-/, "");
|
|
195
198
|
}
|
|
196
199
|
return camelcaseOptionName(name);
|
|
197
|
-
}).sort((a, b) => a.length
|
|
200
|
+
}).sort((a, b) => a.length - b.length);
|
|
198
201
|
this.name = this.names.at(-1);
|
|
199
202
|
if (this.negated && this.config.default == null) this.config.default = true;
|
|
200
203
|
if (rawName.includes("<")) this.required = true;
|
|
@@ -297,7 +300,7 @@ var Command = class {
|
|
|
297
300
|
* @param name Option name
|
|
298
301
|
*/
|
|
299
302
|
hasOption(name) {
|
|
300
|
-
name = name.split(".")[0];
|
|
303
|
+
name = name.split(".", 1)[0];
|
|
301
304
|
return this.options.find((option) => {
|
|
302
305
|
return option.names.includes(name);
|
|
303
306
|
});
|
|
@@ -372,7 +375,7 @@ var Command = class {
|
|
|
372
375
|
const { options: parsedOptions, globalCommand } = this.cli;
|
|
373
376
|
const options = [...globalCommand.options, ...this.options];
|
|
374
377
|
for (const option of options) {
|
|
375
|
-
const value = parsedOptions[option.name.split(".")[0]];
|
|
378
|
+
const value = parsedOptions[option.name.split(".", 1)[0]];
|
|
376
379
|
if (option.required) {
|
|
377
380
|
const hasNegated = options.some((o) => o.negated && o.names.includes(option.name));
|
|
378
381
|
if (value === true || value === false && !hasNegated) throw new CACError(`option \`${option.rawName}\` value is missing`);
|
|
@@ -591,8 +594,8 @@ var CAC = class extends EventTarget {
|
|
|
591
594
|
transforms[cliOption.name].transformFunction = cliOption.config.type[0];
|
|
592
595
|
}
|
|
593
596
|
}
|
|
594
|
-
for (const key of Object.
|
|
595
|
-
setDotProp(options, key.split("."),
|
|
597
|
+
for (const [key, value] of Object.entries(parsed)) if (key !== "_") {
|
|
598
|
+
setDotProp(options, key.split("."), value);
|
|
596
599
|
setByType(options, transforms);
|
|
597
600
|
}
|
|
598
601
|
return {
|
|
@@ -1100,6 +1100,7 @@ export declare function optimizeDeps(config: ResolvedConfig, force?: boolean | u
|
|
|
1100
1100
|
type MemoryFile = {
|
|
1101
1101
|
source: string | Uint8Array;
|
|
1102
1102
|
etag?: string;
|
|
1103
|
+
contentType?: string;
|
|
1103
1104
|
};
|
|
1104
1105
|
declare class MemoryFiles {
|
|
1105
1106
|
private files;
|
|
@@ -3132,7 +3133,7 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
|
|
|
3132
3133
|
*/
|
|
3133
3134
|
export declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
|
|
3134
3135
|
//#endregion
|
|
3135
|
-
//#region ../../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
3136
|
+
//#region ../../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.29_tsx@4.23.15_yaml@2.9.1/node_modules/postcss-load-config/src/index.d.ts
|
|
3136
3137
|
type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
|
|
3137
3138
|
interface Config {
|
|
3138
3139
|
parser?: string | ProcessOptions['parser'] | false;
|
package/dist/vite/node/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { BuildEnvironment, DevEnvironment, Visitor, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
|
|
1
|
+
export { w as BuildEnvironment, b as DevEnvironment, t as Visitor, T as build, H as buildErrorMessage, E as createBuilder, u as createFetchableDevEnvironment, Y as createFilter, k as createIdResolver, rt as createLogger, v as createRunnableDevEnvironment, N as createServer, M as createServerHotChannel, B as createServerModuleRunner, V as createServerModuleRunnerTransport, dt as defaultAllowedOrigins, it as defaultClientConditions, at as defaultClientMainFields, ot as defaultExternalConditions, st as defaultServerConditions, ct as defaultServerMainFields, p as defineConfig, n as esbuildVersion, r as esmExternalRequirePlugin, x as fetchModule, D as formatPostcssSourceMap, X as isCSSRequest, d as isFetchableDevEnvironment, I as isFileLoadingAllowed, L as isFileServingAllowed, y as isRunnableDevEnvironment, m as loadConfigFromFile, K as loadEnv, Z as mergeAlias, Q as mergeConfig, i as minify, a as minifySync, z as moduleRunnerTransform, $ as normalizePath, A as optimizeDeps, o as parse, s as parseAst, c as parseAstAsync, l as parseSync, J as perEnvironmentPlugin, G as perEnvironmentState, O as preprocessCSS, S as preview, h as resolveConfig, q as resolveEnvPrefix, et as rolldownVersion, tt as rollupVersion, _ as runnerImport, F as searchForWorkspaceRoot, R as send, g as sortUserPlugins, W as transformWithEsbuild, U as transformWithOxc, lt as version, nt as withFilter } from "./chunks/node.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { reactRefreshWrapperPlugin };
|
|
1
|
+
export { viteReactRefreshWrapperPlugin as reactRefreshWrapperPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
@@ -402,8 +402,8 @@ var HMRContext = class {
|
|
|
402
402
|
else if (Array.isArray(deps)) this.acceptDeps(deps, callback);
|
|
403
403
|
else throw Error("invalid hot.accept() usage.");
|
|
404
404
|
}
|
|
405
|
-
acceptExports(
|
|
406
|
-
this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod));
|
|
405
|
+
acceptExports(exportNames, callback) {
|
|
406
|
+
this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod), typeof exportNames == "string" ? [exportNames] : exportNames);
|
|
407
407
|
}
|
|
408
408
|
dispose(cb) {
|
|
409
409
|
this.hmrClient.disposeMap.set(this.ownerPath, cb);
|
|
@@ -436,11 +436,7 @@ var HMRContext = class {
|
|
|
436
436
|
let existing = map.get(event);
|
|
437
437
|
if (existing === void 0) return;
|
|
438
438
|
let pruned = existing.filter((l) => l !== cb);
|
|
439
|
-
|
|
440
|
-
map.delete(event);
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
map.set(event, pruned);
|
|
439
|
+
pruned.length === 0 ? map.delete(event) : map.set(event, pruned);
|
|
444
440
|
};
|
|
445
441
|
removeFromMap(this.hmrClient.customListenersMap), removeFromMap(this.newListeners);
|
|
446
442
|
}
|
|
@@ -451,14 +447,15 @@ var HMRContext = class {
|
|
|
451
447
|
data
|
|
452
448
|
});
|
|
453
449
|
}
|
|
454
|
-
acceptDeps(deps, callback = () => {}) {
|
|
450
|
+
acceptDeps(deps, callback = () => {}, exports) {
|
|
455
451
|
let mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {
|
|
456
452
|
id: this.ownerPath,
|
|
457
453
|
callbacks: []
|
|
458
454
|
};
|
|
459
455
|
mod.callbacks.push({
|
|
460
456
|
deps,
|
|
461
|
-
fn: callback
|
|
457
|
+
fn: callback,
|
|
458
|
+
exports
|
|
462
459
|
}), this.hmrClient.hotModulesMap.set(this.ownerPath, mod);
|
|
463
460
|
}
|
|
464
461
|
}, HMRClient = class {
|
|
@@ -687,15 +684,11 @@ const createWebSocketModuleRunnerTransport = (options) => {
|
|
|
687
684
|
socket.addEventListener("open", () => {
|
|
688
685
|
isOpened = !0, resolve();
|
|
689
686
|
}, { once: !0 }), socket.addEventListener("close", () => {
|
|
690
|
-
|
|
691
|
-
reject(/* @__PURE__ */ Error("WebSocket closed without opened."));
|
|
692
|
-
return;
|
|
693
|
-
}
|
|
694
|
-
onMessage({
|
|
687
|
+
isOpened ? (onMessage({
|
|
695
688
|
type: "custom",
|
|
696
689
|
event: "vite:ws:disconnect",
|
|
697
690
|
data: { webSocket: socket }
|
|
698
|
-
}), onDisconnection();
|
|
691
|
+
}), onDisconnection()) : reject(/* @__PURE__ */ Error("WebSocket closed without opened."));
|
|
699
692
|
});
|
|
700
693
|
}), onMessage({
|
|
701
694
|
type: "custom",
|
|
@@ -911,11 +904,8 @@ function getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Se
|
|
|
911
904
|
visited.add(moduleId);
|
|
912
905
|
let module = runner.evaluatedModules.getModuleById(moduleId);
|
|
913
906
|
if (module) {
|
|
914
|
-
if (!module.importers.size)
|
|
915
|
-
|
|
916
|
-
continue;
|
|
917
|
-
}
|
|
918
|
-
for (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);
|
|
907
|
+
if (!module.importers.size) entrypoints.add(module.url);
|
|
908
|
+
else for (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);
|
|
919
909
|
}
|
|
920
910
|
}
|
|
921
911
|
return entrypoints;
|
|
@@ -1073,13 +1063,14 @@ function wrapCallSite(frame, state) {
|
|
|
1073
1063
|
}), frame.isNative()) return state.curPosition = null, frame;
|
|
1074
1064
|
let source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
1075
1065
|
if (source) {
|
|
1076
|
-
let
|
|
1066
|
+
let unmapped = {
|
|
1077
1067
|
name: null,
|
|
1078
1068
|
source,
|
|
1079
1069
|
line: frame.getLineNumber() ?? 0,
|
|
1080
1070
|
column: (frame.getColumnNumber() ?? 1) - 1
|
|
1081
|
-
});
|
|
1082
|
-
state.curPosition = position, frame
|
|
1071
|
+
}, position = mapSourcePosition(unmapped);
|
|
1072
|
+
if (state.curPosition = position, position === unmapped && !state.nextPosition?.name && frame.getColumnNumber() != null && frame.getScriptNameOrSourceURL() === source) return frame;
|
|
1073
|
+
frame = cloneCallSite(frame);
|
|
1083
1074
|
let originalFunctionName = frame.getFunctionName;
|
|
1084
1075
|
return frame.getFunctionName = function() {
|
|
1085
1076
|
let name = state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName();
|
|
@@ -1095,9 +1086,9 @@ function wrapCallSite(frame, state) {
|
|
|
1095
1086
|
}, frame;
|
|
1096
1087
|
}
|
|
1097
1088
|
let origin = frame.isEval() && frame.getEvalOrigin();
|
|
1098
|
-
return origin
|
|
1089
|
+
return origin && (origin = mapEvalOrigin(origin), frame = cloneCallSite(frame), frame.getEvalOrigin = function() {
|
|
1099
1090
|
return origin || void 0;
|
|
1100
|
-
}, frame
|
|
1091
|
+
}), frame;
|
|
1101
1092
|
}
|
|
1102
1093
|
function prepareStackTrace(error, stack) {
|
|
1103
1094
|
let errorString = `${error.name || "Error"}: ${error.message || ""}`, state = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vite-plus-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The Unified Toolchain for the Web",
|
|
5
5
|
"homepage": "https://viteplus.dev/guide",
|
|
6
6
|
"bugs": {
|
|
@@ -107,40 +107,39 @@
|
|
|
107
107
|
"./types/internal/*": null
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@oxc-project/runtime": "=0.
|
|
111
|
-
"@oxc-project/types": "=0.
|
|
110
|
+
"@oxc-project/runtime": "=0.154.0",
|
|
111
|
+
"@oxc-project/types": "=0.154.0",
|
|
112
112
|
"lightningcss": "^1.33.0",
|
|
113
|
-
"postcss": "^8.5.
|
|
114
|
-
"yuku-
|
|
115
|
-
"yuku-parser": "^0.9.3"
|
|
113
|
+
"postcss": "^8.5.29",
|
|
114
|
+
"yuku-parser": "0.19.0"
|
|
116
115
|
},
|
|
117
116
|
"devDependencies": {
|
|
118
|
-
"@ast-grep/napi": "^0.
|
|
117
|
+
"@ast-grep/napi": "^0.45.0",
|
|
119
118
|
"@emnapi/core": "2.0.0-alpha.5",
|
|
120
119
|
"@emnapi/runtime": "2.0.0-alpha.5",
|
|
121
120
|
"@napi-rs/cli": "^3.10.0",
|
|
122
|
-
"@oxc-node/cli": "^0.1.
|
|
123
|
-
"@tsdown/css": "^0.23.
|
|
124
|
-
"@tsdown/exe": "^0.23.
|
|
125
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
121
|
+
"@oxc-node/cli": "^0.1.6",
|
|
122
|
+
"@tsdown/css": "^0.23.1",
|
|
123
|
+
"@tsdown/exe": "^0.23.1",
|
|
124
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
126
125
|
"@vitejs/devtools": "^0.7.6",
|
|
127
126
|
"es-module-lexer": "^1.7.0",
|
|
128
127
|
"hookable": "^6.0.1",
|
|
129
128
|
"magic-string": "^0.30.21",
|
|
130
|
-
"oxc-parser": "=0.
|
|
131
|
-
"oxfmt": "=0.
|
|
129
|
+
"oxc-parser": "=0.154.0",
|
|
130
|
+
"oxfmt": "=0.73.0",
|
|
132
131
|
"picocolors": "^1.1.1",
|
|
133
132
|
"picomatch": "^4.0.2",
|
|
134
133
|
"pkg-types": "^2.3.0",
|
|
135
|
-
"rolldown": "1.2.
|
|
134
|
+
"rolldown": "1.2.13",
|
|
136
135
|
"rolldown-plugin-dts": "^0.28.0",
|
|
137
136
|
"rollup": "^4.63.0",
|
|
138
137
|
"rollup-plugin-license": "^3.6.0",
|
|
139
138
|
"semver": "^7.8.0",
|
|
140
139
|
"tinyglobby": "^0.2.15",
|
|
141
140
|
"tree-kill": "^1.2.2",
|
|
142
|
-
"tsdown": "^0.23.
|
|
143
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
141
|
+
"tsdown": "^0.23.1",
|
|
142
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.2.0"
|
|
144
143
|
},
|
|
145
144
|
"peerDependencies": {
|
|
146
145
|
"@arethetypeswrong/core": "^0.18.1",
|
|
@@ -232,22 +231,22 @@
|
|
|
232
231
|
},
|
|
233
232
|
"optionalDependencies": {
|
|
234
233
|
"fsevents": "~2.3.3",
|
|
235
|
-
"@voidzero-dev/vite-plus-darwin-arm64": "1.
|
|
236
|
-
"@voidzero-dev/vite-plus-darwin-x64": "1.
|
|
237
|
-
"@voidzero-dev/vite-plus-linux-arm64-gnu": "1.
|
|
238
|
-
"@voidzero-dev/vite-plus-linux-arm64-musl": "1.
|
|
239
|
-
"@voidzero-dev/vite-plus-linux-x64-gnu": "1.
|
|
240
|
-
"@voidzero-dev/vite-plus-linux-x64-musl": "1.
|
|
241
|
-
"@voidzero-dev/vite-plus-win32-x64-msvc": "1.
|
|
242
|
-
"@voidzero-dev/vite-plus-win32-arm64-msvc": "1.
|
|
234
|
+
"@voidzero-dev/vite-plus-darwin-arm64": "1.2.0",
|
|
235
|
+
"@voidzero-dev/vite-plus-darwin-x64": "1.2.0",
|
|
236
|
+
"@voidzero-dev/vite-plus-linux-arm64-gnu": "1.2.0",
|
|
237
|
+
"@voidzero-dev/vite-plus-linux-arm64-musl": "1.2.0",
|
|
238
|
+
"@voidzero-dev/vite-plus-linux-x64-gnu": "1.2.0",
|
|
239
|
+
"@voidzero-dev/vite-plus-linux-x64-musl": "1.2.0",
|
|
240
|
+
"@voidzero-dev/vite-plus-win32-x64-msvc": "1.2.0",
|
|
241
|
+
"@voidzero-dev/vite-plus-win32-arm64-msvc": "1.2.0"
|
|
243
242
|
},
|
|
244
243
|
"engines": {
|
|
245
244
|
"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
|
|
246
245
|
},
|
|
247
246
|
"bundledVersions": {
|
|
248
|
-
"vite": "8.3.
|
|
249
|
-
"rolldown": "1.2.
|
|
250
|
-
"tsdown": "0.23.
|
|
247
|
+
"vite": "8.3.4",
|
|
248
|
+
"rolldown": "1.2.13",
|
|
249
|
+
"tsdown": "0.23.1"
|
|
251
250
|
},
|
|
252
251
|
"scripts": {
|
|
253
252
|
"build": "oxnode -C dev ./build.ts"
|