vite-node 0.10.5 → 0.12.1
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/cli.d.ts +8 -0
- package/client.d.ts +37 -0
- package/dist/cli.cjs +625 -49
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +625 -45
- package/dist/{client-27c69c2f.js → client-def5e426.js} +16 -7
- package/dist/{client-d34f7f42.js → client-e36231b1.js} +16 -7
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/index.d.ts +1 -0
- package/package.json +3 -4
- package/server.d.ts +26 -0
- package/types.d.ts +68 -0
- package/utils.d.ts +10 -0
package/cli.d.ts
ADDED
package/client.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ViteNodeRunnerOptions, ModuleCache } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare const DEFAULT_REQUEST_STUBS: {
|
|
4
|
+
'/@vite/client': {
|
|
5
|
+
injectQuery: (id: string) => string;
|
|
6
|
+
createHotContext(): {
|
|
7
|
+
accept: () => void;
|
|
8
|
+
prune: () => void;
|
|
9
|
+
};
|
|
10
|
+
updateStyle(): void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare class ViteNodeRunner {
|
|
14
|
+
options: ViteNodeRunnerOptions;
|
|
15
|
+
root: string;
|
|
16
|
+
moduleCache: Map<string, ModuleCache>;
|
|
17
|
+
constructor(options: ViteNodeRunnerOptions);
|
|
18
|
+
executeFile(file: string): Promise<any>;
|
|
19
|
+
executeId(id: string): Promise<any>;
|
|
20
|
+
cachedRequest(rawId: string, callstack: string[]): Promise<any>;
|
|
21
|
+
directRequest(id: string, fsPath: string, callstack: string[]): Promise<any>;
|
|
22
|
+
prepareContext(context: Record<string, any>): Record<string, any>;
|
|
23
|
+
setCache(id: string, mod: Partial<ModuleCache>): void;
|
|
24
|
+
shouldResolveId(dep: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Define if a module should be interop-ed
|
|
27
|
+
* This function mostly for the ability to override by subclass
|
|
28
|
+
*/
|
|
29
|
+
shouldInterop(path: string, mod: any): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Import a module and interop it
|
|
32
|
+
*/
|
|
33
|
+
interopedImport(path: string): Promise<any>;
|
|
34
|
+
hasNestedDefault(target: any): any;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { DEFAULT_REQUEST_STUBS, ViteNodeRunner };
|