vite 6.4.1 → 7.1.12

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.
Files changed (41) hide show
  1. package/LICENSE.md +76 -338
  2. package/README.md +1 -1
  3. package/bin/openChrome.js +68 -0
  4. package/bin/vite.js +7 -7
  5. package/dist/client/client.mjs +893 -921
  6. package/dist/client/env.mjs +14 -19
  7. package/dist/node/chunks/build.js +4 -0
  8. package/dist/node/chunks/build2.js +5523 -0
  9. package/dist/node/chunks/chunk.js +31 -0
  10. package/dist/node/chunks/config.js +36197 -0
  11. package/dist/node/chunks/config2.js +4 -0
  12. package/dist/node/chunks/dist.js +6758 -0
  13. package/dist/node/chunks/lib.js +377 -0
  14. package/dist/node/chunks/logger.js +320 -0
  15. package/dist/node/chunks/moduleRunnerTransport.d.ts +88 -0
  16. package/dist/node/chunks/optimizer.js +4 -0
  17. package/dist/node/chunks/postcss-import.js +479 -0
  18. package/dist/node/chunks/preview.js +4 -0
  19. package/dist/node/chunks/server.js +4 -0
  20. package/dist/node/cli.js +614 -865
  21. package/dist/node/index.d.ts +2692 -3282
  22. package/dist/node/index.js +24 -188
  23. package/dist/node/module-runner.d.ts +251 -234
  24. package/dist/node/module-runner.js +992 -1177
  25. package/package.json +56 -61
  26. package/types/importGlob.d.ts +14 -0
  27. package/types/importMeta.d.ts +1 -2
  28. package/types/internal/cssPreprocessorOptions.d.ts +3 -22
  29. package/types/internal/terserOptions.d.ts +11 -0
  30. package/types/metadata.d.ts +0 -2
  31. package/bin/openChrome.applescript +0 -95
  32. package/dist/node/chunks/dep-3RmXg9uo.js +0 -553
  33. package/dist/node/chunks/dep-C9BXG1mU.js +0 -822
  34. package/dist/node/chunks/dep-CvfTChi5.js +0 -8218
  35. package/dist/node/chunks/dep-D4NMHUTW.js +0 -49531
  36. package/dist/node/chunks/dep-DWMUTS1A.js +0 -7113
  37. package/dist/node/constants.js +0 -149
  38. package/dist/node/moduleRunnerTransport.d-DJ_mE5sf.d.ts +0 -87
  39. package/dist/node-cjs/publicUtils.cjs +0 -3987
  40. package/index.cjs +0 -96
  41. package/index.d.cts +0 -6
@@ -1,290 +1,307 @@
1
- import { ModuleNamespace, ViteHotContext } from '../../types/hot.js';
2
- import { Update, HotPayload } from '../../types/hmrPayload.js';
3
- import { InferCustomEventPayload } from '../../types/customEvent.js';
4
- import { N as NormalizedModuleRunnerTransport, E as ExternalFetchResult, V as ViteFetchResult, M as ModuleRunnerTransport, F as FetchFunctionOptions, a as FetchResult } from './moduleRunnerTransport.d-DJ_mE5sf.js';
5
- export { b as ModuleRunnerTransportHandlers, c as createWebSocketModuleRunnerTransport } from './moduleRunnerTransport.d-DJ_mE5sf.js';
1
+ import { ExternalFetchResult, FetchFunctionOptions, FetchResult, ModuleRunnerTransport, ModuleRunnerTransportHandlers, NormalizedModuleRunnerTransport, ViteFetchResult, createWebSocketModuleRunnerTransport } from "./chunks/moduleRunnerTransport.js";
2
+ import { ModuleNamespace, ViteHotContext } from "#types/hot";
3
+ import { HotPayload, Update } from "#types/hmrPayload";
4
+ import { InferCustomEventPayload } from "#types/customEvent";
6
5
 
6
+ //#region src/module-runner/sourcemap/decoder.d.ts
7
7
  interface SourceMapLike {
8
- version: number;
9
- mappings?: string;
10
- names?: string[];
11
- sources?: string[];
12
- sourcesContent?: string[];
8
+ version: number;
9
+ mappings?: string;
10
+ names?: string[];
11
+ sources?: string[];
12
+ sourcesContent?: string[];
13
13
  }
