@nuasite/cli 0.0.36 → 0.0.37
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/README.md +3 -3
- package/dist/index.js +77 -2390
- package/dist/types/build.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/build.ts +1 -1
- package/src/index.ts +88 -19
package/dist/index.js
CHANGED
|
@@ -1,2346 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
-
for (let key of __getOwnPropNames(mod))
|
|
12
|
-
if (!__hasOwnProp.call(to, key))
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: () => mod[key],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
20
|
-
|
|
21
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/base64.js
|
|
22
|
-
var require_base64 = __commonJS((exports) => {
|
|
23
|
-
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
24
|
-
exports.encode = function(number) {
|
|
25
|
-
if (0 <= number && number < intToCharMap.length) {
|
|
26
|
-
return intToCharMap[number];
|
|
27
|
-
}
|
|
28
|
-
throw new TypeError("Must be between 0 and 63: " + number);
|
|
29
|
-
};
|
|
30
|
-
exports.decode = function(charCode) {
|
|
31
|
-
var bigA = 65;
|
|
32
|
-
var bigZ = 90;
|
|
33
|
-
var littleA = 97;
|
|
34
|
-
var littleZ = 122;
|
|
35
|
-
var zero = 48;
|
|
36
|
-
var nine = 57;
|
|
37
|
-
var plus = 43;
|
|
38
|
-
var slash = 47;
|
|
39
|
-
var littleOffset = 26;
|
|
40
|
-
var numberOffset = 52;
|
|
41
|
-
if (bigA <= charCode && charCode <= bigZ) {
|
|
42
|
-
return charCode - bigA;
|
|
43
|
-
}
|
|
44
|
-
if (littleA <= charCode && charCode <= littleZ) {
|
|
45
|
-
return charCode - littleA + littleOffset;
|
|
46
|
-
}
|
|
47
|
-
if (zero <= charCode && charCode <= nine) {
|
|
48
|
-
return charCode - zero + numberOffset;
|
|
49
|
-
}
|
|
50
|
-
if (charCode == plus) {
|
|
51
|
-
return 62;
|
|
52
|
-
}
|
|
53
|
-
if (charCode == slash) {
|
|
54
|
-
return 63;
|
|
55
|
-
}
|
|
56
|
-
return -1;
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/base64-vlq.js
|
|
61
|
-
var require_base64_vlq = __commonJS((exports) => {
|
|
62
|
-
var base64 = require_base64();
|
|
63
|
-
var VLQ_BASE_SHIFT = 5;
|
|
64
|
-
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
65
|
-
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
66
|
-
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
67
|
-
function toVLQSigned(aValue) {
|
|
68
|
-
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
69
|
-
}
|
|
70
|
-
function fromVLQSigned(aValue) {
|
|
71
|
-
var isNegative = (aValue & 1) === 1;
|
|
72
|
-
var shifted = aValue >> 1;
|
|
73
|
-
return isNegative ? -shifted : shifted;
|
|
74
|
-
}
|
|
75
|
-
exports.encode = function base64VLQ_encode(aValue) {
|
|
76
|
-
var encoded = "";
|
|
77
|
-
var digit;
|
|
78
|
-
var vlq = toVLQSigned(aValue);
|
|
79
|
-
do {
|
|
80
|
-
digit = vlq & VLQ_BASE_MASK;
|
|
81
|
-
vlq >>>= VLQ_BASE_SHIFT;
|
|
82
|
-
if (vlq > 0) {
|
|
83
|
-
digit |= VLQ_CONTINUATION_BIT;
|
|
84
|
-
}
|
|
85
|
-
encoded += base64.encode(digit);
|
|
86
|
-
} while (vlq > 0);
|
|
87
|
-
return encoded;
|
|
88
|
-
};
|
|
89
|
-
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
90
|
-
var strLen = aStr.length;
|
|
91
|
-
var result = 0;
|
|
92
|
-
var shift = 0;
|
|
93
|
-
var continuation, digit;
|
|
94
|
-
do {
|
|
95
|
-
if (aIndex >= strLen) {
|
|
96
|
-
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
97
|
-
}
|
|
98
|
-
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
99
|
-
if (digit === -1) {
|
|
100
|
-
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
101
|
-
}
|
|
102
|
-
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
103
|
-
digit &= VLQ_BASE_MASK;
|
|
104
|
-
result = result + (digit << shift);
|
|
105
|
-
shift += VLQ_BASE_SHIFT;
|
|
106
|
-
} while (continuation);
|
|
107
|
-
aOutParam.value = fromVLQSigned(result);
|
|
108
|
-
aOutParam.rest = aIndex;
|
|
109
|
-
};
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/util.js
|
|
113
|
-
var require_util = __commonJS((exports) => {
|
|
114
|
-
function getArg(aArgs, aName, aDefaultValue) {
|
|
115
|
-
if (aName in aArgs) {
|
|
116
|
-
return aArgs[aName];
|
|
117
|
-
} else if (arguments.length === 3) {
|
|
118
|
-
return aDefaultValue;
|
|
119
|
-
} else {
|
|
120
|
-
throw new Error('"' + aName + '" is a required argument.');
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.getArg = getArg;
|
|
124
|
-
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
125
|
-
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
126
|
-
function urlParse(aUrl) {
|
|
127
|
-
var match = aUrl.match(urlRegexp);
|
|
128
|
-
if (!match) {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
scheme: match[1],
|
|
133
|
-
auth: match[2],
|
|
134
|
-
host: match[3],
|
|
135
|
-
port: match[4],
|
|
136
|
-
path: match[5]
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
exports.urlParse = urlParse;
|
|
140
|
-
function urlGenerate(aParsedUrl) {
|
|
141
|
-
var url = "";
|
|
142
|
-
if (aParsedUrl.scheme) {
|
|
143
|
-
url += aParsedUrl.scheme + ":";
|
|
144
|
-
}
|
|
145
|
-
url += "//";
|
|
146
|
-
if (aParsedUrl.auth) {
|
|
147
|
-
url += aParsedUrl.auth + "@";
|
|
148
|
-
}
|
|
149
|
-
if (aParsedUrl.host) {
|
|
150
|
-
url += aParsedUrl.host;
|
|
151
|
-
}
|
|
152
|
-
if (aParsedUrl.port) {
|
|
153
|
-
url += ":" + aParsedUrl.port;
|
|
154
|
-
}
|
|
155
|
-
if (aParsedUrl.path) {
|
|
156
|
-
url += aParsedUrl.path;
|
|
157
|
-
}
|
|
158
|
-
return url;
|
|
159
|
-
}
|
|
160
|
-
exports.urlGenerate = urlGenerate;
|
|
161
|
-
function normalize(aPath) {
|
|
162
|
-
var path2 = aPath;
|
|
163
|
-
var url = urlParse(aPath);
|
|
164
|
-
if (url) {
|
|
165
|
-
if (!url.path) {
|
|
166
|
-
return aPath;
|
|
167
|
-
}
|
|
168
|
-
path2 = url.path;
|
|
169
|
-
}
|
|
170
|
-
var isAbsolute = exports.isAbsolute(path2);
|
|
171
|
-
var parts = path2.split(/\/+/);
|
|
172
|
-
for (var part, up = 0, i = parts.length - 1;i >= 0; i--) {
|
|
173
|
-
part = parts[i];
|
|
174
|
-
if (part === ".") {
|
|
175
|
-
parts.splice(i, 1);
|
|
176
|
-
} else if (part === "..") {
|
|
177
|
-
up++;
|
|
178
|
-
} else if (up > 0) {
|
|
179
|
-
if (part === "") {
|
|
180
|
-
parts.splice(i + 1, up);
|
|
181
|
-
up = 0;
|
|
182
|
-
} else {
|
|
183
|
-
parts.splice(i, 2);
|
|
184
|
-
up--;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
path2 = parts.join("/");
|
|
189
|
-
if (path2 === "") {
|
|
190
|
-
path2 = isAbsolute ? "/" : ".";
|
|
191
|
-
}
|
|
192
|
-
if (url) {
|
|
193
|
-
url.path = path2;
|
|
194
|
-
return urlGenerate(url);
|
|
195
|
-
}
|
|
196
|
-
return path2;
|
|
197
|
-
}
|
|
198
|
-
exports.normalize = normalize;
|
|
199
|
-
function join(aRoot, aPath) {
|
|
200
|
-
if (aRoot === "") {
|
|
201
|
-
aRoot = ".";
|
|
202
|
-
}
|
|
203
|
-
if (aPath === "") {
|
|
204
|
-
aPath = ".";
|
|
205
|
-
}
|
|
206
|
-
var aPathUrl = urlParse(aPath);
|
|
207
|
-
var aRootUrl = urlParse(aRoot);
|
|
208
|
-
if (aRootUrl) {
|
|
209
|
-
aRoot = aRootUrl.path || "/";
|
|
210
|
-
}
|
|
211
|
-
if (aPathUrl && !aPathUrl.scheme) {
|
|
212
|
-
if (aRootUrl) {
|
|
213
|
-
aPathUrl.scheme = aRootUrl.scheme;
|
|
214
|
-
}
|
|
215
|
-
return urlGenerate(aPathUrl);
|
|
216
|
-
}
|
|
217
|
-
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
|
218
|
-
return aPath;
|
|
219
|
-
}
|
|
220
|
-
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
221
|
-
aRootUrl.host = aPath;
|
|
222
|
-
return urlGenerate(aRootUrl);
|
|
223
|
-
}
|
|
224
|
-
var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
225
|
-
if (aRootUrl) {
|
|
226
|
-
aRootUrl.path = joined;
|
|
227
|
-
return urlGenerate(aRootUrl);
|
|
228
|
-
}
|
|
229
|
-
return joined;
|
|
230
|
-
}
|
|
231
|
-
exports.join = join;
|
|
232
|
-
exports.isAbsolute = function(aPath) {
|
|
233
|
-
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
234
|
-
};
|
|
235
|
-
function relative(aRoot, aPath) {
|
|
236
|
-
if (aRoot === "") {
|
|
237
|
-
aRoot = ".";
|
|
238
|
-
}
|
|
239
|
-
aRoot = aRoot.replace(/\/$/, "");
|
|
240
|
-
var level = 0;
|
|
241
|
-
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
242
|
-
var index = aRoot.lastIndexOf("/");
|
|
243
|
-
if (index < 0) {
|
|
244
|
-
return aPath;
|
|
245
|
-
}
|
|
246
|
-
aRoot = aRoot.slice(0, index);
|
|
247
|
-
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
248
|
-
return aPath;
|
|
249
|
-
}
|
|
250
|
-
++level;
|
|
251
|
-
}
|
|
252
|
-
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
253
|
-
}
|
|
254
|
-
exports.relative = relative;
|
|
255
|
-
var supportsNullProto = function() {
|
|
256
|
-
var obj = Object.create(null);
|
|
257
|
-
return !("__proto__" in obj);
|
|
258
|
-
}();
|
|
259
|
-
function identity(s) {
|
|
260
|
-
return s;
|
|
261
|
-
}
|
|
262
|
-
function toSetString(aStr) {
|
|
263
|
-
if (isProtoString(aStr)) {
|
|
264
|
-
return "$" + aStr;
|
|
265
|
-
}
|
|
266
|
-
return aStr;
|
|
267
|
-
}
|
|
268
|
-
exports.toSetString = supportsNullProto ? identity : toSetString;
|
|
269
|
-
function fromSetString(aStr) {
|
|
270
|
-
if (isProtoString(aStr)) {
|
|
271
|
-
return aStr.slice(1);
|
|
272
|
-
}
|
|
273
|
-
return aStr;
|
|
274
|
-
}
|
|
275
|
-
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
|
276
|
-
function isProtoString(s) {
|
|
277
|
-
if (!s) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
var length = s.length;
|
|
281
|
-
if (length < 9) {
|
|
282
|
-
return false;
|
|
283
|
-
}
|
|
284
|
-
if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
for (var i = length - 10;i >= 0; i--) {
|
|
288
|
-
if (s.charCodeAt(i) !== 36) {
|
|
289
|
-
return false;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
return true;
|
|
293
|
-
}
|
|
294
|
-
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
295
|
-
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
296
|
-
if (cmp !== 0) {
|
|
297
|
-
return cmp;
|
|
298
|
-
}
|
|
299
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
300
|
-
if (cmp !== 0) {
|
|
301
|
-
return cmp;
|
|
302
|
-
}
|
|
303
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
304
|
-
if (cmp !== 0 || onlyCompareOriginal) {
|
|
305
|
-
return cmp;
|
|
306
|
-
}
|
|
307
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
308
|
-
if (cmp !== 0) {
|
|
309
|
-
return cmp;
|
|
310
|
-
}
|
|
311
|
-
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
312
|
-
if (cmp !== 0) {
|
|
313
|
-
return cmp;
|
|
314
|
-
}
|
|
315
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
316
|
-
}
|
|
317
|
-
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
318
|
-
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
319
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
320
|
-
if (cmp !== 0) {
|
|
321
|
-
return cmp;
|
|
322
|
-
}
|
|
323
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
324
|
-
if (cmp !== 0 || onlyCompareGenerated) {
|
|
325
|
-
return cmp;
|
|
326
|
-
}
|
|
327
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
328
|
-
if (cmp !== 0) {
|
|
329
|
-
return cmp;
|
|
330
|
-
}
|
|
331
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
332
|
-
if (cmp !== 0) {
|
|
333
|
-
return cmp;
|
|
334
|
-
}
|
|
335
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
336
|
-
if (cmp !== 0) {
|
|
337
|
-
return cmp;
|
|
338
|
-
}
|
|
339
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
340
|
-
}
|
|
341
|
-
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
342
|
-
function strcmp(aStr1, aStr2) {
|
|
343
|
-
if (aStr1 === aStr2) {
|
|
344
|
-
return 0;
|
|
345
|
-
}
|
|
346
|
-
if (aStr1 === null) {
|
|
347
|
-
return 1;
|
|
348
|
-
}
|
|
349
|
-
if (aStr2 === null) {
|
|
350
|
-
return -1;
|
|
351
|
-
}
|
|
352
|
-
if (aStr1 > aStr2) {
|
|
353
|
-
return 1;
|
|
354
|
-
}
|
|
355
|
-
return -1;
|
|
356
|
-
}
|
|
357
|
-
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
358
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
359
|
-
if (cmp !== 0) {
|
|
360
|
-
return cmp;
|
|
361
|
-
}
|
|
362
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
363
|
-
if (cmp !== 0) {
|
|
364
|
-
return cmp;
|
|
365
|
-
}
|
|
366
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
367
|
-
if (cmp !== 0) {
|
|
368
|
-
return cmp;
|
|
369
|
-
}
|
|
370
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
371
|
-
if (cmp !== 0) {
|
|
372
|
-
return cmp;
|
|
373
|
-
}
|
|
374
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
375
|
-
if (cmp !== 0) {
|
|
376
|
-
return cmp;
|
|
377
|
-
}
|
|
378
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
379
|
-
}
|
|
380
|
-
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
381
|
-
function parseSourceMapInput(str) {
|
|
382
|
-
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
|
383
|
-
}
|
|
384
|
-
exports.parseSourceMapInput = parseSourceMapInput;
|
|
385
|
-
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
386
|
-
sourceURL = sourceURL || "";
|
|
387
|
-
if (sourceRoot) {
|
|
388
|
-
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
|
389
|
-
sourceRoot += "/";
|
|
390
|
-
}
|
|
391
|
-
sourceURL = sourceRoot + sourceURL;
|
|
392
|
-
}
|
|
393
|
-
if (sourceMapURL) {
|
|
394
|
-
var parsed = urlParse(sourceMapURL);
|
|
395
|
-
if (!parsed) {
|
|
396
|
-
throw new Error("sourceMapURL could not be parsed");
|
|
397
|
-
}
|
|
398
|
-
if (parsed.path) {
|
|
399
|
-
var index = parsed.path.lastIndexOf("/");
|
|
400
|
-
if (index >= 0) {
|
|
401
|
-
parsed.path = parsed.path.substring(0, index + 1);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
sourceURL = join(urlGenerate(parsed), sourceURL);
|
|
405
|
-
}
|
|
406
|
-
return normalize(sourceURL);
|
|
407
|
-
}
|
|
408
|
-
exports.computeSourceURL = computeSourceURL;
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/array-set.js
|
|
412
|
-
var require_array_set = __commonJS((exports) => {
|
|
413
|
-
var util = require_util();
|
|
414
|
-
var has = Object.prototype.hasOwnProperty;
|
|
415
|
-
var hasNativeMap = typeof Map !== "undefined";
|
|
416
|
-
function ArraySet() {
|
|
417
|
-
this._array = [];
|
|
418
|
-
this._set = hasNativeMap ? new Map : Object.create(null);
|
|
419
|
-
}
|
|
420
|
-
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
421
|
-
var set = new ArraySet;
|
|
422
|
-
for (var i = 0, len = aArray.length;i < len; i++) {
|
|
423
|
-
set.add(aArray[i], aAllowDuplicates);
|
|
424
|
-
}
|
|
425
|
-
return set;
|
|
426
|
-
};
|
|
427
|
-
ArraySet.prototype.size = function ArraySet_size() {
|
|
428
|
-
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
429
|
-
};
|
|
430
|
-
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
431
|
-
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
432
|
-
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
433
|
-
var idx = this._array.length;
|
|
434
|
-
if (!isDuplicate || aAllowDuplicates) {
|
|
435
|
-
this._array.push(aStr);
|
|
436
|
-
}
|
|
437
|
-
if (!isDuplicate) {
|
|
438
|
-
if (hasNativeMap) {
|
|
439
|
-
this._set.set(aStr, idx);
|
|
440
|
-
} else {
|
|
441
|
-
this._set[sStr] = idx;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
|
-
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
446
|
-
if (hasNativeMap) {
|
|
447
|
-
return this._set.has(aStr);
|
|
448
|
-
} else {
|
|
449
|
-
var sStr = util.toSetString(aStr);
|
|
450
|
-
return has.call(this._set, sStr);
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
454
|
-
if (hasNativeMap) {
|
|
455
|
-
var idx = this._set.get(aStr);
|
|
456
|
-
if (idx >= 0) {
|
|
457
|
-
return idx;
|
|
458
|
-
}
|
|
459
|
-
} else {
|
|
460
|
-
var sStr = util.toSetString(aStr);
|
|
461
|
-
if (has.call(this._set, sStr)) {
|
|
462
|
-
return this._set[sStr];
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
throw new Error('"' + aStr + '" is not in the set.');
|
|
466
|
-
};
|
|
467
|
-
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
468
|
-
if (aIdx >= 0 && aIdx < this._array.length) {
|
|
469
|
-
return this._array[aIdx];
|
|
470
|
-
}
|
|
471
|
-
throw new Error("No element indexed by " + aIdx);
|
|
472
|
-
};
|
|
473
|
-
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
474
|
-
return this._array.slice();
|
|
475
|
-
};
|
|
476
|
-
exports.ArraySet = ArraySet;
|
|
477
|
-
});
|
|
478
|
-
|
|
479
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/mapping-list.js
|
|
480
|
-
var require_mapping_list = __commonJS((exports) => {
|
|
481
|
-
var util = require_util();
|
|
482
|
-
function generatedPositionAfter(mappingA, mappingB) {
|
|
483
|
-
var lineA = mappingA.generatedLine;
|
|
484
|
-
var lineB = mappingB.generatedLine;
|
|
485
|
-
var columnA = mappingA.generatedColumn;
|
|
486
|
-
var columnB = mappingB.generatedColumn;
|
|
487
|
-
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
488
|
-
}
|
|
489
|
-
function MappingList() {
|
|
490
|
-
this._array = [];
|
|
491
|
-
this._sorted = true;
|
|
492
|
-
this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
493
|
-
}
|
|
494
|
-
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
495
|
-
this._array.forEach(aCallback, aThisArg);
|
|
496
|
-
};
|
|
497
|
-
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
498
|
-
if (generatedPositionAfter(this._last, aMapping)) {
|
|
499
|
-
this._last = aMapping;
|
|
500
|
-
this._array.push(aMapping);
|
|
501
|
-
} else {
|
|
502
|
-
this._sorted = false;
|
|
503
|
-
this._array.push(aMapping);
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
507
|
-
if (!this._sorted) {
|
|
508
|
-
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
509
|
-
this._sorted = true;
|
|
510
|
-
}
|
|
511
|
-
return this._array;
|
|
512
|
-
};
|
|
513
|
-
exports.MappingList = MappingList;
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/source-map-generator.js
|
|
517
|
-
var require_source_map_generator = __commonJS((exports) => {
|
|
518
|
-
var base64VLQ = require_base64_vlq();
|
|
519
|
-
var util = require_util();
|
|
520
|
-
var ArraySet = require_array_set().ArraySet;
|
|
521
|
-
var MappingList = require_mapping_list().MappingList;
|
|
522
|
-
function SourceMapGenerator(aArgs) {
|
|
523
|
-
if (!aArgs) {
|
|
524
|
-
aArgs = {};
|
|
525
|
-
}
|
|
526
|
-
this._file = util.getArg(aArgs, "file", null);
|
|
527
|
-
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
|
528
|
-
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
|
529
|
-
this._sources = new ArraySet;
|
|
530
|
-
this._names = new ArraySet;
|
|
531
|
-
this._mappings = new MappingList;
|
|
532
|
-
this._sourcesContents = null;
|
|
533
|
-
}
|
|
534
|
-
SourceMapGenerator.prototype._version = 3;
|
|
535
|
-
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
536
|
-
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
537
|
-
var generator = new SourceMapGenerator({
|
|
538
|
-
file: aSourceMapConsumer.file,
|
|
539
|
-
sourceRoot
|
|
540
|
-
});
|
|
541
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
542
|
-
var newMapping = {
|
|
543
|
-
generated: {
|
|
544
|
-
line: mapping.generatedLine,
|
|
545
|
-
column: mapping.generatedColumn
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
if (mapping.source != null) {
|
|
549
|
-
newMapping.source = mapping.source;
|
|
550
|
-
if (sourceRoot != null) {
|
|
551
|
-
newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
552
|
-
}
|
|
553
|
-
newMapping.original = {
|
|
554
|
-
line: mapping.originalLine,
|
|
555
|
-
column: mapping.originalColumn
|
|
556
|
-
};
|
|
557
|
-
if (mapping.name != null) {
|
|
558
|
-
newMapping.name = mapping.name;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
generator.addMapping(newMapping);
|
|
562
|
-
});
|
|
563
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
564
|
-
var sourceRelative = sourceFile;
|
|
565
|
-
if (sourceRoot !== null) {
|
|
566
|
-
sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
567
|
-
}
|
|
568
|
-
if (!generator._sources.has(sourceRelative)) {
|
|
569
|
-
generator._sources.add(sourceRelative);
|
|
570
|
-
}
|
|
571
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
572
|
-
if (content != null) {
|
|
573
|
-
generator.setSourceContent(sourceFile, content);
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
return generator;
|
|
577
|
-
};
|
|
578
|
-
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
579
|
-
var generated = util.getArg(aArgs, "generated");
|
|
580
|
-
var original = util.getArg(aArgs, "original", null);
|
|
581
|
-
var source = util.getArg(aArgs, "source", null);
|
|
582
|
-
var name = util.getArg(aArgs, "name", null);
|
|
583
|
-
if (!this._skipValidation) {
|
|
584
|
-
this._validateMapping(generated, original, source, name);
|
|
585
|
-
}
|
|
586
|
-
if (source != null) {
|
|
587
|
-
source = String(source);
|
|
588
|
-
if (!this._sources.has(source)) {
|
|
589
|
-
this._sources.add(source);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
if (name != null) {
|
|
593
|
-
name = String(name);
|
|
594
|
-
if (!this._names.has(name)) {
|
|
595
|
-
this._names.add(name);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
this._mappings.add({
|
|
599
|
-
generatedLine: generated.line,
|
|
600
|
-
generatedColumn: generated.column,
|
|
601
|
-
originalLine: original != null && original.line,
|
|
602
|
-
originalColumn: original != null && original.column,
|
|
603
|
-
source,
|
|
604
|
-
name
|
|
605
|
-
});
|
|
606
|
-
};
|
|
607
|
-
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
608
|
-
var source = aSourceFile;
|
|
609
|
-
if (this._sourceRoot != null) {
|
|
610
|
-
source = util.relative(this._sourceRoot, source);
|
|
611
|
-
}
|
|
612
|
-
if (aSourceContent != null) {
|
|
613
|
-
if (!this._sourcesContents) {
|
|
614
|
-
this._sourcesContents = Object.create(null);
|
|
615
|
-
}
|
|
616
|
-
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
617
|
-
} else if (this._sourcesContents) {
|
|
618
|
-
delete this._sourcesContents[util.toSetString(source)];
|
|
619
|
-
if (Object.keys(this._sourcesContents).length === 0) {
|
|
620
|
-
this._sourcesContents = null;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
};
|
|
624
|
-
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
625
|
-
var sourceFile = aSourceFile;
|
|
626
|
-
if (aSourceFile == null) {
|
|
627
|
-
if (aSourceMapConsumer.file == null) {
|
|
628
|
-
throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, " + `or the source map's "file" property. Both were omitted.`);
|
|
629
|
-
}
|
|
630
|
-
sourceFile = aSourceMapConsumer.file;
|
|
631
|
-
}
|
|
632
|
-
var sourceRoot = this._sourceRoot;
|
|
633
|
-
if (sourceRoot != null) {
|
|
634
|
-
sourceFile = util.relative(sourceRoot, sourceFile);
|
|
635
|
-
}
|
|
636
|
-
var newSources = new ArraySet;
|
|
637
|
-
var newNames = new ArraySet;
|
|
638
|
-
this._mappings.unsortedForEach(function(mapping) {
|
|
639
|
-
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
640
|
-
var original = aSourceMapConsumer.originalPositionFor({
|
|
641
|
-
line: mapping.originalLine,
|
|
642
|
-
column: mapping.originalColumn
|
|
643
|
-
});
|
|
644
|
-
if (original.source != null) {
|
|
645
|
-
mapping.source = original.source;
|
|
646
|
-
if (aSourceMapPath != null) {
|
|
647
|
-
mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
648
|
-
}
|
|
649
|
-
if (sourceRoot != null) {
|
|
650
|
-
mapping.source = util.relative(sourceRoot, mapping.source);
|
|
651
|
-
}
|
|
652
|
-
mapping.originalLine = original.line;
|
|
653
|
-
mapping.originalColumn = original.column;
|
|
654
|
-
if (original.name != null) {
|
|
655
|
-
mapping.name = original.name;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
var source = mapping.source;
|
|
660
|
-
if (source != null && !newSources.has(source)) {
|
|
661
|
-
newSources.add(source);
|
|
662
|
-
}
|
|
663
|
-
var name = mapping.name;
|
|
664
|
-
if (name != null && !newNames.has(name)) {
|
|
665
|
-
newNames.add(name);
|
|
666
|
-
}
|
|
667
|
-
}, this);
|
|
668
|
-
this._sources = newSources;
|
|
669
|
-
this._names = newNames;
|
|
670
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
|
671
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
|
672
|
-
if (content != null) {
|
|
673
|
-
if (aSourceMapPath != null) {
|
|
674
|
-
sourceFile2 = util.join(aSourceMapPath, sourceFile2);
|
|
675
|
-
}
|
|
676
|
-
if (sourceRoot != null) {
|
|
677
|
-
sourceFile2 = util.relative(sourceRoot, sourceFile2);
|
|
678
|
-
}
|
|
679
|
-
this.setSourceContent(sourceFile2, content);
|
|
680
|
-
}
|
|
681
|
-
}, this);
|
|
682
|
-
};
|
|
683
|
-
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
684
|
-
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
685
|
-
throw new Error("original.line and original.column are not numbers -- you probably meant to omit " + "the original mapping entirely and only map the generated position. If so, pass " + "null for the original mapping instead of an object with empty or null values.");
|
|
686
|
-
}
|
|
687
|
-
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
688
|
-
return;
|
|
689
|
-
} else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
|
|
690
|
-
return;
|
|
691
|
-
} else {
|
|
692
|
-
throw new Error("Invalid mapping: " + JSON.stringify({
|
|
693
|
-
generated: aGenerated,
|
|
694
|
-
source: aSource,
|
|
695
|
-
original: aOriginal,
|
|
696
|
-
name: aName
|
|
697
|
-
}));
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
|
-
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
701
|
-
var previousGeneratedColumn = 0;
|
|
702
|
-
var previousGeneratedLine = 1;
|
|
703
|
-
var previousOriginalColumn = 0;
|
|
704
|
-
var previousOriginalLine = 0;
|
|
705
|
-
var previousName = 0;
|
|
706
|
-
var previousSource = 0;
|
|
707
|
-
var result = "";
|
|
708
|
-
var next;
|
|
709
|
-
var mapping;
|
|
710
|
-
var nameIdx;
|
|
711
|
-
var sourceIdx;
|
|
712
|
-
var mappings = this._mappings.toArray();
|
|
713
|
-
for (var i = 0, len = mappings.length;i < len; i++) {
|
|
714
|
-
mapping = mappings[i];
|
|
715
|
-
next = "";
|
|
716
|
-
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
717
|
-
previousGeneratedColumn = 0;
|
|
718
|
-
while (mapping.generatedLine !== previousGeneratedLine) {
|
|
719
|
-
next += ";";
|
|
720
|
-
previousGeneratedLine++;
|
|
721
|
-
}
|
|
722
|
-
} else {
|
|
723
|
-
if (i > 0) {
|
|
724
|
-
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
|
725
|
-
continue;
|
|
726
|
-
}
|
|
727
|
-
next += ",";
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
731
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
732
|
-
if (mapping.source != null) {
|
|
733
|
-
sourceIdx = this._sources.indexOf(mapping.source);
|
|
734
|
-
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
735
|
-
previousSource = sourceIdx;
|
|
736
|
-
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
737
|
-
previousOriginalLine = mapping.originalLine - 1;
|
|
738
|
-
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
739
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
740
|
-
if (mapping.name != null) {
|
|
741
|
-
nameIdx = this._names.indexOf(mapping.name);
|
|
742
|
-
next += base64VLQ.encode(nameIdx - previousName);
|
|
743
|
-
previousName = nameIdx;
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
result += next;
|
|
747
|
-
}
|
|
748
|
-
return result;
|
|
749
|
-
};
|
|
750
|
-
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
751
|
-
return aSources.map(function(source) {
|
|
752
|
-
if (!this._sourcesContents) {
|
|
753
|
-
return null;
|
|
754
|
-
}
|
|
755
|
-
if (aSourceRoot != null) {
|
|
756
|
-
source = util.relative(aSourceRoot, source);
|
|
757
|
-
}
|
|
758
|
-
var key = util.toSetString(source);
|
|
759
|
-
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
760
|
-
}, this);
|
|
761
|
-
};
|
|
762
|
-
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
763
|
-
var map = {
|
|
764
|
-
version: this._version,
|
|
765
|
-
sources: this._sources.toArray(),
|
|
766
|
-
names: this._names.toArray(),
|
|
767
|
-
mappings: this._serializeMappings()
|
|
768
|
-
};
|
|
769
|
-
if (this._file != null) {
|
|
770
|
-
map.file = this._file;
|
|
771
|
-
}
|
|
772
|
-
if (this._sourceRoot != null) {
|
|
773
|
-
map.sourceRoot = this._sourceRoot;
|
|
774
|
-
}
|
|
775
|
-
if (this._sourcesContents) {
|
|
776
|
-
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
|
|
777
|
-
}
|
|
778
|
-
return map;
|
|
779
|
-
};
|
|
780
|
-
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
781
|
-
return JSON.stringify(this.toJSON());
|
|
782
|
-
};
|
|
783
|
-
exports.SourceMapGenerator = SourceMapGenerator;
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/binary-search.js
|
|
787
|
-
var require_binary_search = __commonJS((exports) => {
|
|
788
|
-
exports.GREATEST_LOWER_BOUND = 1;
|
|
789
|
-
exports.LEAST_UPPER_BOUND = 2;
|
|
790
|
-
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
791
|
-
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
792
|
-
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
793
|
-
if (cmp === 0) {
|
|
794
|
-
return mid;
|
|
795
|
-
} else if (cmp > 0) {
|
|
796
|
-
if (aHigh - mid > 1) {
|
|
797
|
-
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
798
|
-
}
|
|
799
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
800
|
-
return aHigh < aHaystack.length ? aHigh : -1;
|
|
801
|
-
} else {
|
|
802
|
-
return mid;
|
|
803
|
-
}
|
|
804
|
-
} else {
|
|
805
|
-
if (mid - aLow > 1) {
|
|
806
|
-
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
807
|
-
}
|
|
808
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
809
|
-
return mid;
|
|
810
|
-
} else {
|
|
811
|
-
return aLow < 0 ? -1 : aLow;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
816
|
-
if (aHaystack.length === 0) {
|
|
817
|
-
return -1;
|
|
818
|
-
}
|
|
819
|
-
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
|
|
820
|
-
if (index < 0) {
|
|
821
|
-
return -1;
|
|
822
|
-
}
|
|
823
|
-
while (index - 1 >= 0) {
|
|
824
|
-
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
|
|
825
|
-
break;
|
|
826
|
-
}
|
|
827
|
-
--index;
|
|
828
|
-
}
|
|
829
|
-
return index;
|
|
830
|
-
};
|
|
831
|
-
});
|
|
832
|
-
|
|
833
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/quick-sort.js
|
|
834
|
-
var require_quick_sort = __commonJS((exports) => {
|
|
835
|
-
function swap(ary, x, y) {
|
|
836
|
-
var temp = ary[x];
|
|
837
|
-
ary[x] = ary[y];
|
|
838
|
-
ary[y] = temp;
|
|
839
|
-
}
|
|
840
|
-
function randomIntInRange(low, high) {
|
|
841
|
-
return Math.round(low + Math.random() * (high - low));
|
|
842
|
-
}
|
|
843
|
-
function doQuickSort(ary, comparator, p, r) {
|
|
844
|
-
if (p < r) {
|
|
845
|
-
var pivotIndex = randomIntInRange(p, r);
|
|
846
|
-
var i = p - 1;
|
|
847
|
-
swap(ary, pivotIndex, r);
|
|
848
|
-
var pivot = ary[r];
|
|
849
|
-
for (var j = p;j < r; j++) {
|
|
850
|
-
if (comparator(ary[j], pivot) <= 0) {
|
|
851
|
-
i += 1;
|
|
852
|
-
swap(ary, i, j);
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
swap(ary, i + 1, j);
|
|
856
|
-
var q = i + 1;
|
|
857
|
-
doQuickSort(ary, comparator, p, q - 1);
|
|
858
|
-
doQuickSort(ary, comparator, q + 1, r);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
exports.quickSort = function(ary, comparator) {
|
|
862
|
-
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
863
|
-
};
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/source-map-consumer.js
|
|
867
|
-
var require_source_map_consumer = __commonJS((exports) => {
|
|
868
|
-
var util = require_util();
|
|
869
|
-
var binarySearch = require_binary_search();
|
|
870
|
-
var ArraySet = require_array_set().ArraySet;
|
|
871
|
-
var base64VLQ = require_base64_vlq();
|
|
872
|
-
var quickSort = require_quick_sort().quickSort;
|
|
873
|
-
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
874
|
-
var sourceMap = aSourceMap;
|
|
875
|
-
if (typeof aSourceMap === "string") {
|
|
876
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
877
|
-
}
|
|
878
|
-
return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
879
|
-
}
|
|
880
|
-
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
881
|
-
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
882
|
-
};
|
|
883
|
-
SourceMapConsumer.prototype._version = 3;
|
|
884
|
-
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
885
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
886
|
-
configurable: true,
|
|
887
|
-
enumerable: true,
|
|
888
|
-
get: function() {
|
|
889
|
-
if (!this.__generatedMappings) {
|
|
890
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
891
|
-
}
|
|
892
|
-
return this.__generatedMappings;
|
|
893
|
-
}
|
|
894
|
-
});
|
|
895
|
-
SourceMapConsumer.prototype.__originalMappings = null;
|
|
896
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
897
|
-
configurable: true,
|
|
898
|
-
enumerable: true,
|
|
899
|
-
get: function() {
|
|
900
|
-
if (!this.__originalMappings) {
|
|
901
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
902
|
-
}
|
|
903
|
-
return this.__originalMappings;
|
|
904
|
-
}
|
|
905
|
-
});
|
|
906
|
-
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
907
|
-
var c = aStr.charAt(index);
|
|
908
|
-
return c === ";" || c === ",";
|
|
909
|
-
};
|
|
910
|
-
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
911
|
-
throw new Error("Subclasses must implement _parseMappings");
|
|
912
|
-
};
|
|
913
|
-
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
914
|
-
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
915
|
-
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
916
|
-
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
917
|
-
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
918
|
-
var context = aContext || null;
|
|
919
|
-
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
920
|
-
var mappings;
|
|
921
|
-
switch (order) {
|
|
922
|
-
case SourceMapConsumer.GENERATED_ORDER:
|
|
923
|
-
mappings = this._generatedMappings;
|
|
924
|
-
break;
|
|
925
|
-
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
926
|
-
mappings = this._originalMappings;
|
|
927
|
-
break;
|
|
928
|
-
default:
|
|
929
|
-
throw new Error("Unknown order of iteration.");
|
|
930
|
-
}
|
|
931
|
-
var sourceRoot = this.sourceRoot;
|
|
932
|
-
mappings.map(function(mapping) {
|
|
933
|
-
var source = mapping.source === null ? null : this._sources.at(mapping.source);
|
|
934
|
-
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
|
|
935
|
-
return {
|
|
936
|
-
source,
|
|
937
|
-
generatedLine: mapping.generatedLine,
|
|
938
|
-
generatedColumn: mapping.generatedColumn,
|
|
939
|
-
originalLine: mapping.originalLine,
|
|
940
|
-
originalColumn: mapping.originalColumn,
|
|
941
|
-
name: mapping.name === null ? null : this._names.at(mapping.name)
|
|
942
|
-
};
|
|
943
|
-
}, this).forEach(aCallback, context);
|
|
944
|
-
};
|
|
945
|
-
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
946
|
-
var line = util.getArg(aArgs, "line");
|
|
947
|
-
var needle = {
|
|
948
|
-
source: util.getArg(aArgs, "source"),
|
|
949
|
-
originalLine: line,
|
|
950
|
-
originalColumn: util.getArg(aArgs, "column", 0)
|
|
951
|
-
};
|
|
952
|
-
needle.source = this._findSourceIndex(needle.source);
|
|
953
|
-
if (needle.source < 0) {
|
|
954
|
-
return [];
|
|
955
|
-
}
|
|
956
|
-
var mappings = [];
|
|
957
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
|
|
958
|
-
if (index >= 0) {
|
|
959
|
-
var mapping = this._originalMappings[index];
|
|
960
|
-
if (aArgs.column === undefined) {
|
|
961
|
-
var originalLine = mapping.originalLine;
|
|
962
|
-
while (mapping && mapping.originalLine === originalLine) {
|
|
963
|
-
mappings.push({
|
|
964
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
965
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
966
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
967
|
-
});
|
|
968
|
-
mapping = this._originalMappings[++index];
|
|
969
|
-
}
|
|
970
|
-
} else {
|
|
971
|
-
var originalColumn = mapping.originalColumn;
|
|
972
|
-
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
973
|
-
mappings.push({
|
|
974
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
975
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
976
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
977
|
-
});
|
|
978
|
-
mapping = this._originalMappings[++index];
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
return mappings;
|
|
983
|
-
};
|
|
984
|
-
exports.SourceMapConsumer = SourceMapConsumer;
|
|
985
|
-
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
986
|
-
var sourceMap = aSourceMap;
|
|
987
|
-
if (typeof aSourceMap === "string") {
|
|
988
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
989
|
-
}
|
|
990
|
-
var version = util.getArg(sourceMap, "version");
|
|
991
|
-
var sources = util.getArg(sourceMap, "sources");
|
|
992
|
-
var names = util.getArg(sourceMap, "names", []);
|
|
993
|
-
var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
|
|
994
|
-
var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
|
|
995
|
-
var mappings = util.getArg(sourceMap, "mappings");
|
|
996
|
-
var file = util.getArg(sourceMap, "file", null);
|
|
997
|
-
if (version != this._version) {
|
|
998
|
-
throw new Error("Unsupported version: " + version);
|
|
999
|
-
}
|
|
1000
|
-
if (sourceRoot) {
|
|
1001
|
-
sourceRoot = util.normalize(sourceRoot);
|
|
1002
|
-
}
|
|
1003
|
-
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
1004
|
-
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
1005
|
-
});
|
|
1006
|
-
this._names = ArraySet.fromArray(names.map(String), true);
|
|
1007
|
-
this._sources = ArraySet.fromArray(sources, true);
|
|
1008
|
-
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
1009
|
-
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
1010
|
-
});
|
|
1011
|
-
this.sourceRoot = sourceRoot;
|
|
1012
|
-
this.sourcesContent = sourcesContent;
|
|
1013
|
-
this._mappings = mappings;
|
|
1014
|
-
this._sourceMapURL = aSourceMapURL;
|
|
1015
|
-
this.file = file;
|
|
1016
|
-
}
|
|
1017
|
-
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
1018
|
-
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
1019
|
-
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
1020
|
-
var relativeSource = aSource;
|
|
1021
|
-
if (this.sourceRoot != null) {
|
|
1022
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
1023
|
-
}
|
|
1024
|
-
if (this._sources.has(relativeSource)) {
|
|
1025
|
-
return this._sources.indexOf(relativeSource);
|
|
1026
|
-
}
|
|
1027
|
-
var i;
|
|
1028
|
-
for (i = 0;i < this._absoluteSources.length; ++i) {
|
|
1029
|
-
if (this._absoluteSources[i] == aSource) {
|
|
1030
|
-
return i;
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
return -1;
|
|
1034
|
-
};
|
|
1035
|
-
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
1036
|
-
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
1037
|
-
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
1038
|
-
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
1039
|
-
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
1040
|
-
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
|
|
1041
|
-
smc.file = aSourceMap._file;
|
|
1042
|
-
smc._sourceMapURL = aSourceMapURL;
|
|
1043
|
-
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
1044
|
-
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
1045
|
-
});
|
|
1046
|
-
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
1047
|
-
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
1048
|
-
var destOriginalMappings = smc.__originalMappings = [];
|
|
1049
|
-
for (var i = 0, length = generatedMappings.length;i < length; i++) {
|
|
1050
|
-
var srcMapping = generatedMappings[i];
|
|
1051
|
-
var destMapping = new Mapping;
|
|
1052
|
-
destMapping.generatedLine = srcMapping.generatedLine;
|
|
1053
|
-
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
1054
|
-
if (srcMapping.source) {
|
|
1055
|
-
destMapping.source = sources.indexOf(srcMapping.source);
|
|
1056
|
-
destMapping.originalLine = srcMapping.originalLine;
|
|
1057
|
-
destMapping.originalColumn = srcMapping.originalColumn;
|
|
1058
|
-
if (srcMapping.name) {
|
|
1059
|
-
destMapping.name = names.indexOf(srcMapping.name);
|
|
1060
|
-
}
|
|
1061
|
-
destOriginalMappings.push(destMapping);
|
|
1062
|
-
}
|
|
1063
|
-
destGeneratedMappings.push(destMapping);
|
|
1064
|
-
}
|
|
1065
|
-
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
1066
|
-
return smc;
|
|
1067
|
-
};
|
|
1068
|
-
BasicSourceMapConsumer.prototype._version = 3;
|
|
1069
|
-
Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
|
|
1070
|
-
get: function() {
|
|
1071
|
-
return this._absoluteSources.slice();
|
|
1072
|
-
}
|
|
1073
|
-
});
|
|
1074
|
-
function Mapping() {
|
|
1075
|
-
this.generatedLine = 0;
|
|
1076
|
-
this.generatedColumn = 0;
|
|
1077
|
-
this.source = null;
|
|
1078
|
-
this.originalLine = null;
|
|
1079
|
-
this.originalColumn = null;
|
|
1080
|
-
this.name = null;
|
|
1081
|
-
}
|
|
1082
|
-
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
1083
|
-
var generatedLine = 1;
|
|
1084
|
-
var previousGeneratedColumn = 0;
|
|
1085
|
-
var previousOriginalLine = 0;
|
|
1086
|
-
var previousOriginalColumn = 0;
|
|
1087
|
-
var previousSource = 0;
|
|
1088
|
-
var previousName = 0;
|
|
1089
|
-
var length = aStr.length;
|
|
1090
|
-
var index = 0;
|
|
1091
|
-
var cachedSegments = {};
|
|
1092
|
-
var temp = {};
|
|
1093
|
-
var originalMappings = [];
|
|
1094
|
-
var generatedMappings = [];
|
|
1095
|
-
var mapping, str, segment, end, value;
|
|
1096
|
-
while (index < length) {
|
|
1097
|
-
if (aStr.charAt(index) === ";") {
|
|
1098
|
-
generatedLine++;
|
|
1099
|
-
index++;
|
|
1100
|
-
previousGeneratedColumn = 0;
|
|
1101
|
-
} else if (aStr.charAt(index) === ",") {
|
|
1102
|
-
index++;
|
|
1103
|
-
} else {
|
|
1104
|
-
mapping = new Mapping;
|
|
1105
|
-
mapping.generatedLine = generatedLine;
|
|
1106
|
-
for (end = index;end < length; end++) {
|
|
1107
|
-
if (this._charIsMappingSeparator(aStr, end)) {
|
|
1108
|
-
break;
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
str = aStr.slice(index, end);
|
|
1112
|
-
segment = cachedSegments[str];
|
|
1113
|
-
if (segment) {
|
|
1114
|
-
index += str.length;
|
|
1115
|
-
} else {
|
|
1116
|
-
segment = [];
|
|
1117
|
-
while (index < end) {
|
|
1118
|
-
base64VLQ.decode(aStr, index, temp);
|
|
1119
|
-
value = temp.value;
|
|
1120
|
-
index = temp.rest;
|
|
1121
|
-
segment.push(value);
|
|
1122
|
-
}
|
|
1123
|
-
if (segment.length === 2) {
|
|
1124
|
-
throw new Error("Found a source, but no line and column");
|
|
1125
|
-
}
|
|
1126
|
-
if (segment.length === 3) {
|
|
1127
|
-
throw new Error("Found a source and line, but no column");
|
|
1128
|
-
}
|
|
1129
|
-
cachedSegments[str] = segment;
|
|
1130
|
-
}
|
|
1131
|
-
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
1132
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
1133
|
-
if (segment.length > 1) {
|
|
1134
|
-
mapping.source = previousSource + segment[1];
|
|
1135
|
-
previousSource += segment[1];
|
|
1136
|
-
mapping.originalLine = previousOriginalLine + segment[2];
|
|
1137
|
-
previousOriginalLine = mapping.originalLine;
|
|
1138
|
-
mapping.originalLine += 1;
|
|
1139
|
-
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
1140
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
1141
|
-
if (segment.length > 4) {
|
|
1142
|
-
mapping.name = previousName + segment[4];
|
|
1143
|
-
previousName += segment[4];
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
generatedMappings.push(mapping);
|
|
1147
|
-
if (typeof mapping.originalLine === "number") {
|
|
1148
|
-
originalMappings.push(mapping);
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
1153
|
-
this.__generatedMappings = generatedMappings;
|
|
1154
|
-
quickSort(originalMappings, util.compareByOriginalPositions);
|
|
1155
|
-
this.__originalMappings = originalMappings;
|
|
1156
|
-
};
|
|
1157
|
-
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
1158
|
-
if (aNeedle[aLineName] <= 0) {
|
|
1159
|
-
throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
|
|
1160
|
-
}
|
|
1161
|
-
if (aNeedle[aColumnName] < 0) {
|
|
1162
|
-
throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
|
|
1163
|
-
}
|
|
1164
|
-
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
1165
|
-
};
|
|
1166
|
-
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
1167
|
-
for (var index = 0;index < this._generatedMappings.length; ++index) {
|
|
1168
|
-
var mapping = this._generatedMappings[index];
|
|
1169
|
-
if (index + 1 < this._generatedMappings.length) {
|
|
1170
|
-
var nextMapping = this._generatedMappings[index + 1];
|
|
1171
|
-
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
1172
|
-
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
1173
|
-
continue;
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
mapping.lastGeneratedColumn = Infinity;
|
|
1177
|
-
}
|
|
1178
|
-
};
|
|
1179
|
-
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
1180
|
-
var needle = {
|
|
1181
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
1182
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
1183
|
-
};
|
|
1184
|
-
var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
1185
|
-
if (index >= 0) {
|
|
1186
|
-
var mapping = this._generatedMappings[index];
|
|
1187
|
-
if (mapping.generatedLine === needle.generatedLine) {
|
|
1188
|
-
var source = util.getArg(mapping, "source", null);
|
|
1189
|
-
if (source !== null) {
|
|
1190
|
-
source = this._sources.at(source);
|
|
1191
|
-
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
1192
|
-
}
|
|
1193
|
-
var name = util.getArg(mapping, "name", null);
|
|
1194
|
-
if (name !== null) {
|
|
1195
|
-
name = this._names.at(name);
|
|
1196
|
-
}
|
|
1197
|
-
return {
|
|
1198
|
-
source,
|
|
1199
|
-
line: util.getArg(mapping, "originalLine", null),
|
|
1200
|
-
column: util.getArg(mapping, "originalColumn", null),
|
|
1201
|
-
name
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
return {
|
|
1206
|
-
source: null,
|
|
1207
|
-
line: null,
|
|
1208
|
-
column: null,
|
|
1209
|
-
name: null
|
|
1210
|
-
};
|
|
1211
|
-
};
|
|
1212
|
-
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
1213
|
-
if (!this.sourcesContent) {
|
|
1214
|
-
return false;
|
|
1215
|
-
}
|
|
1216
|
-
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
1217
|
-
return sc == null;
|
|
1218
|
-
});
|
|
1219
|
-
};
|
|
1220
|
-
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
1221
|
-
if (!this.sourcesContent) {
|
|
1222
|
-
return null;
|
|
1223
|
-
}
|
|
1224
|
-
var index = this._findSourceIndex(aSource);
|
|
1225
|
-
if (index >= 0) {
|
|
1226
|
-
return this.sourcesContent[index];
|
|
1227
|
-
}
|
|
1228
|
-
var relativeSource = aSource;
|
|
1229
|
-
if (this.sourceRoot != null) {
|
|
1230
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
1231
|
-
}
|
|
1232
|
-
var url;
|
|
1233
|
-
if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
|
|
1234
|
-
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
1235
|
-
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
1236
|
-
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
1237
|
-
}
|
|
1238
|
-
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
1239
|
-
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
if (nullOnMissing) {
|
|
1243
|
-
return null;
|
|
1244
|
-
} else {
|
|
1245
|
-
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
1249
|
-
var source = util.getArg(aArgs, "source");
|
|
1250
|
-
source = this._findSourceIndex(source);
|
|
1251
|
-
if (source < 0) {
|
|
1252
|
-
return {
|
|
1253
|
-
line: null,
|
|
1254
|
-
column: null,
|
|
1255
|
-
lastColumn: null
|
|
1256
|
-
};
|
|
1257
|
-
}
|
|
1258
|
-
var needle = {
|
|
1259
|
-
source,
|
|
1260
|
-
originalLine: util.getArg(aArgs, "line"),
|
|
1261
|
-
originalColumn: util.getArg(aArgs, "column")
|
|
1262
|
-
};
|
|
1263
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
1264
|
-
if (index >= 0) {
|
|
1265
|
-
var mapping = this._originalMappings[index];
|
|
1266
|
-
if (mapping.source === needle.source) {
|
|
1267
|
-
return {
|
|
1268
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
1269
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
1270
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
1271
|
-
};
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
return {
|
|
1275
|
-
line: null,
|
|
1276
|
-
column: null,
|
|
1277
|
-
lastColumn: null
|
|
1278
|
-
};
|
|
1279
|
-
};
|
|
1280
|
-
exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
|
1281
|
-
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
1282
|
-
var sourceMap = aSourceMap;
|
|
1283
|
-
if (typeof aSourceMap === "string") {
|
|
1284
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
1285
|
-
}
|
|
1286
|
-
var version = util.getArg(sourceMap, "version");
|
|
1287
|
-
var sections = util.getArg(sourceMap, "sections");
|
|
1288
|
-
if (version != this._version) {
|
|
1289
|
-
throw new Error("Unsupported version: " + version);
|
|
1290
|
-
}
|
|
1291
|
-
this._sources = new ArraySet;
|
|
1292
|
-
this._names = new ArraySet;
|
|
1293
|
-
var lastOffset = {
|
|
1294
|
-
line: -1,
|
|
1295
|
-
column: 0
|
|
1296
|
-
};
|
|
1297
|
-
this._sections = sections.map(function(s) {
|
|
1298
|
-
if (s.url) {
|
|
1299
|
-
throw new Error("Support for url field in sections not implemented.");
|
|
1300
|
-
}
|
|
1301
|
-
var offset = util.getArg(s, "offset");
|
|
1302
|
-
var offsetLine = util.getArg(offset, "line");
|
|
1303
|
-
var offsetColumn = util.getArg(offset, "column");
|
|
1304
|
-
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
1305
|
-
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
1306
|
-
}
|
|
1307
|
-
lastOffset = offset;
|
|
1308
|
-
return {
|
|
1309
|
-
generatedOffset: {
|
|
1310
|
-
generatedLine: offsetLine + 1,
|
|
1311
|
-
generatedColumn: offsetColumn + 1
|
|
1312
|
-
},
|
|
1313
|
-
consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
|
|
1314
|
-
};
|
|
1315
|
-
});
|
|
1316
|
-
}
|
|
1317
|
-
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
1318
|
-
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
1319
|
-
IndexedSourceMapConsumer.prototype._version = 3;
|
|
1320
|
-
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
1321
|
-
get: function() {
|
|
1322
|
-
var sources = [];
|
|
1323
|
-
for (var i = 0;i < this._sections.length; i++) {
|
|
1324
|
-
for (var j = 0;j < this._sections[i].consumer.sources.length; j++) {
|
|
1325
|
-
sources.push(this._sections[i].consumer.sources[j]);
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
return sources;
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
|
-
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
1332
|
-
var needle = {
|
|
1333
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
1334
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
1335
|
-
};
|
|
1336
|
-
var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) {
|
|
1337
|
-
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
1338
|
-
if (cmp) {
|
|
1339
|
-
return cmp;
|
|
1340
|
-
}
|
|
1341
|
-
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
1342
|
-
});
|
|
1343
|
-
var section = this._sections[sectionIndex];
|
|
1344
|
-
if (!section) {
|
|
1345
|
-
return {
|
|
1346
|
-
source: null,
|
|
1347
|
-
line: null,
|
|
1348
|
-
column: null,
|
|
1349
|
-
name: null
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
return section.consumer.originalPositionFor({
|
|
1353
|
-
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
1354
|
-
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
1355
|
-
bias: aArgs.bias
|
|
1356
|
-
});
|
|
1357
|
-
};
|
|
1358
|
-
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
1359
|
-
return this._sections.every(function(s) {
|
|
1360
|
-
return s.consumer.hasContentsOfAllSources();
|
|
1361
|
-
});
|
|
1362
|
-
};
|
|
1363
|
-
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
1364
|
-
for (var i = 0;i < this._sections.length; i++) {
|
|
1365
|
-
var section = this._sections[i];
|
|
1366
|
-
var content = section.consumer.sourceContentFor(aSource, true);
|
|
1367
|
-
if (content) {
|
|
1368
|
-
return content;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
if (nullOnMissing) {
|
|
1372
|
-
return null;
|
|
1373
|
-
} else {
|
|
1374
|
-
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
1378
|
-
for (var i = 0;i < this._sections.length; i++) {
|
|
1379
|
-
var section = this._sections[i];
|
|
1380
|
-
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
|
|
1381
|
-
continue;
|
|
1382
|
-
}
|
|
1383
|
-
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
1384
|
-
if (generatedPosition) {
|
|
1385
|
-
var ret = {
|
|
1386
|
-
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
1387
|
-
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
1388
|
-
};
|
|
1389
|
-
return ret;
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
return {
|
|
1393
|
-
line: null,
|
|
1394
|
-
column: null
|
|
1395
|
-
};
|
|
1396
|
-
};
|
|
1397
|
-
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
1398
|
-
this.__generatedMappings = [];
|
|
1399
|
-
this.__originalMappings = [];
|
|
1400
|
-
for (var i = 0;i < this._sections.length; i++) {
|
|
1401
|
-
var section = this._sections[i];
|
|
1402
|
-
var sectionMappings = section.consumer._generatedMappings;
|
|
1403
|
-
for (var j = 0;j < sectionMappings.length; j++) {
|
|
1404
|
-
var mapping = sectionMappings[j];
|
|
1405
|
-
var source = section.consumer._sources.at(mapping.source);
|
|
1406
|
-
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
1407
|
-
this._sources.add(source);
|
|
1408
|
-
source = this._sources.indexOf(source);
|
|
1409
|
-
var name = null;
|
|
1410
|
-
if (mapping.name) {
|
|
1411
|
-
name = section.consumer._names.at(mapping.name);
|
|
1412
|
-
this._names.add(name);
|
|
1413
|
-
name = this._names.indexOf(name);
|
|
1414
|
-
}
|
|
1415
|
-
var adjustedMapping = {
|
|
1416
|
-
source,
|
|
1417
|
-
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
1418
|
-
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
1419
|
-
originalLine: mapping.originalLine,
|
|
1420
|
-
originalColumn: mapping.originalColumn,
|
|
1421
|
-
name
|
|
1422
|
-
};
|
|
1423
|
-
this.__generatedMappings.push(adjustedMapping);
|
|
1424
|
-
if (typeof adjustedMapping.originalLine === "number") {
|
|
1425
|
-
this.__originalMappings.push(adjustedMapping);
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
1430
|
-
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
1431
|
-
};
|
|
1432
|
-
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
1433
|
-
});
|
|
1434
|
-
|
|
1435
|
-
// ../../node_modules/get-source/node_modules/source-map/lib/source-node.js
|
|
1436
|
-
var require_source_node = __commonJS((exports) => {
|
|
1437
|
-
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
1438
|
-
var util = require_util();
|
|
1439
|
-
var REGEX_NEWLINE = /(\r?\n)/;
|
|
1440
|
-
var NEWLINE_CODE = 10;
|
|
1441
|
-
var isSourceNode = "$$$isSourceNode$$$";
|
|
1442
|
-
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
1443
|
-
this.children = [];
|
|
1444
|
-
this.sourceContents = {};
|
|
1445
|
-
this.line = aLine == null ? null : aLine;
|
|
1446
|
-
this.column = aColumn == null ? null : aColumn;
|
|
1447
|
-
this.source = aSource == null ? null : aSource;
|
|
1448
|
-
this.name = aName == null ? null : aName;
|
|
1449
|
-
this[isSourceNode] = true;
|
|
1450
|
-
if (aChunks != null)
|
|
1451
|
-
this.add(aChunks);
|
|
1452
|
-
}
|
|
1453
|
-
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
1454
|
-
var node = new SourceNode;
|
|
1455
|
-
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
1456
|
-
var remainingLinesIndex = 0;
|
|
1457
|
-
var shiftNextLine = function() {
|
|
1458
|
-
var lineContents = getNextLine();
|
|
1459
|
-
var newLine = getNextLine() || "";
|
|
1460
|
-
return lineContents + newLine;
|
|
1461
|
-
function getNextLine() {
|
|
1462
|
-
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
|
|
1463
|
-
}
|
|
1464
|
-
};
|
|
1465
|
-
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
1466
|
-
var lastMapping = null;
|
|
1467
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
1468
|
-
if (lastMapping !== null) {
|
|
1469
|
-
if (lastGeneratedLine < mapping.generatedLine) {
|
|
1470
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
1471
|
-
lastGeneratedLine++;
|
|
1472
|
-
lastGeneratedColumn = 0;
|
|
1473
|
-
} else {
|
|
1474
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
1475
|
-
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
1476
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
1477
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
1478
|
-
addMappingWithCode(lastMapping, code);
|
|
1479
|
-
lastMapping = mapping;
|
|
1480
|
-
return;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
while (lastGeneratedLine < mapping.generatedLine) {
|
|
1484
|
-
node.add(shiftNextLine());
|
|
1485
|
-
lastGeneratedLine++;
|
|
1486
|
-
}
|
|
1487
|
-
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
1488
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
1489
|
-
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
1490
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
1491
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
1492
|
-
}
|
|
1493
|
-
lastMapping = mapping;
|
|
1494
|
-
}, this);
|
|
1495
|
-
if (remainingLinesIndex < remainingLines.length) {
|
|
1496
|
-
if (lastMapping) {
|
|
1497
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
1498
|
-
}
|
|
1499
|
-
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
1500
|
-
}
|
|
1501
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
1502
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
1503
|
-
if (content != null) {
|
|
1504
|
-
if (aRelativePath != null) {
|
|
1505
|
-
sourceFile = util.join(aRelativePath, sourceFile);
|
|
1506
|
-
}
|
|
1507
|
-
node.setSourceContent(sourceFile, content);
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
1510
|
-
return node;
|
|
1511
|
-
function addMappingWithCode(mapping, code) {
|
|
1512
|
-
if (mapping === null || mapping.source === undefined) {
|
|
1513
|
-
node.add(code);
|
|
1514
|
-
} else {
|
|
1515
|
-
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
1516
|
-
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
};
|
|
1520
|
-
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
1521
|
-
if (Array.isArray(aChunk)) {
|
|
1522
|
-
aChunk.forEach(function(chunk) {
|
|
1523
|
-
this.add(chunk);
|
|
1524
|
-
}, this);
|
|
1525
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
1526
|
-
if (aChunk) {
|
|
1527
|
-
this.children.push(aChunk);
|
|
1528
|
-
}
|
|
1529
|
-
} else {
|
|
1530
|
-
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
1531
|
-
}
|
|
1532
|
-
return this;
|
|
1533
|
-
};
|
|
1534
|
-
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
1535
|
-
if (Array.isArray(aChunk)) {
|
|
1536
|
-
for (var i = aChunk.length - 1;i >= 0; i--) {
|
|
1537
|
-
this.prepend(aChunk[i]);
|
|
1538
|
-
}
|
|
1539
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
1540
|
-
this.children.unshift(aChunk);
|
|
1541
|
-
} else {
|
|
1542
|
-
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
1543
|
-
}
|
|
1544
|
-
return this;
|
|
1545
|
-
};
|
|
1546
|
-
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
1547
|
-
var chunk;
|
|
1548
|
-
for (var i = 0, len = this.children.length;i < len; i++) {
|
|
1549
|
-
chunk = this.children[i];
|
|
1550
|
-
if (chunk[isSourceNode]) {
|
|
1551
|
-
chunk.walk(aFn);
|
|
1552
|
-
} else {
|
|
1553
|
-
if (chunk !== "") {
|
|
1554
|
-
aFn(chunk, {
|
|
1555
|
-
source: this.source,
|
|
1556
|
-
line: this.line,
|
|
1557
|
-
column: this.column,
|
|
1558
|
-
name: this.name
|
|
1559
|
-
});
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
1565
|
-
var newChildren;
|
|
1566
|
-
var i;
|
|
1567
|
-
var len = this.children.length;
|
|
1568
|
-
if (len > 0) {
|
|
1569
|
-
newChildren = [];
|
|
1570
|
-
for (i = 0;i < len - 1; i++) {
|
|
1571
|
-
newChildren.push(this.children[i]);
|
|
1572
|
-
newChildren.push(aSep);
|
|
1573
|
-
}
|
|
1574
|
-
newChildren.push(this.children[i]);
|
|
1575
|
-
this.children = newChildren;
|
|
1576
|
-
}
|
|
1577
|
-
return this;
|
|
1578
|
-
};
|
|
1579
|
-
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
1580
|
-
var lastChild = this.children[this.children.length - 1];
|
|
1581
|
-
if (lastChild[isSourceNode]) {
|
|
1582
|
-
lastChild.replaceRight(aPattern, aReplacement);
|
|
1583
|
-
} else if (typeof lastChild === "string") {
|
|
1584
|
-
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
|
1585
|
-
} else {
|
|
1586
|
-
this.children.push("".replace(aPattern, aReplacement));
|
|
1587
|
-
}
|
|
1588
|
-
return this;
|
|
1589
|
-
};
|
|
1590
|
-
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
1591
|
-
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
1592
|
-
};
|
|
1593
|
-
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
1594
|
-
for (var i = 0, len = this.children.length;i < len; i++) {
|
|
1595
|
-
if (this.children[i][isSourceNode]) {
|
|
1596
|
-
this.children[i].walkSourceContents(aFn);
|
|
1597
|
-
}
|
|
1598
|
-
}
|
|
1599
|
-
var sources = Object.keys(this.sourceContents);
|
|
1600
|
-
for (var i = 0, len = sources.length;i < len; i++) {
|
|
1601
|
-
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
|
1602
|
-
}
|
|
1603
|
-
};
|
|
1604
|
-
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
1605
|
-
var str = "";
|
|
1606
|
-
this.walk(function(chunk) {
|
|
1607
|
-
str += chunk;
|
|
1608
|
-
});
|
|
1609
|
-
return str;
|
|
1610
|
-
};
|
|
1611
|
-
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
1612
|
-
var generated = {
|
|
1613
|
-
code: "",
|
|
1614
|
-
line: 1,
|
|
1615
|
-
column: 0
|
|
1616
|
-
};
|
|
1617
|
-
var map = new SourceMapGenerator(aArgs);
|
|
1618
|
-
var sourceMappingActive = false;
|
|
1619
|
-
var lastOriginalSource = null;
|
|
1620
|
-
var lastOriginalLine = null;
|
|
1621
|
-
var lastOriginalColumn = null;
|
|
1622
|
-
var lastOriginalName = null;
|
|
1623
|
-
this.walk(function(chunk, original) {
|
|
1624
|
-
generated.code += chunk;
|
|
1625
|
-
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
1626
|
-
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
1627
|
-
map.addMapping({
|
|
1628
|
-
source: original.source,
|
|
1629
|
-
original: {
|
|
1630
|
-
line: original.line,
|
|
1631
|
-
column: original.column
|
|
1632
|
-
},
|
|
1633
|
-
generated: {
|
|
1634
|
-
line: generated.line,
|
|
1635
|
-
column: generated.column
|
|
1636
|
-
},
|
|
1637
|
-
name: original.name
|
|
1638
|
-
});
|
|
1639
|
-
}
|
|
1640
|
-
lastOriginalSource = original.source;
|
|
1641
|
-
lastOriginalLine = original.line;
|
|
1642
|
-
lastOriginalColumn = original.column;
|
|
1643
|
-
lastOriginalName = original.name;
|
|
1644
|
-
sourceMappingActive = true;
|
|
1645
|
-
} else if (sourceMappingActive) {
|
|
1646
|
-
map.addMapping({
|
|
1647
|
-
generated: {
|
|
1648
|
-
line: generated.line,
|
|
1649
|
-
column: generated.column
|
|
1650
|
-
}
|
|
1651
|
-
});
|
|
1652
|
-
lastOriginalSource = null;
|
|
1653
|
-
sourceMappingActive = false;
|
|
1654
|
-
}
|
|
1655
|
-
for (var idx = 0, length = chunk.length;idx < length; idx++) {
|
|
1656
|
-
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
1657
|
-
generated.line++;
|
|
1658
|
-
generated.column = 0;
|
|
1659
|
-
if (idx + 1 === length) {
|
|
1660
|
-
lastOriginalSource = null;
|
|
1661
|
-
sourceMappingActive = false;
|
|
1662
|
-
} else if (sourceMappingActive) {
|
|
1663
|
-
map.addMapping({
|
|
1664
|
-
source: original.source,
|
|
1665
|
-
original: {
|
|
1666
|
-
line: original.line,
|
|
1667
|
-
column: original.column
|
|
1668
|
-
},
|
|
1669
|
-
generated: {
|
|
1670
|
-
line: generated.line,
|
|
1671
|
-
column: generated.column
|
|
1672
|
-
},
|
|
1673
|
-
name: original.name
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
} else {
|
|
1677
|
-
generated.column++;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
});
|
|
1681
|
-
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
1682
|
-
map.setSourceContent(sourceFile, sourceContent);
|
|
1683
|
-
});
|
|
1684
|
-
return { code: generated.code, map };
|
|
1685
|
-
};
|
|
1686
|
-
exports.SourceNode = SourceNode;
|
|
1687
|
-
});
|
|
1688
|
-
|
|
1689
|
-
// ../../node_modules/get-source/node_modules/source-map/source-map.js
|
|
1690
|
-
var require_source_map = __commonJS((exports) => {
|
|
1691
|
-
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
1692
|
-
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
1693
|
-
exports.SourceNode = require_source_node().SourceNode;
|
|
1694
|
-
});
|
|
1695
|
-
|
|
1696
|
-
// ../../node_modules/get-source/impl/SyncPromise.js
|
|
1697
|
-
var require_SyncPromise = __commonJS((exports, module) => {
|
|
1698
|
-
module.exports = class SyncPromise {
|
|
1699
|
-
constructor(fn) {
|
|
1700
|
-
try {
|
|
1701
|
-
fn((x) => {
|
|
1702
|
-
this.setValue(x, false);
|
|
1703
|
-
}, (x) => {
|
|
1704
|
-
this.setValue(x, true);
|
|
1705
|
-
});
|
|
1706
|
-
} catch (e) {
|
|
1707
|
-
this.setValue(e, true);
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
setValue(x, rejected) {
|
|
1711
|
-
this.val = x instanceof SyncPromise ? x.val : x;
|
|
1712
|
-
this.rejected = rejected || (x instanceof SyncPromise ? x.rejected : false);
|
|
1713
|
-
}
|
|
1714
|
-
static valueFrom(x) {
|
|
1715
|
-
if (x instanceof SyncPromise) {
|
|
1716
|
-
if (x.rejected)
|
|
1717
|
-
throw x.val;
|
|
1718
|
-
else
|
|
1719
|
-
return x.val;
|
|
1720
|
-
} else {
|
|
1721
|
-
return x;
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
then(fn) {
|
|
1725
|
-
try {
|
|
1726
|
-
if (!this.rejected)
|
|
1727
|
-
return SyncPromise.resolve(fn(this.val));
|
|
1728
|
-
} catch (e) {
|
|
1729
|
-
return SyncPromise.reject(e);
|
|
1730
|
-
}
|
|
1731
|
-
return this;
|
|
1732
|
-
}
|
|
1733
|
-
catch(fn) {
|
|
1734
|
-
try {
|
|
1735
|
-
if (this.rejected)
|
|
1736
|
-
return SyncPromise.resolve(fn(this.val));
|
|
1737
|
-
} catch (e) {
|
|
1738
|
-
return SyncPromise.reject(e);
|
|
1739
|
-
}
|
|
1740
|
-
return this;
|
|
1741
|
-
}
|
|
1742
|
-
static resolve(x) {
|
|
1743
|
-
return new SyncPromise((resolve) => {
|
|
1744
|
-
resolve(x);
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
static reject(x) {
|
|
1748
|
-
return new SyncPromise((_, reject) => {
|
|
1749
|
-
reject(x);
|
|
1750
|
-
});
|
|
1751
|
-
}
|
|
1752
|
-
};
|
|
1753
|
-
});
|
|
1754
|
-
|
|
1755
|
-
// ../../node_modules/get-source/impl/path.js
|
|
1756
|
-
var require_path = __commonJS((exports, module) => {
|
|
1757
|
-
var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator;
|
|
1758
|
-
var cwd = isBrowser ? window.location.href : process.cwd();
|
|
1759
|
-
var urlRegexp = new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$");
|
|
1760
|
-
var path2 = module.exports = {
|
|
1761
|
-
concat(a, b) {
|
|
1762
|
-
const a_endsWithSlash = a[a.length - 1] === "/", b_startsWithSlash = b[0] === "/";
|
|
1763
|
-
return a + (a_endsWithSlash || b_startsWithSlash ? "" : "/") + (a_endsWithSlash && b_startsWithSlash ? b.substring(1) : b);
|
|
1764
|
-
},
|
|
1765
|
-
resolve(x) {
|
|
1766
|
-
if (path2.isAbsolute(x)) {
|
|
1767
|
-
return path2.normalize(x);
|
|
1768
|
-
}
|
|
1769
|
-
return path2.normalize(path2.concat(cwd, x));
|
|
1770
|
-
},
|
|
1771
|
-
normalize(x) {
|
|
1772
|
-
let output = [], skip = 0;
|
|
1773
|
-
x.split("/").reverse().filter((x2) => x2 !== ".").forEach((x2) => {
|
|
1774
|
-
if (x2 === "..") {
|
|
1775
|
-
skip++;
|
|
1776
|
-
} else if (skip === 0) {
|
|
1777
|
-
output.push(x2);
|
|
1778
|
-
} else {
|
|
1779
|
-
skip--;
|
|
1780
|
-
}
|
|
1781
|
-
});
|
|
1782
|
-
const result = output.reverse().join("/");
|
|
1783
|
-
return (isBrowser && result[0] === "/" ? result[1] === "/" ? window.location.protocol : window.location.origin : "") + result;
|
|
1784
|
-
},
|
|
1785
|
-
isData: (x) => x.indexOf("data:") === 0,
|
|
1786
|
-
isURL: (x) => urlRegexp.test(x),
|
|
1787
|
-
isAbsolute: (x) => x[0] === "/" || /^[^\/]*:/.test(x),
|
|
1788
|
-
relativeToFile(a, b) {
|
|
1789
|
-
return path2.isData(a) || path2.isAbsolute(b) ? path2.normalize(b) : path2.normalize(path2.concat(a.split("/").slice(0, -1).join("/"), b));
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
});
|
|
1793
|
-
|
|
1794
|
-
// ../../node_modules/data-uri-to-buffer/index.js
|
|
1795
|
-
var require_data_uri_to_buffer = __commonJS((exports, module) => {
|
|
1796
|
-
module.exports = dataUriToBuffer;
|
|
1797
|
-
function dataUriToBuffer(uri) {
|
|
1798
|
-
if (!/^data\:/i.test(uri)) {
|
|
1799
|
-
throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
|
|
1800
|
-
}
|
|
1801
|
-
uri = uri.replace(/\r?\n/g, "");
|
|
1802
|
-
var firstComma = uri.indexOf(",");
|
|
1803
|
-
if (firstComma === -1 || firstComma <= 4) {
|
|
1804
|
-
throw new TypeError("malformed data: URI");
|
|
1805
|
-
}
|
|
1806
|
-
var meta = uri.substring(5, firstComma).split(";");
|
|
1807
|
-
var type = meta[0] || "text/plain";
|
|
1808
|
-
var typeFull = type;
|
|
1809
|
-
var base64 = false;
|
|
1810
|
-
var charset = "";
|
|
1811
|
-
for (var i = 1;i < meta.length; i++) {
|
|
1812
|
-
if (meta[i] == "base64") {
|
|
1813
|
-
base64 = true;
|
|
1814
|
-
} else {
|
|
1815
|
-
typeFull += ";" + meta[i];
|
|
1816
|
-
if (meta[i].indexOf("charset=") == 0) {
|
|
1817
|
-
charset = meta[i].substring(8);
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
if (!meta[0] && !charset.length) {
|
|
1822
|
-
typeFull += ";charset=US-ASCII";
|
|
1823
|
-
charset = "US-ASCII";
|
|
1824
|
-
}
|
|
1825
|
-
var data = unescape(uri.substring(firstComma + 1));
|
|
1826
|
-
var encoding = base64 ? "base64" : "ascii";
|
|
1827
|
-
var buffer = Buffer.from ? Buffer.from(data, encoding) : new Buffer(data, encoding);
|
|
1828
|
-
buffer.type = type;
|
|
1829
|
-
buffer.typeFull = typeFull;
|
|
1830
|
-
buffer.charset = charset;
|
|
1831
|
-
return buffer;
|
|
1832
|
-
}
|
|
1833
|
-
});
|
|
1834
|
-
|
|
1835
|
-
// ../../node_modules/get-source/get-source.js
|
|
1836
|
-
var require_get_source = __commonJS((exports, module) => {
|
|
1837
|
-
var { assign } = Object;
|
|
1838
|
-
var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator;
|
|
1839
|
-
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
1840
|
-
var SyncPromise = require_SyncPromise();
|
|
1841
|
-
var path2 = require_path();
|
|
1842
|
-
var dataURIToBuffer = require_data_uri_to_buffer();
|
|
1843
|
-
var nodeRequire = isBrowser ? null : module.require;
|
|
1844
|
-
var memoize = (f) => {
|
|
1845
|
-
const m = (x) => (x in m.cache) ? m.cache[x] : m.cache[x] = f(x);
|
|
1846
|
-
m.forgetEverything = () => {
|
|
1847
|
-
m.cache = Object.create(null);
|
|
1848
|
-
};
|
|
1849
|
-
m.cache = Object.create(null);
|
|
1850
|
-
return m;
|
|
1851
|
-
};
|
|
1852
|
-
function impl(fetchFile, sync) {
|
|
1853
|
-
const PromiseImpl = sync ? SyncPromise : Promise;
|
|
1854
|
-
const SourceFileMemoized = memoize((path3) => SourceFile(path3, fetchFile(path3)));
|
|
1855
|
-
function SourceFile(srcPath, text) {
|
|
1856
|
-
if (text === undefined)
|
|
1857
|
-
return SourceFileMemoized(path2.resolve(srcPath));
|
|
1858
|
-
return PromiseImpl.resolve(text).then((text2) => {
|
|
1859
|
-
let file;
|
|
1860
|
-
let lines;
|
|
1861
|
-
let resolver;
|
|
1862
|
-
let _resolve = (loc) => (resolver = resolver || SourceMapResolverFromFetchedFile(file))(loc);
|
|
1863
|
-
return file = {
|
|
1864
|
-
path: srcPath,
|
|
1865
|
-
text: text2,
|
|
1866
|
-
get lines() {
|
|
1867
|
-
return lines = lines || text2.split(`
|
|
1868
|
-
`);
|
|
1869
|
-
},
|
|
1870
|
-
resolve(loc) {
|
|
1871
|
-
const result = _resolve(loc);
|
|
1872
|
-
if (sync) {
|
|
1873
|
-
try {
|
|
1874
|
-
return SyncPromise.valueFrom(result);
|
|
1875
|
-
} catch (e) {
|
|
1876
|
-
return assign({}, loc, { error: e });
|
|
1877
|
-
}
|
|
1878
|
-
} else {
|
|
1879
|
-
return Promise.resolve(result);
|
|
1880
|
-
}
|
|
1881
|
-
},
|
|
1882
|
-
_resolve
|
|
1883
|
-
};
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
function SourceMapResolverFromFetchedFile(file) {
|
|
1887
|
-
const re = /\u0023 sourceMappingURL=(.+)\n?/g;
|
|
1888
|
-
let lastMatch = undefined;
|
|
1889
|
-
while (true) {
|
|
1890
|
-
const match = re.exec(file.text);
|
|
1891
|
-
if (match)
|
|
1892
|
-
lastMatch = match;
|
|
1893
|
-
else
|
|
1894
|
-
break;
|
|
1895
|
-
}
|
|
1896
|
-
const url = lastMatch && lastMatch[1];
|
|
1897
|
-
const defaultResolver = (loc) => assign({}, loc, {
|
|
1898
|
-
sourceFile: file,
|
|
1899
|
-
sourceLine: file.lines[loc.line - 1] || ""
|
|
1900
|
-
});
|
|
1901
|
-
return url ? SourceMapResolver(file.path, url, defaultResolver) : defaultResolver;
|
|
1902
|
-
}
|
|
1903
|
-
function SourceMapResolver(originalFilePath, sourceMapPath, fallbackResolve) {
|
|
1904
|
-
const srcFile = sourceMapPath.startsWith("data:") ? SourceFile(originalFilePath, dataURIToBuffer(sourceMapPath).toString()) : SourceFile(path2.relativeToFile(originalFilePath, sourceMapPath));
|
|
1905
|
-
const parsedMap = srcFile.then((f) => SourceMapConsumer(JSON.parse(f.text)));
|
|
1906
|
-
const sourceFor = memoize(function sourceFor(filePath) {
|
|
1907
|
-
return srcFile.then((f) => {
|
|
1908
|
-
const fullPath = path2.relativeToFile(f.path, filePath);
|
|
1909
|
-
return parsedMap.then((x) => SourceFile(fullPath, x.sourceContentFor(filePath, true) || undefined));
|
|
1910
|
-
});
|
|
1911
|
-
});
|
|
1912
|
-
return (loc) => parsedMap.then((x) => {
|
|
1913
|
-
const originalLoc = x.originalPositionFor(loc);
|
|
1914
|
-
return originalLoc.source ? sourceFor(originalLoc.source).then((x2) => x2._resolve(assign({}, loc, {
|
|
1915
|
-
line: originalLoc.line,
|
|
1916
|
-
column: originalLoc.column + 1,
|
|
1917
|
-
name: originalLoc.name
|
|
1918
|
-
}))) : fallbackResolve(loc);
|
|
1919
|
-
}).catch((e) => assign(fallbackResolve(loc), { sourceMapError: e }));
|
|
1920
|
-
}
|
|
1921
|
-
return assign(function getSource(path3) {
|
|
1922
|
-
const file = SourceFile(path3);
|
|
1923
|
-
if (sync) {
|
|
1924
|
-
try {
|
|
1925
|
-
return SyncPromise.valueFrom(file);
|
|
1926
|
-
} catch (e) {
|
|
1927
|
-
const noFile = {
|
|
1928
|
-
path: path3,
|
|
1929
|
-
text: "",
|
|
1930
|
-
lines: [],
|
|
1931
|
-
error: e,
|
|
1932
|
-
resolve(loc) {
|
|
1933
|
-
return assign({}, loc, { error: e, sourceLine: "", sourceFile: noFile });
|
|
1934
|
-
}
|
|
1935
|
-
};
|
|
1936
|
-
return noFile;
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
return file;
|
|
1940
|
-
}, {
|
|
1941
|
-
resetCache: () => SourceFileMemoized.forgetEverything(),
|
|
1942
|
-
getCache: () => SourceFileMemoized.cache
|
|
1943
|
-
});
|
|
1944
|
-
}
|
|
1945
|
-
module.exports = impl(function fetchFileSync(path3) {
|
|
1946
|
-
return new SyncPromise((resolve) => {
|
|
1947
|
-
if (isBrowser) {
|
|
1948
|
-
let xhr = new XMLHttpRequest;
|
|
1949
|
-
xhr.open("GET", path3, false);
|
|
1950
|
-
xhr.send(null);
|
|
1951
|
-
resolve(xhr.responseText);
|
|
1952
|
-
} else {
|
|
1953
|
-
resolve(nodeRequire("fs").readFileSync(path3, { encoding: "utf8" }));
|
|
1954
|
-
}
|
|
1955
|
-
});
|
|
1956
|
-
}, true);
|
|
1957
|
-
module.exports.async = impl(function fetchFileAsync(path3) {
|
|
1958
|
-
return new Promise((resolve, reject) => {
|
|
1959
|
-
if (isBrowser) {
|
|
1960
|
-
let xhr = new XMLHttpRequest;
|
|
1961
|
-
xhr.open("GET", path3);
|
|
1962
|
-
xhr.onreadystatechange = (event) => {
|
|
1963
|
-
if (xhr.readyState === 4) {
|
|
1964
|
-
if (xhr.status === 200) {
|
|
1965
|
-
resolve(xhr.responseText);
|
|
1966
|
-
} else {
|
|
1967
|
-
reject(new Error(xhr.statusText));
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
};
|
|
1971
|
-
xhr.send(null);
|
|
1972
|
-
} else {
|
|
1973
|
-
nodeRequire("fs").readFile(path3, { encoding: "utf8" }, (e, x) => {
|
|
1974
|
-
e ? reject(e) : resolve(x);
|
|
1975
|
-
});
|
|
1976
|
-
}
|
|
1977
|
-
});
|
|
1978
|
-
});
|
|
1979
|
-
});
|
|
1980
|
-
|
|
1981
|
-
// ../../node_modules/stacktracey/impl/partition.js
|
|
1982
|
-
var require_partition = __commonJS((exports, module) => {
|
|
1983
|
-
module.exports = (arr_, pred) => {
|
|
1984
|
-
const arr = arr_ || [], spans = [];
|
|
1985
|
-
let span = {
|
|
1986
|
-
label: undefined,
|
|
1987
|
-
items: [arr.first]
|
|
1988
|
-
};
|
|
1989
|
-
arr.forEach((x) => {
|
|
1990
|
-
const label = pred(x);
|
|
1991
|
-
if (span.label !== label && span.items.length) {
|
|
1992
|
-
spans.push(span = { label, items: [x] });
|
|
1993
|
-
} else {
|
|
1994
|
-
span.items.push(x);
|
|
1995
|
-
}
|
|
1996
|
-
});
|
|
1997
|
-
return spans;
|
|
1998
|
-
};
|
|
1999
|
-
});
|
|
2000
|
-
|
|
2001
|
-
// ../../node_modules/printable-characters/build/printable-characters.js
|
|
2002
|
-
var require_printable_characters = __commonJS((exports, module) => {
|
|
2003
|
-
var _slicedToArray = function() {
|
|
2004
|
-
function sliceIterator(arr, i) {
|
|
2005
|
-
var _arr = [];
|
|
2006
|
-
var _n = true;
|
|
2007
|
-
var _d = false;
|
|
2008
|
-
var _e = undefined;
|
|
2009
|
-
try {
|
|
2010
|
-
for (var _i = arr[Symbol.iterator](), _s;!(_n = (_s = _i.next()).done); _n = true) {
|
|
2011
|
-
_arr.push(_s.value);
|
|
2012
|
-
if (i && _arr.length === i)
|
|
2013
|
-
break;
|
|
2014
|
-
}
|
|
2015
|
-
} catch (err) {
|
|
2016
|
-
_d = true;
|
|
2017
|
-
_e = err;
|
|
2018
|
-
} finally {
|
|
2019
|
-
try {
|
|
2020
|
-
if (!_n && _i["return"])
|
|
2021
|
-
_i["return"]();
|
|
2022
|
-
} finally {
|
|
2023
|
-
if (_d)
|
|
2024
|
-
throw _e;
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
return _arr;
|
|
2028
|
-
}
|
|
2029
|
-
return function(arr, i) {
|
|
2030
|
-
if (Array.isArray(arr)) {
|
|
2031
|
-
return arr;
|
|
2032
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
2033
|
-
return sliceIterator(arr, i);
|
|
2034
|
-
} else {
|
|
2035
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
2036
|
-
}
|
|
2037
|
-
};
|
|
2038
|
-
}();
|
|
2039
|
-
var ansiEscapeCode = "[\x1B\x9B][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]";
|
|
2040
|
-
var zeroWidthCharacterExceptNewline = "\x00-\b\v-\x19\x1B\x9B\xAD\u200B\u2028\u2029\uFEFF\uFE00-\uFE0F";
|
|
2041
|
-
var zeroWidthCharacter = `
|
|
2042
|
-
` + zeroWidthCharacterExceptNewline;
|
|
2043
|
-
var zeroWidthCharactersExceptNewline = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacterExceptNewline + "]", "g");
|
|
2044
|
-
var zeroWidthCharacters = new RegExp("(?:" + ansiEscapeCode + ")|[" + zeroWidthCharacter + "]", "g");
|
|
2045
|
-
var partition = new RegExp("((?:" + ansiEscapeCode + ")|[\t" + zeroWidthCharacter + "])?([^\t" + zeroWidthCharacter + "]*)", "g");
|
|
2046
|
-
module.exports = {
|
|
2047
|
-
zeroWidthCharacters,
|
|
2048
|
-
ansiEscapeCodes: new RegExp(ansiEscapeCode, "g"),
|
|
2049
|
-
strlen: (s) => Array.from(s.replace(zeroWidthCharacters, "")).length,
|
|
2050
|
-
isBlank: (s) => s.replace(zeroWidthCharacters, "").replace(/\s/g, "").length === 0,
|
|
2051
|
-
blank: (s) => Array.from(s.replace(zeroWidthCharactersExceptNewline, "")).map((x) => x === "\t" || x === `
|
|
2052
|
-
` ? x : " ").join(""),
|
|
2053
|
-
partition(s) {
|
|
2054
|
-
for (var m, spans = [];partition.lastIndex !== s.length && (m = partition.exec(s)); ) {
|
|
2055
|
-
spans.push([m[1] || "", m[2]]);
|
|
2056
|
-
}
|
|
2057
|
-
partition.lastIndex = 0;
|
|
2058
|
-
return spans;
|
|
2059
|
-
},
|
|
2060
|
-
first(s, n) {
|
|
2061
|
-
let result = "", length = 0;
|
|
2062
|
-
for (const _ref of module.exports.partition(s)) {
|
|
2063
|
-
var _ref2 = _slicedToArray(_ref, 2);
|
|
2064
|
-
const nonPrintable = _ref2[0];
|
|
2065
|
-
const printable = _ref2[1];
|
|
2066
|
-
const text = Array.from(printable).slice(0, n - length);
|
|
2067
|
-
result += nonPrintable + text.join("");
|
|
2068
|
-
length += text.length;
|
|
2069
|
-
}
|
|
2070
|
-
return result;
|
|
2071
|
-
}
|
|
2072
|
-
};
|
|
2073
|
-
});
|
|
2074
|
-
|
|
2075
|
-
// ../../node_modules/as-table/build/as-table.js
|
|
2076
|
-
var require_as_table = __commonJS((exports, module) => {
|
|
2077
|
-
function _toConsumableArray(arr) {
|
|
2078
|
-
if (Array.isArray(arr)) {
|
|
2079
|
-
for (var i = 0, arr2 = Array(arr.length);i < arr.length; i++)
|
|
2080
|
-
arr2[i] = arr[i];
|
|
2081
|
-
return arr2;
|
|
2082
|
-
} else {
|
|
2083
|
-
return Array.from(arr);
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
var O = Object;
|
|
2087
|
-
var _require = require_printable_characters();
|
|
2088
|
-
var first = _require.first;
|
|
2089
|
-
var strlen = _require.strlen;
|
|
2090
|
-
var limit = (s, n) => first(s, n - 1) + "\u2026";
|
|
2091
|
-
var asColumns = (rows, cfg_) => {
|
|
2092
|
-
const zip = (arrs, f) => arrs.reduce((a, b) => b.map((b2, i) => [].concat(_toConsumableArray(a[i] || []), [b2])), []).map((args) => f.apply(undefined, _toConsumableArray(args))), cells = rows.map((r) => r.map((c) => c.replace(/\n/g, "\\n"))), cellWidths = cells.map((r) => r.map(strlen)), maxWidths = zip(cellWidths, Math.max), cfg = O.assign({
|
|
2093
|
-
delimiter: " ",
|
|
2094
|
-
minColumnWidths: maxWidths.map((x) => 0),
|
|
2095
|
-
maxTotalWidth: 0
|
|
2096
|
-
}, cfg_), delimiterLength = strlen(cfg.delimiter), totalWidth = maxWidths.reduce((a, b) => a + b, 0), relativeWidths = maxWidths.map((w) => w / totalWidth), maxTotalWidth = cfg.maxTotalWidth - delimiterLength * (maxWidths.length - 1), excessWidth = Math.max(0, totalWidth - maxTotalWidth), computedWidths = zip([cfg.minColumnWidths, maxWidths, relativeWidths], (min, max, relative) => Math.max(min, Math.floor(max - excessWidth * relative))), restCellWidths = cellWidths.map((widths) => zip([computedWidths, widths], (a, b) => a - b));
|
|
2097
|
-
return zip([cells, restCellWidths], (a, b) => zip([a, b], (str, w) => w >= 0 ? cfg.right ? " ".repeat(w) + str : str + " ".repeat(w) : limit(str, strlen(str) + w)).join(cfg.delimiter));
|
|
2098
|
-
};
|
|
2099
|
-
var asTable = (cfg) => O.assign((arr) => {
|
|
2100
|
-
var _ref;
|
|
2101
|
-
if (arr[0] && Array.isArray(arr[0])) {
|
|
2102
|
-
return asColumns(arr.map((r) => r.map((c, i) => c === undefined ? "" : cfg.print(c, i))), cfg).join(`
|
|
2103
|
-
`);
|
|
2104
|
-
}
|
|
2105
|
-
const colNames = [].concat(_toConsumableArray(new Set((_ref = []).concat.apply(_ref, _toConsumableArray(arr.map(O.keys)))))), columns = [colNames.map(cfg.title)].concat(_toConsumableArray(arr.map((o) => colNames.map((key) => o[key] === undefined ? "" : cfg.print(o[key], key))))), lines = asColumns(columns, cfg);
|
|
2106
|
-
return (cfg.dash ? [lines[0], cfg.dash.repeat(strlen(lines[0]))].concat(_toConsumableArray(lines.slice(1))) : lines).join(`
|
|
2107
|
-
`);
|
|
2108
|
-
}, cfg, {
|
|
2109
|
-
configure: (newConfig) => asTable(O.assign({}, cfg, newConfig))
|
|
2110
|
-
});
|
|
2111
|
-
module.exports = asTable({
|
|
2112
|
-
maxTotalWidth: Number.MAX_SAFE_INTEGER,
|
|
2113
|
-
print: String,
|
|
2114
|
-
title: String,
|
|
2115
|
-
dash: "-",
|
|
2116
|
-
right: false
|
|
2117
|
-
});
|
|
2118
|
-
});
|
|
2119
|
-
|
|
2120
|
-
// ../../node_modules/stacktracey/stacktracey.js
|
|
2121
|
-
var require_stacktracey = __commonJS((exports, module) => {
|
|
2122
|
-
var O = Object;
|
|
2123
|
-
var isBrowser = typeof window !== "undefined" && window.window === window && window.navigator;
|
|
2124
|
-
var nodeRequire = isBrowser ? null : module.require;
|
|
2125
|
-
var lastOf = (x) => x[x.length - 1];
|
|
2126
|
-
var getSource = require_get_source();
|
|
2127
|
-
var partition = require_partition();
|
|
2128
|
-
var asTable = require_as_table();
|
|
2129
|
-
var nixSlashes = (x) => x.replace(/\\/g, "/");
|
|
2130
|
-
var pathRoot = isBrowser ? window.location.href : nixSlashes(process.cwd()) + "/";
|
|
2131
|
-
|
|
2132
|
-
class StackTracey {
|
|
2133
|
-
constructor(input, offset) {
|
|
2134
|
-
const originalInput = input, isParseableSyntaxError = input && (input instanceof SyntaxError && !isBrowser);
|
|
2135
|
-
if (!input) {
|
|
2136
|
-
input = new Error;
|
|
2137
|
-
offset = offset === undefined ? 1 : offset;
|
|
2138
|
-
}
|
|
2139
|
-
if (input instanceof Error) {
|
|
2140
|
-
input = input.stack || "";
|
|
2141
|
-
}
|
|
2142
|
-
if (typeof input === "string") {
|
|
2143
|
-
input = this.rawParse(input).slice(offset).map((x) => this.extractEntryMetadata(x));
|
|
2144
|
-
}
|
|
2145
|
-
if (Array.isArray(input)) {
|
|
2146
|
-
if (isParseableSyntaxError) {
|
|
2147
|
-
const rawLines = nodeRequire("util").inspect(originalInput).split(`
|
|
2148
|
-
`), fileLine = rawLines[0].split(":"), line = fileLine.pop(), file = fileLine.join(":");
|
|
2149
|
-
if (file) {
|
|
2150
|
-
input.unshift({
|
|
2151
|
-
file: nixSlashes(file),
|
|
2152
|
-
line,
|
|
2153
|
-
column: (rawLines[2] || "").indexOf("^") + 1,
|
|
2154
|
-
sourceLine: rawLines[1],
|
|
2155
|
-
callee: "(syntax error)",
|
|
2156
|
-
syntaxError: true
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
this.items = input;
|
|
2161
|
-
} else {
|
|
2162
|
-
this.items = [];
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
extractEntryMetadata(e) {
|
|
2166
|
-
const decomposedPath = this.decomposePath(e.file || "");
|
|
2167
|
-
const fileRelative = decomposedPath[0];
|
|
2168
|
-
const externalDomain = decomposedPath[1];
|
|
2169
|
-
return O.assign(e, {
|
|
2170
|
-
calleeShort: e.calleeShort || lastOf((e.callee || "").split(".")),
|
|
2171
|
-
fileRelative,
|
|
2172
|
-
fileShort: this.shortenPath(fileRelative),
|
|
2173
|
-
fileName: lastOf((e.file || "").split("/")),
|
|
2174
|
-
thirdParty: this.isThirdParty(fileRelative, externalDomain) && !e.index,
|
|
2175
|
-
externalDomain
|
|
2176
|
-
});
|
|
2177
|
-
}
|
|
2178
|
-
shortenPath(relativePath) {
|
|
2179
|
-
return relativePath.replace(/^node_modules\//, "").replace(/^webpack\/bootstrap\//, "").replace(/^__parcel_source_root\//, "");
|
|
2180
|
-
}
|
|
2181
|
-
decomposePath(fullPath) {
|
|
2182
|
-
let result = fullPath;
|
|
2183
|
-
if (isBrowser)
|
|
2184
|
-
result = result.replace(pathRoot, "");
|
|
2185
|
-
const externalDomainMatch = result.match(/^(http|https)\:\/\/?([^\/]+)\/(.*)/);
|
|
2186
|
-
const externalDomain = externalDomainMatch ? externalDomainMatch[2] : undefined;
|
|
2187
|
-
result = externalDomainMatch ? externalDomainMatch[3] : result;
|
|
2188
|
-
if (!isBrowser)
|
|
2189
|
-
result = nodeRequire("path").relative(pathRoot, result);
|
|
2190
|
-
return [
|
|
2191
|
-
nixSlashes(result).replace(/^.*\:\/\/?\/?/, ""),
|
|
2192
|
-
externalDomain
|
|
2193
|
-
];
|
|
2194
|
-
}
|
|
2195
|
-
isThirdParty(relativePath, externalDomain) {
|
|
2196
|
-
return externalDomain || relativePath[0] === "~" || relativePath[0] === "/" || relativePath.indexOf("node_modules") === 0 || relativePath.indexOf("webpack/bootstrap") === 0;
|
|
2197
|
-
}
|
|
2198
|
-
rawParse(str) {
|
|
2199
|
-
const lines = (str || "").split(`
|
|
2200
|
-
`);
|
|
2201
|
-
const entries = lines.map((line) => {
|
|
2202
|
-
line = line.trim();
|
|
2203
|
-
let callee, fileLineColumn = [], native, planA, planB;
|
|
2204
|
-
if ((planA = line.match(/at (.+) \(eval at .+ \((.+)\), .+\)/)) || (planA = line.match(/at (.+) \((.+)\)/)) || line.slice(0, 3) !== "at " && (planA = line.match(/(.*)@(.*)/))) {
|
|
2205
|
-
callee = planA[1];
|
|
2206
|
-
native = planA[2] === "native";
|
|
2207
|
-
fileLineColumn = (planA[2].match(/(.*):(\d+):(\d+)/) || planA[2].match(/(.*):(\d+)/) || []).slice(1);
|
|
2208
|
-
} else if (planB = line.match(/^(at\s+)*(.+):(\d+):(\d+)/)) {
|
|
2209
|
-
fileLineColumn = planB.slice(2);
|
|
2210
|
-
} else {
|
|
2211
|
-
return;
|
|
2212
|
-
}
|
|
2213
|
-
if (callee && !fileLineColumn[0]) {
|
|
2214
|
-
const type = callee.split(".")[0];
|
|
2215
|
-
if (type === "Array") {
|
|
2216
|
-
native = true;
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
return {
|
|
2220
|
-
beforeParse: line,
|
|
2221
|
-
callee: callee || "",
|
|
2222
|
-
index: isBrowser && fileLineColumn[0] === window.location.href,
|
|
2223
|
-
native: native || false,
|
|
2224
|
-
file: nixSlashes(fileLineColumn[0] || ""),
|
|
2225
|
-
line: parseInt(fileLineColumn[1] || "", 10) || undefined,
|
|
2226
|
-
column: parseInt(fileLineColumn[2] || "", 10) || undefined
|
|
2227
|
-
};
|
|
2228
|
-
});
|
|
2229
|
-
return entries.filter((x) => x !== undefined);
|
|
2230
|
-
}
|
|
2231
|
-
withSourceAt(i) {
|
|
2232
|
-
return this.items[i] && this.withSource(this.items[i]);
|
|
2233
|
-
}
|
|
2234
|
-
withSourceAsyncAt(i) {
|
|
2235
|
-
return this.items[i] && this.withSourceAsync(this.items[i]);
|
|
2236
|
-
}
|
|
2237
|
-
withSource(loc) {
|
|
2238
|
-
if (this.shouldSkipResolving(loc)) {
|
|
2239
|
-
return loc;
|
|
2240
|
-
} else {
|
|
2241
|
-
let resolved = getSource(loc.file || "").resolve(loc);
|
|
2242
|
-
if (!resolved.sourceFile) {
|
|
2243
|
-
return loc;
|
|
2244
|
-
}
|
|
2245
|
-
return this.withSourceResolved(loc, resolved);
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
withSourceAsync(loc) {
|
|
2249
|
-
if (this.shouldSkipResolving(loc)) {
|
|
2250
|
-
return Promise.resolve(loc);
|
|
2251
|
-
} else {
|
|
2252
|
-
return getSource.async(loc.file || "").then((x) => x.resolve(loc)).then((resolved) => this.withSourceResolved(loc, resolved)).catch((e) => this.withSourceResolved(loc, { error: e, sourceLine: "" }));
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
shouldSkipResolving(loc) {
|
|
2256
|
-
return loc.sourceFile || loc.error || loc.file && loc.file.indexOf("<") >= 0;
|
|
2257
|
-
}
|
|
2258
|
-
withSourceResolved(loc, resolved) {
|
|
2259
|
-
if (resolved.sourceFile && !resolved.sourceFile.error) {
|
|
2260
|
-
resolved.file = nixSlashes(resolved.sourceFile.path);
|
|
2261
|
-
resolved = this.extractEntryMetadata(resolved);
|
|
2262
|
-
}
|
|
2263
|
-
if (resolved.sourceLine.includes("// @hide")) {
|
|
2264
|
-
resolved.sourceLine = resolved.sourceLine.replace("// @hide", "");
|
|
2265
|
-
resolved.hide = true;
|
|
2266
|
-
}
|
|
2267
|
-
if (resolved.sourceLine.includes("__webpack_require__") || resolved.sourceLine.includes("/******/ ({")) {
|
|
2268
|
-
resolved.thirdParty = true;
|
|
2269
|
-
}
|
|
2270
|
-
return O.assign({ sourceLine: "" }, loc, resolved);
|
|
2271
|
-
}
|
|
2272
|
-
withSources() {
|
|
2273
|
-
return this.map((x) => this.withSource(x));
|
|
2274
|
-
}
|
|
2275
|
-
withSourcesAsync() {
|
|
2276
|
-
return Promise.all(this.items.map((x) => this.withSourceAsync(x))).then((items) => new StackTracey(items));
|
|
2277
|
-
}
|
|
2278
|
-
mergeRepeatedLines() {
|
|
2279
|
-
return new StackTracey(partition(this.items, (e) => e.file + e.line).map((group) => {
|
|
2280
|
-
return group.items.slice(1).reduce((memo, entry) => {
|
|
2281
|
-
memo.callee = (memo.callee || "<anonymous>") + " \u2192 " + (entry.callee || "<anonymous>");
|
|
2282
|
-
memo.calleeShort = (memo.calleeShort || "<anonymous>") + " \u2192 " + (entry.calleeShort || "<anonymous>");
|
|
2283
|
-
return memo;
|
|
2284
|
-
}, O.assign({}, group.items[0]));
|
|
2285
|
-
}));
|
|
2286
|
-
}
|
|
2287
|
-
clean() {
|
|
2288
|
-
const s = this.withSources().mergeRepeatedLines();
|
|
2289
|
-
return s.filter(s.isClean.bind(s));
|
|
2290
|
-
}
|
|
2291
|
-
cleanAsync() {
|
|
2292
|
-
return this.withSourcesAsync().then((s) => {
|
|
2293
|
-
s = s.mergeRepeatedLines();
|
|
2294
|
-
return s.filter(s.isClean.bind(s));
|
|
2295
|
-
});
|
|
2296
|
-
}
|
|
2297
|
-
isClean(entry, index) {
|
|
2298
|
-
return index === 0 || !(entry.thirdParty || entry.hide || entry.native);
|
|
2299
|
-
}
|
|
2300
|
-
at(i) {
|
|
2301
|
-
return O.assign({
|
|
2302
|
-
beforeParse: "",
|
|
2303
|
-
callee: "<???>",
|
|
2304
|
-
index: false,
|
|
2305
|
-
native: false,
|
|
2306
|
-
file: "<???>",
|
|
2307
|
-
line: 0,
|
|
2308
|
-
column: 0
|
|
2309
|
-
}, this.items[i]);
|
|
2310
|
-
}
|
|
2311
|
-
asTable(opts) {
|
|
2312
|
-
const maxColumnWidths = opts && opts.maxColumnWidths || this.maxColumnWidths();
|
|
2313
|
-
const trimEnd = (s, n) => s && (s.length > n ? s.slice(0, n - 1) + "\u2026" : s);
|
|
2314
|
-
const trimStart = (s, n) => s && (s.length > n ? "\u2026" + s.slice(-(n - 1)) : s);
|
|
2315
|
-
const trimmed = this.map((e) => [
|
|
2316
|
-
"at " + trimEnd(e.calleeShort, maxColumnWidths.callee),
|
|
2317
|
-
trimStart(e.fileShort && e.fileShort + ":" + e.line || "", maxColumnWidths.file),
|
|
2318
|
-
trimEnd((e.sourceLine || "").trim() || "", maxColumnWidths.sourceLine)
|
|
2319
|
-
]);
|
|
2320
|
-
return asTable(trimmed.items);
|
|
2321
|
-
}
|
|
2322
|
-
maxColumnWidths() {
|
|
2323
|
-
return {
|
|
2324
|
-
callee: 30,
|
|
2325
|
-
file: 60,
|
|
2326
|
-
sourceLine: 80
|
|
2327
|
-
};
|
|
2328
|
-
}
|
|
2329
|
-
static resetCache() {
|
|
2330
|
-
getSource.resetCache();
|
|
2331
|
-
getSource.async.resetCache();
|
|
2332
|
-
}
|
|
2333
|
-
static locationsEqual(a, b) {
|
|
2334
|
-
return a.file === b.file && a.line === b.line && a.column === b.column;
|
|
2335
|
-
}
|
|
2336
|
-
}
|
|
2337
|
-
["map", "filter", "slice", "concat"].forEach((method) => {
|
|
2338
|
-
StackTracey.prototype[method] = function() {
|
|
2339
|
-
return new StackTracey(this.items[method].apply(this.items, arguments));
|
|
2340
|
-
};
|
|
2341
|
-
});
|
|
2342
|
-
module.exports = StackTracey;
|
|
2343
|
-
});
|
|
2344
3
|
|
|
2345
4
|
// ../agent-summary/src/agent-summary-integration.ts
|
|
2346
5
|
import fs2 from "fs/promises";
|
|
@@ -2547,68 +206,99 @@ var agentsSummary = () => {
|
|
|
2547
206
|
};
|
|
2548
207
|
};
|
|
2549
208
|
// src/index.ts
|
|
2550
|
-
import { dev, preview } from "astro";
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
209
|
+
import { build as astroBuild, dev, preview } from "astro";
|
|
210
|
+
import { spawn } from "child_process";
|
|
211
|
+
import { existsSync, readFileSync } from "fs";
|
|
212
|
+
import { join } from "path";
|
|
213
|
+
var [, , command, ...args] = process.argv;
|
|
214
|
+
function hasNuaIntegration(configPath) {
|
|
2556
215
|
try {
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
`);
|
|
2575
|
-
console.error(`at ${frame.calleeShort} (${frame.fileShort}:${frame.line}:${frame.column})
|
|
2576
|
-
${context}`);
|
|
2577
|
-
}
|
|
2578
|
-
} else {
|
|
2579
|
-
console.error("Build failed:", error);
|
|
216
|
+
const content = readFileSync(configPath, "utf-8");
|
|
217
|
+
return content.includes("@nuasite/agent-summary") || content.includes("agentsSummary");
|
|
218
|
+
} catch {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function findAstroConfig() {
|
|
223
|
+
const possibleConfigs = [
|
|
224
|
+
"astro.config.mjs",
|
|
225
|
+
"astro.config.js",
|
|
226
|
+
"astro.config.ts",
|
|
227
|
+
"astro.config.mts"
|
|
228
|
+
];
|
|
229
|
+
for (const config of possibleConfigs) {
|
|
230
|
+
const configPath = join(process.cwd(), config);
|
|
231
|
+
if (existsSync(configPath)) {
|
|
232
|
+
return configPath;
|
|
2580
233
|
}
|
|
2581
|
-
process.exit(1);
|
|
2582
234
|
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
function proxyToAstroCLI(command2, args2) {
|
|
238
|
+
const astro = spawn("npx", ["astro", command2, ...args2], {
|
|
239
|
+
stdio: "inherit",
|
|
240
|
+
shell: true
|
|
241
|
+
});
|
|
242
|
+
astro.on("close", (code) => {
|
|
243
|
+
process.exit(code || 0);
|
|
244
|
+
});
|
|
245
|
+
astro.on("error", (error) => {
|
|
246
|
+
console.error("Error running astro command:", error);
|
|
247
|
+
process.exit(1);
|
|
248
|
+
});
|
|
2583
249
|
}
|
|
2584
|
-
|
|
2585
|
-
// src/index.ts
|
|
2586
|
-
var command = process.argv[2];
|
|
2587
250
|
function printUsage() {
|
|
2588
|
-
console.log("Usage: nua <command>");
|
|
251
|
+
console.log("Usage: nua <command> [options]");
|
|
2589
252
|
console.log(`
|
|
2590
253
|
Commands:`);
|
|
2591
254
|
console.log(" build Run astro build with the Nua defaults");
|
|
2592
255
|
console.log(" preview Run astro preview with the Nua defaults");
|
|
2593
256
|
console.log(" dev Run astro dev with the Nua defaults");
|
|
2594
|
-
console.log(
|
|
257
|
+
console.log(" help Show this message");
|
|
258
|
+
console.log(`
|
|
259
|
+
All Astro CLI options are supported.
|
|
2595
260
|
`);
|
|
2596
261
|
}
|
|
2597
|
-
var
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
262
|
+
var configPath = findAstroConfig();
|
|
263
|
+
var canProxyDirectly = configPath && hasNuaIntegration(configPath);
|
|
264
|
+
if (canProxyDirectly && command && ["build", "dev", "preview"].includes(command)) {
|
|
265
|
+
proxyToAstroCLI(command, args);
|
|
266
|
+
} else {
|
|
2602
267
|
switch (command) {
|
|
2603
268
|
case "build":
|
|
2604
|
-
|
|
269
|
+
astroBuild({
|
|
270
|
+
root: process.cwd(),
|
|
271
|
+
integrations: [agentsSummary()]
|
|
272
|
+
}).catch((error) => {
|
|
273
|
+
console.error("Error:", error);
|
|
274
|
+
process.exit(1);
|
|
275
|
+
});
|
|
2605
276
|
break;
|
|
2606
277
|
case "dev":
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
278
|
+
case "preview": {
|
|
279
|
+
const options = {
|
|
280
|
+
root: process.cwd(),
|
|
281
|
+
integrations: [agentsSummary()],
|
|
282
|
+
vite: {
|
|
283
|
+
server: {}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
for (let i = 0;i < args.length; i++) {
|
|
287
|
+
if (args[i] === "--port" && args[i + 1]) {
|
|
288
|
+
options.vite.server.port = parseInt(args[i + 1] ?? "", 10);
|
|
289
|
+
i++;
|
|
290
|
+
} else if (args[i] === "--host" && args[i + 1]) {
|
|
291
|
+
options.vite.server.host = args[i + 1];
|
|
292
|
+
i++;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
const runner = command === "dev" ? dev : preview;
|
|
296
|
+
runner(options).catch((error) => {
|
|
297
|
+
console.error("Error:", error);
|
|
298
|
+
process.exit(1);
|
|
299
|
+
});
|
|
2611
300
|
break;
|
|
301
|
+
}
|
|
2612
302
|
case "help":
|
|
2613
303
|
case "--help":
|
|
2614
304
|
case "-h":
|
|
@@ -2619,7 +309,4 @@ var options = {
|
|
|
2619
309
|
printUsage();
|
|
2620
310
|
process.exit(1);
|
|
2621
311
|
}
|
|
2622
|
-
}
|
|
2623
|
-
console.error("Error:", error);
|
|
2624
|
-
process.exit(1);
|
|
2625
|
-
});
|
|
312
|
+
}
|