vite-node 1.0.0-beta.1 → 1.0.0-beta.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/dist/cli.cjs +7 -6
- package/dist/cli.d.ts +3 -3
- package/dist/cli.mjs +2 -1
- package/dist/client.cjs +4 -4
- package/dist/client.d.ts +2 -2
- package/dist/hmr.cjs +19 -2
- package/dist/hmr.d.ts +3 -3
- package/dist/hmr.mjs +17 -0
- package/dist/{index-6fb787b2.d.ts → index-e4206afe.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/server.cjs +12 -6
- package/dist/server.d.ts +3 -2
- package/dist/server.mjs +6 -0
- package/dist/source-map.cjs +3 -3
- package/dist/source-map.d.ts +1 -1
- package/dist/{trace-mapping.d-e677e8f4.d.ts → trace-mapping.d-cf594fd7.d.ts} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.cjs +3 -3
- package/dist/utils.d.ts +2 -2
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -6,21 +6,22 @@ var vite = require('vite');
|
|
|
6
6
|
var server = require('./server.cjs');
|
|
7
7
|
var client = require('./client.cjs');
|
|
8
8
|
var utils = require('./utils.cjs');
|
|
9
|
-
var sourceMap = require('./source-map.cjs');
|
|
10
9
|
var hmr = require('./hmr.cjs');
|
|
11
|
-
require('
|
|
12
|
-
require('
|
|
10
|
+
var sourceMap = require('./source-map.cjs');
|
|
11
|
+
require('node:perf_hooks');
|
|
12
|
+
require('node:fs');
|
|
13
|
+
require('node:assert');
|
|
13
14
|
require('pathe');
|
|
14
15
|
require('debug');
|
|
15
16
|
require('mlly');
|
|
16
17
|
require('./constants.cjs');
|
|
17
|
-
require('module');
|
|
18
|
-
require('path');
|
|
18
|
+
require('node:module');
|
|
19
|
+
require('node:path');
|
|
19
20
|
require('node:url');
|
|
20
21
|
require('node:vm');
|
|
21
22
|
require('node:events');
|
|
22
23
|
|
|
23
|
-
var version = "1.0.0-beta.
|
|
24
|
+
var version = "1.0.0-beta.3";
|
|
24
25
|
|
|
25
26
|
const cli = cac("vite-node");
|
|
26
27
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as ViteNodeServerOptions } from './index-
|
|
2
|
-
import './trace-mapping.d-
|
|
1
|
+
import { V as ViteNodeServerOptions } from './index-e4206afe.js';
|
|
2
|
+
import './trace-mapping.d-cf594fd7.js';
|
|
3
3
|
|
|
4
4
|
interface CliOptions {
|
|
5
5
|
root?: string;
|
|
@@ -18,4 +18,4 @@ type ComputeViteNodeServerOptionsCLI<T extends Record<string, any>> = {
|
|
|
18
18
|
};
|
|
19
19
|
type ViteNodeServerOptionsCLI = ComputeViteNodeServerOptionsCLI<ViteNodeServerOptions>;
|
|
20
20
|
|
|
21
|
-
export { CliOptions, ViteNodeServerOptionsCLI };
|
|
21
|
+
export type { CliOptions, ViteNodeServerOptionsCLI };
|
package/dist/cli.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { installSourcemapsSupport } from './source-map.mjs';
|
|
|
8
8
|
import { viteNodeHmrPlugin, createHotContext, handleMessage } from './hmr.mjs';
|
|
9
9
|
import 'node:perf_hooks';
|
|
10
10
|
import 'node:fs';
|
|
11
|
+
import 'node:assert';
|
|
11
12
|
import 'pathe';
|
|
12
13
|
import 'debug';
|
|
13
14
|
import 'mlly';
|
|
@@ -18,7 +19,7 @@ import 'node:url';
|
|
|
18
19
|
import 'node:vm';
|
|
19
20
|
import 'node:events';
|
|
20
21
|
|
|
21
|
-
var version = "1.0.0-beta.
|
|
22
|
+
var version = "1.0.0-beta.3";
|
|
22
23
|
|
|
23
24
|
const cli = cac("vite-node");
|
|
24
25
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/client.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var path = require('path');
|
|
3
|
+
var node_module = require('node:module');
|
|
4
|
+
var path = require('node:path');
|
|
5
5
|
var node_url = require('node:url');
|
|
6
6
|
var vm = require('node:vm');
|
|
7
7
|
var pathe = require('pathe');
|
|
8
8
|
var createDebug = require('debug');
|
|
9
9
|
var utils = require('./utils.cjs');
|
|
10
10
|
var sourceMap = require('./source-map.cjs');
|
|
11
|
-
require('fs');
|
|
11
|
+
require('node:fs');
|
|
12
12
|
|
|
13
13
|
const { setTimeout, clearTimeout } = globalThis;
|
|
14
14
|
const debugExecute = createDebug("vite-node:client:execute");
|
|
@@ -316,7 +316,7 @@ ${getStack()}`), 2e3);
|
|
|
316
316
|
__vite_ssr_exportAll__: (obj) => exportAll(exports, obj),
|
|
317
317
|
__vite_ssr_import_meta__: meta,
|
|
318
318
|
// cjs compact
|
|
319
|
-
require:
|
|
319
|
+
require: node_module.createRequire(href),
|
|
320
320
|
exports: cjsExports,
|
|
321
321
|
module: moduleProxy,
|
|
322
322
|
__filename,
|
package/dist/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { e as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, a as ViteNodeRunner } from './index-e4206afe.js';
|
|
2
|
+
import './trace-mapping.d-cf594fd7.js';
|
package/dist/hmr.cjs
CHANGED
|
@@ -5,8 +5,8 @@ var c = require('picocolors');
|
|
|
5
5
|
var createDebug = require('debug');
|
|
6
6
|
var utils = require('./utils.cjs');
|
|
7
7
|
require('node:url');
|
|
8
|
-
require('module');
|
|
9
|
-
require('fs');
|
|
8
|
+
require('node:module');
|
|
9
|
+
require('node:fs');
|
|
10
10
|
require('pathe');
|
|
11
11
|
|
|
12
12
|
function createHmrEmitter() {
|
|
@@ -232,6 +232,23 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
232
232
|
addToMap(maps.customListenersMap);
|
|
233
233
|
addToMap(newListeners);
|
|
234
234
|
},
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
236
|
+
// @ts-ignore added in vite 5
|
|
237
|
+
off(event, cb) {
|
|
238
|
+
const removeFromMap = (map) => {
|
|
239
|
+
const existing = map.get(event);
|
|
240
|
+
if (existing === void 0)
|
|
241
|
+
return;
|
|
242
|
+
const pruned = existing.filter((l) => l !== cb);
|
|
243
|
+
if (pruned.length === 0) {
|
|
244
|
+
map.delete(event);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
map.set(event, pruned);
|
|
248
|
+
};
|
|
249
|
+
removeFromMap(maps.customListenersMap);
|
|
250
|
+
removeFromMap(newListeners);
|
|
251
|
+
},
|
|
235
252
|
send(event, data) {
|
|
236
253
|
maps.messageBuffer.push(JSON.stringify({ type: "custom", event, data }));
|
|
237
254
|
sendMessageBuffer(runner, emitter);
|
package/dist/hmr.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { HMRPayload, Plugin } from 'vite';
|
|
3
|
-
import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index-
|
|
4
|
-
import './trace-mapping.d-
|
|
3
|
+
import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index-e4206afe.js';
|
|
4
|
+
import './trace-mapping.d-cf594fd7.js';
|
|
5
5
|
|
|
6
6
|
type EventType = string | symbol;
|
|
7
7
|
type Handler<T = unknown> = (event: T) => void;
|
|
@@ -52,4 +52,4 @@ declare function reload(runner: ViteNodeRunner, files: string[]): Promise<any[]>
|
|
|
52
52
|
declare function handleMessage(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], payload: HMRPayload$1): Promise<void>;
|
|
53
53
|
declare function createHotContext(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], ownerPath: string): HotContext;
|
|
54
54
|
|
|
55
|
-
export { Emitter, EventType, HMREmitter, Handler, HotCallback, HotModule, InferCustomEventPayload, ModuleNamespace, createHmrEmitter, createHotContext, getCache, handleMessage, reload, sendMessageBuffer, viteNodeHmrPlugin };
|
|
55
|
+
export { type Emitter, type EventType, type HMREmitter, type Handler, type HotCallback, type HotModule, type InferCustomEventPayload, type ModuleNamespace, createHmrEmitter, createHotContext, getCache, handleMessage, reload, sendMessageBuffer, viteNodeHmrPlugin };
|
package/dist/hmr.mjs
CHANGED
|
@@ -230,6 +230,23 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
230
230
|
addToMap(maps.customListenersMap);
|
|
231
231
|
addToMap(newListeners);
|
|
232
232
|
},
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
234
|
+
// @ts-ignore added in vite 5
|
|
235
|
+
off(event, cb) {
|
|
236
|
+
const removeFromMap = (map) => {
|
|
237
|
+
const existing = map.get(event);
|
|
238
|
+
if (existing === void 0)
|
|
239
|
+
return;
|
|
240
|
+
const pruned = existing.filter((l) => l !== cb);
|
|
241
|
+
if (pruned.length === 0) {
|
|
242
|
+
map.delete(event);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
map.set(event, pruned);
|
|
246
|
+
};
|
|
247
|
+
removeFromMap(maps.customListenersMap);
|
|
248
|
+
removeFromMap(newListeners);
|
|
249
|
+
},
|
|
233
250
|
send(event, data) {
|
|
234
251
|
maps.messageBuffer.push(JSON.stringify({ type: "custom", event, data }));
|
|
235
252
|
sendMessageBuffer(runner, emitter);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EncodedSourceMap } from './trace-mapping.d-
|
|
1
|
+
import { E as EncodedSourceMap } from './trace-mapping.d-cf594fd7.js';
|
|
2
2
|
|
|
3
3
|
type HMRPayload =
|
|
4
4
|
| ConnectedPayload
|
|
@@ -295,4 +295,4 @@ interface DebuggerOptions {
|
|
|
295
295
|
loadDumppedModules?: boolean;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
export { Arrayable as A, CustomEventMap as C, DebuggerOptions as D, FetchResult as F, HMRPayload as H, ModuleCacheMap as M, Nullable as N, RawSourceMap as R, StartOfSourceMap as S, ViteNodeServerOptions as V, ViteNodeRunner as a, HotContext as b, DepsHandlingOptions as c, ViteNodeResolveId as d, DEFAULT_REQUEST_STUBS as e, Awaitable as f, FetchFunction as g, ResolveIdFunction as h, CreateHotContextFunction as i, ModuleCache as j, ViteNodeRunnerOptions as k };
|
|
298
|
+
export { type Arrayable as A, type CustomEventMap as C, type DebuggerOptions as D, type FetchResult as F, type HMRPayload as H, ModuleCacheMap as M, type Nullable as N, type RawSourceMap as R, type StartOfSourceMap as S, type ViteNodeServerOptions as V, ViteNodeRunner as a, type HotContext as b, type DepsHandlingOptions as c, type ViteNodeResolveId as d, DEFAULT_REQUEST_STUBS as e, type Awaitable as f, type FetchFunction as g, type ResolveIdFunction as h, type CreateHotContextFunction as i, type ModuleCache as j, type ViteNodeRunnerOptions as k };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-
|
|
2
|
-
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-
|
|
1
|
+
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-e4206afe.js';
|
|
2
|
+
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-cf594fd7.js';
|
package/dist/server.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var fs = require('fs');
|
|
3
|
+
var node_perf_hooks = require('node:perf_hooks');
|
|
4
|
+
var fs = require('node:fs');
|
|
5
|
+
var assert = require('node:assert');
|
|
5
6
|
var pathe = require('pathe');
|
|
6
7
|
var createDebug = require('debug');
|
|
7
8
|
var mlly = require('mlly');
|
|
@@ -10,8 +11,8 @@ var constants = require('./constants.cjs');
|
|
|
10
11
|
var c = require('picocolors');
|
|
11
12
|
var sourceMap = require('./source-map.cjs');
|
|
12
13
|
require('node:url');
|
|
13
|
-
require('module');
|
|
14
|
-
require('path');
|
|
14
|
+
require('node:module');
|
|
15
|
+
require('node:path');
|
|
15
16
|
|
|
16
17
|
const ESM_EXT_RE = /\.(es|esm|esm-browser|esm-bundler|es6|module)\.js$/;
|
|
17
18
|
const ESM_FOLDER_RE = /\/(es|esm)\/(.*\.js)$/;
|
|
@@ -265,9 +266,13 @@ class ViteNodeServer {
|
|
|
265
266
|
const ssrTransformResult = (_b = this.server.moduleGraph.getModuleById(source)) == null ? void 0 : _b.ssrTransformResult;
|
|
266
267
|
return (ssrTransformResult == null ? void 0 : ssrTransformResult.map) || null;
|
|
267
268
|
}
|
|
269
|
+
assertMode(mode) {
|
|
270
|
+
assert(mode === "web" || mode === "ssr", `"transformMode" can only be "web" or "ssr", received "${mode}".`);
|
|
271
|
+
}
|
|
268
272
|
async fetchModule(id, transformMode) {
|
|
269
273
|
const moduleId = utils.normalizeModuleId(id);
|
|
270
274
|
const mode = transformMode || this.getTransformMode(id);
|
|
275
|
+
this.assertMode(mode);
|
|
271
276
|
const promiseMap = this.fetchPromiseMap[mode];
|
|
272
277
|
if (!promiseMap.has(moduleId)) {
|
|
273
278
|
promiseMap.set(
|
|
@@ -283,6 +288,7 @@ class ViteNodeServer {
|
|
|
283
288
|
}
|
|
284
289
|
async transformRequest(id, filepath = id, transformMode) {
|
|
285
290
|
const mode = transformMode || this.getTransformMode(id);
|
|
291
|
+
this.assertMode(mode);
|
|
286
292
|
const promiseMap = this.transformPromiseMap[mode];
|
|
287
293
|
if (!promiseMap.has(id)) {
|
|
288
294
|
promiseMap.set(
|
|
@@ -341,9 +347,9 @@ class ViteNodeServer {
|
|
|
341
347
|
result = { externalize };
|
|
342
348
|
(_b = this.debugger) == null ? void 0 : _b.recordExternalize(id, externalize);
|
|
343
349
|
} else {
|
|
344
|
-
const start =
|
|
350
|
+
const start = node_perf_hooks.performance.now();
|
|
345
351
|
const r = await this._transformRequest(id, filePath, transformMode);
|
|
346
|
-
duration =
|
|
352
|
+
duration = node_perf_hooks.performance.now() - start;
|
|
347
353
|
result = { code: r == null ? void 0 : r.code, map: r == null ? void 0 : r.map };
|
|
348
354
|
}
|
|
349
355
|
const cacheEntry = {
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformResult, ViteDevServer } from 'vite';
|
|
2
|
-
import { D as DebuggerOptions, c as DepsHandlingOptions, V as ViteNodeServerOptions, d as ViteNodeResolveId, F as FetchResult } from './index-
|
|
3
|
-
import { E as EncodedSourceMap } from './trace-mapping.d-
|
|
2
|
+
import { D as DebuggerOptions, c as DepsHandlingOptions, V as ViteNodeServerOptions, d as ViteNodeResolveId, F as FetchResult } from './index-e4206afe.js';
|
|
3
|
+
import { E as EncodedSourceMap } from './trace-mapping.d-cf594fd7.js';
|
|
4
4
|
|
|
5
5
|
declare class Debugger {
|
|
6
6
|
options: DebuggerOptions;
|
|
@@ -42,6 +42,7 @@ declare class ViteNodeServer {
|
|
|
42
42
|
private ensureExists;
|
|
43
43
|
resolveId(id: string, importer?: string, transformMode?: 'web' | 'ssr'): Promise<ViteNodeResolveId | null>;
|
|
44
44
|
getSourceMap(source: string): EncodedSourceMap | null;
|
|
45
|
+
private assertMode;
|
|
45
46
|
fetchModule(id: string, transformMode?: 'web' | 'ssr'): Promise<FetchResult>;
|
|
46
47
|
transformRequest(id: string, filepath?: string, transformMode?: 'web' | 'ssr'): Promise<TransformResult | null | undefined>;
|
|
47
48
|
transformModule(id: string, transformMode?: 'web' | 'ssr'): Promise<{
|
package/dist/server.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { existsSync, promises } from 'node:fs';
|
|
3
|
+
import assert from 'node:assert';
|
|
3
4
|
import { join, resolve, relative, normalize } from 'pathe';
|
|
4
5
|
import createDebug from 'debug';
|
|
5
6
|
import { isValidNodeImport } from 'mlly';
|
|
@@ -263,9 +264,13 @@ class ViteNodeServer {
|
|
|
263
264
|
const ssrTransformResult = (_b = this.server.moduleGraph.getModuleById(source)) == null ? void 0 : _b.ssrTransformResult;
|
|
264
265
|
return (ssrTransformResult == null ? void 0 : ssrTransformResult.map) || null;
|
|
265
266
|
}
|
|
267
|
+
assertMode(mode) {
|
|
268
|
+
assert(mode === "web" || mode === "ssr", `"transformMode" can only be "web" or "ssr", received "${mode}".`);
|
|
269
|
+
}
|
|
266
270
|
async fetchModule(id, transformMode) {
|
|
267
271
|
const moduleId = normalizeModuleId(id);
|
|
268
272
|
const mode = transformMode || this.getTransformMode(id);
|
|
273
|
+
this.assertMode(mode);
|
|
269
274
|
const promiseMap = this.fetchPromiseMap[mode];
|
|
270
275
|
if (!promiseMap.has(moduleId)) {
|
|
271
276
|
promiseMap.set(
|
|
@@ -281,6 +286,7 @@ class ViteNodeServer {
|
|
|
281
286
|
}
|
|
282
287
|
async transformRequest(id, filepath = id, transformMode) {
|
|
283
288
|
const mode = transformMode || this.getTransformMode(id);
|
|
289
|
+
this.assertMode(mode);
|
|
284
290
|
const promiseMap = this.transformPromiseMap[mode];
|
|
285
291
|
if (!promiseMap.has(id)) {
|
|
286
292
|
promiseMap.set(
|
package/dist/source-map.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var pathe = require('pathe');
|
|
4
4
|
var utils = require('./utils.cjs');
|
|
5
|
-
var path = require('path');
|
|
6
|
-
var fs = require('fs');
|
|
5
|
+
var path = require('node:path');
|
|
6
|
+
var fs = require('node:fs');
|
|
7
7
|
require('node:url');
|
|
8
|
-
require('module');
|
|
8
|
+
require('node:module');
|
|
9
9
|
|
|
10
10
|
const comma = ','.charCodeAt(0);
|
|
11
11
|
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
package/dist/source-map.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformResult } from 'vite';
|
|
2
|
-
import { E as EncodedSourceMap } from './trace-mapping.d-
|
|
2
|
+
import { E as EncodedSourceMap } from './trace-mapping.d-cf594fd7.js';
|
|
3
3
|
|
|
4
4
|
interface InstallSourceMapSupportOptions {
|
|
5
5
|
getSourceMap: (source: string) => EncodedSourceMap | null | undefined;
|
|
@@ -51,4 +51,4 @@ declare class TraceMap implements SourceMap {
|
|
|
51
51
|
constructor(map: SourceMapInput, mapUrl?: string | null);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export { DecodedSourceMap as D, EncodedSourceMap as E, SourceMapInput as S };
|
|
54
|
+
export type { DecodedSourceMap as D, EncodedSourceMap as E, SourceMapInput as S };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-
|
|
2
|
-
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-
|
|
1
|
+
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-e4206afe.js';
|
|
2
|
+
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-cf594fd7.js';
|
package/dist/utils.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_url = require('node:url');
|
|
4
|
-
var
|
|
5
|
-
var fs = require('fs');
|
|
4
|
+
var node_module = require('node:module');
|
|
5
|
+
var fs = require('node:fs');
|
|
6
6
|
var pathe = require('pathe');
|
|
7
7
|
|
|
8
8
|
const isWindows = process.platform === "win32";
|
|
@@ -38,7 +38,7 @@ const prefixedBuiltins = /* @__PURE__ */ new Set([
|
|
|
38
38
|
"node:test"
|
|
39
39
|
]);
|
|
40
40
|
const builtins = /* @__PURE__ */ new Set([
|
|
41
|
-
...
|
|
41
|
+
...node_module.builtinModules,
|
|
42
42
|
"assert/strict",
|
|
43
43
|
"diagnostics_channel",
|
|
44
44
|
"dns/promises",
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Nullable, A as Arrayable } from './index-
|
|
2
|
-
import './trace-mapping.d-
|
|
1
|
+
import { N as Nullable, A as Arrayable } from './index-e4206afe.js';
|
|
2
|
+
import './trace-mapping.d-cf594fd7.js';
|
|
3
3
|
|
|
4
4
|
declare const isWindows: boolean;
|
|
5
5
|
declare function slash(str: string): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"description": "Vite as Node.js runtime",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"*.mjs"
|
|
75
75
|
],
|
|
76
76
|
"engines": {
|
|
77
|
-
"node": ">=
|
|
77
|
+
"node": "^18.0.0 || >=20.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"cac": "^6.7.14",
|