@hot-updater/plugin-core 0.16.3 → 0.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/createBlobDatabasePlugin.d.ts +42 -0
- package/dist/createBlobDatabasePlugin.spec.d.ts +1 -0
- package/dist/index.cjs +1186 -1415
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1151 -1413
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1121,7 +1121,7 @@ var __webpack_modules__ = {
|
|
|
1121
1121
|
function encodedMappings(map) {
|
|
1122
1122
|
var _a;
|
|
1123
1123
|
var _b;
|
|
1124
|
-
return null
|
|
1124
|
+
return null != (_a = (_b = cast(map))._encoded) ? _a : _b._encoded = sourcemapCodec.encode(cast(map)._decoded);
|
|
1125
1125
|
}
|
|
1126
1126
|
function decodedMappings(map) {
|
|
1127
1127
|
var _a;
|
|
@@ -1345,10 +1345,7 @@ var __webpack_modules__ = {
|
|
|
1345
1345
|
const settings_1 = __webpack_require__("../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js");
|
|
1346
1346
|
exports.Settings = settings_1.default;
|
|
1347
1347
|
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
1348
|
-
if ('function' == typeof optionsOrSettingsOrCallback)
|
|
1349
|
-
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1348
|
+
if ('function' == typeof optionsOrSettingsOrCallback) return void async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
1352
1349
|
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
1353
1350
|
}
|
|
1354
1351
|
exports.scandir = scandir;
|
|
@@ -1373,10 +1370,7 @@ var __webpack_modules__ = {
|
|
|
1373
1370
|
const utils = __webpack_require__("../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js");
|
|
1374
1371
|
const common = __webpack_require__("../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js");
|
|
1375
1372
|
function read(directory, settings, callback) {
|
|
1376
|
-
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES)
|
|
1377
|
-
readdirWithFileTypes(directory, settings, callback);
|
|
1378
|
-
return;
|
|
1379
|
-
}
|
|
1373
|
+
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return void readdirWithFileTypes(directory, settings, callback);
|
|
1380
1374
|
readdir(directory, settings, callback);
|
|
1381
1375
|
}
|
|
1382
1376
|
exports.read = read;
|
|
@@ -1384,25 +1378,16 @@ var __webpack_modules__ = {
|
|
|
1384
1378
|
settings.fs.readdir(directory, {
|
|
1385
1379
|
withFileTypes: true
|
|
1386
1380
|
}, (readdirError, dirents)=>{
|
|
1387
|
-
if (null !== readdirError)
|
|
1388
|
-
callFailureCallback(callback, readdirError);
|
|
1389
|
-
return;
|
|
1390
|
-
}
|
|
1381
|
+
if (null !== readdirError) return void callFailureCallback(callback, readdirError);
|
|
1391
1382
|
const entries = dirents.map((dirent)=>({
|
|
1392
1383
|
dirent,
|
|
1393
1384
|
name: dirent.name,
|
|
1394
1385
|
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
|
1395
1386
|
}));
|
|
1396
|
-
if (!settings.followSymbolicLinks)
|
|
1397
|
-
callSuccessCallback(callback, entries);
|
|
1398
|
-
return;
|
|
1399
|
-
}
|
|
1387
|
+
if (!settings.followSymbolicLinks) return void callSuccessCallback(callback, entries);
|
|
1400
1388
|
const tasks = entries.map((entry)=>makeRplTaskEntry(entry, settings));
|
|
1401
1389
|
rpl(tasks, (rplError, rplEntries)=>{
|
|
1402
|
-
if (null !== rplError)
|
|
1403
|
-
callFailureCallback(callback, rplError);
|
|
1404
|
-
return;
|
|
1405
|
-
}
|
|
1390
|
+
if (null !== rplError) return void callFailureCallback(callback, rplError);
|
|
1406
1391
|
callSuccessCallback(callback, rplEntries);
|
|
1407
1392
|
});
|
|
1408
1393
|
});
|
|
@@ -1410,16 +1395,10 @@ var __webpack_modules__ = {
|
|
|
1410
1395
|
exports.readdirWithFileTypes = readdirWithFileTypes;
|
|
1411
1396
|
function makeRplTaskEntry(entry, settings) {
|
|
1412
1397
|
return (done)=>{
|
|
1413
|
-
if (!entry.dirent.isSymbolicLink())
|
|
1414
|
-
done(null, entry);
|
|
1415
|
-
return;
|
|
1416
|
-
}
|
|
1398
|
+
if (!entry.dirent.isSymbolicLink()) return void done(null, entry);
|
|
1417
1399
|
settings.fs.stat(entry.path, (statError, stats)=>{
|
|
1418
1400
|
if (null !== statError) {
|
|
1419
|
-
if (settings.throwErrorOnBrokenSymbolicLink)
|
|
1420
|
-
done(statError);
|
|
1421
|
-
return;
|
|
1422
|
-
}
|
|
1401
|
+
if (settings.throwErrorOnBrokenSymbolicLink) return void done(statError);
|
|
1423
1402
|
done(null, entry);
|
|
1424
1403
|
return;
|
|
1425
1404
|
}
|
|
@@ -1430,18 +1409,12 @@ var __webpack_modules__ = {
|
|
|
1430
1409
|
}
|
|
1431
1410
|
function readdir(directory, settings, callback) {
|
|
1432
1411
|
settings.fs.readdir(directory, (readdirError, names)=>{
|
|
1433
|
-
if (null !== readdirError)
|
|
1434
|
-
callFailureCallback(callback, readdirError);
|
|
1435
|
-
return;
|
|
1436
|
-
}
|
|
1412
|
+
if (null !== readdirError) return void callFailureCallback(callback, readdirError);
|
|
1437
1413
|
const tasks = names.map((name)=>{
|
|
1438
1414
|
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
1439
1415
|
return (done)=>{
|
|
1440
1416
|
fsStat.stat(path, settings.fsStatSettings, (error, stats)=>{
|
|
1441
|
-
if (null !== error)
|
|
1442
|
-
done(error);
|
|
1443
|
-
return;
|
|
1444
|
-
}
|
|
1417
|
+
if (null !== error) return void done(error);
|
|
1445
1418
|
const entry = {
|
|
1446
1419
|
name,
|
|
1447
1420
|
path,
|
|
@@ -1453,10 +1426,7 @@ var __webpack_modules__ = {
|
|
|
1453
1426
|
};
|
|
1454
1427
|
});
|
|
1455
1428
|
rpl(tasks, (rplError, entries)=>{
|
|
1456
|
-
if (null !== rplError)
|
|
1457
|
-
callFailureCallback(callback, rplError);
|
|
1458
|
-
return;
|
|
1459
|
-
}
|
|
1429
|
+
if (null !== rplError) return void callFailureCallback(callback, rplError);
|
|
1460
1430
|
callSuccessCallback(callback, entries);
|
|
1461
1431
|
});
|
|
1462
1432
|
});
|
|
@@ -1615,10 +1585,7 @@ var __webpack_modules__ = {
|
|
|
1615
1585
|
const settings_1 = __webpack_require__("../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js");
|
|
1616
1586
|
exports.Settings = settings_1.default;
|
|
1617
1587
|
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
1618
|
-
if ('function' == typeof optionsOrSettingsOrCallback)
|
|
1619
|
-
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
1620
|
-
return;
|
|
1621
|
-
}
|
|
1588
|
+
if ('function' == typeof optionsOrSettingsOrCallback) return void async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
1622
1589
|
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
1623
1590
|
}
|
|
1624
1591
|
exports.stat = stat;
|
|
@@ -1639,20 +1606,11 @@ var __webpack_modules__ = {
|
|
|
1639
1606
|
exports.read = void 0;
|
|
1640
1607
|
function read(path, settings, callback) {
|
|
1641
1608
|
settings.fs.lstat(path, (lstatError, lstat)=>{
|
|
1642
|
-
if (null !== lstatError)
|
|
1643
|
-
|
|
1644
|
-
return;
|
|
1645
|
-
}
|
|
1646
|
-
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
1647
|
-
callSuccessCallback(callback, lstat);
|
|
1648
|
-
return;
|
|
1649
|
-
}
|
|
1609
|
+
if (null !== lstatError) return void callFailureCallback(callback, lstatError);
|
|
1610
|
+
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return void callSuccessCallback(callback, lstat);
|
|
1650
1611
|
settings.fs.stat(path, (statError, stat)=>{
|
|
1651
1612
|
if (null !== statError) {
|
|
1652
|
-
if (settings.throwErrorOnBrokenSymbolicLink)
|
|
1653
|
-
callFailureCallback(callback, statError);
|
|
1654
|
-
return;
|
|
1655
|
-
}
|
|
1613
|
+
if (settings.throwErrorOnBrokenSymbolicLink) return void callFailureCallback(callback, statError);
|
|
1656
1614
|
callSuccessCallback(callback, lstat);
|
|
1657
1615
|
return;
|
|
1658
1616
|
}
|
|
@@ -1718,10 +1676,7 @@ var __webpack_modules__ = {
|
|
|
1718
1676
|
const settings_1 = __webpack_require__("../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js");
|
|
1719
1677
|
exports.Settings = settings_1.default;
|
|
1720
1678
|
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
1721
|
-
if ('function' == typeof optionsOrSettingsOrCallback)
|
|
1722
|
-
new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
1723
|
-
return;
|
|
1724
|
-
}
|
|
1679
|
+
if ('function' == typeof optionsOrSettingsOrCallback) return void new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
1725
1680
|
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
1726
1681
|
}
|
|
1727
1682
|
exports.walk = walk;
|
|
@@ -1885,10 +1840,7 @@ var __webpack_modules__ = {
|
|
|
1885
1840
|
}
|
|
1886
1841
|
_worker(item, done) {
|
|
1887
1842
|
this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries)=>{
|
|
1888
|
-
if (null !== error)
|
|
1889
|
-
done(error, void 0);
|
|
1890
|
-
return;
|
|
1891
|
-
}
|
|
1843
|
+
if (null !== error) return void done(error, void 0);
|
|
1892
1844
|
for (const entry of entries)this._handleEntry(entry, item.base);
|
|
1893
1845
|
done(null, void 0);
|
|
1894
1846
|
});
|
|
@@ -2384,10 +2336,7 @@ var __webpack_modules__ = {
|
|
|
2384
2336
|
const src = data.src, dest = data.dest;
|
|
2385
2337
|
const onFresh = data.onFresh || noop;
|
|
2386
2338
|
const onDone = data.onDone || noop;
|
|
2387
|
-
if (files.has(dest.toLowerCase()))
|
|
2388
|
-
onDone();
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2339
|
+
if (files.has(dest.toLowerCase())) return void onDone();
|
|
2391
2340
|
files.add(dest.toLowerCase());
|
|
2392
2341
|
if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) return;
|
|
2393
2342
|
const srcStat = yield lstat(src);
|
|
@@ -3539,10 +3488,9 @@ var __webpack_modules__ = {
|
|
|
3539
3488
|
SafeBuffer.alloc = function(size, fill, encoding) {
|
|
3540
3489
|
if ('number' != typeof size) throw new TypeError('Argument must be a number');
|
|
3541
3490
|
var buf = Buffer1(size);
|
|
3542
|
-
if (void 0 !== fill)
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
} else buf.fill(0);
|
|
3491
|
+
if (void 0 !== fill) if ('string' == typeof encoding) buf.fill(fill, encoding);
|
|
3492
|
+
else buf.fill(fill);
|
|
3493
|
+
else buf.fill(0);
|
|
3546
3494
|
return buf;
|
|
3547
3495
|
};
|
|
3548
3496
|
SafeBuffer.allocUnsafe = function(size) {
|
|
@@ -3934,12 +3882,10 @@ var __webpack_modules__ = {
|
|
|
3934
3882
|
function checkData(data, sri, opts) {
|
|
3935
3883
|
opts = opts || {};
|
|
3936
3884
|
sri = parse(sri, opts);
|
|
3937
|
-
if (!Object.keys(sri).length)
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
});
|
|
3942
|
-
}
|
|
3885
|
+
if (!Object.keys(sri).length) if (!opts.error) return false;
|
|
3886
|
+
else throw Object.assign(new Error('No valid integrity hashes to check against'), {
|
|
3887
|
+
code: 'EINTEGRITY'
|
|
3888
|
+
});
|
|
3943
3889
|
const algorithm = sri.pickAlgorithm(opts);
|
|
3944
3890
|
const digest = crypto.createHash(algorithm).update(data).digest('base64');
|
|
3945
3891
|
const newSri = parse({
|
|
@@ -4794,12 +4740,10 @@ var __webpack_modules__ = {
|
|
|
4794
4740
|
sync = false;
|
|
4795
4741
|
function done() {
|
|
4796
4742
|
--self1._processing;
|
|
4797
|
-
if (self1._processing <= 0) {
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
else self1._finish();
|
|
4802
|
-
}
|
|
4743
|
+
if (self1._processing <= 0) if (sync) process.nextTick(function() {
|
|
4744
|
+
self1._finish();
|
|
4745
|
+
});
|
|
4746
|
+
else self1._finish();
|
|
4803
4747
|
}
|
|
4804
4748
|
}
|
|
4805
4749
|
Glob.prototype._finish = function() {
|
|
@@ -4831,10 +4775,9 @@ var __webpack_modules__ = {
|
|
|
4831
4775
|
found.forEach(function(p, i) {
|
|
4832
4776
|
p = self1._makeAbs(p);
|
|
4833
4777
|
rp.realpath(p, self1.realpathCache, function(er, real) {
|
|
4834
|
-
if (er)
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
} else set[real] = true;
|
|
4778
|
+
if (er) if ('stat' === er.syscall) set[p] = true;
|
|
4779
|
+
else self1.emit('error', er);
|
|
4780
|
+
else set[real] = true;
|
|
4838
4781
|
if (0 === --n) {
|
|
4839
4782
|
self1.matches[index] = set;
|
|
4840
4783
|
cb();
|
|
@@ -4886,15 +4829,12 @@ var __webpack_modules__ = {
|
|
|
4886
4829
|
assert('function' == typeof cb);
|
|
4887
4830
|
if (this.aborted) return;
|
|
4888
4831
|
this._processing++;
|
|
4889
|
-
if (this.paused)
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
]);
|
|
4896
|
-
return;
|
|
4897
|
-
}
|
|
4832
|
+
if (this.paused) return void this._processQueue.push([
|
|
4833
|
+
pattern,
|
|
4834
|
+
index,
|
|
4835
|
+
inGlobStar,
|
|
4836
|
+
cb
|
|
4837
|
+
]);
|
|
4898
4838
|
var n = 0;
|
|
4899
4839
|
while('string' == typeof pattern[n])n++;
|
|
4900
4840
|
var prefix;
|
|
@@ -4968,13 +4908,10 @@ var __webpack_modules__ = {
|
|
|
4968
4908
|
Glob.prototype._emitMatch = function(index, e) {
|
|
4969
4909
|
if (this.aborted) return;
|
|
4970
4910
|
if (isIgnored(this, e)) return;
|
|
4971
|
-
if (this.paused)
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
]);
|
|
4976
|
-
return;
|
|
4977
|
-
}
|
|
4911
|
+
if (this.paused) return void this._emitQueue.push([
|
|
4912
|
+
index,
|
|
4913
|
+
e
|
|
4914
|
+
]);
|
|
4978
4915
|
var abs = isAbsolute(e) ? e : this._makeAbs(e);
|
|
4979
4916
|
if (this.mark) e = this._mark(e);
|
|
4980
4917
|
if (this.absolute) e = abs;
|
|
@@ -5085,7 +5022,7 @@ var __webpack_modules__ = {
|
|
|
5085
5022
|
if (isSym && inGlobStar) return cb();
|
|
5086
5023
|
for(var i = 0; i < len; i++){
|
|
5087
5024
|
var e = entries[i];
|
|
5088
|
-
if ('.' !== e.charAt(0) ||
|
|
5025
|
+
if ('.' !== e.charAt(0) || this.dot) {
|
|
5089
5026
|
var instead = gspref.concat(entries[i], remainWithoutGlobStar);
|
|
5090
5027
|
this._process(instead, index, true, cb);
|
|
5091
5028
|
var below = gspref.concat(entries[i], remain);
|
|
@@ -5126,8 +5063,8 @@ var __webpack_modules__ = {
|
|
|
5126
5063
|
if (needDir && 'FILE' === c) return cb();
|
|
5127
5064
|
}
|
|
5128
5065
|
var stat = this.statCache[abs];
|
|
5129
|
-
if (void 0 !== stat)
|
|
5130
|
-
|
|
5066
|
+
if (void 0 !== stat) if (false === stat) return cb(null, stat);
|
|
5067
|
+
else {
|
|
5131
5068
|
var type = stat.isDirectory() ? 'DIR' : 'FILE';
|
|
5132
5069
|
if (needDir && 'FILE' === type) return cb();
|
|
5133
5070
|
return cb(null, type, stat);
|
|
@@ -5271,15 +5208,14 @@ var __webpack_modules__ = {
|
|
|
5271
5208
|
chop++;
|
|
5272
5209
|
}
|
|
5273
5210
|
yield buildToken(TOKEN_TYPES.comment, val);
|
|
5274
|
-
} else if (' ' === input[0]) {
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
} else if ('"' === input[0]) {
|
|
5211
|
+
} else if (' ' === input[0]) if (lastNewline) {
|
|
5212
|
+
let indent = '';
|
|
5213
|
+
for(let i = 0; ' ' === input[i]; i++)indent += input[i];
|
|
5214
|
+
if (indent.length % 2) throw new TypeError('Invalid number of spaces');
|
|
5215
|
+
chop = indent.length;
|
|
5216
|
+
yield buildToken(TOKEN_TYPES.indent, indent.length / 2);
|
|
5217
|
+
} else chop++;
|
|
5218
|
+
else if ('"' === input[0]) {
|
|
5283
5219
|
let val = '';
|
|
5284
5220
|
for(let i = 0;; i++){
|
|
5285
5221
|
const currentChar = input[i];
|
|
@@ -5378,10 +5314,9 @@ var __webpack_modules__ = {
|
|
|
5378
5314
|
if (nextToken.type !== TOKEN_TYPES.indent) break;
|
|
5379
5315
|
if (nextToken.value === indent) this.next();
|
|
5380
5316
|
else break;
|
|
5381
|
-
} else if (propToken.type === TOKEN_TYPES.indent)
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
} else if (propToken.type === TOKEN_TYPES.eof) break;
|
|
5317
|
+
} else if (propToken.type === TOKEN_TYPES.indent) if (propToken.value === indent) this.next();
|
|
5318
|
+
else break;
|
|
5319
|
+
else if (propToken.type === TOKEN_TYPES.eof) break;
|
|
5385
5320
|
else if (propToken.type === TOKEN_TYPES.string) {
|
|
5386
5321
|
const key = propToken.value;
|
|
5387
5322
|
(0, (_invariant || _load_invariant()).default)(key, 'Expected a key');
|
|
@@ -5942,7 +5877,7 @@ var __webpack_modules__ = {
|
|
|
5942
5877
|
var i;
|
|
5943
5878
|
var split = ('string' == typeof namespaces ? namespaces : '').split(/[\s,]+/);
|
|
5944
5879
|
var len = split.length;
|
|
5945
|
-
for(i = 0; i < len; i++)if (
|
|
5880
|
+
for(i = 0; i < len; i++)if (split[i]) {
|
|
5946
5881
|
namespaces = split[i].replace(/\*/g, '.*?');
|
|
5947
5882
|
if ('-' === namespaces[0]) exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
5948
5883
|
else exports.names.push(new RegExp('^' + namespaces + '$'));
|
|
@@ -8064,7 +7999,7 @@ var __webpack_modules__ = {
|
|
|
8064
7999
|
function missingCallback(err) {
|
|
8065
8000
|
if (err) {
|
|
8066
8001
|
if (process.throwDeprecation) throw err;
|
|
8067
|
-
if (!process.noDeprecation) {
|
|
8002
|
+
else if (!process.noDeprecation) {
|
|
8068
8003
|
var msg = 'fs: missing callback ' + (err.stack || err.message);
|
|
8069
8004
|
if (process.traceDeprecation) console.trace(msg);
|
|
8070
8005
|
else console.error(msg);
|
|
@@ -8421,7 +8356,7 @@ var __webpack_modules__ = {
|
|
|
8421
8356
|
if (isSym && inGlobStar) return;
|
|
8422
8357
|
for(var i = 0; i < len; i++){
|
|
8423
8358
|
var e = entries[i];
|
|
8424
|
-
if ('.' !== e.charAt(0) ||
|
|
8359
|
+
if ('.' !== e.charAt(0) || this.dot) {
|
|
8425
8360
|
var instead = gspref.concat(entries[i], remainWithoutGlobStar);
|
|
8426
8361
|
this._process(instead, index, true);
|
|
8427
8362
|
var below = gspref.concat(entries[i], remain);
|
|
@@ -9129,16 +9064,10 @@ var __webpack_modules__ = {
|
|
|
9129
9064
|
p = p.parent;
|
|
9130
9065
|
q = p.queue;
|
|
9131
9066
|
}
|
|
9132
|
-
if (node.invalid || node.dollar)
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
if ('brace' === node.type && true !== node.invalid && 2 === node.nodes.length) {
|
|
9137
|
-
q.push(append(q.pop(), [
|
|
9138
|
-
'{}'
|
|
9139
|
-
]));
|
|
9140
|
-
return;
|
|
9141
|
-
}
|
|
9067
|
+
if (node.invalid || node.dollar) return void q.push(append(q.pop(), stringify(node, options)));
|
|
9068
|
+
if ('brace' === node.type && true !== node.invalid && 2 === node.nodes.length) return void q.push(append(q.pop(), [
|
|
9069
|
+
'{}'
|
|
9070
|
+
]));
|
|
9142
9071
|
if (node.nodes && node.ranges > 0) {
|
|
9143
9072
|
let args = utils.reduce(node.nodes);
|
|
9144
9073
|
if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
|
@@ -9671,16 +9600,10 @@ var __webpack_modules__ = {
|
|
|
9671
9600
|
p = p.parent;
|
|
9672
9601
|
q = p.queue;
|
|
9673
9602
|
}
|
|
9674
|
-
if (node.invalid || node.dollar)
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
if ('brace' === node.type && true !== node.invalid && 2 === node.nodes.length) {
|
|
9679
|
-
q.push(append(q.pop(), [
|
|
9680
|
-
'{}'
|
|
9681
|
-
]));
|
|
9682
|
-
return;
|
|
9683
|
-
}
|
|
9603
|
+
if (node.invalid || node.dollar) return void q.push(append(q.pop(), stringify(node, options)));
|
|
9604
|
+
if ('brace' === node.type && true !== node.invalid && 2 === node.nodes.length) return void q.push(append(q.pop(), [
|
|
9605
|
+
'{}'
|
|
9606
|
+
]));
|
|
9684
9607
|
if (node.nodes && node.ranges > 0) {
|
|
9685
9608
|
const args = utils.reduce(node.nodes);
|
|
9686
9609
|
if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
|
@@ -10372,16 +10295,15 @@ var __webpack_modules__ = {
|
|
|
10372
10295
|
let templateIndex = 0;
|
|
10373
10296
|
let starIndex = -1;
|
|
10374
10297
|
let matchIndex = 0;
|
|
10375
|
-
while(searchIndex < search.length)if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || '*' === template[templateIndex])) {
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
templateIndex++;
|
|
10380
|
-
} else {
|
|
10381
|
-
searchIndex++;
|
|
10382
|
-
templateIndex++;
|
|
10383
|
-
}
|
|
10298
|
+
while(searchIndex < search.length)if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || '*' === template[templateIndex])) if ('*' === template[templateIndex]) {
|
|
10299
|
+
starIndex = templateIndex;
|
|
10300
|
+
matchIndex = searchIndex;
|
|
10301
|
+
templateIndex++;
|
|
10384
10302
|
} else {
|
|
10303
|
+
searchIndex++;
|
|
10304
|
+
templateIndex++;
|
|
10305
|
+
}
|
|
10306
|
+
else {
|
|
10385
10307
|
if (-1 === starIndex) return false;
|
|
10386
10308
|
templateIndex = starIndex + 1;
|
|
10387
10309
|
matchIndex++;
|
|
@@ -11222,7 +11144,7 @@ var __webpack_modules__ = {
|
|
|
11222
11144
|
for (const pattern of patterns){
|
|
11223
11145
|
const filepath = this._getFullEntryPath(pattern);
|
|
11224
11146
|
const entry = this._getEntry(filepath, pattern, options);
|
|
11225
|
-
if (null !== entry &&
|
|
11147
|
+
if (null !== entry && options.entryFilter(entry)) entries.push(entry);
|
|
11226
11148
|
}
|
|
11227
11149
|
return entries;
|
|
11228
11150
|
}
|
|
@@ -11662,16 +11584,15 @@ var __webpack_modules__ = {
|
|
|
11662
11584
|
current.value = value1;
|
|
11663
11585
|
current.callback = done || noop;
|
|
11664
11586
|
current.errorHandler = errorHandler;
|
|
11665
|
-
if (_running === self1.concurrency || self1.paused) {
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
queueTail = current;
|
|
11669
|
-
} else {
|
|
11670
|
-
queueHead = current;
|
|
11671
|
-
queueTail = current;
|
|
11672
|
-
self1.saturated();
|
|
11673
|
-
}
|
|
11587
|
+
if (_running === self1.concurrency || self1.paused) if (queueTail) {
|
|
11588
|
+
queueTail.next = current;
|
|
11589
|
+
queueTail = current;
|
|
11674
11590
|
} else {
|
|
11591
|
+
queueHead = current;
|
|
11592
|
+
queueTail = current;
|
|
11593
|
+
self1.saturated();
|
|
11594
|
+
}
|
|
11595
|
+
else {
|
|
11675
11596
|
_running++;
|
|
11676
11597
|
worker.call(context, current.value, current.worked);
|
|
11677
11598
|
}
|
|
@@ -11682,16 +11603,15 @@ var __webpack_modules__ = {
|
|
|
11682
11603
|
current.release = release;
|
|
11683
11604
|
current.value = value1;
|
|
11684
11605
|
current.callback = done || noop;
|
|
11685
|
-
if (_running === self1.concurrency || self1.paused) {
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
queueHead = current;
|
|
11689
|
-
} else {
|
|
11690
|
-
queueHead = current;
|
|
11691
|
-
queueTail = current;
|
|
11692
|
-
self1.saturated();
|
|
11693
|
-
}
|
|
11606
|
+
if (_running === self1.concurrency || self1.paused) if (queueHead) {
|
|
11607
|
+
current.next = queueHead;
|
|
11608
|
+
queueHead = current;
|
|
11694
11609
|
} else {
|
|
11610
|
+
queueHead = current;
|
|
11611
|
+
queueTail = current;
|
|
11612
|
+
self1.saturated();
|
|
11613
|
+
}
|
|
11614
|
+
else {
|
|
11695
11615
|
_running++;
|
|
11696
11616
|
worker.call(context, current.value, current.worked);
|
|
11697
11617
|
}
|
|
@@ -11699,16 +11619,15 @@ var __webpack_modules__ = {
|
|
|
11699
11619
|
function release(holder) {
|
|
11700
11620
|
if (holder) cache.release(holder);
|
|
11701
11621
|
var next = queueHead;
|
|
11702
|
-
if (next)
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
} else if (0 === --_running) self1.drain();
|
|
11622
|
+
if (next) if (self1.paused) _running--;
|
|
11623
|
+
else {
|
|
11624
|
+
if (queueTail === queueHead) queueTail = null;
|
|
11625
|
+
queueHead = next.next;
|
|
11626
|
+
next.next = null;
|
|
11627
|
+
worker.call(context, next.value, next.worked);
|
|
11628
|
+
if (null === queueTail) self1.empty();
|
|
11629
|
+
}
|
|
11630
|
+
else if (0 === --_running) self1.drain();
|
|
11712
11631
|
}
|
|
11713
11632
|
function kill() {
|
|
11714
11633
|
queueHead = null;
|
|
@@ -11766,10 +11685,7 @@ var __webpack_modules__ = {
|
|
|
11766
11685
|
function push(value1) {
|
|
11767
11686
|
var p = new Promise(function(resolve, reject) {
|
|
11768
11687
|
pushCb(value1, function(err, result) {
|
|
11769
|
-
if (err)
|
|
11770
|
-
reject(err);
|
|
11771
|
-
return;
|
|
11772
|
-
}
|
|
11688
|
+
if (err) return void reject(err);
|
|
11773
11689
|
resolve(result);
|
|
11774
11690
|
});
|
|
11775
11691
|
});
|
|
@@ -11779,10 +11695,7 @@ var __webpack_modules__ = {
|
|
|
11779
11695
|
function unshift(value1) {
|
|
11780
11696
|
var p = new Promise(function(resolve, reject) {
|
|
11781
11697
|
unshiftCb(value1, function(err, result) {
|
|
11782
|
-
if (err)
|
|
11783
|
-
reject(err);
|
|
11784
|
-
return;
|
|
11785
|
-
}
|
|
11698
|
+
if (err) return void reject(err);
|
|
11786
11699
|
resolve(result);
|
|
11787
11700
|
});
|
|
11788
11701
|
});
|
|
@@ -12411,37 +12324,36 @@ var __webpack_modules__ = {
|
|
|
12411
12324
|
"../../node_modules/.pnpm/immediate@3.0.6/node_modules/immediate/lib/index.js": function(module) {
|
|
12412
12325
|
var Mutation = global.MutationObserver || global.WebKitMutationObserver;
|
|
12413
12326
|
var scheduleDrain;
|
|
12414
|
-
if (process.browser) {
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12327
|
+
if (process.browser) if (Mutation) {
|
|
12328
|
+
var called = 0;
|
|
12329
|
+
var observer = new Mutation(nextTick);
|
|
12330
|
+
var element = global.document.createTextNode('');
|
|
12331
|
+
observer.observe(element, {
|
|
12332
|
+
characterData: true
|
|
12333
|
+
});
|
|
12334
|
+
scheduleDrain = function() {
|
|
12335
|
+
element.data = called = ++called % 2;
|
|
12336
|
+
};
|
|
12337
|
+
} else if (global.setImmediate || void 0 === global.MessageChannel) scheduleDrain = 'document' in global && 'onreadystatechange' in global.document.createElement("script") ? function() {
|
|
12338
|
+
var scriptEl = global.document.createElement("script");
|
|
12339
|
+
scriptEl.onreadystatechange = function() {
|
|
12340
|
+
nextTick();
|
|
12341
|
+
scriptEl.onreadystatechange = null;
|
|
12342
|
+
scriptEl.parentNode.removeChild(scriptEl);
|
|
12343
|
+
scriptEl = null;
|
|
12344
|
+
};
|
|
12345
|
+
global.document.documentElement.appendChild(scriptEl);
|
|
12346
|
+
} : function() {
|
|
12347
|
+
setTimeout(nextTick, 0);
|
|
12348
|
+
};
|
|
12349
|
+
else {
|
|
12350
|
+
var channel = new global.MessageChannel();
|
|
12351
|
+
channel.port1.onmessage = nextTick;
|
|
12352
|
+
scheduleDrain = function() {
|
|
12353
|
+
channel.port2.postMessage(0);
|
|
12436
12354
|
};
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
channel.port1.onmessage = nextTick;
|
|
12440
|
-
scheduleDrain = function() {
|
|
12441
|
-
channel.port2.postMessage(0);
|
|
12442
|
-
};
|
|
12443
|
-
}
|
|
12444
|
-
} else scheduleDrain = function() {
|
|
12355
|
+
}
|
|
12356
|
+
else scheduleDrain = function() {
|
|
12445
12357
|
process.nextTick(nextTick);
|
|
12446
12358
|
};
|
|
12447
12359
|
var draining;
|
|
@@ -12862,10 +12774,9 @@ var __webpack_modules__ = {
|
|
|
12862
12774
|
}
|
|
12863
12775
|
if (i === path.length - 1) check_if_can_be_placed(path[i], data, void 0 === value1);
|
|
12864
12776
|
var new_key = !(path[i] in data);
|
|
12865
|
-
if (void 0 === value1)
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
} else data[path[i]] = value1;
|
|
12777
|
+
if (void 0 === value1) if (Array.isArray(data)) data.pop();
|
|
12778
|
+
else delete data[path[i]];
|
|
12779
|
+
else data[path[i]] = value1;
|
|
12869
12780
|
}
|
|
12870
12781
|
if (!this._tokens.length) this._tokens = [
|
|
12871
12782
|
{
|
|
@@ -12978,32 +12889,30 @@ var __webpack_modules__ = {
|
|
|
12978
12889
|
change([], self1._data, value1);
|
|
12979
12890
|
return self1;
|
|
12980
12891
|
function change(path, old_data, new_data) {
|
|
12981
|
-
if (isObject(new_data) && isObject(old_data))
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
change(path, old_data[i], new_data[i]);
|
|
13003
|
-
path.pop();
|
|
13004
|
-
}
|
|
12892
|
+
if (isObject(new_data) && isObject(old_data)) if (Array.isArray(new_data) != Array.isArray(old_data)) self1.set(path, new_data);
|
|
12893
|
+
else if (Array.isArray(new_data)) if (new_data.length > old_data.length) for(var i = 0; i < new_data.length; i++){
|
|
12894
|
+
path.push(String(i));
|
|
12895
|
+
change(path, old_data[i], new_data[i]);
|
|
12896
|
+
path.pop();
|
|
12897
|
+
}
|
|
12898
|
+
else for(var i = old_data.length - 1; i >= 0; i--){
|
|
12899
|
+
path.push(String(i));
|
|
12900
|
+
change(path, old_data[i], new_data[i]);
|
|
12901
|
+
path.pop();
|
|
12902
|
+
}
|
|
12903
|
+
else {
|
|
12904
|
+
for(var i in new_data){
|
|
12905
|
+
path.push(String(i));
|
|
12906
|
+
change(path, old_data[i], new_data[i]);
|
|
12907
|
+
path.pop();
|
|
12908
|
+
}
|
|
12909
|
+
for(var i in old_data)if (!(i in new_data)) {
|
|
12910
|
+
path.push(String(i));
|
|
12911
|
+
change(path, old_data[i], new_data[i]);
|
|
12912
|
+
path.pop();
|
|
13005
12913
|
}
|
|
13006
|
-
}
|
|
12914
|
+
}
|
|
12915
|
+
else if (new_data !== old_data) self1.set(path, new_data);
|
|
13007
12916
|
}
|
|
13008
12917
|
};
|
|
13009
12918
|
Document.prototype.toString = function() {
|
|
@@ -13042,7 +12951,7 @@ var __webpack_modules__ = {
|
|
|
13042
12951
|
var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1), tmppos = position - column - 1, srcline = '', underline = '';
|
|
13043
12952
|
var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON;
|
|
13044
12953
|
if (tmppos < position - 70) tmppos = position - 70;
|
|
13045
|
-
while(
|
|
12954
|
+
while(1){
|
|
13046
12955
|
var chr = input[++tmppos];
|
|
13047
12956
|
if (isLineTerminator(chr) || tmppos === input.length) {
|
|
13048
12957
|
if (position >= tmppos) underline += '^';
|
|
@@ -13192,16 +13101,10 @@ var __webpack_modules__ = {
|
|
|
13192
13101
|
while(position < length){
|
|
13193
13102
|
var chr = input[position++];
|
|
13194
13103
|
if (isLineTerminator(chr)) {
|
|
13195
|
-
if (!multi)
|
|
13196
|
-
position--;
|
|
13197
|
-
return;
|
|
13198
|
-
}
|
|
13104
|
+
if (!multi) return void position--;
|
|
13199
13105
|
newline(chr);
|
|
13200
13106
|
} else if ('*' === chr && multi) {
|
|
13201
|
-
if ('/' === input[position])
|
|
13202
|
-
position++;
|
|
13203
|
-
return;
|
|
13204
|
-
}
|
|
13107
|
+
if ('/' === input[position]) return void position++;
|
|
13205
13108
|
}
|
|
13206
13109
|
}
|
|
13207
13110
|
if (multi) fail('Unclosed multiline comment');
|
|
@@ -13367,13 +13270,12 @@ var __webpack_modules__ = {
|
|
|
13367
13270
|
chr = String.fromCharCode(parseInt(input.substr(position + 1, 4), 16));
|
|
13368
13271
|
position += 5;
|
|
13369
13272
|
}
|
|
13370
|
-
if (result.length)
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
} else {
|
|
13273
|
+
if (result.length) if (Uni.isIdentifierPart(chr)) result += chr;
|
|
13274
|
+
else {
|
|
13275
|
+
position--;
|
|
13276
|
+
return result;
|
|
13277
|
+
}
|
|
13278
|
+
else {
|
|
13377
13279
|
if (!Uni.isIdentifierStart(chr)) return;
|
|
13378
13280
|
result += chr;
|
|
13379
13281
|
}
|
|
@@ -13508,10 +13410,9 @@ var __webpack_modules__ = {
|
|
|
13508
13410
|
if (!Uni.isIdentifierPart(key[i])) return _stringify_str(key);
|
|
13509
13411
|
} else if (!Uni.isIdentifierStart(key[i])) return _stringify_str(key);
|
|
13510
13412
|
var chr = key.charCodeAt(i);
|
|
13511
|
-
if (options.ascii)
|
|
13512
|
-
|
|
13513
|
-
|
|
13514
|
-
} else if (escapable.exec(key[i])) result += '\\u' + ('0000' + chr.toString(16)).slice(-4);
|
|
13413
|
+
if (options.ascii) if (chr < 0x80) result += key[i];
|
|
13414
|
+
else result += '\\u' + ('0000' + chr.toString(16)).slice(-4);
|
|
13415
|
+
else if (escapable.exec(key[i])) result += '\\u' + ('0000' + chr.toString(16)).slice(-4);
|
|
13515
13416
|
else result += key[i];
|
|
13516
13417
|
}
|
|
13517
13418
|
return result;
|
|
@@ -13522,27 +13423,22 @@ var __webpack_modules__ = {
|
|
|
13522
13423
|
var result = '';
|
|
13523
13424
|
for(var i = 0; i < key.length; i++){
|
|
13524
13425
|
var chr = key.charCodeAt(i);
|
|
13525
|
-
if (chr < 0x10)
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
else result += '\\u00' + chr.toString(16);
|
|
13542
|
-
} else if (chr < 0x1000) result += '\\u0' + chr.toString(16);
|
|
13543
|
-
else if (chr < 0x10000) result += '\\u' + chr.toString(16);
|
|
13544
|
-
else throw Error('weird codepoint');
|
|
13545
|
-
} else result += key[i];
|
|
13426
|
+
if (chr < 0x10) if (0 === chr && json5) result += '\\0';
|
|
13427
|
+
else if (chr >= 8 && chr <= 13 && (json5 || 11 !== chr)) result += special_chars[chr];
|
|
13428
|
+
else if (json5) result += '\\x0' + chr.toString(16);
|
|
13429
|
+
else result += '\\u000' + chr.toString(16);
|
|
13430
|
+
else if (chr < 0x20) if (json5) result += '\\x' + chr.toString(16);
|
|
13431
|
+
else result += '\\u00' + chr.toString(16);
|
|
13432
|
+
else if (chr >= 0x20 && chr < 0x80) if (47 === chr && i && '<' === key[i - 1]) result += '\\' + key[i];
|
|
13433
|
+
else if (92 === chr) result += '\\\\';
|
|
13434
|
+
else if (chr === quoteChr) result += '\\' + quote;
|
|
13435
|
+
else result += key[i];
|
|
13436
|
+
else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) if (chr < 0x100) if (json5) result += '\\x' + chr.toString(16);
|
|
13437
|
+
else result += '\\u00' + chr.toString(16);
|
|
13438
|
+
else if (chr < 0x1000) result += '\\u0' + chr.toString(16);
|
|
13439
|
+
else if (chr < 0x10000) result += '\\u' + chr.toString(16);
|
|
13440
|
+
else throw Error('weird codepoint');
|
|
13441
|
+
else result += key[i];
|
|
13546
13442
|
}
|
|
13547
13443
|
return quote + result + quote;
|
|
13548
13444
|
}
|
|
@@ -13642,10 +13538,9 @@ var __webpack_modules__ = {
|
|
|
13642
13538
|
if ('object' == typeof options.indent) {
|
|
13643
13539
|
if (options.indent.constructor === Number || options.indent.constructor === Boolean || options.indent.constructor === String) options.indent = options.indent.valueOf();
|
|
13644
13540
|
}
|
|
13645
|
-
if ('number' == typeof options.indent)
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
} else if ('string' == typeof options.indent) options.indent = options.indent.substr(0, 10);
|
|
13541
|
+
if ('number' == typeof options.indent) if (options.indent >= 0) options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ');
|
|
13542
|
+
else options.indent = false;
|
|
13543
|
+
else if ('string' == typeof options.indent) options.indent = options.indent.substr(0, 10);
|
|
13649
13544
|
if (null == options._splitMin) options._splitMin = 50;
|
|
13650
13545
|
if (null == options._splitMax) options._splitMax = 70;
|
|
13651
13546
|
return _stringify(object, options, 0, '');
|
|
@@ -14150,10 +14045,10 @@ var __webpack_modules__ = {
|
|
|
14150
14045
|
objectKey = objectKeyList[index];
|
|
14151
14046
|
objectValue = object[objectKey];
|
|
14152
14047
|
if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
14153
|
-
if (
|
|
14048
|
+
if (writeNode(state, level, objectKey, false, false)) {
|
|
14154
14049
|
if (state.dump.length > 1024) pairBuffer += '? ';
|
|
14155
14050
|
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
|
|
14156
|
-
if (
|
|
14051
|
+
if (writeNode(state, level, objectValue, false, false)) {
|
|
14157
14052
|
pairBuffer += state.dump;
|
|
14158
14053
|
_result += pairBuffer;
|
|
14159
14054
|
}
|
|
@@ -14173,15 +14068,13 @@ var __webpack_modules__ = {
|
|
|
14173
14068
|
objectKey = objectKeyList[index];
|
|
14174
14069
|
objectValue = object[objectKey];
|
|
14175
14070
|
if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
14176
|
-
if (
|
|
14071
|
+
if (writeNode(state, level + 1, objectKey, true, true, true)) {
|
|
14177
14072
|
explicitPair = null !== state.tag && '?' !== state.tag || state.dump && state.dump.length > 1024;
|
|
14178
|
-
if (explicitPair)
|
|
14179
|
-
|
|
14180
|
-
else pairBuffer += '? ';
|
|
14181
|
-
}
|
|
14073
|
+
if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += '?';
|
|
14074
|
+
else pairBuffer += '? ';
|
|
14182
14075
|
pairBuffer += state.dump;
|
|
14183
14076
|
if (explicitPair) pairBuffer += generateNextLine(state, level);
|
|
14184
|
-
if (
|
|
14077
|
+
if (writeNode(state, level + 1, objectValue, true, explicitPair)) {
|
|
14185
14078
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += ':';
|
|
14186
14079
|
else pairBuffer += ': ';
|
|
14187
14080
|
pairBuffer += state.dump;
|
|
@@ -14198,10 +14091,9 @@ var __webpack_modules__ = {
|
|
|
14198
14091
|
for(index = 0, length = typeList.length; index < length; index += 1){
|
|
14199
14092
|
type = typeList[index];
|
|
14200
14093
|
if ((type.instanceOf || type.predicate) && (!type.instanceOf || 'object' == typeof object && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
|
14201
|
-
if (explicit)
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
} else state.tag = '?';
|
|
14094
|
+
if (explicit) if (type.multi && type.representName) state.tag = type.representName(object);
|
|
14095
|
+
else state.tag = type.tag;
|
|
14096
|
+
else state.tag = '?';
|
|
14205
14097
|
if (type.represent) {
|
|
14206
14098
|
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
14207
14099
|
if ('[object Function]' === _toString.call(type.represent)) _result = type.represent(object, style);
|
|
@@ -14231,23 +14123,21 @@ var __webpack_modules__ = {
|
|
|
14231
14123
|
if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = '*ref_' + duplicateIndex;
|
|
14232
14124
|
else {
|
|
14233
14125
|
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true;
|
|
14234
|
-
if ('[object Object]' === type) {
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
if (
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
}
|
|
14250
|
-
} else if ('[object String]' === type) {
|
|
14126
|
+
if ('[object Object]' === type) if (block && 0 !== Object.keys(state.dump).length) {
|
|
14127
|
+
writeBlockMapping(state, level, state.dump, compact);
|
|
14128
|
+
if (duplicate) state.dump = '&ref_' + duplicateIndex + state.dump;
|
|
14129
|
+
} else {
|
|
14130
|
+
writeFlowMapping(state, level, state.dump);
|
|
14131
|
+
if (duplicate) state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
|
|
14132
|
+
}
|
|
14133
|
+
else if ('[object Array]' === type) if (block && 0 !== state.dump.length) {
|
|
14134
|
+
state.noArrayIndent && !isblockseq && level > 0 ? writeBlockSequence(state, level - 1, state.dump, compact) : writeBlockSequence(state, level, state.dump, compact);
|
|
14135
|
+
if (duplicate) state.dump = '&ref_' + duplicateIndex + state.dump;
|
|
14136
|
+
} else {
|
|
14137
|
+
writeFlowSequence(state, level, state.dump);
|
|
14138
|
+
if (duplicate) state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
|
|
14139
|
+
}
|
|
14140
|
+
else if ('[object String]' === type) {
|
|
14251
14141
|
if ('?' !== state.tag) writeScalar(state, state.dump, level, iskey, inblock);
|
|
14252
14142
|
} else {
|
|
14253
14143
|
if ('[object Undefined]' === type) return false;
|
|
@@ -14486,10 +14376,9 @@ var __webpack_modules__ = {
|
|
|
14486
14376
|
if ('object' == typeof keyNode && '[object Object]' === _class(keyNode)) keyNode = '[object Object]';
|
|
14487
14377
|
keyNode = String(keyNode);
|
|
14488
14378
|
if (null === _result) _result = {};
|
|
14489
|
-
if ('tag:yaml.org,2002:merge' === keyTag)
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
} else {
|
|
14379
|
+
if ('tag:yaml.org,2002:merge' === keyTag) if (Array.isArray(valueNode)) for(index = 0, quantity = valueNode.length; index < quantity; index += 1)mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
14380
|
+
else mergeMappings(state, _result, valueNode, overridableKeys);
|
|
14381
|
+
else {
|
|
14493
14382
|
if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
|
|
14494
14383
|
state.line = startLine || state.line;
|
|
14495
14384
|
state.lineStart = startLineStart || state.lineStart;
|
|
@@ -14641,40 +14530,37 @@ var __webpack_modules__ = {
|
|
|
14641
14530
|
state.result = '';
|
|
14642
14531
|
state.position++;
|
|
14643
14532
|
captureStart = captureEnd = state.position;
|
|
14644
|
-
while(0 !== (ch = state.input.charCodeAt(state.position))){
|
|
14645
|
-
|
|
14646
|
-
|
|
14533
|
+
while(0 !== (ch = state.input.charCodeAt(state.position)))if (0x22 === ch) {
|
|
14534
|
+
captureSegment(state, captureStart, state.position, true);
|
|
14535
|
+
state.position++;
|
|
14536
|
+
return true;
|
|
14537
|
+
} else if (0x5C === ch) {
|
|
14538
|
+
captureSegment(state, captureStart, state.position, true);
|
|
14539
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14540
|
+
if (is_EOL(ch)) skipSeparationSpace(state, false, nodeIndent);
|
|
14541
|
+
else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
14542
|
+
state.result += simpleEscapeMap[ch];
|
|
14647
14543
|
state.position++;
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
14658
|
-
hexLength = tmp;
|
|
14659
|
-
hexResult = 0;
|
|
14660
|
-
for(; hexLength > 0; hexLength--){
|
|
14661
|
-
ch = state.input.charCodeAt(++state.position);
|
|
14662
|
-
if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp;
|
|
14663
|
-
else throwError(state, 'expected hexadecimal character');
|
|
14664
|
-
}
|
|
14665
|
-
state.result += charFromCodepoint(hexResult);
|
|
14666
|
-
state.position++;
|
|
14667
|
-
} else throwError(state, 'unknown escape sequence');
|
|
14668
|
-
captureStart = captureEnd = state.position;
|
|
14669
|
-
} else if (is_EOL(ch)) {
|
|
14670
|
-
captureSegment(state, captureStart, captureEnd, true);
|
|
14671
|
-
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
14672
|
-
captureStart = captureEnd = state.position;
|
|
14673
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, 'unexpected end of the document within a double quoted scalar');
|
|
14674
|
-
else {
|
|
14544
|
+
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
14545
|
+
hexLength = tmp;
|
|
14546
|
+
hexResult = 0;
|
|
14547
|
+
for(; hexLength > 0; hexLength--){
|
|
14548
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14549
|
+
if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp;
|
|
14550
|
+
else throwError(state, 'expected hexadecimal character');
|
|
14551
|
+
}
|
|
14552
|
+
state.result += charFromCodepoint(hexResult);
|
|
14675
14553
|
state.position++;
|
|
14676
|
-
|
|
14677
|
-
|
|
14554
|
+
} else throwError(state, 'unknown escape sequence');
|
|
14555
|
+
captureStart = captureEnd = state.position;
|
|
14556
|
+
} else if (is_EOL(ch)) {
|
|
14557
|
+
captureSegment(state, captureStart, captureEnd, true);
|
|
14558
|
+
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
14559
|
+
captureStart = captureEnd = state.position;
|
|
14560
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, 'unexpected end of the document within a double quoted scalar');
|
|
14561
|
+
else {
|
|
14562
|
+
state.position++;
|
|
14563
|
+
captureEnd = state.position;
|
|
14678
14564
|
}
|
|
14679
14565
|
throwError(state, 'unexpected end of the stream within a double quoted scalar');
|
|
14680
14566
|
}
|
|
@@ -14756,17 +14642,15 @@ var __webpack_modules__ = {
|
|
|
14756
14642
|
state.result = '';
|
|
14757
14643
|
while(0 !== ch){
|
|
14758
14644
|
ch = state.input.charCodeAt(++state.position);
|
|
14759
|
-
if (0x2B === ch || 0x2D === ch)
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
}
|
|
14769
|
-
} else break;
|
|
14645
|
+
if (0x2B === ch || 0x2D === ch) if (CHOMPING_CLIP === chomping) chomping = 0x2B === ch ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
14646
|
+
else throwError(state, 'repeat of a chomping mode identifier');
|
|
14647
|
+
else if ((tmp = fromDecimalCode(ch)) >= 0) if (0 === tmp) throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
|
|
14648
|
+
else if (detectedIndent) throwError(state, 'repeat of an indentation width identifier');
|
|
14649
|
+
else {
|
|
14650
|
+
textIndent = nodeIndent + tmp - 1;
|
|
14651
|
+
detectedIndent = true;
|
|
14652
|
+
}
|
|
14653
|
+
else break;
|
|
14770
14654
|
}
|
|
14771
14655
|
if (is_WHITE_SPACE(ch)) {
|
|
14772
14656
|
do ch = state.input.charCodeAt(++state.position);
|
|
@@ -14794,17 +14678,16 @@ var __webpack_modules__ = {
|
|
|
14794
14678
|
}
|
|
14795
14679
|
break;
|
|
14796
14680
|
}
|
|
14797
|
-
if (folding) {
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
} else state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
|
|
14681
|
+
if (folding) if (is_WHITE_SPACE(ch)) {
|
|
14682
|
+
atMoreIndented = true;
|
|
14683
|
+
state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
|
|
14684
|
+
} else if (atMoreIndented) {
|
|
14685
|
+
atMoreIndented = false;
|
|
14686
|
+
state.result += common.repeat('\n', emptyLines + 1);
|
|
14687
|
+
} else if (0 === emptyLines) {
|
|
14688
|
+
if (didReadContent) state.result += ' ';
|
|
14689
|
+
} else state.result += common.repeat('\n', emptyLines);
|
|
14690
|
+
else state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
|
|
14808
14691
|
didReadContent = true;
|
|
14809
14692
|
detectedIndent = true;
|
|
14810
14693
|
emptyLines = 0;
|
|
@@ -14919,10 +14802,8 @@ var __webpack_modules__ = {
|
|
|
14919
14802
|
_keyLineStart = state.lineStart;
|
|
14920
14803
|
_keyPos = state.position;
|
|
14921
14804
|
}
|
|
14922
|
-
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact))
|
|
14923
|
-
|
|
14924
|
-
else valueNode = state.result;
|
|
14925
|
-
}
|
|
14805
|
+
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state.result;
|
|
14806
|
+
else valueNode = state.result;
|
|
14926
14807
|
if (!atExplicitKey) {
|
|
14927
14808
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
|
|
14928
14809
|
keyTag = keyNode = valueNode = null;
|
|
@@ -14966,14 +14847,12 @@ var __webpack_modules__ = {
|
|
|
14966
14847
|
} else throwError(state, 'unexpected end of the stream within a verbatim tag');
|
|
14967
14848
|
} else {
|
|
14968
14849
|
while(0 !== ch && !is_WS_OR_EOL(ch)){
|
|
14969
|
-
if (0x21 === ch)
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
_position = state.position + 1;
|
|
14976
|
-
}
|
|
14850
|
+
if (0x21 === ch) if (isNamed) throwError(state, 'tag suffix cannot contain exclamation marks');
|
|
14851
|
+
else {
|
|
14852
|
+
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
14853
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, 'named tag handle cannot contain such characters');
|
|
14854
|
+
isNamed = true;
|
|
14855
|
+
_position = state.position + 1;
|
|
14977
14856
|
}
|
|
14978
14857
|
ch = state.input.charCodeAt(++state.position);
|
|
14979
14858
|
}
|
|
@@ -15046,20 +14925,19 @@ var __webpack_modules__ = {
|
|
|
15046
14925
|
if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
15047
14926
|
flowIndent = CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext ? parentIndent : parentIndent + 1;
|
|
15048
14927
|
blockIndent = state.position - state.lineStart;
|
|
15049
|
-
if (1 === indentStatus)
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
if (null === state.tag) state.tag = '?';
|
|
15059
|
-
}
|
|
15060
|
-
if (null !== state.anchor) state.anchorMap[state.anchor] = state.result;
|
|
14928
|
+
if (1 === indentStatus) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true;
|
|
14929
|
+
else {
|
|
14930
|
+
if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true;
|
|
14931
|
+
else if (readAlias(state)) {
|
|
14932
|
+
hasContent = true;
|
|
14933
|
+
if (null !== state.tag || null !== state.anchor) throwError(state, 'alias node should not have any properties');
|
|
14934
|
+
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
14935
|
+
hasContent = true;
|
|
14936
|
+
if (null === state.tag) state.tag = '?';
|
|
15061
14937
|
}
|
|
15062
|
-
|
|
14938
|
+
if (null !== state.anchor) state.anchorMap[state.anchor] = state.result;
|
|
14939
|
+
}
|
|
14940
|
+
else if (0 === indentStatus) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
15063
14941
|
}
|
|
15064
14942
|
if (null === state.tag) {
|
|
15065
14943
|
if (null !== state.anchor) state.anchorMap[state.anchor] = state.result;
|
|
@@ -15767,10 +15645,8 @@ var __webpack_modules__ = {
|
|
|
15767
15645
|
pair = object[index];
|
|
15768
15646
|
pairHasKey = false;
|
|
15769
15647
|
if ('[object Object]' !== _toString.call(pair)) return false;
|
|
15770
|
-
for(pairKey in pair)if (_hasOwnProperty.call(pair, pairKey))
|
|
15771
|
-
|
|
15772
|
-
pairHasKey = true;
|
|
15773
|
-
}
|
|
15648
|
+
for(pairKey in pair)if (_hasOwnProperty.call(pair, pairKey)) if (pairHasKey) return false;
|
|
15649
|
+
else pairHasKey = true;
|
|
15774
15650
|
if (!pairHasKey) return false;
|
|
15775
15651
|
if (-1 !== objectKeys.indexOf(pairKey)) return false;
|
|
15776
15652
|
objectKeys.push(pairKey);
|
|
@@ -16801,13 +16677,12 @@ var __webpack_modules__ = {
|
|
|
16801
16677
|
return result;
|
|
16802
16678
|
},
|
|
16803
16679
|
file: function(name, data, o) {
|
|
16804
|
-
if (1 === arguments.length) {
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
return
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
}
|
|
16680
|
+
if (1 === arguments.length) if (isRegExp(name)) {
|
|
16681
|
+
var regexp = name;
|
|
16682
|
+
return this.filter(function(relativePath, file) {
|
|
16683
|
+
return !file.dir && regexp.test(relativePath);
|
|
16684
|
+
});
|
|
16685
|
+
} else {
|
|
16811
16686
|
var obj = this.files[this.root + name];
|
|
16812
16687
|
if (obj && !obj.dir) return obj;
|
|
16813
16688
|
return null;
|
|
@@ -17259,7 +17134,7 @@ var __webpack_modules__ = {
|
|
|
17259
17134
|
return this;
|
|
17260
17135
|
},
|
|
17261
17136
|
mergeStreamInfo: function() {
|
|
17262
|
-
for(var key in this.extraStreamInfo)if (
|
|
17137
|
+
for(var key in this.extraStreamInfo)if (Object.prototype.hasOwnProperty.call(this.extraStreamInfo, key)) this.streamInfo[key] = this.extraStreamInfo[key];
|
|
17263
17138
|
},
|
|
17264
17139
|
lock: function() {
|
|
17265
17140
|
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
@@ -17515,10 +17390,8 @@ var __webpack_modules__ = {
|
|
|
17515
17390
|
utf16buf[out++] = 0xdc00 | 0x3ff & c;
|
|
17516
17391
|
}
|
|
17517
17392
|
}
|
|
17518
|
-
if (utf16buf.length !== out)
|
|
17519
|
-
|
|
17520
|
-
else utf16buf.length = out;
|
|
17521
|
-
}
|
|
17393
|
+
if (utf16buf.length !== out) if (utf16buf.subarray) utf16buf = utf16buf.subarray(0, out);
|
|
17394
|
+
else utf16buf.length = out;
|
|
17522
17395
|
return utils.applyFromCharCode(utf16buf);
|
|
17523
17396
|
};
|
|
17524
17397
|
exports.utf8encode = function(str) {
|
|
@@ -17548,14 +17421,12 @@ var __webpack_modules__ = {
|
|
|
17548
17421
|
}
|
|
17549
17422
|
var nextBoundary = utf8border(data);
|
|
17550
17423
|
var usableData = data;
|
|
17551
|
-
if (nextBoundary !== data.length) {
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
this.leftOver = data.slice(nextBoundary, data.length);
|
|
17558
|
-
}
|
|
17424
|
+
if (nextBoundary !== data.length) if (support.uint8array) {
|
|
17425
|
+
usableData = data.subarray(0, nextBoundary);
|
|
17426
|
+
this.leftOver = data.subarray(nextBoundary, data.length);
|
|
17427
|
+
} else {
|
|
17428
|
+
usableData = data.slice(0, nextBoundary);
|
|
17429
|
+
this.leftOver = data.slice(nextBoundary, data.length);
|
|
17559
17430
|
}
|
|
17560
17431
|
this.push({
|
|
17561
17432
|
data: exports.utf8decode(usableData),
|
|
@@ -17753,10 +17624,8 @@ var __webpack_modules__ = {
|
|
|
17753
17624
|
var result = [];
|
|
17754
17625
|
for(var index = 0; index < parts.length; index++){
|
|
17755
17626
|
var part = parts[index];
|
|
17756
|
-
if ("." !== part && ("" !== part || 0 === index || index === parts.length - 1))
|
|
17757
|
-
|
|
17758
|
-
else result.push(part);
|
|
17759
|
-
}
|
|
17627
|
+
if ("." !== part && ("" !== part || 0 === index || index === parts.length - 1)) if (".." === part) result.pop();
|
|
17628
|
+
else result.push(part);
|
|
17760
17629
|
}
|
|
17761
17630
|
return result.join("/");
|
|
17762
17631
|
};
|
|
@@ -17978,7 +17847,7 @@ var __webpack_modules__ = {
|
|
|
17978
17847
|
var MADE_BY_DOS = 0x00;
|
|
17979
17848
|
var MADE_BY_UNIX = 0x03;
|
|
17980
17849
|
var findCompression = function(compressionMethod) {
|
|
17981
|
-
for(var method in compressions)if (
|
|
17850
|
+
for(var method in compressions)if (Object.prototype.hasOwnProperty.call(compressions, method)) {
|
|
17982
17851
|
if (compressions[method].magic === compressionMethod) return compressions[method];
|
|
17983
17852
|
}
|
|
17984
17853
|
return null;
|
|
@@ -18417,10 +18286,7 @@ var __webpack_modules__ = {
|
|
|
18417
18286
|
if (merging) return;
|
|
18418
18287
|
merging = true;
|
|
18419
18288
|
let streams = streamsQueue.shift();
|
|
18420
|
-
if (!streams)
|
|
18421
|
-
process.nextTick(endStream);
|
|
18422
|
-
return;
|
|
18423
|
-
}
|
|
18289
|
+
if (!streams) return void process.nextTick(endStream);
|
|
18424
18290
|
if (!Array.isArray(streams)) streams = [
|
|
18425
18291
|
streams
|
|
18426
18292
|
];
|
|
@@ -18502,12 +18368,10 @@ var __webpack_modules__ = {
|
|
|
18502
18368
|
for (let item of list){
|
|
18503
18369
|
let matched = isMatch(item, true);
|
|
18504
18370
|
let match = negated ? !matched.isMatch : matched.isMatch;
|
|
18505
|
-
if (
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
keep.add(matched.output);
|
|
18510
|
-
}
|
|
18371
|
+
if (match) if (negated) omit.add(matched.output);
|
|
18372
|
+
else {
|
|
18373
|
+
omit.delete(matched.output);
|
|
18374
|
+
keep.add(matched.output);
|
|
18511
18375
|
}
|
|
18512
18376
|
}
|
|
18513
18377
|
}
|
|
@@ -18646,12 +18510,10 @@ var __webpack_modules__ = {
|
|
|
18646
18510
|
for (let item of list){
|
|
18647
18511
|
let matched = isMatch(item, true);
|
|
18648
18512
|
let match = negated ? !matched.isMatch : matched.isMatch;
|
|
18649
|
-
if (
|
|
18650
|
-
|
|
18651
|
-
|
|
18652
|
-
|
|
18653
|
-
keep.add(matched.output);
|
|
18654
|
-
}
|
|
18513
|
+
if (match) if (negated) omit.add(matched.output);
|
|
18514
|
+
else {
|
|
18515
|
+
omit.delete(matched.output);
|
|
18516
|
+
keep.add(matched.output);
|
|
18655
18517
|
}
|
|
18656
18518
|
}
|
|
18657
18519
|
}
|
|
@@ -18923,10 +18785,8 @@ var __webpack_modules__ = {
|
|
|
18923
18785
|
this.ended = true;
|
|
18924
18786
|
return false;
|
|
18925
18787
|
}
|
|
18926
|
-
if (0 === strm.avail_out || 0 === strm.avail_in && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))
|
|
18927
|
-
|
|
18928
|
-
else this.onData(utils.shrinkBuf(strm.output, strm.next_out));
|
|
18929
|
-
}
|
|
18788
|
+
if (0 === strm.avail_out || 0 === strm.avail_in && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) if ('string' === this.options.to) this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
|
|
18789
|
+
else this.onData(utils.shrinkBuf(strm.output, strm.next_out));
|
|
18930
18790
|
}while ((strm.avail_in > 0 || 0 === strm.avail_out) && status !== Z_STREAM_END);
|
|
18931
18791
|
if (_mode === Z_FINISH) {
|
|
18932
18792
|
status = zlib_deflate.deflateEnd(this.strm);
|
|
@@ -18944,10 +18804,8 @@ var __webpack_modules__ = {
|
|
|
18944
18804
|
this.chunks.push(chunk);
|
|
18945
18805
|
};
|
|
18946
18806
|
Deflate.prototype.onEnd = function(status) {
|
|
18947
|
-
if (status === Z_OK)
|
|
18948
|
-
|
|
18949
|
-
else this.result = utils.flattenChunks(this.chunks);
|
|
18950
|
-
}
|
|
18807
|
+
if (status === Z_OK) if ('string' === this.options.to) this.result = this.chunks.join('');
|
|
18808
|
+
else this.result = utils.flattenChunks(this.chunks);
|
|
18951
18809
|
this.chunks = [];
|
|
18952
18810
|
this.err = status;
|
|
18953
18811
|
this.msg = this.strm.msg;
|
|
@@ -19049,17 +18907,15 @@ var __webpack_modules__ = {
|
|
|
19049
18907
|
return false;
|
|
19050
18908
|
}
|
|
19051
18909
|
if (strm.next_out) {
|
|
19052
|
-
if (0 === strm.avail_out || status === c.Z_STREAM_END || 0 === strm.avail_in && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) {
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
} else this.onData(utils.shrinkBuf(strm.output, strm.next_out));
|
|
19062
|
-
}
|
|
18910
|
+
if (0 === strm.avail_out || status === c.Z_STREAM_END || 0 === strm.avail_in && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) if ('string' === this.options.to) {
|
|
18911
|
+
next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
|
|
18912
|
+
tail = strm.next_out - next_out_utf8;
|
|
18913
|
+
utf8str = strings.buf2string(strm.output, next_out_utf8);
|
|
18914
|
+
strm.next_out = tail;
|
|
18915
|
+
strm.avail_out = chunkSize - tail;
|
|
18916
|
+
if (tail) utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0);
|
|
18917
|
+
this.onData(utf8str);
|
|
18918
|
+
} else this.onData(utils.shrinkBuf(strm.output, strm.next_out));
|
|
19063
18919
|
}
|
|
19064
18920
|
if (0 === strm.avail_in && 0 === strm.avail_out) allowBufError = true;
|
|
19065
18921
|
}while ((strm.avail_in > 0 || 0 === strm.avail_out) && status !== c.Z_STREAM_END);
|
|
@@ -19080,10 +18936,8 @@ var __webpack_modules__ = {
|
|
|
19080
18936
|
this.chunks.push(chunk);
|
|
19081
18937
|
};
|
|
19082
18938
|
Inflate.prototype.onEnd = function(status) {
|
|
19083
|
-
if (status === c.Z_OK)
|
|
19084
|
-
|
|
19085
|
-
else this.result = utils.flattenChunks(this.chunks);
|
|
19086
|
-
}
|
|
18939
|
+
if (status === c.Z_OK) if ('string' === this.options.to) this.result = this.chunks.join('');
|
|
18940
|
+
else this.result = utils.flattenChunks(this.chunks);
|
|
19087
18941
|
this.chunks = [];
|
|
19088
18942
|
this.err = status;
|
|
19089
18943
|
this.msg = this.strm.msg;
|
|
@@ -19127,10 +18981,7 @@ var __webpack_modules__ = {
|
|
|
19127
18981
|
};
|
|
19128
18982
|
var fnTyped = {
|
|
19129
18983
|
arraySet: function(dest, src, src_offs, len, dest_offs) {
|
|
19130
|
-
if (src.subarray && dest.subarray)
|
|
19131
|
-
dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
|
|
19132
|
-
return;
|
|
19133
|
-
}
|
|
18984
|
+
if (src.subarray && dest.subarray) return void dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
|
|
19134
18985
|
for(var i = 0; i < len; i++)dest[dest_offs + i] = src[src_offs + i];
|
|
19135
18986
|
},
|
|
19136
18987
|
flattenChunks: function(chunks) {
|
|
@@ -19950,127 +19801,117 @@ var __webpack_modules__ = {
|
|
|
19950
19801
|
s.strm = strm;
|
|
19951
19802
|
old_flush = s.last_flush;
|
|
19952
19803
|
s.last_flush = flush;
|
|
19953
|
-
if (s.status === INIT_STATE) {
|
|
19954
|
-
|
|
19955
|
-
|
|
19956
|
-
|
|
19957
|
-
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
|
|
19963
|
-
|
|
19964
|
-
|
|
19965
|
-
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
s.status = EXTRA_STATE;
|
|
19974
|
-
} else {
|
|
19975
|
-
put_byte(s, 0);
|
|
19976
|
-
put_byte(s, 0);
|
|
19977
|
-
put_byte(s, 0);
|
|
19978
|
-
put_byte(s, 0);
|
|
19979
|
-
put_byte(s, 0);
|
|
19980
|
-
put_byte(s, 9 === s.level ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0);
|
|
19981
|
-
put_byte(s, OS_CODE);
|
|
19982
|
-
s.status = BUSY_STATE;
|
|
19983
|
-
}
|
|
19804
|
+
if (s.status === INIT_STATE) if (2 === s.wrap) {
|
|
19805
|
+
strm.adler = 0;
|
|
19806
|
+
put_byte(s, 31);
|
|
19807
|
+
put_byte(s, 139);
|
|
19808
|
+
put_byte(s, 8);
|
|
19809
|
+
if (s.gzhead) {
|
|
19810
|
+
put_byte(s, (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (s.gzhead.extra ? 4 : 0) + (s.gzhead.name ? 8 : 0) + (s.gzhead.comment ? 16 : 0));
|
|
19811
|
+
put_byte(s, 0xff & s.gzhead.time);
|
|
19812
|
+
put_byte(s, s.gzhead.time >> 8 & 0xff);
|
|
19813
|
+
put_byte(s, s.gzhead.time >> 16 & 0xff);
|
|
19814
|
+
put_byte(s, s.gzhead.time >> 24 & 0xff);
|
|
19815
|
+
put_byte(s, 9 === s.level ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0);
|
|
19816
|
+
put_byte(s, 0xff & s.gzhead.os);
|
|
19817
|
+
if (s.gzhead.extra && s.gzhead.extra.length) {
|
|
19818
|
+
put_byte(s, 0xff & s.gzhead.extra.length);
|
|
19819
|
+
put_byte(s, s.gzhead.extra.length >> 8 & 0xff);
|
|
19820
|
+
}
|
|
19821
|
+
if (s.gzhead.hcrc) strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
|
|
19822
|
+
s.gzindex = 0;
|
|
19823
|
+
s.status = EXTRA_STATE;
|
|
19984
19824
|
} else {
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19825
|
+
put_byte(s, 0);
|
|
19826
|
+
put_byte(s, 0);
|
|
19827
|
+
put_byte(s, 0);
|
|
19828
|
+
put_byte(s, 0);
|
|
19829
|
+
put_byte(s, 0);
|
|
19830
|
+
put_byte(s, 9 === s.level ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0);
|
|
19831
|
+
put_byte(s, OS_CODE);
|
|
19991
19832
|
s.status = BUSY_STATE;
|
|
19992
|
-
putShortMSB(s, header);
|
|
19993
|
-
if (0 !== s.strstart) {
|
|
19994
|
-
putShortMSB(s, strm.adler >>> 16);
|
|
19995
|
-
putShortMSB(s, 0xffff & strm.adler);
|
|
19996
|
-
}
|
|
19997
|
-
strm.adler = 1;
|
|
19998
19833
|
}
|
|
19999
|
-
}
|
|
20000
|
-
|
|
20001
|
-
|
|
20002
|
-
|
|
20003
|
-
|
|
19834
|
+
} else {
|
|
19835
|
+
var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8;
|
|
19836
|
+
var level_flags = -1;
|
|
19837
|
+
level_flags = s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 0 : s.level < 6 ? 1 : 6 === s.level ? 2 : 3;
|
|
19838
|
+
header |= level_flags << 6;
|
|
19839
|
+
if (0 !== s.strstart) header |= PRESET_DICT;
|
|
19840
|
+
header += 31 - header % 31;
|
|
19841
|
+
s.status = BUSY_STATE;
|
|
19842
|
+
putShortMSB(s, header);
|
|
19843
|
+
if (0 !== s.strstart) {
|
|
19844
|
+
putShortMSB(s, strm.adler >>> 16);
|
|
19845
|
+
putShortMSB(s, 0xffff & strm.adler);
|
|
19846
|
+
}
|
|
19847
|
+
strm.adler = 1;
|
|
19848
|
+
}
|
|
19849
|
+
if (s.status === EXTRA_STATE) if (s.gzhead.extra) {
|
|
19850
|
+
beg = s.pending;
|
|
19851
|
+
while(s.gzindex < (0xffff & s.gzhead.extra.length)){
|
|
19852
|
+
if (s.pending === s.pending_buf_size) {
|
|
19853
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19854
|
+
flush_pending(strm);
|
|
19855
|
+
beg = s.pending;
|
|
19856
|
+
if (s.pending === s.pending_buf_size) break;
|
|
19857
|
+
}
|
|
19858
|
+
put_byte(s, 0xff & s.gzhead.extra[s.gzindex]);
|
|
19859
|
+
s.gzindex++;
|
|
19860
|
+
}
|
|
19861
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19862
|
+
if (s.gzindex === s.gzhead.extra.length) {
|
|
19863
|
+
s.gzindex = 0;
|
|
19864
|
+
s.status = NAME_STATE;
|
|
19865
|
+
}
|
|
19866
|
+
} else s.status = NAME_STATE;
|
|
19867
|
+
if (s.status === NAME_STATE) if (s.gzhead.name) {
|
|
19868
|
+
beg = s.pending;
|
|
19869
|
+
do {
|
|
19870
|
+
if (s.pending === s.pending_buf_size) {
|
|
19871
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19872
|
+
flush_pending(strm);
|
|
19873
|
+
beg = s.pending;
|
|
20004
19874
|
if (s.pending === s.pending_buf_size) {
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
beg = s.pending;
|
|
20008
|
-
if (s.pending === s.pending_buf_size) break;
|
|
19875
|
+
val = 1;
|
|
19876
|
+
break;
|
|
20009
19877
|
}
|
|
20010
|
-
put_byte(s, 0xff & s.gzhead.extra[s.gzindex]);
|
|
20011
|
-
s.gzindex++;
|
|
20012
|
-
}
|
|
20013
|
-
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
20014
|
-
if (s.gzindex === s.gzhead.extra.length) {
|
|
20015
|
-
s.gzindex = 0;
|
|
20016
|
-
s.status = NAME_STATE;
|
|
20017
19878
|
}
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
|
|
20021
|
-
if (s.gzhead.
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
put_byte(s, val);
|
|
20035
|
-
}while (0 !== val);
|
|
20036
|
-
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
20037
|
-
if (0 === val) {
|
|
20038
|
-
s.gzindex = 0;
|
|
20039
|
-
s.status = COMMENT_STATE;
|
|
20040
|
-
}
|
|
20041
|
-
} else s.status = COMMENT_STATE;
|
|
20042
|
-
}
|
|
20043
|
-
if (s.status === COMMENT_STATE) {
|
|
20044
|
-
if (s.gzhead.comment) {
|
|
20045
|
-
beg = s.pending;
|
|
20046
|
-
do {
|
|
19879
|
+
val = s.gzindex < s.gzhead.name.length ? 0xff & s.gzhead.name.charCodeAt(s.gzindex++) : 0;
|
|
19880
|
+
put_byte(s, val);
|
|
19881
|
+
}while (0 !== val);
|
|
19882
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19883
|
+
if (0 === val) {
|
|
19884
|
+
s.gzindex = 0;
|
|
19885
|
+
s.status = COMMENT_STATE;
|
|
19886
|
+
}
|
|
19887
|
+
} else s.status = COMMENT_STATE;
|
|
19888
|
+
if (s.status === COMMENT_STATE) if (s.gzhead.comment) {
|
|
19889
|
+
beg = s.pending;
|
|
19890
|
+
do {
|
|
19891
|
+
if (s.pending === s.pending_buf_size) {
|
|
19892
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19893
|
+
flush_pending(strm);
|
|
19894
|
+
beg = s.pending;
|
|
20047
19895
|
if (s.pending === s.pending_buf_size) {
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
beg = s.pending;
|
|
20051
|
-
if (s.pending === s.pending_buf_size) {
|
|
20052
|
-
val = 1;
|
|
20053
|
-
break;
|
|
20054
|
-
}
|
|
19896
|
+
val = 1;
|
|
19897
|
+
break;
|
|
20055
19898
|
}
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
20059
|
-
|
|
20060
|
-
|
|
20061
|
-
|
|
20062
|
-
}
|
|
20063
|
-
if (s.status === HCRC_STATE) {
|
|
20064
|
-
if (s.
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
} else s.status = BUSY_STATE;
|
|
20073
|
-
}
|
|
19899
|
+
}
|
|
19900
|
+
val = s.gzindex < s.gzhead.comment.length ? 0xff & s.gzhead.comment.charCodeAt(s.gzindex++) : 0;
|
|
19901
|
+
put_byte(s, val);
|
|
19902
|
+
}while (0 !== val);
|
|
19903
|
+
if (s.gzhead.hcrc && s.pending > beg) strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
|
|
19904
|
+
if (0 === val) s.status = HCRC_STATE;
|
|
19905
|
+
} else s.status = HCRC_STATE;
|
|
19906
|
+
if (s.status === HCRC_STATE) if (s.gzhead.hcrc) {
|
|
19907
|
+
if (s.pending + 2 > s.pending_buf_size) flush_pending(strm);
|
|
19908
|
+
if (s.pending + 2 <= s.pending_buf_size) {
|
|
19909
|
+
put_byte(s, 0xff & strm.adler);
|
|
19910
|
+
put_byte(s, strm.adler >> 8 & 0xff);
|
|
19911
|
+
strm.adler = 0;
|
|
19912
|
+
s.status = BUSY_STATE;
|
|
19913
|
+
}
|
|
19914
|
+
} else s.status = BUSY_STATE;
|
|
20074
19915
|
if (0 !== s.pending) {
|
|
20075
19916
|
flush_pending(strm);
|
|
20076
19917
|
if (0 === strm.avail_out) {
|
|
@@ -24257,13 +24098,12 @@ var __webpack_modules__ = {
|
|
|
24257
24098
|
];
|
|
24258
24099
|
function prependListener(emitter, event, fn) {
|
|
24259
24100
|
if ('function' == typeof emitter.prependListener) return emitter.prependListener(event, fn);
|
|
24260
|
-
if (emitter._events && emitter._events[event])
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
} else emitter.on(event, fn);
|
|
24101
|
+
if (emitter._events && emitter._events[event]) if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);
|
|
24102
|
+
else emitter._events[event] = [
|
|
24103
|
+
fn,
|
|
24104
|
+
emitter._events[event]
|
|
24105
|
+
];
|
|
24106
|
+
else emitter.on(event, fn);
|
|
24267
24107
|
}
|
|
24268
24108
|
function ReadableState(options, stream) {
|
|
24269
24109
|
Duplex = Duplex || __webpack_require__("../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js");
|
|
@@ -24358,10 +24198,9 @@ var __webpack_modules__ = {
|
|
|
24358
24198
|
if (er) stream.emit('error', er);
|
|
24359
24199
|
else if (state.objectMode || chunk && chunk.length > 0) {
|
|
24360
24200
|
if ('string' != typeof chunk && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer1.prototype) chunk = _uint8ArrayToBuffer(chunk);
|
|
24361
|
-
if (addToFront)
|
|
24362
|
-
|
|
24363
|
-
|
|
24364
|
-
} else if (state.ended) stream.emit('error', new Error('stream.push() after EOF'));
|
|
24201
|
+
if (addToFront) if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));
|
|
24202
|
+
else addChunk(stream, state, chunk, true);
|
|
24203
|
+
else if (state.ended) stream.emit('error', new Error('stream.push() after EOF'));
|
|
24365
24204
|
else {
|
|
24366
24205
|
state.reading = false;
|
|
24367
24206
|
if (state.decoder && !encoding) {
|
|
@@ -24420,10 +24259,8 @@ var __webpack_modules__ = {
|
|
|
24420
24259
|
function howMuchToRead(n, state) {
|
|
24421
24260
|
if (n <= 0 || 0 === state.length && state.ended) return 0;
|
|
24422
24261
|
if (state.objectMode) return 1;
|
|
24423
|
-
if (n !== n)
|
|
24424
|
-
|
|
24425
|
-
return state.length;
|
|
24426
|
-
}
|
|
24262
|
+
if (n !== n) if (state.flowing && state.length) return state.buffer.head.data.length;
|
|
24263
|
+
else return state.length;
|
|
24427
24264
|
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
|
|
24428
24265
|
if (n <= state.length) return n;
|
|
24429
24266
|
if (!state.ended) {
|
|
@@ -25303,15 +25140,13 @@ var __webpack_modules__ = {
|
|
|
25303
25140
|
});
|
|
25304
25141
|
}
|
|
25305
25142
|
function prefinish(stream, state) {
|
|
25306
|
-
if (!state.prefinished && !state.finalCalled) {
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
stream.emit('prefinish');
|
|
25314
|
-
}
|
|
25143
|
+
if (!state.prefinished && !state.finalCalled) if ('function' == typeof stream._final) {
|
|
25144
|
+
state.pendingcb++;
|
|
25145
|
+
state.finalCalled = true;
|
|
25146
|
+
pna.nextTick(callFinal, stream, state);
|
|
25147
|
+
} else {
|
|
25148
|
+
state.prefinished = true;
|
|
25149
|
+
stream.emit('prefinish');
|
|
25315
25150
|
}
|
|
25316
25151
|
}
|
|
25317
25152
|
function finishMaybe(stream, state) {
|
|
@@ -25328,10 +25163,8 @@ var __webpack_modules__ = {
|
|
|
25328
25163
|
function endWritable(stream, state, cb) {
|
|
25329
25164
|
state.ending = true;
|
|
25330
25165
|
finishMaybe(stream, state);
|
|
25331
|
-
if (cb)
|
|
25332
|
-
|
|
25333
|
-
else stream.once('finish', cb);
|
|
25334
|
-
}
|
|
25166
|
+
if (cb) if (state.finished) pna.nextTick(cb);
|
|
25167
|
+
else stream.once('finish', cb);
|
|
25335
25168
|
state.ended = true;
|
|
25336
25169
|
stream.writable = false;
|
|
25337
25170
|
}
|
|
@@ -25446,27 +25279,24 @@ var __webpack_modules__ = {
|
|
|
25446
25279
|
var writableDestroyed = this._writableState && this._writableState.destroyed;
|
|
25447
25280
|
if (readableDestroyed || writableDestroyed) {
|
|
25448
25281
|
if (cb) cb(err);
|
|
25449
|
-
else if (err) {
|
|
25450
|
-
if (this._writableState) {
|
|
25451
|
-
|
|
25452
|
-
|
|
25453
|
-
|
|
25454
|
-
|
|
25455
|
-
} else pna.nextTick(emitErrorNT, this, err);
|
|
25456
|
-
}
|
|
25282
|
+
else if (err) if (this._writableState) {
|
|
25283
|
+
if (!this._writableState.errorEmitted) {
|
|
25284
|
+
this._writableState.errorEmitted = true;
|
|
25285
|
+
pna.nextTick(emitErrorNT, this, err);
|
|
25286
|
+
}
|
|
25287
|
+
} else pna.nextTick(emitErrorNT, this, err);
|
|
25457
25288
|
return this;
|
|
25458
25289
|
}
|
|
25459
25290
|
if (this._readableState) this._readableState.destroyed = true;
|
|
25460
25291
|
if (this._writableState) this._writableState.destroyed = true;
|
|
25461
25292
|
this._destroy(err || null, function(err) {
|
|
25462
|
-
if (!cb && err) {
|
|
25463
|
-
if (_this._writableState) {
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
} else if (cb) cb(err);
|
|
25293
|
+
if (!cb && err) if (_this._writableState) {
|
|
25294
|
+
if (!_this._writableState.errorEmitted) {
|
|
25295
|
+
_this._writableState.errorEmitted = true;
|
|
25296
|
+
pna.nextTick(emitErrorNT, _this, err);
|
|
25297
|
+
}
|
|
25298
|
+
} else pna.nextTick(emitErrorNT, _this, err);
|
|
25299
|
+
else if (cb) cb(err);
|
|
25470
25300
|
});
|
|
25471
25301
|
return this;
|
|
25472
25302
|
}
|
|
@@ -25570,18 +25400,17 @@ var __webpack_modules__ = {
|
|
|
25570
25400
|
results[i] = result;
|
|
25571
25401
|
if (0 === --pending || err) done(err);
|
|
25572
25402
|
}
|
|
25573
|
-
if (pending) {
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
each(key, err, result);
|
|
25577
|
-
});
|
|
25403
|
+
if (pending) if (keys) keys.forEach(function(key) {
|
|
25404
|
+
tasks[key](function(err, result) {
|
|
25405
|
+
each(key, err, result);
|
|
25578
25406
|
});
|
|
25579
|
-
|
|
25580
|
-
|
|
25581
|
-
|
|
25582
|
-
|
|
25407
|
+
});
|
|
25408
|
+
else tasks.forEach(function(task, i) {
|
|
25409
|
+
task(function(err, result) {
|
|
25410
|
+
each(i, err, result);
|
|
25583
25411
|
});
|
|
25584
|
-
}
|
|
25412
|
+
});
|
|
25413
|
+
else done(null);
|
|
25585
25414
|
isSync = false;
|
|
25586
25415
|
}
|
|
25587
25416
|
},
|
|
@@ -25607,10 +25436,9 @@ var __webpack_modules__ = {
|
|
|
25607
25436
|
SafeBuffer.alloc = function(size, fill, encoding) {
|
|
25608
25437
|
if ('number' != typeof size) throw new TypeError('Argument must be a number');
|
|
25609
25438
|
var buf = Buffer1(size);
|
|
25610
|
-
if (void 0 !== fill)
|
|
25611
|
-
|
|
25612
|
-
|
|
25613
|
-
} else buf.fill(0);
|
|
25439
|
+
if (void 0 !== fill) if ('string' == typeof encoding) buf.fill(fill, encoding);
|
|
25440
|
+
else buf.fill(fill);
|
|
25441
|
+
else buf.fill(0);
|
|
25614
25442
|
return buf;
|
|
25615
25443
|
};
|
|
25616
25444
|
SafeBuffer.allocUnsafe = function(size) {
|
|
@@ -25901,10 +25729,8 @@ var __webpack_modules__ = {
|
|
|
25901
25729
|
if (--j < i || -2 === nb) return 0;
|
|
25902
25730
|
nb = utf8CheckByte(buf[j]);
|
|
25903
25731
|
if (nb >= 0) {
|
|
25904
|
-
if (nb > 0)
|
|
25905
|
-
|
|
25906
|
-
else self1.lastNeed = nb - 3;
|
|
25907
|
-
}
|
|
25732
|
+
if (nb > 0) if (2 === nb) nb = 0;
|
|
25733
|
+
else self1.lastNeed = nb - 3;
|
|
25908
25734
|
return nb;
|
|
25909
25735
|
}
|
|
25910
25736
|
return 0;
|
|
@@ -27935,7 +27761,7 @@ var __webpack_modules__ = {
|
|
|
27935
27761
|
const utils = (0, implementations_1.getWorkspaceUtilities)(cwd);
|
|
27936
27762
|
if (!utils) return [];
|
|
27937
27763
|
if (!utils.getWorkspacePackagePathsAsync) {
|
|
27938
|
-
const managerName = implementations_1.getWorkspaceManagerAndRoot(cwd)?.manager;
|
|
27764
|
+
const managerName = (0, implementations_1.getWorkspaceManagerAndRoot)(cwd)?.manager;
|
|
27939
27765
|
throw new Error(`${cwd} is using ${managerName} which has not been converted to async yet`);
|
|
27940
27766
|
}
|
|
27941
27767
|
return utils.getWorkspacePackagePathsAsync(cwd);
|
|
@@ -27949,7 +27775,7 @@ var __webpack_modules__ = {
|
|
|
27949
27775
|
exports.getWorkspaceRoot = void 0;
|
|
27950
27776
|
const implementations_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/index.js");
|
|
27951
27777
|
function getWorkspaceRoot(cwd, preferredManager) {
|
|
27952
|
-
return implementations_1.getWorkspaceManagerAndRoot(cwd, void 0, preferredManager)?.root;
|
|
27778
|
+
return (0, implementations_1.getWorkspaceManagerAndRoot)(cwd, void 0, preferredManager)?.root;
|
|
27953
27779
|
}
|
|
27954
27780
|
exports.getWorkspaceRoot = getWorkspaceRoot;
|
|
27955
27781
|
},
|
|
@@ -27968,7 +27794,7 @@ var __webpack_modules__ = {
|
|
|
27968
27794
|
const utils = (0, implementations_1.getWorkspaceUtilities)(cwd);
|
|
27969
27795
|
if (!utils) return [];
|
|
27970
27796
|
if (!utils.getWorkspacesAsync) {
|
|
27971
|
-
const managerName = implementations_1.getWorkspaceManagerAndRoot(cwd)?.manager;
|
|
27797
|
+
const managerName = (0, implementations_1.getWorkspaceManagerAndRoot)(cwd)?.manager;
|
|
27972
27798
|
throw new Error(`${cwd} is using ${managerName} which has not been converted to async yet`);
|
|
27973
27799
|
}
|
|
27974
27800
|
return utils.getWorkspacesAsync(cwd);
|
|
@@ -28024,7 +27850,7 @@ var __webpack_modules__ = {
|
|
|
28024
27850
|
exports.getWorkspaceUtilities = void 0;
|
|
28025
27851
|
const getWorkspaceManagerAndRoot_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js");
|
|
28026
27852
|
function getWorkspaceUtilities(cwd) {
|
|
28027
|
-
const manager = getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot(cwd)?.manager;
|
|
27853
|
+
const manager = (0, getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot)(cwd)?.manager;
|
|
28028
27854
|
switch(manager){
|
|
28029
27855
|
case "yarn":
|
|
28030
27856
|
return __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/yarn.js");
|
|
@@ -28078,7 +27904,7 @@ var __webpack_modules__ = {
|
|
|
28078
27904
|
const logging_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/logging.js");
|
|
28079
27905
|
const getWorkspaceManagerAndRoot_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js");
|
|
28080
27906
|
function getLernaWorkspaceRoot(cwd) {
|
|
28081
|
-
const root = getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot(cwd, void 0, "lerna")?.root;
|
|
27907
|
+
const root = (0, getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot)(cwd, void 0, "lerna")?.root;
|
|
28082
27908
|
if (!root) throw new Error("Could not find lerna workspace root from " + cwd);
|
|
28083
27909
|
return root;
|
|
28084
27910
|
}
|
|
@@ -28125,7 +27951,7 @@ var __webpack_modules__ = {
|
|
|
28125
27951
|
const _1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/index.js");
|
|
28126
27952
|
const packageJsonWorkspaces_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/packageJsonWorkspaces.js");
|
|
28127
27953
|
function getNpmWorkspaceRoot(cwd) {
|
|
28128
|
-
const root = _1.getWorkspaceManagerAndRoot(cwd, void 0, "npm")?.root;
|
|
27954
|
+
const root = (0, _1.getWorkspaceManagerAndRoot)(cwd, void 0, "npm")?.root;
|
|
28129
27955
|
if (!root) throw new Error("Could not find npm workspace root from " + cwd);
|
|
28130
27956
|
return root;
|
|
28131
27957
|
}
|
|
@@ -28238,7 +28064,7 @@ var __webpack_modules__ = {
|
|
|
28238
28064
|
const logging_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/logging.js");
|
|
28239
28065
|
const getWorkspaceManagerAndRoot_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js");
|
|
28240
28066
|
function getPnpmWorkspaceRoot(cwd) {
|
|
28241
|
-
const root = getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot(cwd, void 0, "pnpm")?.root;
|
|
28067
|
+
const root = (0, getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot)(cwd, void 0, "pnpm")?.root;
|
|
28242
28068
|
if (!root) throw new Error("Could not find pnpm workspace root from " + cwd);
|
|
28243
28069
|
return root;
|
|
28244
28070
|
}
|
|
@@ -28295,7 +28121,7 @@ var __webpack_modules__ = {
|
|
|
28295
28121
|
const logging_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/logging.js");
|
|
28296
28122
|
const getWorkspaceManagerAndRoot_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js");
|
|
28297
28123
|
function getRushWorkspaceRoot(cwd) {
|
|
28298
|
-
const root = getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot(cwd, void 0, "rush")?.root;
|
|
28124
|
+
const root = (0, getWorkspaceManagerAndRoot_1.getWorkspaceManagerAndRoot)(cwd, void 0, "rush")?.root;
|
|
28299
28125
|
if (!root) throw new Error("Could not find rush workspace root from " + cwd);
|
|
28300
28126
|
return root;
|
|
28301
28127
|
}
|
|
@@ -28344,7 +28170,7 @@ var __webpack_modules__ = {
|
|
|
28344
28170
|
const _1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/index.js");
|
|
28345
28171
|
const packageJsonWorkspaces_1 = __webpack_require__("../../node_modules/.pnpm/workspace-tools@0.36.4/node_modules/workspace-tools/lib/workspaces/implementations/packageJsonWorkspaces.js");
|
|
28346
28172
|
function getYarnWorkspaceRoot(cwd) {
|
|
28347
|
-
const root = _1.getWorkspaceManagerAndRoot(cwd, void 0, "yarn")?.root;
|
|
28173
|
+
const root = (0, _1.getWorkspaceManagerAndRoot)(cwd, void 0, "yarn")?.root;
|
|
28348
28174
|
if (!root) throw new Error("Could not find yarn workspace root from " + cwd);
|
|
28349
28175
|
return root;
|
|
28350
28176
|
}
|
|
@@ -28514,33 +28340,31 @@ var __webpack_modules__ = {
|
|
|
28514
28340
|
const markerLines = {};
|
|
28515
28341
|
if (lineDiff) for(let i = 0; i <= lineDiff; i++){
|
|
28516
28342
|
const lineNumber = i + startLine;
|
|
28517
|
-
if (startColumn) {
|
|
28518
|
-
|
|
28519
|
-
|
|
28520
|
-
|
|
28521
|
-
|
|
28522
|
-
|
|
28523
|
-
|
|
28524
|
-
|
|
28343
|
+
if (startColumn) if (0 === i) {
|
|
28344
|
+
const sourceLength = source[lineNumber - 1].length;
|
|
28345
|
+
markerLines[lineNumber] = [
|
|
28346
|
+
startColumn,
|
|
28347
|
+
sourceLength - startColumn + 1
|
|
28348
|
+
];
|
|
28349
|
+
} else if (i === lineDiff) markerLines[lineNumber] = [
|
|
28350
|
+
0,
|
|
28351
|
+
endColumn
|
|
28352
|
+
];
|
|
28353
|
+
else {
|
|
28354
|
+
const sourceLength = source[lineNumber - i].length;
|
|
28355
|
+
markerLines[lineNumber] = [
|
|
28525
28356
|
0,
|
|
28526
|
-
|
|
28357
|
+
sourceLength
|
|
28527
28358
|
];
|
|
28528
|
-
|
|
28529
|
-
|
|
28530
|
-
markerLines[lineNumber] = [
|
|
28531
|
-
0,
|
|
28532
|
-
sourceLength
|
|
28533
|
-
];
|
|
28534
|
-
}
|
|
28535
|
-
} else markerLines[lineNumber] = true;
|
|
28359
|
+
}
|
|
28360
|
+
else markerLines[lineNumber] = true;
|
|
28536
28361
|
}
|
|
28537
|
-
else if (startColumn === endColumn)
|
|
28538
|
-
|
|
28539
|
-
|
|
28540
|
-
|
|
28541
|
-
|
|
28542
|
-
|
|
28543
|
-
} else markerLines[startLine] = [
|
|
28362
|
+
else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [
|
|
28363
|
+
startColumn,
|
|
28364
|
+
0
|
|
28365
|
+
];
|
|
28366
|
+
else markerLines[startLine] = true;
|
|
28367
|
+
else markerLines[startLine] = [
|
|
28544
28368
|
startColumn,
|
|
28545
28369
|
endColumn - startColumn
|
|
28546
28370
|
];
|
|
@@ -28830,10 +28654,7 @@ var __webpack_modules__ = {
|
|
|
28830
28654
|
return 0 !== this._queueCursor || !!this._last;
|
|
28831
28655
|
}
|
|
28832
28656
|
exactSource(loc, cb) {
|
|
28833
|
-
if (!this._map)
|
|
28834
|
-
cb();
|
|
28835
|
-
return;
|
|
28836
|
-
}
|
|
28657
|
+
if (!this._map) return void cb();
|
|
28837
28658
|
this.source("start", loc);
|
|
28838
28659
|
const identifierName = loc.identifierName;
|
|
28839
28660
|
const sourcePos = this._sourcePosition;
|
|
@@ -28938,15 +28759,11 @@ var __webpack_modules__ = {
|
|
|
28938
28759
|
const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
|
|
28939
28760
|
function DirectiveLiteral(node) {
|
|
28940
28761
|
const raw = this.getPossibleRaw(node);
|
|
28941
|
-
if (!this.format.minified && void 0 !== raw)
|
|
28942
|
-
this.token(raw);
|
|
28943
|
-
return;
|
|
28944
|
-
}
|
|
28762
|
+
if (!this.format.minified && void 0 !== raw) return void this.token(raw);
|
|
28945
28763
|
const { value: value1 } = node;
|
|
28946
|
-
if (unescapedDoubleQuoteRE.test(value1))
|
|
28947
|
-
|
|
28948
|
-
|
|
28949
|
-
} else this.token(`"${value1}"`);
|
|
28764
|
+
if (unescapedDoubleQuoteRE.test(value1)) if (unescapedSingleQuoteRE.test(value1)) throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");
|
|
28765
|
+
else this.token(`'${value1}'`);
|
|
28766
|
+
else this.token(`"${value1}"`);
|
|
28950
28767
|
}
|
|
28951
28768
|
function InterpreterDirective(node) {
|
|
28952
28769
|
this.token(`#!${node.value}`);
|
|
@@ -29161,10 +28978,7 @@ var __webpack_modules__ = {
|
|
|
29161
28978
|
},
|
|
29162
28979
|
DecimalLiteral (node) {
|
|
29163
28980
|
const raw = this.getPossibleRaw(node);
|
|
29164
|
-
if (!this.format.minified && void 0 !== raw)
|
|
29165
|
-
this.word(raw);
|
|
29166
|
-
return;
|
|
29167
|
-
}
|
|
28981
|
+
if (!this.format.minified && void 0 !== raw) return void this.word(raw);
|
|
29168
28982
|
this.word(node.value + "m");
|
|
29169
28983
|
}
|
|
29170
28984
|
};
|
|
@@ -30522,10 +30336,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
30522
30336
|
const useAssertKeyword = "assert" === importAttributesKeyword || !importAttributesKeyword && assertions;
|
|
30523
30337
|
this.word(useAssertKeyword ? "assert" : "with");
|
|
30524
30338
|
this.space();
|
|
30525
|
-
if (!useAssertKeyword && "with" !== importAttributesKeyword)
|
|
30526
|
-
this.printList(attributes || assertions);
|
|
30527
|
-
return;
|
|
30528
|
-
}
|
|
30339
|
+
if (!useAssertKeyword && "with" !== importAttributesKeyword) return void this.printList(attributes || assertions);
|
|
30529
30340
|
const occurrenceCount = hasPreviousBrace ? 1 : 0;
|
|
30530
30341
|
this.token("{", null, occurrenceCount);
|
|
30531
30342
|
this.space();
|
|
@@ -31074,10 +30885,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
31074
30885
|
this.print(node.key);
|
|
31075
30886
|
this.tokenChar(93);
|
|
31076
30887
|
} else {
|
|
31077
|
-
if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name)
|
|
31078
|
-
this.print(node.value);
|
|
31079
|
-
return;
|
|
31080
|
-
}
|
|
30888
|
+
if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) return void this.print(node.value);
|
|
31081
30889
|
this.print(node.key);
|
|
31082
30890
|
if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) return;
|
|
31083
30891
|
}
|
|
@@ -31165,19 +30973,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
31165
30973
|
}
|
|
31166
30974
|
function StringLiteral(node) {
|
|
31167
30975
|
const raw = this.getPossibleRaw(node);
|
|
31168
|
-
if (!this.format.minified && void 0 !== raw)
|
|
31169
|
-
this.token(raw);
|
|
31170
|
-
return;
|
|
31171
|
-
}
|
|
30976
|
+
if (!this.format.minified && void 0 !== raw) return void this.token(raw);
|
|
31172
30977
|
const val = _jsesc(node.value, this.format.jsescOption);
|
|
31173
30978
|
this.token(val);
|
|
31174
30979
|
}
|
|
31175
30980
|
function BigIntLiteral(node) {
|
|
31176
30981
|
const raw = this.getPossibleRaw(node);
|
|
31177
|
-
if (!this.format.minified && void 0 !== raw)
|
|
31178
|
-
this.word(raw);
|
|
31179
|
-
return;
|
|
31180
|
-
}
|
|
30982
|
+
if (!this.format.minified && void 0 !== raw) return void this.word(raw);
|
|
31181
30983
|
this.word(node.value + "n");
|
|
31182
30984
|
}
|
|
31183
30985
|
const validTopicTokenSet = new Set([
|
|
@@ -31351,10 +31153,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
31351
31153
|
maybePrintTrailingCommaOrSemicolon(this, node);
|
|
31352
31154
|
}
|
|
31353
31155
|
function maybePrintTrailingCommaOrSemicolon(printer, node) {
|
|
31354
|
-
if (!printer.tokenMap || !node.start || !node.end)
|
|
31355
|
-
printer.semicolon();
|
|
31356
|
-
return;
|
|
31357
|
-
}
|
|
31156
|
+
if (!printer.tokenMap || !node.start || !node.end) return void printer.semicolon();
|
|
31358
31157
|
if (printer.tokenMap.endMatches(node, ",")) printer.token(",");
|
|
31359
31158
|
else if (printer.tokenMap.endMatches(node, ";")) printer.semicolon();
|
|
31360
31159
|
}
|
|
@@ -31727,10 +31526,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
31727
31526
|
this.space();
|
|
31728
31527
|
}
|
|
31729
31528
|
this.print(id);
|
|
31730
|
-
if (!node.body)
|
|
31731
|
-
this.semicolon();
|
|
31732
|
-
return;
|
|
31733
|
-
}
|
|
31529
|
+
if (!node.body) return void this.semicolon();
|
|
31734
31530
|
let body = node.body;
|
|
31735
31531
|
while("TSModuleDeclaration" === body.type){
|
|
31736
31532
|
this.tokenChar(46);
|
|
@@ -32627,10 +32423,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
32627
32423
|
if (i <= 0) return;
|
|
32628
32424
|
if (!force) {
|
|
32629
32425
|
if (this.format.retainLines || this.format.compact) return;
|
|
32630
|
-
if (this.format.concise)
|
|
32631
|
-
this.space();
|
|
32632
|
-
return;
|
|
32633
|
-
}
|
|
32426
|
+
if (this.format.concise) return void this.space();
|
|
32634
32427
|
}
|
|
32635
32428
|
if (i > 2) i = 2;
|
|
32636
32429
|
i -= this._buf.getNewlineCount();
|
|
@@ -32649,10 +32442,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
32649
32442
|
this._buf.removeTrailingNewline();
|
|
32650
32443
|
}
|
|
32651
32444
|
exactSource(loc, cb) {
|
|
32652
|
-
if (!loc)
|
|
32653
|
-
cb();
|
|
32654
|
-
return;
|
|
32655
|
-
}
|
|
32445
|
+
if (!loc) return void cb();
|
|
32656
32446
|
this._catchUp("start", loc);
|
|
32657
32447
|
this._buf.exactSource(loc, cb);
|
|
32658
32448
|
}
|
|
@@ -32876,7 +32666,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
32876
32666
|
const len = nodes.length;
|
|
32877
32667
|
for(let i = 0; i < len; i++){
|
|
32878
32668
|
const node = nodes[i];
|
|
32879
|
-
if (
|
|
32669
|
+
if (node) {
|
|
32880
32670
|
if (statement) this._printNewline(0 === i, newlineOpts);
|
|
32881
32671
|
this.print(node, void 0, trailingCommentsLineOffset || 0);
|
|
32882
32672
|
null == iterator || iterator(node, i);
|
|
@@ -32958,19 +32748,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
32958
32748
|
_printNewline(newLine, opts) {
|
|
32959
32749
|
const format = this.format;
|
|
32960
32750
|
if (format.retainLines || format.compact) return;
|
|
32961
|
-
if (format.concise)
|
|
32962
|
-
this.space();
|
|
32963
|
-
return;
|
|
32964
|
-
}
|
|
32751
|
+
if (format.concise) return void this.space();
|
|
32965
32752
|
if (!newLine) return;
|
|
32966
32753
|
const startLine = opts.nextNodeStartLine;
|
|
32967
32754
|
const lastCommentLine = this._lastCommentLine;
|
|
32968
32755
|
if (startLine > 0 && lastCommentLine > 0) {
|
|
32969
32756
|
const offset = startLine - lastCommentLine;
|
|
32970
|
-
if (offset >= 0)
|
|
32971
|
-
this.newline(offset || 1);
|
|
32972
|
-
return;
|
|
32973
|
-
}
|
|
32757
|
+
if (offset >= 0) return void this.newline(offset || 1);
|
|
32974
32758
|
}
|
|
32975
32759
|
if (this._buf.hasContent()) this.newline(1);
|
|
32976
32760
|
}
|
|
@@ -33146,22 +32930,20 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33146
32930
|
var _originalMapping;
|
|
33147
32931
|
this._rawMappings = void 0;
|
|
33148
32932
|
let originalMapping;
|
|
33149
|
-
if (null != line) {
|
|
33150
|
-
|
|
33151
|
-
|
|
33152
|
-
|
|
33153
|
-
|
|
33154
|
-
|
|
33155
|
-
|
|
33156
|
-
|
|
33157
|
-
|
|
33158
|
-
|
|
33159
|
-
|
|
33160
|
-
|
|
33161
|
-
|
|
33162
|
-
|
|
33163
|
-
};
|
|
33164
|
-
}
|
|
32933
|
+
if (null != line) if (this._inputMap) {
|
|
32934
|
+
originalMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, {
|
|
32935
|
+
line,
|
|
32936
|
+
column
|
|
32937
|
+
});
|
|
32938
|
+
if (!originalMapping.name && identifierNamePos) {
|
|
32939
|
+
const originalIdentifierMapping = (0, _traceMapping.originalPositionFor)(this._inputMap, identifierNamePos);
|
|
32940
|
+
if (originalIdentifierMapping.name) identifierName = originalIdentifierMapping.name;
|
|
32941
|
+
}
|
|
32942
|
+
} else originalMapping = {
|
|
32943
|
+
source: (null == filename ? void 0 : filename.replace(/\\/g, "/")) || this._sourceFileName,
|
|
32944
|
+
line: line,
|
|
32945
|
+
column: column
|
|
32946
|
+
};
|
|
33165
32947
|
(0, _genMapping.maybeAddMapping)(this._map, {
|
|
33166
32948
|
name: identifierName,
|
|
33167
32949
|
generated,
|
|
@@ -33334,10 +33116,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33334
33116
|
const keys = VISITOR_KEYS[node.type];
|
|
33335
33117
|
for (const key of keys){
|
|
33336
33118
|
const child = node[key];
|
|
33337
|
-
if (
|
|
33338
|
-
|
|
33339
|
-
else yield child;
|
|
33340
|
-
}
|
|
33119
|
+
if (child) if (Array.isArray(child)) yield* child;
|
|
33120
|
+
else yield child;
|
|
33341
33121
|
}
|
|
33342
33122
|
}
|
|
33343
33123
|
},
|
|
@@ -33409,15 +33189,14 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33409
33189
|
++pos;
|
|
33410
33190
|
++curLine;
|
|
33411
33191
|
lineStart = pos;
|
|
33412
|
-
} else if (10 === ch || 13 === ch) {
|
|
33413
|
-
|
|
33414
|
-
|
|
33415
|
-
|
|
33416
|
-
|
|
33417
|
-
|
|
33418
|
-
|
|
33419
|
-
|
|
33420
|
-
} else ++pos;
|
|
33192
|
+
} else if (10 === ch || 13 === ch) if ("template" === type) {
|
|
33193
|
+
out += input.slice(chunkStart, pos) + "\n";
|
|
33194
|
+
++pos;
|
|
33195
|
+
if (13 === ch && 10 === input.charCodeAt(pos)) ++pos;
|
|
33196
|
+
++curLine;
|
|
33197
|
+
chunkStart = lineStart = pos;
|
|
33198
|
+
} else errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
33199
|
+
else ++pos;
|
|
33421
33200
|
}
|
|
33422
33201
|
return {
|
|
33423
33202
|
pos,
|
|
@@ -33491,10 +33270,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33491
33270
|
}
|
|
33492
33271
|
pos += octalStr.length - 1;
|
|
33493
33272
|
const next = input.charCodeAt(pos);
|
|
33494
|
-
if ("0" !== octalStr || 56 === next || 57 === next)
|
|
33495
|
-
|
|
33496
|
-
errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
33497
|
-
}
|
|
33273
|
+
if ("0" !== octalStr || 56 === next || 57 === next) if (inTemplate) return res(null);
|
|
33274
|
+
else errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
33498
33275
|
return res(String.fromCharCode(octal));
|
|
33499
33276
|
}
|
|
33500
33277
|
return res(String.fromCharCode(ch));
|
|
@@ -33504,10 +33281,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33504
33281
|
const initialPos = pos;
|
|
33505
33282
|
let n;
|
|
33506
33283
|
({ n, pos } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
|
|
33507
|
-
if (null === n)
|
|
33508
|
-
|
|
33509
|
-
else pos = initialPos - 1;
|
|
33510
|
-
}
|
|
33284
|
+
if (null === n) if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
|
33285
|
+
else pos = initialPos - 1;
|
|
33511
33286
|
return {
|
|
33512
33287
|
code: n,
|
|
33513
33288
|
pos
|
|
@@ -33544,17 +33319,15 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33544
33319
|
continue;
|
|
33545
33320
|
}
|
|
33546
33321
|
val = code >= 97 ? code - 97 + 10 : code >= 65 ? code - 65 + 10 : _isDigit(code) ? code - 48 : 1 / 0;
|
|
33547
|
-
if (val >= radix) {
|
|
33548
|
-
|
|
33549
|
-
|
|
33550
|
-
|
|
33551
|
-
|
|
33552
|
-
|
|
33553
|
-
|
|
33554
|
-
|
|
33555
|
-
|
|
33556
|
-
} else break;
|
|
33557
|
-
}
|
|
33322
|
+
if (val >= radix) if (val <= 9 && bailOnError) return {
|
|
33323
|
+
n: null,
|
|
33324
|
+
pos
|
|
33325
|
+
};
|
|
33326
|
+
else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
|
|
33327
|
+
else if (forceLen) {
|
|
33328
|
+
val = 0;
|
|
33329
|
+
invalid = true;
|
|
33330
|
+
} else break;
|
|
33558
33331
|
++pos;
|
|
33559
33332
|
total = total * radix + val;
|
|
33560
33333
|
}
|
|
@@ -33574,13 +33347,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
33574
33347
|
++pos;
|
|
33575
33348
|
({ code, pos } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
|
33576
33349
|
++pos;
|
|
33577
|
-
if (null !== code && code > 0x10ffff) {
|
|
33578
|
-
|
|
33579
|
-
|
|
33580
|
-
|
|
33581
|
-
|
|
33582
|
-
errors.invalidCodePoint(pos, lineStart, curLine);
|
|
33583
|
-
}
|
|
33350
|
+
if (null !== code && code > 0x10ffff) if (!throwOnInvalid) return {
|
|
33351
|
+
code: null,
|
|
33352
|
+
pos
|
|
33353
|
+
};
|
|
33354
|
+
else errors.invalidCodePoint(pos, lineStart, curLine);
|
|
33584
33355
|
} else ({ code, pos } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
33585
33356
|
return {
|
|
33586
33357
|
code,
|
|
@@ -37566,15 +37337,14 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37566
37337
|
++pos;
|
|
37567
37338
|
++curLine;
|
|
37568
37339
|
lineStart = pos;
|
|
37569
|
-
} else if (10 === ch || 13 === ch) {
|
|
37570
|
-
|
|
37571
|
-
|
|
37572
|
-
|
|
37573
|
-
|
|
37574
|
-
|
|
37575
|
-
|
|
37576
|
-
|
|
37577
|
-
} else ++pos;
|
|
37340
|
+
} else if (10 === ch || 13 === ch) if ("template" === type) {
|
|
37341
|
+
out += input.slice(chunkStart, pos) + "\n";
|
|
37342
|
+
++pos;
|
|
37343
|
+
if (13 === ch && 10 === input.charCodeAt(pos)) ++pos;
|
|
37344
|
+
++curLine;
|
|
37345
|
+
chunkStart = lineStart = pos;
|
|
37346
|
+
} else errors.unterminated(initialPos, initialLineStart, initialCurLine);
|
|
37347
|
+
else ++pos;
|
|
37578
37348
|
}
|
|
37579
37349
|
return {
|
|
37580
37350
|
pos,
|
|
@@ -37648,10 +37418,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37648
37418
|
}
|
|
37649
37419
|
pos += octalStr.length - 1;
|
|
37650
37420
|
const next = input.charCodeAt(pos);
|
|
37651
|
-
if ("0" !== octalStr || 56 === next || 57 === next)
|
|
37652
|
-
|
|
37653
|
-
errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
37654
|
-
}
|
|
37421
|
+
if ("0" !== octalStr || 56 === next || 57 === next) if (inTemplate) return res(null);
|
|
37422
|
+
else errors.strictNumericEscape(startPos, lineStart, curLine);
|
|
37655
37423
|
return res(String.fromCharCode(octal));
|
|
37656
37424
|
}
|
|
37657
37425
|
return res(String.fromCharCode(ch));
|
|
@@ -37661,10 +37429,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37661
37429
|
const initialPos = pos;
|
|
37662
37430
|
let n;
|
|
37663
37431
|
({ n, pos } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
|
|
37664
|
-
if (null === n)
|
|
37665
|
-
|
|
37666
|
-
else pos = initialPos - 1;
|
|
37667
|
-
}
|
|
37432
|
+
if (null === n) if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
|
|
37433
|
+
else pos = initialPos - 1;
|
|
37668
37434
|
return {
|
|
37669
37435
|
code: n,
|
|
37670
37436
|
pos
|
|
@@ -37701,17 +37467,15 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37701
37467
|
continue;
|
|
37702
37468
|
}
|
|
37703
37469
|
val = code >= 97 ? code - 97 + 10 : code >= 65 ? code - 65 + 10 : _isDigit(code) ? code - 48 : 1 / 0;
|
|
37704
|
-
if (val >= radix) {
|
|
37705
|
-
|
|
37706
|
-
|
|
37707
|
-
|
|
37708
|
-
|
|
37709
|
-
|
|
37710
|
-
|
|
37711
|
-
|
|
37712
|
-
|
|
37713
|
-
} else break;
|
|
37714
|
-
}
|
|
37470
|
+
if (val >= radix) if (val <= 9 && bailOnError) return {
|
|
37471
|
+
n: null,
|
|
37472
|
+
pos
|
|
37473
|
+
};
|
|
37474
|
+
else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
|
|
37475
|
+
else if (forceLen) {
|
|
37476
|
+
val = 0;
|
|
37477
|
+
invalid = true;
|
|
37478
|
+
} else break;
|
|
37715
37479
|
++pos;
|
|
37716
37480
|
total = total * radix + val;
|
|
37717
37481
|
}
|
|
@@ -37731,13 +37495,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37731
37495
|
++pos;
|
|
37732
37496
|
({ code, pos } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
|
|
37733
37497
|
++pos;
|
|
37734
|
-
if (null !== code && code > 0x10ffff) {
|
|
37735
|
-
|
|
37736
|
-
|
|
37737
|
-
|
|
37738
|
-
|
|
37739
|
-
errors.invalidCodePoint(pos, lineStart, curLine);
|
|
37740
|
-
}
|
|
37498
|
+
if (null !== code && code > 0x10ffff) if (!throwOnInvalid) return {
|
|
37499
|
+
code: null,
|
|
37500
|
+
pos
|
|
37501
|
+
};
|
|
37502
|
+
else errors.invalidCodePoint(pos, lineStart, curLine);
|
|
37741
37503
|
} else ({ code, pos } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
|
|
37742
37504
|
return {
|
|
37743
37505
|
code,
|
|
@@ -37898,10 +37660,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
37898
37660
|
this.skipSpace();
|
|
37899
37661
|
this.state.start = this.state.pos;
|
|
37900
37662
|
if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
|
|
37901
|
-
if (this.state.pos >= this.length)
|
|
37902
|
-
this.finishToken(140);
|
|
37903
|
-
return;
|
|
37904
|
-
}
|
|
37663
|
+
if (this.state.pos >= this.length) return void this.finishToken(140);
|
|
37905
37664
|
this.getTokenFromCode(this.codePointAtPos(this.state.pos));
|
|
37906
37665
|
}
|
|
37907
37666
|
skipBlockComment(commentEnd) {
|
|
@@ -38059,10 +37818,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38059
37818
|
}
|
|
38060
37819
|
readToken_dot() {
|
|
38061
37820
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38062
|
-
if (next >= 48 && next <= 57)
|
|
38063
|
-
this.readNumber(true);
|
|
38064
|
-
return;
|
|
38065
|
-
}
|
|
37821
|
+
if (next >= 48 && next <= 57) return void this.readNumber(true);
|
|
38066
37822
|
if (46 === next && 46 === this.input.charCodeAt(this.state.pos + 2)) {
|
|
38067
37823
|
this.state.pos += 3;
|
|
38068
37824
|
this.finishToken(21);
|
|
@@ -38110,10 +37866,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38110
37866
|
return;
|
|
38111
37867
|
}
|
|
38112
37868
|
if (124 === code) {
|
|
38113
|
-
if (62 === next)
|
|
38114
|
-
this.finishOp(39, 2);
|
|
38115
|
-
return;
|
|
38116
|
-
}
|
|
37869
|
+
if (62 === next) return void this.finishOp(39, 2);
|
|
38117
37870
|
if (this.hasPlugin("recordAndTuple") && 125 === next) {
|
|
38118
37871
|
if ("bar" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
|
|
38119
37872
|
this.state.pos += 2;
|
|
@@ -38127,27 +37880,23 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38127
37880
|
return;
|
|
38128
37881
|
}
|
|
38129
37882
|
}
|
|
38130
|
-
if (61 === next)
|
|
38131
|
-
this.finishOp(30, 2);
|
|
38132
|
-
return;
|
|
38133
|
-
}
|
|
37883
|
+
if (61 === next) return void this.finishOp(30, 2);
|
|
38134
37884
|
this.finishOp(124 === code ? 43 : 45, 1);
|
|
38135
37885
|
}
|
|
38136
37886
|
readToken_caret() {
|
|
38137
37887
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38138
|
-
if (61 !== next || this.state.inType)
|
|
38139
|
-
|
|
38140
|
-
|
|
38141
|
-
|
|
38142
|
-
|
|
38143
|
-
|
|
38144
|
-
|
|
38145
|
-
|
|
38146
|
-
|
|
38147
|
-
|
|
38148
|
-
|
|
38149
|
-
|
|
38150
|
-
} else this.finishOp(32, 2);
|
|
37888
|
+
if (61 !== next || this.state.inType) if (94 === next && this.hasPlugin([
|
|
37889
|
+
"pipelineOperator",
|
|
37890
|
+
{
|
|
37891
|
+
proposal: "hack",
|
|
37892
|
+
topicToken: "^^"
|
|
37893
|
+
}
|
|
37894
|
+
])) {
|
|
37895
|
+
this.finishOp(37, 2);
|
|
37896
|
+
const lookaheadCh = this.input.codePointAt(this.state.pos);
|
|
37897
|
+
if (94 === lookaheadCh) this.unexpected();
|
|
37898
|
+
} else this.finishOp(44, 1);
|
|
37899
|
+
else this.finishOp(32, 2);
|
|
38151
37900
|
}
|
|
38152
37901
|
readToken_atSign() {
|
|
38153
37902
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
@@ -38162,10 +37911,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38162
37911
|
}
|
|
38163
37912
|
readToken_plus_min(code) {
|
|
38164
37913
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38165
|
-
if (next === code)
|
|
38166
|
-
this.finishOp(34, 2);
|
|
38167
|
-
return;
|
|
38168
|
-
}
|
|
37914
|
+
if (next === code) return void this.finishOp(34, 2);
|
|
38169
37915
|
if (61 === next) this.finishOp(30, 2);
|
|
38170
37916
|
else this.finishOp(53, 1);
|
|
38171
37917
|
}
|
|
@@ -38173,17 +37919,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38173
37919
|
const { pos } = this.state;
|
|
38174
37920
|
const next = this.input.charCodeAt(pos + 1);
|
|
38175
37921
|
if (60 === next) {
|
|
38176
|
-
if (61 === this.input.charCodeAt(pos + 2))
|
|
38177
|
-
this.finishOp(30, 3);
|
|
38178
|
-
return;
|
|
38179
|
-
}
|
|
37922
|
+
if (61 === this.input.charCodeAt(pos + 2)) return void this.finishOp(30, 3);
|
|
38180
37923
|
this.finishOp(51, 2);
|
|
38181
37924
|
return;
|
|
38182
37925
|
}
|
|
38183
|
-
if (61 === next)
|
|
38184
|
-
this.finishOp(49, 2);
|
|
38185
|
-
return;
|
|
38186
|
-
}
|
|
37926
|
+
if (61 === next) return void this.finishOp(49, 2);
|
|
38187
37927
|
this.finishOp(47, 1);
|
|
38188
37928
|
}
|
|
38189
37929
|
readToken_gt() {
|
|
@@ -38191,25 +37931,16 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38191
37931
|
const next = this.input.charCodeAt(pos + 1);
|
|
38192
37932
|
if (62 === next) {
|
|
38193
37933
|
const size = 62 === this.input.charCodeAt(pos + 2) ? 3 : 2;
|
|
38194
|
-
if (61 === this.input.charCodeAt(pos + size))
|
|
38195
|
-
this.finishOp(30, size + 1);
|
|
38196
|
-
return;
|
|
38197
|
-
}
|
|
37934
|
+
if (61 === this.input.charCodeAt(pos + size)) return void this.finishOp(30, size + 1);
|
|
38198
37935
|
this.finishOp(52, size);
|
|
38199
37936
|
return;
|
|
38200
37937
|
}
|
|
38201
|
-
if (61 === next)
|
|
38202
|
-
this.finishOp(49, 2);
|
|
38203
|
-
return;
|
|
38204
|
-
}
|
|
37938
|
+
if (61 === next) return void this.finishOp(49, 2);
|
|
38205
37939
|
this.finishOp(48, 1);
|
|
38206
37940
|
}
|
|
38207
37941
|
readToken_eq_excl(code) {
|
|
38208
37942
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38209
|
-
if (61 === next)
|
|
38210
|
-
this.finishOp(46, 61 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2);
|
|
38211
|
-
return;
|
|
38212
|
-
}
|
|
37943
|
+
if (61 === next) return void this.finishOp(46, 61 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2);
|
|
38213
37944
|
if (61 === code && 62 === next) {
|
|
38214
37945
|
this.state.pos += 2;
|
|
38215
37946
|
this.finishToken(19);
|
|
@@ -38220,10 +37951,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38220
37951
|
readToken_question() {
|
|
38221
37952
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38222
37953
|
const next2 = this.input.charCodeAt(this.state.pos + 2);
|
|
38223
|
-
if (63 === next)
|
|
38224
|
-
|
|
38225
|
-
|
|
38226
|
-
} else if (46 !== next || next2 >= 48 && next2 <= 57) {
|
|
37954
|
+
if (63 === next) if (61 === next2) this.finishOp(30, 3);
|
|
37955
|
+
else this.finishOp(40, 2);
|
|
37956
|
+
else if (46 !== next || next2 >= 48 && next2 <= 57) {
|
|
38227
37957
|
++this.state.pos;
|
|
38228
37958
|
this.finishToken(17);
|
|
38229
37959
|
} else {
|
|
@@ -38296,18 +38026,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38296
38026
|
case 48:
|
|
38297
38027
|
{
|
|
38298
38028
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
38299
|
-
if (120 === next || 88 === next)
|
|
38300
|
-
|
|
38301
|
-
|
|
38302
|
-
}
|
|
38303
|
-
if (111 === next || 79 === next) {
|
|
38304
|
-
this.readRadixNumber(8);
|
|
38305
|
-
return;
|
|
38306
|
-
}
|
|
38307
|
-
if (98 === next || 66 === next) {
|
|
38308
|
-
this.readRadixNumber(2);
|
|
38309
|
-
return;
|
|
38310
|
-
}
|
|
38029
|
+
if (120 === next || 88 === next) return void this.readRadixNumber(16);
|
|
38030
|
+
if (111 === next || 79 === next) return void this.readRadixNumber(8);
|
|
38031
|
+
if (98 === next || 66 === next) return void this.readRadixNumber(2);
|
|
38311
38032
|
}
|
|
38312
38033
|
case 49:
|
|
38313
38034
|
case 50:
|
|
@@ -38365,10 +38086,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38365
38086
|
this.readWord();
|
|
38366
38087
|
return;
|
|
38367
38088
|
default:
|
|
38368
|
-
if (isIdentifierStart(code))
|
|
38369
|
-
this.readWord(code);
|
|
38370
|
-
return;
|
|
38371
|
-
}
|
|
38089
|
+
if (isIdentifierStart(code)) return void this.readWord(code);
|
|
38372
38090
|
}
|
|
38373
38091
|
throw this.raise(Errors.InvalidOrUnexpectedToken, this.state.curPosition(), {
|
|
38374
38092
|
unexpected: String.fromCodePoint(code)
|
|
@@ -38494,14 +38212,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
38494
38212
|
}
|
|
38495
38213
|
if (isIdentifierStart(this.codePointAtPos(this.state.pos))) throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
|
|
38496
38214
|
const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
|
|
38497
|
-
if (isBigInt)
|
|
38498
|
-
|
|
38499
|
-
return;
|
|
38500
|
-
}
|
|
38501
|
-
if (isDecimal) {
|
|
38502
|
-
this.finishToken(137, str);
|
|
38503
|
-
return;
|
|
38504
|
-
}
|
|
38215
|
+
if (isBigInt) return void this.finishToken(136, str);
|
|
38216
|
+
if (isDecimal) return void this.finishToken(137, str);
|
|
38505
38217
|
const val = isOctal ? parseInt(str, 8) : parseFloat(str);
|
|
38506
38218
|
this.finishToken(135, val);
|
|
38507
38219
|
}
|
|
@@ -39202,11 +38914,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
39202
38914
|
addComment(comment) {
|
|
39203
38915
|
if (void 0 === this.flowPragma) {
|
|
39204
38916
|
const matches = FLOW_PRAGMA_REGEX.exec(comment.value);
|
|
39205
|
-
if (matches)
|
|
39206
|
-
|
|
39207
|
-
|
|
39208
|
-
else throw new Error("Unexpected flow pragma");
|
|
39209
|
-
}
|
|
38917
|
+
if (matches) if ("flow" === matches[1]) this.flowPragma = "flow";
|
|
38918
|
+
else if ("noflow" === matches[1]) this.flowPragma = "noflow";
|
|
38919
|
+
else throw new Error("Unexpected flow pragma");
|
|
39210
38920
|
}
|
|
39211
38921
|
super.addComment(comment);
|
|
39212
38922
|
}
|
|
@@ -39278,8 +38988,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
39278
38988
|
if (this.match(80)) return this.flowParseDeclareClass(node);
|
|
39279
38989
|
if (this.match(68)) return this.flowParseDeclareFunction(node);
|
|
39280
38990
|
if (this.match(74)) return this.flowParseDeclareVariable(node);
|
|
39281
|
-
if (this.eatContextual(127))
|
|
39282
|
-
|
|
38991
|
+
if (this.eatContextual(127)) if (this.match(16)) return this.flowParseDeclareModuleExports(node);
|
|
38992
|
+
else {
|
|
39283
38993
|
if (insideModule) this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc);
|
|
39284
38994
|
return this.flowParseDeclareModule(node);
|
|
39285
38995
|
}
|
|
@@ -39902,12 +39612,10 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
39902
39612
|
{
|
|
39903
39613
|
const node = this.startNode();
|
|
39904
39614
|
this.next();
|
|
39905
|
-
if (!this.match(11) && !this.match(21)) {
|
|
39906
|
-
|
|
39907
|
-
|
|
39908
|
-
|
|
39909
|
-
} else isGroupedType = true;
|
|
39910
|
-
}
|
|
39615
|
+
if (!this.match(11) && !this.match(21)) if (tokenIsIdentifier(this.state.type) || this.match(78)) {
|
|
39616
|
+
const token = this.lookahead().type;
|
|
39617
|
+
isGroupedType = 17 !== token && 14 !== token;
|
|
39618
|
+
} else isGroupedType = true;
|
|
39911
39619
|
if (isGroupedType) {
|
|
39912
39620
|
this.state.noAnonFunctionType = false;
|
|
39913
39621
|
type = this.flowParseType();
|
|
@@ -40088,10 +39796,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
40088
39796
|
return variance;
|
|
40089
39797
|
}
|
|
40090
39798
|
parseFunctionBody(node, allowExpressionBody, isMethod = false) {
|
|
40091
|
-
if (allowExpressionBody)
|
|
40092
|
-
this.forwardNoArrowParamsConversionAt(node, ()=>super.parseFunctionBody(node, true, isMethod));
|
|
40093
|
-
return;
|
|
40094
|
-
}
|
|
39799
|
+
if (allowExpressionBody) return void this.forwardNoArrowParamsConversionAt(node, ()=>super.parseFunctionBody(node, true, isMethod));
|
|
40095
39800
|
super.parseFunctionBody(node, false, isMethod);
|
|
40096
39801
|
}
|
|
40097
39802
|
parseFunctionBodyAndFinish(node, type, isMethod = false) {
|
|
@@ -40125,8 +39830,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
40125
39830
|
if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) return this.flowParseDeclare(node);
|
|
40126
39831
|
} else if (tokenIsIdentifier(this.state.type)) {
|
|
40127
39832
|
if ("interface" === expr.name) return this.flowParseInterface(node);
|
|
40128
|
-
if ("type" === expr.name) return this.flowParseTypeAlias(node);
|
|
40129
|
-
if ("opaque" === expr.name) return this.flowParseOpaqueType(node, false);
|
|
39833
|
+
else if ("type" === expr.name) return this.flowParseTypeAlias(node);
|
|
39834
|
+
else if ("opaque" === expr.name) return this.flowParseOpaqueType(node, false);
|
|
40130
39835
|
}
|
|
40131
39836
|
}
|
|
40132
39837
|
return super.parseExpressionStatement(node, expr, decorators);
|
|
@@ -40337,10 +40042,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
40337
40042
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
40338
40043
|
if (123 === code && 124 === next) this.finishOp(6, 2);
|
|
40339
40044
|
else if (this.state.inType && (62 === code || 60 === code)) this.finishOp(62 === code ? 48 : 47, 1);
|
|
40340
|
-
else if (this.state.inType && 63 === code)
|
|
40341
|
-
|
|
40342
|
-
|
|
40343
|
-
} else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) {
|
|
40045
|
+
else if (this.state.inType && 63 === code) if (46 === next) this.finishOp(18, 2);
|
|
40046
|
+
else this.finishOp(17, 1);
|
|
40047
|
+
else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) {
|
|
40344
40048
|
this.state.pos += 2;
|
|
40345
40049
|
this.readIterator();
|
|
40346
40050
|
} else super.getTokenFromCode(code);
|
|
@@ -40737,10 +40441,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
40737
40441
|
}
|
|
40738
40442
|
readToken_pipe_amp(code) {
|
|
40739
40443
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
|
40740
|
-
if (124 === code && 125 === next)
|
|
40741
|
-
this.finishOp(9, 2);
|
|
40742
|
-
return;
|
|
40743
|
-
}
|
|
40444
|
+
if (124 === code && 125 === next) return void this.finishOp(9, 2);
|
|
40744
40445
|
super.readToken_pipe_amp(code);
|
|
40745
40446
|
}
|
|
40746
40447
|
parseTopLevel(file, program) {
|
|
@@ -41007,22 +40708,21 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
41007
40708
|
const strsLen = members.stringMembers.length;
|
|
41008
40709
|
const defaultedLen = members.defaultedMembers.length;
|
|
41009
40710
|
if (!boolsLen && !numsLen && !strsLen && !defaultedLen) return empty();
|
|
41010
|
-
if (boolsLen || numsLen) {
|
|
41011
|
-
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
|
|
41019
|
-
|
|
41020
|
-
|
|
41021
|
-
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
|
|
41025
|
-
}
|
|
40711
|
+
if (boolsLen || numsLen) if (numsLen || strsLen || !(boolsLen >= defaultedLen)) if (boolsLen || strsLen || !(numsLen >= defaultedLen)) {
|
|
40712
|
+
this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, {
|
|
40713
|
+
enumName
|
|
40714
|
+
});
|
|
40715
|
+
return empty();
|
|
40716
|
+
} else {
|
|
40717
|
+
for (const member of members.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, {
|
|
40718
|
+
enumName,
|
|
40719
|
+
memberName: member.id.name
|
|
40720
|
+
});
|
|
40721
|
+
node.members = members.numberMembers;
|
|
40722
|
+
this.expect(8);
|
|
40723
|
+
return this.finishNode(node, "EnumNumberBody");
|
|
40724
|
+
}
|
|
40725
|
+
else {
|
|
41026
40726
|
for (const member of members.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, {
|
|
41027
40727
|
enumName,
|
|
41028
40728
|
memberName: member.id.name
|
|
@@ -41639,24 +41339,15 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
41639
41339
|
}
|
|
41640
41340
|
getTokenFromCode(code) {
|
|
41641
41341
|
const context = this.curContext();
|
|
41642
|
-
if (context === types.j_expr)
|
|
41643
|
-
this.jsxReadToken();
|
|
41644
|
-
return;
|
|
41645
|
-
}
|
|
41342
|
+
if (context === types.j_expr) return void this.jsxReadToken();
|
|
41646
41343
|
if (context === types.j_oTag || context === types.j_cTag) {
|
|
41647
|
-
if (isIdentifierStart(code))
|
|
41648
|
-
this.jsxReadWord();
|
|
41649
|
-
return;
|
|
41650
|
-
}
|
|
41344
|
+
if (isIdentifierStart(code)) return void this.jsxReadWord();
|
|
41651
41345
|
if (62 === code) {
|
|
41652
41346
|
++this.state.pos;
|
|
41653
41347
|
this.finishToken(144);
|
|
41654
41348
|
return;
|
|
41655
41349
|
}
|
|
41656
|
-
if ((34 === code || 39 === code) && context === types.j_oTag)
|
|
41657
|
-
this.jsxReadString(code);
|
|
41658
|
-
return;
|
|
41659
|
-
}
|
|
41350
|
+
if ((34 === code || 39 === code) && context === types.j_oTag) return void this.jsxReadString(code);
|
|
41660
41351
|
}
|
|
41661
41352
|
if (60 === code && this.state.canStartJSXElement && 33 !== this.input.charCodeAt(this.state.pos + 1)) {
|
|
41662
41353
|
++this.state.pos;
|
|
@@ -41753,10 +41444,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
41753
41444
|
}
|
|
41754
41445
|
return true;
|
|
41755
41446
|
}
|
|
41756
|
-
if (128 & bindingType && (8 & type) > 0)
|
|
41757
|
-
|
|
41758
|
-
return false;
|
|
41759
|
-
}
|
|
41447
|
+
if (128 & bindingType && (8 & type) > 0) if (2 & scope.names.get(name)) return !!(1 & bindingType);
|
|
41448
|
+
else return false;
|
|
41760
41449
|
if (2 & bindingType && (1 & type) > 0) return true;
|
|
41761
41450
|
return super.isRedeclaredInScope(scope, name, bindingType);
|
|
41762
41451
|
}
|
|
@@ -41839,7 +41528,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
41839
41528
|
const end = exprList.length - 1;
|
|
41840
41529
|
for(let i = 0; i <= end; i++){
|
|
41841
41530
|
const elt = exprList[i];
|
|
41842
|
-
if (
|
|
41531
|
+
if (elt) {
|
|
41843
41532
|
if ("SpreadElement" === elt.type) {
|
|
41844
41533
|
elt.type = "RestElement";
|
|
41845
41534
|
const arg = elt.argument;
|
|
@@ -42018,10 +41707,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
42018
41707
|
if ("Identifier" === type) {
|
|
42019
41708
|
this.checkIdentifier(expression, binding, strictModeChanged);
|
|
42020
41709
|
const { name } = expression;
|
|
42021
|
-
if (checkClashes)
|
|
42022
|
-
|
|
42023
|
-
else checkClashes.add(name);
|
|
42024
|
-
}
|
|
41710
|
+
if (checkClashes) if (checkClashes.has(name)) this.raise(Errors.ParamDupe, expression);
|
|
41711
|
+
else checkClashes.add(name);
|
|
42025
41712
|
return;
|
|
42026
41713
|
}
|
|
42027
41714
|
const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || null != (_expression$extra = expression.extra) && _expression$extra.parenthesized) && "AssignmentExpression" === ancestor.type, binding);
|
|
@@ -42047,14 +41734,12 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
42047
41734
|
} else if (val) this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
42048
41735
|
}
|
|
42049
41736
|
checkIdentifier(at, bindingType, strictModeChanged = false) {
|
|
42050
|
-
if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) {
|
|
42051
|
-
|
|
42052
|
-
|
|
42053
|
-
|
|
42054
|
-
|
|
42055
|
-
|
|
42056
|
-
});
|
|
42057
|
-
}
|
|
41737
|
+
if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) if (64 === bindingType) this.raise(Errors.StrictEvalArguments, at, {
|
|
41738
|
+
referenceName: at.name
|
|
41739
|
+
});
|
|
41740
|
+
else this.raise(Errors.StrictEvalArgumentsBinding, at, {
|
|
41741
|
+
bindingName: at.name
|
|
41742
|
+
});
|
|
42058
41743
|
if (8192 & bindingType && "let" === at.name) this.raise(Errors.LetInLexicalBinding, at);
|
|
42059
41744
|
if (!(64 & bindingType)) this.declareNameFromIdentifier(at, bindingType);
|
|
42060
41745
|
}
|
|
@@ -42282,17 +41967,16 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
42282
41967
|
const { startLoc } = this.state;
|
|
42283
41968
|
const modifier = this.tsParseModifier(allowedModifiers.concat(null != disallowedModifiers ? disallowedModifiers : []), stopOnStartOfClassStaticBlock);
|
|
42284
41969
|
if (!modifier) break;
|
|
42285
|
-
if (tsIsAccessModifier(modifier)) {
|
|
42286
|
-
|
|
42287
|
-
|
|
42288
|
-
|
|
42289
|
-
|
|
42290
|
-
|
|
42291
|
-
|
|
42292
|
-
|
|
42293
|
-
|
|
42294
|
-
|
|
42295
|
-
} else if (tsIsVarianceAnnotations(modifier)) {
|
|
41970
|
+
if (tsIsAccessModifier(modifier)) if (modified.accessibility) this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, {
|
|
41971
|
+
modifier
|
|
41972
|
+
});
|
|
41973
|
+
else {
|
|
41974
|
+
enforceOrder(startLoc, modifier, modifier, "override");
|
|
41975
|
+
enforceOrder(startLoc, modifier, modifier, "static");
|
|
41976
|
+
enforceOrder(startLoc, modifier, modifier, "readonly");
|
|
41977
|
+
modified.accessibility = modifier;
|
|
41978
|
+
}
|
|
41979
|
+
else if (tsIsVarianceAnnotations(modifier)) {
|
|
42296
41980
|
if (modified[modifier]) this.raise(TSErrors.DuplicateModifier, startLoc, {
|
|
42297
41981
|
modifier
|
|
42298
41982
|
});
|
|
@@ -42359,10 +42043,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
42359
42043
|
return result;
|
|
42360
42044
|
}
|
|
42361
42045
|
tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) {
|
|
42362
|
-
if (!skipFirstToken)
|
|
42363
|
-
|
|
42364
|
-
else this.expect(47);
|
|
42365
|
-
}
|
|
42046
|
+
if (!skipFirstToken) if (bracket) this.expect(0);
|
|
42047
|
+
else this.expect(47);
|
|
42366
42048
|
const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos);
|
|
42367
42049
|
if (bracket) this.expect(3);
|
|
42368
42050
|
else this.expect(48);
|
|
@@ -42388,14 +42070,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
42388
42070
|
}
|
|
42389
42071
|
tsParseEntityName(flags) {
|
|
42390
42072
|
let entity;
|
|
42391
|
-
if (1 & flags && this.match(78))
|
|
42392
|
-
|
|
42393
|
-
|
|
42394
|
-
|
|
42395
|
-
|
|
42396
|
-
|
|
42397
|
-
|
|
42398
|
-
} else entity = this.parseIdentifier(!!(1 & flags));
|
|
42073
|
+
if (1 & flags && this.match(78)) if (2 & flags) entity = this.parseIdentifier(true);
|
|
42074
|
+
else {
|
|
42075
|
+
const node = this.startNode();
|
|
42076
|
+
this.next();
|
|
42077
|
+
entity = this.finishNode(node, "ThisExpression");
|
|
42078
|
+
}
|
|
42079
|
+
else entity = this.parseIdentifier(!!(1 & flags));
|
|
42399
42080
|
while(this.eat(16)){
|
|
42400
42081
|
const node = this.startNodeAtNode(entity);
|
|
42401
42082
|
node.left = entity;
|
|
@@ -43308,7 +42989,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
43308
42989
|
case "module":
|
|
43309
42990
|
if (this.tsCheckLineTerminator(next)) {
|
|
43310
42991
|
if (this.match(134)) return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
43311
|
-
if (tokenIsIdentifier(this.state.type)) {
|
|
42992
|
+
else if (tokenIsIdentifier(this.state.type)) {
|
|
43312
42993
|
node.kind = "module";
|
|
43313
42994
|
return this.tsParseModuleOrNamespaceDeclaration(node);
|
|
43314
42995
|
}
|
|
@@ -43616,7 +43297,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
43616
43297
|
const { isAmbientContext } = this.state;
|
|
43617
43298
|
const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext);
|
|
43618
43299
|
if (!isAmbientContext) return declaration;
|
|
43619
|
-
for (const { id, init } of declaration.declarations)if (
|
|
43300
|
+
for (const { id, init } of declaration.declarations)if (init) {
|
|
43620
43301
|
if ("const" !== kind || id.typeAnnotation) this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init);
|
|
43621
43302
|
else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init);
|
|
43622
43303
|
}
|
|
@@ -44030,14 +43711,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
44030
43711
|
}
|
|
44031
43712
|
getTokenFromCode(code) {
|
|
44032
43713
|
if (this.state.inType) {
|
|
44033
|
-
if (62 === code)
|
|
44034
|
-
|
|
44035
|
-
return;
|
|
44036
|
-
}
|
|
44037
|
-
if (60 === code) {
|
|
44038
|
-
this.finishOp(47, 1);
|
|
44039
|
-
return;
|
|
44040
|
-
}
|
|
43714
|
+
if (62 === code) return void this.finishOp(48, 1);
|
|
43715
|
+
if (60 === code) return void this.finishOp(47, 1);
|
|
44041
43716
|
}
|
|
44042
43717
|
super.getTokenFromCode(code);
|
|
44043
43718
|
}
|
|
@@ -44346,14 +44021,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
44346
44021
|
this.next();
|
|
44347
44022
|
const oldStrict = this.state.strict;
|
|
44348
44023
|
const placeholder = this.parsePlaceholder("Identifier");
|
|
44349
|
-
if (placeholder)
|
|
44350
|
-
|
|
44351
|
-
|
|
44352
|
-
|
|
44353
|
-
|
|
44354
|
-
|
|
44355
|
-
|
|
44356
|
-
} else this.parseClassId(node, isStatement, optionalId);
|
|
44024
|
+
if (placeholder) if (this.match(81) || this.match(133) || this.match(5)) node.id = placeholder;
|
|
44025
|
+
else if (optionalId || !isStatement) {
|
|
44026
|
+
node.id = null;
|
|
44027
|
+
node.body = this.finishPlaceholder(placeholder, "ClassBody");
|
|
44028
|
+
return this.finishNode(node, type);
|
|
44029
|
+
} else throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc);
|
|
44030
|
+
else this.parseClassId(node, isStatement, optionalId);
|
|
44357
44031
|
super.parseClassSuper(node);
|
|
44358
44032
|
node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict);
|
|
44359
44033
|
return this.finishNode(node, type);
|
|
@@ -44532,15 +44206,10 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
44532
44206
|
const key = prop.key;
|
|
44533
44207
|
const name = "Identifier" === key.type ? key.name : key.value;
|
|
44534
44208
|
if ("__proto__" === name) {
|
|
44535
|
-
if (isRecord)
|
|
44536
|
-
|
|
44537
|
-
|
|
44538
|
-
}
|
|
44539
|
-
if (protoRef.used) {
|
|
44540
|
-
if (refExpressionErrors) {
|
|
44541
|
-
if (null === refExpressionErrors.doubleProtoLoc) refExpressionErrors.doubleProtoLoc = key.loc.start;
|
|
44542
|
-
} else this.raise(Errors.DuplicateProto, key);
|
|
44543
|
-
}
|
|
44209
|
+
if (isRecord) return void this.raise(Errors.RecordNoProto, key);
|
|
44210
|
+
if (protoRef.used) if (refExpressionErrors) {
|
|
44211
|
+
if (null === refExpressionErrors.doubleProtoLoc) refExpressionErrors.doubleProtoLoc = key.loc.start;
|
|
44212
|
+
} else this.raise(Errors.DuplicateProto, key);
|
|
44544
44213
|
protoRef.used = true;
|
|
44545
44214
|
}
|
|
44546
44215
|
}
|
|
@@ -44958,10 +44627,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
44958
44627
|
node = this.startNode();
|
|
44959
44628
|
this.next();
|
|
44960
44629
|
if (this.match(16)) return this.parseImportMetaProperty(node);
|
|
44961
|
-
if (this.match(10))
|
|
44962
|
-
|
|
44963
|
-
return this.finishNode(node, "Import");
|
|
44964
|
-
}
|
|
44630
|
+
if (this.match(10)) if (256 & this.optionFlags) return this.parseImportCall(node);
|
|
44631
|
+
else return this.finishNode(node, "Import");
|
|
44965
44632
|
this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc);
|
|
44966
44633
|
return this.finishNode(node, "Import");
|
|
44967
44634
|
case 78:
|
|
@@ -45067,10 +44734,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
45067
44734
|
this.next();
|
|
45068
44735
|
return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
|
|
45069
44736
|
}
|
|
45070
|
-
if (tokenIsIdentifier(type))
|
|
45071
|
-
|
|
45072
|
-
return id;
|
|
45073
|
-
}
|
|
44737
|
+
if (tokenIsIdentifier(type)) if (61 === this.lookaheadCharCode()) return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
|
|
44738
|
+
else return id;
|
|
45074
44739
|
if (90 === type) {
|
|
45075
44740
|
this.resetPreviousNodeTrailingComments(id);
|
|
45076
44741
|
return this.parseDo(this.startNodeAtNode(id), true);
|
|
@@ -45107,12 +44772,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
45107
44772
|
return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);
|
|
45108
44773
|
}
|
|
45109
44774
|
finishTopicReference(node, startLoc, pipeProposal, tokenType) {
|
|
45110
|
-
if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
|
|
45111
|
-
if (
|
|
45112
|
-
|
|
45113
|
-
|
|
45114
|
-
|
|
45115
|
-
}
|
|
44775
|
+
if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) if ("hack" === pipeProposal) {
|
|
44776
|
+
if (!this.topicReferenceIsAllowedInCurrentContext()) this.raise(Errors.PipeTopicUnbound, startLoc);
|
|
44777
|
+
this.registerTopicReference();
|
|
44778
|
+
return this.finishNode(node, "TopicReference");
|
|
44779
|
+
} else {
|
|
45116
44780
|
if (!this.topicReferenceIsAllowedInCurrentContext()) this.raise(Errors.PrimaryTopicNotAllowed, startLoc);
|
|
45117
44781
|
this.registerTopicReference();
|
|
45118
44782
|
return this.finishNode(node, "PipelinePrimaryTopicReference");
|
|
@@ -45734,39 +45398,21 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
45734
45398
|
checkReservedWord(word, startLoc, checkKeywords, isBinding) {
|
|
45735
45399
|
if (word.length > 10) return;
|
|
45736
45400
|
if (!canBeReservedWord(word)) return;
|
|
45737
|
-
if (checkKeywords && isKeyword(word)) {
|
|
45738
|
-
|
|
45739
|
-
|
|
45740
|
-
});
|
|
45741
|
-
return;
|
|
45742
|
-
}
|
|
45401
|
+
if (checkKeywords && isKeyword(word)) return void this.raise(Errors.UnexpectedKeyword, startLoc, {
|
|
45402
|
+
keyword: word
|
|
45403
|
+
});
|
|
45743
45404
|
const reservedTest = this.state.strict ? isBinding ? isStrictBindReservedWord : isStrictReservedWord : isReservedWord;
|
|
45744
|
-
if (reservedTest(word, this.inModule)) {
|
|
45745
|
-
|
|
45746
|
-
|
|
45747
|
-
});
|
|
45748
|
-
return;
|
|
45749
|
-
}
|
|
45405
|
+
if (reservedTest(word, this.inModule)) return void this.raise(Errors.UnexpectedReservedWord, startLoc, {
|
|
45406
|
+
reservedWord: word
|
|
45407
|
+
});
|
|
45750
45408
|
if ("yield" === word) {
|
|
45751
|
-
if (this.prodParam.hasYield)
|
|
45752
|
-
this.raise(Errors.YieldBindingIdentifier, startLoc);
|
|
45753
|
-
return;
|
|
45754
|
-
}
|
|
45409
|
+
if (this.prodParam.hasYield) return void this.raise(Errors.YieldBindingIdentifier, startLoc);
|
|
45755
45410
|
} else if ("await" === word) {
|
|
45756
|
-
if (this.prodParam.hasAwait)
|
|
45757
|
-
|
|
45758
|
-
return;
|
|
45759
|
-
}
|
|
45760
|
-
if (this.scope.inStaticBlock) {
|
|
45761
|
-
this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc);
|
|
45762
|
-
return;
|
|
45763
|
-
}
|
|
45411
|
+
if (this.prodParam.hasAwait) return void this.raise(Errors.AwaitBindingIdentifier, startLoc);
|
|
45412
|
+
if (this.scope.inStaticBlock) return void this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc);
|
|
45764
45413
|
this.expressionScope.recordAsyncArrowParametersError(startLoc);
|
|
45765
45414
|
} else if ("arguments" === word) {
|
|
45766
|
-
if (this.scope.inClassAndNotInNonArrowFunction)
|
|
45767
|
-
this.raise(Errors.ArgumentsInClass, startLoc);
|
|
45768
|
-
return;
|
|
45769
|
-
}
|
|
45415
|
+
if (this.scope.inClassAndNotInNonArrowFunction) return void this.raise(Errors.ArgumentsInClass, startLoc);
|
|
45770
45416
|
}
|
|
45771
45417
|
}
|
|
45772
45418
|
recordAwaitIfAllowed() {
|
|
@@ -45778,10 +45424,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
45778
45424
|
const node = this.startNodeAt(startLoc);
|
|
45779
45425
|
this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, node);
|
|
45780
45426
|
if (this.eat(55)) this.raise(Errors.ObsoleteAwaitStar, node);
|
|
45781
|
-
if (!this.scope.inFunction && !(1 & this.optionFlags))
|
|
45782
|
-
|
|
45783
|
-
else this.sawUnambiguousESM = true;
|
|
45784
|
-
}
|
|
45427
|
+
if (!this.scope.inFunction && !(1 & this.optionFlags)) if (this.isAmbiguousAwait()) this.ambiguousScriptDifferentAst = true;
|
|
45428
|
+
else this.sawUnambiguousESM = true;
|
|
45785
45429
|
if (!this.state.soloAwait) node.argument = this.parseMaybeUnary(null, true);
|
|
45786
45430
|
return this.finishNode(node, "AwaitExpression");
|
|
45787
45431
|
}
|
|
@@ -46695,15 +46339,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
46695
46339
|
const decl = this.startNode();
|
|
46696
46340
|
this.parseVarId(decl, kind);
|
|
46697
46341
|
decl.init = this.eat(29) ? isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn() : null;
|
|
46698
|
-
if (null === decl.init && !allowMissingInitializer) {
|
|
46699
|
-
if ("
|
|
46700
|
-
|
|
46701
|
-
kind
|
|
46702
|
-
});
|
|
46703
|
-
} else this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, {
|
|
46704
|
-
kind: "destructuring"
|
|
46342
|
+
if (null === decl.init && !allowMissingInitializer) if ("Identifier" === decl.id.type || isFor && (this.match(58) || this.isContextual(102))) {
|
|
46343
|
+
if (("const" === kind || "using" === kind || "await using" === kind) && !(this.match(58) || this.isContextual(102))) this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, {
|
|
46344
|
+
kind
|
|
46705
46345
|
});
|
|
46706
|
-
}
|
|
46346
|
+
} else this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, {
|
|
46347
|
+
kind: "destructuring"
|
|
46348
|
+
});
|
|
46707
46349
|
declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
|
46708
46350
|
if (!this.eat(12)) break;
|
|
46709
46351
|
}
|
|
@@ -46845,10 +46487,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
46845
46487
|
const isStatic = this.isContextual(106);
|
|
46846
46488
|
if (isStatic) {
|
|
46847
46489
|
if (this.parseClassMemberFromModifier(classBody, member)) return;
|
|
46848
|
-
if (this.eat(5))
|
|
46849
|
-
this.parseClassStaticBlock(classBody, member);
|
|
46850
|
-
return;
|
|
46851
|
-
}
|
|
46490
|
+
if (this.eat(5)) return void this.parseClassStaticBlock(classBody, member);
|
|
46852
46491
|
}
|
|
46853
46492
|
this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
|
|
46854
46493
|
}
|
|
@@ -46866,10 +46505,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
46866
46505
|
method.kind = "method";
|
|
46867
46506
|
const isPrivateName = this.match(139);
|
|
46868
46507
|
this.parseClassElementName(method);
|
|
46869
|
-
if (isPrivateName)
|
|
46870
|
-
this.pushClassPrivateMethod(classBody, privateMethod, true, false);
|
|
46871
|
-
return;
|
|
46872
|
-
}
|
|
46508
|
+
if (isPrivateName) return void this.pushClassPrivateMethod(classBody, privateMethod, true, false);
|
|
46873
46509
|
if (this.isNonstaticConstructor(publicMethod)) this.raise(Errors.ConstructorIsGenerator, publicMethod.key);
|
|
46874
46510
|
this.pushClassMethod(classBody, publicMethod, true, false, false, false);
|
|
46875
46511
|
return;
|
|
@@ -46882,10 +46518,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
46882
46518
|
this.parsePostMemberNameModifiers(publicMember);
|
|
46883
46519
|
if (this.isClassMethod()) {
|
|
46884
46520
|
method.kind = "method";
|
|
46885
|
-
if (isPrivate)
|
|
46886
|
-
this.pushClassPrivateMethod(classBody, privateMethod, false, false);
|
|
46887
|
-
return;
|
|
46888
|
-
}
|
|
46521
|
+
if (isPrivate) return void this.pushClassPrivateMethod(classBody, privateMethod, false, false);
|
|
46889
46522
|
const isConstructor = this.isNonstaticConstructor(publicMethod);
|
|
46890
46523
|
let allowsDirectSuper = false;
|
|
46891
46524
|
if (isConstructor) {
|
|
@@ -46896,36 +46529,31 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
46896
46529
|
allowsDirectSuper = state.hadSuperClass;
|
|
46897
46530
|
}
|
|
46898
46531
|
this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
|
|
46899
|
-
} else if (this.isClassProperty())
|
|
46900
|
-
|
|
46901
|
-
|
|
46902
|
-
|
|
46903
|
-
|
|
46904
|
-
|
|
46905
|
-
|
|
46906
|
-
|
|
46907
|
-
|
|
46908
|
-
|
|
46909
|
-
|
|
46910
|
-
|
|
46911
|
-
|
|
46912
|
-
|
|
46913
|
-
|
|
46914
|
-
|
|
46915
|
-
|
|
46916
|
-
|
|
46917
|
-
|
|
46918
|
-
|
|
46919
|
-
|
|
46920
|
-
this.parseClassElementName(publicMethod);
|
|
46921
|
-
if (isPrivate) this.pushClassPrivateMethod(classBody, privateMethod, false, false);
|
|
46922
|
-
else {
|
|
46923
|
-
if (this.isNonstaticConstructor(publicMethod)) this.raise(Errors.ConstructorIsAccessor, publicMethod.key);
|
|
46924
|
-
this.pushClassMethod(classBody, publicMethod, false, false, false, false);
|
|
46925
|
-
}
|
|
46926
|
-
this.checkGetterSetterParams(publicMethod);
|
|
46532
|
+
} else if (this.isClassProperty()) if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
|
|
46533
|
+
else this.pushClassProperty(classBody, publicProp);
|
|
46534
|
+
else if ("async" !== maybeContextualKw || this.isLineTerminator()) if ("get" !== maybeContextualKw && "set" !== maybeContextualKw || this.match(55) && this.isLineTerminator()) if ("accessor" !== maybeContextualKw || this.isLineTerminator()) if (this.isLineTerminator()) if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
|
|
46535
|
+
else this.pushClassProperty(classBody, publicProp);
|
|
46536
|
+
else this.unexpected();
|
|
46537
|
+
else {
|
|
46538
|
+
this.expectPlugin("decoratorAutoAccessors");
|
|
46539
|
+
this.resetPreviousNodeTrailingComments(key);
|
|
46540
|
+
const isPrivate = this.match(139);
|
|
46541
|
+
this.parseClassElementName(publicProp);
|
|
46542
|
+
this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);
|
|
46543
|
+
}
|
|
46544
|
+
else {
|
|
46545
|
+
this.resetPreviousNodeTrailingComments(key);
|
|
46546
|
+
method.kind = maybeContextualKw;
|
|
46547
|
+
const isPrivate = this.match(139);
|
|
46548
|
+
this.parseClassElementName(publicMethod);
|
|
46549
|
+
if (isPrivate) this.pushClassPrivateMethod(classBody, privateMethod, false, false);
|
|
46550
|
+
else {
|
|
46551
|
+
if (this.isNonstaticConstructor(publicMethod)) this.raise(Errors.ConstructorIsAccessor, publicMethod.key);
|
|
46552
|
+
this.pushClassMethod(classBody, publicMethod, false, false, false, false);
|
|
46927
46553
|
}
|
|
46928
|
-
|
|
46554
|
+
this.checkGetterSetterParams(publicMethod);
|
|
46555
|
+
}
|
|
46556
|
+
else {
|
|
46929
46557
|
this.resetPreviousNodeTrailingComments(key);
|
|
46930
46558
|
const isGenerator = this.eat(55);
|
|
46931
46559
|
if (publicMember.optional) this.unexpected(maybeQuestionTokenStartLoc);
|
|
@@ -47255,12 +46883,10 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
47255
46883
|
else if ("AssignmentPattern" === node.type) this.checkDeclaration(node.left);
|
|
47256
46884
|
}
|
|
47257
46885
|
checkDuplicateExports(node, exportName) {
|
|
47258
|
-
if (this.exportedIdentifiers.has(exportName))
|
|
47259
|
-
|
|
47260
|
-
|
|
47261
|
-
|
|
47262
|
-
});
|
|
47263
|
-
}
|
|
46886
|
+
if (this.exportedIdentifiers.has(exportName)) if ("default" === exportName) this.raise(Errors.DuplicateDefaultExport, node);
|
|
46887
|
+
else this.raise(Errors.DuplicateExport, node, {
|
|
46888
|
+
exportName
|
|
46889
|
+
});
|
|
47264
46890
|
this.exportedIdentifiers.add(exportName);
|
|
47265
46891
|
}
|
|
47266
46892
|
parseExportSpecifiers(isInTypeExport) {
|
|
@@ -48019,13 +47645,12 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48019
47645
|
if ("string" == typeof replacement) replacement = stringLiteral(replacement);
|
|
48020
47646
|
if (!replacement || !isStringLiteral(replacement)) throw new Error("Expected string substitution");
|
|
48021
47647
|
} else if ("statement" === placeholder.type) {
|
|
48022
|
-
if (void 0 === index) {
|
|
48023
|
-
if (replacement)
|
|
48024
|
-
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48028
|
-
} else if (replacement && !Array.isArray(replacement)) {
|
|
47648
|
+
if (void 0 === index) if (replacement) {
|
|
47649
|
+
if (Array.isArray(replacement)) replacement = blockStatement(replacement);
|
|
47650
|
+
else if ("string" == typeof replacement) replacement = expressionStatement(identifier(replacement));
|
|
47651
|
+
else if (!isStatement(replacement)) replacement = expressionStatement(replacement);
|
|
47652
|
+
} else replacement = emptyStatement();
|
|
47653
|
+
else if (replacement && !Array.isArray(replacement)) {
|
|
48029
47654
|
if ("string" == typeof replacement) replacement = identifier(replacement);
|
|
48030
47655
|
if (!isStatement(replacement)) replacement = expressionStatement(replacement);
|
|
48031
47656
|
}
|
|
@@ -48050,11 +47675,10 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48050
47675
|
set(parent, key, replacement);
|
|
48051
47676
|
} else {
|
|
48052
47677
|
const items = parent[key].slice();
|
|
48053
|
-
if ("statement" === placeholder.type || "param" === placeholder.type)
|
|
48054
|
-
|
|
48055
|
-
|
|
48056
|
-
|
|
48057
|
-
} else set(items, index, replacement);
|
|
47678
|
+
if ("statement" === placeholder.type || "param" === placeholder.type) if (null == replacement) items.splice(index, 1);
|
|
47679
|
+
else if (Array.isArray(replacement)) items.splice(index, 1, ...replacement);
|
|
47680
|
+
else set(items, index, replacement);
|
|
47681
|
+
else set(items, index, replacement);
|
|
48058
47682
|
validate(parent, key, items);
|
|
48059
47683
|
parent[key] = items;
|
|
48060
47684
|
}
|
|
@@ -48153,10 +47777,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48153
47777
|
});
|
|
48154
47778
|
}
|
|
48155
47779
|
maybeQueue(path, notPriority) {
|
|
48156
|
-
if (this.queue)
|
|
48157
|
-
|
|
48158
|
-
else this.priorityQueue.push(path);
|
|
48159
|
-
}
|
|
47780
|
+
if (this.queue) if (notPriority) this.queue.push(path);
|
|
47781
|
+
else this.priorityQueue.push(path);
|
|
48160
47782
|
}
|
|
48161
47783
|
visitMultiple(container, parent, listKey) {
|
|
48162
47784
|
if (0 === container.length) return false;
|
|
@@ -48393,10 +48015,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48393
48015
|
lastCommonIndex = i;
|
|
48394
48016
|
lastCommon = shouldMatch;
|
|
48395
48017
|
}
|
|
48396
|
-
if (lastCommon)
|
|
48397
|
-
|
|
48398
|
-
return lastCommon;
|
|
48399
|
-
}
|
|
48018
|
+
if (lastCommon) if (filter) return filter(lastCommon, lastCommonIndex, ancestries);
|
|
48019
|
+
else return lastCommon;
|
|
48400
48020
|
throw new Error("Couldn't find intersection");
|
|
48401
48021
|
}
|
|
48402
48022
|
function getAncestry() {
|
|
@@ -48596,14 +48216,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48596
48216
|
if (!this.container) return;
|
|
48597
48217
|
if (this.node === this.container[this.key]) return;
|
|
48598
48218
|
if (Array.isArray(this.container)) {
|
|
48599
|
-
for(let i = 0; i < this.container.length; i++)if (this.container[i] === this.node)
|
|
48600
|
-
|
|
48601
|
-
return;
|
|
48602
|
-
}
|
|
48603
|
-
} else for (const key of Object.keys(this.container))if (this.container[key] === this.node) {
|
|
48604
|
-
setKey.call(this, key);
|
|
48605
|
-
return;
|
|
48606
|
-
}
|
|
48219
|
+
for(let i = 0; i < this.container.length; i++)if (this.container[i] === this.node) return void setKey.call(this, i);
|
|
48220
|
+
} else for (const key of Object.keys(this.container))if (this.container[key] === this.node) return void setKey.call(this, key);
|
|
48607
48221
|
this.key = null;
|
|
48608
48222
|
}
|
|
48609
48223
|
function _resyncList() {
|
|
@@ -48772,14 +48386,12 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
48772
48386
|
const inConstructor = thisEnvFn.isClassMethod({
|
|
48773
48387
|
kind: "constructor"
|
|
48774
48388
|
});
|
|
48775
|
-
if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty())
|
|
48776
|
-
|
|
48777
|
-
|
|
48778
|
-
|
|
48779
|
-
|
|
48780
|
-
|
|
48781
|
-
} else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
|
|
48782
|
-
}
|
|
48389
|
+
if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) if (arrowParent) thisEnvFn = arrowParent;
|
|
48390
|
+
else if (allowInsertArrow) {
|
|
48391
|
+
fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []));
|
|
48392
|
+
thisEnvFn = fnPath.get("callee");
|
|
48393
|
+
fnPath = thisEnvFn.get("body");
|
|
48394
|
+
} else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
|
|
48783
48395
|
const { thisPaths, argumentsPaths, newTargetPaths, superProps, superCalls } = getScopeInformation(fnPath);
|
|
48784
48396
|
if (inConstructor && superCalls.length > 0) {
|
|
48785
48397
|
if (!allowInsertArrow) throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
|
|
@@ -49012,10 +48624,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49012
48624
|
})) return;
|
|
49013
48625
|
let curr = child.scope;
|
|
49014
48626
|
do {
|
|
49015
|
-
if (curr.hasOwnBinding("arguments"))
|
|
49016
|
-
curr.rename("arguments");
|
|
49017
|
-
return;
|
|
49018
|
-
}
|
|
48627
|
+
if (curr.hasOwnBinding("arguments")) return void curr.rename("arguments");
|
|
49019
48628
|
if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) break;
|
|
49020
48629
|
}while (curr = curr.parent);
|
|
49021
48630
|
argumentsPaths.push(child);
|
|
@@ -49218,8 +48827,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49218
48827
|
if (seen.has(node)) {
|
|
49219
48828
|
const existing = seen.get(node);
|
|
49220
48829
|
if (existing.resolved) return existing.value;
|
|
49221
|
-
deopt(path, state);
|
|
49222
|
-
return;
|
|
48830
|
+
return void deopt(path, state);
|
|
49223
48831
|
}
|
|
49224
48832
|
{
|
|
49225
48833
|
const item = {
|
|
@@ -49275,10 +48883,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49275
48883
|
if (path.isReferencedIdentifier()) {
|
|
49276
48884
|
const binding = path.scope.getBinding(path.node.name);
|
|
49277
48885
|
if (binding) {
|
|
49278
|
-
if (binding.constantViolations.length > 0 || path.node.start < binding.path.node.end)
|
|
49279
|
-
deopt(binding.path, state);
|
|
49280
|
-
return;
|
|
49281
|
-
}
|
|
48886
|
+
if (binding.constantViolations.length > 0 || path.node.start < binding.path.node.end) return void deopt(binding.path, state);
|
|
49282
48887
|
if (binding.hasValue) return binding.value;
|
|
49283
48888
|
}
|
|
49284
48889
|
const name = path.node.name;
|
|
@@ -49288,9 +48893,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49288
48893
|
return;
|
|
49289
48894
|
}
|
|
49290
48895
|
const resolved = path.resolve();
|
|
49291
|
-
if (resolved
|
|
49292
|
-
|
|
49293
|
-
return;
|
|
48896
|
+
if (resolved === path) return void deopt(path, state);
|
|
48897
|
+
return evaluateCached(resolved, state);
|
|
49294
48898
|
}
|
|
49295
48899
|
if (path.isUnaryExpression({
|
|
49296
48900
|
prefix: true
|
|
@@ -49318,11 +48922,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49318
48922
|
const elems = path.get("elements");
|
|
49319
48923
|
for (const elem of elems){
|
|
49320
48924
|
const elemValue = elem.evaluate();
|
|
49321
|
-
if (elemValue.confident)
|
|
49322
|
-
|
|
49323
|
-
deopt(elemValue.deopt, state);
|
|
49324
|
-
return;
|
|
49325
|
-
}
|
|
48925
|
+
if (!elemValue.confident) return void deopt(elemValue.deopt, state);
|
|
48926
|
+
arr.push(elemValue.value);
|
|
49326
48927
|
}
|
|
49327
48928
|
return arr;
|
|
49328
48929
|
}
|
|
@@ -49330,26 +48931,17 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49330
48931
|
const obj = {};
|
|
49331
48932
|
const props = path.get("properties");
|
|
49332
48933
|
for (const prop of props){
|
|
49333
|
-
if (prop.isObjectMethod() || prop.isSpreadElement())
|
|
49334
|
-
deopt(prop, state);
|
|
49335
|
-
return;
|
|
49336
|
-
}
|
|
48934
|
+
if (prop.isObjectMethod() || prop.isSpreadElement()) return void deopt(prop, state);
|
|
49337
48935
|
const keyPath = prop.get("key");
|
|
49338
48936
|
let key;
|
|
49339
48937
|
if (prop.node.computed) {
|
|
49340
48938
|
key = keyPath.evaluate();
|
|
49341
|
-
if (!key.confident)
|
|
49342
|
-
deopt(key.deopt, state);
|
|
49343
|
-
return;
|
|
49344
|
-
}
|
|
48939
|
+
if (!key.confident) return void deopt(key.deopt, state);
|
|
49345
48940
|
key = key.value;
|
|
49346
48941
|
} else key = keyPath.isIdentifier() ? keyPath.node.name : keyPath.node.value;
|
|
49347
48942
|
const valuePath = prop.get("value");
|
|
49348
48943
|
let value1 = valuePath.evaluate();
|
|
49349
|
-
if (!value1.confident)
|
|
49350
|
-
deopt(value1.deopt, state);
|
|
49351
|
-
return;
|
|
49352
|
-
}
|
|
48944
|
+
if (!value1.confident) return void deopt(value1.deopt, state);
|
|
49353
48945
|
value1 = value1.value;
|
|
49354
48946
|
obj[key] = value1;
|
|
49355
48947
|
}
|
|
@@ -49553,10 +49145,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
49553
49145
|
completions.forEach((c)=>{
|
|
49554
49146
|
if (c.path.isBreakStatement({
|
|
49555
49147
|
label: null
|
|
49556
|
-
}))
|
|
49557
|
-
|
|
49558
|
-
else c.path.remove();
|
|
49559
|
-
}
|
|
49148
|
+
})) if (reachable) c.path.replaceWith(unaryExpression("void", numericLiteral(0)));
|
|
49149
|
+
else c.path.remove();
|
|
49560
49150
|
});
|
|
49561
49151
|
}
|
|
49562
49152
|
function getStatementListCompletion(paths, context) {
|
|
@@ -50043,15 +49633,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50043
49633
|
const typeAnnotationInferringNodes = new WeakSet();
|
|
50044
49634
|
function _getTypeAnnotation() {
|
|
50045
49635
|
const node = this.node;
|
|
50046
|
-
if (!node)
|
|
50047
|
-
|
|
50048
|
-
|
|
50049
|
-
|
|
50050
|
-
|
|
50051
|
-
|
|
50052
|
-
|
|
50053
|
-
return voidTypeAnnotation();
|
|
50054
|
-
}
|
|
49636
|
+
if (!node) if (!("init" === this.key && this.parentPath.isVariableDeclarator())) return;
|
|
49637
|
+
else {
|
|
49638
|
+
const declar = this.parentPath.parentPath;
|
|
49639
|
+
const declarParent = declar.parentPath;
|
|
49640
|
+
if ("left" === declar.key && declarParent.isForInStatement()) return stringTypeAnnotation();
|
|
49641
|
+
if ("left" === declar.key && declarParent.isForOfStatement()) return anyTypeAnnotation();
|
|
49642
|
+
return voidTypeAnnotation();
|
|
50055
49643
|
}
|
|
50056
49644
|
if (node.typeAnnotation) return node.typeAnnotation;
|
|
50057
49645
|
if (typeAnnotationInferringNodes.has(node)) return;
|
|
@@ -50075,10 +49663,10 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50075
49663
|
if ("boolean" === baseName) return isBooleanTypeAnnotation(type);
|
|
50076
49664
|
if ("any" === baseName) return isAnyTypeAnnotation(type);
|
|
50077
49665
|
if ("mixed" === baseName) return isMixedTypeAnnotation(type);
|
|
50078
|
-
if ("empty" === baseName) return isEmptyTypeAnnotation(type);
|
|
50079
|
-
if ("void" === baseName) return isVoidTypeAnnotation(type);
|
|
50080
|
-
if (soft) return false;
|
|
50081
|
-
throw new Error(`Unknown base type ${baseName}`);
|
|
49666
|
+
else if ("empty" === baseName) return isEmptyTypeAnnotation(type);
|
|
49667
|
+
else if ("void" === baseName) return isVoidTypeAnnotation(type);
|
|
49668
|
+
else if (soft) return false;
|
|
49669
|
+
else throw new Error(`Unknown base type ${baseName}`);
|
|
50082
49670
|
}
|
|
50083
49671
|
function couldBeBaseType(name) {
|
|
50084
49672
|
const type = this.getTypeAnnotation();
|
|
@@ -50116,10 +49704,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50116
49704
|
function _default(node) {
|
|
50117
49705
|
if (!this.isReferenced()) return;
|
|
50118
49706
|
const binding = this.scope.getBinding(node.name);
|
|
50119
|
-
if (binding)
|
|
50120
|
-
|
|
50121
|
-
return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
|
|
50122
|
-
}
|
|
49707
|
+
if (binding) if (binding.identifier.typeAnnotation) return binding.identifier.typeAnnotation;
|
|
49708
|
+
else return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
|
|
50123
49709
|
if ("undefined" === node.name) return voidTypeAnnotation();
|
|
50124
49710
|
if ("NaN" === node.name || "Infinity" === node.name) return numberTypeAnnotation();
|
|
50125
49711
|
node.name;
|
|
@@ -50391,10 +49977,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50391
49977
|
callee = callee.resolve();
|
|
50392
49978
|
if (callee.isFunction()) {
|
|
50393
49979
|
const { node } = callee;
|
|
50394
|
-
if (node.async)
|
|
50395
|
-
|
|
50396
|
-
return genericTypeAnnotation(identifier("Promise"));
|
|
50397
|
-
}
|
|
49980
|
+
if (node.async) if (node.generator) return genericTypeAnnotation(identifier("AsyncIterator"));
|
|
49981
|
+
else return genericTypeAnnotation(identifier("Promise"));
|
|
50398
49982
|
if (node.generator) return genericTypeAnnotation(identifier("Iterator"));
|
|
50399
49983
|
if (callee.node.returnType) return callee.node.returnType;
|
|
50400
49984
|
}
|
|
@@ -50810,14 +50394,13 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50810
50394
|
const scopes = this.scopes;
|
|
50811
50395
|
const scope = scopes.pop();
|
|
50812
50396
|
if (!scope) return;
|
|
50813
|
-
if (scope.path.isFunction())
|
|
50814
|
-
|
|
50815
|
-
|
|
50816
|
-
|
|
50817
|
-
|
|
50818
|
-
|
|
50819
|
-
|
|
50820
|
-
} else if (scope.path.isProgram()) return this.getNextScopeAttachmentParent();
|
|
50397
|
+
if (scope.path.isFunction()) if (!this.hasOwnParamBindings(scope)) return this.getNextScopeAttachmentParent();
|
|
50398
|
+
else {
|
|
50399
|
+
if (this.scope === scope) return;
|
|
50400
|
+
const bodies = scope.path.get("body").get("body");
|
|
50401
|
+
for(let i = 0; i < bodies.length; i++)if (!bodies[i].node._blockHoist) return bodies[i];
|
|
50402
|
+
}
|
|
50403
|
+
else if (scope.path.isProgram()) return this.getNextScopeAttachmentParent();
|
|
50821
50404
|
}
|
|
50822
50405
|
getNextScopeAttachmentParent() {
|
|
50823
50406
|
const scope = this.scopes.pop();
|
|
@@ -50922,7 +50505,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
50922
50505
|
const { node, parent } = this;
|
|
50923
50506
|
if (!isIdentifier(node, opts) && !isJSXMemberExpression(parent, opts)) {
|
|
50924
50507
|
if (!isJSXIdentifier(node, opts)) return false;
|
|
50925
|
-
if (isCompatTag(node.name)) return false;
|
|
50508
|
+
else if (isCompatTag(node.name)) return false;
|
|
50926
50509
|
}
|
|
50927
50510
|
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
50928
50511
|
}
|
|
@@ -51193,12 +50776,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
51193
50776
|
for(let i = 0; i < nodes.length; i++){
|
|
51194
50777
|
const node = nodes[i];
|
|
51195
50778
|
let msg;
|
|
51196
|
-
if (node)
|
|
51197
|
-
|
|
51198
|
-
|
|
51199
|
-
|
|
51200
|
-
|
|
51201
|
-
} else msg = "has falsy node";
|
|
50779
|
+
if (node) if ("object" != typeof node) msg = "contains a non-object node";
|
|
50780
|
+
else if (node.type) {
|
|
50781
|
+
if (node instanceof _index.default) msg = "has a NodePath when it expected a raw object";
|
|
50782
|
+
} else msg = "without a type";
|
|
50783
|
+
else msg = "has falsy node";
|
|
51202
50784
|
if (msg) {
|
|
51203
50785
|
const type = Array.isArray(node) ? "array" : typeof node;
|
|
51204
50786
|
throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
|
|
@@ -51258,10 +50840,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
51258
50840
|
var _this$opts;
|
|
51259
50841
|
_assertUnremoved.call(this);
|
|
51260
50842
|
_context.resync.call(this);
|
|
51261
|
-
if (_callRemovalHooks.call(this))
|
|
51262
|
-
_markRemoved.call(this);
|
|
51263
|
-
return;
|
|
51264
|
-
}
|
|
50843
|
+
if (_callRemovalHooks.call(this)) return void _markRemoved.call(this);
|
|
51265
50844
|
if (!(null != (_this$opts = this.opts) && _this$opts.noScope)) _removeFromScope.call(this);
|
|
51266
50845
|
this.shareCommentsWithSiblings();
|
|
51267
50846
|
_remove.call(this);
|
|
@@ -52340,10 +51919,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
52340
51919
|
Scope (path, state) {
|
|
52341
51920
|
if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
|
|
52342
51921
|
path.skip();
|
|
52343
|
-
if (path.isMethod())
|
|
52344
|
-
|
|
52345
|
-
else _context.requeueComputedKeyAndDecorators.call(path);
|
|
52346
|
-
}
|
|
51922
|
+
if (path.isMethod()) if (path.requeueComputedKeyAndDecorators) path.requeueComputedKeyAndDecorators();
|
|
51923
|
+
else _context.requeueComputedKeyAndDecorators.call(path);
|
|
52347
51924
|
}
|
|
52348
51925
|
},
|
|
52349
51926
|
ObjectProperty ({ node, scope }, state) {
|
|
@@ -52559,7 +52136,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
52559
52136
|
"exit"
|
|
52560
52137
|
]){
|
|
52561
52138
|
let fns = oldVisitor[phase];
|
|
52562
|
-
if (
|
|
52139
|
+
if (Array.isArray(fns)) {
|
|
52563
52140
|
fns = fns.map(function(fn) {
|
|
52564
52141
|
let newFn = fn;
|
|
52565
52142
|
if (state) newFn = function(path) {
|
|
@@ -52611,16 +52188,14 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
52611
52188
|
for (const phase of [
|
|
52612
52189
|
"enter",
|
|
52613
52190
|
"exit"
|
|
52614
|
-
])if (
|
|
52191
|
+
])if (src[phase]) dest[phase] = [].concat(dest[phase] || [], src[phase]);
|
|
52615
52192
|
}
|
|
52616
52193
|
const _environmentVisitor = {
|
|
52617
52194
|
FunctionParent (path) {
|
|
52618
52195
|
if (path.isArrowFunctionExpression()) return;
|
|
52619
52196
|
path.skip();
|
|
52620
|
-
if (path.isMethod())
|
|
52621
|
-
|
|
52622
|
-
else _context.requeueComputedKeyAndDecorators.call(path);
|
|
52623
|
-
}
|
|
52197
|
+
if (path.isMethod()) if (path.requeueComputedKeyAndDecorators) path.requeueComputedKeyAndDecorators();
|
|
52198
|
+
else _context.requeueComputedKeyAndDecorators.call(path);
|
|
52624
52199
|
},
|
|
52625
52200
|
Property (path) {
|
|
52626
52201
|
if (path.isObjectProperty()) return;
|
|
@@ -58421,15 +57996,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
58421
57996
|
if (hasOwn(node, "typeAnnotation")) newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation;
|
|
58422
57997
|
if (hasOwn(node, "decorators")) newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators;
|
|
58423
57998
|
} else if (hasOwn(_index.NODE_FIELDS, type)) {
|
|
58424
|
-
for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field))
|
|
58425
|
-
|
|
58426
|
-
else newNode[field] = node[field];
|
|
58427
|
-
}
|
|
57999
|
+
for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field)) if (deep) newNode[field] = (0, _index2.isFile)(node) && "comments" === field ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
|
|
58000
|
+
else newNode[field] = node[field];
|
|
58428
58001
|
} else throw new Error(`Unknown node type: "${type}"`);
|
|
58429
|
-
if (hasOwn(node, "loc"))
|
|
58430
|
-
|
|
58431
|
-
else newNode.loc = node.loc;
|
|
58432
|
-
}
|
|
58002
|
+
if (hasOwn(node, "loc")) if (withoutLoc) newNode.loc = null;
|
|
58003
|
+
else newNode.loc = node.loc;
|
|
58433
58004
|
if (hasOwn(node, "leadingComments")) newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache);
|
|
58434
58005
|
if (hasOwn(node, "innerComments")) newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache);
|
|
58435
58006
|
if (hasOwn(node, "trailingComments")) newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache);
|
|
@@ -58486,10 +58057,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
58486
58057
|
function addComments(node, type, comments) {
|
|
58487
58058
|
if (!comments || !node) return node;
|
|
58488
58059
|
const key = `${type}Comments`;
|
|
58489
|
-
if (node[key])
|
|
58490
|
-
|
|
58491
|
-
|
|
58492
|
-
} else node[key] = comments;
|
|
58060
|
+
if (node[key]) if ("leading" === type) node[key] = comments.concat(node[key]);
|
|
58061
|
+
else node[key].push(...comments);
|
|
58062
|
+
else node[key] = comments;
|
|
58493
58063
|
return node;
|
|
58494
58064
|
}
|
|
58495
58065
|
},
|
|
@@ -58914,10 +58484,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
58914
58484
|
newType = "FunctionDeclaration";
|
|
58915
58485
|
} else if ((0, _index.isAssignmentExpression)(node)) return (0, _index2.expressionStatement)(node);
|
|
58916
58486
|
if (mustHaveId && !node.id) newType = false;
|
|
58917
|
-
if (!newType)
|
|
58918
|
-
|
|
58919
|
-
throw new Error(`cannot turn ${node.type} to a statement`);
|
|
58920
|
-
}
|
|
58487
|
+
if (!newType) if (ignore) return false;
|
|
58488
|
+
else throw new Error(`cannot turn ${node.type} to a statement`);
|
|
58921
58489
|
node.type = newType;
|
|
58922
58490
|
return node;
|
|
58923
58491
|
}
|
|
@@ -63543,10 +63111,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
63543
63111
|
}
|
|
63544
63112
|
function assertNodeType(...types) {
|
|
63545
63113
|
function validate(node, key, val) {
|
|
63546
|
-
for (const type of types)if ((0, _is.default)(type, val))
|
|
63547
|
-
(0, _validate.validateChild)(node, key, val);
|
|
63548
|
-
return;
|
|
63549
|
-
}
|
|
63114
|
+
for (const type of types)if ((0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
|
|
63550
63115
|
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
|
|
63551
63116
|
}
|
|
63552
63117
|
validate.oneOfNodeTypes = types;
|
|
@@ -63554,10 +63119,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
63554
63119
|
}
|
|
63555
63120
|
function assertNodeOrValueType(...types) {
|
|
63556
63121
|
function validate(node, key, val) {
|
|
63557
|
-
for (const type of types)if (getType(val) === type || (0, _is.default)(type, val))
|
|
63558
|
-
(0, _validate.validateChild)(node, key, val);
|
|
63559
|
-
return;
|
|
63560
|
-
}
|
|
63122
|
+
for (const type of types)if (getType(val) === type || (0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
|
|
63561
63123
|
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
|
|
63562
63124
|
}
|
|
63563
63125
|
validate.oneOfNodeOrValueTypes = types;
|
|
@@ -64312,36 +63874,37 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
64312
63874
|
const types = [];
|
|
64313
63875
|
for(let i = 0; i < nodes.length; i++){
|
|
64314
63876
|
const node = nodes[i];
|
|
64315
|
-
if (
|
|
64316
|
-
if (types.includes(node))
|
|
64317
|
-
|
|
64318
|
-
|
|
64319
|
-
|
|
64320
|
-
|
|
64321
|
-
|
|
64322
|
-
|
|
64323
|
-
}
|
|
64324
|
-
if ((0, _index.isUnionTypeAnnotation)(node)) {
|
|
64325
|
-
if (!typeGroups.has(node.types)) {
|
|
64326
|
-
nodes.push(...node.types);
|
|
64327
|
-
typeGroups.add(node.types);
|
|
63877
|
+
if (node) {
|
|
63878
|
+
if (!types.includes(node)) {
|
|
63879
|
+
if ((0, _index.isAnyTypeAnnotation)(node)) return [
|
|
63880
|
+
node
|
|
63881
|
+
];
|
|
63882
|
+
if ((0, _index.isFlowBaseAnnotation)(node)) {
|
|
63883
|
+
bases.set(node.type, node);
|
|
63884
|
+
continue;
|
|
64328
63885
|
}
|
|
64329
|
-
|
|
64330
|
-
|
|
64331
|
-
|
|
64332
|
-
|
|
64333
|
-
|
|
64334
|
-
|
|
64335
|
-
|
|
64336
|
-
|
|
64337
|
-
|
|
64338
|
-
|
|
64339
|
-
|
|
64340
|
-
|
|
64341
|
-
|
|
64342
|
-
|
|
63886
|
+
if ((0, _index.isUnionTypeAnnotation)(node)) {
|
|
63887
|
+
if (!typeGroups.has(node.types)) {
|
|
63888
|
+
nodes.push(...node.types);
|
|
63889
|
+
typeGroups.add(node.types);
|
|
63890
|
+
}
|
|
63891
|
+
continue;
|
|
63892
|
+
}
|
|
63893
|
+
if ((0, _index.isGenericTypeAnnotation)(node)) {
|
|
63894
|
+
const name = getQualifiedName(node.id);
|
|
63895
|
+
if (generics.has(name)) {
|
|
63896
|
+
let existing = generics.get(name);
|
|
63897
|
+
if (existing.typeParameters) {
|
|
63898
|
+
if (node.typeParameters) {
|
|
63899
|
+
existing.typeParameters.params.push(...node.typeParameters.params);
|
|
63900
|
+
existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
|
|
63901
|
+
}
|
|
63902
|
+
} else existing = node.typeParameters;
|
|
63903
|
+
} else generics.set(name, node);
|
|
63904
|
+
continue;
|
|
63905
|
+
}
|
|
63906
|
+
types.push(node);
|
|
64343
63907
|
}
|
|
64344
|
-
types.push(node);
|
|
64345
63908
|
}
|
|
64346
63909
|
}
|
|
64347
63910
|
for (const [, baseType] of bases)types.push(baseType);
|
|
@@ -64434,36 +63997,37 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
64434
63997
|
const types = [];
|
|
64435
63998
|
for(let i = 0; i < nodes.length; i++){
|
|
64436
63999
|
const node = nodes[i];
|
|
64437
|
-
if (
|
|
64438
|
-
if (types.includes(node))
|
|
64439
|
-
|
|
64440
|
-
|
|
64441
|
-
|
|
64442
|
-
|
|
64443
|
-
|
|
64444
|
-
|
|
64445
|
-
}
|
|
64446
|
-
if ((0, _index.isTSUnionType)(node)) {
|
|
64447
|
-
if (!typeGroups.has(node.types)) {
|
|
64448
|
-
nodes.push(...node.types);
|
|
64449
|
-
typeGroups.add(node.types);
|
|
64000
|
+
if (node) {
|
|
64001
|
+
if (!types.includes(node)) {
|
|
64002
|
+
if ((0, _index.isTSAnyKeyword)(node)) return [
|
|
64003
|
+
node
|
|
64004
|
+
];
|
|
64005
|
+
if ((0, _index.isTSBaseType)(node)) {
|
|
64006
|
+
bases.set(node.type, node);
|
|
64007
|
+
continue;
|
|
64450
64008
|
}
|
|
64451
|
-
|
|
64452
|
-
|
|
64453
|
-
|
|
64454
|
-
|
|
64455
|
-
|
|
64456
|
-
|
|
64457
|
-
|
|
64458
|
-
|
|
64459
|
-
|
|
64460
|
-
|
|
64461
|
-
|
|
64462
|
-
|
|
64463
|
-
|
|
64464
|
-
|
|
64009
|
+
if ((0, _index.isTSUnionType)(node)) {
|
|
64010
|
+
if (!typeGroups.has(node.types)) {
|
|
64011
|
+
nodes.push(...node.types);
|
|
64012
|
+
typeGroups.add(node.types);
|
|
64013
|
+
}
|
|
64014
|
+
continue;
|
|
64015
|
+
}
|
|
64016
|
+
if ((0, _index.isTSTypeReference)(node) && node.typeParameters) {
|
|
64017
|
+
const name = getQualifiedName(node.typeName);
|
|
64018
|
+
if (generics.has(name)) {
|
|
64019
|
+
let existing = generics.get(name);
|
|
64020
|
+
if (existing.typeParameters) {
|
|
64021
|
+
if (node.typeParameters) {
|
|
64022
|
+
existing.typeParameters.params.push(...node.typeParameters.params);
|
|
64023
|
+
existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
|
|
64024
|
+
}
|
|
64025
|
+
} else existing = node.typeParameters;
|
|
64026
|
+
} else generics.set(name, node);
|
|
64027
|
+
continue;
|
|
64028
|
+
}
|
|
64029
|
+
types.push(node);
|
|
64465
64030
|
}
|
|
64466
|
-
types.push(node);
|
|
64467
64031
|
}
|
|
64468
64032
|
}
|
|
64469
64033
|
for (const [, baseType] of bases)types.push(baseType);
|
|
@@ -64550,10 +64114,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
64550
64114
|
if (keys) for(let i = 0; i < keys.length; i++){
|
|
64551
64115
|
const key = keys[i];
|
|
64552
64116
|
const nodes = id[key];
|
|
64553
|
-
if (nodes)
|
|
64554
|
-
|
|
64555
|
-
else search.push(nodes);
|
|
64556
|
-
}
|
|
64117
|
+
if (nodes) if (Array.isArray(nodes)) search.push(...nodes);
|
|
64118
|
+
else search.push(nodes);
|
|
64557
64119
|
}
|
|
64558
64120
|
}
|
|
64559
64121
|
return ids;
|
|
@@ -64759,7 +64321,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
64759
64321
|
const subNode = node[key];
|
|
64760
64322
|
if (Array.isArray(subNode)) for(let i = 0; i < subNode.length; i++){
|
|
64761
64323
|
const child = subNode[i];
|
|
64762
|
-
if (
|
|
64324
|
+
if (child) {
|
|
64763
64325
|
ancestors.push({
|
|
64764
64326
|
node,
|
|
64765
64327
|
key,
|
|
@@ -73904,15 +73466,11 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
73904
73466
|
if (hasOwn(node, "typeAnnotation")) newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation;
|
|
73905
73467
|
if (hasOwn(node, "decorators")) newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators;
|
|
73906
73468
|
} else if (hasOwn(_index.NODE_FIELDS, type)) {
|
|
73907
|
-
for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field))
|
|
73908
|
-
|
|
73909
|
-
else newNode[field] = node[field];
|
|
73910
|
-
}
|
|
73469
|
+
for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field)) if (deep) newNode[field] = (0, _index2.isFile)(node) && "comments" === field ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
|
|
73470
|
+
else newNode[field] = node[field];
|
|
73911
73471
|
} else throw new Error(`Unknown node type: "${type}"`);
|
|
73912
|
-
if (hasOwn(node, "loc"))
|
|
73913
|
-
|
|
73914
|
-
else newNode.loc = node.loc;
|
|
73915
|
-
}
|
|
73472
|
+
if (hasOwn(node, "loc")) if (withoutLoc) newNode.loc = null;
|
|
73473
|
+
else newNode.loc = node.loc;
|
|
73916
73474
|
if (hasOwn(node, "leadingComments")) newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache);
|
|
73917
73475
|
if (hasOwn(node, "innerComments")) newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache);
|
|
73918
73476
|
if (hasOwn(node, "trailingComments")) newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache);
|
|
@@ -73969,10 +73527,9 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
73969
73527
|
function addComments(node, type, comments) {
|
|
73970
73528
|
if (!comments || !node) return node;
|
|
73971
73529
|
const key = `${type}Comments`;
|
|
73972
|
-
if (node[key])
|
|
73973
|
-
|
|
73974
|
-
|
|
73975
|
-
} else node[key] = comments;
|
|
73530
|
+
if (node[key]) if ("leading" === type) node[key] = comments.concat(node[key]);
|
|
73531
|
+
else node[key].push(...comments);
|
|
73532
|
+
else node[key] = comments;
|
|
73976
73533
|
return node;
|
|
73977
73534
|
}
|
|
73978
73535
|
},
|
|
@@ -74400,10 +73957,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
74400
73957
|
newType = "FunctionDeclaration";
|
|
74401
73958
|
} else if ((0, _index.isAssignmentExpression)(node)) return (0, _index2.expressionStatement)(node);
|
|
74402
73959
|
if (mustHaveId && !node.id) newType = false;
|
|
74403
|
-
if (!newType)
|
|
74404
|
-
|
|
74405
|
-
throw new Error(`cannot turn ${node.type} to a statement`);
|
|
74406
|
-
}
|
|
73960
|
+
if (!newType) if (ignore) return false;
|
|
73961
|
+
else throw new Error(`cannot turn ${node.type} to a statement`);
|
|
74407
73962
|
node.type = newType;
|
|
74408
73963
|
return node;
|
|
74409
73964
|
}
|
|
@@ -79101,10 +78656,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
79101
78656
|
}
|
|
79102
78657
|
function assertNodeType(...types) {
|
|
79103
78658
|
function validate(node, key, val) {
|
|
79104
|
-
for (const type of types)if ((0, _is.default)(type, val))
|
|
79105
|
-
(0, _validate.validateChild)(node, key, val);
|
|
79106
|
-
return;
|
|
79107
|
-
}
|
|
78659
|
+
for (const type of types)if ((0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
|
|
79108
78660
|
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
|
|
79109
78661
|
}
|
|
79110
78662
|
validate.oneOfNodeTypes = types;
|
|
@@ -79112,10 +78664,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
79112
78664
|
}
|
|
79113
78665
|
function assertNodeOrValueType(...types) {
|
|
79114
78666
|
function validate(node, key, val) {
|
|
79115
|
-
for (const type of types)if (getType(val) === type || (0, _is.default)(type, val))
|
|
79116
|
-
(0, _validate.validateChild)(node, key, val);
|
|
79117
|
-
return;
|
|
79118
|
-
}
|
|
78667
|
+
for (const type of types)if (getType(val) === type || (0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
|
|
79119
78668
|
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
|
|
79120
78669
|
}
|
|
79121
78670
|
validate.oneOfNodeOrValueTypes = types;
|
|
@@ -79859,36 +79408,37 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
79859
79408
|
const types = [];
|
|
79860
79409
|
for(let i = 0; i < nodes.length; i++){
|
|
79861
79410
|
const node = nodes[i];
|
|
79862
|
-
if (
|
|
79863
|
-
if (types.includes(node))
|
|
79864
|
-
|
|
79865
|
-
|
|
79866
|
-
|
|
79867
|
-
|
|
79868
|
-
|
|
79869
|
-
|
|
79870
|
-
}
|
|
79871
|
-
if ((0, _index.isUnionTypeAnnotation)(node)) {
|
|
79872
|
-
if (!typeGroups.has(node.types)) {
|
|
79873
|
-
nodes.push(...node.types);
|
|
79874
|
-
typeGroups.add(node.types);
|
|
79411
|
+
if (node) {
|
|
79412
|
+
if (!types.includes(node)) {
|
|
79413
|
+
if ((0, _index.isAnyTypeAnnotation)(node)) return [
|
|
79414
|
+
node
|
|
79415
|
+
];
|
|
79416
|
+
if ((0, _index.isFlowBaseAnnotation)(node)) {
|
|
79417
|
+
bases.set(node.type, node);
|
|
79418
|
+
continue;
|
|
79875
79419
|
}
|
|
79876
|
-
|
|
79877
|
-
|
|
79878
|
-
|
|
79879
|
-
|
|
79880
|
-
|
|
79881
|
-
|
|
79882
|
-
|
|
79883
|
-
|
|
79884
|
-
|
|
79885
|
-
|
|
79886
|
-
|
|
79887
|
-
|
|
79888
|
-
|
|
79889
|
-
|
|
79420
|
+
if ((0, _index.isUnionTypeAnnotation)(node)) {
|
|
79421
|
+
if (!typeGroups.has(node.types)) {
|
|
79422
|
+
nodes.push(...node.types);
|
|
79423
|
+
typeGroups.add(node.types);
|
|
79424
|
+
}
|
|
79425
|
+
continue;
|
|
79426
|
+
}
|
|
79427
|
+
if ((0, _index.isGenericTypeAnnotation)(node)) {
|
|
79428
|
+
const name = getQualifiedName(node.id);
|
|
79429
|
+
if (generics.has(name)) {
|
|
79430
|
+
let existing = generics.get(name);
|
|
79431
|
+
if (existing.typeParameters) {
|
|
79432
|
+
if (node.typeParameters) {
|
|
79433
|
+
existing.typeParameters.params.push(...node.typeParameters.params);
|
|
79434
|
+
existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
|
|
79435
|
+
}
|
|
79436
|
+
} else existing = node.typeParameters;
|
|
79437
|
+
} else generics.set(name, node);
|
|
79438
|
+
continue;
|
|
79439
|
+
}
|
|
79440
|
+
types.push(node);
|
|
79890
79441
|
}
|
|
79891
|
-
types.push(node);
|
|
79892
79442
|
}
|
|
79893
79443
|
}
|
|
79894
79444
|
for (const [, baseType] of bases)types.push(baseType);
|
|
@@ -80097,10 +79647,8 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
80097
79647
|
if (keys) for(let i = 0; i < keys.length; i++){
|
|
80098
79648
|
const key = keys[i];
|
|
80099
79649
|
const nodes = id[key];
|
|
80100
|
-
if (nodes)
|
|
80101
|
-
|
|
80102
|
-
else search.push(nodes);
|
|
80103
|
-
}
|
|
79650
|
+
if (nodes) if (Array.isArray(nodes)) search.push(...nodes);
|
|
79651
|
+
else search.push(nodes);
|
|
80104
79652
|
}
|
|
80105
79653
|
}
|
|
80106
79654
|
return ids;
|
|
@@ -80309,7 +79857,7 @@ Please specify the "importAttributesKeyword" generator option, whose value can b
|
|
|
80309
79857
|
const subNode = node[key];
|
|
80310
79858
|
if (Array.isArray(subNode)) for(let i = 0; i < subNode.length; i++){
|
|
80311
79859
|
const child = subNode[i];
|
|
80312
|
-
if (
|
|
79860
|
+
if (child) {
|
|
80313
79861
|
ancestors.push({
|
|
80314
79862
|
node,
|
|
80315
79863
|
key,
|
|
@@ -83680,13 +83228,11 @@ function merge(target, source) {
|
|
|
83680
83228
|
const key = sourceKeys[i];
|
|
83681
83229
|
const sourceValue = source[key];
|
|
83682
83230
|
const targetValue = target[key];
|
|
83683
|
-
if (Array.isArray(sourceValue))
|
|
83684
|
-
|
|
83685
|
-
|
|
83686
|
-
|
|
83687
|
-
|
|
83688
|
-
else target[key] = merge({}, sourceValue);
|
|
83689
|
-
} else if (void 0 === targetValue || void 0 !== sourceValue) target[key] = sourceValue;
|
|
83231
|
+
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
83232
|
+
else target[key] = merge([], sourceValue);
|
|
83233
|
+
else if (isPlainObject(sourceValue)) if (isPlainObject(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
83234
|
+
else target[key] = merge({}, sourceValue);
|
|
83235
|
+
else if (void 0 === targetValue || void 0 !== sourceValue) target[key] = sourceValue;
|
|
83690
83236
|
}
|
|
83691
83237
|
return target;
|
|
83692
83238
|
}
|
|
@@ -85278,12 +84824,10 @@ const makeEnv = async (newEnvVars, filePath = ".env")=>{
|
|
|
85278
84824
|
} else updatedLines.push(line);
|
|
85279
84825
|
} else updatedLines.push(line);
|
|
85280
84826
|
}
|
|
85281
|
-
for (const [key, val] of Object.entries(newEnvVars))if (!processedKeys.has(key)) {
|
|
85282
|
-
|
|
85283
|
-
|
|
85284
|
-
|
|
85285
|
-
} else updatedLines.push(`${key}=${val}`);
|
|
85286
|
-
}
|
|
84827
|
+
for (const [key, val] of Object.entries(newEnvVars))if (!processedKeys.has(key)) if ("object" == typeof val && null !== val) {
|
|
84828
|
+
updatedLines.push(`# ${val.comment}`);
|
|
84829
|
+
updatedLines.push(`${key}=${val.value}`);
|
|
84830
|
+
} else updatedLines.push(`${key}=${val}`);
|
|
85287
84831
|
const updatedContent = updatedLines.join("\n");
|
|
85288
84832
|
await promises_["default"].writeFile(filePath, updatedContent, "utf-8");
|
|
85289
84833
|
return updatedContent;
|
|
@@ -85373,4 +84917,198 @@ const createZip = async ({ outfile, targetDir, excludeExts = [] })=>{
|
|
|
85373
84917
|
await promises_["default"].writeFile(outfile, content);
|
|
85374
84918
|
return outfile;
|
|
85375
84919
|
};
|
|
85376
|
-
|
|
84920
|
+
function compareValues(a, b, order) {
|
|
84921
|
+
if (a < b) return 'asc' === order ? -1 : 1;
|
|
84922
|
+
if (a > b) return 'asc' === order ? 1 : -1;
|
|
84923
|
+
return 0;
|
|
84924
|
+
}
|
|
84925
|
+
function orderBy(arr, criteria, orders) {
|
|
84926
|
+
return arr.slice().sort((a, b)=>{
|
|
84927
|
+
const ordersLength = orders.length;
|
|
84928
|
+
for(let i = 0; i < criteria.length; i++){
|
|
84929
|
+
const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
|
|
84930
|
+
const criterion = criteria[i];
|
|
84931
|
+
const criterionIsFunction = 'function' == typeof criterion;
|
|
84932
|
+
const valueA = criterionIsFunction ? criterion(a) : a[criterion];
|
|
84933
|
+
const valueB = criterionIsFunction ? criterion(b) : b[criterion];
|
|
84934
|
+
const result = compareValues(valueA, valueB, order);
|
|
84935
|
+
if (0 !== result) return result;
|
|
84936
|
+
}
|
|
84937
|
+
return 0;
|
|
84938
|
+
});
|
|
84939
|
+
}
|
|
84940
|
+
function removeBundleInternalKeys(bundle) {
|
|
84941
|
+
const { _updateJsonKey, _oldUpdateJsonKey, ...pureBundle } = bundle;
|
|
84942
|
+
return pureBundle;
|
|
84943
|
+
}
|
|
84944
|
+
const createBlobDatabasePlugin = ({ name, listObjects, loadObject, uploadObject, deleteObject, invalidatePaths, hooks })=>{
|
|
84945
|
+
const bundlesMap = new Map();
|
|
84946
|
+
const pendingBundlesMap = new Map();
|
|
84947
|
+
const PLATFORMS = [
|
|
84948
|
+
"ios",
|
|
84949
|
+
"android"
|
|
84950
|
+
];
|
|
84951
|
+
async function reloadBundles() {
|
|
84952
|
+
bundlesMap.clear();
|
|
84953
|
+
const platformPromises = PLATFORMS.map(async (platform)=>{
|
|
84954
|
+
const keys = await listUpdateJsonKeys(platform);
|
|
84955
|
+
const filePromises = keys.map(async (key)=>{
|
|
84956
|
+
const bundlesData = await loadObject(key) ?? [];
|
|
84957
|
+
return bundlesData.map((bundle)=>({
|
|
84958
|
+
...bundle,
|
|
84959
|
+
_updateJsonKey: key
|
|
84960
|
+
}));
|
|
84961
|
+
});
|
|
84962
|
+
const results = await Promise.all(filePromises);
|
|
84963
|
+
return results.flat();
|
|
84964
|
+
});
|
|
84965
|
+
const allBundles = (await Promise.all(platformPromises)).flat();
|
|
84966
|
+
for (const bundle of allBundles)bundlesMap.set(bundle.id, bundle);
|
|
84967
|
+
for (const [id, bundle] of pendingBundlesMap.entries())bundlesMap.set(id, bundle);
|
|
84968
|
+
return orderBy(allBundles, [
|
|
84969
|
+
(v)=>v.id
|
|
84970
|
+
], [
|
|
84971
|
+
"desc"
|
|
84972
|
+
]);
|
|
84973
|
+
}
|
|
84974
|
+
async function updateTargetVersionsForPlatform(platform) {
|
|
84975
|
+
const pattern = new RegExp(`^[^/]+/${platform}/[^/]+/update\\.json$`);
|
|
84976
|
+
const keys = (await listObjects("")).filter((key)=>pattern.test(key));
|
|
84977
|
+
const keysByChannel = keys.reduce((acc, key)=>{
|
|
84978
|
+
const parts = key.split("/");
|
|
84979
|
+
const channel = parts[0];
|
|
84980
|
+
acc[channel] = acc[channel] || [];
|
|
84981
|
+
acc[channel].push(key);
|
|
84982
|
+
return acc;
|
|
84983
|
+
}, {});
|
|
84984
|
+
const updatedTargetFiles = new Set();
|
|
84985
|
+
for (const channel of Object.keys(keysByChannel)){
|
|
84986
|
+
const updateKeys = keysByChannel[channel];
|
|
84987
|
+
const targetKey = `${channel}/${platform}/target-app-versions.json`;
|
|
84988
|
+
const currentVersions = updateKeys.map((key)=>key.split("/")[2]);
|
|
84989
|
+
const oldTargetVersions = await loadObject(targetKey) ?? [];
|
|
84990
|
+
const newTargetVersions = oldTargetVersions.filter((v)=>currentVersions.includes(v));
|
|
84991
|
+
for (const v of currentVersions)if (!newTargetVersions.includes(v)) newTargetVersions.push(v);
|
|
84992
|
+
if (JSON.stringify(oldTargetVersions) !== JSON.stringify(newTargetVersions)) {
|
|
84993
|
+
await uploadObject(targetKey, newTargetVersions);
|
|
84994
|
+
updatedTargetFiles.add(`/${targetKey}`);
|
|
84995
|
+
}
|
|
84996
|
+
}
|
|
84997
|
+
return updatedTargetFiles;
|
|
84998
|
+
}
|
|
84999
|
+
async function listUpdateJsonKeys(platform, channel) {
|
|
85000
|
+
const prefix = channel ? platform ? `${channel}/${platform}/` : `${channel}/` : "";
|
|
85001
|
+
const pattern = channel ? platform ? new RegExp(`^${channel}/${platform}/[^/]+/update\\.json$`) : new RegExp(`^${channel}/[^/]+/[^/]+/update\\.json$`) : platform ? new RegExp(`^[^/]+/${platform}/[^/]+/update\\.json$`) : /^[^\/]+\/[^\/]+\/[^\/]+\/update\.json$/;
|
|
85002
|
+
return listObjects(prefix).then((keys)=>keys.filter((key)=>pattern.test(key)));
|
|
85003
|
+
}
|
|
85004
|
+
return createDatabasePlugin(name, {
|
|
85005
|
+
async getBundleById (bundleId) {
|
|
85006
|
+
const pendingBundle = pendingBundlesMap.get(bundleId);
|
|
85007
|
+
if (pendingBundle) return removeBundleInternalKeys(pendingBundle);
|
|
85008
|
+
const bundle = bundlesMap.get(bundleId);
|
|
85009
|
+
if (bundle) return removeBundleInternalKeys(bundle);
|
|
85010
|
+
const bundles = await reloadBundles();
|
|
85011
|
+
return bundles.find((bundle)=>bundle.id === bundleId) ?? null;
|
|
85012
|
+
},
|
|
85013
|
+
async getBundles (options) {
|
|
85014
|
+
let bundles = await reloadBundles();
|
|
85015
|
+
const { where, limit, offset = 0 } = options ?? {};
|
|
85016
|
+
if (where) bundles = bundles.filter((bundle)=>Object.entries(where).every(([key, value1])=>null == value1 || bundle[key] === value1));
|
|
85017
|
+
if (offset > 0) bundles = bundles.slice(offset);
|
|
85018
|
+
if (limit) bundles = bundles.slice(0, limit);
|
|
85019
|
+
return bundles.map(removeBundleInternalKeys);
|
|
85020
|
+
},
|
|
85021
|
+
async getChannels () {
|
|
85022
|
+
const allBundles = await this.getBundles();
|
|
85023
|
+
return [
|
|
85024
|
+
...new Set(allBundles.map((bundle)=>bundle.channel))
|
|
85025
|
+
];
|
|
85026
|
+
},
|
|
85027
|
+
async commitBundle ({ changedSets }) {
|
|
85028
|
+
if (0 === changedSets.length) return;
|
|
85029
|
+
const changedBundlesByKey = {};
|
|
85030
|
+
const removalsByKey = {};
|
|
85031
|
+
const pathsToInvalidate = new Set();
|
|
85032
|
+
for (const { operation, data } of changedSets){
|
|
85033
|
+
if ("insert" === operation) {
|
|
85034
|
+
const key = `${data.channel}/${data.platform}/${data.targetAppVersion}/update.json`;
|
|
85035
|
+
const bundleWithKey = {
|
|
85036
|
+
...data,
|
|
85037
|
+
_updateJsonKey: key
|
|
85038
|
+
};
|
|
85039
|
+
bundlesMap.set(data.id, bundleWithKey);
|
|
85040
|
+
pendingBundlesMap.set(data.id, bundleWithKey);
|
|
85041
|
+
changedBundlesByKey[key] = changedBundlesByKey[key] || [];
|
|
85042
|
+
changedBundlesByKey[key].push(removeBundleInternalKeys(bundleWithKey));
|
|
85043
|
+
pathsToInvalidate.add(`/${key}`);
|
|
85044
|
+
continue;
|
|
85045
|
+
}
|
|
85046
|
+
let bundle = pendingBundlesMap.get(data.id);
|
|
85047
|
+
if (!bundle) bundle = bundlesMap.get(data.id);
|
|
85048
|
+
if (!bundle) throw new Error("targetBundleId not found");
|
|
85049
|
+
if ("update" === operation) {
|
|
85050
|
+
const newChannel = void 0 !== data.channel ? data.channel : bundle.channel;
|
|
85051
|
+
const newPlatform = void 0 !== data.platform ? data.platform : bundle.platform;
|
|
85052
|
+
const newTargetAppVersion = void 0 !== data.targetAppVersion ? data.targetAppVersion : bundle.targetAppVersion;
|
|
85053
|
+
const newKey = `${newChannel}/${newPlatform}/${newTargetAppVersion}/update.json`;
|
|
85054
|
+
if (newKey !== bundle._updateJsonKey) {
|
|
85055
|
+
const oldKey = bundle._updateJsonKey;
|
|
85056
|
+
removalsByKey[oldKey] = removalsByKey[oldKey] || [];
|
|
85057
|
+
removalsByKey[oldKey].push(bundle.id);
|
|
85058
|
+
changedBundlesByKey[newKey] = changedBundlesByKey[newKey] || [];
|
|
85059
|
+
const updatedBundle = {
|
|
85060
|
+
...bundle,
|
|
85061
|
+
...data
|
|
85062
|
+
};
|
|
85063
|
+
updatedBundle._oldUpdateJsonKey = oldKey;
|
|
85064
|
+
updatedBundle._updateJsonKey = newKey;
|
|
85065
|
+
bundlesMap.set(data.id, updatedBundle);
|
|
85066
|
+
pendingBundlesMap.set(data.id, updatedBundle);
|
|
85067
|
+
changedBundlesByKey[newKey].push(removeBundleInternalKeys(updatedBundle));
|
|
85068
|
+
pathsToInvalidate.add(`/${oldKey}`);
|
|
85069
|
+
pathsToInvalidate.add(`/${newKey}`);
|
|
85070
|
+
continue;
|
|
85071
|
+
}
|
|
85072
|
+
const currentKey = bundle._updateJsonKey;
|
|
85073
|
+
const updatedBundle = {
|
|
85074
|
+
...bundle,
|
|
85075
|
+
...data
|
|
85076
|
+
};
|
|
85077
|
+
bundlesMap.set(data.id, updatedBundle);
|
|
85078
|
+
pendingBundlesMap.set(data.id, updatedBundle);
|
|
85079
|
+
changedBundlesByKey[currentKey] = changedBundlesByKey[currentKey] || [];
|
|
85080
|
+
changedBundlesByKey[currentKey].push(removeBundleInternalKeys(updatedBundle));
|
|
85081
|
+
pathsToInvalidate.add(`/${currentKey}`);
|
|
85082
|
+
}
|
|
85083
|
+
}
|
|
85084
|
+
for (const oldKey of Object.keys(removalsByKey))await (async ()=>{
|
|
85085
|
+
const currentBundles = await loadObject(oldKey) ?? [];
|
|
85086
|
+
const updatedBundles = currentBundles.filter((b)=>!removalsByKey[oldKey].includes(b.id));
|
|
85087
|
+
updatedBundles.sort((a, b)=>b.id.localeCompare(a.id));
|
|
85088
|
+
if (0 === updatedBundles.length) await deleteObject(oldKey);
|
|
85089
|
+
else await uploadObject(oldKey, updatedBundles);
|
|
85090
|
+
})();
|
|
85091
|
+
for (const key of Object.keys(changedBundlesByKey))await (async ()=>{
|
|
85092
|
+
const currentBundles = await loadObject(key) ?? [];
|
|
85093
|
+
const pureBundles = changedBundlesByKey[key].map((bundle)=>bundle);
|
|
85094
|
+
for (const changedBundle of pureBundles){
|
|
85095
|
+
const index = currentBundles.findIndex((b)=>b.id === changedBundle.id);
|
|
85096
|
+
if (index >= 0) currentBundles[index] = changedBundle;
|
|
85097
|
+
else currentBundles.push(changedBundle);
|
|
85098
|
+
}
|
|
85099
|
+
currentBundles.sort((a, b)=>b.id.localeCompare(a.id));
|
|
85100
|
+
await uploadObject(key, currentBundles);
|
|
85101
|
+
})();
|
|
85102
|
+
const updatedTargetFilePaths = new Set();
|
|
85103
|
+
for (const platform of PLATFORMS){
|
|
85104
|
+
const updatedPaths = await updateTargetVersionsForPlatform(platform);
|
|
85105
|
+
for (const path of updatedPaths)updatedTargetFilePaths.add(path);
|
|
85106
|
+
}
|
|
85107
|
+
for (const path of updatedTargetFilePaths)pathsToInvalidate.add(path);
|
|
85108
|
+
await invalidatePaths(Array.from(pathsToInvalidate));
|
|
85109
|
+
pendingBundlesMap.clear();
|
|
85110
|
+
hooks?.onDatabaseUpdated?.();
|
|
85111
|
+
}
|
|
85112
|
+
}, hooks);
|
|
85113
|
+
};
|
|
85114
|
+
export { banner, copyDirToTmp, createBlobDatabasePlugin, createDatabasePlugin, createZip, createZipTargetFiles, getCwd, banner_link as link, loadConfig, loadConfigSync, log, makeEnv, printBanner, transformEnv, transformTemplate, transformTsEnv };
|