14
14
  declare class DecodedMap {
15
- map: SourceMapLike;
16
- _encoded: string;
17
- _decoded: undefined | number[][][];
18
- _decodedMemo: Stats;
19
- url: string;
20
- version: number;
21
- names: string[];
22
- resolvedSources: string[];
23
- constructor(map: SourceMapLike, from: string);
15
+ map: SourceMapLike;
16
+ _encoded: string;
17
+ _decoded: undefined | number[][][];
18
+ _decodedMemo: Stats;
19
+ url: string;
20
+ version: number;
21
+ names: string[];
22
+ resolvedSources: string[];
23
+ constructor(map: SourceMapLike, from: string);
24
24
  }
25
25
  interface Stats {
26
- lastKey: number;
27
- lastNeedle: number;
28
- lastIndex: number;
26
+ lastKey: number;
27
+ lastNeedle: number;
28
+ lastIndex: number;
29
29
  }
30
-
30
+ //#endregion
31
+ //#region src/shared/hmr.d.ts
31
32
  type CustomListenersMap = Map<string, ((data: any) => void)[]>;
32
33
  interface HotModule {
33
- id: string;
34
- callbacks: HotCallback[];
34
+ id: string;
35
+ callbacks: HotCallback[];
35
36
  }
36
37
  interface HotCallback {
37
- deps: string[];
38
- fn: (modules: Array<ModuleNamespace | undefined>) => void;
38
+ deps: string[];
39
+ fn: (modules: Array<ModuleNamespace | undefined>) => void;
39
40
  }
40
41
  interface HMRLogger {
41
- error(msg: string | Error): void;
42
- debug(...msg: unknown[]): void;
42
+ error(msg: string | Error): void;
43
+ debug(...msg: unknown[]): void;
43
44
  }
44
45
  declare class HMRClient {
45
- logger: HMRLogger;
46
- private transport;
47
- private importUpdatedModule;
48
- hotModulesMap: Map<string, HotModule>;
49
- disposeMap: Map<string, (data: any) => void | Promise<void>>;
50
- pruneMap: Map<string, (data: any) => void | Promise<void>>;
51
- dataMap: Map<string, any>;
52
- customListenersMap: CustomListenersMap;
53
- ctxToListenersMap: Map<string, CustomListenersMap>;
54
- currentFirstInvalidatedBy: string | undefined;
55
- constructor(logger: HMRLogger, transport: NormalizedModuleRunnerTransport, importUpdatedModule: (update: Update) => Promise<ModuleNamespace>);
56
- notifyListeners<T extends string>(event: T, data: InferCustomEventPayload<T>): Promise<void>;
57
- send(payload: HotPayload): void;
58
- clear(): void;
59
- prunePaths(paths: string[]): Promise<void>;
60
- protected warnFailedUpdate(err: Error, path: string | string[]): void;
61
- private updateQueue;
62
- private pendingUpdateQueue;
63
- /**
64
- * buffer multiple hot updates triggered by the same src change
65
- * so that they are invoked in the same order they were sent.
66
- * (otherwise the order may be inconsistent because of the http request round trip)
67
- */
68
- queueUpdate(payload: Update): Promise<void>;
69
- private fetchUpdate;
46
+ logger: HMRLogger;
47
+ private transport;
48
+ private importUpdatedModule;
49
+ hotModulesMap: Map<string, HotModule>;
50
+ disposeMap: Map<string, (data: any) => void | Promise<void>>;
51
+ pruneMap: Map<string, (data: any) => void | Promise<void>>;
52
+ dataMap: Map<string, any>;
53
+ customListenersMap: CustomListenersMap;
54
+ ctxToListenersMap: Map<string, CustomListenersMap>;
55
+ currentFirstInvalidatedBy: string | undefined;
56
+ constructor(logger: HMRLogger, transport: NormalizedModuleRunnerTransport, importUpdatedModule: (update: Update) => Promise<ModuleNamespace>);
57
+ notifyListeners<T extends string>(event: T, data: InferCustomEventPayload<T>): Promise<void>;
58
+ send(payload: HotPayload): void;
59
+ clear(): void;
60
+ prunePaths(paths: string[]): Promise<void>;
61
+ protected warnFailedUpdate(err: Error, path: string | string[]): void;
62
+ private updateQueue;
63
+ private pendingUpdateQueue;
64
+ /**
65
+ * buffer multiple hot updates triggered by the same src change
66
+ * so that they are invoked in the same order they were sent.
67
+ * (otherwise the order may be inconsistent because of the http request round trip)
68
+ */
69
+ queueUpdate(payload: Update): Promise<void>;
70
+ private fetchUpdate;
70
71
  }
