@vitejs/devtools-rolldown 0.1.13 → 0.1.15
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.mjs +39 -712
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{BckBWP8Y.js → 5SREwa_J.js} +1 -1
- package/dist/public/_nuxt/B5QvmzNX.js +4 -0
- package/dist/public/_nuxt/BA4aNJdc.js +1 -0
- package/dist/public/_nuxt/{BbMdHIyp.js → BPvXWYcE.js} +1 -1
- package/dist/public/_nuxt/BRHdn2TP2.js +1 -0
- package/dist/public/_nuxt/{YInJexJm.js → BYcqRSer.js} +1 -1
- package/dist/public/_nuxt/{utGBqPQW.js → BodOO8Ge.js} +1 -1
- package/dist/public/_nuxt/Bt8oNIjq.js +1 -0
- package/dist/public/_nuxt/{CljeSbIq.js → BtFAY2HJ.js} +4 -4
- package/dist/public/_nuxt/{r0DxGHyz.js → C1f8uPlQ.js} +1 -1
- package/dist/public/_nuxt/C9-K8SRH.js +1 -0
- package/dist/public/_nuxt/{BrH7MV2S.js → CJmfH1zY.js} +1 -1
- package/dist/public/_nuxt/CJzuZNT1.js +2 -0
- package/dist/public/_nuxt/CL3oUTGS2.js +1 -0
- package/dist/public/_nuxt/CRfXUi3G.js +3 -0
- package/dist/public/_nuxt/CVZqt4yY2.js +1 -0
- package/dist/public/_nuxt/CfHRbb-n.js +1 -0
- package/dist/public/_nuxt/CjvJJTNy.js +1 -0
- package/dist/public/_nuxt/{hkrGm6WL.js → CorBKXDd.js} +1 -1
- package/dist/public/_nuxt/{BpHzZqln.js → CpTuuES2.js} +1 -1
- package/dist/public/_nuxt/{BKnfiF85.js → CqNyqKYk.js} +1 -1
- package/dist/public/_nuxt/{CfMio2JI2.js → CsPVvMxF.js} +1 -1
- package/dist/public/_nuxt/CzCoBrqM.js +1 -0
- package/dist/public/_nuxt/{wJd4eZyr.js → D0nH_IG_.js} +1 -1
- package/dist/public/_nuxt/{BMpbzaZm2.js → DEctdyhd.js} +1 -1
- package/dist/public/_nuxt/{ByozAWPX.js → DM5zgFwu.js} +1 -1
- package/dist/public/_nuxt/{BKUGy95W.js → DWUsdlci.js} +1 -1
- package/dist/public/_nuxt/D_58kiGa.js +1 -0
- package/dist/public/_nuxt/{DxL6khwF.js → Dab8rtPt.js} +1 -1
- package/dist/public/_nuxt/{DdnjLjA0.js → DlEGTOj9.js} +1 -1
- package/dist/public/_nuxt/DmctoHT82.js +1 -0
- package/dist/public/_nuxt/{Bgi9Q5oI2.js → DyCHFg1-2.js} +1 -1
- package/dist/public/_nuxt/{D5gbExwF.js → EWiwEEMI.js} +1 -1
- package/dist/public/_nuxt/{_session_.BcWOaqe_.css → _session_.Dk6Grde1.css} +1 -1
- package/dist/public/_nuxt/bh0jgFfK.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/325e31f5-a39f-4526-a997-a203cd2d5c81.json +1 -0
- package/dist/public/_nuxt/{entry.BbPdpfMZ.css → entry.bUxZ6pRq.css} +1 -1
- package/dist/public/_nuxt/error-404.CcKyMNIP.css +1 -0
- package/dist/public/_nuxt/error-500.Bsd8omR1.css +1 -0
- package/dist/public/_nuxt/{0b3Up9kD.js → hY2iPUYh.js} +1 -1
- package/dist/public/_nuxt/{BoT0VeIE2.js → jSaCY0lI2.js} +1 -1
- package/dist/public/_nuxt/{BJrTj8Zw.js → lNa1kApa.js} +1 -1
- package/dist/public/_nuxt/mLM3LnKH.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +12 -14
- package/dist/public/_nuxt/B78U2q4j.js +0 -1
- package/dist/public/_nuxt/BTLlCOZ3.js +0 -1
- package/dist/public/_nuxt/BfJK_SLU.js +0 -3
- package/dist/public/_nuxt/Bw6oKINi.js +0 -1
- package/dist/public/_nuxt/C3WaG9_l.js +0 -1
- package/dist/public/_nuxt/C6fMHFxG.js +0 -1
- package/dist/public/_nuxt/D1VsDu4A.js +0 -1
- package/dist/public/_nuxt/D8Vpa9yk2.js +0 -1
- package/dist/public/_nuxt/DJz_FUcO.js +0 -1
- package/dist/public/_nuxt/DKF2_lrC2.js +0 -1
- package/dist/public/_nuxt/DZUBLlU02.js +0 -1
- package/dist/public/_nuxt/Db9eNfm22.js +0 -1
- package/dist/public/_nuxt/Dddjvfu6.js +0 -1
- package/dist/public/_nuxt/DvOe6iF7.js +0 -1
- package/dist/public/_nuxt/FPPtwoaF.js +0 -1
- package/dist/public/_nuxt/MX5lF8O0.js +0 -1
- package/dist/public/_nuxt/builds/meta/13cd8559-86c3-48c3-847a-978c5a89a258.json +0 -1
- package/dist/public/_nuxt/error-404.CIXJRNVA.css +0 -1
- package/dist/public/_nuxt/error-500.D6HhFSba.css +0 -1
- package/dist/public/_nuxt/h4IG5O3d.js +0 -2
- package/dist/public/_nuxt/mPjDuzbZ2.js +0 -1
- package/dist/public/_nuxt/qiDKcEVG2.js +0 -1
- package/dist/public/_nuxt/yaHSMaAX.js +0 -1
- /package/dist/public/_nuxt/{D4aX0j39.js → 5tvbNeKa.js} +0 -0
- /package/dist/public/_nuxt/{XAUaDDss.js → BUwCbG2W.js} +0 -0
- /package/dist/public/_nuxt/{CKJSqDo0.js → CqfNwh25.js} +0 -0
- /package/dist/public/_nuxt/{Cvg1SSG2.js → DoJ6DaKu.js} +0 -0
- /package/dist/public/_nuxt/{CB2VayxA2.js → qIAw3Eg02.js} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -4,723 +4,35 @@ import { defineRpcFunction } from "@vitejs/devtools-kit";
|
|
|
4
4
|
import fs, { existsSync } from "node:fs";
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import { join } from "pathe";
|
|
7
|
+
import c from "ansis";
|
|
8
|
+
import { consoleReporter, createLogger, defineDiagnostics } from "logs-sdk";
|
|
9
|
+
import { ansiFormatter } from "logs-sdk/formatters/ansi";
|
|
7
10
|
import fs$1 from "node:fs/promises";
|
|
8
11
|
import { pipeline } from "node:stream/promises";
|
|
9
12
|
import split2 from "split2";
|
|
10
13
|
import { diffLines } from "diff";
|
|
11
|
-
|
|
14
|
+
//#region \0rolldown/runtime.js
|
|
15
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
12
16
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (typeof chunk == "string") this._transform = this._transformString;
|
|
25
|
-
else {
|
|
26
|
-
this._stringDecoder = new StringDecoder();
|
|
27
|
-
this._transform = this._transformBuffer;
|
|
28
|
-
}
|
|
29
|
-
this._transform(chunk, encoding, callback);
|
|
30
|
-
}
|
|
31
|
-
_transformBuffer(chunk, _, callback) {
|
|
32
|
-
this._buffer += this._stringDecoder.write(chunk);
|
|
33
|
-
this._processBuffer(callback);
|
|
34
|
-
}
|
|
35
|
-
_transformString(chunk, _, callback) {
|
|
36
|
-
this._buffer += chunk.toString();
|
|
37
|
-
this._processBuffer(callback);
|
|
38
|
-
}
|
|
39
|
-
_processBuffer(callback) {
|
|
40
|
-
if (this._buffer) {
|
|
41
|
-
this.push(this._buffer, "utf8");
|
|
42
|
-
this._buffer = "";
|
|
43
|
-
}
|
|
44
|
-
callback(null);
|
|
45
|
-
}
|
|
46
|
-
_flushInput() {
|
|
47
|
-
if (this._stringDecoder) this._buffer += this._stringDecoder.end();
|
|
48
|
-
}
|
|
49
|
-
_flush(callback) {
|
|
50
|
-
this._flushInput();
|
|
51
|
-
this._processBuffer(callback);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
module.exports = Utf8Stream;
|
|
55
|
-
}));
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/Parser.js
|
|
58
|
-
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
59
|
-
const Utf8Stream = require_Utf8Stream();
|
|
60
|
-
const patterns = {
|
|
61
|
-
value1: /^(?:[\"\{\[\]\-\d]|true\b|false\b|null\b|\s{1,256})/,
|
|
62
|
-
string: /^(?:[^\x00-\x1f\"\\]{1,256}|\\[bfnrt\"\\\/]|\\u[\da-fA-F]{4}|\")/,
|
|
63
|
-
key1: /^(?:[\"\}]|\s{1,256})/,
|
|
64
|
-
colon: /^(?:\:|\s{1,256})/,
|
|
65
|
-
comma: /^(?:[\,\]\}]|\s{1,256})/,
|
|
66
|
-
ws: /^\s{1,256}/,
|
|
67
|
-
numberStart: /^\d/,
|
|
68
|
-
numberDigit: /^\d{0,256}/,
|
|
69
|
-
numberFraction: /^[\.eE]/,
|
|
70
|
-
numberExponent: /^[eE]/,
|
|
71
|
-
numberExpSign: /^[-+]/
|
|
72
|
-
};
|
|
73
|
-
const MAX_PATTERN_SIZE = 16;
|
|
74
|
-
let noSticky = true;
|
|
75
|
-
try {
|
|
76
|
-
noSticky = false;
|
|
77
|
-
} catch (e) {}
|
|
78
|
-
!noSticky && Object.keys(patterns).forEach((key) => {
|
|
79
|
-
let src = patterns[key].source.slice(1);
|
|
80
|
-
if (src.slice(0, 3) === "(?:" && src.slice(-1) === ")") src = src.slice(3, -1);
|
|
81
|
-
patterns[key] = new RegExp(src, "y");
|
|
82
|
-
});
|
|
83
|
-
patterns.numberFracStart = patterns.numberExpStart = patterns.numberStart;
|
|
84
|
-
patterns.numberFracDigit = patterns.numberExpDigit = patterns.numberDigit;
|
|
85
|
-
const values = {
|
|
86
|
-
true: true,
|
|
87
|
-
false: false,
|
|
88
|
-
null: null
|
|
89
|
-
}, expected = {
|
|
90
|
-
object: "objectStop",
|
|
91
|
-
array: "arrayStop",
|
|
92
|
-
"": "done"
|
|
93
|
-
};
|
|
94
|
-
const fromHex = (s) => String.fromCharCode(parseInt(s.slice(2), 16));
|
|
95
|
-
const codes = {
|
|
96
|
-
b: "\b",
|
|
97
|
-
f: "\f",
|
|
98
|
-
n: "\n",
|
|
99
|
-
r: "\r",
|
|
100
|
-
t: " ",
|
|
101
|
-
"\"": "\"",
|
|
102
|
-
"\\": "\\",
|
|
103
|
-
"/": "/"
|
|
104
|
-
};
|
|
105
|
-
var Parser = class Parser extends Utf8Stream {
|
|
106
|
-
static make(options) {
|
|
107
|
-
return new Parser(options);
|
|
108
|
-
}
|
|
109
|
-
constructor(options) {
|
|
110
|
-
super(Object.assign({}, options, { readableObjectMode: true }));
|
|
111
|
-
this._packKeys = this._packStrings = this._packNumbers = this._streamKeys = this._streamStrings = this._streamNumbers = true;
|
|
112
|
-
if (options) {
|
|
113
|
-
"packValues" in options && (this._packKeys = this._packStrings = this._packNumbers = options.packValues);
|
|
114
|
-
"packKeys" in options && (this._packKeys = options.packKeys);
|
|
115
|
-
"packStrings" in options && (this._packStrings = options.packStrings);
|
|
116
|
-
"packNumbers" in options && (this._packNumbers = options.packNumbers);
|
|
117
|
-
"streamValues" in options && (this._streamKeys = this._streamStrings = this._streamNumbers = options.streamValues);
|
|
118
|
-
"streamKeys" in options && (this._streamKeys = options.streamKeys);
|
|
119
|
-
"streamStrings" in options && (this._streamStrings = options.streamStrings);
|
|
120
|
-
"streamNumbers" in options && (this._streamNumbers = options.streamNumbers);
|
|
121
|
-
this._jsonStreaming = options.jsonStreaming;
|
|
122
|
-
}
|
|
123
|
-
!this._packKeys && (this._streamKeys = true);
|
|
124
|
-
!this._packStrings && (this._streamStrings = true);
|
|
125
|
-
!this._packNumbers && (this._streamNumbers = true);
|
|
126
|
-
this._done = false;
|
|
127
|
-
this._expect = this._jsonStreaming ? "done" : "value";
|
|
128
|
-
this._stack = [];
|
|
129
|
-
this._parent = "";
|
|
130
|
-
this._open_number = false;
|
|
131
|
-
this._accumulator = "";
|
|
132
|
-
}
|
|
133
|
-
_flush(callback) {
|
|
134
|
-
this._done = true;
|
|
135
|
-
super._flush((error) => {
|
|
136
|
-
if (error) return callback(error);
|
|
137
|
-
if (this._open_number) {
|
|
138
|
-
if (this._streamNumbers) this.push({ name: "endNumber" });
|
|
139
|
-
this._open_number = false;
|
|
140
|
-
if (this._packNumbers) {
|
|
141
|
-
this.push({
|
|
142
|
-
name: "numberValue",
|
|
143
|
-
value: this._accumulator
|
|
144
|
-
});
|
|
145
|
-
this._accumulator = "";
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
callback(null);
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
_processBuffer(callback) {
|
|
152
|
-
let match, value, index = 0;
|
|
153
|
-
main: for (;;) switch (this._expect) {
|
|
154
|
-
case "value1":
|
|
155
|
-
case "value":
|
|
156
|
-
patterns.value1.lastIndex = index;
|
|
157
|
-
match = patterns.value1.exec(this._buffer);
|
|
158
|
-
if (!match) {
|
|
159
|
-
if (this._done || index + MAX_PATTERN_SIZE < this._buffer.length) {
|
|
160
|
-
if (index < this._buffer.length) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a value"));
|
|
161
|
-
return callback(/* @__PURE__ */ new Error("Parser has expected a value"));
|
|
162
|
-
}
|
|
163
|
-
break main;
|
|
164
|
-
}
|
|
165
|
-
value = match[0];
|
|
166
|
-
switch (value) {
|
|
167
|
-
case "\"":
|
|
168
|
-
this._streamStrings && this.push({ name: "startString" });
|
|
169
|
-
this._expect = "string";
|
|
170
|
-
break;
|
|
171
|
-
case "{":
|
|
172
|
-
this.push({ name: "startObject" });
|
|
173
|
-
this._stack.push(this._parent);
|
|
174
|
-
this._parent = "object";
|
|
175
|
-
this._expect = "key1";
|
|
176
|
-
break;
|
|
177
|
-
case "[":
|
|
178
|
-
this.push({ name: "startArray" });
|
|
179
|
-
this._stack.push(this._parent);
|
|
180
|
-
this._parent = "array";
|
|
181
|
-
this._expect = "value1";
|
|
182
|
-
break;
|
|
183
|
-
case "]":
|
|
184
|
-
if (this._expect !== "value1") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected token ']'"));
|
|
185
|
-
if (this._open_number) {
|
|
186
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
187
|
-
this._open_number = false;
|
|
188
|
-
if (this._packNumbers) {
|
|
189
|
-
this.push({
|
|
190
|
-
name: "numberValue",
|
|
191
|
-
value: this._accumulator
|
|
192
|
-
});
|
|
193
|
-
this._accumulator = "";
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
this.push({ name: "endArray" });
|
|
197
|
-
this._parent = this._stack.pop();
|
|
198
|
-
this._expect = expected[this._parent];
|
|
199
|
-
break;
|
|
200
|
-
case "-":
|
|
201
|
-
this._open_number = true;
|
|
202
|
-
if (this._streamNumbers) {
|
|
203
|
-
this.push({ name: "startNumber" });
|
|
204
|
-
this.push({
|
|
205
|
-
name: "numberChunk",
|
|
206
|
-
value: "-"
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
this._packNumbers && (this._accumulator = "-");
|
|
210
|
-
this._expect = "numberStart";
|
|
211
|
-
break;
|
|
212
|
-
case "0":
|
|
213
|
-
this._open_number = true;
|
|
214
|
-
if (this._streamNumbers) {
|
|
215
|
-
this.push({ name: "startNumber" });
|
|
216
|
-
this.push({
|
|
217
|
-
name: "numberChunk",
|
|
218
|
-
value: "0"
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
this._packNumbers && (this._accumulator = "0");
|
|
222
|
-
this._expect = "numberFraction";
|
|
223
|
-
break;
|
|
224
|
-
case "1":
|
|
225
|
-
case "2":
|
|
226
|
-
case "3":
|
|
227
|
-
case "4":
|
|
228
|
-
case "5":
|
|
229
|
-
case "6":
|
|
230
|
-
case "7":
|
|
231
|
-
case "8":
|
|
232
|
-
case "9":
|
|
233
|
-
this._open_number = true;
|
|
234
|
-
if (this._streamNumbers) {
|
|
235
|
-
this.push({ name: "startNumber" });
|
|
236
|
-
this.push({
|
|
237
|
-
name: "numberChunk",
|
|
238
|
-
value
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
this._packNumbers && (this._accumulator = value);
|
|
242
|
-
this._expect = "numberDigit";
|
|
243
|
-
break;
|
|
244
|
-
case "true":
|
|
245
|
-
case "false":
|
|
246
|
-
case "null":
|
|
247
|
-
if (this._buffer.length - index === value.length && !this._done) break main;
|
|
248
|
-
this.push({
|
|
249
|
-
name: value + "Value",
|
|
250
|
-
value: values[value]
|
|
251
|
-
});
|
|
252
|
-
this._expect = expected[this._parent];
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
256
|
-
else index += value.length;
|
|
257
|
-
break;
|
|
258
|
-
case "keyVal":
|
|
259
|
-
case "string":
|
|
260
|
-
patterns.string.lastIndex = index;
|
|
261
|
-
match = patterns.string.exec(this._buffer);
|
|
262
|
-
if (!match) {
|
|
263
|
-
if (index < this._buffer.length && (this._done || this._buffer.length - index >= 6)) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: escaped characters"));
|
|
264
|
-
if (this._done) return callback(/* @__PURE__ */ new Error("Parser has expected a string value"));
|
|
265
|
-
break main;
|
|
266
|
-
}
|
|
267
|
-
value = match[0];
|
|
268
|
-
if (value === "\"") if (this._expect === "keyVal") {
|
|
269
|
-
this._streamKeys && this.push({ name: "endKey" });
|
|
270
|
-
if (this._packKeys) {
|
|
271
|
-
this.push({
|
|
272
|
-
name: "keyValue",
|
|
273
|
-
value: this._accumulator
|
|
274
|
-
});
|
|
275
|
-
this._accumulator = "";
|
|
276
|
-
}
|
|
277
|
-
this._expect = "colon";
|
|
278
|
-
} else {
|
|
279
|
-
this._streamStrings && this.push({ name: "endString" });
|
|
280
|
-
if (this._packStrings) {
|
|
281
|
-
this.push({
|
|
282
|
-
name: "stringValue",
|
|
283
|
-
value: this._accumulator
|
|
284
|
-
});
|
|
285
|
-
this._accumulator = "";
|
|
286
|
-
}
|
|
287
|
-
this._expect = expected[this._parent];
|
|
288
|
-
}
|
|
289
|
-
else if (value.length > 1 && value.charAt(0) === "\\") {
|
|
290
|
-
const t = value.length == 2 ? codes[value.charAt(1)] : fromHex(value);
|
|
291
|
-
if (this._expect === "keyVal" ? this._streamKeys : this._streamStrings) this.push({
|
|
292
|
-
name: "stringChunk",
|
|
293
|
-
value: t
|
|
294
|
-
});
|
|
295
|
-
if (this._expect === "keyVal" ? this._packKeys : this._packStrings) this._accumulator += t;
|
|
296
|
-
} else {
|
|
297
|
-
if (this._expect === "keyVal" ? this._streamKeys : this._streamStrings) this.push({
|
|
298
|
-
name: "stringChunk",
|
|
299
|
-
value
|
|
300
|
-
});
|
|
301
|
-
if (this._expect === "keyVal" ? this._packKeys : this._packStrings) this._accumulator += value;
|
|
302
|
-
}
|
|
303
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
304
|
-
else index += value.length;
|
|
305
|
-
break;
|
|
306
|
-
case "key1":
|
|
307
|
-
case "key":
|
|
308
|
-
patterns.key1.lastIndex = index;
|
|
309
|
-
match = patterns.key1.exec(this._buffer);
|
|
310
|
-
if (!match) {
|
|
311
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected an object key"));
|
|
312
|
-
break main;
|
|
313
|
-
}
|
|
314
|
-
value = match[0];
|
|
315
|
-
if (value === "\"") {
|
|
316
|
-
this._streamKeys && this.push({ name: "startKey" });
|
|
317
|
-
this._expect = "keyVal";
|
|
318
|
-
} else if (value === "}") {
|
|
319
|
-
if (this._expect !== "key1") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected token '}'"));
|
|
320
|
-
this.push({ name: "endObject" });
|
|
321
|
-
this._parent = this._stack.pop();
|
|
322
|
-
this._expect = expected[this._parent];
|
|
323
|
-
}
|
|
324
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
325
|
-
else index += value.length;
|
|
326
|
-
break;
|
|
327
|
-
case "colon":
|
|
328
|
-
patterns.colon.lastIndex = index;
|
|
329
|
-
match = patterns.colon.exec(this._buffer);
|
|
330
|
-
if (!match) {
|
|
331
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected ':'"));
|
|
332
|
-
break main;
|
|
333
|
-
}
|
|
334
|
-
value = match[0];
|
|
335
|
-
value === ":" && (this._expect = "value");
|
|
336
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
337
|
-
else index += value.length;
|
|
338
|
-
break;
|
|
339
|
-
case "arrayStop":
|
|
340
|
-
case "objectStop":
|
|
341
|
-
patterns.comma.lastIndex = index;
|
|
342
|
-
match = patterns.comma.exec(this._buffer);
|
|
343
|
-
if (!match) {
|
|
344
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected ','"));
|
|
345
|
-
break main;
|
|
346
|
-
}
|
|
347
|
-
if (this._open_number) {
|
|
348
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
349
|
-
this._open_number = false;
|
|
350
|
-
if (this._packNumbers) {
|
|
351
|
-
this.push({
|
|
352
|
-
name: "numberValue",
|
|
353
|
-
value: this._accumulator
|
|
354
|
-
});
|
|
355
|
-
this._accumulator = "";
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
value = match[0];
|
|
359
|
-
if (value === ",") this._expect = this._expect === "arrayStop" ? "value" : "key";
|
|
360
|
-
else if (value === "}" || value === "]") {
|
|
361
|
-
if (value === "}" ? this._expect === "arrayStop" : this._expect !== "arrayStop") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected '" + (this._expect === "arrayStop" ? "]" : "}") + "'"));
|
|
362
|
-
this.push({ name: value === "}" ? "endObject" : "endArray" });
|
|
363
|
-
this._parent = this._stack.pop();
|
|
364
|
-
this._expect = expected[this._parent];
|
|
365
|
-
}
|
|
366
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
367
|
-
else index += value.length;
|
|
368
|
-
break;
|
|
369
|
-
case "numberStart":
|
|
370
|
-
patterns.numberStart.lastIndex = index;
|
|
371
|
-
match = patterns.numberStart.exec(this._buffer);
|
|
372
|
-
if (!match) {
|
|
373
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a starting digit"));
|
|
374
|
-
break main;
|
|
375
|
-
}
|
|
376
|
-
value = match[0];
|
|
377
|
-
this._streamNumbers && this.push({
|
|
378
|
-
name: "numberChunk",
|
|
379
|
-
value
|
|
380
|
-
});
|
|
381
|
-
this._packNumbers && (this._accumulator += value);
|
|
382
|
-
this._expect = value === "0" ? "numberFraction" : "numberDigit";
|
|
383
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
384
|
-
else index += value.length;
|
|
385
|
-
break;
|
|
386
|
-
case "numberDigit":
|
|
387
|
-
patterns.numberDigit.lastIndex = index;
|
|
388
|
-
match = patterns.numberDigit.exec(this._buffer);
|
|
389
|
-
if (!match) {
|
|
390
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a digit"));
|
|
391
|
-
break main;
|
|
392
|
-
}
|
|
393
|
-
value = match[0];
|
|
394
|
-
if (value) {
|
|
395
|
-
this._streamNumbers && this.push({
|
|
396
|
-
name: "numberChunk",
|
|
397
|
-
value
|
|
398
|
-
});
|
|
399
|
-
this._packNumbers && (this._accumulator += value);
|
|
400
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
401
|
-
else index += value.length;
|
|
402
|
-
} else {
|
|
403
|
-
if (index < this._buffer.length) {
|
|
404
|
-
this._expect = "numberFraction";
|
|
405
|
-
break;
|
|
406
|
-
}
|
|
407
|
-
if (this._done) {
|
|
408
|
-
this._expect = expected[this._parent];
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
break main;
|
|
412
|
-
}
|
|
413
|
-
break;
|
|
414
|
-
case "numberFraction":
|
|
415
|
-
patterns.numberFraction.lastIndex = index;
|
|
416
|
-
match = patterns.numberFraction.exec(this._buffer);
|
|
417
|
-
if (!match) {
|
|
418
|
-
if (index < this._buffer.length || this._done) {
|
|
419
|
-
this._expect = expected[this._parent];
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
break main;
|
|
423
|
-
}
|
|
424
|
-
value = match[0];
|
|
425
|
-
this._streamNumbers && this.push({
|
|
426
|
-
name: "numberChunk",
|
|
427
|
-
value
|
|
428
|
-
});
|
|
429
|
-
this._packNumbers && (this._accumulator += value);
|
|
430
|
-
this._expect = value === "." ? "numberFracStart" : "numberExpSign";
|
|
431
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
432
|
-
else index += value.length;
|
|
433
|
-
break;
|
|
434
|
-
case "numberFracStart":
|
|
435
|
-
patterns.numberFracStart.lastIndex = index;
|
|
436
|
-
match = patterns.numberFracStart.exec(this._buffer);
|
|
437
|
-
if (!match) {
|
|
438
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a fractional part of a number"));
|
|
439
|
-
break main;
|
|
440
|
-
}
|
|
441
|
-
value = match[0];
|
|
442
|
-
this._streamNumbers && this.push({
|
|
443
|
-
name: "numberChunk",
|
|
444
|
-
value
|
|
445
|
-
});
|
|
446
|
-
this._packNumbers && (this._accumulator += value);
|
|
447
|
-
this._expect = "numberFracDigit";
|
|
448
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
449
|
-
else index += value.length;
|
|
450
|
-
break;
|
|
451
|
-
case "numberFracDigit":
|
|
452
|
-
patterns.numberFracDigit.lastIndex = index;
|
|
453
|
-
match = patterns.numberFracDigit.exec(this._buffer);
|
|
454
|
-
value = match[0];
|
|
455
|
-
if (value) {
|
|
456
|
-
this._streamNumbers && this.push({
|
|
457
|
-
name: "numberChunk",
|
|
458
|
-
value
|
|
459
|
-
});
|
|
460
|
-
this._packNumbers && (this._accumulator += value);
|
|
461
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
462
|
-
else index += value.length;
|
|
463
|
-
} else {
|
|
464
|
-
if (index < this._buffer.length) {
|
|
465
|
-
this._expect = "numberExponent";
|
|
466
|
-
break;
|
|
467
|
-
}
|
|
468
|
-
if (this._done) {
|
|
469
|
-
this._expect = expected[this._parent];
|
|
470
|
-
break;
|
|
471
|
-
}
|
|
472
|
-
break main;
|
|
473
|
-
}
|
|
474
|
-
break;
|
|
475
|
-
case "numberExponent":
|
|
476
|
-
patterns.numberExponent.lastIndex = index;
|
|
477
|
-
match = patterns.numberExponent.exec(this._buffer);
|
|
478
|
-
if (!match) {
|
|
479
|
-
if (index < this._buffer.length) {
|
|
480
|
-
this._expect = expected[this._parent];
|
|
481
|
-
break;
|
|
482
|
-
}
|
|
483
|
-
if (this._done) {
|
|
484
|
-
this._expect = "done";
|
|
485
|
-
break;
|
|
486
|
-
}
|
|
487
|
-
break main;
|
|
488
|
-
}
|
|
489
|
-
value = match[0];
|
|
490
|
-
this._streamNumbers && this.push({
|
|
491
|
-
name: "numberChunk",
|
|
492
|
-
value
|
|
493
|
-
});
|
|
494
|
-
this._packNumbers && (this._accumulator += value);
|
|
495
|
-
this._expect = "numberExpSign";
|
|
496
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
497
|
-
else index += value.length;
|
|
498
|
-
break;
|
|
499
|
-
case "numberExpSign":
|
|
500
|
-
patterns.numberExpSign.lastIndex = index;
|
|
501
|
-
match = patterns.numberExpSign.exec(this._buffer);
|
|
502
|
-
if (!match) {
|
|
503
|
-
if (index < this._buffer.length) {
|
|
504
|
-
this._expect = "numberExpStart";
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
if (this._done) return callback(/* @__PURE__ */ new Error("Parser has expected an exponent value of a number"));
|
|
508
|
-
break main;
|
|
509
|
-
}
|
|
510
|
-
value = match[0];
|
|
511
|
-
this._streamNumbers && this.push({
|
|
512
|
-
name: "numberChunk",
|
|
513
|
-
value
|
|
514
|
-
});
|
|
515
|
-
this._packNumbers && (this._accumulator += value);
|
|
516
|
-
this._expect = "numberExpStart";
|
|
517
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
518
|
-
else index += value.length;
|
|
519
|
-
break;
|
|
520
|
-
case "numberExpStart":
|
|
521
|
-
patterns.numberExpStart.lastIndex = index;
|
|
522
|
-
match = patterns.numberExpStart.exec(this._buffer);
|
|
523
|
-
if (!match) {
|
|
524
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected an exponent part of a number"));
|
|
525
|
-
break main;
|
|
526
|
-
}
|
|
527
|
-
value = match[0];
|
|
528
|
-
this._streamNumbers && this.push({
|
|
529
|
-
name: "numberChunk",
|
|
530
|
-
value
|
|
531
|
-
});
|
|
532
|
-
this._packNumbers && (this._accumulator += value);
|
|
533
|
-
this._expect = "numberExpDigit";
|
|
534
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
535
|
-
else index += value.length;
|
|
536
|
-
break;
|
|
537
|
-
case "numberExpDigit":
|
|
538
|
-
patterns.numberExpDigit.lastIndex = index;
|
|
539
|
-
match = patterns.numberExpDigit.exec(this._buffer);
|
|
540
|
-
value = match[0];
|
|
541
|
-
if (value) {
|
|
542
|
-
this._streamNumbers && this.push({
|
|
543
|
-
name: "numberChunk",
|
|
544
|
-
value
|
|
545
|
-
});
|
|
546
|
-
this._packNumbers && (this._accumulator += value);
|
|
547
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
548
|
-
else index += value.length;
|
|
549
|
-
} else {
|
|
550
|
-
if (index < this._buffer.length || this._done) {
|
|
551
|
-
this._expect = expected[this._parent];
|
|
552
|
-
break;
|
|
553
|
-
}
|
|
554
|
-
break main;
|
|
555
|
-
}
|
|
556
|
-
break;
|
|
557
|
-
case "done":
|
|
558
|
-
patterns.ws.lastIndex = index;
|
|
559
|
-
match = patterns.ws.exec(this._buffer);
|
|
560
|
-
if (!match) {
|
|
561
|
-
if (index < this._buffer.length) {
|
|
562
|
-
if (this._jsonStreaming) {
|
|
563
|
-
this._expect = "value";
|
|
564
|
-
break;
|
|
565
|
-
}
|
|
566
|
-
return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected characters"));
|
|
567
|
-
}
|
|
568
|
-
break main;
|
|
569
|
-
}
|
|
570
|
-
value = match[0];
|
|
571
|
-
if (this._open_number) {
|
|
572
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
573
|
-
this._open_number = false;
|
|
574
|
-
if (this._packNumbers) {
|
|
575
|
-
this.push({
|
|
576
|
-
name: "numberValue",
|
|
577
|
-
value: this._accumulator
|
|
578
|
-
});
|
|
579
|
-
this._accumulator = "";
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
583
|
-
else index += value.length;
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
!noSticky && (this._buffer = this._buffer.slice(index));
|
|
587
|
-
callback(null);
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
Parser.parser = Parser.make;
|
|
591
|
-
Parser.make.Constructor = Parser;
|
|
592
|
-
module.exports = Parser;
|
|
593
|
-
}));
|
|
594
|
-
//#endregion
|
|
595
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/utils/emit.js
|
|
596
|
-
var require_emit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
597
|
-
const emit = (stream) => stream.on("data", (item) => stream.emit(item.name, item.value));
|
|
598
|
-
module.exports = emit;
|
|
599
|
-
}));
|
|
600
|
-
//#endregion
|
|
601
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/index.js
|
|
602
|
-
var require_stream_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
603
|
-
const Parser = require_Parser();
|
|
604
|
-
const emit = require_emit();
|
|
605
|
-
const make = (options) => emit(new Parser(options));
|
|
606
|
-
make.Parser = Parser;
|
|
607
|
-
make.parser = Parser.parser;
|
|
608
|
-
module.exports = make;
|
|
609
|
-
}));
|
|
610
|
-
//#endregion
|
|
611
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/Assembler.js
|
|
612
|
-
var require_Assembler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
613
|
-
const EventEmitter = __require("events");
|
|
614
|
-
const startObject = (Ctr) => function() {
|
|
615
|
-
if (this.done) this.done = false;
|
|
616
|
-
else this.stack.push(this.current, this.key);
|
|
617
|
-
this.current = new Ctr();
|
|
618
|
-
this.key = null;
|
|
619
|
-
};
|
|
620
|
-
var Assembler = class Assembler extends EventEmitter {
|
|
621
|
-
static connectTo(stream, options) {
|
|
622
|
-
return new Assembler(options).connectTo(stream);
|
|
623
|
-
}
|
|
624
|
-
constructor(options) {
|
|
625
|
-
super();
|
|
626
|
-
this.stack = [];
|
|
627
|
-
this.current = this.key = null;
|
|
628
|
-
this.done = true;
|
|
629
|
-
if (options) {
|
|
630
|
-
this.reviver = typeof options.reviver == "function" && options.reviver;
|
|
631
|
-
if (this.reviver) this.stringValue = this._saveValue = this._saveValueWithReviver;
|
|
632
|
-
if (options.numberAsString) this.numberValue = this.stringValue;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
connectTo(stream) {
|
|
636
|
-
stream.on("data", (chunk) => {
|
|
637
|
-
if (this[chunk.name]) {
|
|
638
|
-
this[chunk.name](chunk.value);
|
|
639
|
-
if (this.done) this.emit("done", this);
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
return this;
|
|
643
|
-
}
|
|
644
|
-
get depth() {
|
|
645
|
-
return (this.stack.length >> 1) + (this.done ? 0 : 1);
|
|
646
|
-
}
|
|
647
|
-
get path() {
|
|
648
|
-
const path = [];
|
|
649
|
-
for (let i = 0; i < this.stack.length; i += 2) {
|
|
650
|
-
const key = this.stack[i + 1];
|
|
651
|
-
path.push(key === null ? this.stack[i].length : key);
|
|
652
|
-
}
|
|
653
|
-
return path;
|
|
654
|
-
}
|
|
655
|
-
dropToLevel(level) {
|
|
656
|
-
if (level < this.depth) if (level) {
|
|
657
|
-
const index = level - 1 << 1;
|
|
658
|
-
this.current = this.stack[index];
|
|
659
|
-
this.key = this.stack[index + 1];
|
|
660
|
-
this.stack.splice(index);
|
|
661
|
-
} else {
|
|
662
|
-
this.stack = [];
|
|
663
|
-
this.current = this.key = null;
|
|
664
|
-
this.done = true;
|
|
665
|
-
}
|
|
666
|
-
return this;
|
|
667
|
-
}
|
|
668
|
-
consume(chunk) {
|
|
669
|
-
this[chunk.name] && this[chunk.name](chunk.value);
|
|
670
|
-
return this;
|
|
671
|
-
}
|
|
672
|
-
keyValue(value) {
|
|
673
|
-
this.key = value;
|
|
674
|
-
}
|
|
675
|
-
numberValue(value) {
|
|
676
|
-
this._saveValue(parseFloat(value));
|
|
677
|
-
}
|
|
678
|
-
nullValue() {
|
|
679
|
-
this._saveValue(null);
|
|
680
|
-
}
|
|
681
|
-
trueValue() {
|
|
682
|
-
this._saveValue(true);
|
|
683
|
-
}
|
|
684
|
-
falseValue() {
|
|
685
|
-
this._saveValue(false);
|
|
686
|
-
}
|
|
687
|
-
endObject() {
|
|
688
|
-
if (this.stack.length) {
|
|
689
|
-
const value = this.current;
|
|
690
|
-
this.key = this.stack.pop();
|
|
691
|
-
this.current = this.stack.pop();
|
|
692
|
-
this._saveValue(value);
|
|
693
|
-
} else this.done = true;
|
|
694
|
-
}
|
|
695
|
-
_saveValue(value) {
|
|
696
|
-
if (this.done) this.current = value;
|
|
697
|
-
else if (this.current instanceof Array) this.current.push(value);
|
|
698
|
-
else {
|
|
699
|
-
this.current[this.key] = value;
|
|
700
|
-
this.key = null;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
_saveValueWithReviver(value) {
|
|
704
|
-
if (this.done) this.current = this.reviver("", value);
|
|
705
|
-
else if (this.current instanceof Array) {
|
|
706
|
-
value = this.reviver("" + this.current.length, value);
|
|
707
|
-
this.current.push(value);
|
|
708
|
-
if (value === void 0) delete this.current[this.current.length - 1];
|
|
709
|
-
} else {
|
|
710
|
-
value = this.reviver(this.key, value);
|
|
711
|
-
if (value !== void 0) this.current[this.key] = value;
|
|
712
|
-
this.key = null;
|
|
17
|
+
const logger = createLogger({
|
|
18
|
+
diagnostics: [defineDiagnostics({
|
|
19
|
+
docsBase: "https://devtools.vite.dev/errors",
|
|
20
|
+
codes: {
|
|
21
|
+
RDDT0001: {
|
|
22
|
+
message: "Rolldown logs directory `.rolldown` not found, you might want to run build with `build.rolldownOptions.devtools` enabled first.",
|
|
23
|
+
level: "warn"
|
|
24
|
+
},
|
|
25
|
+
RDDT0002: {
|
|
26
|
+
message: (p) => `JSON parse stream skip bad line ${p.line}: ${p.error}\n${p.preview}`,
|
|
27
|
+
level: "warn"
|
|
713
28
|
}
|
|
714
29
|
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}));
|
|
722
|
-
require_stream_json();
|
|
723
|
-
require_Assembler();
|
|
30
|
+
})],
|
|
31
|
+
formatter: ansiFormatter(c),
|
|
32
|
+
reporters: consoleReporter
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/node/utils/json-parse-stream.ts
|
|
724
36
|
async function parseJsonStreamWithConcatArrays(stream, processor) {
|
|
725
37
|
const values = [];
|
|
726
38
|
let lineNumber = 0;
|
|
@@ -734,7 +46,11 @@ async function parseJsonStreamWithConcatArrays(stream, processor) {
|
|
|
734
46
|
values.push(result);
|
|
735
47
|
} catch (e) {
|
|
736
48
|
const preview = line.length > 256 ? `${line.slice(0, 256)}...` : line;
|
|
737
|
-
|
|
49
|
+
logger.RDDT0002({
|
|
50
|
+
line: lineNumber,
|
|
51
|
+
error: e.message,
|
|
52
|
+
preview
|
|
53
|
+
}).log();
|
|
738
54
|
}
|
|
739
55
|
}
|
|
740
56
|
});
|
|
@@ -1026,7 +342,7 @@ function getLogsManager(context) {
|
|
|
1026
342
|
if (!manager) {
|
|
1027
343
|
const dirs = [join(context.cwd, "node_modules", ".rolldown"), join(process$1.cwd(), "node_modules", ".rolldown")];
|
|
1028
344
|
const dir = dirs.find((dir) => existsSync(dir));
|
|
1029
|
-
if (!dir)
|
|
345
|
+
if (!dir) logger.RDDT0001().log();
|
|
1030
346
|
manager = new RolldownLogsManager(dir ?? dirs[0]);
|
|
1031
347
|
}
|
|
1032
348
|
return manager;
|
|
@@ -1036,6 +352,7 @@ function getLogsManager(context) {
|
|
|
1036
352
|
const rolldownGetAssetDetails = defineRpcFunction({
|
|
1037
353
|
name: "vite:rolldown:get-asset-details",
|
|
1038
354
|
type: "query",
|
|
355
|
+
cacheable: true,
|
|
1039
356
|
setup: (context) => {
|
|
1040
357
|
const manager = getLogsManager(context);
|
|
1041
358
|
return { handler: async ({ session, id }) => {
|
|
@@ -1062,6 +379,7 @@ const rolldownGetAssetDetails = defineRpcFunction({
|
|
|
1062
379
|
const rolldownGetAssetsList = defineRpcFunction({
|
|
1063
380
|
name: "vite:rolldown:get-assets-list",
|
|
1064
381
|
type: "query",
|
|
382
|
+
cacheable: true,
|
|
1065
383
|
setup: (context) => {
|
|
1066
384
|
const manager = getLogsManager(context);
|
|
1067
385
|
return { handler: async ({ session }) => {
|
|
@@ -1075,6 +393,7 @@ const rolldownGetAssetsList = defineRpcFunction({
|
|
|
1075
393
|
const rolldownGetChunkInfo = defineRpcFunction({
|
|
1076
394
|
name: "vite:rolldown:get-chunk-info",
|
|
1077
395
|
type: "query",
|
|
396
|
+
cacheable: true,
|
|
1078
397
|
setup: (context) => {
|
|
1079
398
|
const manager = getLogsManager(context);
|
|
1080
399
|
return { handler: async ({ session, id }) => {
|
|
@@ -1090,6 +409,7 @@ const rolldownGetChunkInfo = defineRpcFunction({
|
|
|
1090
409
|
const rolldownGetChunksGraph = defineRpcFunction({
|
|
1091
410
|
name: "vite:rolldown:get-chunks-graph",
|
|
1092
411
|
type: "query",
|
|
412
|
+
cacheable: true,
|
|
1093
413
|
setup: (context) => {
|
|
1094
414
|
const manager = getLogsManager(context);
|
|
1095
415
|
return { handler: async ({ session }) => {
|
|
@@ -1107,6 +427,7 @@ const rolldownGetChunksGraph = defineRpcFunction({
|
|
|
1107
427
|
const rolldownGetModuleInfo = defineRpcFunction({
|
|
1108
428
|
name: "vite:rolldown:get-module-info",
|
|
1109
429
|
type: "query",
|
|
430
|
+
cacheable: true,
|
|
1110
431
|
setup: (context) => {
|
|
1111
432
|
const manager = getLogsManager(context);
|
|
1112
433
|
return { handler: async ({ session, module }) => {
|
|
@@ -10585,6 +9906,7 @@ async function getPackagesManifest(reader) {
|
|
|
10585
9906
|
const rolldownGetPackages = defineRpcFunction({
|
|
10586
9907
|
name: "vite:rolldown:get-packages",
|
|
10587
9908
|
type: "query",
|
|
9909
|
+
cacheable: true,
|
|
10588
9910
|
setup: (context) => {
|
|
10589
9911
|
const manager = getLogsManager(context);
|
|
10590
9912
|
return { handler: async ({ session }) => {
|
|
@@ -10633,6 +9955,7 @@ const rolldownGetPackages = defineRpcFunction({
|
|
|
10633
9955
|
const rolldownGetPackageDetails = defineRpcFunction({
|
|
10634
9956
|
name: "vite:rolldown:get-package-details",
|
|
10635
9957
|
type: "query",
|
|
9958
|
+
cacheable: true,
|
|
10636
9959
|
setup: (context) => {
|
|
10637
9960
|
const manager = getLogsManager(context);
|
|
10638
9961
|
return { handler: async ({ session, id }) => {
|
|
@@ -10645,6 +9968,7 @@ const rolldownGetPackageDetails = defineRpcFunction({
|
|
|
10645
9968
|
const rolldownGetPluginDetails = defineRpcFunction({
|
|
10646
9969
|
name: "vite:rolldown:get-plugin-details",
|
|
10647
9970
|
type: "query",
|
|
9971
|
+
cacheable: true,
|
|
10648
9972
|
setup: (context) => {
|
|
10649
9973
|
const manager = getLogsManager(context);
|
|
10650
9974
|
return { handler: async ({ session, id }) => {
|
|
@@ -10687,6 +10011,7 @@ const rolldownGetRawEvents = defineRpcFunction({
|
|
|
10687
10011
|
const rolldownGetSessionCompareSummary = defineRpcFunction({
|
|
10688
10012
|
name: "vite:rolldown:get-session-compare-summary",
|
|
10689
10013
|
type: "query",
|
|
10014
|
+
cacheable: true,
|
|
10690
10015
|
setup: async (context) => {
|
|
10691
10016
|
const manager = getLogsManager(context);
|
|
10692
10017
|
return { handler: async ({ sessions }) => {
|
|
@@ -10715,6 +10040,7 @@ const rolldownGetSessionCompareSummary = defineRpcFunction({
|
|
|
10715
10040
|
const rolldownGetSessionSummary = defineRpcFunction({
|
|
10716
10041
|
name: "vite:rolldown:get-session-summary",
|
|
10717
10042
|
type: "query",
|
|
10043
|
+
cacheable: true,
|
|
10718
10044
|
dump: async (context) => {
|
|
10719
10045
|
return { inputs: (await getLogsManager(context).list()).map((session) => [{ session: session.id }]) };
|
|
10720
10046
|
},
|
|
@@ -10736,6 +10062,7 @@ const rolldownGetSessionSummary = defineRpcFunction({
|
|
|
10736
10062
|
const rpcFunctions = [
|
|
10737
10063
|
defineRpcFunction({
|
|
10738
10064
|
name: "vite:rolldown:list-sessions",
|
|
10065
|
+
cacheable: true,
|
|
10739
10066
|
type: "static",
|
|
10740
10067
|
setup: (context) => {
|
|
10741
10068
|
const manager = getLogsManager(context);
|