vite-node 0.26.2 → 0.27.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 +5 -4
- package/dist/chunk-hmr.mjs +4 -4
- package/dist/cli.cjs +10 -619
- package/dist/cli.d.ts +1 -1
- package/dist/cli.mjs +6 -620
- package/dist/client.cjs +49 -10
- package/dist/client.d.ts +1 -1
- package/dist/client.mjs +49 -10
- package/dist/hmr.cjs +1 -2
- package/dist/hmr.d.ts +1 -1
- package/dist/hmr.mjs +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/server.cjs +33 -5
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +32 -5
- package/dist/source-map.d.ts +1 -1
- package/dist/{types-6a15e0b9.d.ts → types-63205a44.d.ts} +5 -0
- package/dist/types.d.ts +1 -1
- package/dist/utils.cjs +0 -4
- package/dist/utils.d.ts +2 -3
- package/dist/utils.mjs +1 -4
- package/package.json +4 -3
- package/dist/chunk-picocolors.cjs +0 -70
- package/dist/chunk-picocolors.mjs +0 -64
package/dist/chunk-hmr.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_events = require('node:events');
|
|
4
|
-
var
|
|
4
|
+
var c = require('picocolors');
|
|
5
5
|
var createDebug = require('debug');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
+
var c__default = /*#__PURE__*/_interopDefaultLegacy(c);
|
|
9
10
|
var createDebug__default = /*#__PURE__*/_interopDefaultLegacy(createDebug);
|
|
10
11
|
|
|
11
12
|
function createHmrEmitter() {
|
|
@@ -115,7 +116,7 @@ async function fetchUpdate(runner, { path, acceptedPath }) {
|
|
|
115
116
|
for (const { deps, fn } of qualifiedCallbacks)
|
|
116
117
|
fn(deps.map((dep) => moduleMap.get(dep)));
|
|
117
118
|
const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;
|
|
118
|
-
console.log(`${
|
|
119
|
+
console.log(`${c__default["default"].cyan("[vite-node]")} hot updated: ${loggedPath}`);
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
122
|
function warnFailedFetch(err, path) {
|
|
@@ -141,7 +142,7 @@ async function handleMessage(runner, emitter, files, payload) {
|
|
|
141
142
|
if (update.type === "js-update") {
|
|
142
143
|
queueUpdate(runner, fetchUpdate(runner, update));
|
|
143
144
|
} else {
|
|
144
|
-
console.error(`${
|
|
145
|
+
console.error(`${c__default["default"].cyan("[vite-node]")} no support css hmr.}`);
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
148
|
break;
|
|
@@ -160,7 +161,7 @@ async function handleMessage(runner, emitter, files, payload) {
|
|
|
160
161
|
case "error": {
|
|
161
162
|
notifyListeners(runner, "vite:error", payload);
|
|
162
163
|
const err = payload.err;
|
|
163
|
-
console.error(`${
|
|
164
|
+
console.error(`${c__default["default"].cyan("[vite-node]")} Internal Server Error
|
|
164
165
|
${err.message}
|
|
165
166
|
${err.stack}`);
|
|
166
167
|
break;
|
package/dist/chunk-hmr.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
-
import
|
|
2
|
+
import c from 'picocolors';
|
|
3
3
|
import createDebug from 'debug';
|
|
4
4
|
|
|
5
5
|
function createHmrEmitter() {
|
|
@@ -109,7 +109,7 @@ async function fetchUpdate(runner, { path, acceptedPath }) {
|
|
|
109
109
|
for (const { deps, fn } of qualifiedCallbacks)
|
|
110
110
|
fn(deps.map((dep) => moduleMap.get(dep)));
|
|
111
111
|
const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`;
|
|
112
|
-
console.log(`${
|
|
112
|
+
console.log(`${c.cyan("[vite-node]")} hot updated: ${loggedPath}`);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function warnFailedFetch(err, path) {
|
|
@@ -135,7 +135,7 @@ async function handleMessage(runner, emitter, files, payload) {
|
|
|
135
135
|
if (update.type === "js-update") {
|
|
136
136
|
queueUpdate(runner, fetchUpdate(runner, update));
|
|
137
137
|
} else {
|
|
138
|
-
console.error(`${
|
|
138
|
+
console.error(`${c.cyan("[vite-node]")} no support css hmr.}`);
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
break;
|
|
@@ -154,7 +154,7 @@ async function handleMessage(runner, emitter, files, payload) {
|
|
|
154
154
|
case "error": {
|
|
155
155
|
notifyListeners(runner, "vite:error", payload);
|
|
156
156
|
const err = payload.err;
|
|
157
|
-
console.error(`${
|
|
157
|
+
console.error(`${c.cyan("[vite-node]")} Internal Server Error
|
|
158
158
|
${err.message}
|
|
159
159
|
${err.stack}`);
|
|
160
160
|
break;
|