71
-
72
+ //#endregion
73
+ //#region src/shared/ssrTransform.d.ts
72
74
  interface DefineImportMetadata {
73
- /**
74
- * Imported names before being transformed to `ssrImportKey`
75
- *
76
- * import foo, { bar as baz, qux } from 'hello'
77
- * => ['default', 'bar', 'qux']
78
- *
79
- * import * as namespace from 'world
80
- * => undefined
81
- */
82
- importedNames?: string[];
75
+ /**
76
+ * Imported names before being transformed to `ssrImportKey`
77
+ *
78
+ * import foo, { bar as baz, qux } from 'hello'
79
+ * => ['default', 'bar', 'qux']
80
+ *
81
+ * import * as namespace from 'world
82
+ * => undefined
83
+ */
84
+ importedNames?: string[];
83
85
  }
84
86
  interface SSRImportMetadata extends DefineImportMetadata {
85
- isDynamicImport?: boolean;
87
+ isDynamicImport?: boolean;
86
88
  }
87
-
89
+ //#endregion
90
+ //#region src/module-runner/constants.d.ts
88
91
  declare const ssrModuleExportsKey = "__vite_ssr_exports__";
89
92
  declare const ssrImportKey = "__vite_ssr_import__";
90
93
  declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__";
91
94
  declare const ssrExportAllKey = "__vite_ssr_exportAll__";
95
+ declare const ssrExportNameKey = "__vite_ssr_exportName__";
92
96
  declare const ssrImportMetaKey = "__vite_ssr_import_meta__";
93
-
97
+ //#endregion
98
+ //#region src/module-runner/runner.d.ts
94
99
  interface ModuleRunnerDebugger {
95
- (formatter: unknown, ...args: unknown[]): void;
100
+ (formatter: unknown, ...args: unknown[]): void;
96
101
  }
97
102
  declare class ModuleRunner {
98
- options: ModuleRunnerOptions;
99
- evaluator: ModuleEvaluator;
100
- private debug?;
101
- evaluatedModules: EvaluatedModules;
102
- hmrClient?: HMRClient;
103
- private readonly envProxy;
104
- private readonly transport;
105
- private readonly resetSourceMapSupport?;
106
- private readonly concurrentModuleNodePromises;
107
- private closed;
108
- constructor(options: ModuleRunnerOptions, evaluator?: ModuleEvaluator, debug?: ModuleRunnerDebugger | undefined);
109
- /**
110
- * URL to execute. Accepts file path, server path or id relative to the root.
111
- */
112
- import<T = any>(url: string): Promise<T>;
113
- /**
114
- * Clear all caches including HMR listeners.
115
- */
116
- clearCache(): void;
117
- /**
118
- * Clears all caches, removes all HMR listeners, and resets source map support.
119
- * This method doesn't stop the HMR connection.
120
- */
121
- close(): Promise<void>;
122
- /**
123
- * Returns `true` if the runtime has been closed by calling `close()` method.
124
- */
125
- isClosed(): boolean;
126
- private processImport;
127
- private isCircularModule;
128
- private isCircularImport;
129
- private cachedRequest;
130
- private cachedModule;
131
- private getModuleInformation;
132
- protected directRequest(url: string, mod: EvaluatedModuleNode, _callstack: string[]): Promise<any>;
103
+ options: ModuleRunnerOptions;
104
+ evaluator: ModuleEvaluator;
105
+ private debug?;
106
+ evaluatedModules: EvaluatedModules;
107
+ hmrClient?: HMRClient;
108
+ private readonly transport;
109
+ private readonly resetSourceMapSupport?;
110
+ private readonly concurrentModuleNodePromises;
111
+ private closed;
112
+ constructor(options: ModuleRunnerOptions, evaluator?: ModuleEvaluator, debug?: ModuleRunnerDebugger | undefined);
113
+ /**
114
+ * URL to execute. Accepts file path, server path or id relative to the root.
115
+ */
116
+ import<T = any>(url: string): Promise<T>;
117
+ /**
118
+ * Clear all caches including HMR listeners.
119
+ */
120
+ clearCache(): void;
121
+ /**
122
+ * Clears all caches, removes all HMR listeners, and resets source map support.
123
+ * This method doesn't stop the HMR connection.
124
+ */
125
+ close(): Promise<void>;
126
+ /**
127
+ * Returns `true` if the runtime has been closed by calling `close()` method.
128
+ */
129
+ isClosed(): boolean;
130
+ private processImport;
131
+ private isCircularModule;
132
+ private isCircularImport;
133
+ private cachedRequest;
134
+ private cachedModule;
135
+ private getModuleInformation;
136
+ protected directRequest(url: string, mod: EvaluatedModuleNode, _callstack: string[]): Promise<any>;
133
137
  }
