@nuxt/vite-builder-nightly 4.3.0-29465977.c4f46c64 → 4.3.0-29466372.7f503428
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/index.d.mts +23 -21
- package/dist/index.mjs +1956 -2335
- package/dist/vite-node-entry.d.mts +4 -3
- package/dist/vite-node-entry.mjs +77 -82
- package/dist/vite-node.d.mts +29 -27
- package/dist/vite-node.mjs +216 -233
- package/package.json +8 -11
- package/dist/index.d.ts +0 -23
- package/dist/vite-node-entry.d.ts +0 -5
- package/dist/vite-node.d.ts +0 -34
package/dist/vite-node.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import process from
|
|
2
|
-
import net from
|
|
3
|
-
import { Buffer } from
|
|
4
|
-
import { isTest } from
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import net from "node:net";
|
|
3
|
+
import { Buffer } from "node:buffer";
|
|
4
|
+
import { isTest } from "std-env";
|
|
5
5
|
|
|
6
|
+
//#region src/vite-node.ts
|
|
6
7
|
function getViteNodeOptionsEnvVar() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
const envVar = process.env.NUXT_VITE_NODE_OPTIONS;
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(envVar || "{}");
|
|
11
|
+
} catch (e) {
|
|
12
|
+
console.error("vite-node-shared: Failed to parse NUXT_VITE_NODE_OPTIONS environment variable.", e);
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
14
15
|
}
|
|
15
16
|
const viteNodeOptions = getViteNodeOptionsEnvVar();
|
|
16
17
|
const pendingRequests = /* @__PURE__ */ new Map();
|
|
@@ -21,237 +22,219 @@ const MAX_RETRY_ATTEMPTS = viteNodeOptions.maxRetryAttempts ?? 5;
|
|
|
21
22
|
const BASE_RETRY_DELAY_MS = viteNodeOptions.baseRetryDelay ?? 100;
|
|
22
23
|
const MAX_RETRY_DELAY_MS = viteNodeOptions.maxRetryDelay ?? 2e3;
|
|
23
24
|
const REQUEST_TIMEOUT_MS = viteNodeOptions.requestTimeout ?? 6e4;
|
|
25
|
+
/**
|
|
26
|
+
* Calculates exponential backoff delay with jitter.
|
|
27
|
+
* @param attempt - The current attempt number (0-based).
|
|
28
|
+
* @returns Delay in milliseconds.
|
|
29
|
+
*/
|
|
24
30
|
function calculateRetryDelay(attempt) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
const exponentialDelay = BASE_RETRY_DELAY_MS * Math.pow(2, attempt);
|
|
32
|
+
const jitter = Math.random() * .1 * exponentialDelay;
|
|
33
|
+
return Math.min(exponentialDelay + jitter, MAX_RETRY_DELAY_MS);
|
|
28
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Establishes or returns an existing IPC socket connection with retry logic.
|
|
37
|
+
* @returns A promise that resolves with the connected socket.
|
|
38
|
+
*/
|
|
29
39
|
function connectSocket() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (clientSocket === socket) {
|
|
146
|
-
clientSocket = void 0;
|
|
147
|
-
}
|
|
148
|
-
if (currentConnectPromise === thisPromise) {
|
|
149
|
-
currentConnectPromise = void 0;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
const onClose = () => {
|
|
154
|
-
cleanup();
|
|
155
|
-
resetBuffer();
|
|
156
|
-
for (const { reject: rejectRequest } of pendingRequests.values()) {
|
|
157
|
-
rejectRequest(new Error("IPC connection closed"));
|
|
158
|
-
}
|
|
159
|
-
pendingRequests.clear();
|
|
160
|
-
if (clientSocket === socket) {
|
|
161
|
-
clientSocket = void 0;
|
|
162
|
-
}
|
|
163
|
-
if (currentConnectPromise === thisPromise) {
|
|
164
|
-
currentConnectPromise = void 0;
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
socket.on("connect", onConnect);
|
|
168
|
-
socket.on("data", onData);
|
|
169
|
-
socket.on("error", onError);
|
|
170
|
-
socket.on("close", onClose);
|
|
171
|
-
};
|
|
172
|
-
attemptConnection();
|
|
173
|
-
});
|
|
174
|
-
currentConnectPromise = thisPromise;
|
|
175
|
-
return currentConnectPromise;
|
|
40
|
+
if (clientSocket && !clientSocket.destroyed) return Promise.resolve(clientSocket);
|
|
41
|
+
if (currentConnectPromise) return currentConnectPromise;
|
|
42
|
+
const thisPromise = new Promise((resolve, reject) => {
|
|
43
|
+
if (!viteNodeOptions.socketPath) {
|
|
44
|
+
console.error("vite-node-shared: NUXT_VITE_NODE_OPTIONS.socketPath is not defined.");
|
|
45
|
+
return reject(/* @__PURE__ */ new Error("Vite Node IPC socket path not configured."));
|
|
46
|
+
}
|
|
47
|
+
const attemptConnection = (attempt = 0) => {
|
|
48
|
+
const socket = net.createConnection(viteNodeOptions.socketPath);
|
|
49
|
+
const INITIAL_BUFFER_SIZE = 64 * 1024;
|
|
50
|
+
const MAX_BUFFER_SIZE = 1024 * 1024 * 1024;
|
|
51
|
+
let buffer = Buffer.alloc(INITIAL_BUFFER_SIZE);
|
|
52
|
+
let writeOffset = 0;
|
|
53
|
+
let readOffset = 0;
|
|
54
|
+
socket.setNoDelay(true);
|
|
55
|
+
socket.setKeepAlive(true, 3e4);
|
|
56
|
+
const cleanup = () => {
|
|
57
|
+
socket.off("connect", onConnect);
|
|
58
|
+
socket.off("data", onData);
|
|
59
|
+
socket.off("error", onError);
|
|
60
|
+
socket.off("close", onClose);
|
|
61
|
+
};
|
|
62
|
+
const resetBuffer = () => {
|
|
63
|
+
writeOffset = 0;
|
|
64
|
+
readOffset = 0;
|
|
65
|
+
};
|
|
66
|
+
const compactBuffer = () => {
|
|
67
|
+
if (readOffset > 0) {
|
|
68
|
+
const remainingData = writeOffset - readOffset;
|
|
69
|
+
if (remainingData > 0) buffer.copy(buffer, 0, readOffset, writeOffset);
|
|
70
|
+
writeOffset = remainingData;
|
|
71
|
+
readOffset = 0;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const ensureBufferCapacity = (additionalBytes) => {
|
|
75
|
+
const requiredSize = writeOffset + additionalBytes;
|
|
76
|
+
if (requiredSize > MAX_BUFFER_SIZE) throw new Error(`Buffer size limit exceeded: ${requiredSize} > ${MAX_BUFFER_SIZE}`);
|
|
77
|
+
if (requiredSize > buffer.length) {
|
|
78
|
+
compactBuffer();
|
|
79
|
+
if (writeOffset + additionalBytes > buffer.length) {
|
|
80
|
+
const newSize = Math.min(Math.max(buffer.length * 2, requiredSize), MAX_BUFFER_SIZE);
|
|
81
|
+
const newBuffer = Buffer.alloc(newSize);
|
|
82
|
+
buffer.copy(newBuffer, 0, 0, writeOffset);
|
|
83
|
+
buffer = newBuffer;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const onConnect = () => {
|
|
88
|
+
clientSocket = socket;
|
|
89
|
+
resolve(socket);
|
|
90
|
+
};
|
|
91
|
+
const onData = (data) => {
|
|
92
|
+
try {
|
|
93
|
+
ensureBufferCapacity(data.length);
|
|
94
|
+
data.copy(buffer, writeOffset);
|
|
95
|
+
writeOffset += data.length;
|
|
96
|
+
while (writeOffset - readOffset >= 4) {
|
|
97
|
+
const messageLength = buffer.readUInt32BE(readOffset);
|
|
98
|
+
if (writeOffset - readOffset < 4 + messageLength) return;
|
|
99
|
+
const message = buffer.subarray(readOffset + 4, readOffset + 4 + messageLength).toString("utf-8");
|
|
100
|
+
readOffset += 4 + messageLength;
|
|
101
|
+
try {
|
|
102
|
+
const response = JSON.parse(message);
|
|
103
|
+
const requestHandlers = pendingRequests.get(response.id);
|
|
104
|
+
if (requestHandlers) {
|
|
105
|
+
const { resolve: resolveRequest, reject: rejectRequest } = requestHandlers;
|
|
106
|
+
if (response.type === "error") {
|
|
107
|
+
const err = new Error(response.error.message);
|
|
108
|
+
err.stack = response.error.stack;
|
|
109
|
+
err.data = response.error.data;
|
|
110
|
+
err.statusCode = err.status = response.error.status || response.error.statusCode;
|
|
111
|
+
rejectRequest(err);
|
|
112
|
+
} else resolveRequest(response.data);
|
|
113
|
+
pendingRequests.delete(response.id);
|
|
114
|
+
}
|
|
115
|
+
} catch (parseError) {
|
|
116
|
+
console.warn("vite-node-shared: Failed to parse IPC response:", parseError);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (readOffset > buffer.length / 2) compactBuffer();
|
|
120
|
+
} catch (error) {
|
|
121
|
+
socket.destroy(error instanceof Error ? error : /* @__PURE__ */ new Error("Buffer management error"));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const onError = (err) => {
|
|
125
|
+
cleanup();
|
|
126
|
+
resetBuffer();
|
|
127
|
+
if (attempt < MAX_RETRY_ATTEMPTS) {
|
|
128
|
+
const delay = calculateRetryDelay(attempt);
|
|
129
|
+
setTimeout(() => attemptConnection(attempt + 1), delay);
|
|
130
|
+
} else {
|
|
131
|
+
if (currentConnectPromise === thisPromise) reject(err);
|
|
132
|
+
for (const { reject: rejectRequest } of pendingRequests.values()) rejectRequest(err);
|
|
133
|
+
pendingRequests.clear();
|
|
134
|
+
if (clientSocket === socket) clientSocket = void 0;
|
|
135
|
+
if (currentConnectPromise === thisPromise) currentConnectPromise = void 0;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const onClose = () => {
|
|
139
|
+
cleanup();
|
|
140
|
+
resetBuffer();
|
|
141
|
+
for (const { reject: rejectRequest } of pendingRequests.values()) rejectRequest(/* @__PURE__ */ new Error("IPC connection closed"));
|
|
142
|
+
pendingRequests.clear();
|
|
143
|
+
if (clientSocket === socket) clientSocket = void 0;
|
|
144
|
+
if (currentConnectPromise === thisPromise) currentConnectPromise = void 0;
|
|
145
|
+
};
|
|
146
|
+
socket.on("connect", onConnect);
|
|
147
|
+
socket.on("data", onData);
|
|
148
|
+
socket.on("error", onError);
|
|
149
|
+
socket.on("close", onClose);
|
|
150
|
+
};
|
|
151
|
+
attemptConnection();
|
|
152
|
+
});
|
|
153
|
+
currentConnectPromise = thisPromise;
|
|
154
|
+
return currentConnectPromise;
|
|
176
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Sends a request over the IPC socket with automatic reconnection.
|
|
158
|
+
*/
|
|
177
159
|
async function sendRequest(type, payload) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
160
|
+
const requestId = requestIdCounter++;
|
|
161
|
+
let lastError;
|
|
162
|
+
for (let requestAttempt = 0; requestAttempt <= MAX_RETRY_ATTEMPTS; requestAttempt++) try {
|
|
163
|
+
const socket = await connectSocket();
|
|
164
|
+
return new Promise((resolve, reject) => {
|
|
165
|
+
const timeoutId = setTimeout(() => {
|
|
166
|
+
pendingRequests.delete(requestId);
|
|
167
|
+
reject(/* @__PURE__ */ new Error(`Request timeout after ${REQUEST_TIMEOUT_MS}ms for type: ${type}`));
|
|
168
|
+
}, REQUEST_TIMEOUT_MS);
|
|
169
|
+
pendingRequests.set(requestId, {
|
|
170
|
+
resolve: (value) => {
|
|
171
|
+
clearTimeout(timeoutId);
|
|
172
|
+
resolve(value);
|
|
173
|
+
},
|
|
174
|
+
reject: (reason) => {
|
|
175
|
+
clearTimeout(timeoutId);
|
|
176
|
+
reject(reason);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const message = JSON.stringify({
|
|
180
|
+
id: requestId,
|
|
181
|
+
type,
|
|
182
|
+
payload
|
|
183
|
+
});
|
|
184
|
+
const messageBuffer = Buffer.from(message, "utf-8");
|
|
185
|
+
const messageLength = messageBuffer.length;
|
|
186
|
+
const fullMessage = Buffer.alloc(4 + messageLength);
|
|
187
|
+
fullMessage.writeUInt32BE(messageLength, 0);
|
|
188
|
+
messageBuffer.copy(fullMessage, 4);
|
|
189
|
+
try {
|
|
190
|
+
socket.write(fullMessage);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
clearTimeout(timeoutId);
|
|
193
|
+
pendingRequests.delete(requestId);
|
|
194
|
+
reject(error);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
} catch (error) {
|
|
198
|
+
lastError = error;
|
|
199
|
+
if (requestAttempt < MAX_RETRY_ATTEMPTS) {
|
|
200
|
+
const delay = calculateRetryDelay(requestAttempt);
|
|
201
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
202
|
+
if (clientSocket) {
|
|
203
|
+
clientSocket.destroy();
|
|
204
|
+
clientSocket = void 0;
|
|
205
|
+
}
|
|
206
|
+
currentConnectPromise = void 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
throw lastError || /* @__PURE__ */ new Error("Request failed after all retry attempts");
|
|
226
210
|
}
|
|
227
211
|
const viteNodeFetch = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
212
|
+
getManifest() {
|
|
213
|
+
return sendRequest("manifest", void 0);
|
|
214
|
+
},
|
|
215
|
+
getInvalidates() {
|
|
216
|
+
return sendRequest("invalidates", void 0);
|
|
217
|
+
},
|
|
218
|
+
resolveId(id, importer) {
|
|
219
|
+
return sendRequest("resolve", {
|
|
220
|
+
id,
|
|
221
|
+
importer
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
fetchModule(moduleId) {
|
|
225
|
+
return sendRequest("module", { moduleId });
|
|
226
|
+
},
|
|
227
|
+
ensureConnected() {
|
|
228
|
+
return connectSocket();
|
|
229
|
+
}
|
|
243
230
|
};
|
|
244
231
|
let preConnectAttempted = false;
|
|
245
232
|
function preConnect() {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
preConnectAttempted = true;
|
|
250
|
-
return connectSocket().catch(() => {
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
if (typeof process !== "undefined" && !isTest) {
|
|
254
|
-
setTimeout(preConnect, 100);
|
|
233
|
+
if (preConnectAttempted || !viteNodeOptions.socketPath) return;
|
|
234
|
+
preConnectAttempted = true;
|
|
235
|
+
return connectSocket().catch(() => {});
|
|
255
236
|
}
|
|
237
|
+
if (typeof process !== "undefined" && !isTest) setTimeout(preConnect, 100);
|
|
256
238
|
|
|
257
|
-
|
|
239
|
+
//#endregion
|
|
240
|
+
export { viteNodeFetch, viteNodeOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/vite-builder-nightly",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-29466372.7f503428",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -10,12 +10,9 @@
|
|
|
10
10
|
"homepage": "https://nuxt.com",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"type": "module",
|
|
13
|
-
"types": "./dist/index.d.
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
14
|
"exports": {
|
|
15
|
-
".":
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.mjs"
|
|
18
|
-
}
|
|
15
|
+
".": "./dist/index.mjs"
|
|
19
16
|
},
|
|
20
17
|
"imports": {
|
|
21
18
|
"#vite-node": "./dist/vite-node.mjs",
|
|
@@ -25,15 +22,15 @@
|
|
|
25
22
|
"dist"
|
|
26
23
|
],
|
|
27
24
|
"devDependencies": {
|
|
28
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-
|
|
25
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29466372.7f503428",
|
|
29
26
|
"nitropack": "2.12.9",
|
|
27
|
+
"obuild": "0.4.14",
|
|
30
28
|
"rolldown": "1.0.0-beta.58",
|
|
31
29
|
"rollup": "4.55.1",
|
|
32
|
-
"unbuild": "3.6.1",
|
|
33
30
|
"vue": "3.5.26"
|
|
34
31
|
},
|
|
35
32
|
"dependencies": {
|
|
36
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-
|
|
33
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29466372.7f503428",
|
|
37
34
|
"@rollup/plugin-replace": "^6.0.3",
|
|
38
35
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
39
36
|
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
|
@@ -65,7 +62,7 @@
|
|
|
65
62
|
"vue-bundle-renderer": "^2.2.0"
|
|
66
63
|
},
|
|
67
64
|
"peerDependencies": {
|
|
68
|
-
"nuxt": "npm:nuxt-nightly@4.3.0-
|
|
65
|
+
"nuxt": "npm:nuxt-nightly@4.3.0-29466372.7f503428",
|
|
69
66
|
"rolldown": "^1.0.0-beta.38",
|
|
70
67
|
"vue": "^3.3.4"
|
|
71
68
|
},
|
|
@@ -79,7 +76,7 @@
|
|
|
79
76
|
},
|
|
80
77
|
"_name": "@nuxt/vite-builder",
|
|
81
78
|
"scripts": {
|
|
82
|
-
"build:stub": "
|
|
79
|
+
"build:stub": "obuild --stub",
|
|
83
80
|
"test:attw": "attw --pack"
|
|
84
81
|
}
|
|
85
82
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ViteConfig } from 'nuxt/schema';
|
|
2
|
-
import { EnvironmentOptions } from 'vite';
|
|
3
|
-
import { NuxtBuilder } from '@nuxt/schema';
|
|
4
|
-
|
|
5
|
-
declare const bundle: NuxtBuilder['bundle'];
|
|
6
|
-
|
|
7
|
-
declare module 'nuxt/schema' {
|
|
8
|
-
interface ViteOptions extends ViteConfig {
|
|
9
|
-
$client?: EnvironmentOptions;
|
|
10
|
-
$server?: EnvironmentOptions;
|
|
11
|
-
viteNode?: {
|
|
12
|
-
maxRetryAttempts?: number;
|
|
13
|
-
/** in milliseconds */
|
|
14
|
-
baseRetryDelay?: number;
|
|
15
|
-
/** in milliseconds */
|
|
16
|
-
maxRetryDelay?: number;
|
|
17
|
-
/** in milliseconds */
|
|
18
|
-
requestTimeout?: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { bundle };
|
package/dist/vite-node.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Socket } from 'node:net';
|
|
2
|
-
import { PluginContainer } from 'vite';
|
|
3
|
-
import { FetchResult } from 'vite-node';
|
|
4
|
-
import { Manifest } from 'vue-bundle-renderer';
|
|
5
|
-
|
|
6
|
-
type ResolveIdResponse = Awaited<ReturnType<PluginContainer['resolveId']>>;
|
|
7
|
-
interface ViteNodeFetch {
|
|
8
|
-
/** Gets the client manifest. */
|
|
9
|
-
getManifest(): Promise<Manifest>;
|
|
10
|
-
/** Gets the list of invalidated files. */
|
|
11
|
-
getInvalidates(): Promise<string[]>;
|
|
12
|
-
/** Resolves a module ID. */
|
|
13
|
-
resolveId(id: string, importer?: string): Promise<ResolveIdResponse | null>;
|
|
14
|
-
/** Fetches a module. */
|
|
15
|
-
fetchModule(moduleId: string): Promise<FetchResult>;
|
|
16
|
-
/** Ensures the IPC socket is connected. */
|
|
17
|
-
ensureConnected(): Promise<Socket>;
|
|
18
|
-
}
|
|
19
|
-
type ViteNodeServerOptions = {
|
|
20
|
-
baseURL: string;
|
|
21
|
-
socketPath: string;
|
|
22
|
-
root: string;
|
|
23
|
-
entryPath: string;
|
|
24
|
-
base: string;
|
|
25
|
-
maxRetryAttempts?: number;
|
|
26
|
-
baseRetryDelay?: number;
|
|
27
|
-
maxRetryDelay?: number;
|
|
28
|
-
requestTimeout?: number;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
declare const viteNodeOptions: ViteNodeServerOptions;
|
|
32
|
-
declare const viteNodeFetch: ViteNodeFetch;
|
|
33
|
-
|
|
34
|
-
export { viteNodeFetch, viteNodeOptions };
|