vite-node 1.2.1 → 1.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.
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/client.cjs +9 -3
- package/dist/client.mjs +9 -3
- package/dist/source-map.cjs +2 -2
- package/dist/source-map.mjs +2 -2
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -20,7 +20,7 @@ require('node:url');
|
|
|
20
20
|
require('node:vm');
|
|
21
21
|
require('node:events');
|
|
22
22
|
|
|
23
|
-
var version = "1.2.
|
|
23
|
+
var version = "1.2.2";
|
|
24
24
|
|
|
25
25
|
const cli = cac("vite-node");
|
|
26
26
|
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.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import 'node:url';
|
|
|
18
18
|
import 'node:vm';
|
|
19
19
|
import 'node:events';
|
|
20
20
|
|
|
21
|
-
var version = "1.2.
|
|
21
|
+
var version = "1.2.2";
|
|
22
22
|
|
|
23
23
|
const cli = cac("vite-node");
|
|
24
24
|
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
|
@@ -261,7 +261,14 @@ ${getStack()}`), 2e3);
|
|
|
261
261
|
const { Object: Object2, Reflect: Reflect2, Symbol: Symbol2 } = this.getContextPrimitives();
|
|
262
262
|
const modulePath = utils.cleanUrl(moduleId);
|
|
263
263
|
const href = node_url.pathToFileURL(modulePath).href;
|
|
264
|
-
const
|
|
264
|
+
const __filename = node_url.fileURLToPath(href);
|
|
265
|
+
const __dirname = path.dirname(__filename);
|
|
266
|
+
const meta = {
|
|
267
|
+
url: href,
|
|
268
|
+
env,
|
|
269
|
+
filename: __filename,
|
|
270
|
+
dirname: __dirname
|
|
271
|
+
};
|
|
265
272
|
const exports = Object2.create(null);
|
|
266
273
|
Object2.defineProperty(exports, Symbol2.toStringTag, {
|
|
267
274
|
value: "Module",
|
|
@@ -297,7 +304,6 @@ ${getStack()}`), 2e3);
|
|
|
297
304
|
}
|
|
298
305
|
});
|
|
299
306
|
Object2.assign(mod, { code: transformed, exports });
|
|
300
|
-
const __filename = node_url.fileURLToPath(href);
|
|
301
307
|
const moduleProxy = {
|
|
302
308
|
set exports(value) {
|
|
303
309
|
exportAll(cjsExports, value);
|
|
@@ -334,7 +340,7 @@ ${getStack()}`), 2e3);
|
|
|
334
340
|
exports: cjsExports,
|
|
335
341
|
module: moduleProxy,
|
|
336
342
|
__filename,
|
|
337
|
-
__dirname
|
|
343
|
+
__dirname
|
|
338
344
|
});
|
|
339
345
|
debugExecute(__filename);
|
|
340
346
|
if (transformed[0] === "#")
|
package/dist/client.mjs
CHANGED
|
@@ -259,7 +259,14 @@ ${getStack()}`), 2e3);
|
|
|
259
259
|
const { Object: Object2, Reflect: Reflect2, Symbol: Symbol2 } = this.getContextPrimitives();
|
|
260
260
|
const modulePath = cleanUrl(moduleId);
|
|
261
261
|
const href = pathToFileURL(modulePath).href;
|
|
262
|
-
const
|
|
262
|
+
const __filename = fileURLToPath(href);
|
|
263
|
+
const __dirname = dirname(__filename);
|
|
264
|
+
const meta = {
|
|
265
|
+
url: href,
|
|
266
|
+
env,
|
|
267
|
+
filename: __filename,
|
|
268
|
+
dirname: __dirname
|
|
269
|
+
};
|
|
263
270
|
const exports = Object2.create(null);
|
|
264
271
|
Object2.defineProperty(exports, Symbol2.toStringTag, {
|
|
265
272
|
value: "Module",
|
|
@@ -295,7 +302,6 @@ ${getStack()}`), 2e3);
|
|
|
295
302
|
}
|
|
296
303
|
});
|
|
297
304
|
Object2.assign(mod, { code: transformed, exports });
|
|
298
|
-
const __filename = fileURLToPath(href);
|
|
299
305
|
const moduleProxy = {
|
|
300
306
|
set exports(value) {
|
|
301
307
|
exportAll(cjsExports, value);
|
|
@@ -332,7 +338,7 @@ ${getStack()}`), 2e3);
|
|
|
332
338
|
exports: cjsExports,
|
|
333
339
|
module: moduleProxy,
|
|
334
340
|
__filename,
|
|
335
|
-
__dirname
|
|
341
|
+
__dirname
|
|
336
342
|
});
|
|
337
343
|
debugExecute(__filename);
|
|
338
344
|
if (transformed[0] === "#")
|
package/dist/source-map.cjs
CHANGED
|
@@ -560,8 +560,8 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
let errorFormatterInstalled = false;
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
const fileContentsCache = {};
|
|
564
|
+
const sourceMapCache = {};
|
|
565
565
|
const reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
566
566
|
let retrieveFileHandlers = [];
|
|
567
567
|
let retrieveMapHandlers = [];
|
package/dist/source-map.mjs
CHANGED
|
@@ -558,8 +558,8 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
let errorFormatterInstalled = false;
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
const fileContentsCache = {};
|
|
562
|
+
const sourceMapCache = {};
|
|
563
563
|
const reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
564
564
|
let retrieveFileHandlers = [];
|
|
565
565
|
let retrieveMapHandlers = [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"description": "Vite as Node.js runtime",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"vite": "^5.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@jridgewell/trace-mapping": "^0.3.
|
|
87
|
+
"@jridgewell/trace-mapping": "^0.3.22",
|
|
88
88
|
"@types/debug": "^4.1.12"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|