134
-
138
+ //#endregion
139
+ //#region src/module-runner/sourcemap/interceptor.d.ts
135
140
  interface RetrieveFileHandler {
136
- (path: string): string | null | undefined | false;
141
+ (path: string): string | null | undefined | false;
137
142
  }
138
143
  interface RetrieveSourceMapHandler {
139
- (path: string): null | {
140
- url: string;
141
- map: any;
142
- };
144
+ (path: string): null | {
145
+ url: string;
146
+ map: any;
147
+ };
143
148
  }
144
149
  interface InterceptorOptions {
145
- retrieveFile?: RetrieveFileHandler;
146
- retrieveSourceMap?: RetrieveSourceMapHandler;
150
+ retrieveFile?: RetrieveFileHandler;
151
+ retrieveSourceMap?: RetrieveSourceMapHandler;
147
152
  }
148
-
153
+ //#endregion
154
+ //#region src/module-runner/types.d.ts
149
155
  interface ModuleRunnerImportMeta extends ImportMeta {
150
- url: string;
151
- env: ImportMetaEnv;
152
- hot?: ViteHotContext;
153
- [key: string]: any;
156
+ url: string;
157
+ env: ImportMetaEnv;
158
+ hot?: ViteHotContext;
159
+ [key: string]: any;
154
160
  }
155
161
  interface ModuleRunnerContext {
156
- [ssrModuleExportsKey]: Record<string, any>;
157
- [ssrImportKey]: (id: string, metadata?: DefineImportMetadata) => Promise<any>;
158
- [ssrDynamicImportKey]: (id: string, options?: ImportCallOptions) => Promise<any>;
159
- [ssrExportAllKey]: (obj: any) => void;
160
- [ssrImportMetaKey]: ModuleRunnerImportMeta;
162
+ [ssrModuleExportsKey]: Record<string, any>;
163
+ [ssrImportKey]: (id: string, metadata?: DefineImportMetadata) => Promise<any>;
164
+ [ssrDynamicImportKey]: (id: string, options?: ImportCallOptions) => Promise<any>;
165
+ [ssrExportAllKey]: (obj: any) => void;
166
+ [ssrExportNameKey]: (name: string, getter: () => unknown) => void;
167
+ [ssrImportMetaKey]: ModuleRunnerImportMeta;
161
168
  }
162
169
  interface ModuleEvaluator {
163
- /**
164
- * Number of prefixed lines in the transformed code.
165
- */
166
- startOffset?: number;
167
- /**
168
- * Run code that was transformed by Vite.
169
- * @param context Function context
170
- * @param code Transformed code
171
- * @param module The module node
172
- */
173
- runInlinedModule(context: ModuleRunnerContext, code: string, module: Readonly<EvaluatedModuleNode>): Promise<any>;
174
- /**
175
- * Run externalized module.
176
- * @param file File URL to the external module
177
- */
178
- runExternalModule(file: string): Promise<any>;
170
+ /**
171
+ * Number of prefixed lines in the transformed code.
172
+ */
173
+ startOffset?: number;
174
+ /**
175
+ * Run code that was transformed by Vite.
176
+ * @param context Function context
177
+ * @param code Transformed code
178
+ * @param module The module node
179
+ */
180
+ runInlinedModule(context: ModuleRunnerContext, code: string, module: Readonly<EvaluatedModuleNode>): Promise<any>;
181
+ /**
182
+ * Run externalized module.
183
+ * @param file File URL to the external module
184
+ */
185
+ runExternalModule(file: string): Promise<any>;
179
186
  }
180
187
  type ResolvedResult = (ExternalFetchResult | ViteFetchResult) & {
181
- url: string;
182
- id: string;
188
+ url: string;
189
+ id: string;
183
190
  };
184
191
  type FetchFunction = (id: string, importer?: string, options?: FetchFunctionOptions) => Promise<FetchResult>;
185
192
  interface ModuleRunnerHmr {
186
- /**
187
- * Configure HMR logger.
188
- */
189
- logger?: false | HMRLogger;
193
+ /**
194
+ * Configure HMR logger.
195
+ */
196
+ logger?: false | HMRLogger;
190
197
  }
