@vitejs/devtools-rolldown 0.1.14 → 0.1.16
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 +11 -711
- package/dist/nitro.json +3 -3
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/-w-An_zz.js +1 -0
- package/dist/public/_nuxt/8kHoufi2.js +1 -0
- package/dist/public/_nuxt/B2NMBmj_.js +1 -0
- package/dist/public/_nuxt/{CvIcovUx.js → BE1TLHgg.js} +1 -1
- package/dist/public/_nuxt/BJ9pydg6.js +2 -0
- package/dist/public/_nuxt/{CAxq65JE.js → BQl8ArzK.js} +1 -1
- package/dist/public/_nuxt/BSjCyhkj2.js +1 -0
- package/dist/public/_nuxt/{D4jlwaNB.js → BYXvfkhc.js} +1 -1
- package/dist/public/_nuxt/{DTdHAjiB.js → Bc5RWlzj.js} +1 -1
- package/dist/public/_nuxt/{DbWf6qhI.js → BhOKQpS-.js} +1 -1
- package/dist/public/_nuxt/BxJPsu8U.js +1 -0
- package/dist/public/_nuxt/C--RKQDq.js +3 -0
- package/dist/public/_nuxt/C0GrmOiu2.js +1 -0
- package/dist/public/_nuxt/C1hgbwL7.js +1 -0
- package/dist/public/_nuxt/C8iXMxN52.js +1 -0
- package/dist/public/_nuxt/CFOnv7GG2.js +1 -0
- package/dist/public/_nuxt/CH0ckrws2.js +1 -0
- package/dist/public/_nuxt/{DSoAPWwt.js → COiP6LWy.js} +1 -1
- package/dist/public/_nuxt/Cdb7S98v.js +1 -0
- package/dist/public/_nuxt/{Tr_XYnUk.js → CnkQlf-T.js} +1 -1
- package/dist/public/_nuxt/{C02RviGn.js → Cq-Z9D0_.js} +5 -5
- package/dist/public/_nuxt/D-KdwVBL.js +1 -0
- package/dist/public/_nuxt/{IXT41VJR2.js → D2AP-caS.js} +1 -1
- package/dist/public/_nuxt/D7YBGhmX.js +4 -0
- package/dist/public/_nuxt/D8Se1EWj.js +1 -0
- package/dist/public/_nuxt/DCPELPdh.js +1 -0
- package/dist/public/_nuxt/DCcvbzkD.js +1 -0
- package/dist/public/_nuxt/{BjZ7VsBs.js → DGOkTiBT.js} +1 -1
- package/dist/public/_nuxt/DQnWYYE62.js +1 -0
- package/dist/public/_nuxt/D_gteVIt.js +1 -0
- package/dist/public/_nuxt/D_zbH50i.js +1 -0
- package/dist/public/_nuxt/DataVirtualList.B_Uggh0w.css +1 -0
- package/dist/public/_nuxt/DlC6-hYe.js +1 -0
- package/dist/public/_nuxt/Dlysmnsb.js +1 -0
- package/dist/public/_nuxt/{D4E2wny2.js → DvZ2T9qR.js} +1 -1
- package/dist/public/_nuxt/UafQrA6G.js +1 -0
- package/dist/public/_nuxt/{CFObDroh.js → XfS7e3PM.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/491cb882-8fb8-455f-9f0c-7ab7cf8e8aa1.json +1 -0
- package/dist/public/_nuxt/{entry.CbbdWxzq.css → entry.DOhOf2z2.css} +1 -1
- package/dist/public/_nuxt/{CamH1KH0.js → erfZtSN7.js} +1 -1
- package/dist/public/_nuxt/error-404.DkiWPM7Q.css +1 -0
- package/dist/public/_nuxt/error-500.Wfu13SYC.css +1 -0
- package/dist/public/_nuxt/jJY8e3xp.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +6 -9
- package/dist/public/_nuxt/3BR2rGwa2.js +0 -1
- package/dist/public/_nuxt/7rrIsy642.js +0 -1
- package/dist/public/_nuxt/B5xLZRxY.js +0 -1
- package/dist/public/_nuxt/B6OHrQeC2.js +0 -1
- package/dist/public/_nuxt/BThj2MnF2.js +0 -1
- package/dist/public/_nuxt/BeQJpPc92.js +0 -1
- package/dist/public/_nuxt/BnfqOA1X.js +0 -1
- package/dist/public/_nuxt/C40OUFSo.js +0 -1
- package/dist/public/_nuxt/C4yBgUNR2.js +0 -1
- package/dist/public/_nuxt/C7Lq8IPO2.js +0 -1
- package/dist/public/_nuxt/CG8firEW.js +0 -1
- package/dist/public/_nuxt/CJcWOi7f2.js +0 -1
- package/dist/public/_nuxt/CRfXUi3G.js +0 -3
- package/dist/public/_nuxt/CpTuuES2.js +0 -1
- package/dist/public/_nuxt/Cqm3ivh3.js +0 -1
- package/dist/public/_nuxt/CumoT9Yv.js +0 -1
- package/dist/public/_nuxt/D4DSKOxi.js +0 -1
- package/dist/public/_nuxt/DIkh4Ihm.js +0 -1
- package/dist/public/_nuxt/DOojupaZ.js +0 -1
- package/dist/public/_nuxt/Da-Cy6_f.js +0 -1
- package/dist/public/_nuxt/DataVirtualList.Co38wNF1.css +0 -1
- package/dist/public/_nuxt/Ddjd19f0.js +0 -1
- package/dist/public/_nuxt/DleERjsP.js +0 -1
- package/dist/public/_nuxt/Doipuu3T.js +0 -4
- package/dist/public/_nuxt/FqP4tEhK.js +0 -2
- package/dist/public/_nuxt/I4lEnjGE.js +0 -1
- package/dist/public/_nuxt/T-TsUncA.js +0 -1
- package/dist/public/_nuxt/X2CLGAe8.js +0 -1
- package/dist/public/_nuxt/builds/meta/c208083b-bacd-45d3-b548-439e861d4853.json +0 -1
- package/dist/public/_nuxt/dT0PHReP.js +0 -1
- package/dist/public/_nuxt/error-404.BeKtb6Ri.css +0 -1
- package/dist/public/_nuxt/error-500.DRkk-cad.css +0 -1
- package/dist/public/_nuxt/us8qIYFu2.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
|
@@ -11,7 +11,8 @@ import fs$1 from "node:fs/promises";
|
|
|
11
11
|
import { pipeline } from "node:stream/promises";
|
|
12
12
|
import split2 from "split2";
|
|
13
13
|
import { diffLines } from "diff";
|
|
14
|
-
|
|
14
|
+
//#region \0rolldown/runtime.js
|
|
15
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
15
16
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
16
17
|
const logger = createLogger({
|
|
17
18
|
diagnostics: [defineDiagnostics({
|
|
@@ -31,716 +32,7 @@ const logger = createLogger({
|
|
|
31
32
|
reporters: consoleReporter
|
|
32
33
|
});
|
|
33
34
|
//#endregion
|
|
34
|
-
//#region
|
|
35
|
-
var require_Utf8Stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
36
|
-
const { Transform } = __require("stream");
|
|
37
|
-
const { StringDecoder } = __require("string_decoder");
|
|
38
|
-
var Utf8Stream = class extends Transform {
|
|
39
|
-
constructor(options) {
|
|
40
|
-
super(Object.assign({}, options, { writableObjectMode: false }));
|
|
41
|
-
this._buffer = "";
|
|
42
|
-
}
|
|
43
|
-
_transform(chunk, encoding, callback) {
|
|
44
|
-
if (typeof chunk == "string") this._transform = this._transformString;
|
|
45
|
-
else {
|
|
46
|
-
this._stringDecoder = new StringDecoder();
|
|
47
|
-
this._transform = this._transformBuffer;
|
|
48
|
-
}
|
|
49
|
-
this._transform(chunk, encoding, callback);
|
|
50
|
-
}
|
|
51
|
-
_transformBuffer(chunk, _, callback) {
|
|
52
|
-
this._buffer += this._stringDecoder.write(chunk);
|
|
53
|
-
this._processBuffer(callback);
|
|
54
|
-
}
|
|
55
|
-
_transformString(chunk, _, callback) {
|
|
56
|
-
this._buffer += chunk.toString();
|
|
57
|
-
this._processBuffer(callback);
|
|
58
|
-
}
|
|
59
|
-
_processBuffer(callback) {
|
|
60
|
-
if (this._buffer) {
|
|
61
|
-
this.push(this._buffer, "utf8");
|
|
62
|
-
this._buffer = "";
|
|
63
|
-
}
|
|
64
|
-
callback(null);
|
|
65
|
-
}
|
|
66
|
-
_flushInput() {
|
|
67
|
-
if (this._stringDecoder) this._buffer += this._stringDecoder.end();
|
|
68
|
-
}
|
|
69
|
-
_flush(callback) {
|
|
70
|
-
this._flushInput();
|
|
71
|
-
this._processBuffer(callback);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
module.exports = Utf8Stream;
|
|
75
|
-
}));
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/Parser.js
|
|
78
|
-
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
79
|
-
const Utf8Stream = require_Utf8Stream();
|
|
80
|
-
const patterns = {
|
|
81
|
-
value1: /^(?:[\"\{\[\]\-\d]|true\b|false\b|null\b|\s{1,256})/,
|
|
82
|
-
string: /^(?:[^\x00-\x1f\"\\]{1,256}|\\[bfnrt\"\\\/]|\\u[\da-fA-F]{4}|\")/,
|
|
83
|
-
key1: /^(?:[\"\}]|\s{1,256})/,
|
|
84
|
-
colon: /^(?:\:|\s{1,256})/,
|
|
85
|
-
comma: /^(?:[\,\]\}]|\s{1,256})/,
|
|
86
|
-
ws: /^\s{1,256}/,
|
|
87
|
-
numberStart: /^\d/,
|
|
88
|
-
numberDigit: /^\d{0,256}/,
|
|
89
|
-
numberFraction: /^[\.eE]/,
|
|
90
|
-
numberExponent: /^[eE]/,
|
|
91
|
-
numberExpSign: /^[-+]/
|
|
92
|
-
};
|
|
93
|
-
const MAX_PATTERN_SIZE = 16;
|
|
94
|
-
let noSticky = true;
|
|
95
|
-
try {
|
|
96
|
-
noSticky = false;
|
|
97
|
-
} catch (e) {}
|
|
98
|
-
!noSticky && Object.keys(patterns).forEach((key) => {
|
|
99
|
-
let src = patterns[key].source.slice(1);
|
|
100
|
-
if (src.slice(0, 3) === "(?:" && src.slice(-1) === ")") src = src.slice(3, -1);
|
|
101
|
-
patterns[key] = new RegExp(src, "y");
|
|
102
|
-
});
|
|
103
|
-
patterns.numberFracStart = patterns.numberExpStart = patterns.numberStart;
|
|
104
|
-
patterns.numberFracDigit = patterns.numberExpDigit = patterns.numberDigit;
|
|
105
|
-
const values = {
|
|
106
|
-
true: true,
|
|
107
|
-
false: false,
|
|
108
|
-
null: null
|
|
109
|
-
}, expected = {
|
|
110
|
-
object: "objectStop",
|
|
111
|
-
array: "arrayStop",
|
|
112
|
-
"": "done"
|
|
113
|
-
};
|
|
114
|
-
const fromHex = (s) => String.fromCharCode(parseInt(s.slice(2), 16));
|
|
115
|
-
const codes = {
|
|
116
|
-
b: "\b",
|
|
117
|
-
f: "\f",
|
|
118
|
-
n: "\n",
|
|
119
|
-
r: "\r",
|
|
120
|
-
t: " ",
|
|
121
|
-
"\"": "\"",
|
|
122
|
-
"\\": "\\",
|
|
123
|
-
"/": "/"
|
|
124
|
-
};
|
|
125
|
-
var Parser = class Parser extends Utf8Stream {
|
|
126
|
-
static make(options) {
|
|
127
|
-
return new Parser(options);
|
|
128
|
-
}
|
|
129
|
-
constructor(options) {
|
|
130
|
-
super(Object.assign({}, options, { readableObjectMode: true }));
|
|
131
|
-
this._packKeys = this._packStrings = this._packNumbers = this._streamKeys = this._streamStrings = this._streamNumbers = true;
|
|
132
|
-
if (options) {
|
|
133
|
-
"packValues" in options && (this._packKeys = this._packStrings = this._packNumbers = options.packValues);
|
|
134
|
-
"packKeys" in options && (this._packKeys = options.packKeys);
|
|
135
|
-
"packStrings" in options && (this._packStrings = options.packStrings);
|
|
136
|
-
"packNumbers" in options && (this._packNumbers = options.packNumbers);
|
|
137
|
-
"streamValues" in options && (this._streamKeys = this._streamStrings = this._streamNumbers = options.streamValues);
|
|
138
|
-
"streamKeys" in options && (this._streamKeys = options.streamKeys);
|
|
139
|
-
"streamStrings" in options && (this._streamStrings = options.streamStrings);
|
|
140
|
-
"streamNumbers" in options && (this._streamNumbers = options.streamNumbers);
|
|
141
|
-
this._jsonStreaming = options.jsonStreaming;
|
|
142
|
-
}
|
|
143
|
-
!this._packKeys && (this._streamKeys = true);
|
|
144
|
-
!this._packStrings && (this._streamStrings = true);
|
|
145
|
-
!this._packNumbers && (this._streamNumbers = true);
|
|
146
|
-
this._done = false;
|
|
147
|
-
this._expect = this._jsonStreaming ? "done" : "value";
|
|
148
|
-
this._stack = [];
|
|
149
|
-
this._parent = "";
|
|
150
|
-
this._open_number = false;
|
|
151
|
-
this._accumulator = "";
|
|
152
|
-
}
|
|
153
|
-
_flush(callback) {
|
|
154
|
-
this._done = true;
|
|
155
|
-
super._flush((error) => {
|
|
156
|
-
if (error) return callback(error);
|
|
157
|
-
if (this._open_number) {
|
|
158
|
-
if (this._streamNumbers) this.push({ name: "endNumber" });
|
|
159
|
-
this._open_number = false;
|
|
160
|
-
if (this._packNumbers) {
|
|
161
|
-
this.push({
|
|
162
|
-
name: "numberValue",
|
|
163
|
-
value: this._accumulator
|
|
164
|
-
});
|
|
165
|
-
this._accumulator = "";
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
callback(null);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
_processBuffer(callback) {
|
|
172
|
-
let match, value, index = 0;
|
|
173
|
-
main: for (;;) switch (this._expect) {
|
|
174
|
-
case "value1":
|
|
175
|
-
case "value":
|
|
176
|
-
patterns.value1.lastIndex = index;
|
|
177
|
-
match = patterns.value1.exec(this._buffer);
|
|
178
|
-
if (!match) {
|
|
179
|
-
if (this._done || index + MAX_PATTERN_SIZE < this._buffer.length) {
|
|
180
|
-
if (index < this._buffer.length) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a value"));
|
|
181
|
-
return callback(/* @__PURE__ */ new Error("Parser has expected a value"));
|
|
182
|
-
}
|
|
183
|
-
break main;
|
|
184
|
-
}
|
|
185
|
-
value = match[0];
|
|
186
|
-
switch (value) {
|
|
187
|
-
case "\"":
|
|
188
|
-
this._streamStrings && this.push({ name: "startString" });
|
|
189
|
-
this._expect = "string";
|
|
190
|
-
break;
|
|
191
|
-
case "{":
|
|
192
|
-
this.push({ name: "startObject" });
|
|
193
|
-
this._stack.push(this._parent);
|
|
194
|
-
this._parent = "object";
|
|
195
|
-
this._expect = "key1";
|
|
196
|
-
break;
|
|
197
|
-
case "[":
|
|
198
|
-
this.push({ name: "startArray" });
|
|
199
|
-
this._stack.push(this._parent);
|
|
200
|
-
this._parent = "array";
|
|
201
|
-
this._expect = "value1";
|
|
202
|
-
break;
|
|
203
|
-
case "]":
|
|
204
|
-
if (this._expect !== "value1") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected token ']'"));
|
|
205
|
-
if (this._open_number) {
|
|
206
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
207
|
-
this._open_number = false;
|
|
208
|
-
if (this._packNumbers) {
|
|
209
|
-
this.push({
|
|
210
|
-
name: "numberValue",
|
|
211
|
-
value: this._accumulator
|
|
212
|
-
});
|
|
213
|
-
this._accumulator = "";
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
this.push({ name: "endArray" });
|
|
217
|
-
this._parent = this._stack.pop();
|
|
218
|
-
this._expect = expected[this._parent];
|
|
219
|
-
break;
|
|
220
|
-
case "-":
|
|
221
|
-
this._open_number = true;
|
|
222
|
-
if (this._streamNumbers) {
|
|
223
|
-
this.push({ name: "startNumber" });
|
|
224
|
-
this.push({
|
|
225
|
-
name: "numberChunk",
|
|
226
|
-
value: "-"
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
this._packNumbers && (this._accumulator = "-");
|
|
230
|
-
this._expect = "numberStart";
|
|
231
|
-
break;
|
|
232
|
-
case "0":
|
|
233
|
-
this._open_number = true;
|
|
234
|
-
if (this._streamNumbers) {
|
|
235
|
-
this.push({ name: "startNumber" });
|
|
236
|
-
this.push({
|
|
237
|
-
name: "numberChunk",
|
|
238
|
-
value: "0"
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
this._packNumbers && (this._accumulator = "0");
|
|
242
|
-
this._expect = "numberFraction";
|
|
243
|
-
break;
|
|
244
|
-
case "1":
|
|
245
|
-
case "2":
|
|
246
|
-
case "3":
|
|
247
|
-
case "4":
|
|
248
|
-
case "5":
|
|
249
|
-
case "6":
|
|
250
|
-
case "7":
|
|
251
|
-
case "8":
|
|
252
|
-
case "9":
|
|
253
|
-
this._open_number = true;
|
|
254
|
-
if (this._streamNumbers) {
|
|
255
|
-
this.push({ name: "startNumber" });
|
|
256
|
-
this.push({
|
|
257
|
-
name: "numberChunk",
|
|
258
|
-
value
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
this._packNumbers && (this._accumulator = value);
|
|
262
|
-
this._expect = "numberDigit";
|
|
263
|
-
break;
|
|
264
|
-
case "true":
|
|
265
|
-
case "false":
|
|
266
|
-
case "null":
|
|
267
|
-
if (this._buffer.length - index === value.length && !this._done) break main;
|
|
268
|
-
this.push({
|
|
269
|
-
name: value + "Value",
|
|
270
|
-
value: values[value]
|
|
271
|
-
});
|
|
272
|
-
this._expect = expected[this._parent];
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
276
|
-
else index += value.length;
|
|
277
|
-
break;
|
|
278
|
-
case "keyVal":
|
|
279
|
-
case "string":
|
|
280
|
-
patterns.string.lastIndex = index;
|
|
281
|
-
match = patterns.string.exec(this._buffer);
|
|
282
|
-
if (!match) {
|
|
283
|
-
if (index < this._buffer.length && (this._done || this._buffer.length - index >= 6)) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: escaped characters"));
|
|
284
|
-
if (this._done) return callback(/* @__PURE__ */ new Error("Parser has expected a string value"));
|
|
285
|
-
break main;
|
|
286
|
-
}
|
|
287
|
-
value = match[0];
|
|
288
|
-
if (value === "\"") if (this._expect === "keyVal") {
|
|
289
|
-
this._streamKeys && this.push({ name: "endKey" });
|
|
290
|
-
if (this._packKeys) {
|
|
291
|
-
this.push({
|
|
292
|
-
name: "keyValue",
|
|
293
|
-
value: this._accumulator
|
|
294
|
-
});
|
|
295
|
-
this._accumulator = "";
|
|
296
|
-
}
|
|
297
|
-
this._expect = "colon";
|
|
298
|
-
} else {
|
|
299
|
-
this._streamStrings && this.push({ name: "endString" });
|
|
300
|
-
if (this._packStrings) {
|
|
301
|
-
this.push({
|
|
302
|
-
name: "stringValue",
|
|
303
|
-
value: this._accumulator
|
|
304
|
-
});
|
|
305
|
-
this._accumulator = "";
|
|
306
|
-
}
|
|
307
|
-
this._expect = expected[this._parent];
|
|
308
|
-
}
|
|
309
|
-
else if (value.length > 1 && value.charAt(0) === "\\") {
|
|
310
|
-
const t = value.length == 2 ? codes[value.charAt(1)] : fromHex(value);
|
|
311
|
-
if (this._expect === "keyVal" ? this._streamKeys : this._streamStrings) this.push({
|
|
312
|
-
name: "stringChunk",
|
|
313
|
-
value: t
|
|
314
|
-
});
|
|
315
|
-
if (this._expect === "keyVal" ? this._packKeys : this._packStrings) this._accumulator += t;
|
|
316
|
-
} else {
|
|
317
|
-
if (this._expect === "keyVal" ? this._streamKeys : this._streamStrings) this.push({
|
|
318
|
-
name: "stringChunk",
|
|
319
|
-
value
|
|
320
|
-
});
|
|
321
|
-
if (this._expect === "keyVal" ? this._packKeys : this._packStrings) this._accumulator += value;
|
|
322
|
-
}
|
|
323
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
324
|
-
else index += value.length;
|
|
325
|
-
break;
|
|
326
|
-
case "key1":
|
|
327
|
-
case "key":
|
|
328
|
-
patterns.key1.lastIndex = index;
|
|
329
|
-
match = patterns.key1.exec(this._buffer);
|
|
330
|
-
if (!match) {
|
|
331
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected an object key"));
|
|
332
|
-
break main;
|
|
333
|
-
}
|
|
334
|
-
value = match[0];
|
|
335
|
-
if (value === "\"") {
|
|
336
|
-
this._streamKeys && this.push({ name: "startKey" });
|
|
337
|
-
this._expect = "keyVal";
|
|
338
|
-
} else if (value === "}") {
|
|
339
|
-
if (this._expect !== "key1") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected token '}'"));
|
|
340
|
-
this.push({ name: "endObject" });
|
|
341
|
-
this._parent = this._stack.pop();
|
|
342
|
-
this._expect = expected[this._parent];
|
|
343
|
-
}
|
|
344
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
345
|
-
else index += value.length;
|
|
346
|
-
break;
|
|
347
|
-
case "colon":
|
|
348
|
-
patterns.colon.lastIndex = index;
|
|
349
|
-
match = patterns.colon.exec(this._buffer);
|
|
350
|
-
if (!match) {
|
|
351
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected ':'"));
|
|
352
|
-
break main;
|
|
353
|
-
}
|
|
354
|
-
value = match[0];
|
|
355
|
-
value === ":" && (this._expect = "value");
|
|
356
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
357
|
-
else index += value.length;
|
|
358
|
-
break;
|
|
359
|
-
case "arrayStop":
|
|
360
|
-
case "objectStop":
|
|
361
|
-
patterns.comma.lastIndex = index;
|
|
362
|
-
match = patterns.comma.exec(this._buffer);
|
|
363
|
-
if (!match) {
|
|
364
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected ','"));
|
|
365
|
-
break main;
|
|
366
|
-
}
|
|
367
|
-
if (this._open_number) {
|
|
368
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
369
|
-
this._open_number = false;
|
|
370
|
-
if (this._packNumbers) {
|
|
371
|
-
this.push({
|
|
372
|
-
name: "numberValue",
|
|
373
|
-
value: this._accumulator
|
|
374
|
-
});
|
|
375
|
-
this._accumulator = "";
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
value = match[0];
|
|
379
|
-
if (value === ",") this._expect = this._expect === "arrayStop" ? "value" : "key";
|
|
380
|
-
else if (value === "}" || value === "]") {
|
|
381
|
-
if (value === "}" ? this._expect === "arrayStop" : this._expect !== "arrayStop") return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected '" + (this._expect === "arrayStop" ? "]" : "}") + "'"));
|
|
382
|
-
this.push({ name: value === "}" ? "endObject" : "endArray" });
|
|
383
|
-
this._parent = this._stack.pop();
|
|
384
|
-
this._expect = expected[this._parent];
|
|
385
|
-
}
|
|
386
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
387
|
-
else index += value.length;
|
|
388
|
-
break;
|
|
389
|
-
case "numberStart":
|
|
390
|
-
patterns.numberStart.lastIndex = index;
|
|
391
|
-
match = patterns.numberStart.exec(this._buffer);
|
|
392
|
-
if (!match) {
|
|
393
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a starting digit"));
|
|
394
|
-
break main;
|
|
395
|
-
}
|
|
396
|
-
value = match[0];
|
|
397
|
-
this._streamNumbers && this.push({
|
|
398
|
-
name: "numberChunk",
|
|
399
|
-
value
|
|
400
|
-
});
|
|
401
|
-
this._packNumbers && (this._accumulator += value);
|
|
402
|
-
this._expect = value === "0" ? "numberFraction" : "numberDigit";
|
|
403
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
404
|
-
else index += value.length;
|
|
405
|
-
break;
|
|
406
|
-
case "numberDigit":
|
|
407
|
-
patterns.numberDigit.lastIndex = index;
|
|
408
|
-
match = patterns.numberDigit.exec(this._buffer);
|
|
409
|
-
if (!match) {
|
|
410
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a digit"));
|
|
411
|
-
break main;
|
|
412
|
-
}
|
|
413
|
-
value = match[0];
|
|
414
|
-
if (value) {
|
|
415
|
-
this._streamNumbers && this.push({
|
|
416
|
-
name: "numberChunk",
|
|
417
|
-
value
|
|
418
|
-
});
|
|
419
|
-
this._packNumbers && (this._accumulator += value);
|
|
420
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
421
|
-
else index += value.length;
|
|
422
|
-
} else {
|
|
423
|
-
if (index < this._buffer.length) {
|
|
424
|
-
this._expect = "numberFraction";
|
|
425
|
-
break;
|
|
426
|
-
}
|
|
427
|
-
if (this._done) {
|
|
428
|
-
this._expect = expected[this._parent];
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
break main;
|
|
432
|
-
}
|
|
433
|
-
break;
|
|
434
|
-
case "numberFraction":
|
|
435
|
-
patterns.numberFraction.lastIndex = index;
|
|
436
|
-
match = patterns.numberFraction.exec(this._buffer);
|
|
437
|
-
if (!match) {
|
|
438
|
-
if (index < this._buffer.length || this._done) {
|
|
439
|
-
this._expect = expected[this._parent];
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
|
-
break main;
|
|
443
|
-
}
|
|
444
|
-
value = match[0];
|
|
445
|
-
this._streamNumbers && this.push({
|
|
446
|
-
name: "numberChunk",
|
|
447
|
-
value
|
|
448
|
-
});
|
|
449
|
-
this._packNumbers && (this._accumulator += value);
|
|
450
|
-
this._expect = value === "." ? "numberFracStart" : "numberExpSign";
|
|
451
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
452
|
-
else index += value.length;
|
|
453
|
-
break;
|
|
454
|
-
case "numberFracStart":
|
|
455
|
-
patterns.numberFracStart.lastIndex = index;
|
|
456
|
-
match = patterns.numberFracStart.exec(this._buffer);
|
|
457
|
-
if (!match) {
|
|
458
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected a fractional part of a number"));
|
|
459
|
-
break main;
|
|
460
|
-
}
|
|
461
|
-
value = match[0];
|
|
462
|
-
this._streamNumbers && this.push({
|
|
463
|
-
name: "numberChunk",
|
|
464
|
-
value
|
|
465
|
-
});
|
|
466
|
-
this._packNumbers && (this._accumulator += value);
|
|
467
|
-
this._expect = "numberFracDigit";
|
|
468
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
469
|
-
else index += value.length;
|
|
470
|
-
break;
|
|
471
|
-
case "numberFracDigit":
|
|
472
|
-
patterns.numberFracDigit.lastIndex = index;
|
|
473
|
-
match = patterns.numberFracDigit.exec(this._buffer);
|
|
474
|
-
value = match[0];
|
|
475
|
-
if (value) {
|
|
476
|
-
this._streamNumbers && this.push({
|
|
477
|
-
name: "numberChunk",
|
|
478
|
-
value
|
|
479
|
-
});
|
|
480
|
-
this._packNumbers && (this._accumulator += value);
|
|
481
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
482
|
-
else index += value.length;
|
|
483
|
-
} else {
|
|
484
|
-
if (index < this._buffer.length) {
|
|
485
|
-
this._expect = "numberExponent";
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
|
-
if (this._done) {
|
|
489
|
-
this._expect = expected[this._parent];
|
|
490
|
-
break;
|
|
491
|
-
}
|
|
492
|
-
break main;
|
|
493
|
-
}
|
|
494
|
-
break;
|
|
495
|
-
case "numberExponent":
|
|
496
|
-
patterns.numberExponent.lastIndex = index;
|
|
497
|
-
match = patterns.numberExponent.exec(this._buffer);
|
|
498
|
-
if (!match) {
|
|
499
|
-
if (index < this._buffer.length) {
|
|
500
|
-
this._expect = expected[this._parent];
|
|
501
|
-
break;
|
|
502
|
-
}
|
|
503
|
-
if (this._done) {
|
|
504
|
-
this._expect = "done";
|
|
505
|
-
break;
|
|
506
|
-
}
|
|
507
|
-
break main;
|
|
508
|
-
}
|
|
509
|
-
value = match[0];
|
|
510
|
-
this._streamNumbers && this.push({
|
|
511
|
-
name: "numberChunk",
|
|
512
|
-
value
|
|
513
|
-
});
|
|
514
|
-
this._packNumbers && (this._accumulator += value);
|
|
515
|
-
this._expect = "numberExpSign";
|
|
516
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
517
|
-
else index += value.length;
|
|
518
|
-
break;
|
|
519
|
-
case "numberExpSign":
|
|
520
|
-
patterns.numberExpSign.lastIndex = index;
|
|
521
|
-
match = patterns.numberExpSign.exec(this._buffer);
|
|
522
|
-
if (!match) {
|
|
523
|
-
if (index < this._buffer.length) {
|
|
524
|
-
this._expect = "numberExpStart";
|
|
525
|
-
break;
|
|
526
|
-
}
|
|
527
|
-
if (this._done) return callback(/* @__PURE__ */ new Error("Parser has expected an exponent value of a number"));
|
|
528
|
-
break main;
|
|
529
|
-
}
|
|
530
|
-
value = match[0];
|
|
531
|
-
this._streamNumbers && this.push({
|
|
532
|
-
name: "numberChunk",
|
|
533
|
-
value
|
|
534
|
-
});
|
|
535
|
-
this._packNumbers && (this._accumulator += value);
|
|
536
|
-
this._expect = "numberExpStart";
|
|
537
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
538
|
-
else index += value.length;
|
|
539
|
-
break;
|
|
540
|
-
case "numberExpStart":
|
|
541
|
-
patterns.numberExpStart.lastIndex = index;
|
|
542
|
-
match = patterns.numberExpStart.exec(this._buffer);
|
|
543
|
-
if (!match) {
|
|
544
|
-
if (index < this._buffer.length || this._done) return callback(/* @__PURE__ */ new Error("Parser cannot parse input: expected an exponent part of a number"));
|
|
545
|
-
break main;
|
|
546
|
-
}
|
|
547
|
-
value = match[0];
|
|
548
|
-
this._streamNumbers && this.push({
|
|
549
|
-
name: "numberChunk",
|
|
550
|
-
value
|
|
551
|
-
});
|
|
552
|
-
this._packNumbers && (this._accumulator += value);
|
|
553
|
-
this._expect = "numberExpDigit";
|
|
554
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
555
|
-
else index += value.length;
|
|
556
|
-
break;
|
|
557
|
-
case "numberExpDigit":
|
|
558
|
-
patterns.numberExpDigit.lastIndex = index;
|
|
559
|
-
match = patterns.numberExpDigit.exec(this._buffer);
|
|
560
|
-
value = match[0];
|
|
561
|
-
if (value) {
|
|
562
|
-
this._streamNumbers && this.push({
|
|
563
|
-
name: "numberChunk",
|
|
564
|
-
value
|
|
565
|
-
});
|
|
566
|
-
this._packNumbers && (this._accumulator += value);
|
|
567
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
568
|
-
else index += value.length;
|
|
569
|
-
} else {
|
|
570
|
-
if (index < this._buffer.length || this._done) {
|
|
571
|
-
this._expect = expected[this._parent];
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
break main;
|
|
575
|
-
}
|
|
576
|
-
break;
|
|
577
|
-
case "done":
|
|
578
|
-
patterns.ws.lastIndex = index;
|
|
579
|
-
match = patterns.ws.exec(this._buffer);
|
|
580
|
-
if (!match) {
|
|
581
|
-
if (index < this._buffer.length) {
|
|
582
|
-
if (this._jsonStreaming) {
|
|
583
|
-
this._expect = "value";
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
return callback(/* @__PURE__ */ new Error("Parser cannot parse input: unexpected characters"));
|
|
587
|
-
}
|
|
588
|
-
break main;
|
|
589
|
-
}
|
|
590
|
-
value = match[0];
|
|
591
|
-
if (this._open_number) {
|
|
592
|
-
this._streamNumbers && this.push({ name: "endNumber" });
|
|
593
|
-
this._open_number = false;
|
|
594
|
-
if (this._packNumbers) {
|
|
595
|
-
this.push({
|
|
596
|
-
name: "numberValue",
|
|
597
|
-
value: this._accumulator
|
|
598
|
-
});
|
|
599
|
-
this._accumulator = "";
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
if (noSticky) this._buffer = this._buffer.slice(value.length);
|
|
603
|
-
else index += value.length;
|
|
604
|
-
break;
|
|
605
|
-
}
|
|
606
|
-
!noSticky && (this._buffer = this._buffer.slice(index));
|
|
607
|
-
callback(null);
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
Parser.parser = Parser.make;
|
|
611
|
-
Parser.make.Constructor = Parser;
|
|
612
|
-
module.exports = Parser;
|
|
613
|
-
}));
|
|
614
|
-
//#endregion
|
|
615
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/utils/emit.js
|
|
616
|
-
var require_emit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
617
|
-
const emit = (stream) => stream.on("data", (item) => stream.emit(item.name, item.value));
|
|
618
|
-
module.exports = emit;
|
|
619
|
-
}));
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/index.js
|
|
622
|
-
var require_stream_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
623
|
-
const Parser = require_Parser();
|
|
624
|
-
const emit = require_emit();
|
|
625
|
-
const make = (options) => emit(new Parser(options));
|
|
626
|
-
make.Parser = Parser;
|
|
627
|
-
make.parser = Parser.parser;
|
|
628
|
-
module.exports = make;
|
|
629
|
-
}));
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region ../../node_modules/.pnpm/stream-json@1.9.1/node_modules/stream-json/Assembler.js
|
|
632
|
-
var require_Assembler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
633
|
-
const EventEmitter = __require("events");
|
|
634
|
-
const startObject = (Ctr) => function() {
|
|
635
|
-
if (this.done) this.done = false;
|
|
636
|
-
else this.stack.push(this.current, this.key);
|
|
637
|
-
this.current = new Ctr();
|
|
638
|
-
this.key = null;
|
|
639
|
-
};
|
|
640
|
-
var Assembler = class Assembler extends EventEmitter {
|
|
641
|
-
static connectTo(stream, options) {
|
|
642
|
-
return new Assembler(options).connectTo(stream);
|
|
643
|
-
}
|
|
644
|
-
constructor(options) {
|
|
645
|
-
super();
|
|
646
|
-
this.stack = [];
|
|
647
|
-
this.current = this.key = null;
|
|
648
|
-
this.done = true;
|
|
649
|
-
if (options) {
|
|
650
|
-
this.reviver = typeof options.reviver == "function" && options.reviver;
|
|
651
|
-
if (this.reviver) this.stringValue = this._saveValue = this._saveValueWithReviver;
|
|
652
|
-
if (options.numberAsString) this.numberValue = this.stringValue;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
connectTo(stream) {
|
|
656
|
-
stream.on("data", (chunk) => {
|
|
657
|
-
if (this[chunk.name]) {
|
|
658
|
-
this[chunk.name](chunk.value);
|
|
659
|
-
if (this.done) this.emit("done", this);
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
return this;
|
|
663
|
-
}
|
|
664
|
-
get depth() {
|
|
665
|
-
return (this.stack.length >> 1) + (this.done ? 0 : 1);
|
|
666
|
-
}
|
|
667
|
-
get path() {
|
|
668
|
-
const path = [];
|
|
669
|
-
for (let i = 0; i < this.stack.length; i += 2) {
|
|
670
|
-
const key = this.stack[i + 1];
|
|
671
|
-
path.push(key === null ? this.stack[i].length : key);
|
|
672
|
-
}
|
|
673
|
-
return path;
|
|
674
|
-
}
|
|
675
|
-
dropToLevel(level) {
|
|
676
|
-
if (level < this.depth) if (level) {
|
|
677
|
-
const index = level - 1 << 1;
|
|
678
|
-
this.current = this.stack[index];
|
|
679
|
-
this.key = this.stack[index + 1];
|
|
680
|
-
this.stack.splice(index);
|
|
681
|
-
} else {
|
|
682
|
-
this.stack = [];
|
|
683
|
-
this.current = this.key = null;
|
|
684
|
-
this.done = true;
|
|
685
|
-
}
|
|
686
|
-
return this;
|
|
687
|
-
}
|
|
688
|
-
consume(chunk) {
|
|
689
|
-
this[chunk.name] && this[chunk.name](chunk.value);
|
|
690
|
-
return this;
|
|
691
|
-
}
|
|
692
|
-
keyValue(value) {
|
|
693
|
-
this.key = value;
|
|
694
|
-
}
|
|
695
|
-
numberValue(value) {
|
|
696
|
-
this._saveValue(parseFloat(value));
|
|
697
|
-
}
|
|
698
|
-
nullValue() {
|
|
699
|
-
this._saveValue(null);
|
|
700
|
-
}
|
|
701
|
-
trueValue() {
|
|
702
|
-
this._saveValue(true);
|
|
703
|
-
}
|
|
704
|
-
falseValue() {
|
|
705
|
-
this._saveValue(false);
|
|
706
|
-
}
|
|
707
|
-
endObject() {
|
|
708
|
-
if (this.stack.length) {
|
|
709
|
-
const value = this.current;
|
|
710
|
-
this.key = this.stack.pop();
|
|
711
|
-
this.current = this.stack.pop();
|
|
712
|
-
this._saveValue(value);
|
|
713
|
-
} else this.done = true;
|
|
714
|
-
}
|
|
715
|
-
_saveValue(value) {
|
|
716
|
-
if (this.done) this.current = value;
|
|
717
|
-
else if (this.current instanceof Array) this.current.push(value);
|
|
718
|
-
else {
|
|
719
|
-
this.current[this.key] = value;
|
|
720
|
-
this.key = null;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
_saveValueWithReviver(value) {
|
|
724
|
-
if (this.done) this.current = this.reviver("", value);
|
|
725
|
-
else if (this.current instanceof Array) {
|
|
726
|
-
value = this.reviver("" + this.current.length, value);
|
|
727
|
-
this.current.push(value);
|
|
728
|
-
if (value === void 0) delete this.current[this.current.length - 1];
|
|
729
|
-
} else {
|
|
730
|
-
value = this.reviver(this.key, value);
|
|
731
|
-
if (value !== void 0) this.current[this.key] = value;
|
|
732
|
-
this.key = null;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
Assembler.prototype.stringValue = Assembler.prototype._saveValue;
|
|
737
|
-
Assembler.prototype.startObject = startObject(Object);
|
|
738
|
-
Assembler.prototype.startArray = startObject(Array);
|
|
739
|
-
Assembler.prototype.endArray = Assembler.prototype.endObject;
|
|
740
|
-
module.exports = Assembler;
|
|
741
|
-
}));
|
|
742
|
-
require_stream_json();
|
|
743
|
-
require_Assembler();
|
|
35
|
+
//#region src/node/utils/json-parse-stream.ts
|
|
744
36
|
async function parseJsonStreamWithConcatArrays(stream, processor) {
|
|
745
37
|
const values = [];
|
|
746
38
|
let lineNumber = 0;
|
|
@@ -984,6 +276,7 @@ var RolldownEventsReader = class RolldownEventsReader {
|
|
|
984
276
|
lastTimestamp = 0;
|
|
985
277
|
manager = new RolldownEventsManager();
|
|
986
278
|
meta;
|
|
279
|
+
pendingRead;
|
|
987
280
|
constructor(filepath) {
|
|
988
281
|
this.filepath = filepath;
|
|
989
282
|
}
|
|
@@ -994,6 +287,13 @@ var RolldownEventsReader = class RolldownEventsReader {
|
|
|
994
287
|
return reader;
|
|
995
288
|
}
|
|
996
289
|
async read() {
|
|
290
|
+
if (this.pendingRead) return this.pendingRead;
|
|
291
|
+
this.pendingRead = this.readChanges().finally(() => {
|
|
292
|
+
this.pendingRead = void 0;
|
|
293
|
+
});
|
|
294
|
+
return this.pendingRead;
|
|
295
|
+
}
|
|
296
|
+
async readChanges() {
|
|
997
297
|
const { mtime, size } = await fs.promises.stat(this.filepath);
|
|
998
298
|
if (mtime.getTime() <= this.lastTimestamp) return;
|
|
999
299
|
await parseJsonStreamWithConcatArrays(fs.createReadStream(this.filepath, { start: this.lastBytes }), (event) => {
|