vite-node 3.1.0-beta.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-hmr.cjs +193 -231
- package/dist/chunk-hmr.mjs +193 -231
- package/dist/cli.cjs +102 -115
- package/dist/cli.d.ts +1 -1
- package/dist/cli.mjs +102 -115
- package/dist/client.cjs +387 -468
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +387 -468
- package/dist/constants.cjs +27 -33
- package/dist/constants.mjs +27 -33
- package/dist/hmr.d.ts +3 -2
- package/dist/{index.d-CvjHzhRV.d.ts → index.d-CjeQoW3r.d.ts} +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/server.cjs +354 -516
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +354 -516
- package/dist/source-map.cjs +258 -341
- package/dist/source-map.mjs +258 -341
- package/dist/types.d.ts +1 -1
- package/dist/utils.cjs +137 -152
- package/dist/utils.d.ts +1 -1
- package/dist/utils.mjs +137 -152
- package/package.json +1 -1
package/dist/constants.cjs
CHANGED
|
@@ -1,40 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const KNOWN_ASSET_TYPES = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// other
|
|
31
|
-
"webmanifest",
|
|
32
|
-
"pdf",
|
|
33
|
-
"txt"
|
|
4
|
+
"apng",
|
|
5
|
+
"bmp",
|
|
6
|
+
"png",
|
|
7
|
+
"jpe?g",
|
|
8
|
+
"jfif",
|
|
9
|
+
"pjpeg",
|
|
10
|
+
"pjp",
|
|
11
|
+
"gif",
|
|
12
|
+
"svg",
|
|
13
|
+
"ico",
|
|
14
|
+
"webp",
|
|
15
|
+
"avif",
|
|
16
|
+
"mp4",
|
|
17
|
+
"webm",
|
|
18
|
+
"ogg",
|
|
19
|
+
"mp3",
|
|
20
|
+
"wav",
|
|
21
|
+
"flac",
|
|
22
|
+
"aac",
|
|
23
|
+
"woff2?",
|
|
24
|
+
"eot",
|
|
25
|
+
"ttf",
|
|
26
|
+
"otf",
|
|
27
|
+
"webmanifest",
|
|
28
|
+
"pdf",
|
|
29
|
+
"txt"
|
|
34
30
|
];
|
|
35
|
-
const KNOWN_ASSET_RE = new RegExp(
|
|
36
|
-
`\\.(${KNOWN_ASSET_TYPES.join("|")})$`
|
|
37
|
-
);
|
|
31
|
+
const KNOWN_ASSET_RE = new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
|
|
38
32
|
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
|
|
39
33
|
|
|
40
34
|
exports.CSS_LANGS_RE = CSS_LANGS_RE;
|
package/dist/constants.mjs
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
1
|
const KNOWN_ASSET_TYPES = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// other
|
|
29
|
-
"webmanifest",
|
|
30
|
-
"pdf",
|
|
31
|
-
"txt"
|
|
2
|
+
"apng",
|
|
3
|
+
"bmp",
|
|
4
|
+
"png",
|
|
5
|
+
"jpe?g",
|
|
6
|
+
"jfif",
|
|
7
|
+
"pjpeg",
|
|
8
|
+
"pjp",
|
|
9
|
+
"gif",
|
|
10
|
+
"svg",
|
|
11
|
+
"ico",
|
|
12
|
+
"webp",
|
|
13
|
+
"avif",
|
|
14
|
+
"mp4",
|
|
15
|
+
"webm",
|
|
16
|
+
"ogg",
|
|
17
|
+
"mp3",
|
|
18
|
+
"wav",
|
|
19
|
+
"flac",
|
|
20
|
+
"aac",
|
|
21
|
+
"woff2?",
|
|
22
|
+
"eot",
|
|
23
|
+
"ttf",
|
|
24
|
+
"otf",
|
|
25
|
+
"webmanifest",
|
|
26
|
+
"pdf",
|
|
27
|
+
"txt"
|
|
32
28
|
];
|
|
33
|
-
const KNOWN_ASSET_RE = new RegExp(
|
|
34
|
-
`\\.(${KNOWN_ASSET_TYPES.join("|")})$`
|
|
35
|
-
);
|
|
29
|
+
const KNOWN_ASSET_RE = new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
|
|
36
30
|
const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
|
|
37
31
|
|
|
38
32
|
export { CSS_LANGS_RE, KNOWN_ASSET_RE, KNOWN_ASSET_TYPES };
|
package/dist/hmr.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HMRPayload, Plugin } from 'vite';
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index.d-
|
|
3
|
+
import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index.d-CjeQoW3r.js';
|
|
4
4
|
import './trace-mapping.d-DLVdEqOp.js';
|
|
5
5
|
|
|
6
6
|
type EventType = string | symbol;
|
|
@@ -51,4 +51,5 @@ declare function reload(runner: ViteNodeRunner, files: string[]): Promise<any[]>
|
|
|
51
51
|
declare function handleMessage(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], payload: HMRPayload$1): Promise<void>;
|
|
52
52
|
declare function createHotContext(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], ownerPath: string): HotContext;
|
|
53
53
|
|
|
54
|
-
export {
|
|
54
|
+
export { createHmrEmitter, createHotContext, getCache, handleMessage, reload, sendMessageBuffer, viteNodeHmrPlugin };
|
|
55
|
+
export type { Emitter, EventType, HMREmitter, Handler, HotCallback, HotModule, InferCustomEventPayload, ModuleNamespace };
|
|
@@ -318,4 +318,5 @@ interface DebuggerOptions {
|
|
|
318
318
|
loadDumppedModules?: boolean;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
export {
|
|
321
|
+
export { ModuleCacheMap as M, ViteNodeRunner as a, DEFAULT_REQUEST_STUBS as e };
|
|
322
|
+
export type { Arrayable as A, CustomEventMap as C, DebuggerOptions as D, FetchResult as F, HMRPayload as H, Nullable as N, RawSourceMap as R, StartOfSourceMap as S, ViteNodeServerOptions as V, HotContext as b, DepsHandlingOptions as c, ViteNodeResolveId as d, ModuleExecutionInfo as f, Awaitable as g, FetchFunction as h, ResolveIdFunction as i, CreateHotContextFunction as j, ModuleCache as k, ViteNodeRunnerOptions as l, ViteNodeResolveModule as m };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as Arrayable, g as Awaitable, j as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, h as FetchFunction, F as FetchResult, b as HotContext, k as ModuleCache, M as ModuleCacheMap, f as ModuleExecutionInfo, N as Nullable, R as RawSourceMap, i as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, m as ViteNodeResolveModule, l as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index.d-
|
|
1
|
+
export { A as Arrayable, g as Awaitable, j as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, h as FetchFunction, F as FetchResult, b as HotContext, k as ModuleCache, M as ModuleCacheMap, f as ModuleExecutionInfo, N as Nullable, R as RawSourceMap, i as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, m as ViteNodeResolveModule, l as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index.d-CjeQoW3r.js';
|
|
2
2
|
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-DLVdEqOp.js';
|