191
198
  interface ModuleRunnerOptions {
192
- /**
193
- * Root of the project
194
- * @deprecated not used and to be removed
195
- */
196
- root?: string;
197
- /**
198
- * A set of methods to communicate with the server.
199
- */
200
- transport: ModuleRunnerTransport;
201
- /**
202
- * Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
203
- * Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
204
- * You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
205
- */
206
- sourcemapInterceptor?: false | 'node' | 'prepareStackTrace' | InterceptorOptions;
207
- /**
208
- * Disable HMR or configure HMR options.
209
- *
210
- * @default true
211
- */
212
- hmr?: boolean | ModuleRunnerHmr;
213
- /**
214
- * Custom module cache. If not provided, creates a separate module cache for each ModuleRunner instance.
215
- */
216
- evaluatedModules?: EvaluatedModules;
199
+ /**
200
+ * A set of methods to communicate with the server.
201
+ */
202
+ transport: ModuleRunnerTransport;
203
+ /**
204
+ * Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
205
+ * Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
206
+ * You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
207
+ */
208
+ sourcemapInterceptor?: false | 'node' | 'prepareStackTrace' | InterceptorOptions;
209
+ /**
210
+ * Disable HMR or configure HMR options.
211
+ *
212
+ * @default true
213
+ */
214
+ hmr?: boolean | ModuleRunnerHmr;
215
+ /**
216
+ * Create import.meta object for the module.
217
+ *
218
+ * @default createDefaultImportMeta
219
+ */
220
+ createImportMeta?: (modulePath: string) => ModuleRunnerImportMeta | Promise<ModuleRunnerImportMeta>;
221
+ /**
222
+ * Custom module cache. If not provided, creates a separate module cache for each ModuleRunner instance.
223
+ */
224
+ evaluatedModules?: EvaluatedModules;
217
225
  }
218
226
  interface ImportMetaEnv {
219
- [key: string]: any;
220
- BASE_URL: string;
221
- MODE: string;
222
- DEV: boolean;
223
- PROD: boolean;
224
- SSR: boolean;
227
+ [key: string]: any;
228
+ BASE_URL: string;
229
+ MODE: string;
230
+ DEV: boolean;
231
+ PROD: boolean;
232
+ SSR: boolean;
225
233
  }
226
-
234
+ //#endregion
235
+ //#region src/module-runner/evaluatedModules.d.ts
227
236
  declare class EvaluatedModuleNode {
228
- id: string;
229
- url: string;
230
- importers: Set<string>;
231
- imports: Set<string>;
232
- evaluated: boolean;
233
- meta: ResolvedResult | undefined;
234
- promise: Promise<any> | undefined;
235
- exports: any | undefined;
236
- file: string;
237
- map: DecodedMap | undefined;
238
- constructor(id: string, url: string);
237
+ id: string;
238
+ url: string;
239
+ importers: Set<string>;
240
+ imports: Set<string>;
241
+ evaluated: boolean;
242
+ meta: ResolvedResult | undefined;
243
+ promise: Promise<any> | undefined;
244
+ exports: any | undefined;
245
+ file: string;
246
+ map: DecodedMap | undefined;
247
+ constructor(id: string, url: string);
239
248
  }
