vite 8.2.1 → 8.2.2

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.
@@ -1,6 +1,6 @@
1
1
  import { ft as __commonJSMin, pt as __require } from "./node.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/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.25/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/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.25/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/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,21 +103,18 @@ 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.25/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/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) => {
110
110
  if (index === 0) return;
111
- if (stmt.parent) {
112
- const { before } = stmt.parent.node.raws;
113
- if (stmt.type === "nodes") stmt.nodes[0].raws.before = before;
114
- else stmt.node.raws.before = before;
115
- } else if (stmt.type === "nodes") stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n";
111
+ if (stmt.type === "nodes") delete stmt.nodes[0].raws.before;
112
+ else if (stmt.parent) delete stmt.node.raws.before;
116
113
  });
117
114
  };
118
115
  }));
119
116
  //#endregion
120
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-styles.js
117
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-styles.js
121
118
  var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
119
  module.exports = function applyStyles(bundle, styles) {
123
120
  styles.nodes = [];
@@ -137,7 +134,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
137
134
  };
138
135
  }));
139
136
  //#endregion
140
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/data-url.js
137
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/data-url.js
141
138
  var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
142
139
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
143
140
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
@@ -156,7 +153,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
156
153
  };
157
154
  }));
158
155
  //#endregion
159
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-statements.js
156
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-statements.js
160
157
  var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
161
158
  const valueParser = require_lib();
162
159
  const { stringify } = valueParser;
@@ -215,7 +212,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
215
212
  prev = prev.prev();
216
213
  continue;
217
214
  }
218
- return result.warn("@import must precede all other statements (besides @charset or empty @layer)", { node: atRule });
215
+ return result.warn("@import statements must precede all other statements (besides @charset or empty @layer) and be consecutive", { node: atRule });
219
216
  } while (prev);
220
217
  if (atRule.nodes) return result.warn("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.", { node: atRule });
221
218
  const params = valueParser(atRule.params).nodes;
@@ -281,7 +278,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
281
278
  }
282
279
  }));
283
280
  //#endregion
284
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/process-content.js
281
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/process-content.js
285
282
  var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
286
283
  const path$2 = __require("path");
287
284
  let sugarss;
@@ -315,7 +312,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
315
312
  }
316
313
  }));
317
314
  //#endregion
318
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-styles.js
315
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-styles.js
319
316
  var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
320
317
  const path$1 = __require("path");
321
318
  const dataURL = require_data_url();
@@ -341,15 +338,16 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
341
338
  }
342
339
  statements.forEach((stmt) => {
343
340
  if (stmt.type === "charset") handleCharset(stmt);
344
- else if (stmt.type === "import") if (stmt.children) stmt.children.forEach((child, index) => {
345
- if (child.type === "import") beforeBundle.push(child);
346
- else if (child.type === "layer") beforeBundle.push(child);
347
- else if (child.type === "charset") handleCharset(child);
348
- else bundle.push(child);
349
- if (index === 0) child.parent = stmt;
350
- });
351
- else beforeBundle.push(stmt);
352
- else if (stmt.type === "layer") beforeBundle.push(stmt);
341
+ else if (stmt.type === "import") {
342
+ if (stmt.children) stmt.children.forEach((child, index) => {
343
+ if (child.type === "import") beforeBundle.push(child);
344
+ else if (child.type === "layer") beforeBundle.push(child);
345
+ else if (child.type === "charset") handleCharset(child);
346
+ else bundle.push(child);
347
+ if (index === 0) child.parent = stmt;
348
+ });
349
+ else beforeBundle.push(stmt);
350
+ } else if (stmt.type === "layer") beforeBundle.push(stmt);
353
351
  else if (stmt.type === "nodes") bundle.push(stmt);
354
352
  });
355
353
  return charset ? [charset, ...beforeBundle.concat(bundle)] : beforeBundle.concat(bundle);
@@ -418,7 +416,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
418
416
  module.exports = parseStyles;
419
417
  }));
420
418
  //#endregion
421
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/index.js
419
+ //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/index.js
422
420
  var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
423
421
  const path = __require("path");
424
422
  const applyConditions = require_apply_conditions();
@@ -30,7 +30,7 @@ import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPre
30
30
  import { withFilter } from "rolldown/filter";
31
31
  import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
32
32
  //#endregion
33
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.12_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
34
34
  //#region src/node/cli-commands.d.ts
