@voidzero-dev/vite-plus-core 0.2.1 → 0.2.3
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 +175 -48
- package/dist/rolldown/cli.mjs +25 -14
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +15 -5
- package/dist/rolldown/experimental-index.mjs +23 -17
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +5 -4
- 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 +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-DgGsNpT9.d.mts → binding-B1q9aYT-.d.mts} +65 -142
- package/dist/rolldown/shared/{binding-CfwqjDbP.mjs → binding-BmkJW3Wy.mjs} +39 -35
- package/dist/rolldown/shared/{bindingify-input-options--chmbDhw.mjs → bindingify-input-options-Cmm60vfj.mjs} +1330 -1331
- package/dist/rolldown/shared/{constructors-Bx1tSad6.d.mts → constructors-2i1T9YcF.d.mts} +3 -4
- package/dist/rolldown/shared/{constructors-DnT9y_13.mjs → constructors-CE6zZSUt.mjs} +2 -5
- package/dist/rolldown/shared/{define-config-ChOOV2QZ.d.mts → define-config-BBz954-q.d.mts} +2 -2
- package/dist/rolldown/shared/{error-C0TrL0_H.mjs → error-BlQ0-ek7.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-BXgGQtnA.mjs → load-config-CVVMWSlg.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-DGbe3BlX.mjs → normalize-string-or-regex-BYkbbGqQ.mjs} +1 -1
- package/dist/rolldown/shared/{parse-26ORR8fZ.mjs → parse-Dphnedsw.mjs} +2 -2
- package/dist/rolldown/shared/{prompt-DV1XbtjC.mjs → prompt-Bgj-uEyc.mjs} +5 -5
- package/dist/rolldown/shared/{resolve-tsconfig-D3YLh9ff.mjs → resolve-tsconfig-CdIAR1Eb.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-DpXXI00f.mjs → rolldown-Bnp916iM.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-D8R4Zzfy.mjs → rolldown-build-Cs2iVJuw.mjs} +24 -56
- package/dist/rolldown/shared/{transform-C-XSNVrd.d.mts → transform-CEmFsvJW.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-D5Zm0Vsz.mjs → watch-ECGr-_QS.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +6 -6
- package/dist/tsdown/{build-B_nvJe4A-BkmlHYK-.js → build-B_nvJe4A-CvbtVBxy.js} +30 -96
- package/dist/tsdown/debug-DLdR-9XB-DQZ6QLC0.js +250 -0
- package/dist/tsdown/{detect-B97OSl92-B5bcx_Ya.js → detect-B97OSl92-BJPZyIKJ.js} +1 -1
- package/dist/tsdown/{dist-4h5bgYzo.js → dist-CqbVlnVq.js} +30 -25
- package/dist/tsdown/general-Cp4NiJNK-CbyrS9q1.js +97 -0
- package/dist/tsdown/index-types.d.ts +197 -7
- package/dist/tsdown/index.js +3 -3
- package/dist/tsdown/internal-bfoxcI4F.js +3 -0
- package/dist/tsdown/{main-BMtwTklr.js → main-BlTcyuFi.js} +2 -341
- package/dist/tsdown/npm_entry_picomatch.cjs +4 -2
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +5 -1
- package/dist/tsdown/{resolver-DtsKFXi2-DQOmVgSY.js → resolver-DtsKFXi2-B8Z3WwZh.js} +1 -1
- package/dist/tsdown/run.js +4 -3
- package/dist/tsdown/src-CISfE_A0.js +622 -0
- package/dist/tsdown/target-CqeSqtms-FAqYuGyB.js +79 -0
- package/dist/tsdown/{tsc-15OYetCl.js → tsc-CdZE7QwS.js} +3 -3
- package/dist/tsdown/{tsc-context-DfwSQt2q.js → tsc-context-CX_GXdyS.js} +2 -2
- package/dist/tsdown/tsdown-css.js +874 -0
- package/dist/tsdown/tsdown-exe.js +949 -0
- package/dist/vite/client/client.mjs +7 -9
- package/dist/vite/client.d.ts +3 -0
- package/dist/vite/node/chunks/build.js +27 -34
- package/dist/vite/node/chunks/dist.js +23 -23
- package/dist/vite/node/chunks/dist2.js +3 -3
- package/dist/vite/node/chunks/logger.js +4 -4
- package/dist/vite/node/chunks/node.js +12486 -11732
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +3 -3
- package/dist/vite/node/index.d.ts +141 -16
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.js +6 -6
- package/dist/vite/types/importGlob.d.ts +48 -6
- package/package.json +15 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as __commonJSMin, H as __require } from "./logger.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/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.1.1_postcss@8.5.
|
|
18
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/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.1.1_postcss@8.5.
|
|
31
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/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.1.1_postcss@8.5.
|
|
106
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/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) => {
|
|
@@ -117,7 +117,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
117
117
|
};
|
|
118
118
|
}));
|
|
119
119
|
//#endregion
|
|
120
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
120
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/lib/apply-styles.js
|
|
121
121
|
var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
122
122
|
module.exports = function applyStyles(bundle, styles) {
|
|
123
123
|
styles.nodes = [];
|
|
@@ -137,7 +137,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
137
137
|
};
|
|
138
138
|
}));
|
|
139
139
|
//#endregion
|
|
140
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
140
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/lib/data-url.js
|
|
141
141
|
var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
142
142
|
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
|
143
143
|
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
|
@@ -156,7 +156,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
156
156
|
};
|
|
157
157
|
}));
|
|
158
158
|
//#endregion
|
|
159
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
159
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/lib/parse-statements.js
|
|
160
160
|
var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
161
161
|
const valueParser = require_lib();
|
|
162
162
|
const { stringify } = valueParser;
|
|
@@ -281,7 +281,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
281
281
|
}
|
|
282
282
|
}));
|
|
283
283
|
//#endregion
|
|
284
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
284
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/lib/process-content.js
|
|
285
285
|
var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
286
286
|
const path$2 = __require("path");
|
|
287
287
|
let sugarss;
|
|
@@ -315,7 +315,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
315
315
|
}
|
|
316
316
|
}));
|
|
317
317
|
//#endregion
|
|
318
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
318
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/lib/parse-styles.js
|
|
319
319
|
var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
320
320
|
const path$1 = __require("path");
|
|
321
321
|
const dataURL = require_data_url();
|
|
@@ -418,7 +418,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
418
418
|
module.exports = parseStyles;
|
|
419
419
|
}));
|
|
420
420
|
//#endregion
|
|
421
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
421
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.16/node_modules/postcss-import/index.js
|
|
422
422
|
var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
423
423
|
const path = __require("path");
|
|
424
424
|
const applyConditions = require_apply_conditions();
|
package/dist/vite/node/cli.js
CHANGED
|
@@ -703,7 +703,7 @@ const convertBase = (v) => {
|
|
|
703
703
|
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with Rolldown, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
|
704
704
|
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).option("--experimentalBundle", `[boolean] use experimental full bundle mode (this is highly experimental)`).action(async (root, options) => {
|
|
705
705
|
filterDuplicateOptions(options);
|
|
706
|
-
const { createServer } = await import("./chunks/node.js").then((n) => n.
|
|
706
|
+
const { createServer } = await import("./chunks/node.js").then((n) => n.M);
|
|
707
707
|
try {
|
|
708
708
|
const server = await createServer({
|
|
709
709
|
root,
|
|
@@ -760,7 +760,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
|
760
760
|
});
|
|
761
761
|
cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'baseline-widely-available')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--assetsDir <dir>", `[string] directory under outDir to place assets in (default: assets)`).option("--assetsInlineLimit <number>", `[number] static asset base64 inline threshold in bytes (default: 4096)`).option("--ssr [entry]", `[string] build specified entry for server-side rendering`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", "[boolean | \"oxc\" | \"terser\" | \"esbuild\"] enable/disable minification, or specify minifier to use (default: oxc)").option("--manifest [name]", `[boolean | string] emit build manifest json`).option("--ssrManifest [name]", `[boolean | string] emit ssr manifest json`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(async (root, options) => {
|
|
762
762
|
filterDuplicateOptions(options);
|
|
763
|
-
const { createBuilder } = await import("./chunks/node.js").then((n) => n.
|
|
763
|
+
const { createBuilder } = await import("./chunks/node.js").then((n) => n.E);
|
|
764
764
|
const buildOptions = cleanGlobalCLIOptions(cleanBuilderCLIOptions(options));
|
|
765
765
|
try {
|
|
766
766
|
const builder = await createBuilder({
|
|
@@ -786,7 +786,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
|
786
786
|
cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
|
787
787
|
filterDuplicateOptions(options);
|
|
788
788
|
const { resolveConfig } = await import("./chunks/node.js").then((n) => n.f);
|
|
789
|
-
const { optimizeDeps } = await import("./chunks/node.js").then((n) => n.
|
|
789
|
+
const { optimizeDeps } = await import("./chunks/node.js").then((n) => n.k);
|
|
790
790
|
try {
|
|
791
791
|
await optimizeDeps(await resolveConfig({
|
|
792
792
|
root,
|
|
@@ -27,11 +27,11 @@ import * as PostCSS from "postcss";
|
|
|
27
27
|
import { LightningCSSOptions, LightningCSSOptions as lightningcssOptions_LightningCSSOptions } from "#types/internal/lightningcssOptions";
|
|
28
28
|
import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPreprocessorBaseOptions } from "#types/internal/cssPreprocessorOptions";
|
|
29
29
|
import { withFilter } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
30
|
-
import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap } from "#types/importGlob";
|
|
30
|
+
import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
|
|
31
31
|
|
|
32
32
|
//#region \0rolldown/runtime.js
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.3.
|
|
34
|
+
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.3.4_typescript@6.0.2_vite@packages+core/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.3.
|
|
44
|
+
//#region ../../../node_modules/.pnpm/@vitejs+devtools@0.3.4_typescript@6.0.2_vite@packages+core/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;
|
|
@@ -336,7 +336,7 @@ declare namespace Connect {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
|
-
//#region ../../../node_modules/.pnpm/http-proxy-3@1.23.
|
|
339
|
+
//#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
|
|
340
340
|
interface ProxyTargetDetailed {
|
|
341
341
|
host: string;
|
|
342
342
|
port: number;
|
|
@@ -524,7 +524,7 @@ declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage =
|
|
|
524
524
|
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
|
-
//#region ../../../node_modules/.pnpm/http-proxy-3@1.23.
|
|
527
|
+
//#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
|
|
528
528
|
declare function numOpenSockets(): number;
|
|
529
529
|
declare namespace index_d_exports {
|
|
530
530
|
export { ErrorCallback, ProxyServer, ProxyTarget, ProxyTargetUrl, ServerOptions$3 as ServerOptions, createProxyServer as createProxy, createProxyServer, createProxyServer as createServer, ProxyServer as default, numOpenSockets };
|
|
@@ -1157,14 +1157,44 @@ declare class ModuleGraph {
|
|
|
1157
1157
|
type ModuleSetNames = "acceptedHmrDeps" | "importedModules";
|
|
1158
1158
|
//#endregion
|
|
1159
1159
|
//#region src/node/server/hmr.d.ts
|
|
1160
|
+
interface WsOptions {
|
|
1161
|
+
protocol?: string;
|
|
1162
|
+
host?: string;
|
|
1163
|
+
port?: number;
|
|
1164
|
+
clientPort?: number;
|
|
1165
|
+
path?: string;
|
|
1166
|
+
timeout?: number;
|
|
1167
|
+
server?: HttpServer;
|
|
1168
|
+
}
|
|
1160
1169
|
interface HmrOptions {
|
|
1170
|
+
/**
|
|
1171
|
+
* @deprecated Use `server.ws.protocol` instead.
|
|
1172
|
+
*/
|
|
1161
1173
|
protocol?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* @deprecated Use `server.ws.host` instead.
|
|
1176
|
+
*/
|
|
1162
1177
|
host?: string;
|
|
1178
|
+
/**
|
|
1179
|
+
* @deprecated Use `server.ws.port` instead.
|
|
1180
|
+
*/
|
|
1163
1181
|
port?: number;
|
|
1182
|
+
/**
|
|
1183
|
+
* @deprecated Use `server.ws.clientPort` instead.
|
|
1184
|
+
*/
|
|
1164
1185
|
clientPort?: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* @deprecated Use `server.ws.path` instead.
|
|
1188
|
+
*/
|
|
1165
1189
|
path?: string;
|
|
1190
|
+
/**
|
|
1191
|
+
* @deprecated Use `server.ws.timeout` instead.
|
|
1192
|
+
*/
|
|
1166
1193
|
timeout?: number;
|
|
1167
1194
|
overlay?: boolean;
|
|
1195
|
+
/**
|
|
1196
|
+
* @deprecated Use `server.ws.server` instead.
|
|
1197
|
+
*/
|
|
1168
1198
|
server?: HttpServer;
|
|
1169
1199
|
}
|
|
1170
1200
|
interface HotUpdateOptions {
|
|
@@ -1576,6 +1606,46 @@ interface WebSocketClient extends NormalizedHotChannelClient {
|
|
|
1576
1606
|
socket: WebSocket;
|
|
1577
1607
|
}
|
|
1578
1608
|
//#endregion
|
|
1609
|
+
//#region src/node/server/bundledDev.d.ts
|
|
1610
|
+
type MemoryFile = {
|
|
1611
|
+
source: string | Uint8Array;
|
|
1612
|
+
etag?: string;
|
|
1613
|
+
};
|
|
1614
|
+
declare class MemoryFiles {
|
|
1615
|
+
private files;
|
|
1616
|
+
get size(): number;
|
|
1617
|
+
get(file: string): MemoryFile | undefined;
|
|
1618
|
+
set(file: string, content: MemoryFile | (() => MemoryFile)): void;
|
|
1619
|
+
has(file: string): boolean;
|
|
1620
|
+
clear(): void;
|
|
1621
|
+
}
|
|
1622
|
+
declare class BundledDev {
|
|
1623
|
+
private environment;
|
|
1624
|
+
private _devEngine;
|
|
1625
|
+
private initialBuildCompleted;
|
|
1626
|
+
private clients;
|
|
1627
|
+
private invalidateCalledModules;
|
|
1628
|
+
private debouncedFullReload;
|
|
1629
|
+
private fullReloadPending;
|
|
1630
|
+
private lastBuildError;
|
|
1631
|
+
memoryFiles: MemoryFiles;
|
|
1632
|
+
constructor(environment: DevEnvironment);
|
|
1633
|
+
private get devEngine();
|
|
1634
|
+
listen(): Promise<void>;
|
|
1635
|
+
private waitForInitialBuildFinish;
|
|
1636
|
+
invalidateModule(m: {
|
|
1637
|
+
path: string;
|
|
1638
|
+
message?: string;
|
|
1639
|
+
firstInvalidatedBy: string;
|
|
1640
|
+
}, client: NormalizedHotChannelClient): Promise<void>;
|
|
1641
|
+
triggerBundleRegenerationIfStale(): Promise<boolean>;
|
|
1642
|
+
triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<string | undefined>;
|
|
1643
|
+
close(): Promise<void>;
|
|
1644
|
+
private storeOutputFiles;
|
|
1645
|
+
private getRolldownOptions;
|
|
1646
|
+
private handleHmrOutput;
|
|
1647
|
+
}
|
|
1648
|
+
//#endregion
|
|
1579
1649
|
//#region src/node/server/environment.d.ts
|
|
1580
1650
|
interface DevEnvironmentContext {
|
|
1581
1651
|
hot: boolean;
|
|
@@ -1599,6 +1669,7 @@ declare class DevEnvironment extends BaseEnvironment {
|
|
|
1599
1669
|
* environment.hot.send({ type: 'full-reload' })
|
|
1600
1670
|
*/
|
|
1601
1671
|
hot: NormalizedHotChannel;
|
|
1672
|
+
bundledDev?: BundledDev;
|
|
1602
1673
|
constructor(name: string, config: ResolvedConfig, context: DevEnvironmentContext);
|
|
1603
1674
|
init(options?: {
|
|
1604
1675
|
watcher?: FSWatcher;
|
|
@@ -2086,13 +2157,19 @@ interface BuildEnvironmentOptions {
|
|
|
2086
2157
|
*/
|
|
2087
2158
|
terserOptions?: TerserOptions;
|
|
2088
2159
|
/**
|
|
2160
|
+
* Whether to use import maps feature to optimize chunk caching efficiency.
|
|
2161
|
+
* @default false
|
|
2162
|
+
* @experimental
|
|
2163
|
+
*/
|
|
2164
|
+
chunkImportMap?: boolean;
|
|
2165
|
+
/**
|
|
2089
2166
|
* Alias to `rolldownOptions`
|
|
2090
2167
|
* @deprecated Use `rolldownOptions` instead.
|
|
2091
2168
|
*/
|
|
2092
2169
|
rollupOptions?: RolldownOptions;
|
|
2093
2170
|
/**
|
|
2094
2171
|
* Will be merged with internal rolldown options.
|
|
2095
|
-
* https://rolldown.rs/reference/
|
|
2172
|
+
* https://rolldown.rs/reference/Interface.RolldownOptions
|
|
2096
2173
|
*/
|
|
2097
2174
|
rolldownOptions?: RolldownOptions;
|
|
2098
2175
|
/**
|
|
@@ -2154,7 +2231,7 @@ interface BuildEnvironmentOptions {
|
|
|
2154
2231
|
lib?: LibraryOptions | false;
|
|
2155
2232
|
/**
|
|
2156
2233
|
* Produce SSR oriented build. Note this requires specifying SSR entry via
|
|
2157
|
-
* `
|
|
2234
|
+
* `rolldownOptions.input`.
|
|
2158
2235
|
* @default false
|
|
2159
2236
|
*/
|
|
2160
2237
|
ssr?: boolean | string;
|
|
@@ -2327,7 +2404,7 @@ type SkipInformation = {
|
|
|
2327
2404
|
};
|
|
2328
2405
|
declare class EnvironmentPluginContainer<Env extends Environment = Environment> {
|
|
2329
2406
|
private _pluginContextMap;
|
|
2330
|
-
private
|
|
2407
|
+
private _resolvedRolldownOptions?;
|
|
2331
2408
|
private _processesing;
|
|
2332
2409
|
private _seenResolves;
|
|
2333
2410
|
private _moduleNodeToLoadAddedImports;
|
|
@@ -2344,7 +2421,7 @@ declare class EnvironmentPluginContainer<Env extends Environment = Environment>
|
|
|
2344
2421
|
getModuleInfo(id: string): ModuleInfo | null;
|
|
2345
2422
|
private handleHookPromise;
|
|
2346
2423
|
get options(): InputOptions;
|
|
2347
|
-
|
|
2424
|
+
resolveRolldownOptions(): Promise<InputOptions>;
|
|
2348
2425
|
private _getPluginContext;
|
|
2349
2426
|
private hookParallel;
|
|
2350
2427
|
buildStart(_options?: InputOptions): Promise<void>;
|
|
@@ -2440,10 +2517,10 @@ interface ServerOptions$1 extends CommonServerOptions {
|
|
|
2440
2517
|
*/
|
|
2441
2518
|
hmr?: HmrOptions | boolean;
|
|
2442
2519
|
/**
|
|
2443
|
-
*
|
|
2444
|
-
*
|
|
2520
|
+
* Configure WebSocket connection options.
|
|
2521
|
+
* Set to `false` to disable the WebSocket server and connection.
|
|
2445
2522
|
*/
|
|
2446
|
-
ws?: false;
|
|
2523
|
+
ws?: WsOptions | false;
|
|
2447
2524
|
/**
|
|
2448
2525
|
* Warm-up files to transform and cache the results in advance. This improves the
|
|
2449
2526
|
* initial page load during server starts and prevents transform waterfalls.
|
|
@@ -2548,7 +2625,7 @@ interface FileSystemServeOptions {
|
|
|
2548
2625
|
* This will have higher priority than `allow`.
|
|
2549
2626
|
* picomatch patterns are supported.
|
|
2550
2627
|
*
|
|
2551
|
-
* @default ['.env', '.env.*', '*.{crt,pem}', '**\/.git/**']
|
|
2628
|
+
* @default ['.env', '.env.*', '*.{crt,pem,key,p12,pfx,cer,der}', '.npmrc', '.yarnrc.yml', '**\/.git/**']
|
|
2552
2629
|
*/
|
|
2553
2630
|
deny?: string[];
|
|
2554
2631
|
}
|
|
@@ -3128,6 +3205,33 @@ interface JsonOptions {
|
|
|
3128
3205
|
stringify?: boolean | "auto";
|
|
3129
3206
|
}
|
|
3130
3207
|
//#endregion
|
|
3208
|
+
//#region src/node/assetSource.d.ts
|
|
3209
|
+
/**
|
|
3210
|
+
* Defines which attributes of an HTML element should be treated as asset sources.
|
|
3211
|
+
* Used in `html.additionalAssetSources` configuration.
|
|
3212
|
+
*/
|
|
3213
|
+
interface HtmlAssetSource {
|
|
3214
|
+
/**
|
|
3215
|
+
* Attributes that contain a single asset URL.
|
|
3216
|
+
* @example ['src', 'data-src-dark']
|
|
3217
|
+
*/
|
|
3218
|
+
srcAttributes?: string[];
|
|
3219
|
+
/**
|
|
3220
|
+
* Attributes that contain srcset-format URLs.
|
|
3221
|
+
* @example ['srcset', 'imagesrcset']
|
|
3222
|
+
*/
|
|
3223
|
+
srcsetAttributes?: string[];
|
|
3224
|
+
/**
|
|
3225
|
+
* Called before handling an attribute to determine if it should be processed.
|
|
3226
|
+
*/
|
|
3227
|
+
filter?: (data: HtmlAssetSourceFilterData) => boolean;
|
|
3228
|
+
}
|
|
3229
|
+
interface HtmlAssetSourceFilterData {
|
|
3230
|
+
key: string;
|
|
3231
|
+
value: string;
|
|
3232
|
+
attributes: Record<string, string>;
|
|
3233
|
+
}
|
|
3234
|
+
//#endregion
|
|
3131
3235
|
//#region src/node/ssr/index.d.ts
|
|
3132
3236
|
type SSRTarget = "node" | "webworker";
|
|
3133
3237
|
type SsrDepOptimizationConfig = DepOptimizationConfig;
|
|
@@ -3518,6 +3622,23 @@ interface HTMLOptions {
|
|
|
3518
3622
|
* Make sure that this placeholder will be replaced with a unique value for each request by the server.
|
|
3519
3623
|
*/
|
|
3520
3624
|
cspNonce?: string;
|
|
3625
|
+
/**
|
|
3626
|
+
* Define additional HTML elements and attributes to be treated as asset sources.
|
|
3627
|
+
* This extends the built-in list that includes standard elements like `<img src>`, `<video src>`, etc.
|
|
3628
|
+
*
|
|
3629
|
+
* @example
|
|
3630
|
+
* ```ts
|
|
3631
|
+
* html: {
|
|
3632
|
+
* additionalAssetSources: {
|
|
3633
|
+
* // Custom web component
|
|
3634
|
+
* 'html-import': { srcAttributes: ['src'] },
|
|
3635
|
+
* // Add data-* attributes to existing element
|
|
3636
|
+
* 'img': { srcAttributes: ['data-src-dark', 'data-src-light'] }
|
|
3637
|
+
* }
|
|
3638
|
+
* }
|
|
3639
|
+
* ```
|
|
3640
|
+
*/
|
|
3641
|
+
additionalAssetSources?: Record<string, HtmlAssetSource>;
|
|
3521
3642
|
}
|
|
3522
3643
|
interface FutureOptions {
|
|
3523
3644
|
removePluginHookHandleHotUpdate?: "warn";
|
|
@@ -3824,6 +3945,10 @@ declare function isFileServingAllowed(url: string, server: ViteDevServer): boole
|
|
|
3824
3945
|
declare function isFileLoadingAllowed(config: ResolvedConfig, filePath: string): boolean;
|
|
3825
3946
|
//#endregion
|
|
3826
3947
|
//#region src/node/env.d.ts
|
|
3948
|
+
/**
|
|
3949
|
+
* Load `.env` files within the `envDir` and merge them with the matching
|
|
3950
|
+
* variables already present in `process.env`.
|
|
3951
|
+
*/
|
|
3827
3952
|
declare function loadEnv(mode: string, envDir: string | false, prefixes?: string | string[]): Record<string, string>;
|
|
3828
3953
|
declare function resolveEnvPrefix({
|
|
3829
3954
|
envPrefix
|
|
@@ -3877,10 +4002,10 @@ interface ManifestChunk {
|
|
|
3877
4002
|
}
|
|
3878
4003
|
//#endregion
|
|
3879
4004
|
//#region src/node/index.d.ts
|
|
3880
|
-
/** @deprecated - use `
|
|
4005
|
+
/** @deprecated - use `parseSync` instead */
|
|
3881
4006
|
declare const parseAst: typeof parseAst$1;
|
|
3882
|
-
/** @deprecated - use `
|
|
4007
|
+
/** @deprecated - use `parse` instead */
|
|
3883
4008
|
declare const parseAstAsync: typeof parseAstAsync$1;
|
|
3884
4009
|
declare const esbuildVersion = "0.25.0";
|
|
3885
4010
|
//#endregion
|
|
3886
|
-
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, 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 };
|
|
4011
|
+
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type ChunkMetadata, type CommonServerOptions, type ConfigEnv, type ConfigPluginContext, type Connect, type ConnectedPayload, type CorsOptions, type CorsOrigin, type CustomEventMap, type CustomPayload, type CustomPluginOptionsVite, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESTree, type Environment, type EnvironmentModuleGraph, type EnvironmentModuleNode, type EnvironmentOptions, type ErrorPayload, type EsbuildTransformOptions, type ExperimentalOptions, type ExportsData, type FSWatcher, type FetchFunction, type FetchModuleOptions, type FetchResult, type FetchableDevEnvironment, type FetchableDevEnvironmentContext, type FileSystemServeOptions, type FilterPattern, type FullReloadPayload, type GeneralImportGlobOptions, type HMRPayload, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotPayload, type HotUpdateOptions, type HtmlAssetSource, type HtmlTagDescriptor, type index_d_exports as HttpProxy, type HttpServer, type ImportGlobFunction, type ImportGlobOptions, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InferCustomEventPayload, type InlineConfig, type InternalResolveOptions, type InvalidatePayload, type JsonOptions, type KnownAsTypeMap, type KnownQueryTypeMap, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, type MinifyOptions, type MinifyResult, type MinimalPluginContextWithoutEnvironment, type ModuleGraph, type ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type NormalizedHotChannel, type NormalizedHotChannelClient, type NormalizedServerHotChannel, type OptimizedDepInfo, type OxcOptions, type ParseResult, type ParserOptions, type Plugin, type PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type PrunePayload, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type Rolldown, type Rollup, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions$1 as ServerOptions, type SkipInformation, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, type Terser, type TerserOptions, type TransformOptions, type TransformResult, type Update, type UpdatePayload, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, Visitor, type VisitorObject, type ViteBuilder, type ViteDevServer, type WatchOptions, type WebSocket, type WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, type WebSocketServer, type WsOptions, 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 };
|
package/dist/vite/node/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { I as defaultAllowedOrigins, N as VERSION, _ as DEFAULT_SERVER_CONDITIONS, d as DEFAULT_CLIENT_MAIN_FIELDS, h as DEFAULT_EXTERNAL_CONDITIONS, n as createLogger, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS } from "./chunks/logger.js";
|
|
2
|
-
import { $ as mergeConfig, B as
|
|
2
|
+
import { $ as mergeConfig, A as createServerHotChannel, B as send, C as fetchModule, D as createBuilder, F as searchForWorkspaceRoot, G as loadEnv, H as createServerModuleRunner, I as createIdResolver, J as transformWithEsbuild, K as resolveEnvPrefix, L as perEnvironmentState, N as formatPostcssSourceMap, O as optimizeDeps, P as preprocessCSS, Q as mergeAlias, R as isFileLoadingAllowed, S as DevEnvironment, T as build, U as createServerModuleRunnerTransport, V as ssrTransform, W as buildErrorMessage, X as createFilter, Y as perEnvironmentPlugin, Z as isCSSRequest, _ as runnerImport, a as minifySync, b as createRunnableDevEnvironment, c as parseAstAsync, d as isFetchableDevEnvironment, et as normalizePath, g as sortUserPlugins, h as resolveConfig, i as minify, j as createServer, l as parseSync, m as loadConfigFromFile, n as esbuildVersion, nt as rollupVersion, o as parse, p as defineConfig, q as transformWithOxc, r as esmExternalRequirePlugin, rt as withFilter, s as parseAst, t as Visitor, tt as rolldownVersion, u as createFetchableDevEnvironment, v as preview, w as BuildEnvironment, x as isRunnableDevEnvironment, z as isFileServingAllowed } from "./chunks/node.js";
|
|
3
3
|
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 };
|
|
@@ -102,7 +102,7 @@ function toWindowsPath(path) {
|
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
105
|
-
var comma = 44, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
|
|
105
|
+
var comma = 44, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = /* @__PURE__ */ new Uint8Array(64), charToInt = /* @__PURE__ */ new Uint8Array(128);
|
|
106
106
|
for (let i = 0; i < chars.length; i++) {
|
|
107
107
|
let c = chars.charCodeAt(i);
|
|
108
108
|
intToChar[i] = c, charToInt[c] = i;
|
|
@@ -340,7 +340,7 @@ var EvaluatedModuleNode = class {
|
|
|
340
340
|
this.idToModuleMap.clear(), this.fileToModulesMap.clear(), this.urlToIdModuleMap.clear();
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
|
-
const prefixedBuiltins = new Set([
|
|
343
|
+
const prefixedBuiltins = /* @__PURE__ */ new Set([
|
|
344
344
|
"node:sea",
|
|
345
345
|
"node:sqlite",
|
|
346
346
|
"node:test",
|
|
@@ -534,10 +534,10 @@ const {${missingBindings.join(", ")}} = pkg;
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
//#endregion
|
|
537
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
|
537
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js
|
|
538
538
|
let nanoid = (size = 21) => {
|
|
539
539
|
let id = "", i = size | 0;
|
|
540
|
-
for (; i
|
|
540
|
+
for (; i-- > 0;) id += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random() * 64 | 0];
|
|
541
541
|
return id;
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
|
@@ -1001,9 +1001,9 @@ function enableSourceMapSupport(runner) {
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
//#region ../../vite/packages/vite/src/module-runner/esmEvaluator.ts
|
|
1003
1003
|
var ESModulesEvaluator = class {
|
|
1004
|
-
startOffset = getAsyncFunctionDeclarationPaddingLineCount();
|
|
1004
|
+
startOffset = getAsyncFunctionDeclarationPaddingLineCount() + 1;
|
|
1005
1005
|
async runInlinedModule(context, code) {
|
|
1006
|
-
await new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, "\"use strict\"
|
|
1006
|
+
await new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, "\"use strict\";\n" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);
|
|
1007
1007
|
}
|
|
1008
1008
|
runExternalModule(filepath) {
|
|
1009
1009
|
return import(filepath);
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
// make input suggestions work
|
|
2
|
+
type StringQueryType = `?${keyof KnownAsTypeMap}` | (string & {})
|
|
3
|
+
type BaseQueryType = StringQueryType | Record<string, string | number | boolean>
|
|
4
|
+
|
|
1
5
|
export interface ImportGlobOptions<
|
|
2
6
|
Eager extends boolean,
|
|
3
7
|
AsType extends string,
|
|
8
|
+
QueryType extends BaseQueryType,
|
|
4
9
|
> {
|
|
5
10
|
/**
|
|
6
11
|
* Import type for the import url.
|
|
@@ -21,7 +26,7 @@ export interface ImportGlobOptions<
|
|
|
21
26
|
/**
|
|
22
27
|
* Custom queries
|
|
23
28
|
*/
|
|
24
|
-
query?:
|
|
29
|
+
query?: QueryType
|
|
25
30
|
/**
|
|
26
31
|
* Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance.
|
|
27
32
|
*
|
|
@@ -32,9 +37,24 @@ export interface ImportGlobOptions<
|
|
|
32
37
|
* Base path to resolve relative paths.
|
|
33
38
|
*/
|
|
34
39
|
base?: string
|
|
40
|
+
/**
|
|
41
|
+
* Whether the glob pattern matching should be case-sensitive. Defaults to `true`.
|
|
42
|
+
*/
|
|
43
|
+
caseSensitive?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ImportGlobOptionsWithoutAs<
|
|
47
|
+
Eager extends boolean,
|
|
48
|
+
QueryType extends BaseQueryType,
|
|
49
|
+
> = Omit<ImportGlobOptions<Eager, string, QueryType>, 'as'> & {
|
|
50
|
+
as?: never
|
|
35
51
|
}
|
|
36
52
|
|
|
37
|
-
export type GeneralImportGlobOptions = ImportGlobOptions<
|
|
53
|
+
export type GeneralImportGlobOptions = ImportGlobOptions<
|
|
54
|
+
boolean,
|
|
55
|
+
string,
|
|
56
|
+
BaseQueryType
|
|
57
|
+
>
|
|
38
58
|
|
|
39
59
|
/**
|
|
40
60
|
* Declare Worker in case DOM is not added to the tsconfig lib causing
|
|
@@ -52,11 +72,33 @@ export interface KnownAsTypeMap {
|
|
|
52
72
|
worker: Worker
|
|
53
73
|
}
|
|
54
74
|
|
|
75
|
+
export type KnownQueryTypeMap = {
|
|
76
|
+
[K in keyof KnownAsTypeMap as `?${K}`]: KnownAsTypeMap[K]
|
|
77
|
+
}
|
|
78
|
+
|
|
55
79
|
export interface ImportGlobFunction {
|
|
56
80
|
/**
|
|
57
81
|
* Import a list of files with a glob pattern.
|
|
58
82
|
*
|
|
59
|
-
* Overload
|
|
83
|
+
* Overload 1A: No generic provided, infer the type from `eager` and `query`
|
|
84
|
+
*/
|
|
85
|
+
<
|
|
86
|
+
Eager extends boolean,
|
|
87
|
+
Query extends BaseQueryType,
|
|
88
|
+
T = Query extends keyof KnownQueryTypeMap
|
|
89
|
+
? KnownQueryTypeMap[Query]
|
|
90
|
+
: unknown,
|
|
91
|
+
>(
|
|
92
|
+
glob: string | string[],
|
|
93
|
+
options?: ImportGlobOptionsWithoutAs<Eager, Query>,
|
|
94
|
+
): (Eager extends true ? true : false) extends true
|
|
95
|
+
? Record<string, T>
|
|
96
|
+
: Record<string, () => Promise<T>>
|
|
97
|
+
/**
|
|
98
|
+
* Import a list of files with a glob pattern.
|
|
99
|
+
*
|
|
100
|
+
* Overload 1B: No generic provided, infer the type from `eager` and `as`
|
|
101
|
+
* (deprecated, use `query` instead)
|
|
60
102
|
*/
|
|
61
103
|
<
|
|
62
104
|
Eager extends boolean,
|
|
@@ -64,7 +106,7 @@ export interface ImportGlobFunction {
|
|
|
64
106
|
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
|
|
65
107
|
>(
|
|
66
108
|
glob: string | string[],
|
|
67
|
-
options?: ImportGlobOptions<Eager, As>,
|
|
109
|
+
options?: ImportGlobOptions<Eager, As, BaseQueryType>,
|
|
68
110
|
): (Eager extends true ? true : false) extends true
|
|
69
111
|
? Record<string, T>
|
|
70
112
|
: Record<string, () => Promise<T>>
|
|
@@ -75,7 +117,7 @@ export interface ImportGlobFunction {
|
|
|
75
117
|
*/
|
|
76
118
|
<M>(
|
|
77
119
|
glob: string | string[],
|
|
78
|
-
options?: ImportGlobOptions<false, string>,
|
|
120
|
+
options?: ImportGlobOptions<false, string, BaseQueryType>,
|
|
79
121
|
): Record<string, () => Promise<M>>
|
|
80
122
|
/**
|
|
81
123
|
* Import a list of files with a glob pattern.
|
|
@@ -84,6 +126,6 @@ export interface ImportGlobFunction {
|
|
|
84
126
|
*/
|
|
85
127
|
<M>(
|
|
86
128
|
glob: string | string[],
|
|
87
|
-
options: ImportGlobOptions<true, string>,
|
|
129
|
+
options: ImportGlobOptions<true, string, BaseQueryType>,
|
|
88
130
|
): Record<string, M>
|
|
89
131
|
}
|