240
249
  declare class EvaluatedModules {
241
- readonly idToModuleMap: Map<string, EvaluatedModuleNode>;
242
- readonly fileToModulesMap: Map<string, Set<EvaluatedModuleNode>>;
243
- readonly urlToIdModuleMap: Map<string, EvaluatedModuleNode>;
244
- /**
245
- * Returns the module node by the resolved module ID. Usually, module ID is
246
- * the file system path with query and/or hash. It can also be a virtual module.
247
- *
248
- * Module runner graph will have 1 to 1 mapping with the server module graph.
249
- * @param id Resolved module ID
250
- */
251
- getModuleById(id: string): EvaluatedModuleNode | undefined;
252
- /**
253
- * Returns all modules related to the file system path. Different modules
254
- * might have different query parameters or hash, so it's possible to have
255
- * multiple modules for the same file.
256
- * @param file The file system path of the module
257
- */
258
- getModulesByFile(file: string): Set<EvaluatedModuleNode> | undefined;
259
- /**
260
- * Returns the module node by the URL that was used in the import statement.
261
- * Unlike module graph on the server, the URL is not resolved and is used as is.
262
- * @param url Server URL that was used in the import statement
263
- */
264
- getModuleByUrl(url: string): EvaluatedModuleNode | undefined;
265
- /**
266
- * Ensure that module is in the graph. If the module is already in the graph,
267
- * it will return the existing module node. Otherwise, it will create a new
268
- * module node and add it to the graph.
269
- * @param id Resolved module ID
270
- * @param url URL that was used in the import statement
271
- */
272
- ensureModule(id: string, url: string): EvaluatedModuleNode;
273
- invalidateModule(node: EvaluatedModuleNode): void;
274
- /**
275
- * Extracts the inlined source map from the module code and returns the decoded
276
- * source map. If the source map is not inlined, it will return null.
277
- * @param id Resolved module ID
278
- */
279
- getModuleSourceMapById(id: string): DecodedMap | null;
280
- clear(): void;
250
+ readonly idToModuleMap: Map<string, EvaluatedModuleNode>;
251
+ readonly fileToModulesMap: Map<string, Set<EvaluatedModuleNode>>;
252
+ readonly urlToIdModuleMap: Map<string, EvaluatedModuleNode>;
253
+ /**
254
+ * Returns the module node by the resolved module ID. Usually, module ID is
255
+ * the file system path with query and/or hash. It can also be a virtual module.
256
+ *
257
+ * Module runner graph will have 1 to 1 mapping with the server module graph.
258
+ * @param id Resolved module ID
259
+ */
260
+ getModuleById(id: string): EvaluatedModuleNode | undefined;
261
+ /**
262
+ * Returns all modules related to the file system path. Different modules
263
+ * might have different query parameters or hash, so it's possible to have
264
+ * multiple modules for the same file.
265
+ * @param file The file system path of the module
266
+ */
267
+ getModulesByFile(file: string): Set<EvaluatedModuleNode> | undefined;
268
+ /**
269
+ * Returns the module node by the URL that was used in the import statement.
270
+ * Unlike module graph on the server, the URL is not resolved and is used as is.
271
+ * @param url Server URL that was used in the import statement
272
+ */
273
+ getModuleByUrl(url: string): EvaluatedModuleNode | undefined;
274
+ /**
275
+ * Ensure that module is in the graph. If the module is already in the graph,
276
+ * it will return the existing module node. Otherwise, it will create a new
277
+ * module node and add it to the graph.
278
+ * @param id Resolved module ID
279
+ * @param url URL that was used in the import statement
280
+ */
281
+ ensureModule(id: string, url: string): EvaluatedModuleNode;
282
+ invalidateModule(node: EvaluatedModuleNode): void;
283
+ /**
284
+ * Extracts the inlined source map from the module code and returns the decoded
285
+ * source map. If the source map is not inlined, it will return null.
286
+ * @param id Resolved module ID
287
+ */
288
+ getModuleSourceMapById(id: string): DecodedMap | null;
289
+ clear(): void;
281
290
  }
282
-
291
+ declare function normalizeModuleId(file: string): string;
292
+ //#endregion
293
+ //#region src/module-runner/esmEvaluator.d.ts
283
294
  declare class ESModulesEvaluator implements ModuleEvaluator {
284
- readonly startOffset: number;
285
- runInlinedModule(context: ModuleRunnerContext, code: string): Promise<any>;
286
- runExternalModule(filepath: string): Promise<any>;
295
+ readonly startOffset: number;
296
+ runInlinedModule(context: ModuleRunnerContext, code: string): Promise<any>;
297
+ runExternalModule(filepath: string): Promise<any>;
287
298
  }
288
-
289
- export { ESModulesEvaluator, EvaluatedModuleNode, EvaluatedModules, FetchFunctionOptions, FetchResult, ModuleRunner, ModuleRunnerTransport, ssrDynamicImportKey, ssrExportAllKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey };
290
- export type { FetchFunction, HMRLogger, InterceptorOptions, ModuleEvaluator, ModuleRunnerContext, ModuleRunnerHmr, ModuleRunnerImportMeta, ModuleRunnerOptions, ResolvedResult, SSRImportMetadata };
299
+ //#endregion
300
+ //#region src/module-runner/createImportMeta.d.ts
301
+ declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta;
302
+ /**
303
+ * Create import.meta object for Node.js.
304
+ */
305
+ declare function createNodeImportMeta(modulePath: string): Promise<ModuleRunnerImportMeta>;
306
+ //#endregion
307
+ 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 };