35
35
  interface StartOptions {
36
36
  root?: string;
@@ -40,7 +40,7 @@ interface StartOptions {
40
40
  open?: boolean;
41
41
  }
42
42
  //#endregion
43
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
43
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.12_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
44
44
  //#region src/node/config.d.ts
45
45
  interface DevToolsConfig extends Partial<StartOptions> {
46
46
  enabled: boolean;
@@ -602,7 +602,7 @@ interface LoggerOptions {
602
602
  customLogger?: Logger;
603
603
  console?: Console;
604
604
  }
605
- declare function createLogger(level?: LogLevel, options?: LoggerOptions): Logger;
605
+ export declare function createLogger(level?: LogLevel, options?: LoggerOptions): Logger;
606
606
  //#endregion
607
607
  //#region src/node/http.d.ts
608
608
  interface CommonServerOptions {
@@ -762,7 +762,7 @@ type PreviewServerHook = (this: MinimalPluginContextWithoutEnvironment, server:
762
762
  /**
763
763
  * Starts the Vite server in preview mode, to simulate a production deployment
764
764
  */
765
- declare function preview(inlineConfig?: InlineConfig): Promise<PreviewServer>;
765
+ export declare function preview(inlineConfig?: InlineConfig): Promise<PreviewServer>;
766
766
  //#endregion
767
767
  //#region src/node/shortcuts.d.ts
768
768
  type BindCLIShortcutsOptions<Server = ViteDevServer | PreviewServer> = {
@@ -1013,7 +1013,7 @@ interface DepOptimizationMetadata {
1013
1013
  *
1014
1014
  * @deprecated the optimization process runs automatically and does not need to be called
1015
1015
  */
1016
- declare function optimizeDeps(config: ResolvedConfig, force?: boolean | undefined, asCommand?: boolean): Promise<DepOptimizationMetadata>;
1016
+ export declare function optimizeDeps(config: ResolvedConfig, force?: boolean | undefined, asCommand?: boolean): Promise<DepOptimizationMetadata>;
1017
1017
  //#endregion
1018
1018
  //#region src/node/server/transformRequest.d.ts
1019
1019
  interface TransformResult {
@@ -1306,7 +1306,7 @@ type ServerHotChannelApi = {
1306
1306
  };
1307
1307
  type ServerHotChannel = HotChannel<ServerHotChannelApi>;
1308
1308
  type NormalizedServerHotChannel = NormalizedHotChannel<ServerHotChannelApi>;
1309
- declare function createServerHotChannel(): ServerHotChannel;
1309
+ export declare function createServerHotChannel(): ServerHotChannel;
1310
1310
  //#endregion
1311
1311
  //#region src/types/ws.d.ts
1312
1312
  // WebSocket socket.
@@ -1682,7 +1682,7 @@ interface DevEnvironmentContext {
1682
1682
  };
1683
1683
  depsOptimizer?: DepsOptimizer;
1684
1684
  }
1685
- declare class DevEnvironment extends BaseEnvironment {
1685
+ export declare class DevEnvironment extends BaseEnvironment {
1686
1686
  mode: "dev";
1687
1687
  moduleGraph: EnvironmentModuleGraph;
1688
1688
  depsOptimizer?: DepsOptimizer;
@@ -2150,6 +2150,9 @@ interface BuildEnvironmentOptions {
2150
2150
  * a niche browser that comes with most modern JavaScript features
2151
2151
  * but has poor CSS support, e.g. Android WeChat WebView, which
2152
2152
  * doesn't support the #RGBA syntax.
2153
+ * When `build.cssMinify` is `lightningcss` (the default), this
2154
+ * option takes precedence over `css.lightningcss.targets` for the
2155
+ * minification step.
2153
2156
  * @default target
2154
2157
  */
2155
2158
  cssTarget?: EsbuildTarget | false;
@@ -2362,7 +2365,7 @@ interface ResolvedBuildOptions extends Required<Omit<BuildOptions, "polyfillModu
2362
2365
  * Bundles a single environment for production.
2363
2366
  * Returns a Promise containing the build result.
2364
2367
  */
2365
- declare function build(inlineConfig?: InlineConfig): Promise<RolldownOutput | RolldownOutput[] | RolldownWatcher>;
2368
+ export declare function build(inlineConfig?: InlineConfig): Promise<RolldownOutput | RolldownOutput[] | RolldownWatcher>;
2366
2369
  type RenderBuiltAssetUrl = (filename: string, type: {
2367
2370
  type: "asset" | "public";
2368
2371
  hostId: string;
@@ -2372,7 +2375,7 @@ type RenderBuiltAssetUrl = (filename: string, type: {
2372
2375
  relative?: boolean;
2373
2376
  runtime?: string;
2374
2377
  } | undefined;
2375
- declare class BuildEnvironment extends BaseEnvironment {
2378
+ export declare class BuildEnvironment extends BaseEnvironment {
2376
2379
  mode: "build";
2377
2380
  isBuilt: boolean;
2378
2381
  constructor(name: string, config: ResolvedConfig, setup?: {
@@ -2409,7 +2412,7 @@ type ResolvedBuilderOptions = Required<BuilderOptions>;
2409
2412
  * Creates a ViteBuilder to orchestrate building multiple environments.
2410
2413
  * @experimental
2411
2414
  */
2412
- declare function createBuilder(inlineConfig?: InlineConfig, useLegacyBuilder?: null | boolean): Promise<ViteBuilder>;
2415
+ export declare function createBuilder(inlineConfig?: InlineConfig, useLegacyBuilder?: null | boolean): Promise<ViteBuilder>;
2413
2416
  type BuildAppHook = (this: MinimalPluginContextWithoutEnvironment, builder: ViteBuilder) => Promise<void>;
2414
2417
  //#endregion
2415
2418
  //#region src/node/environment.d.ts
@@ -2421,7 +2424,7 @@ type Environment = DevEnvironment | BuildEnvironment | ScanEnvironment | Unknown
2421
2424
  *
2422
2425
  * @experimental
2423
2426
  */
2424
- declare function perEnvironmentState<State>(initial: (environment: Environment) => State): (context: PluginContext) => State;
2427
+ export declare function perEnvironmentState<State>(initial: (environment: Environment) => State): (context: PluginContext) => State;
2425
2428
  //#endregion
2426
2429
  //#region src/node/server/pluginContainer.d.ts
2427
2430
  type SkipInformation = {
@@ -2789,7 +2792,7 @@ interface ResolvedServerUrls {
2789
2792
  */
2790
2793
  networkInterfaceNames?: (string | undefined)[];
2791
2794
  }
2792
- declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Promise<ViteDevServer>;
2795
+ export declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Promise<ViteDevServer>;
2793
2796
  //#endregion
2794
2797
  //#region src/node/plugins/html.d.ts
2795
2798
  interface HtmlTagDescriptor {
@@ -3102,7 +3105,7 @@ type PluginOption = Thenable<Plugin | {
3102
3105
  /**
3103
3106
  * @experimental
3104
3107
  */
3105
- declare function perEnvironmentPlugin(name: string, applyToEnvironment: (environment: PartialEnvironment) => boolean | Promise<boolean> | PluginOption): Plugin;
3108
+ export declare function perEnvironmentPlugin(name: string, applyToEnvironment: (environment: PartialEnvironment) => boolean | Promise<boolean> | PluginOption): Plugin;
3106
3109
  //#endregion
3107
3110
  //#region src/node/idResolver.d.ts
3108
3111
  type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: string, aliasOnly?: boolean) => Promise<string | undefined>;
@@ -3110,9 +3113,9 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
3110
3113
  * Create an internal resolver to be used in special scenarios, e.g.
3111
3114
  * optimizer and handling css @imports
3112
3115
  */
3113
- declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3116
+ export declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3114
3117
  //#endregion
3115
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3118
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
3116
3119
  type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
3117
3120
  interface Config {
3118
3121
  parser?: string | ProcessOptions['parser'] | false;
@@ -3197,8 +3200,8 @@ interface PreprocessCSSResult {
3197
3200
  /**
3198
3201
  * @experimental
3199
3202
  */
3200
- declare function preprocessCSS(code: string, filename: string, config: ResolvedConfig): Promise<PreprocessCSSResult>;
3201
- declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
3203
+ export declare function preprocessCSS(code: string, filename: string, config: ResolvedConfig): Promise<PreprocessCSSResult>;
3204
+ export declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
3202
3205
  type PreprocessorAdditionalDataResult = string | {
3203
3206
  content: string;
3204
3207
  map?: ExistingRawSourceMap;
@@ -3227,7 +3230,7 @@ interface ESBuildOptions extends esbuildOptions_EsbuildTransformOptions {
3227
3230
  type ESBuildTransformResult = Omit<EsbuildTransformResult, "map"> & {
3228
3231
  map: SourceMap;
3229
3232
  };
3230
- declare function transformWithEsbuild(code: string, filename: string, options?: esbuildOptions_EsbuildTransformOptions, inMap?: object, config?: ResolvedConfig, watcher?: FSWatcher, ignoreEsbuildWarning?: boolean): Promise<ESBuildTransformResult>;
3233
+ export declare function transformWithEsbuild(code: string, filename: string, options?: esbuildOptions_EsbuildTransformOptions, inMap?: object, config?: ResolvedConfig, watcher?: FSWatcher, ignoreEsbuildWarning?: boolean): Promise<ESBuildTransformResult>;
3231
3234
  //#endregion
3232
3235
  //#region src/node/plugins/json.d.ts
3233
3236
  interface JsonOptions {
@@ -3325,7 +3328,7 @@ interface OxcOptions extends Omit<rolldown_utils_TransformOptions, "cwd" | "sour
3325
3328
  jsxRefreshInclude?: string | RegExp | ReadonlyArray<string | RegExp>;
3326
3329
  jsxRefreshExclude?: string | RegExp | ReadonlyArray<string | RegExp>;
3327
3330
  }
3328
- declare function transformWithOxc(code: string, filename: string, options?: rolldown_utils_TransformOptions, inMap?: object, config?: ResolvedConfig, watcher?: FSWatcher): Promise<Omit<rolldown_utils_TransformResult, "errors">>;
3331
+ export declare function transformWithOxc(code: string, filename: string, options?: rolldown_utils_TransformOptions, inMap?: object, config?: ResolvedConfig, watcher?: FSWatcher): Promise<Omit<rolldown_utils_TransformResult, "errors">>;
3329
3332
  //#endregion
3330
3333
  //#region src/node/config.d.ts
3331
3334
  interface ConfigEnv {
@@ -3355,12 +3358,12 @@ type UserConfigExport = UserConfig | Promise<UserConfig> | UserConfigFnObject |
3355
3358
  * accepts a direct {@link UserConfig} object, or a function that returns it.
3356
3359
  * The function receives a {@link ConfigEnv} object.
3357
3360
  */
3358
- declare function defineConfig(config: UserConfig): UserConfig;
3359
- declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
3360
- declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
3361
- declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
3362
- declare function defineConfig(config: UserConfigFn): UserConfigFn;
3363
- declare function defineConfig(config: UserConfigExport): UserConfigExport;
3361
+ export declare function defineConfig(config: UserConfig): UserConfig;
3362
+ export declare function defineConfig(config: Promise<UserConfig>): Promise<UserConfig>;
3363
+ export declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
3364
+ export declare function defineConfig(config: UserConfigFnPromise): UserConfigFnPromise;
3365
+ export declare function defineConfig(config: UserConfigFn): UserConfigFn;
3366
+ export declare function defineConfig(config: UserConfigExport): UserConfigExport;
3364
3367
  interface CreateDevEnvironmentContext {
3365
3368
  ws: WebSocketServer;
3366
3369
  }
@@ -3851,16 +3854,16 @@ interface PluginHookUtils {
3851
3854
  getSortedPluginHooks: <K extends keyof Plugin>(hookName: K) => NonNullable<HookHandler<Plugin[K]>>[];
3852
3855
  }
3853
3856
  type ResolveFn = (id: string, importer?: string, aliasOnly?: boolean, ssr?: boolean) => Promise<string | undefined>;
3854
- declare function resolveConfig(inlineConfig: InlineConfig, command: "build" | "serve", defaultMode?: string, defaultNodeEnv?: string, isPreview?: boolean, patchConfig?: ((config: ResolvedConfig) => void) | undefined, patchPlugins?: ((resolvedPlugins: Plugin[]) => void) | undefined): Promise<ResolvedConfig>;
3855
- declare function sortUserPlugins(plugins: (Plugin | Plugin[])[] | undefined): [Plugin[], Plugin[], Plugin[]];
3856
- declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel, customLogger?: Logger, configLoader?: "bundle" | "runner" | "native"): Promise<{
3857
+ export declare function resolveConfig(inlineConfig: InlineConfig, command: "build" | "serve", defaultMode?: string, defaultNodeEnv?: string, isPreview?: boolean, patchConfig?: ((config: ResolvedConfig) => void) | undefined, patchPlugins?: ((resolvedPlugins: Plugin[]) => void) | undefined): Promise<ResolvedConfig>;
3858
+ export declare function sortUserPlugins(plugins: (Plugin | Plugin[])[] | undefined): [Plugin[], Plugin[], Plugin[]];
3859
+ export declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, configRoot?: string, logLevel?: LogLevel, customLogger?: Logger, configLoader?: "bundle" | "runner" | "native"): Promise<{
3857
3860
  path: string;
3858
3861
  config: UserConfig;
3859
3862
  dependencies: string[];
3860
3863
  } | null>;
3861
3864
  //#endregion
3862
3865
  //#region src/node/server/middlewares/error.d.ts
3863
- declare function buildErrorMessage(err: RollupError, args?: string[], includeStack?: boolean): string;
3866
+ export declare function buildErrorMessage(err: RollupError, args?: string[], includeStack?: boolean): string;
3864
3867
  //#endregion
3865
3868
  //#region src/node/ssr/runtime/serverModuleRunner.d.ts
3866
3869
  /**
@@ -3878,23 +3881,23 @@ interface ServerModuleRunnerOptions extends Omit<ModuleRunnerOptions, "root" | "
3878
3881
  */
3879
3882
  evaluator?: ModuleEvaluator;
3880
3883
  }
3881
- declare const createServerModuleRunnerTransport: (options: {
3884
+ export declare const createServerModuleRunnerTransport: (options: {
3882
3885
  channel: NormalizedServerHotChannel;
3883
3886
  }) => ModuleRunnerTransport;
3884
3887
  /**
3885
3888
  * Create an instance of the Vite SSR runtime that support HMR.
3886
3889
  * @experimental
3887
3890
  */
3888
- declare function createServerModuleRunner(environment: DevEnvironment, options?: ServerModuleRunnerOptions): ModuleRunner;
3891
+ export declare function createServerModuleRunner(environment: DevEnvironment, options?: ServerModuleRunnerOptions): ModuleRunner;
3889
3892
  //#endregion
3890
3893
  //#region src/node/server/environments/runnableEnvironment.d.ts
3891
- declare function createRunnableDevEnvironment(name: string, config: ResolvedConfig, context?: RunnableDevEnvironmentContext): RunnableDevEnvironment;
3894
+ export declare function createRunnableDevEnvironment(name: string, config: ResolvedConfig, context?: RunnableDevEnvironmentContext): RunnableDevEnvironment;
3892
3895
  interface RunnableDevEnvironmentContext extends Omit<DevEnvironmentContext, "hot"> {
3893
3896
  runner?: (environment: RunnableDevEnvironment, options?: ServerModuleRunnerOptions) => ModuleRunner;
3894
3897
  runnerOptions?: ServerModuleRunnerOptions;
3895
3898
  hot?: boolean;
3896
3899
  }
3897
- declare function isRunnableDevEnvironment(environment: Environment): environment is RunnableDevEnvironment;
3900
+ export declare function isRunnableDevEnvironment(environment: Environment): environment is RunnableDevEnvironment;
3898
3901
  declare class RunnableDevEnvironment extends DevEnvironment {
3899
3902
  private _runner;
3900
3903
  private _runnerFactory;
@@ -3908,8 +3911,8 @@ declare class RunnableDevEnvironment extends DevEnvironment {
3908
3911
  interface FetchableDevEnvironmentContext extends DevEnvironmentContext {
3909
3912
  handleRequest(request: Request): Promise<Response> | Response;
3910
3913
  }
3911
- declare function createFetchableDevEnvironment(name: string, config: ResolvedConfig, context: FetchableDevEnvironmentContext): FetchableDevEnvironment;
3912
- declare function isFetchableDevEnvironment(environment: Environment): environment is FetchableDevEnvironment;
3914
+ export declare function createFetchableDevEnvironment(name: string, config: ResolvedConfig, context: FetchableDevEnvironmentContext): FetchableDevEnvironment;
3915
+ export declare function isFetchableDevEnvironment(environment: Environment): environment is FetchableDevEnvironment;
3913
3916
  declare class FetchableDevEnvironment extends DevEnvironment {
3914
3917
  private _handleRequest;
3915
3918
  constructor(name: string, config: ResolvedConfig, context: FetchableDevEnvironmentContext);
@@ -3925,7 +3928,7 @@ interface RunnerImportResult<T> {
3925
3928
  * Import any file using the default Vite environment.
3926
3929
  * @experimental
3927
3930
  */
3928
- declare function runnerImport<T>(moduleId: string, inlineConfig?: InlineConfig): Promise<RunnerImportResult<T>>;
3931
+ export declare function runnerImport<T>(moduleId: string, inlineConfig?: InlineConfig): Promise<RunnerImportResult<T>>;
3929
3932
  //#endregion
3930
3933
  //#region src/node/ssr/fetchModule.d.ts
3931
3934
  interface FetchModuleOptions {
@@ -3937,7 +3940,7 @@ interface FetchModuleOptions {
3937
3940
  * Fetch module information for Vite module runner.
3938
3941
  * @experimental
3939
3942
  */
3940
- declare function fetchModule(environment: DevEnvironment, url: string, importer?: string, options?: FetchModuleOptions): Promise<moduleRunner_FetchResult>;
3943
+ export declare function fetchModule(environment: DevEnvironment, url: string, importer?: string, options?: FetchModuleOptions): Promise<moduleRunner_FetchResult>;
3941
3944
  //#endregion
3942
3945
  //#region src/node/ssr/ssrTransform.d.ts
3943
3946
  interface ModuleRunnerTransformOptions {
@@ -3956,21 +3959,21 @@ declare const DEFAULT_SERVER_MAIN_FIELDS: readonly string[];
3956
3959
  declare const DEFAULT_CLIENT_CONDITIONS: readonly string[];
3957
3960
  declare const DEFAULT_SERVER_CONDITIONS: readonly string[];
3958
3961
  declare const DEFAULT_EXTERNAL_CONDITIONS: readonly string[];
3959
- declare const defaultAllowedOrigins: RegExp;
3962
+ export declare const defaultAllowedOrigins: RegExp;
3960
3963
  //#endregion
3961
3964
  //#region src/node/utils.d.ts
3962
3965
  /**
3963
3966
  * Inlined to keep `@rollup/pluginutils` in devDependencies
3964
3967
  */
3965
3968
  type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
3966
- declare const createFilter: (include?: FilterPattern, exclude?: FilterPattern, options?: {
3969
+ export declare const createFilter: (include?: FilterPattern, exclude?: FilterPattern, options?: {
3967
3970
  resolve?: string | false | null;
3968
3971
  }) => (id: unknown) => boolean;
3969
- declare const rollupVersion = "4.23.0";
3970
- declare function normalizePath(id: string): string;
3971
- declare const isCSSRequest: (request: string) => boolean;
3972
- declare function mergeConfig<D extends Record<string, any>, O extends Record<string, any>>(defaults: D extends Function ? never : D, overrides: O extends Function ? never : O, isRoot?: boolean): Record<string, any>;
3973
- declare function mergeAlias(a?: AliasOptions, b?: AliasOptions): AliasOptions | undefined;
3972
+ export declare const rollupVersion = "4.23.0";
3973
+ export declare function normalizePath(id: string): string;
3974
+ export declare const isCSSRequest: (request: string) => boolean;
3975
+ export declare function mergeConfig<D extends Record<string, any>, O extends Record<string, any>>(defaults: D extends Function ? never : D, overrides: O extends Function ? never : O, isRoot?: boolean): Record<string, any>;
3976
+ export declare function mergeAlias(a?: AliasOptions, b?: AliasOptions): AliasOptions | undefined;
3974
3977
  //#endregion
3975
3978
  //#region src/node/server/send.d.ts
3976
3979
  interface SendOptions {
@@ -3981,33 +3984,33 @@ interface SendOptions {
3981
3984
  mappings: "";
3982
3985
  } | null;
3983
3986
  }
3984
- declare function send(req: http.IncomingMessage, res: ServerResponse, content: string | Buffer, type: string, options: SendOptions): void;
3987
+ export declare function send(req: http.IncomingMessage, res: ServerResponse, content: string | Buffer, type: string, options: SendOptions): void;
3985
3988
  //#endregion
3986
3989
  //#region src/node/server/searchRoot.d.ts
3987
3990
  /**
3988
3991
  * Search up for the nearest workspace root
3989
3992
  */
3990
- declare function searchForWorkspaceRoot(current: string, root?: string): string;
3993
+ export declare function searchForWorkspaceRoot(current: string, root?: string): string;
3991
3994
  //#endregion
3992
3995
  //#region src/node/server/middlewares/static.d.ts
3993
3996
  /**
3994
3997
  * Check if the url is allowed to be served, via the `server.fs` config.
3995
3998
  * @deprecated Use the `isFileLoadingAllowed` function instead.
3996
3999
  */
3997
- declare function isFileServingAllowed(config: ResolvedConfig, url: string): boolean;
3998
- declare function isFileServingAllowed(url: string, server: ViteDevServer): boolean;
4000
+ export declare function isFileServingAllowed(config: ResolvedConfig, url: string): boolean;
4001
+ export declare function isFileServingAllowed(url: string, server: ViteDevServer): boolean;
3999
4002
  /**
4000
4003
  * Warning: parameters are not validated, only works with normalized absolute paths
4001
4004
  */
4002
- declare function isFileLoadingAllowed(config: ResolvedConfig, filePath: string): boolean;
4005
+ export declare function isFileLoadingAllowed(config: ResolvedConfig, filePath: string): boolean;
4003
4006
  //#endregion
4004
4007
  //#region src/node/env.d.ts
4005
4008
  /**
4006
4009
  * Load `.env` files within the `envDir` and merge them with the matching
4007
4010
  * variables already present in `process.env`.
4008
4011
  */
4009
- declare function loadEnv(mode: string, envDir: string | false, prefixes?: string | string[]): Record<string, string>;
4010
- declare function resolveEnvPrefix({ envPrefix }: UserConfig): string[];
4012
+ export declare function loadEnv(mode: string, envDir: string | false, prefixes?: string | string[]): Record<string, string>;
4013
+ export declare function resolveEnvPrefix({ envPrefix }: UserConfig): string[];
4011
4014
  //#endregion
4012
4015
  //#region src/node/plugins/manifest.d.ts
4013
4016
  type Manifest = Record<string, ManifestChunk>;
@@ -4058,9 +4061,9 @@ interface ManifestChunk {
4058
4061
  //#endregion
4059
4062
  //#region src/node/index.d.ts
4060
4063
  /** @deprecated - use `parseSync` instead */
4061
- declare const parseAst: typeof parseAst$1;
4064
+ export declare const parseAst: typeof parseAst$1;
4062
4065
  /** @deprecated - use `parse` instead */
4063
- declare const parseAstAsync: typeof parseAstAsync$1;
4064
- declare const esbuildVersion = "0.25.0";
4066
+ export declare const parseAstAsync: typeof parseAstAsync$1;
4067
+ export declare const esbuildVersion = "0.25.0";
4065
4068
  //#endregion
4066
- 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 Config as PostcssUserConfig, 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 };
4069
+ export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, type BuildAppHook, 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, 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 Config as PostcssUserConfig, 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, 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, esmExternalRequirePlugin, minify, minifySync, ssrTransform as moduleRunnerTransform, parse, parseSync, rolldownVersion, VERSION as version, withFilter };
@@ -88,18 +88,18 @@ interface SSRImportMetadata extends DefineImportMetadata {
88
88
  }
89
89
  //#endregion
90
90
  //#region src/module-runner/constants.d.ts
91
- declare const ssrModuleExportsKey = "__vite_ssr_exports__";
92
- declare const ssrImportKey = "__vite_ssr_import__";
93
- declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
94
- declare const ssrExportAllKey = "__vite_ssr_exportAll__";
95
- declare const ssrExportNameKey = "__vite_ssr_exportName__";
96
- declare const ssrImportMetaKey = "__vite_ssr_import_meta__";
91
+ export declare const ssrModuleExportsKey = "__vite_ssr_exports__";
92
+ export declare const ssrImportKey = "__vite_ssr_import__";
93
+ export declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
94
+ export declare const ssrExportAllKey = "__vite_ssr_exportAll__";
95
+ export declare const ssrExportNameKey = "__vite_ssr_exportName__";
96
+ export declare const ssrImportMetaKey = "__vite_ssr_import_meta__";
97
97
  //#endregion
98
98
  //#region src/module-runner/runner.d.ts
99
99
  interface ModuleRunnerDebugger {
100
100
  (formatter: unknown, ...args: unknown[]): void;
101
101
  }
102
- declare class ModuleRunner {
102
+ export declare class ModuleRunner {
103
103
  options: ModuleRunnerOptions;
104
104
  evaluator: ModuleEvaluator;
105
105
  private debug?;
@@ -252,7 +252,7 @@ declare class EvaluatedModuleNode {
252
252
  map: DecodedMap | undefined;
253
253
  constructor(id: string, url: string);
254
254
  }
255
- declare class EvaluatedModules {
255
+ export declare class EvaluatedModules {
256
256
  readonly idToModuleMap: Map<string, EvaluatedModuleNode>;
257
257
  readonly fileToModulesMap: Map<string, Set<EvaluatedModuleNode>>;
258
258
  readonly urlToIdModuleMap: Map<string, EvaluatedModuleNode>;
@@ -294,20 +294,20 @@ declare class EvaluatedModules {
294
294
  getModuleSourceMapById(id: string): DecodedMap | null;
295
295
  clear(): void;
296
296
  }
297
- declare function normalizeModuleId(file: string): string;
297
+ export declare function normalizeModuleId(file: string): string;
298
298
  //#endregion
299
299
  //#region src/module-runner/esmEvaluator.d.ts
300
- declare class ESModulesEvaluator implements ModuleEvaluator {
300
+ export declare class ESModulesEvaluator implements ModuleEvaluator {
301
301
  readonly startOffset: number;
302
302
  runInlinedModule(context: ModuleRunnerContext, code: string): Promise<any>;
303
303
  runExternalModule(filepath: string): Promise<any>;
304
304
  }
305
305
  //#endregion
306
306
  //#region src/module-runner/createImportMeta.d.ts
307
- declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta;
307
+ export declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta;
308
308
  /**
309
309
  * Create import.meta object for Node.js.
310
310
  */
311
- declare function createNodeImportMeta(modulePath: string): ModuleRunnerImportMeta;
311
+ export declare function createNodeImportMeta(modulePath: string): ModuleRunnerImportMeta;
312
312
  //#endregion
313
- export { ESModulesEvaluator, type EvaluatedModuleNode, EvaluatedModules, type FetchFunction, type FetchFunctionOptions, type FetchResult, type HMRLogger, type InterceptorOptions, type ModuleEvaluator, ModuleRunner, type ModuleRunnerContext, type ModuleRunnerHmr, type ModuleRunnerImportMeta, type ModuleRunnerOptions, type ModuleRunnerTransport, type ModuleRunnerTransportHandlers, type ResolvedResult, type SSRImportMetadata, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };
313
+ export { type EvaluatedModuleNode, type FetchFunction, type FetchFunctionOptions, type FetchResult, type HMRLogger, type InterceptorOptions, type ModuleEvaluator, type ModuleRunnerContext, type ModuleRunnerHmr, type ModuleRunnerImportMeta, type ModuleRunnerOptions, type ModuleRunnerTransport, type ModuleRunnerTransportHandlers, type ResolvedResult, type SSRImportMetadata, createWebSocketModuleRunnerTransport };
@@ -65,20 +65,22 @@ function normalizeString(path, allowAboveRoot) {
65
65
  else if (char === "/") break;
66
66
  else char = "/";
67
67
  if (char === "/") {
68
- if (lastSlash !== index - 1 && dots !== 1) if (dots === 2) {
69
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
70
- if (res.length > 2) {
71
- let lastSlashIndex = res.lastIndexOf("/");
72
- lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
73
- continue;
74
- }
75
- if (res.length > 0) {
76
- res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
77
- continue;
68
+ if (lastSlash !== index - 1 && dots !== 1) {
69
+ if (dots === 2) {
70
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
71
+ if (res.length > 2) {
72
+ let lastSlashIndex = res.lastIndexOf("/");
73
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
74
+ continue;
75
+ }
76
+ if (res.length > 0) {
77
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
78
+ continue;
79
+ }
78
80
  }
79
- }
80
- allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
81
- } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
81
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
82
+ } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
83
+ }
82
84
  lastSlash = index, dots = 0;
83
85
  } else char === "." && dots !== -1 ? ++dots : dots = -1;
84
86
  }
@@ -652,14 +654,18 @@ const createInvokeableTransport = (transport) => {
652
654
  } } : {},
653
655
  async send(data) {
654
656
  if (invokeableTransport.send) {
655
- if (!isConnected) if (connectingPromise) await connectingPromise;
656
- else throw new SendBeforeConnectError("send was called before connect");
657
+ if (!isConnected) {
658
+ if (connectingPromise) await connectingPromise;
659
+ else throw new SendBeforeConnectError("send was called before connect");
660
+ }
657
661
  await invokeableTransport.send(data);
658
662
  }
659
663
  },
660
664
  async invoke(name, data) {
661
- if (!isConnected) if (connectingPromise) await connectingPromise;
662
- else throw new SendBeforeConnectError("invoke was called before connect");
665
+ if (!isConnected) {
666
+ if (connectingPromise) await connectingPromise;
667
+ else throw new SendBeforeConnectError("invoke was called before connect");
668
+ }
663
669
  return invokeableTransport.invoke(name, data);
664
670
  }
665
671
  };
@@ -1156,9 +1162,8 @@ var ModuleRunner = class {
1156
1162
  if (visited.has(mod.id)) return !1;
1157
1163
  visited.add(mod.id);
1158
1164
  for (let importedModuleId of mod.imports) {
1159
- if (callstack.includes(importedModuleId)) return !0;
1160
1165
  let importedModule = this.evaluatedModules.getModuleById(importedModuleId);
1161
- if (importedModule?.promise && !importedModule.evaluated && this.isCircularRequest(importedModule, callstack, visited)) return !0;
1166
+ if (!(!importedModule?.promise || importedModule.evaluated) && (callstack.includes(importedModuleId) || this.isCircularRequest(importedModule, callstack, visited))) return !0;
1162
1167
  }
1163
1168
  return !1;
1164
1169
  }