@gapi/gcli 1.8.199 → 1.8.200
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/package.json +1 -1
- package/release/index.js +806 -760
- package/sea-config.json +3 -1
package/release/index.js
CHANGED
|
@@ -8014,9 +8014,9 @@ var require_lib2 = __commonJS({
|
|
|
8014
8014
|
throw new TypeError(`${value} is not a legal HTTP header value`);
|
|
8015
8015
|
}
|
|
8016
8016
|
}
|
|
8017
|
-
function find(
|
|
8017
|
+
function find(map22, name2) {
|
|
8018
8018
|
name2 = name2.toLowerCase();
|
|
8019
|
-
for (const key in
|
|
8019
|
+
for (const key in map22) {
|
|
8020
8020
|
if (key.toLowerCase() === name2) {
|
|
8021
8021
|
return key;
|
|
8022
8022
|
}
|
|
@@ -12138,7 +12138,7 @@ var require_of = __commonJS({
|
|
|
12138
12138
|
exports2.of = void 0;
|
|
12139
12139
|
var args_1 = require_args();
|
|
12140
12140
|
var from_1 = require_from();
|
|
12141
|
-
function
|
|
12141
|
+
function of10() {
|
|
12142
12142
|
var args = [];
|
|
12143
12143
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
12144
12144
|
args[_i] = arguments[_i];
|
|
@@ -12146,7 +12146,7 @@ var require_of = __commonJS({
|
|
|
12146
12146
|
var scheduler = args_1.popScheduler(args);
|
|
12147
12147
|
return from_1.from(args, scheduler);
|
|
12148
12148
|
}
|
|
12149
|
-
exports2.of =
|
|
12149
|
+
exports2.of = of10;
|
|
12150
12150
|
}
|
|
12151
12151
|
});
|
|
12152
12152
|
|
|
@@ -12281,7 +12281,7 @@ var require_lastValueFrom = __commonJS({
|
|
|
12281
12281
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12282
12282
|
exports2.lastValueFrom = void 0;
|
|
12283
12283
|
var EmptyError_1 = require_EmptyError();
|
|
12284
|
-
function
|
|
12284
|
+
function lastValueFrom4(source, config2) {
|
|
12285
12285
|
var hasConfig = typeof config2 === "object";
|
|
12286
12286
|
return new Promise(function(resolve, reject) {
|
|
12287
12287
|
var _hasValue = false;
|
|
@@ -12304,7 +12304,7 @@ var require_lastValueFrom = __commonJS({
|
|
|
12304
12304
|
});
|
|
12305
12305
|
});
|
|
12306
12306
|
}
|
|
12307
|
-
exports2.lastValueFrom =
|
|
12307
|
+
exports2.lastValueFrom = lastValueFrom4;
|
|
12308
12308
|
}
|
|
12309
12309
|
});
|
|
12310
12310
|
|
|
@@ -12481,7 +12481,7 @@ var require_map = __commonJS({
|
|
|
12481
12481
|
exports2.map = void 0;
|
|
12482
12482
|
var lift_1 = require_lift();
|
|
12483
12483
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
12484
|
-
function
|
|
12484
|
+
function map22(project, thisArg) {
|
|
12485
12485
|
return lift_1.operate(function(source, subscriber) {
|
|
12486
12486
|
var index = 0;
|
|
12487
12487
|
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
|
|
@@ -12489,7 +12489,7 @@ var require_map = __commonJS({
|
|
|
12489
12489
|
}));
|
|
12490
12490
|
});
|
|
12491
12491
|
}
|
|
12492
|
-
exports2.map =
|
|
12492
|
+
exports2.map = map22;
|
|
12493
12493
|
}
|
|
12494
12494
|
});
|
|
12495
12495
|
|
|
@@ -13411,7 +13411,7 @@ var require_merge = __commonJS({
|
|
|
13411
13411
|
var empty_1 = require_empty();
|
|
13412
13412
|
var args_1 = require_args();
|
|
13413
13413
|
var from_1 = require_from();
|
|
13414
|
-
function
|
|
13414
|
+
function merge4() {
|
|
13415
13415
|
var args = [];
|
|
13416
13416
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
13417
13417
|
args[_i] = arguments[_i];
|
|
@@ -13421,7 +13421,7 @@ var require_merge = __commonJS({
|
|
|
13421
13421
|
var sources = args;
|
|
13422
13422
|
return !sources.length ? empty_1.EMPTY : sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler));
|
|
13423
13423
|
}
|
|
13424
|
-
exports2.merge =
|
|
13424
|
+
exports2.merge = merge4;
|
|
13425
13425
|
}
|
|
13426
13426
|
});
|
|
13427
13427
|
|
|
@@ -15539,7 +15539,7 @@ var require_merge2 = __commonJS({
|
|
|
15539
15539
|
var mergeAll_1 = require_mergeAll();
|
|
15540
15540
|
var args_1 = require_args();
|
|
15541
15541
|
var from_1 = require_from();
|
|
15542
|
-
function
|
|
15542
|
+
function merge4() {
|
|
15543
15543
|
var args = [];
|
|
15544
15544
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15545
15545
|
args[_i] = arguments[_i];
|
|
@@ -15550,7 +15550,7 @@ var require_merge2 = __commonJS({
|
|
|
15550
15550
|
mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray2([source], __read2(args)), scheduler)).subscribe(subscriber);
|
|
15551
15551
|
});
|
|
15552
15552
|
}
|
|
15553
|
-
exports2.merge =
|
|
15553
|
+
exports2.merge = merge4;
|
|
15554
15554
|
}
|
|
15555
15555
|
});
|
|
15556
15556
|
|
|
@@ -16538,7 +16538,7 @@ var require_switchMap = __commonJS({
|
|
|
16538
16538
|
var innerFrom_1 = require_innerFrom();
|
|
16539
16539
|
var lift_1 = require_lift();
|
|
16540
16540
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16541
|
-
function
|
|
16541
|
+
function switchMap20(project, resultSelector) {
|
|
16542
16542
|
return lift_1.operate(function(source, subscriber) {
|
|
16543
16543
|
var innerSubscriber = null;
|
|
16544
16544
|
var index = 0;
|
|
@@ -16562,7 +16562,7 @@ var require_switchMap = __commonJS({
|
|
|
16562
16562
|
}));
|
|
16563
16563
|
});
|
|
16564
16564
|
}
|
|
16565
|
-
exports2.switchMap =
|
|
16565
|
+
exports2.switchMap = switchMap20;
|
|
16566
16566
|
}
|
|
16567
16567
|
});
|
|
16568
16568
|
|
|
@@ -16682,7 +16682,7 @@ var require_tap = __commonJS({
|
|
|
16682
16682
|
var lift_1 = require_lift();
|
|
16683
16683
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16684
16684
|
var identity_1 = require_identity();
|
|
16685
|
-
function
|
|
16685
|
+
function tap18(observerOrNext, error48, complete) {
|
|
16686
16686
|
var tapObserver = isFunction_1.isFunction(observerOrNext) || error48 || complete ? { next: observerOrNext, error: error48, complete } : observerOrNext;
|
|
16687
16687
|
return tapObserver ? lift_1.operate(function(source, subscriber) {
|
|
16688
16688
|
var _a2;
|
|
@@ -16711,7 +16711,7 @@ var require_tap = __commonJS({
|
|
|
16711
16711
|
}));
|
|
16712
16712
|
}) : identity_1.identity;
|
|
16713
16713
|
}
|
|
16714
|
-
exports2.tap =
|
|
16714
|
+
exports2.tap = tap18;
|
|
16715
16715
|
}
|
|
16716
16716
|
});
|
|
16717
16717
|
|
|
@@ -19984,7 +19984,7 @@ var require_index_node_cjs = __commonJS({
|
|
|
19984
19984
|
}
|
|
19985
19985
|
return true;
|
|
19986
19986
|
}
|
|
19987
|
-
function
|
|
19987
|
+
function map22(obj, fn, contextObj) {
|
|
19988
19988
|
var res = {};
|
|
19989
19989
|
for (var key in obj) {
|
|
19990
19990
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -20474,7 +20474,7 @@ var require_index_node_cjs = __commonJS({
|
|
|
20474
20474
|
exports2.isValidTimestamp = isValidTimestamp;
|
|
20475
20475
|
exports2.issuedAtTime = issuedAtTime;
|
|
20476
20476
|
exports2.jsonEval = jsonEval;
|
|
20477
|
-
exports2.map =
|
|
20477
|
+
exports2.map = map22;
|
|
20478
20478
|
exports2.querystring = querystring;
|
|
20479
20479
|
exports2.querystringDecode = querystringDecode;
|
|
20480
20480
|
exports2.safeGet = safeGet;
|
|
@@ -21381,7 +21381,7 @@ var require_lib3 = __commonJS({
|
|
|
21381
21381
|
var require_XMLHttpRequest = __commonJS({
|
|
21382
21382
|
"../../node_modules/xmlhttprequest/lib/XMLHttpRequest.js"(exports2) {
|
|
21383
21383
|
var Url = require("url");
|
|
21384
|
-
var
|
|
21384
|
+
var spawn2 = require("child_process").spawn;
|
|
21385
21385
|
var fs = require("fs");
|
|
21386
21386
|
exports2.XMLHttpRequest = function() {
|
|
21387
21387
|
"use strict";
|
|
@@ -21651,7 +21651,7 @@ var require_XMLHttpRequest = __commonJS({
|
|
|
21651
21651
|
var syncFile = ".node-xmlhttprequest-sync-" + process.pid;
|
|
21652
21652
|
fs.writeFileSync(syncFile, "", "utf8");
|
|
21653
21653
|
var execString = "var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http" + (ssl ? "s" : "") + ".request;var options = " + JSON.stringify(options) + ";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('" + syncFile + "');});response.on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});}).on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});" + (data ? "req.write('" + JSON.stringify(data).slice(1, -1).replace(/'/g, "\\'") + "');" : "") + "req.end();";
|
|
21654
|
-
var syncProc =
|
|
21654
|
+
var syncProc = spawn2(process.argv[0], ["-e", execString]);
|
|
21655
21655
|
while (fs.existsSync(syncFile)) {
|
|
21656
21656
|
}
|
|
21657
21657
|
var resp = JSON.parse(fs.readFileSync(contentFile, "utf8"));
|
|
@@ -24376,7 +24376,7 @@ var require_auth = __commonJS({
|
|
|
24376
24376
|
var b = a && (a[mf] ? "phone" : null);
|
|
24377
24377
|
if (b && a && a[nf]) {
|
|
24378
24378
|
K(this, "uid", a[nf]);
|
|
24379
|
-
K(this, "displayName", a[
|
|
24379
|
+
K(this, "displayName", a[of10] || null);
|
|
24380
24380
|
var c = null;
|
|
24381
24381
|
a[pf] && (c = new Date(a[pf]).toUTCString());
|
|
24382
24382
|
K(this, "enrollmentTime", c);
|
|
@@ -24394,7 +24394,7 @@ var require_auth = __commonJS({
|
|
|
24394
24394
|
}
|
|
24395
24395
|
return b;
|
|
24396
24396
|
}
|
|
24397
|
-
var
|
|
24397
|
+
var of10 = "displayName", pf = "enrolledAt", nf = "mfaEnrollmentId", mf = "phoneInfo";
|
|
24398
24398
|
function rf(a) {
|
|
24399
24399
|
lf.call(this, a);
|
|
24400
24400
|
K(this, "phoneNumber", a[mf]);
|
|
@@ -27775,7 +27775,7 @@ var require_auth = __commonJS({
|
|
|
27775
27775
|
var e = null, f = {};
|
|
27776
27776
|
if (d) {
|
|
27777
27777
|
d.uid && (f[nf] = d.uid);
|
|
27778
|
-
d.displayName && (f[
|
|
27778
|
+
d.displayName && (f[of10] = d.displayName);
|
|
27779
27779
|
d.enrollmentTime && (f[pf] = new Date(d.enrollmentTime).toISOString());
|
|
27780
27780
|
d.phoneNumber && (f[mf] = d.phoneNumber);
|
|
27781
27781
|
try {
|
|
@@ -35496,16 +35496,16 @@ var require_encoder = __commonJS({
|
|
|
35496
35496
|
}
|
|
35497
35497
|
return bl(acc);
|
|
35498
35498
|
}
|
|
35499
|
-
function encodeMap(
|
|
35500
|
-
const acc = [getHeader(
|
|
35501
|
-
const keys = [...
|
|
35499
|
+
function encodeMap(map22, options, encode3) {
|
|
35500
|
+
const acc = [getHeader(map22.size, 128, 222)];
|
|
35501
|
+
const keys = [...map22.keys()];
|
|
35502
35502
|
if (!options.preferMap) {
|
|
35503
35503
|
if (keys.every((item) => typeof item === "string")) {
|
|
35504
35504
|
console.warn("Map with string only keys will be deserialized as an object!");
|
|
35505
35505
|
}
|
|
35506
35506
|
}
|
|
35507
35507
|
keys.forEach((key) => {
|
|
35508
|
-
acc.push(encode3(key), encode3(
|
|
35508
|
+
acc.push(encode3(key), encode3(map22.get(key)));
|
|
35509
35509
|
});
|
|
35510
35510
|
return bl(acc);
|
|
35511
35511
|
}
|
|
@@ -37843,22 +37843,22 @@ var require_source_map_generator = __commonJS({
|
|
|
37843
37843
|
}, this);
|
|
37844
37844
|
};
|
|
37845
37845
|
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
37846
|
-
var
|
|
37846
|
+
var map22 = {
|
|
37847
37847
|
version: this._version,
|
|
37848
37848
|
sources: this._sources.toArray(),
|
|
37849
37849
|
names: this._names.toArray(),
|
|
37850
37850
|
mappings: this._serializeMappings()
|
|
37851
37851
|
};
|
|
37852
37852
|
if (this._file != null) {
|
|
37853
|
-
|
|
37853
|
+
map22.file = this._file;
|
|
37854
37854
|
}
|
|
37855
37855
|
if (this._sourceRoot != null) {
|
|
37856
|
-
|
|
37856
|
+
map22.sourceRoot = this._sourceRoot;
|
|
37857
37857
|
}
|
|
37858
37858
|
if (this._sourcesContents) {
|
|
37859
|
-
|
|
37859
|
+
map22.sourcesContent = this._generateSourcesContent(map22.sources, map22.sourceRoot);
|
|
37860
37860
|
}
|
|
37861
|
-
return
|
|
37861
|
+
return map22;
|
|
37862
37862
|
};
|
|
37863
37863
|
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
37864
37864
|
return JSON.stringify(this.toJSON());
|
|
@@ -38751,7 +38751,7 @@ var require_source_node = __commonJS({
|
|
|
38751
38751
|
line: 1,
|
|
38752
38752
|
column: 0
|
|
38753
38753
|
};
|
|
38754
|
-
var
|
|
38754
|
+
var map22 = new SourceMapGenerator(aArgs);
|
|
38755
38755
|
var sourceMappingActive = false;
|
|
38756
38756
|
var lastOriginalSource = null;
|
|
38757
38757
|
var lastOriginalLine = null;
|
|
@@ -38761,7 +38761,7 @@ var require_source_node = __commonJS({
|
|
|
38761
38761
|
generated.code += chunk;
|
|
38762
38762
|
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
38763
38763
|
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
38764
|
-
|
|
38764
|
+
map22.addMapping({
|
|
38765
38765
|
source: original.source,
|
|
38766
38766
|
original: {
|
|
38767
38767
|
line: original.line,
|
|
@@ -38780,7 +38780,7 @@ var require_source_node = __commonJS({
|
|
|
38780
38780
|
lastOriginalName = original.name;
|
|
38781
38781
|
sourceMappingActive = true;
|
|
38782
38782
|
} else if (sourceMappingActive) {
|
|
38783
|
-
|
|
38783
|
+
map22.addMapping({
|
|
38784
38784
|
generated: {
|
|
38785
38785
|
line: generated.line,
|
|
38786
38786
|
column: generated.column
|
|
@@ -38797,7 +38797,7 @@ var require_source_node = __commonJS({
|
|
|
38797
38797
|
lastOriginalSource = null;
|
|
38798
38798
|
sourceMappingActive = false;
|
|
38799
38799
|
} else if (sourceMappingActive) {
|
|
38800
|
-
|
|
38800
|
+
map22.addMapping({
|
|
38801
38801
|
source: original.source,
|
|
38802
38802
|
original: {
|
|
38803
38803
|
line: original.line,
|
|
@@ -38816,9 +38816,9 @@ var require_source_node = __commonJS({
|
|
|
38816
38816
|
}
|
|
38817
38817
|
});
|
|
38818
38818
|
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
38819
|
-
|
|
38819
|
+
map22.setSourceContent(sourceFile, sourceContent);
|
|
38820
38820
|
});
|
|
38821
|
-
return { code: generated.code, map:
|
|
38821
|
+
return { code: generated.code, map: map22 };
|
|
38822
38822
|
};
|
|
38823
38823
|
exports2.SourceNode = SourceNode;
|
|
38824
38824
|
}
|
|
@@ -41158,7 +41158,7 @@ var require_typescript = __commonJS({
|
|
|
41158
41158
|
makeImport: () => makeImport,
|
|
41159
41159
|
makeStringLiteral: () => makeStringLiteral,
|
|
41160
41160
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
41161
|
-
map: () =>
|
|
41161
|
+
map: () => map22,
|
|
41162
41162
|
mapAllOrFail: () => mapAllOrFail,
|
|
41163
41163
|
mapDefined: () => mapDefined,
|
|
41164
41164
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -41802,7 +41802,7 @@ var require_typescript = __commonJS({
|
|
|
41802
41802
|
function clear(array2) {
|
|
41803
41803
|
array2.length = 0;
|
|
41804
41804
|
}
|
|
41805
|
-
function
|
|
41805
|
+
function map22(array2, f) {
|
|
41806
41806
|
let result;
|
|
41807
41807
|
if (array2 !== void 0) {
|
|
41808
41808
|
result = [];
|
|
@@ -41938,12 +41938,12 @@ var require_typescript = __commonJS({
|
|
|
41938
41938
|
}
|
|
41939
41939
|
}
|
|
41940
41940
|
}
|
|
41941
|
-
function getOrUpdate(
|
|
41942
|
-
if (
|
|
41943
|
-
return
|
|
41941
|
+
function getOrUpdate(map23, key, callback) {
|
|
41942
|
+
if (map23.has(key)) {
|
|
41943
|
+
return map23.get(key);
|
|
41944
41944
|
}
|
|
41945
41945
|
const value = callback();
|
|
41946
|
-
|
|
41946
|
+
map23.set(key, value);
|
|
41947
41947
|
return value;
|
|
41948
41948
|
}
|
|
41949
41949
|
function tryAddToSet(set3, value) {
|
|
@@ -41989,12 +41989,12 @@ var require_typescript = __commonJS({
|
|
|
41989
41989
|
}
|
|
41990
41990
|
return result;
|
|
41991
41991
|
}
|
|
41992
|
-
function mapEntries(
|
|
41993
|
-
if (
|
|
41992
|
+
function mapEntries(map23, f) {
|
|
41993
|
+
if (map23 === void 0) {
|
|
41994
41994
|
return void 0;
|
|
41995
41995
|
}
|
|
41996
41996
|
const result = /* @__PURE__ */ new Map();
|
|
41997
|
-
|
|
41997
|
+
map23.forEach((value, key) => {
|
|
41998
41998
|
const [newKey, newValue] = f(key, value);
|
|
41999
41999
|
result.set(newKey, newValue);
|
|
42000
42000
|
});
|
|
@@ -42343,16 +42343,16 @@ var require_typescript = __commonJS({
|
|
|
42343
42343
|
return initial;
|
|
42344
42344
|
}
|
|
42345
42345
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
42346
|
-
function hasProperty(
|
|
42347
|
-
return hasOwnProperty.call(
|
|
42346
|
+
function hasProperty(map23, key) {
|
|
42347
|
+
return hasOwnProperty.call(map23, key);
|
|
42348
42348
|
}
|
|
42349
|
-
function getProperty(
|
|
42350
|
-
return hasOwnProperty.call(
|
|
42349
|
+
function getProperty(map23, key) {
|
|
42350
|
+
return hasOwnProperty.call(map23, key) ? map23[key] : void 0;
|
|
42351
42351
|
}
|
|
42352
|
-
function getOwnKeys(
|
|
42352
|
+
function getOwnKeys(map23) {
|
|
42353
42353
|
const keys = [];
|
|
42354
|
-
for (const key in
|
|
42355
|
-
if (hasOwnProperty.call(
|
|
42354
|
+
for (const key in map23) {
|
|
42355
|
+
if (hasOwnProperty.call(map23, key)) {
|
|
42356
42356
|
keys.push(key);
|
|
42357
42357
|
}
|
|
42358
42358
|
}
|
|
@@ -42384,10 +42384,10 @@ var require_typescript = __commonJS({
|
|
|
42384
42384
|
}
|
|
42385
42385
|
return result;
|
|
42386
42386
|
}
|
|
42387
|
-
function arrayFrom(iterator,
|
|
42387
|
+
function arrayFrom(iterator, map23) {
|
|
42388
42388
|
const result = [];
|
|
42389
42389
|
for (const value of iterator) {
|
|
42390
|
-
result.push(
|
|
42390
|
+
result.push(map23 ? map23(value) : value);
|
|
42391
42391
|
}
|
|
42392
42392
|
return result;
|
|
42393
42393
|
}
|
|
@@ -42492,10 +42492,10 @@ var require_typescript = __commonJS({
|
|
|
42492
42492
|
return fn == null ? void 0 : fn.bind(obj);
|
|
42493
42493
|
}
|
|
42494
42494
|
function createMultiMap() {
|
|
42495
|
-
const
|
|
42496
|
-
|
|
42497
|
-
|
|
42498
|
-
return
|
|
42495
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
42496
|
+
map23.add = multiMapAdd;
|
|
42497
|
+
map23.remove = multiMapRemove;
|
|
42498
|
+
return map23;
|
|
42499
42499
|
}
|
|
42500
42500
|
function multiMapAdd(key, value) {
|
|
42501
42501
|
let values = this.get(key);
|
|
@@ -42711,13 +42711,13 @@ var require_typescript = __commonJS({
|
|
|
42711
42711
|
};
|
|
42712
42712
|
}
|
|
42713
42713
|
function memoizeOne(callback) {
|
|
42714
|
-
const
|
|
42714
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
42715
42715
|
return (arg) => {
|
|
42716
42716
|
const key = `${typeof arg}:${arg}`;
|
|
42717
|
-
let value =
|
|
42718
|
-
if (value === void 0 && !
|
|
42717
|
+
let value = map23.get(key);
|
|
42718
|
+
if (value === void 0 && !map23.has(key)) {
|
|
42719
42719
|
value = callback(arg);
|
|
42720
|
-
|
|
42720
|
+
map23.set(key, value);
|
|
42721
42721
|
}
|
|
42722
42722
|
return value;
|
|
42723
42723
|
};
|
|
@@ -43331,7 +43331,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
43331
43331
|
}
|
|
43332
43332
|
Debug2.getFunctionName = getFunctionName;
|
|
43333
43333
|
function formatSymbol(symbol2) {
|
|
43334
|
-
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${
|
|
43334
|
+
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${map22(symbol2.declarations, (node) => formatSyntaxKind(node.kind))} }`;
|
|
43335
43335
|
}
|
|
43336
43336
|
Debug2.formatSymbol = formatSymbol;
|
|
43337
43337
|
function formatEnum(value = 0, enumObject, isFlags) {
|
|
@@ -43757,7 +43757,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
43757
43757
|
case 1:
|
|
43758
43758
|
return zipWith(
|
|
43759
43759
|
this.sources,
|
|
43760
|
-
this.targets ||
|
|
43760
|
+
this.targets || map22(this.sources, () => "any"),
|
|
43761
43761
|
(s, t) => `${s.__debugTypeToString()} -> ${typeof t === "string" ? t : t.__debugTypeToString()}`
|
|
43762
43762
|
).join(", ");
|
|
43763
43763
|
case 2:
|
|
@@ -44392,10 +44392,10 @@ ${lanes.join("\n")}
|
|
|
44392
44392
|
}
|
|
44393
44393
|
}
|
|
44394
44394
|
function formatDisjunction(alternatives) {
|
|
44395
|
-
return
|
|
44395
|
+
return map22(alternatives, formatAlternative).join(" || ") || "*";
|
|
44396
44396
|
}
|
|
44397
44397
|
function formatAlternative(comparators) {
|
|
44398
|
-
return
|
|
44398
|
+
return map22(comparators, formatComparator).join(" ");
|
|
44399
44399
|
}
|
|
44400
44400
|
function formatComparator(comparator) {
|
|
44401
44401
|
return `${comparator.operator}${comparator.operand}`;
|
|
@@ -51255,20 +51255,20 @@ ${lanes.join("\n")}
|
|
|
51255
51255
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
51256
51256
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
51257
51257
|
var jsDocSeeOrLink = /@(?:see|link)/i;
|
|
51258
|
-
function lookupInUnicodeMap(code,
|
|
51259
|
-
if (code <
|
|
51258
|
+
function lookupInUnicodeMap(code, map23) {
|
|
51259
|
+
if (code < map23[0]) {
|
|
51260
51260
|
return false;
|
|
51261
51261
|
}
|
|
51262
51262
|
let lo = 0;
|
|
51263
|
-
let hi =
|
|
51263
|
+
let hi = map23.length;
|
|
51264
51264
|
let mid;
|
|
51265
51265
|
while (lo + 1 < hi) {
|
|
51266
51266
|
mid = lo + (hi - lo) / 2;
|
|
51267
51267
|
mid -= mid % 2;
|
|
51268
|
-
if (
|
|
51268
|
+
if (map23[mid] <= code && code <= map23[mid + 1]) {
|
|
51269
51269
|
return true;
|
|
51270
51270
|
}
|
|
51271
|
-
if (code <
|
|
51271
|
+
if (code < map23[mid]) {
|
|
51272
51272
|
hi = mid;
|
|
51273
51273
|
} else {
|
|
51274
51274
|
lo = mid + 2;
|
|
@@ -56072,8 +56072,8 @@ ${lanes.join("\n")}
|
|
|
56072
56072
|
node = node.parent;
|
|
56073
56073
|
}
|
|
56074
56074
|
}
|
|
56075
|
-
function forEachEntry(
|
|
56076
|
-
const iterator =
|
|
56075
|
+
function forEachEntry(map23, callback) {
|
|
56076
|
+
const iterator = map23.entries();
|
|
56077
56077
|
for (const [key, value] of iterator) {
|
|
56078
56078
|
const result = callback(value, key);
|
|
56079
56079
|
if (result) {
|
|
@@ -56082,8 +56082,8 @@ ${lanes.join("\n")}
|
|
|
56082
56082
|
}
|
|
56083
56083
|
return void 0;
|
|
56084
56084
|
}
|
|
56085
|
-
function forEachKey(
|
|
56086
|
-
const iterator =
|
|
56085
|
+
function forEachKey(map23, callback) {
|
|
56086
|
+
const iterator = map23.keys();
|
|
56087
56087
|
for (const key of iterator) {
|
|
56088
56088
|
const result = callback(key);
|
|
56089
56089
|
if (result) {
|
|
@@ -61235,28 +61235,28 @@ ${lanes.join("\n")}
|
|
|
61235
61235
|
}
|
|
61236
61236
|
return true;
|
|
61237
61237
|
}
|
|
61238
|
-
function clearMap(
|
|
61239
|
-
|
|
61240
|
-
|
|
61238
|
+
function clearMap(map23, onDeleteValue) {
|
|
61239
|
+
map23.forEach(onDeleteValue);
|
|
61240
|
+
map23.clear();
|
|
61241
61241
|
}
|
|
61242
|
-
function mutateMapSkippingNewValues(
|
|
61242
|
+
function mutateMapSkippingNewValues(map23, newMap, options) {
|
|
61243
61243
|
const { onDeleteValue, onExistingValue } = options;
|
|
61244
|
-
|
|
61244
|
+
map23.forEach((existingValue, key) => {
|
|
61245
61245
|
var _a2;
|
|
61246
61246
|
if (!(newMap == null ? void 0 : newMap.has(key))) {
|
|
61247
|
-
|
|
61247
|
+
map23.delete(key);
|
|
61248
61248
|
onDeleteValue(existingValue, key);
|
|
61249
61249
|
} else if (onExistingValue) {
|
|
61250
61250
|
onExistingValue(existingValue, (_a2 = newMap.get) == null ? void 0 : _a2.call(newMap, key), key);
|
|
61251
61251
|
}
|
|
61252
61252
|
});
|
|
61253
61253
|
}
|
|
61254
|
-
function mutateMap(
|
|
61255
|
-
mutateMapSkippingNewValues(
|
|
61254
|
+
function mutateMap(map23, newMap, options) {
|
|
61255
|
+
mutateMapSkippingNewValues(map23, newMap, options);
|
|
61256
61256
|
const { createNewValue } = options;
|
|
61257
61257
|
newMap == null ? void 0 : newMap.forEach((valueInNewMap, key) => {
|
|
61258
|
-
if (!
|
|
61259
|
-
|
|
61258
|
+
if (!map23.has(key)) {
|
|
61259
|
+
map23.set(key, createNewValue(key, valueInNewMap));
|
|
61260
61260
|
}
|
|
61261
61261
|
});
|
|
61262
61262
|
}
|
|
@@ -62322,7 +62322,7 @@ ${lanes.join("\n")}
|
|
|
62322
62322
|
currentDirectory = normalizePath(currentDirectory);
|
|
62323
62323
|
const absolutePath = combinePaths(currentDirectory, path2);
|
|
62324
62324
|
return {
|
|
62325
|
-
includeFilePatterns:
|
|
62325
|
+
includeFilePatterns: map22(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
62326
62326
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
62327
62327
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
62328
62328
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -64832,7 +64832,7 @@ ${lanes.join("\n")}
|
|
|
64832
64832
|
if (isObjectBindingPattern(node)) {
|
|
64833
64833
|
return setOriginalNode(
|
|
64834
64834
|
setTextRange(
|
|
64835
|
-
factory2.createObjectLiteralExpression(
|
|
64835
|
+
factory2.createObjectLiteralExpression(map22(node.elements, convertToObjectAssignmentElement)),
|
|
64836
64836
|
node
|
|
64837
64837
|
),
|
|
64838
64838
|
node
|
|
@@ -64844,7 +64844,7 @@ ${lanes.join("\n")}
|
|
|
64844
64844
|
if (isArrayBindingPattern(node)) {
|
|
64845
64845
|
return setOriginalNode(
|
|
64846
64846
|
setTextRange(
|
|
64847
|
-
factory2.createArrayLiteralExpression(
|
|
64847
|
+
factory2.createArrayLiteralExpression(map22(node.elements, convertToArrayAssignmentElement)),
|
|
64848
64848
|
node
|
|
64849
64849
|
),
|
|
64850
64850
|
node
|
|
@@ -72205,12 +72205,12 @@ ${lanes.join("\n")}
|
|
|
72205
72205
|
if (node.kind === 353) {
|
|
72206
72206
|
Debug.fail("Should not need to re-set the children of a SyntaxList.");
|
|
72207
72207
|
}
|
|
72208
|
-
let
|
|
72209
|
-
if (
|
|
72210
|
-
|
|
72211
|
-
sourceFileToNodeChildren.set(sourceFile,
|
|
72208
|
+
let map23 = sourceFileToNodeChildren.get(sourceFile);
|
|
72209
|
+
if (map23 === void 0) {
|
|
72210
|
+
map23 = /* @__PURE__ */ new WeakMap();
|
|
72211
|
+
sourceFileToNodeChildren.set(sourceFile, map23);
|
|
72212
72212
|
}
|
|
72213
|
-
|
|
72213
|
+
map23.set(node, children);
|
|
72214
72214
|
return children;
|
|
72215
72215
|
}
|
|
72216
72216
|
function unsetNodeChildren(node, origSourceFile) {
|
|
@@ -72221,10 +72221,10 @@ ${lanes.join("\n")}
|
|
|
72221
72221
|
(_a2 = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a2.delete(node);
|
|
72222
72222
|
}
|
|
72223
72223
|
function transferSourceFileChildren(sourceFile, targetSourceFile) {
|
|
72224
|
-
const
|
|
72225
|
-
if (
|
|
72224
|
+
const map23 = sourceFileToNodeChildren.get(sourceFile);
|
|
72225
|
+
if (map23 !== void 0) {
|
|
72226
72226
|
sourceFileToNodeChildren.delete(sourceFile);
|
|
72227
|
-
sourceFileToNodeChildren.set(targetSourceFile,
|
|
72227
|
+
sourceFileToNodeChildren.set(targetSourceFile, map23);
|
|
72228
72228
|
}
|
|
72229
72229
|
}
|
|
72230
72230
|
function createEmptyExports(factory2) {
|
|
@@ -72666,7 +72666,7 @@ ${lanes.join("\n")}
|
|
|
72666
72666
|
if (some(helperNames)) {
|
|
72667
72667
|
helperNames.sort(compareStringsCaseSensitive);
|
|
72668
72668
|
const namedBindings = nodeFactory.createNamedImports(
|
|
72669
|
-
|
|
72669
|
+
map22(helperNames, (name2) => isFileLevelUniqueName(sourceFile, name2) ? nodeFactory.createImportSpecifier(
|
|
72670
72670
|
/*isTypeOnly*/
|
|
72671
72671
|
false,
|
|
72672
72672
|
/*propertyName*/
|
|
@@ -82869,7 +82869,7 @@ ${lanes.join("\n")}
|
|
|
82869
82869
|
break;
|
|
82870
82870
|
}
|
|
82871
82871
|
case "amd-dependency": {
|
|
82872
|
-
context.amdDependencies =
|
|
82872
|
+
context.amdDependencies = map22(
|
|
82873
82873
|
toArray2(entryOrList),
|
|
82874
82874
|
(x) => ({ name: x.arguments.name, path: x.arguments.path })
|
|
82875
82875
|
);
|
|
@@ -85218,7 +85218,7 @@ ${lanes.join("\n")}
|
|
|
85218
85218
|
function convertToTSConfig(configParseResult, configFileName, host) {
|
|
85219
85219
|
var _a2, _b, _c;
|
|
85220
85220
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
85221
|
-
const files =
|
|
85221
|
+
const files = map22(
|
|
85222
85222
|
filter3(
|
|
85223
85223
|
configParseResult.fileNames,
|
|
85224
85224
|
!((_b = (_a2 = configParseResult.options.configFile) == null ? void 0 : _a2.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs(
|
|
@@ -85248,7 +85248,7 @@ ${lanes.join("\n")}
|
|
|
85248
85248
|
version: void 0
|
|
85249
85249
|
},
|
|
85250
85250
|
watchOptions: watchOptionMap && optionMapToObject(watchOptionMap),
|
|
85251
|
-
references:
|
|
85251
|
+
references: map22(configParseResult.projectReferences, (r) => ({ ...r, path: r.originalPath ? r.originalPath : "", originalPath: void 0 })),
|
|
85252
85252
|
files: length(files) ? files : void 0,
|
|
85253
85253
|
...((_c = configParseResult.options.configFile) == null ? void 0 : _c.configFileSpecs) ? {
|
|
85254
85254
|
include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs),
|
|
@@ -85536,17 +85536,17 @@ ${lanes.join("\n")}
|
|
|
85536
85536
|
function formatValueOrArray(settingName, value) {
|
|
85537
85537
|
const option = optionDeclarations.filter((c) => c.name === settingName)[0];
|
|
85538
85538
|
if (!option) Debug.fail(`No option named ${settingName}?`);
|
|
85539
|
-
const
|
|
85539
|
+
const map23 = option.type instanceof Map ? option.type : void 0;
|
|
85540
85540
|
if (isArray(value)) {
|
|
85541
85541
|
const map32 = "element" in option && option.element.type instanceof Map ? option.element.type : void 0;
|
|
85542
85542
|
return `[${value.map((v) => formatSingleValue(v, map32)).join(", ")}]`;
|
|
85543
85543
|
} else {
|
|
85544
|
-
return formatSingleValue(value,
|
|
85544
|
+
return formatSingleValue(value, map23);
|
|
85545
85545
|
}
|
|
85546
85546
|
}
|
|
85547
|
-
function formatSingleValue(value,
|
|
85548
|
-
if (
|
|
85549
|
-
value = getNameOfCompilerOptionValue(value,
|
|
85547
|
+
function formatSingleValue(value, map23) {
|
|
85548
|
+
if (map23) {
|
|
85549
|
+
value = getNameOfCompilerOptionValue(value, map23) ?? Debug.fail(`No matching value of ${value}`);
|
|
85550
85550
|
}
|
|
85551
85551
|
return JSON.stringify(value);
|
|
85552
85552
|
}
|
|
@@ -85937,7 +85937,7 @@ ${lanes.join("\n")}
|
|
|
85937
85937
|
const setPropertyInResultIfNotUndefined = (propertyName) => {
|
|
85938
85938
|
if (ownConfig.raw[propertyName]) return;
|
|
85939
85939
|
if (extendsRaw[propertyName]) {
|
|
85940
|
-
result[propertyName] =
|
|
85940
|
+
result[propertyName] = map22(extendsRaw[propertyName], (path2) => startsWithConfigDirTemplate(path2) || isRootedDiskPath(path2) ? path2 : combinePaths(
|
|
85941
85941
|
relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
|
|
85942
85942
|
path2
|
|
85943
85943
|
));
|
|
@@ -86246,7 +86246,7 @@ ${lanes.join("\n")}
|
|
|
86246
86246
|
}
|
|
86247
86247
|
}
|
|
86248
86248
|
function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {
|
|
86249
|
-
return filter3(
|
|
86249
|
+
return filter3(map22(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v);
|
|
86250
86250
|
}
|
|
86251
86251
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
86252
86252
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -86286,7 +86286,7 @@ ${lanes.join("\n")}
|
|
|
86286
86286
|
".json"
|
|
86287
86287
|
/* Json */
|
|
86288
86288
|
));
|
|
86289
|
-
const includeFilePatterns =
|
|
86289
|
+
const includeFilePatterns = map22(getRegularExpressionsForWildcards(includes, basePath, "files"), (pattern) => `^${pattern}$`);
|
|
86290
86290
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, host.useCaseSensitiveFileNames)) : emptyArray;
|
|
86291
86291
|
}
|
|
86292
86292
|
const includeIndex = findIndex(jsonOnlyIncludeRegexes, (re) => re.test(file2));
|
|
@@ -93586,7 +93586,7 @@ ${lanes.join("\n")}
|
|
|
93586
93586
|
}
|
|
93587
93587
|
const normalizedSourcePaths = getPathsRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName);
|
|
93588
93588
|
const relativePaths = flatMap(normalizedSourcePaths, (sourcePath) => {
|
|
93589
|
-
return
|
|
93589
|
+
return map22(normalizedTargetPaths, (targetPath) => ensurePathIsNonModuleName(getRelativePathFromDirectory(sourcePath, targetPath, getCanonicalFileName)));
|
|
93590
93590
|
});
|
|
93591
93591
|
const shortest = min(relativePaths, compareNumberOfDirectorySeparators);
|
|
93592
93592
|
if (!shortest) {
|
|
@@ -96631,7 +96631,7 @@ ${lanes.join("\n")}
|
|
|
96631
96631
|
const exportedSymbol = exports22 ? find(symbolsToArray(exports22), (symbol2) => !!getSymbolIfSameReference(symbol2, localSymbol)) : void 0;
|
|
96632
96632
|
const diagnostic = exportedSymbol ? error210(name2, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error210(name2, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
|
|
96633
96633
|
if (localSymbol.declarations) {
|
|
96634
|
-
addRelatedInfo(diagnostic, ...
|
|
96634
|
+
addRelatedInfo(diagnostic, ...map22(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
|
96635
96635
|
}
|
|
96636
96636
|
}
|
|
96637
96637
|
} else {
|
|
@@ -99412,7 +99412,7 @@ ${lanes.join("\n")}
|
|
|
99412
99412
|
const types = type2.types;
|
|
99413
99413
|
const templateHead = factory.createTemplateHead(texts[0]);
|
|
99414
99414
|
const templateSpans = factory.createNodeArray(
|
|
99415
|
-
|
|
99415
|
+
map22(types, (t, i) => factory.createTemplateLiteralTypeSpan(
|
|
99416
99416
|
typeToTypeNodeHelper(t, context),
|
|
99417
99417
|
(i < types.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i + 1])
|
|
99418
99418
|
))
|
|
@@ -99781,7 +99781,7 @@ ${lanes.join("\n")}
|
|
|
99781
99781
|
}
|
|
99782
99782
|
const abstractSignatures = filter3(resolved.constructSignatures, (signature) => !!(signature.flags & 4));
|
|
99783
99783
|
if (some(abstractSignatures)) {
|
|
99784
|
-
const types =
|
|
99784
|
+
const types = map22(abstractSignatures, getOrCreateTypeFromSignature);
|
|
99785
99785
|
const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per
|
|
99786
99786
|
// the logic in `createTypeNodesFromResolvedType`.
|
|
99787
99787
|
(context.flags & 2048 ? countWhere(resolved.properties, (p) => !(p.flags & 4194304)) : length(resolved.properties));
|
|
@@ -99999,7 +99999,7 @@ ${lanes.join("\n")}
|
|
|
99999
99999
|
const newComponents = filter3(indexInfo.components, (e) => {
|
|
100000
100000
|
return !hasLateBindableName(e);
|
|
100001
100001
|
});
|
|
100002
|
-
return
|
|
100002
|
+
return map22(newComponents, (e) => {
|
|
100003
100003
|
trackComputedName(e.name.expression, context2.enclosingDeclaration, context2);
|
|
100004
100004
|
return setTextRange2(
|
|
100005
100005
|
context2,
|
|
@@ -100808,7 +100808,7 @@ ${lanes.join("\n")}
|
|
|
100808
100808
|
const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol);
|
|
100809
100809
|
const parameterType = getTypeOfSymbol(parameterSymbol);
|
|
100810
100810
|
const parameterTypeNode = serializeTypeForDeclaration(context, parameterDeclaration, parameterType, parameterSymbol);
|
|
100811
|
-
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ?
|
|
100811
|
+
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map22(getModifiers(parameterDeclaration), factory.cloneNode) : void 0;
|
|
100812
100812
|
const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768;
|
|
100813
100813
|
const dotDotDotToken = isRest ? factory.createToken(
|
|
100814
100814
|
26
|
|
@@ -101006,7 +101006,7 @@ ${lanes.join("\n")}
|
|
|
101006
101006
|
let typeParameterNodes;
|
|
101007
101007
|
const targetSymbol = getTargetSymbol(symbol2);
|
|
101008
101008
|
if (targetSymbol.flags & (32 | 64 | 524288)) {
|
|
101009
|
-
typeParameterNodes = factory.createNodeArray(
|
|
101009
|
+
typeParameterNodes = factory.createNodeArray(map22(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2), (tp) => typeParameterToDeclaration(tp, context)));
|
|
101010
101010
|
}
|
|
101011
101011
|
return typeParameterNodes;
|
|
101012
101012
|
}
|
|
@@ -101031,7 +101031,7 @@ ${lanes.join("\n")}
|
|
|
101031
101031
|
const params = getTypeParametersOfClassOrInterface(
|
|
101032
101032
|
parentSymbol.flags & 2097152 ? resolveAlias(parentSymbol) : parentSymbol
|
|
101033
101033
|
);
|
|
101034
|
-
typeParameterNodes = mapToTypeNodes(
|
|
101034
|
+
typeParameterNodes = mapToTypeNodes(map22(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context);
|
|
101035
101035
|
} else {
|
|
101036
101036
|
typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol2, context);
|
|
101037
101037
|
}
|
|
@@ -101854,7 +101854,7 @@ ${lanes.join("\n")}
|
|
|
101854
101854
|
}
|
|
101855
101855
|
function getNamesOfDeclaration(statement) {
|
|
101856
101856
|
if (isVariableStatement(statement)) {
|
|
101857
|
-
return filter3(
|
|
101857
|
+
return filter3(map22(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined);
|
|
101858
101858
|
}
|
|
101859
101859
|
return filter3([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
|
|
101860
101860
|
}
|
|
@@ -101880,7 +101880,7 @@ ${lanes.join("\n")}
|
|
|
101880
101880
|
void 0,
|
|
101881
101881
|
/*isTypeOnly*/
|
|
101882
101882
|
false,
|
|
101883
|
-
factory.createNamedExports(
|
|
101883
|
+
factory.createNamedExports(map22(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(
|
|
101884
101884
|
/*isTypeOnly*/
|
|
101885
101885
|
false,
|
|
101886
101886
|
/*propertyName*/
|
|
@@ -102300,7 +102300,7 @@ ${lanes.join("\n")}
|
|
|
102300
102300
|
var _a22;
|
|
102301
102301
|
const aliasType = getDeclaredTypeOfTypeAlias(symbol2);
|
|
102302
102302
|
const typeParams = getSymbolLinks(symbol2).typeParameters;
|
|
102303
|
-
const typeParamDecls =
|
|
102303
|
+
const typeParamDecls = map22(typeParams, (p) => typeParameterToDeclaration(p, context));
|
|
102304
102304
|
const jsdocAliasDecl = (_a22 = symbol2.declarations) == null ? void 0 : _a22.find(isJSDocTypeAlias);
|
|
102305
102305
|
const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
|
|
102306
102306
|
const restoreFlags = saveRestoreFlags(context);
|
|
@@ -102331,7 +102331,7 @@ ${lanes.join("\n")}
|
|
|
102331
102331
|
context.approximateLength += 14 + internalSymbolName.length;
|
|
102332
102332
|
const interfaceType = getDeclaredTypeOfClassOrInterface(symbol2);
|
|
102333
102333
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
102334
|
-
const typeParamDecls =
|
|
102334
|
+
const typeParamDecls = map22(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
102335
102335
|
const baseTypes = getBaseTypes(interfaceType);
|
|
102336
102336
|
const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0;
|
|
102337
102337
|
const members = serializePropertySymbolsForClassOrInterface(
|
|
@@ -102644,7 +102644,7 @@ ${lanes.join("\n")}
|
|
|
102644
102644
|
addingDeclare = oldAddingDeclare;
|
|
102645
102645
|
const declarations = results;
|
|
102646
102646
|
results = oldResults;
|
|
102647
|
-
const defaultReplaced =
|
|
102647
|
+
const defaultReplaced = map22(declarations, (d) => isExportAssignment(d) && !d.isExportEquals && isIdentifier(d.expression) ? factory.createExportDeclaration(
|
|
102648
102648
|
/*modifiers*/
|
|
102649
102649
|
void 0,
|
|
102650
102650
|
/*isTypeOnly*/
|
|
@@ -102663,7 +102663,7 @@ ${lanes.join("\n")}
|
|
|
102663
102663
|
d,
|
|
102664
102664
|
32
|
|
102665
102665
|
/* Export */
|
|
102666
|
-
)) ?
|
|
102666
|
+
)) ? map22(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
102667
102667
|
fakespace = factory.updateModuleDeclaration(
|
|
102668
102668
|
fakespace,
|
|
102669
102669
|
fakespace.modifiers,
|
|
@@ -102711,7 +102711,7 @@ ${lanes.join("\n")}
|
|
|
102711
102711
|
}
|
|
102712
102712
|
return cleanup(factory.createExpressionWithTypeArguments(
|
|
102713
102713
|
expr,
|
|
102714
|
-
|
|
102714
|
+
map22(e.typeArguments, (a) => syntacticNodeBuilder.tryReuseExistingTypeNode(context, a) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context))
|
|
102715
102715
|
));
|
|
102716
102716
|
function cleanup(result2) {
|
|
102717
102717
|
context.enclosingDeclaration = oldEnclosing;
|
|
@@ -102730,7 +102730,7 @@ ${lanes.join("\n")}
|
|
|
102730
102730
|
const oldEnclosing = context.enclosingDeclaration;
|
|
102731
102731
|
context.enclosingDeclaration = originalDecl || oldEnclosing;
|
|
102732
102732
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
102733
|
-
const typeParamDecls =
|
|
102733
|
+
const typeParamDecls = map22(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
102734
102734
|
forEach(localParams, (p) => context.approximateLength += symbolName(p.symbol).length);
|
|
102735
102735
|
const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol2));
|
|
102736
102736
|
const baseTypes = getBaseTypes(classType);
|
|
@@ -102741,7 +102741,7 @@ ${lanes.join("\n")}
|
|
|
102741
102741
|
const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType2;
|
|
102742
102742
|
context.approximateLength += (length(baseTypes) ? 8 : 0) + (length(implementsExpressions) ? 11 : 0);
|
|
102743
102743
|
const heritageClauses = [
|
|
102744
|
-
...!length(baseTypes) ? [] : [factory.createHeritageClause(96,
|
|
102744
|
+
...!length(baseTypes) ? [] : [factory.createHeritageClause(96, map22(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))],
|
|
102745
102745
|
...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119, implementsExpressions)]
|
|
102746
102746
|
];
|
|
102747
102747
|
const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
@@ -103570,7 +103570,7 @@ ${lanes.join("\n")}
|
|
|
103570
103570
|
let typeArgs;
|
|
103571
103571
|
let reference;
|
|
103572
103572
|
if (t.target && isSymbolAccessibleByFlags(t.target.symbol, enclosingDeclaration, flags)) {
|
|
103573
|
-
typeArgs =
|
|
103573
|
+
typeArgs = map22(getTypeArguments(t), (t2) => typeToTypeNodeHelper(t2, context));
|
|
103574
103574
|
reference = symbolToExpression(
|
|
103575
103575
|
t.target.symbol,
|
|
103576
103576
|
context,
|
|
@@ -104034,7 +104034,7 @@ ${lanes.join("\n")}
|
|
|
104034
104034
|
}
|
|
104035
104035
|
function getTypeOfPrototypeProperty(prototype) {
|
|
104036
104036
|
const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
|
|
104037
|
-
return classType.typeParameters ? createTypeReference(classType,
|
|
104037
|
+
return classType.typeParameters ? createTypeReference(classType, map22(classType.typeParameters, (_2) => anyType2)) : classType;
|
|
104038
104038
|
}
|
|
104039
104039
|
function getTypeOfPropertyOfType(type2, name2) {
|
|
104040
104040
|
const prop = getPropertyOfType(type2, name2);
|
|
@@ -104082,7 +104082,7 @@ ${lanes.join("\n")}
|
|
|
104082
104082
|
if (source.flags & 1048576) {
|
|
104083
104083
|
return mapType2(source, (t) => getRestType(t, properties, symbol2));
|
|
104084
104084
|
}
|
|
104085
|
-
let omitKeyType = getUnionType(
|
|
104085
|
+
let omitKeyType = getUnionType(map22(properties, getLiteralTypeFromPropertyName));
|
|
104086
104086
|
const spreadableProperties = [];
|
|
104087
104087
|
const unspreadableToRestKeys = [];
|
|
104088
104088
|
for (const prop of getPropertiesOfType(source)) {
|
|
@@ -104808,9 +104808,9 @@ ${lanes.join("\n")}
|
|
|
104808
104808
|
if (elements.length === 0 || elements.length === 1 && restElement) {
|
|
104809
104809
|
return languageVersion >= 2 ? createIterableType(anyType2) : anyArrayType;
|
|
104810
104810
|
}
|
|
104811
|
-
const elementTypes =
|
|
104811
|
+
const elementTypes = map22(elements, (e) => isOmittedExpression(e) ? anyType2 : getTypeFromBindingElement(e, includePatternInType, reportErrors2));
|
|
104812
104812
|
const minLength = findLastIndex(elements, (e) => !(e === restElement || isOmittedExpression(e) || hasDefaultValue(e)), elements.length - 1) + 1;
|
|
104813
|
-
const elementFlags =
|
|
104813
|
+
const elementFlags = map22(
|
|
104814
104814
|
elements,
|
|
104815
104815
|
(e, i) => e === restElement ? 4 : i >= minLength ? 2 : 1
|
|
104816
104816
|
/* Required */
|
|
@@ -105492,7 +105492,7 @@ ${lanes.join("\n")}
|
|
|
105492
105492
|
}
|
|
105493
105493
|
function getInstantiatedConstructorsForTypeArguments(type2, typeArgumentNodes, location) {
|
|
105494
105494
|
const signatures = getConstructorsForTypeArguments(type2, typeArgumentNodes, location);
|
|
105495
|
-
const typeArguments =
|
|
105495
|
+
const typeArguments = map22(typeArgumentNodes, getTypeFromTypeNode);
|
|
105496
105496
|
return sameMap(signatures, (sig) => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments, isInJSFile(location)) : sig);
|
|
105497
105497
|
}
|
|
105498
105498
|
function getBaseConstructorTypeOfClass(type2) {
|
|
@@ -106323,14 +106323,14 @@ ${lanes.join("\n")}
|
|
|
106323
106323
|
if (isTupleType(restType)) {
|
|
106324
106324
|
return [expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol)];
|
|
106325
106325
|
} else if (!skipUnionExpanding && restType.flags & 1048576 && every(restType.types, isTupleType)) {
|
|
106326
|
-
return
|
|
106326
|
+
return map22(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restSymbol));
|
|
106327
106327
|
}
|
|
106328
106328
|
}
|
|
106329
106329
|
return [sig.parameters];
|
|
106330
106330
|
function expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol) {
|
|
106331
106331
|
const elementTypes = getTypeArguments(restType);
|
|
106332
106332
|
const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restSymbol);
|
|
106333
|
-
const restParams =
|
|
106333
|
+
const restParams = map22(elementTypes, (t, i) => {
|
|
106334
106334
|
const name2 = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType);
|
|
106335
106335
|
const flags = restType.target.elementFlags[i];
|
|
106336
106336
|
const checkFlags = flags & 12 ? 32768 : flags & 2 ? 16384 : 0;
|
|
@@ -106341,7 +106341,7 @@ ${lanes.join("\n")}
|
|
|
106341
106341
|
return concatenate(sig.parameters.slice(0, restIndex), restParams);
|
|
106342
106342
|
}
|
|
106343
106343
|
function getUniqAssociatedNamesFromTupleType(type2, restSymbol) {
|
|
106344
|
-
const names =
|
|
106344
|
+
const names = map22(type2.target.labeledElementDeclarations, (labeledElement, i) => getTupleElementLabel(labeledElement, i, type2.target.elementFlags[i], restSymbol));
|
|
106345
106345
|
if (names) {
|
|
106346
106346
|
const duplicates = [];
|
|
106347
106347
|
const uniqueNames = /* @__PURE__ */ new Set();
|
|
@@ -106512,7 +106512,7 @@ ${lanes.join("\n")}
|
|
|
106512
106512
|
if (signatures !== masterList) {
|
|
106513
106513
|
const signature = signatures[0];
|
|
106514
106514
|
Debug.assert(!!signature, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass");
|
|
106515
|
-
results = !!signature.typeParameters && some(results, (s) => !!s.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s.typeParameters)) ? void 0 :
|
|
106515
|
+
results = !!signature.typeParameters && some(results, (s) => !!s.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s.typeParameters)) ? void 0 : map22(results, (sig) => combineSignaturesOfUnionMembers(sig, signature));
|
|
106516
106516
|
if (!results) {
|
|
106517
106517
|
break;
|
|
106518
106518
|
}
|
|
@@ -106635,7 +106635,7 @@ ${lanes.join("\n")}
|
|
|
106635
106635
|
for (const info of sourceInfos) {
|
|
106636
106636
|
const indexType = info.keyType;
|
|
106637
106637
|
if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) {
|
|
106638
|
-
result.push(createIndexInfo(indexType, getUnionType(
|
|
106638
|
+
result.push(createIndexInfo(indexType, getUnionType(map22(types, (t) => getIndexTypeOfType(t, indexType))), some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly)));
|
|
106639
106639
|
}
|
|
106640
106640
|
}
|
|
106641
106641
|
return result;
|
|
@@ -106643,12 +106643,12 @@ ${lanes.join("\n")}
|
|
|
106643
106643
|
return emptyArray;
|
|
106644
106644
|
}
|
|
106645
106645
|
function resolveUnionTypeMembers(type2) {
|
|
106646
|
-
const callSignatures = getUnionSignatures(
|
|
106646
|
+
const callSignatures = getUnionSignatures(map22(type2.types, (t) => t === globalFunctionType ? [unknownSignature] : getSignaturesOfType(
|
|
106647
106647
|
t,
|
|
106648
106648
|
0
|
|
106649
106649
|
/* Call */
|
|
106650
106650
|
)));
|
|
106651
|
-
const constructSignatures = getUnionSignatures(
|
|
106651
|
+
const constructSignatures = getUnionSignatures(map22(type2.types, (t) => getSignaturesOfType(
|
|
106652
106652
|
t,
|
|
106653
106653
|
1
|
|
106654
106654
|
/* Construct */
|
|
@@ -106665,7 +106665,7 @@ ${lanes.join("\n")}
|
|
|
106665
106665
|
1
|
|
106666
106666
|
/* Construct */
|
|
106667
106667
|
).length > 0);
|
|
106668
|
-
const mixinFlags =
|
|
106668
|
+
const mixinFlags = map22(types, isMixinConstructorType);
|
|
106669
106669
|
if (constructorTypeCount > 0 && constructorTypeCount === countWhere(mixinFlags, (b) => b)) {
|
|
106670
106670
|
const firstMixinIndex = mixinFlags.indexOf(
|
|
106671
106671
|
/*searchElement*/
|
|
@@ -106706,7 +106706,7 @@ ${lanes.join("\n")}
|
|
|
106706
106706
|
/* Construct */
|
|
106707
106707
|
);
|
|
106708
106708
|
if (signatures.length && mixinCount > 0) {
|
|
106709
|
-
signatures =
|
|
106709
|
+
signatures = map22(signatures, (s) => {
|
|
106710
106710
|
const clone22 = cloneSignature(s);
|
|
106711
106711
|
clone22.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, mixinFlags, i);
|
|
106712
106712
|
return clone22;
|
|
@@ -107495,7 +107495,7 @@ ${lanes.join("\n")}
|
|
|
107495
107495
|
return getBaseConstraint(getSubstitutionIntersection(t));
|
|
107496
107496
|
}
|
|
107497
107497
|
if (isGenericTupleType(t)) {
|
|
107498
|
-
const newElements =
|
|
107498
|
+
const newElements = map22(getElementTypes(t), (v, i) => {
|
|
107499
107499
|
const constraint = v.flags & 262144 && t.target.elementFlags[i] & 8 && getBaseConstraint(v) || v;
|
|
107500
107500
|
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
|
107501
107501
|
});
|
|
@@ -107931,7 +107931,7 @@ ${lanes.join("\n")}
|
|
|
107931
107931
|
}
|
|
107932
107932
|
}
|
|
107933
107933
|
}
|
|
107934
|
-
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(
|
|
107934
|
+
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(map22(applicableInfos, (info) => info.type)), reduceLeft(
|
|
107935
107935
|
applicableInfos,
|
|
107936
107936
|
(isReadonly, info) => isReadonly && info.isReadonly,
|
|
107937
107937
|
/*initial*/
|
|
@@ -108331,7 +108331,7 @@ ${lanes.join("\n")}
|
|
|
108331
108331
|
return errorType;
|
|
108332
108332
|
}
|
|
108333
108333
|
let type2 = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) : signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(
|
|
108334
|
-
|
|
108334
|
+
map22(signature.compositeSignatures, getReturnTypeOfSignature),
|
|
108335
108335
|
signature.compositeKind,
|
|
108336
108336
|
2
|
|
108337
108337
|
/* Subtype */
|
|
@@ -108470,7 +108470,7 @@ ${lanes.join("\n")}
|
|
|
108470
108470
|
function createCanonicalSignature(signature) {
|
|
108471
108471
|
return getSignatureInstantiation(
|
|
108472
108472
|
signature,
|
|
108473
|
-
|
|
108473
|
+
map22(signature.typeParameters, (tp) => tp.target && !getConstraintOfTypeParameter(tp.target) ? tp.target : tp),
|
|
108474
108474
|
isInJSFile(signature.declaration)
|
|
108475
108475
|
);
|
|
108476
108476
|
}
|
|
@@ -108481,8 +108481,8 @@ ${lanes.join("\n")}
|
|
|
108481
108481
|
return signature.baseSignatureCache;
|
|
108482
108482
|
}
|
|
108483
108483
|
const typeEraser = createTypeEraser(typeParameters);
|
|
108484
|
-
const baseConstraintMapper = createTypeMapper(typeParameters,
|
|
108485
|
-
let baseConstraints =
|
|
108484
|
+
const baseConstraintMapper = createTypeMapper(typeParameters, map22(typeParameters, (tp) => getConstraintOfTypeParameter(tp) || unknownType2));
|
|
108485
|
+
let baseConstraints = map22(typeParameters, (tp) => instantiateType(tp, baseConstraintMapper) || unknownType2);
|
|
108486
108486
|
for (let i = 0; i < typeParameters.length - 1; i++) {
|
|
108487
108487
|
baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper);
|
|
108488
108488
|
}
|
|
@@ -108752,7 +108752,7 @@ ${lanes.join("\n")}
|
|
|
108752
108752
|
return concatenate(type2.target.outerTypeParameters, (_a2 = type2.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray;
|
|
108753
108753
|
}
|
|
108754
108754
|
const node = type2.node;
|
|
108755
|
-
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type2.target.outerTypeParameters, getEffectiveTypeArguments2(node, type2.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
108755
|
+
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type2.target.outerTypeParameters, getEffectiveTypeArguments2(node, type2.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map22(node.elements, getTypeFromTypeNode);
|
|
108756
108756
|
if (popTypeResolution()) {
|
|
108757
108757
|
type2.resolvedTypeArguments ?? (type2.resolvedTypeArguments = type2.mapper ? instantiateTypes(typeArguments, type2.mapper) : typeArguments);
|
|
108758
108758
|
} else {
|
|
@@ -109158,7 +109158,7 @@ ${lanes.join("\n")}
|
|
|
109158
109158
|
return links.resolvedType;
|
|
109159
109159
|
}
|
|
109160
109160
|
function typeArgumentsFromTypeReferenceNode(node) {
|
|
109161
|
-
return
|
|
109161
|
+
return map22(node.typeArguments, getTypeFromTypeNode);
|
|
109162
109162
|
}
|
|
109163
109163
|
function getTypeFromTypeQueryNode(node) {
|
|
109164
109164
|
const links = getNodeLinks(node);
|
|
@@ -109631,8 +109631,8 @@ ${lanes.join("\n")}
|
|
|
109631
109631
|
if (elementType) {
|
|
109632
109632
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
109633
109633
|
}
|
|
109634
|
-
const elementFlags =
|
|
109635
|
-
return getTupleTargetType(elementFlags, readonly2,
|
|
109634
|
+
const elementFlags = map22(node.elements, getTupleElementFlags);
|
|
109635
|
+
return getTupleTargetType(elementFlags, readonly2, map22(node.elements, memberIfLabeledElementDeclaration));
|
|
109636
109636
|
}
|
|
109637
109637
|
function memberIfLabeledElementDeclaration(member) {
|
|
109638
109638
|
return isNamedTupleMember(member) || isParameter(member) ? member : void 0;
|
|
@@ -109705,7 +109705,7 @@ ${lanes.join("\n")}
|
|
|
109705
109705
|
void 0
|
|
109706
109706
|
);
|
|
109707
109707
|
} else {
|
|
109708
|
-
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
109708
|
+
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map22(node.elements, getTypeFromTypeNode);
|
|
109709
109709
|
links.resolvedType = createNormalizedTypeReference(target, elementTypes);
|
|
109710
109710
|
}
|
|
109711
109711
|
}
|
|
@@ -109715,7 +109715,7 @@ ${lanes.join("\n")}
|
|
|
109715
109715
|
return isTypeOperatorNode(node) && node.operator === 148;
|
|
109716
109716
|
}
|
|
109717
109717
|
function createTupleType(elementTypes, elementFlags, readonly2 = false, namedMemberDeclarations = []) {
|
|
109718
|
-
const tupleTarget = getTupleTargetType(elementFlags ||
|
|
109718
|
+
const tupleTarget = getTupleTargetType(elementFlags || map22(
|
|
109719
109719
|
elementTypes,
|
|
109720
109720
|
(_2) => 1
|
|
109721
109721
|
/* Required */
|
|
@@ -109726,7 +109726,7 @@ ${lanes.join("\n")}
|
|
|
109726
109726
|
if (elementFlags.length === 1 && elementFlags[0] & 4) {
|
|
109727
109727
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
109728
109728
|
}
|
|
109729
|
-
const key =
|
|
109729
|
+
const key = map22(elementFlags, (f) => f & 1 ? "#" : f & 2 ? "?" : f & 4 ? "." : "*").join() + (readonly2 ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map22(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
109730
109730
|
let type2 = tupleTypes.get(key);
|
|
109731
109731
|
if (!type2) {
|
|
109732
109732
|
tupleTypes.set(key, type2 = createTupleTargetType(elementFlags, readonly2, namedMemberDeclarations));
|
|
@@ -109801,7 +109801,7 @@ ${lanes.join("\n")}
|
|
|
109801
109801
|
if (target.combinedFlags & 8) {
|
|
109802
109802
|
const unionIndex = findIndex(elementTypes, (t, i) => !!(target.elementFlags[i] & 8 && t.flags & (131072 | 1048576)));
|
|
109803
109803
|
if (unionIndex >= 0) {
|
|
109804
|
-
return checkCrossProductUnion(
|
|
109804
|
+
return checkCrossProductUnion(map22(elementTypes, (t, i) => target.elementFlags[i] & 8 ? t : unknownType2)) ? mapType2(elementTypes[unionIndex], (t) => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t))) : errorType;
|
|
109805
109805
|
}
|
|
109806
109806
|
}
|
|
109807
109807
|
const expandedTypes = [];
|
|
@@ -109971,7 +109971,7 @@ ${lanes.join("\n")}
|
|
|
109971
109971
|
const source = types[i];
|
|
109972
109972
|
if (hasEmptyObject || source.flags & 469499904) {
|
|
109973
109973
|
if (source.flags & 262144 && getBaseConstraintOrType(source).flags & 1048576) {
|
|
109974
|
-
if (isTypeRelatedTo(source, getUnionType(
|
|
109974
|
+
if (isTypeRelatedTo(source, getUnionType(map22(types, (t) => t === source ? neverType2 : t)), strictSubtypeRelation)) {
|
|
109975
109975
|
orderedRemoveItemAt(types, i);
|
|
109976
109976
|
}
|
|
109977
109977
|
continue;
|
|
@@ -110234,7 +110234,7 @@ ${lanes.join("\n")}
|
|
|
110234
110234
|
const links = getNodeLinks(node);
|
|
110235
110235
|
if (!links.resolvedType) {
|
|
110236
110236
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
110237
|
-
links.resolvedType = getUnionType(
|
|
110237
|
+
links.resolvedType = getUnionType(map22(node.types, getTypeFromTypeNode), 1, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
110238
110238
|
}
|
|
110239
110239
|
return links.resolvedType;
|
|
110240
110240
|
}
|
|
@@ -110517,7 +110517,7 @@ ${lanes.join("\n")}
|
|
|
110517
110517
|
const links = getNodeLinks(node);
|
|
110518
110518
|
if (!links.resolvedType) {
|
|
110519
110519
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
110520
|
-
const types =
|
|
110520
|
+
const types = map22(node.types, getTypeFromTypeNode);
|
|
110521
110521
|
const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
|
|
110522
110522
|
const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType2;
|
|
110523
110523
|
const noSupertypeReduction = !!(t.flags & (4 | 8 | 64) || t.flags & 134217728 && isPatternLiteralType(t));
|
|
@@ -110626,8 +110626,8 @@ ${lanes.join("\n")}
|
|
|
110626
110626
|
}
|
|
110627
110627
|
function getLiteralTypeFromProperties(type2, include, includeOrigin) {
|
|
110628
110628
|
const origin = includeOrigin && (getObjectFlags(type2) & (3 | 4) || type2.aliasSymbol) ? createOriginIndexType(type2) : void 0;
|
|
110629
|
-
const propertyTypes =
|
|
110630
|
-
const indexKeyTypes =
|
|
110629
|
+
const propertyTypes = map22(getPropertiesOfType(type2), (prop) => getLiteralTypeFromProperty(prop, include));
|
|
110630
|
+
const indexKeyTypes = map22(getIndexInfosOfType(type2), (info) => info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ? info.keyType === stringType2 && include & 8 ? stringOrNumberType : info.keyType : neverType2);
|
|
110631
110631
|
return getUnionType(
|
|
110632
110632
|
concatenate(propertyTypes, indexKeyTypes),
|
|
110633
110633
|
1,
|
|
@@ -110647,7 +110647,7 @@ ${lanes.join("\n")}
|
|
|
110647
110647
|
}
|
|
110648
110648
|
function getIndexType(type2, indexFlags = 0) {
|
|
110649
110649
|
type2 = getReducedType(type2);
|
|
110650
|
-
return isNoInferType(type2) ? getNoInferType(getIndexType(type2.baseType, indexFlags)) : shouldDeferIndexType(type2, indexFlags) ? getIndexTypeForGenericType(type2, indexFlags) : type2.flags & 1048576 ? getIntersectionType(
|
|
110650
|
+
return isNoInferType(type2) ? getNoInferType(getIndexType(type2.baseType, indexFlags)) : shouldDeferIndexType(type2, indexFlags) ? getIndexTypeForGenericType(type2, indexFlags) : type2.flags & 1048576 ? getIntersectionType(map22(type2.types, (t) => getIndexType(t, indexFlags))) : type2.flags & 2097152 ? getUnionType(map22(type2.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type2) & 32 ? getIndexTypeForMappedType(type2, indexFlags) : type2 === wildcardType ? wildcardType : type2.flags & 2 ? neverType2 : type2.flags & (1 | 131072) ? stringNumberSymbolType : getLiteralTypeFromProperties(
|
|
110651
110651
|
type2,
|
|
110652
110652
|
(indexFlags & 2 ? 128 : 402653316) | (indexFlags & 1 ? 0 : 296 | 12288),
|
|
110653
110653
|
indexFlags === 0
|
|
@@ -110685,8 +110685,8 @@ ${lanes.join("\n")}
|
|
|
110685
110685
|
const links = getNodeLinks(node);
|
|
110686
110686
|
if (!links.resolvedType) {
|
|
110687
110687
|
links.resolvedType = getTemplateLiteralType(
|
|
110688
|
-
[node.head.text, ...
|
|
110689
|
-
|
|
110688
|
+
[node.head.text, ...map22(node.templateSpans, (span) => span.literal.text)],
|
|
110689
|
+
map22(node.templateSpans, (span) => getTypeFromTypeNode(span.type))
|
|
110690
110690
|
);
|
|
110691
110691
|
}
|
|
110692
110692
|
return links.resolvedType;
|
|
@@ -110717,7 +110717,7 @@ ${lanes.join("\n")}
|
|
|
110717
110717
|
return newTypes[0];
|
|
110718
110718
|
}
|
|
110719
110719
|
}
|
|
110720
|
-
const id = `${getTypeListId(newTypes)}|${
|
|
110720
|
+
const id = `${getTypeListId(newTypes)}|${map22(newTexts, (t) => t.length).join(",")}|${newTexts.join("")}`;
|
|
110721
110721
|
let type2 = templateLiteralTypes.get(id);
|
|
110722
110722
|
if (!type2) {
|
|
110723
110723
|
templateLiteralTypes.set(id, type2 = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -110947,7 +110947,7 @@ ${lanes.join("\n")}
|
|
|
110947
110947
|
diagnostics.add(createDiagnosticForNode(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, indexType.value, typeToString(objectType2)));
|
|
110948
110948
|
return undefinedType2;
|
|
110949
110949
|
} else if (indexType.flags & (8 | 4)) {
|
|
110950
|
-
const types =
|
|
110950
|
+
const types = map22(objectType2.properties, (property) => {
|
|
110951
110951
|
return getTypeOfSymbol(property);
|
|
110952
110952
|
});
|
|
110953
110953
|
return getUnionType(append(types, undefinedType2));
|
|
@@ -111108,13 +111108,13 @@ ${lanes.join("\n")}
|
|
|
111108
111108
|
}
|
|
111109
111109
|
function distributeIndexOverObjectType(objectType2, indexType, writing) {
|
|
111110
111110
|
if (objectType2.flags & 1048576 || objectType2.flags & 2097152 && !shouldDeferIndexType(objectType2)) {
|
|
111111
|
-
const types =
|
|
111111
|
+
const types = map22(objectType2.types, (t) => getSimplifiedType(getIndexedAccessType(t, indexType), writing));
|
|
111112
111112
|
return objectType2.flags & 2097152 || writing ? getIntersectionType(types) : getUnionType(types);
|
|
111113
111113
|
}
|
|
111114
111114
|
}
|
|
111115
111115
|
function distributeObjectOverIndexType(objectType2, indexType, writing) {
|
|
111116
111116
|
if (indexType.flags & 1048576) {
|
|
111117
|
-
const types =
|
|
111117
|
+
const types = map22(indexType.types, (t) => getSimplifiedType(getIndexedAccessType(objectType2, t), writing));
|
|
111118
111118
|
return writing ? getIntersectionType(types) : getUnionType(types);
|
|
111119
111119
|
}
|
|
111120
111120
|
}
|
|
@@ -111397,7 +111397,7 @@ ${lanes.join("\n")}
|
|
|
111397
111397
|
const newRoot = newType.root;
|
|
111398
111398
|
if (newRoot.outerTypeParameters) {
|
|
111399
111399
|
const typeParamMapper = combineTypeMappers(newType.mapper, newMapper);
|
|
111400
|
-
const typeArguments =
|
|
111400
|
+
const typeArguments = map22(newRoot.outerTypeParameters, (t) => getMappedType(t, typeParamMapper));
|
|
111401
111401
|
const newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments);
|
|
111402
111402
|
const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : void 0;
|
|
111403
111403
|
if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 | 131072))) {
|
|
@@ -112058,7 +112058,7 @@ ${lanes.join("\n")}
|
|
|
112058
112058
|
}
|
|
112059
112059
|
function createBackreferenceMapper(context, index) {
|
|
112060
112060
|
const forwardInferences = context.inferences.slice(index);
|
|
112061
|
-
return createTypeMapper(
|
|
112061
|
+
return createTypeMapper(map22(forwardInferences, (i) => i.typeParameter), map22(forwardInferences, () => unknownType2));
|
|
112062
112062
|
}
|
|
112063
112063
|
function createOuterReturnMapper(context) {
|
|
112064
112064
|
return context.outerReturnMapper ?? (context.outerReturnMapper = mergeTypeMappers(context.returnMapper, cloneInferenceContext(context).mapper));
|
|
@@ -112089,7 +112089,7 @@ ${lanes.join("\n")}
|
|
|
112089
112089
|
function instantiateSignature(signature, mapper, eraseTypeParameters) {
|
|
112090
112090
|
let freshTypeParameters;
|
|
112091
112091
|
if (signature.typeParameters && !eraseTypeParameters) {
|
|
112092
|
-
freshTypeParameters =
|
|
112092
|
+
freshTypeParameters = map22(signature.typeParameters, cloneTypeParameter);
|
|
112093
112093
|
mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper);
|
|
112094
112094
|
for (const tp of freshTypeParameters) {
|
|
112095
112095
|
tp.mapper = mapper;
|
|
@@ -112161,7 +112161,7 @@ ${lanes.join("\n")}
|
|
|
112161
112161
|
}
|
|
112162
112162
|
if (typeParameters.length) {
|
|
112163
112163
|
const combinedMapper = combineTypeMappers(type2.mapper, mapper);
|
|
112164
|
-
const typeArguments =
|
|
112164
|
+
const typeArguments = map22(typeParameters, (t) => getMappedType(t, combinedMapper));
|
|
112165
112165
|
const newAliasSymbol = aliasSymbol || type2.aliasSymbol;
|
|
112166
112166
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type2.aliasTypeArguments, mapper);
|
|
112167
112167
|
const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments);
|
|
@@ -112273,7 +112273,7 @@ ${lanes.join("\n")}
|
|
|
112273
112273
|
return instantiateMappedTupleType(t, type2, typeVariable, mapper);
|
|
112274
112274
|
}
|
|
112275
112275
|
if (isArrayOrTupleOrIntersection(t)) {
|
|
112276
|
-
return getIntersectionType(
|
|
112276
|
+
return getIntersectionType(map22(t.types, instantiateConstituent));
|
|
112277
112277
|
}
|
|
112278
112278
|
}
|
|
112279
112279
|
return instantiateAnonymousType(type2, prependTypeMapping(typeVariable, t, mapper));
|
|
@@ -112288,12 +112288,12 @@ ${lanes.join("\n")}
|
|
|
112288
112288
|
const elementFlags = tupleType2.target.elementFlags;
|
|
112289
112289
|
const fixedLength = tupleType2.target.fixedLength;
|
|
112290
112290
|
const fixedMapper = fixedLength ? prependTypeMapping(typeVariable, tupleType2, mapper) : mapper;
|
|
112291
|
-
const newElementTypes =
|
|
112291
|
+
const newElementTypes = map22(getElementTypes(tupleType2), (type2, i) => {
|
|
112292
112292
|
const flags = elementFlags[i];
|
|
112293
112293
|
return i < fixedLength ? instantiateMappedTypeTemplate(mappedType, getStringLiteralType("" + i), !!(flags & 2), fixedMapper) : flags & 8 ? instantiateType(mappedType, prependTypeMapping(typeVariable, type2, mapper)) : getElementTypeOfArrayType(instantiateType(mappedType, prependTypeMapping(typeVariable, createArrayType(type2), mapper))) ?? unknownType2;
|
|
112294
112294
|
});
|
|
112295
112295
|
const modifiers = getMappedTypeModifiers(mappedType);
|
|
112296
|
-
const newElementFlags = modifiers & 4 ?
|
|
112296
|
+
const newElementFlags = modifiers & 4 ? map22(elementFlags, (f) => f & 1 ? 2 : f) : modifiers & 8 ? map22(elementFlags, (f) => f & 2 ? 1 : f) : elementFlags;
|
|
112297
112297
|
const newReadonly = getModifiedReadonlyState(tupleType2.target.readonly, getMappedTypeModifiers(mappedType));
|
|
112298
112298
|
return contains(newElementTypes, errorType) ? errorType : createTupleType(newElementTypes, newElementFlags, newReadonly, tupleType2.target.labeledElementDeclarations);
|
|
112299
112299
|
}
|
|
@@ -112349,7 +112349,7 @@ ${lanes.join("\n")}
|
|
|
112349
112349
|
function getConditionalTypeInstantiation(type2, mapper, forConstraint, aliasSymbol, aliasTypeArguments) {
|
|
112350
112350
|
const root = type2.root;
|
|
112351
112351
|
if (root.outerTypeParameters) {
|
|
112352
|
-
const typeArguments =
|
|
112352
|
+
const typeArguments = map22(root.outerTypeParameters, (t) => getMappedType(t, mapper));
|
|
112353
112353
|
const id = (forConstraint ? "C" : "") + getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
112354
112354
|
let result = root.instantiations.get(id);
|
|
112355
112355
|
if (!result) {
|
|
@@ -112581,7 +112581,7 @@ ${lanes.join("\n")}
|
|
|
112581
112581
|
return result;
|
|
112582
112582
|
}
|
|
112583
112583
|
} else if (type2.flags & 2097152) {
|
|
112584
|
-
return getIntersectionType(
|
|
112584
|
+
return getIntersectionType(map22(type2.types, getTypeWithoutSignatures));
|
|
112585
112585
|
}
|
|
112586
112586
|
return type2;
|
|
112587
112587
|
}
|
|
@@ -112737,7 +112737,7 @@ ${lanes.join("\n")}
|
|
|
112737
112737
|
}
|
|
112738
112738
|
const returnExpression = node.body;
|
|
112739
112739
|
const sourceReturn = getReturnTypeOfSignature(sourceSig);
|
|
112740
|
-
const targetReturn = getUnionType(
|
|
112740
|
+
const targetReturn = getUnionType(map22(targetSignatures, getReturnTypeOfSignature));
|
|
112741
112741
|
if (!checkTypeRelatedTo(
|
|
112742
112742
|
sourceReturn,
|
|
112743
112743
|
targetReturn,
|
|
@@ -115576,9 +115576,9 @@ ${lanes.join("\n")}
|
|
|
115576
115576
|
false
|
|
115577
115577
|
)) {
|
|
115578
115578
|
if (props.length > 5) {
|
|
115579
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2),
|
|
115579
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2), map22(props.slice(0, 4), (p) => symbolToString(p)).join(", "), props.length - 4);
|
|
115580
115580
|
} else {
|
|
115581
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2),
|
|
115581
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2), map22(props, (p) => symbolToString(p)).join(", "));
|
|
115582
115582
|
}
|
|
115583
115583
|
if (shouldSkipElaboration && errorInfo) {
|
|
115584
115584
|
overrideNextErrorInfo++;
|
|
@@ -117155,7 +117155,7 @@ ${lanes.join("\n")}
|
|
|
117155
117155
|
return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable);
|
|
117156
117156
|
}
|
|
117157
117157
|
function cloneInferenceContext(context, extraFlags = 0) {
|
|
117158
|
-
return context && createInferenceContextWorker(
|
|
117158
|
+
return context && createInferenceContextWorker(map22(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes);
|
|
117159
117159
|
}
|
|
117160
117160
|
function createInferenceContextWorker(inferences, signature, flags, compareTypes) {
|
|
117161
117161
|
const context = {
|
|
@@ -117173,8 +117173,8 @@ ${lanes.join("\n")}
|
|
|
117173
117173
|
}
|
|
117174
117174
|
function makeFixingMapperForContext(context) {
|
|
117175
117175
|
return makeDeferredTypeMapper(
|
|
117176
|
-
|
|
117177
|
-
|
|
117176
|
+
map22(context.inferences, (i) => i.typeParameter),
|
|
117177
|
+
map22(context.inferences, (inference, i) => () => {
|
|
117178
117178
|
if (!inference.isFixed) {
|
|
117179
117179
|
inferFromIntraExpressionSites(context);
|
|
117180
117180
|
clearCachedInferences(context.inferences);
|
|
@@ -117186,8 +117186,8 @@ ${lanes.join("\n")}
|
|
|
117186
117186
|
}
|
|
117187
117187
|
function makeNonFixingMapperForContext(context) {
|
|
117188
117188
|
return makeDeferredTypeMapper(
|
|
117189
|
-
|
|
117190
|
-
|
|
117189
|
+
map22(context.inferences, (i) => i.typeParameter),
|
|
117190
|
+
map22(context.inferences, (_2, i) => () => {
|
|
117191
117191
|
return getInferredType(context, i);
|
|
117192
117192
|
})
|
|
117193
117193
|
);
|
|
@@ -117247,7 +117247,7 @@ ${lanes.join("\n")}
|
|
|
117247
117247
|
}
|
|
117248
117248
|
function cloneInferredPartOfContext(context) {
|
|
117249
117249
|
const inferences = filter3(context.inferences, hasInferenceCandidates);
|
|
117250
|
-
return inferences.length ? createInferenceContextWorker(
|
|
117250
|
+
return inferences.length ? createInferenceContextWorker(map22(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0;
|
|
117251
117251
|
}
|
|
117252
117252
|
function getMapperFromContext(context) {
|
|
117253
117253
|
return context && context.mapper;
|
|
@@ -117335,7 +117335,7 @@ ${lanes.join("\n")}
|
|
|
117335
117335
|
return createArrayType(elementType, isReadonlyArrayType(source));
|
|
117336
117336
|
}
|
|
117337
117337
|
if (isTupleType(source)) {
|
|
117338
|
-
const elementTypes =
|
|
117338
|
+
const elementTypes = map22(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint));
|
|
117339
117339
|
if (!every(elementTypes, (t) => !!t)) {
|
|
117340
117340
|
return void 0;
|
|
117341
117341
|
}
|
|
@@ -117505,7 +117505,7 @@ ${lanes.join("\n")}
|
|
|
117505
117505
|
return false;
|
|
117506
117506
|
}
|
|
117507
117507
|
function inferTypesFromTemplateLiteralType(source, target) {
|
|
117508
|
-
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ?
|
|
117508
|
+
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ? map22(source.types, (s, i) => {
|
|
117509
117509
|
return isTypeAssignableTo(getBaseConstraintOrType(s), getBaseConstraintOrType(target.types[i])) ? s : getStringLikeTypeForType(s);
|
|
117510
117510
|
}) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0;
|
|
117511
117511
|
}
|
|
@@ -117969,8 +117969,8 @@ ${lanes.join("\n")}
|
|
|
117969
117969
|
if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) {
|
|
117970
117970
|
return true;
|
|
117971
117971
|
}
|
|
117972
|
-
const propTypes =
|
|
117973
|
-
const indexTypes =
|
|
117972
|
+
const propTypes = map22(getPropertiesOfType(source), getTypeOfSymbol);
|
|
117973
|
+
const indexTypes = map22(getIndexInfosOfType(source), (info) => info !== enumNumberIndexInfo ? info.type : neverType2);
|
|
117974
117974
|
inferFromTypes(getUnionType(concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target));
|
|
117975
117975
|
return true;
|
|
117976
117976
|
}
|
|
@@ -118569,7 +118569,7 @@ ${lanes.join("\n")}
|
|
|
118569
118569
|
return result;
|
|
118570
118570
|
}
|
|
118571
118571
|
function mapTypesByKeyProperty(types, name2) {
|
|
118572
|
-
const
|
|
118572
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
118573
118573
|
let count = 0;
|
|
118574
118574
|
for (const type2 of types) {
|
|
118575
118575
|
if (type2.flags & (524288 | 2097152 | 58982400)) {
|
|
@@ -118581,11 +118581,11 @@ ${lanes.join("\n")}
|
|
|
118581
118581
|
let duplicate = false;
|
|
118582
118582
|
forEachType(discriminant, (t) => {
|
|
118583
118583
|
const id = getTypeId(getRegularTypeOfLiteralType(t));
|
|
118584
|
-
const existing =
|
|
118584
|
+
const existing = map23.get(id);
|
|
118585
118585
|
if (!existing) {
|
|
118586
|
-
|
|
118586
|
+
map23.set(id, type2);
|
|
118587
118587
|
} else if (existing !== unknownType2) {
|
|
118588
|
-
|
|
118588
|
+
map23.set(id, unknownType2);
|
|
118589
118589
|
duplicate = true;
|
|
118590
118590
|
}
|
|
118591
118591
|
});
|
|
@@ -118593,7 +118593,7 @@ ${lanes.join("\n")}
|
|
|
118593
118593
|
}
|
|
118594
118594
|
}
|
|
118595
118595
|
}
|
|
118596
|
-
return count >= 10 && count * 2 >= types.length ?
|
|
118596
|
+
return count >= 10 && count * 2 >= types.length ? map23 : void 0;
|
|
118597
118597
|
}
|
|
118598
118598
|
function getKeyPropertyName(unionType2) {
|
|
118599
118599
|
const types = unionType2.types;
|
|
@@ -119057,7 +119057,7 @@ ${lanes.join("\n")}
|
|
|
119057
119057
|
) : type2;
|
|
119058
119058
|
}
|
|
119059
119059
|
function mapTypeWithAlias(type2, mapper, aliasSymbol, aliasTypeArguments) {
|
|
119060
|
-
return type2.flags & 1048576 && aliasSymbol ? getUnionType(
|
|
119060
|
+
return type2.flags & 1048576 && aliasSymbol ? getUnionType(map22(type2.types, mapper), 1, aliasSymbol, aliasTypeArguments) : mapType2(type2, mapper);
|
|
119061
119061
|
}
|
|
119062
119062
|
function extractTypesOfKind(type2, kind) {
|
|
119063
119063
|
return filterType(type2, (t) => (t.flags & kind) !== 0);
|
|
@@ -119825,7 +119825,7 @@ ${lanes.join("\n")}
|
|
|
119825
119825
|
}
|
|
119826
119826
|
function getUnionOrEvolvingArrayType(types, subtypeReduction) {
|
|
119827
119827
|
if (isEvolvingArrayTypeList(types)) {
|
|
119828
|
-
return getEvolvingArrayType(getUnionType(
|
|
119828
|
+
return getEvolvingArrayType(getUnionType(map22(types, getElementTypeOfEvolvingArrayType)));
|
|
119829
119829
|
}
|
|
119830
119830
|
const result = recombineUnknownType(getUnionType(sameMap(types, finalizeEvolvingArrayType), subtypeReduction));
|
|
119831
119831
|
if (result !== declaredType && result.flags & declaredType.flags & 1048576 && arrayIsEqualTo(result.types, declaredType.types)) {
|
|
@@ -119919,7 +119919,7 @@ ${lanes.join("\n")}
|
|
|
119919
119919
|
function narrowTypeBySwitchOnDiscriminantProperty(type2, access, data) {
|
|
119920
119920
|
if (data.clauseStart < data.clauseEnd && type2.flags & 1048576 && getKeyPropertyName(type2) === getAccessedPropertyName(access)) {
|
|
119921
119921
|
const clauseTypes = getSwitchClauseTypes(data.switchStatement).slice(data.clauseStart, data.clauseEnd);
|
|
119922
|
-
const candidate = getUnionType(
|
|
119922
|
+
const candidate = getUnionType(map22(clauseTypes, (t) => getConstituentTypeForKeyType(type2, t) || unknownType2));
|
|
119923
119923
|
if (candidate !== unknownType2) {
|
|
119924
119924
|
return candidate;
|
|
119925
119925
|
}
|
|
@@ -120347,7 +120347,7 @@ ${lanes.join("\n")}
|
|
|
120347
120347
|
return filterType(type2, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);
|
|
120348
120348
|
}
|
|
120349
120349
|
const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);
|
|
120350
|
-
return getUnionType(
|
|
120350
|
+
return getUnionType(map22(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type2, text) : neverType2));
|
|
120351
120351
|
}
|
|
120352
120352
|
function narrowTypeBySwitchOnTrue(type2, { switchStatement, clauseStart, clauseEnd }) {
|
|
120353
120353
|
const defaultIndex = findIndex(
|
|
@@ -120382,7 +120382,7 @@ ${lanes.join("\n")}
|
|
|
120382
120382
|
return type2;
|
|
120383
120383
|
}
|
|
120384
120384
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
120385
|
-
return getUnionType(
|
|
120385
|
+
return getUnionType(map22(clauses, (clause) => clause.kind === 297 ? narrowType(
|
|
120386
120386
|
type2,
|
|
120387
120387
|
clause.expression,
|
|
120388
120388
|
/*assumeTrue*/
|
|
@@ -120474,7 +120474,7 @@ ${lanes.join("\n")}
|
|
|
120474
120474
|
/* Construct */
|
|
120475
120475
|
);
|
|
120476
120476
|
if (constructSignatures.length) {
|
|
120477
|
-
return getUnionType(
|
|
120477
|
+
return getUnionType(map22(constructSignatures, (signature) => getReturnTypeOfSignature(getErasedSignature(signature))));
|
|
120478
120478
|
}
|
|
120479
120479
|
return emptyObjectType;
|
|
120480
120480
|
}
|
|
@@ -122644,7 +122644,7 @@ ${lanes.join("\n")}
|
|
|
122644
122644
|
getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(
|
|
122645
122645
|
contextualType,
|
|
122646
122646
|
concatenate(
|
|
122647
|
-
|
|
122647
|
+
map22(
|
|
122648
122648
|
filter3(node.properties, (p) => {
|
|
122649
122649
|
if (!p.symbol) {
|
|
122650
122650
|
return false;
|
|
@@ -122659,7 +122659,7 @@ ${lanes.join("\n")}
|
|
|
122659
122659
|
}),
|
|
122660
122660
|
(prop) => [() => getContextFreeTypeOfExpression(prop.kind === 304 ? prop.initializer : prop.name), prop.symbol.escapedName]
|
|
122661
122661
|
),
|
|
122662
|
-
|
|
122662
|
+
map22(
|
|
122663
122663
|
filter3(getPropertiesOfType(contextualType), (s) => {
|
|
122664
122664
|
var _a2;
|
|
122665
122665
|
return !!(s.flags & 16777216) && !!((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);
|
|
@@ -122681,11 +122681,11 @@ ${lanes.join("\n")}
|
|
|
122681
122681
|
discriminateTypeByDiscriminableItems(
|
|
122682
122682
|
contextualType,
|
|
122683
122683
|
concatenate(
|
|
122684
|
-
|
|
122684
|
+
map22(
|
|
122685
122685
|
filter3(node.properties, (p) => !!p.symbol && p.kind === 292 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))),
|
|
122686
122686
|
(prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName]
|
|
122687
122687
|
),
|
|
122688
|
-
|
|
122688
|
+
map22(
|
|
122689
122689
|
filter3(getPropertiesOfType(contextualType), (s) => {
|
|
122690
122690
|
var _a2;
|
|
122691
122691
|
if (!(s.flags & 16777216) || !((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members)) {
|
|
@@ -122744,13 +122744,13 @@ ${lanes.join("\n")}
|
|
|
122744
122744
|
}
|
|
122745
122745
|
if (type2.flags & 1048576) {
|
|
122746
122746
|
return getUnionType(
|
|
122747
|
-
|
|
122747
|
+
map22(type2.types, (t) => instantiateInstantiableTypes(t, mapper)),
|
|
122748
122748
|
0
|
|
122749
122749
|
/* None */
|
|
122750
122750
|
);
|
|
122751
122751
|
}
|
|
122752
122752
|
if (type2.flags & 2097152) {
|
|
122753
|
-
return getIntersectionType(
|
|
122753
|
+
return getIntersectionType(map22(type2.types, (t) => instantiateInstantiableTypes(t, mapper)));
|
|
122754
122754
|
}
|
|
122755
122755
|
return type2;
|
|
122756
122756
|
}
|
|
@@ -124080,7 +124080,7 @@ ${lanes.join("\n")}
|
|
|
124080
124080
|
);
|
|
124081
124081
|
}
|
|
124082
124082
|
if (signatures.length === 0 && apparentElemType.flags & 1048576) {
|
|
124083
|
-
signatures = getUnionSignatures(
|
|
124083
|
+
signatures = getUnionSignatures(map22(apparentElemType.types, (t) => getUninstantiatedJsxSignaturesOfType(t, caller)));
|
|
124084
124084
|
}
|
|
124085
124085
|
return signatures;
|
|
124086
124086
|
}
|
|
@@ -125554,7 +125554,7 @@ ${lanes.join("\n")}
|
|
|
125554
125554
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
125555
125555
|
const isJavascript = isInJSFile(signature.declaration);
|
|
125556
125556
|
const typeParameters = signature.typeParameters;
|
|
125557
|
-
const typeArgumentTypes = fillMissingTypeArguments(
|
|
125557
|
+
const typeArgumentTypes = fillMissingTypeArguments(map22(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript);
|
|
125558
125558
|
let mapper;
|
|
125559
125559
|
for (let i = 0; i < typeArgumentNodes.length; i++) {
|
|
125560
125560
|
Debug.assert(typeParameters[i] !== void 0, "Should not call checkTypeArguments with too many type arguments");
|
|
@@ -126235,7 +126235,7 @@ ${lanes.join("\n")}
|
|
|
126235
126235
|
const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
|
|
126236
126236
|
Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
126237
126237
|
let chain = chainDiagnosticMessages(
|
|
126238
|
-
|
|
126238
|
+
map22(diags, createDiagnosticMessageChainFromDiagnostic),
|
|
126239
126239
|
Diagnostics.No_overload_matches_this_call
|
|
126240
126240
|
);
|
|
126241
126241
|
if (headMessage) {
|
|
@@ -130803,7 +130803,7 @@ ${lanes.join("\n")}
|
|
|
130803
130803
|
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
130804
130804
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
130805
130805
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
130806
|
-
const inferences =
|
|
130806
|
+
const inferences = map22(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
130807
130807
|
applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
130808
130808
|
inferTypes(
|
|
130809
130809
|
inferences,
|
|
@@ -131751,7 +131751,7 @@ ${lanes.join("\n")}
|
|
|
131751
131751
|
return getEffectiveTypeArguments2(node, typeParameters)[index];
|
|
131752
131752
|
}
|
|
131753
131753
|
function getEffectiveTypeArguments2(node, typeParameters) {
|
|
131754
|
-
return fillMissingTypeArguments(
|
|
131754
|
+
return fillMissingTypeArguments(map22(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node));
|
|
131755
131755
|
}
|
|
131756
131756
|
function checkTypeArgumentConstraints(node, typeParameters) {
|
|
131757
131757
|
let typeArguments;
|
|
@@ -132397,7 +132397,7 @@ ${lanes.join("\n")}
|
|
|
132397
132397
|
return void 0;
|
|
132398
132398
|
}
|
|
132399
132399
|
const onfulfilledParameterType = getTypeWithFacts(
|
|
132400
|
-
getUnionType(
|
|
132400
|
+
getUnionType(map22(candidates, getTypeOfFirstParameterOfSignature)),
|
|
132401
132401
|
2097152
|
|
132402
132402
|
/* NEUndefinedOrNull */
|
|
132403
132403
|
);
|
|
@@ -132416,7 +132416,7 @@ ${lanes.join("\n")}
|
|
|
132416
132416
|
return void 0;
|
|
132417
132417
|
}
|
|
132418
132418
|
return typeAsPromise.promisedTypeOfPromise = getUnionType(
|
|
132419
|
-
|
|
132419
|
+
map22(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature),
|
|
132420
132420
|
2
|
|
132421
132421
|
/* Subtype */
|
|
132422
132422
|
);
|
|
@@ -133182,13 +133182,13 @@ ${lanes.join("\n")}
|
|
|
133182
133182
|
function isTypeParameterUnused(typeParameter) {
|
|
133183
133183
|
return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144) && !isIdentifierThatStartsWithUnderscore(typeParameter.name);
|
|
133184
133184
|
}
|
|
133185
|
-
function addToGroup(
|
|
133185
|
+
function addToGroup(map23, key, value, getKey) {
|
|
133186
133186
|
const keyString = String(getKey(key));
|
|
133187
|
-
const group2 =
|
|
133187
|
+
const group2 = map23.get(keyString);
|
|
133188
133188
|
if (group2) {
|
|
133189
133189
|
group2[1].push(value);
|
|
133190
133190
|
} else {
|
|
133191
|
-
|
|
133191
|
+
map23.set(keyString, [key, [value]]);
|
|
133192
133192
|
}
|
|
133193
133193
|
}
|
|
133194
133194
|
function tryGetRootParameterDeclaration(node) {
|
|
@@ -134415,7 +134415,7 @@ ${lanes.join("\n")}
|
|
|
134415
134415
|
}
|
|
134416
134416
|
return noCache ? noIterationTypes : setCachedIterationTypes(type2, resolver.iterableCacheKey, noIterationTypes);
|
|
134417
134417
|
}
|
|
134418
|
-
const iteratorType = getIntersectionType(
|
|
134418
|
+
const iteratorType = getIntersectionType(map22(validSignatures, getReturnTypeOfSignature));
|
|
134419
134419
|
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
|
|
134420
134420
|
return noCache ? iterationTypes : setCachedIterationTypes(type2, resolver.iterableCacheKey, iterationTypes);
|
|
134421
134421
|
}
|
|
@@ -135634,7 +135634,7 @@ ${lanes.join("\n")}
|
|
|
135634
135634
|
error210(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first(memberInfo.missedProperties), memberInfo.baseTypeName);
|
|
135635
135635
|
}
|
|
135636
135636
|
} else if (length(memberInfo.missedProperties) > 5) {
|
|
135637
|
-
const missedProperties =
|
|
135637
|
+
const missedProperties = map22(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
|
|
135638
135638
|
const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
|
|
135639
135639
|
if (isClassExpression(errorNode)) {
|
|
135640
135640
|
error210(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
|
|
@@ -135642,7 +135642,7 @@ ${lanes.join("\n")}
|
|
|
135642
135642
|
error210(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, memberInfo.typeName, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
|
|
135643
135643
|
}
|
|
135644
135644
|
} else {
|
|
135645
|
-
const missedProperties =
|
|
135645
|
+
const missedProperties = map22(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
|
|
135646
135646
|
if (isClassExpression(errorNode)) {
|
|
135647
135647
|
error210(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
|
|
135648
135648
|
} else {
|
|
@@ -137757,7 +137757,7 @@ ${lanes.join("\n")}
|
|
|
137757
137757
|
} else if (symbol2) {
|
|
137758
137758
|
const symbolLinks2 = getSymbolLinks(symbol2);
|
|
137759
137759
|
const declarationList = mapDefined(infos, (i) => i.declaration);
|
|
137760
|
-
const nodeListId =
|
|
137760
|
+
const nodeListId = map22(declarationList, getNodeId).join(",");
|
|
137761
137761
|
if (!symbolLinks2.filteredIndexSymbolCache) {
|
|
137762
137762
|
symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();
|
|
137763
137763
|
}
|
|
@@ -139013,7 +139013,7 @@ ${lanes.join("\n")}
|
|
|
139013
139013
|
const newComponents = filter3(info.components, (e) => {
|
|
139014
139014
|
return !hasLateBindableName(e);
|
|
139015
139015
|
});
|
|
139016
|
-
result.push(...
|
|
139016
|
+
result.push(...map22(newComponents, (e) => {
|
|
139017
139017
|
trackComputedName(e.name.expression);
|
|
139018
139018
|
const mods = infoList === staticInfos ? [factory.createModifier(
|
|
139019
139019
|
126
|
|
@@ -140976,7 +140976,7 @@ ${lanes.join("\n")}
|
|
|
140976
140976
|
if (sourceProperties) {
|
|
140977
140977
|
const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target);
|
|
140978
140978
|
if (sourcePropertiesFiltered) {
|
|
140979
|
-
const discriminated = discriminateTypeByDiscriminableItems(target,
|
|
140979
|
+
const discriminated = discriminateTypeByDiscriminableItems(target, map22(sourcePropertiesFiltered, (p) => [() => getTypeOfSymbol(p), p.escapedName]), isRelatedTo);
|
|
140980
140980
|
if (discriminated !== target) {
|
|
140981
140981
|
return discriminated;
|
|
140982
140982
|
}
|
|
@@ -143012,13 +143012,13 @@ ${lanes.join("\n")}
|
|
|
143012
143012
|
}
|
|
143013
143013
|
exit();
|
|
143014
143014
|
}
|
|
143015
|
-
function appendSourceMap(generatedLine, generatedCharacter,
|
|
143015
|
+
function appendSourceMap(generatedLine, generatedCharacter, map23, sourceMapPath, start2, end) {
|
|
143016
143016
|
Debug.assert(generatedLine >= pendingGeneratedLine, "generatedLine cannot backtrack");
|
|
143017
143017
|
Debug.assert(generatedCharacter >= 0, "generatedCharacter cannot be negative");
|
|
143018
143018
|
enter();
|
|
143019
143019
|
const sourceIndexToNewSourceIndexMap = [];
|
|
143020
143020
|
let nameIndexToNewNameIndexMap;
|
|
143021
|
-
const mappingIterator = decodeMappings(
|
|
143021
|
+
const mappingIterator = decodeMappings(map23.mappings);
|
|
143022
143022
|
for (const raw of mappingIterator) {
|
|
143023
143023
|
if (end && (raw.generatedLine > end.line || raw.generatedLine === end.line && raw.generatedCharacter > end.character)) {
|
|
143024
143024
|
break;
|
|
@@ -143033,21 +143033,21 @@ ${lanes.join("\n")}
|
|
|
143033
143033
|
if (raw.sourceIndex !== void 0) {
|
|
143034
143034
|
newSourceIndex = sourceIndexToNewSourceIndexMap[raw.sourceIndex];
|
|
143035
143035
|
if (newSourceIndex === void 0) {
|
|
143036
|
-
const rawPath =
|
|
143037
|
-
const relativePath =
|
|
143036
|
+
const rawPath = map23.sources[raw.sourceIndex];
|
|
143037
|
+
const relativePath = map23.sourceRoot ? combinePaths(map23.sourceRoot, rawPath) : rawPath;
|
|
143038
143038
|
const combinedPath = combinePaths(getDirectoryPath(sourceMapPath), relativePath);
|
|
143039
143039
|
sourceIndexToNewSourceIndexMap[raw.sourceIndex] = newSourceIndex = addSource(combinedPath);
|
|
143040
|
-
if (
|
|
143041
|
-
setSourceContent(newSourceIndex,
|
|
143040
|
+
if (map23.sourcesContent && typeof map23.sourcesContent[raw.sourceIndex] === "string") {
|
|
143041
|
+
setSourceContent(newSourceIndex, map23.sourcesContent[raw.sourceIndex]);
|
|
143042
143042
|
}
|
|
143043
143043
|
}
|
|
143044
143044
|
newSourceLine = raw.sourceLine;
|
|
143045
143045
|
newSourceCharacter = raw.sourceCharacter;
|
|
143046
|
-
if (
|
|
143046
|
+
if (map23.names && raw.nameIndex !== void 0) {
|
|
143047
143047
|
if (!nameIndexToNewNameIndexMap) nameIndexToNewNameIndexMap = [];
|
|
143048
143048
|
newNameIndex = nameIndexToNewNameIndexMap[raw.nameIndex];
|
|
143049
143049
|
if (newNameIndex === void 0) {
|
|
143050
|
-
nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(
|
|
143050
|
+
nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(map23.names[raw.nameIndex]);
|
|
143051
143051
|
}
|
|
143052
143052
|
}
|
|
143053
143053
|
}
|
|
@@ -143332,12 +143332,12 @@ ${lanes.join("\n")}
|
|
|
143332
143332
|
function getGeneratedPositionOfMapping(value) {
|
|
143333
143333
|
return value.generatedPosition;
|
|
143334
143334
|
}
|
|
143335
|
-
function createDocumentPositionMapper(host,
|
|
143335
|
+
function createDocumentPositionMapper(host, map23, mapPath) {
|
|
143336
143336
|
const mapDirectory = getDirectoryPath(mapPath);
|
|
143337
|
-
const sourceRoot =
|
|
143338
|
-
const generatedAbsoluteFilePath = getNormalizedAbsolutePath(
|
|
143337
|
+
const sourceRoot = map23.sourceRoot ? getNormalizedAbsolutePath(map23.sourceRoot, mapDirectory) : mapDirectory;
|
|
143338
|
+
const generatedAbsoluteFilePath = getNormalizedAbsolutePath(map23.file, mapDirectory);
|
|
143339
143339
|
const generatedFile = host.getSourceFileLike(generatedAbsoluteFilePath);
|
|
143340
|
-
const sourceFileAbsolutePaths =
|
|
143340
|
+
const sourceFileAbsolutePaths = map23.sources.map((source) => getNormalizedAbsolutePath(source, sourceRoot));
|
|
143341
143341
|
const sourceToSourceIndexMap = new Map(sourceFileAbsolutePaths.map((source, i) => [host.getCanonicalFileName(source), i]));
|
|
143342
143342
|
let decodedMappings;
|
|
143343
143343
|
let generatedMappings;
|
|
@@ -143358,7 +143358,7 @@ ${lanes.join("\n")}
|
|
|
143358
143358
|
let sourcePosition;
|
|
143359
143359
|
if (isSourceMapping(mapping)) {
|
|
143360
143360
|
const sourceFile = host.getSourceFileLike(sourceFileAbsolutePaths[mapping.sourceIndex]);
|
|
143361
|
-
source =
|
|
143361
|
+
source = map23.sources[mapping.sourceIndex];
|
|
143362
143362
|
sourcePosition = sourceFile !== void 0 ? getPositionOfLineAndCharacter(
|
|
143363
143363
|
sourceFile,
|
|
143364
143364
|
mapping.sourceLine,
|
|
@@ -143377,7 +143377,7 @@ ${lanes.join("\n")}
|
|
|
143377
143377
|
}
|
|
143378
143378
|
function getDecodedMappings() {
|
|
143379
143379
|
if (decodedMappings === void 0) {
|
|
143380
|
-
const decoder = decodeMappings(
|
|
143380
|
+
const decoder = decodeMappings(map23.mappings);
|
|
143381
143381
|
const mappings = arrayFrom(decoder, processMapping);
|
|
143382
143382
|
if (decoder.error !== void 0) {
|
|
143383
143383
|
if (host.log) {
|
|
@@ -143464,7 +143464,7 @@ ${lanes.join("\n")}
|
|
|
143464
143464
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
143465
143465
|
}
|
|
143466
143466
|
function transformBundle(node) {
|
|
143467
|
-
return context.factory.createBundle(
|
|
143467
|
+
return context.factory.createBundle(map22(node.sourceFiles, transformSourceFile));
|
|
143468
143468
|
}
|
|
143469
143469
|
}
|
|
143470
143470
|
function getExportNeedsImportStarHelper(node) {
|
|
@@ -143670,12 +143670,12 @@ ${lanes.join("\n")}
|
|
|
143670
143670
|
}
|
|
143671
143671
|
return exportedNames;
|
|
143672
143672
|
}
|
|
143673
|
-
function multiMapSparseArrayAdd(
|
|
143674
|
-
let values =
|
|
143673
|
+
function multiMapSparseArrayAdd(map23, key, value) {
|
|
143674
|
+
let values = map23[key];
|
|
143675
143675
|
if (values) {
|
|
143676
143676
|
values.push(value);
|
|
143677
143677
|
} else {
|
|
143678
|
-
|
|
143678
|
+
map23[key] = values = [value];
|
|
143679
143679
|
}
|
|
143680
143680
|
return values;
|
|
143681
143681
|
}
|
|
@@ -144413,7 +144413,7 @@ ${lanes.join("\n")}
|
|
|
144413
144413
|
}
|
|
144414
144414
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
144415
144415
|
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
144416
|
-
return factory2.createArrayLiteralExpression(
|
|
144416
|
+
return factory2.createArrayLiteralExpression(map22(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
144417
144417
|
}
|
|
144418
144418
|
function makeObjectBindingPattern(factory2, elements) {
|
|
144419
144419
|
Debug.assertEachNode(elements, isBindingElement);
|
|
@@ -144421,7 +144421,7 @@ ${lanes.join("\n")}
|
|
|
144421
144421
|
}
|
|
144422
144422
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
144423
144423
|
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
144424
|
-
return factory2.createObjectLiteralExpression(
|
|
144424
|
+
return factory2.createObjectLiteralExpression(map22(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
144425
144425
|
}
|
|
144426
144426
|
function makeBindingElement(factory2, name2) {
|
|
144427
144427
|
return factory2.createBindingElement(
|
|
@@ -145867,7 +145867,7 @@ ${lanes.join("\n")}
|
|
|
145867
145867
|
return setTextRange(
|
|
145868
145868
|
factory2.createExpressionStatement(
|
|
145869
145869
|
factory2.inlineExpressions(
|
|
145870
|
-
|
|
145870
|
+
map22(variables, transformInitializedVariable)
|
|
145871
145871
|
)
|
|
145872
145872
|
),
|
|
145873
145873
|
node
|
|
@@ -146073,7 +146073,7 @@ ${lanes.join("\n")}
|
|
|
146073
146073
|
currentNamespaceContainerName = localName;
|
|
146074
146074
|
const statements = [];
|
|
146075
146075
|
startLexicalEnvironment();
|
|
146076
|
-
const members =
|
|
146076
|
+
const members = map22(node.members, transformEnumMember);
|
|
146077
146077
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
146078
146078
|
addRange(statements, members);
|
|
146079
146079
|
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
|
|
@@ -147984,7 +147984,7 @@ ${lanes.join("\n")}
|
|
|
147984
147984
|
if (isDecoratedClassDeclaration) {
|
|
147985
147985
|
Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration.");
|
|
147986
147986
|
if (some(pendingExpressions)) {
|
|
147987
|
-
addRange(pendingStatements,
|
|
147987
|
+
addRange(pendingStatements, map22(pendingExpressions, factory2.createExpressionStatement));
|
|
147988
147988
|
}
|
|
147989
147989
|
if (some(staticPropertiesOrClassStaticBlocks)) {
|
|
147990
147990
|
addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node));
|
|
@@ -149773,13 +149773,13 @@ ${lanes.join("\n")}
|
|
|
149773
149773
|
}
|
|
149774
149774
|
const { false: decorators, true: metadata } = groupBy(allDecorators.decorators, isSyntheticMetadataDecorator);
|
|
149775
149775
|
const decoratorExpressions = [];
|
|
149776
|
-
addRange(decoratorExpressions,
|
|
149776
|
+
addRange(decoratorExpressions, map22(decorators, transformDecorator));
|
|
149777
149777
|
addRange(decoratorExpressions, flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
|
|
149778
|
-
addRange(decoratorExpressions,
|
|
149778
|
+
addRange(decoratorExpressions, map22(metadata, transformDecorator));
|
|
149779
149779
|
return decoratorExpressions;
|
|
149780
149780
|
}
|
|
149781
149781
|
function addClassElementDecorationStatements(statements, node, isStatic2) {
|
|
149782
|
-
addRange(statements,
|
|
149782
|
+
addRange(statements, map22(generateClassElementDecorationExpressions(node, isStatic2), (expr) => factory2.createExpressionStatement(expr)));
|
|
149783
149783
|
}
|
|
149784
149784
|
function isDecoratedClassElement(member, isStaticElement, parent2) {
|
|
149785
149785
|
return nodeOrChildIsDecorated(
|
|
@@ -151684,7 +151684,7 @@ ${lanes.join("\n")}
|
|
|
151684
151684
|
return void 0;
|
|
151685
151685
|
}
|
|
151686
151686
|
const decoratorExpressions = [];
|
|
151687
|
-
addRange(decoratorExpressions,
|
|
151687
|
+
addRange(decoratorExpressions, map22(allDecorators.decorators, transformDecorator));
|
|
151688
151688
|
return decoratorExpressions;
|
|
151689
151689
|
}
|
|
151690
151690
|
function transformDecorator(decorator) {
|
|
@@ -152357,7 +152357,7 @@ ${lanes.join("\n")}
|
|
|
152357
152357
|
}
|
|
152358
152358
|
return void 0;
|
|
152359
152359
|
}
|
|
152360
|
-
return factory2.inlineExpressions(
|
|
152360
|
+
return factory2.inlineExpressions(map22(variables, transformInitializedVariable));
|
|
152361
152361
|
}
|
|
152362
152362
|
function hoistVariableDeclarationList(node) {
|
|
152363
152363
|
forEach(node.declarations, hoistVariable);
|
|
@@ -155773,7 +155773,7 @@ ${lanes.join("\n")}
|
|
|
155773
155773
|
return target && target >= 5 ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children);
|
|
155774
155774
|
}
|
|
155775
155775
|
function transformJsxAttributesToProps(attrs, children) {
|
|
155776
|
-
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(
|
|
155776
|
+
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map22(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));
|
|
155777
155777
|
if (children) {
|
|
155778
155778
|
props.push(children);
|
|
155779
155779
|
}
|
|
@@ -159062,7 +159062,7 @@ ${lanes.join("\n")}
|
|
|
159062
159062
|
/* NoHoisting */
|
|
159063
159063
|
)
|
|
159064
159064
|
);
|
|
159065
|
-
const part = factory2.createVariableDeclarationList(
|
|
159065
|
+
const part = factory2.createVariableDeclarationList(map22(currentState.loopOutParameters, createOutVariable));
|
|
159066
159066
|
return { functionName, containsYield, functionDeclaration, part };
|
|
159067
159067
|
}
|
|
159068
159068
|
function createFunctionForBodyOfIterationStatement(node, currentState, outerState) {
|
|
@@ -159190,7 +159190,7 @@ ${lanes.join("\n")}
|
|
|
159190
159190
|
loopFunctionExpressionName,
|
|
159191
159191
|
/*typeArguments*/
|
|
159192
159192
|
void 0,
|
|
159193
|
-
|
|
159193
|
+
map22(state.loopParameters, (p) => p.name)
|
|
159194
159194
|
);
|
|
159195
159195
|
const callResult = containsYield ? factory2.createYieldExpression(
|
|
159196
159196
|
factory2.createToken(
|
|
@@ -159768,7 +159768,7 @@ ${lanes.join("\n")}
|
|
|
159768
159768
|
return isSpreadElement(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads;
|
|
159769
159769
|
}
|
|
159770
159770
|
function visitSpanOfSpreads(chunk) {
|
|
159771
|
-
return
|
|
159771
|
+
return map22(chunk, visitExpressionOfSpread);
|
|
159772
159772
|
}
|
|
159773
159773
|
function visitExpressionOfSpread(node) {
|
|
159774
159774
|
Debug.assertNode(node, isSpreadElement);
|
|
@@ -160340,7 +160340,7 @@ ${lanes.join("\n")}
|
|
|
160340
160340
|
return setSourceMapRange(
|
|
160341
160341
|
factory2.createExpressionStatement(
|
|
160342
160342
|
factory2.inlineExpressions(
|
|
160343
|
-
|
|
160343
|
+
map22(variables, transformInitializedVariable)
|
|
160344
160344
|
)
|
|
160345
160345
|
),
|
|
160346
160346
|
node
|
|
@@ -160898,7 +160898,7 @@ ${lanes.join("\n")}
|
|
|
160898
160898
|
const variables = getInitializedVariables(initializer3);
|
|
160899
160899
|
node = factory2.updateForStatement(
|
|
160900
160900
|
node,
|
|
160901
|
-
variables.length > 0 ? factory2.inlineExpressions(
|
|
160901
|
+
variables.length > 0 ? factory2.inlineExpressions(map22(variables, transformInitializedVariable)) : void 0,
|
|
160902
160902
|
visitNode(node.condition, visitor, isExpression),
|
|
160903
160903
|
visitNode(node.incrementor, visitor, isExpression),
|
|
160904
160904
|
visitIterationBody(node.statement, visitor, context)
|
|
@@ -164224,7 +164224,7 @@ ${lanes.join("\n")}
|
|
|
164224
164224
|
moduleBodyBlock
|
|
164225
164225
|
);
|
|
164226
164226
|
const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);
|
|
164227
|
-
const dependencies = factory2.createArrayLiteralExpression(
|
|
164227
|
+
const dependencies = factory2.createArrayLiteralExpression(map22(dependencyGroups, (dependencyGroup) => dependencyGroup.name));
|
|
164228
164228
|
const updated = setEmitFlags(
|
|
164229
164229
|
factory2.updateSourceFile(
|
|
164230
164230
|
node,
|
|
@@ -165954,7 +165954,7 @@ ${lanes.join("\n")}
|
|
|
165954
165954
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
165955
165955
|
}
|
|
165956
165956
|
function transformBundle(node) {
|
|
165957
|
-
return context.factory.createBundle(
|
|
165957
|
+
return context.factory.createBundle(map22(node.sourceFiles, transformSourceFile));
|
|
165958
165958
|
}
|
|
165959
165959
|
}
|
|
165960
165960
|
function canProduceDiagnostics(node) {
|
|
@@ -166702,7 +166702,7 @@ ${lanes.join("\n")}
|
|
|
166702
166702
|
rawLibReferenceDirectives = [];
|
|
166703
166703
|
let hasNoDefaultLib = false;
|
|
166704
166704
|
const bundle = factory2.createBundle(
|
|
166705
|
-
|
|
166705
|
+
map22(node.sourceFiles, (sourceFile) => {
|
|
166706
166706
|
if (sourceFile.isDeclarationFile) return void 0;
|
|
166707
166707
|
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
|
166708
166708
|
currentSourceFile = sourceFile;
|
|
@@ -166813,7 +166813,7 @@ ${lanes.join("\n")}
|
|
|
166813
166813
|
getLibReferences()
|
|
166814
166814
|
);
|
|
166815
166815
|
function collectFileReferences(sourceFile) {
|
|
166816
|
-
rawReferencedFiles = concatenate(rawReferencedFiles,
|
|
166816
|
+
rawReferencedFiles = concatenate(rawReferencedFiles, map22(sourceFile.referencedFiles, (f) => [sourceFile, f]));
|
|
166817
166817
|
rawTypeReferenceDirectives = concatenate(rawTypeReferenceDirectives, sourceFile.typeReferenceDirectives);
|
|
166818
166818
|
rawLibReferenceDirectives = concatenate(rawLibReferenceDirectives, sourceFile.libReferenceDirectives);
|
|
166819
166819
|
}
|
|
@@ -167027,7 +167027,7 @@ ${lanes.join("\n")}
|
|
|
167027
167027
|
)) {
|
|
167028
167028
|
return factory2.createNodeArray();
|
|
167029
167029
|
}
|
|
167030
|
-
const newParams =
|
|
167030
|
+
const newParams = map22(params, (p) => ensureParameter(p, modifierMask));
|
|
167031
167031
|
if (!newParams) {
|
|
167032
167032
|
return factory2.createNodeArray();
|
|
167033
167033
|
}
|
|
@@ -167779,7 +167779,7 @@ ${lanes.join("\n")}
|
|
|
167779
167779
|
void 0,
|
|
167780
167780
|
/*isTypeOnly*/
|
|
167781
167781
|
false,
|
|
167782
|
-
factory2.createNamedExports(
|
|
167782
|
+
factory2.createNamedExports(map22(exportMappings, ([gen, exp]) => {
|
|
167783
167783
|
return factory2.createExportSpecifier(
|
|
167784
167784
|
/*isTypeOnly*/
|
|
167785
167785
|
false,
|
|
@@ -167987,11 +167987,11 @@ ${lanes.join("\n")}
|
|
|
167987
167987
|
2
|
|
167988
167988
|
/* Const */
|
|
167989
167989
|
));
|
|
167990
|
-
const heritageClauses = factory2.createNodeArray(
|
|
167990
|
+
const heritageClauses = factory2.createNodeArray(map22(input.heritageClauses, (clause) => {
|
|
167991
167991
|
if (clause.token === 96) {
|
|
167992
167992
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
167993
167993
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
167994
|
-
const newClause = factory2.updateHeritageClause(clause,
|
|
167994
|
+
const newClause = factory2.updateHeritageClause(clause, map22(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
167995
167995
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
167996
167996
|
return newClause;
|
|
167997
167997
|
}
|
|
@@ -168153,7 +168153,7 @@ ${lanes.join("\n")}
|
|
|
168153
168153
|
}
|
|
168154
168154
|
function transformHeritageClauses(nodes) {
|
|
168155
168155
|
return factory2.createNodeArray(filter3(
|
|
168156
|
-
|
|
168156
|
+
map22(nodes, (clause) => factory2.updateHeritageClause(
|
|
168157
168157
|
clause,
|
|
168158
168158
|
visitNodes2(
|
|
168159
168159
|
factory2.createNodeArray(filter3(clause.types, (t) => {
|
|
@@ -168275,7 +168275,7 @@ ${lanes.join("\n")}
|
|
|
168275
168275
|
const moduleKind = getEmitModuleKind(compilerOptions);
|
|
168276
168276
|
const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
|
|
168277
168277
|
const transformers = [];
|
|
168278
|
-
addRange(transformers, customTransformers &&
|
|
168278
|
+
addRange(transformers, customTransformers && map22(customTransformers.before, wrapScriptTransformerFactory));
|
|
168279
168279
|
transformers.push(transformTypeScript);
|
|
168280
168280
|
if (compilerOptions.experimentalDecorators) {
|
|
168281
168281
|
transformers.push(transformLegacyDecorators);
|
|
@@ -168313,13 +168313,13 @@ ${lanes.join("\n")}
|
|
|
168313
168313
|
transformers.push(transformGenerators);
|
|
168314
168314
|
}
|
|
168315
168315
|
transformers.push(getModuleTransformer(moduleKind));
|
|
168316
|
-
addRange(transformers, customTransformers &&
|
|
168316
|
+
addRange(transformers, customTransformers && map22(customTransformers.after, wrapScriptTransformerFactory));
|
|
168317
168317
|
return transformers;
|
|
168318
168318
|
}
|
|
168319
168319
|
function getDeclarationTransformers(customTransformers) {
|
|
168320
168320
|
const transformers = [];
|
|
168321
168321
|
transformers.push(transformDeclarations);
|
|
168322
|
-
addRange(transformers, customTransformers &&
|
|
168322
|
+
addRange(transformers, customTransformers && map22(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory));
|
|
168323
168323
|
return transformers;
|
|
168324
168324
|
}
|
|
168325
168325
|
function wrapCustomTransformer(transformer) {
|
|
@@ -174095,7 +174095,7 @@ ${lanes.join("\n")}
|
|
|
174095
174095
|
var _a2;
|
|
174096
174096
|
if (!host.realpath || ensureTrailingDirectorySeparator(toPath3(host.realpath(rootDir))) === rootDirPath) {
|
|
174097
174097
|
const resultFromHost = {
|
|
174098
|
-
files:
|
|
174098
|
+
files: map22(host.readDirectory(
|
|
174099
174099
|
rootDir,
|
|
174100
174100
|
/*extensions*/
|
|
174101
174101
|
void 0,
|
|
@@ -174194,7 +174194,7 @@ ${lanes.join("\n")}
|
|
|
174194
174194
|
function getFileSystemEntriesFromHost(dir, path2) {
|
|
174195
174195
|
if (rootSymLinkResult && path2 === rootDirPath) return rootSymLinkResult;
|
|
174196
174196
|
const result = {
|
|
174197
|
-
files:
|
|
174197
|
+
files: map22(host.readDirectory(
|
|
174198
174198
|
dir,
|
|
174199
174199
|
/*extensions*/
|
|
174200
174200
|
void 0,
|
|
@@ -174756,12 +174756,12 @@ ${lanes.join("\n")}
|
|
|
174756
174756
|
const value = readFileCache.get(key);
|
|
174757
174757
|
if (value !== void 0 && value !== data) {
|
|
174758
174758
|
readFileCache.delete(key);
|
|
174759
|
-
sourceFileCache.forEach((
|
|
174759
|
+
sourceFileCache.forEach((map23) => map23.delete(key));
|
|
174760
174760
|
} else if (getSourceFileWithCache) {
|
|
174761
|
-
sourceFileCache.forEach((
|
|
174762
|
-
const sourceFile =
|
|
174761
|
+
sourceFileCache.forEach((map23) => {
|
|
174762
|
+
const sourceFile = map23.get(key);
|
|
174763
174763
|
if (sourceFile && sourceFile.text !== data) {
|
|
174764
|
-
|
|
174764
|
+
map23.delete(key);
|
|
174765
174765
|
}
|
|
174766
174766
|
});
|
|
174767
174767
|
}
|
|
@@ -178768,7 +178768,7 @@ ${lanes.join("\n")}
|
|
|
178768
178768
|
((BuilderState2) => {
|
|
178769
178769
|
function createManyToManyPathMap() {
|
|
178770
178770
|
function create2(forward, reverse, deleted) {
|
|
178771
|
-
const
|
|
178771
|
+
const map23 = {
|
|
178772
178772
|
getKeys: (v) => reverse.get(v),
|
|
178773
178773
|
getValues: (k) => forward.get(k),
|
|
178774
178774
|
keys: () => forward.keys(),
|
|
@@ -178797,10 +178797,10 @@ ${lanes.join("\n")}
|
|
|
178797
178797
|
addToMultimap(reverse, v, k);
|
|
178798
178798
|
}
|
|
178799
178799
|
});
|
|
178800
|
-
return
|
|
178800
|
+
return map23;
|
|
178801
178801
|
}
|
|
178802
178802
|
};
|
|
178803
|
-
return
|
|
178803
|
+
return map23;
|
|
178804
178804
|
}
|
|
178805
178805
|
return create2(
|
|
178806
178806
|
/* @__PURE__ */ new Map(),
|
|
@@ -178810,19 +178810,19 @@ ${lanes.join("\n")}
|
|
|
178810
178810
|
);
|
|
178811
178811
|
}
|
|
178812
178812
|
BuilderState2.createManyToManyPathMap = createManyToManyPathMap;
|
|
178813
|
-
function addToMultimap(
|
|
178814
|
-
let set3 =
|
|
178813
|
+
function addToMultimap(map23, k, v) {
|
|
178814
|
+
let set3 = map23.get(k);
|
|
178815
178815
|
if (!set3) {
|
|
178816
178816
|
set3 = /* @__PURE__ */ new Set();
|
|
178817
|
-
|
|
178817
|
+
map23.set(k, set3);
|
|
178818
178818
|
}
|
|
178819
178819
|
set3.add(v);
|
|
178820
178820
|
}
|
|
178821
|
-
function deleteFromMultimap(
|
|
178822
|
-
const set3 =
|
|
178821
|
+
function deleteFromMultimap(map23, k, v) {
|
|
178822
|
+
const set3 = map23.get(k);
|
|
178823
178823
|
if (set3 == null ? void 0 : set3.delete(v)) {
|
|
178824
178824
|
if (!set3.size) {
|
|
178825
|
-
|
|
178825
|
+
map23.delete(k);
|
|
178826
178826
|
}
|
|
178827
178827
|
return true;
|
|
178828
178828
|
}
|
|
@@ -179173,8 +179173,8 @@ ${lanes.join("\n")}
|
|
|
179173
179173
|
if (diff & 48) result = result | emitKind & 48;
|
|
179174
179174
|
return result;
|
|
179175
179175
|
}
|
|
179176
|
-
function hasSameKeys(map1,
|
|
179177
|
-
return map1 ===
|
|
179176
|
+
function hasSameKeys(map1, map23) {
|
|
179177
|
+
return map1 === map23 || map1 !== void 0 && map23 !== void 0 && map1.size === map23.size && !forEachKey(map1, (key) => !map23.has(key));
|
|
179178
179178
|
}
|
|
179179
179179
|
function createBuilderProgramState(newProgram, oldState) {
|
|
179180
179180
|
var _a2, _b;
|
|
@@ -180508,7 +180508,7 @@ ${lanes.join("\n")}
|
|
|
180508
180508
|
let filePathsSetList;
|
|
180509
180509
|
const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0;
|
|
180510
180510
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
180511
|
-
const changedFilesSet = new Set(
|
|
180511
|
+
const changedFilesSet = new Set(map22(buildInfo.changeFileSet, toFilePath));
|
|
180512
180512
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
180513
180513
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
180514
180514
|
const path2 = toFilePath(index + 1);
|
|
@@ -180601,10 +180601,10 @@ ${lanes.join("\n")}
|
|
|
180601
180601
|
return filePathsSetList[fileIdsListId - 1];
|
|
180602
180602
|
}
|
|
180603
180603
|
function toManyToManyPathMap(referenceMap, options) {
|
|
180604
|
-
const
|
|
180605
|
-
if (!
|
|
180606
|
-
referenceMap.forEach(([fileId, fileIdListId]) =>
|
|
180607
|
-
return
|
|
180604
|
+
const map23 = BuilderState.createReferencedMap(options);
|
|
180605
|
+
if (!map23 || !referenceMap) return map23;
|
|
180606
|
+
referenceMap.forEach(([fileId, fileIdListId]) => map23.set(toFilePath(fileId), toFilePathsSet(fileIdListId)));
|
|
180607
|
+
return map23;
|
|
180608
180608
|
}
|
|
180609
180609
|
function toPerFileSemanticDiagnostics(diagnostics) {
|
|
180610
180610
|
const semanticDiagnostics = new Map(
|
|
@@ -186433,7 +186433,7 @@ ${lanes.join("\n")}
|
|
|
186433
186433
|
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
186434
186434
|
}
|
|
186435
186435
|
if (isJSDocTypeLiteral(node)) {
|
|
186436
|
-
return factory.createTypeLiteralNode(
|
|
186436
|
+
return factory.createTypeLiteralNode(map22(node.jsDocPropertyTags, (t) => {
|
|
186437
186437
|
const name2 = visitNode(isIdentifier(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier);
|
|
186438
186438
|
const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t);
|
|
186439
186439
|
return factory.createPropertySignature(
|
|
@@ -186499,7 +186499,7 @@ ${lanes.join("\n")}
|
|
|
186499
186499
|
} else {
|
|
186500
186500
|
return factory.createFunctionTypeNode(
|
|
186501
186501
|
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
186502
|
-
|
|
186502
|
+
map22(node.parameters, (p, i) => factory.createParameterDeclaration(
|
|
186503
186503
|
/*modifiers*/
|
|
186504
186504
|
void 0,
|
|
186505
186505
|
getEffectiveDotDotDotForParameter(p),
|
|
@@ -190782,7 +190782,7 @@ ${lanes.join("\n")}
|
|
|
190782
190782
|
return expression;
|
|
190783
190783
|
}
|
|
190784
190784
|
function mapOneOrMany(valueOrArray, f, resultSelector = identity) {
|
|
190785
|
-
return valueOrArray ? isArray(valueOrArray) ? resultSelector(
|
|
190785
|
+
return valueOrArray ? isArray(valueOrArray) ? resultSelector(map22(valueOrArray, f)) : f(valueOrArray, 0) : void 0;
|
|
190786
190786
|
}
|
|
190787
190787
|
function firstOrOnly(valueOrArray) {
|
|
190788
190788
|
return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray;
|
|
@@ -192514,9 +192514,9 @@ ${lanes.join("\n")}
|
|
|
192514
192514
|
sourceFilesSet
|
|
192515
192515
|
);
|
|
192516
192516
|
if (!referenceEntries) return void 0;
|
|
192517
|
-
const
|
|
192517
|
+
const map23 = arrayToMultiMap(referenceEntries.map(ts_FindAllReferences_exports.toHighlightSpan), (e) => e.fileName, (e) => e.span);
|
|
192518
192518
|
const getCanonicalFileName = createGetCanonicalFileName(program2.useCaseSensitiveFileNames());
|
|
192519
|
-
return arrayFrom(mapDefinedIterator(
|
|
192519
|
+
return arrayFrom(mapDefinedIterator(map23.entries(), ([fileName, highlightSpans]) => {
|
|
192520
192520
|
if (!sourceFilesSet.has(fileName)) {
|
|
192521
192521
|
if (!program2.redirectTargetsMap.has(toPath(fileName, program2.getCurrentDirectory(), getCanonicalFileName))) {
|
|
192522
192522
|
return void 0;
|
|
@@ -194179,12 +194179,12 @@ ${lanes.join("\n")}
|
|
|
194179
194179
|
return void 0;
|
|
194180
194180
|
}
|
|
194181
194181
|
function convertDocumentToSourceMapper(host, contents, mapFileName) {
|
|
194182
|
-
const
|
|
194183
|
-
if (!
|
|
194182
|
+
const map23 = tryParseRawSourceMap(contents);
|
|
194183
|
+
if (!map23 || !map23.sources || !map23.file || !map23.mappings) {
|
|
194184
194184
|
return void 0;
|
|
194185
194185
|
}
|
|
194186
|
-
if (
|
|
194187
|
-
return createDocumentPositionMapper(host,
|
|
194186
|
+
if (map23.sourcesContent && map23.sourcesContent.some(isString)) return void 0;
|
|
194187
|
+
return createDocumentPositionMapper(host, map23, mapFileName);
|
|
194188
194188
|
}
|
|
194189
194189
|
function createSourceFileLike(text, lineMap) {
|
|
194190
194190
|
return {
|
|
@@ -194716,7 +194716,7 @@ interface Symbol {
|
|
|
194716
194716
|
curCancellationToken = cancellationToken;
|
|
194717
194717
|
curSourceFile = sourceFile;
|
|
194718
194718
|
try {
|
|
194719
|
-
return
|
|
194719
|
+
return map22(primaryNavBarMenuItems(rootNavigationBarNode(sourceFile)), convertToPrimaryNavBarMenuItem);
|
|
194720
194720
|
} finally {
|
|
194721
194721
|
reset();
|
|
194722
194722
|
}
|
|
@@ -195202,7 +195202,7 @@ interface Symbol {
|
|
|
195202
195202
|
return true;
|
|
195203
195203
|
}
|
|
195204
195204
|
if (shouldReallyMerge(a.node, b.node, parent2)) {
|
|
195205
|
-
|
|
195205
|
+
merge4(a, b);
|
|
195206
195206
|
return true;
|
|
195207
195207
|
}
|
|
195208
195208
|
return false;
|
|
@@ -195237,7 +195237,7 @@ interface Symbol {
|
|
|
195237
195237
|
}
|
|
195238
195238
|
return a.body.kind === b.body.kind && (a.body.kind !== 268 || areSameModule(a.body, b.body));
|
|
195239
195239
|
}
|
|
195240
|
-
function
|
|
195240
|
+
function merge4(target, source) {
|
|
195241
195241
|
target.additionalNodes = target.additionalNodes || [];
|
|
195242
195242
|
target.additionalNodes.push(source.node);
|
|
195243
195243
|
if (source.additionalNodes) {
|
|
@@ -195369,7 +195369,7 @@ interface Symbol {
|
|
|
195369
195369
|
kindModifiers: getModifiers2(n.node),
|
|
195370
195370
|
spans: getSpans(n),
|
|
195371
195371
|
nameSpan: n.name && getNodeSpan(n.name),
|
|
195372
|
-
childItems:
|
|
195372
|
+
childItems: map22(n.children, convertToTree)
|
|
195373
195373
|
};
|
|
195374
195374
|
}
|
|
195375
195375
|
function convertToPrimaryNavBarMenuItem(n) {
|
|
@@ -195378,7 +195378,7 @@ interface Symbol {
|
|
|
195378
195378
|
kind: getNodeKind(n.node),
|
|
195379
195379
|
kindModifiers: getModifiers2(n.node),
|
|
195380
195380
|
spans: getSpans(n),
|
|
195381
|
-
childItems:
|
|
195381
|
+
childItems: map22(n.children, convertToSecondaryNavBarMenuItem) || emptyChildItemArray,
|
|
195382
195382
|
indent: n.indent,
|
|
195383
195383
|
bolded: false,
|
|
195384
195384
|
grayed: false
|
|
@@ -197606,12 +197606,12 @@ interface Symbol {
|
|
|
197606
197606
|
"args",
|
|
197607
197607
|
/*questionToken*/
|
|
197608
197608
|
void 0,
|
|
197609
|
-
factory.createUnionTypeNode(
|
|
197609
|
+
factory.createUnionTypeNode(map22(signatureDeclarations, convertSignatureParametersToTuple))
|
|
197610
197610
|
)
|
|
197611
197611
|
]);
|
|
197612
197612
|
}
|
|
197613
197613
|
function convertSignatureParametersToTuple(decl) {
|
|
197614
|
-
const members =
|
|
197614
|
+
const members = map22(decl.parameters, convertParameterToNamedTupleMember);
|
|
197615
197615
|
return setEmitFlags(
|
|
197616
197616
|
factory.createTupleTypeNode(members),
|
|
197617
197617
|
some(members, (m) => !!length(getSyntheticLeadingComments(m))) ? 0 : 1
|
|
@@ -198091,9 +198091,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198091
198091
|
}
|
|
198092
198092
|
function doChange5(sourceFile, program2, host, changes, functionDeclaration, groupedReferences) {
|
|
198093
198093
|
const signature = groupedReferences.signature;
|
|
198094
|
-
const newFunctionDeclarationParams =
|
|
198094
|
+
const newFunctionDeclarationParams = map22(createNewParameters(functionDeclaration, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
198095
198095
|
if (signature) {
|
|
198096
|
-
const newSignatureParams =
|
|
198096
|
+
const newSignatureParams = map22(createNewParameters(signature, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
198097
198097
|
replaceParameters(signature, newSignatureParams);
|
|
198098
198098
|
}
|
|
198099
198099
|
replaceParameters(functionDeclaration, newFunctionDeclarationParams);
|
|
@@ -198156,10 +198156,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198156
198156
|
function groupReferences(referenceEntries) {
|
|
198157
198157
|
const classReferences = { accessExpressions: [], typeUsages: [] };
|
|
198158
198158
|
const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true };
|
|
198159
|
-
const functionSymbols =
|
|
198160
|
-
const classSymbols =
|
|
198159
|
+
const functionSymbols = map22(functionNames, getSymbolTargetAtLocation);
|
|
198160
|
+
const classSymbols = map22(classNames, getSymbolTargetAtLocation);
|
|
198161
198161
|
const isConstructor = isConstructorDeclaration(functionDeclaration);
|
|
198162
|
-
const contextualSymbols =
|
|
198162
|
+
const contextualSymbols = map22(functionNames, (name2) => getSymbolForContextualType(name2, checker));
|
|
198163
198163
|
for (const entry of referenceEntries) {
|
|
198164
198164
|
if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) {
|
|
198165
198165
|
groupedReferences2.valid = false;
|
|
@@ -198423,7 +198423,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198423
198423
|
const parameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
198424
198424
|
const hasRestParameter2 = isRestParameter(last(parameters));
|
|
198425
198425
|
const nonRestArguments = hasRestParameter2 ? functionArguments.slice(0, parameters.length - 1) : functionArguments;
|
|
198426
|
-
const properties =
|
|
198426
|
+
const properties = map22(nonRestArguments, (arg, i) => {
|
|
198427
198427
|
const parameterName = getParameterName(parameters[i]);
|
|
198428
198428
|
const property = createPropertyOrShorthandAssignment(parameterName, arg);
|
|
198429
198429
|
suppressLeadingAndTrailingTrivia(property.name);
|
|
@@ -198446,7 +198446,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198446
198446
|
function createNewParameters(functionDeclaration, program2, host) {
|
|
198447
198447
|
const checker = program2.getTypeChecker();
|
|
198448
198448
|
const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
198449
|
-
const bindingElements =
|
|
198449
|
+
const bindingElements = map22(refactorableParameters, createBindingElementFromParameterDeclaration);
|
|
198450
198450
|
const objectParameterName = factory.createObjectBindingPattern(bindingElements);
|
|
198451
198451
|
const objectParameterType = createParameterTypeNode(refactorableParameters);
|
|
198452
198452
|
let objectInitializer;
|
|
@@ -198501,7 +198501,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198501
198501
|
return element;
|
|
198502
198502
|
}
|
|
198503
198503
|
function createParameterTypeNode(parameters) {
|
|
198504
|
-
const members =
|
|
198504
|
+
const members = map22(parameters, createPropertySignatureFromParameterDeclaration);
|
|
198505
198505
|
const typeNode = addEmitFlags(
|
|
198506
198506
|
factory.createTypeLiteralNode(members),
|
|
198507
198507
|
1
|
|
@@ -198776,7 +198776,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198776
198776
|
i = newIndex - 1;
|
|
198777
198777
|
const isLast = i === nodes.length - 1;
|
|
198778
198778
|
if (isTemplateExpression(currentNode)) {
|
|
198779
|
-
const spans =
|
|
198779
|
+
const spans = map22(currentNode.templateSpans, (span, index) => {
|
|
198780
198780
|
copyExpressionComments(span);
|
|
198781
198781
|
const isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
198782
198782
|
const text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
@@ -200403,8 +200403,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
200403
200403
|
}
|
|
200404
200404
|
}
|
|
200405
200405
|
function getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) {
|
|
200406
|
-
const variableAssignments =
|
|
200407
|
-
const writeAssignments =
|
|
200406
|
+
const variableAssignments = map22(exposedVariableDeclarations, (v) => factory.createShorthandPropertyAssignment(v.symbol.name));
|
|
200407
|
+
const writeAssignments = map22(writes, (w) => factory.createShorthandPropertyAssignment(w.symbol.name));
|
|
200408
200408
|
return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments);
|
|
200409
200409
|
}
|
|
200410
200410
|
function isReadonlyArray(v) {
|
|
@@ -201929,7 +201929,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
201929
201929
|
}
|
|
201930
201930
|
function displayPartsToString(displayParts) {
|
|
201931
201931
|
if (displayParts) {
|
|
201932
|
-
return
|
|
201932
|
+
return map22(displayParts, (displayPart2) => displayPart2.text).join("");
|
|
201933
201933
|
}
|
|
201934
201934
|
return "";
|
|
201935
201935
|
}
|
|
@@ -203292,7 +203292,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203292
203292
|
const multiLineCommentStart = /(?:\/\*+\s*)/.source;
|
|
203293
203293
|
const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
|
|
203294
203294
|
const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
|
|
203295
|
-
const literals = "(?:" +
|
|
203295
|
+
const literals = "(?:" + map22(descriptors, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")";
|
|
203296
203296
|
const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
|
|
203297
203297
|
const messageRemainder = /(?:.*?)/.source;
|
|
203298
203298
|
const messagePortion = "(" + literals + messageRemainder + ")";
|
|
@@ -204231,9 +204231,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204231
204231
|
let declarations;
|
|
204232
204232
|
if (symbol2 && symbol2.declarations) {
|
|
204233
204233
|
const indices = indicesOf(symbol2.declarations);
|
|
204234
|
-
const keys =
|
|
204234
|
+
const keys = map22(symbol2.declarations, (decl) => ({ file: decl.getSourceFile().fileName, pos: decl.pos }));
|
|
204235
204235
|
indices.sort((a, b) => compareStringsCaseSensitive(keys[a].file, keys[b].file) || keys[a].pos - keys[b].pos);
|
|
204236
|
-
const sortedDeclarations =
|
|
204236
|
+
const sortedDeclarations = map22(indices, (i) => symbol2.declarations[i]);
|
|
204237
204237
|
let lastDecl;
|
|
204238
204238
|
for (const decl of sortedDeclarations) {
|
|
204239
204239
|
if (isValidCallHierarchyDeclaration(decl)) {
|
|
@@ -204369,7 +204369,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204369
204369
|
return { from: from16, fromSpans };
|
|
204370
204370
|
}
|
|
204371
204371
|
function convertCallSiteGroupToIncomingCall(program2, entries) {
|
|
204372
|
-
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
204372
|
+
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration), map22(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
204373
204373
|
}
|
|
204374
204374
|
function getIncomingCalls(program2, declaration, cancellationToken) {
|
|
204375
204375
|
if (isSourceFile(declaration) || isModuleDeclaration(declaration) || isClassStaticBlockDeclaration(declaration)) {
|
|
@@ -204555,7 +204555,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204555
204555
|
return { to, fromSpans };
|
|
204556
204556
|
}
|
|
204557
204557
|
function convertCallSiteGroupToOutgoingCall(program2, entries) {
|
|
204558
|
-
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
204558
|
+
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration), map22(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
204559
204559
|
}
|
|
204560
204560
|
function getOutgoingCalls(program2, declaration) {
|
|
204561
204561
|
if (declaration.flags & 33554432 || isMethodSignature(declaration)) {
|
|
@@ -204668,7 +204668,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204668
204668
|
function getFixes(context) {
|
|
204669
204669
|
const diagnostics = getDiagnostics(context);
|
|
204670
204670
|
const registrations = errorCodeToFixes.get(String(context.errorCode));
|
|
204671
|
-
return flatMap(registrations, (f) =>
|
|
204671
|
+
return flatMap(registrations, (f) => map22(f.getCodeActions(context), removeFixIdIfFixAllUnavailable(f, diagnostics)));
|
|
204672
204672
|
}
|
|
204673
204673
|
function getAllFixes(context) {
|
|
204674
204674
|
return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context);
|
|
@@ -205504,7 +205504,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205504
205504
|
}
|
|
205505
205505
|
}
|
|
205506
205506
|
function transformJSDocTypeLiteral(node) {
|
|
205507
|
-
const typeNode = factory.createTypeLiteralNode(
|
|
205507
|
+
const typeNode = factory.createTypeLiteralNode(map22(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(
|
|
205508
205508
|
/*modifiers*/
|
|
205509
205509
|
void 0,
|
|
205510
205510
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
@@ -206775,7 +206775,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
206775
206775
|
function convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference) {
|
|
206776
206776
|
const { declarationList } = statement;
|
|
206777
206777
|
let foundImport = false;
|
|
206778
|
-
const converted =
|
|
206778
|
+
const converted = map22(declarationList.declarations, (decl) => {
|
|
206779
206779
|
const { name: name2, initializer: initializer3 } = decl;
|
|
206780
206780
|
if (initializer3) {
|
|
206781
206781
|
if (isExportsOrModuleExportsOrAlias(sourceFile, initializer3)) {
|
|
@@ -207096,9 +207096,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
207096
207096
|
return name2;
|
|
207097
207097
|
}
|
|
207098
207098
|
function collectFreeIdentifiers(file2) {
|
|
207099
|
-
const
|
|
207100
|
-
forEachFreeIdentifier(file2, (id) =>
|
|
207101
|
-
return
|
|
207099
|
+
const map23 = createMultiMap();
|
|
207100
|
+
forEachFreeIdentifier(file2, (id) => map23.add(id.text, id));
|
|
207101
|
+
return map23;
|
|
207102
207102
|
}
|
|
207103
207103
|
function forEachFreeIdentifier(node, cb) {
|
|
207104
207104
|
if (isIdentifier(node) && isFreeIdentifier(node)) cb(node);
|
|
@@ -209900,7 +209900,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
209900
209900
|
));
|
|
209901
209901
|
}
|
|
209902
209902
|
function createExportSpecifiers(names, allowTypeModifier) {
|
|
209903
|
-
return factory.createNodeArray(
|
|
209903
|
+
return factory.createNodeArray(map22(names, (n) => factory.createExportSpecifier(
|
|
209904
209904
|
allowTypeModifier && n.isTypeOnly,
|
|
209905
209905
|
/*propertyName*/
|
|
209906
209906
|
void 0,
|
|
@@ -210786,7 +210786,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
210786
210786
|
const checker = context.program.getTypeChecker();
|
|
210787
210787
|
const jsxAttributesNode = info.parentDeclaration.attributes;
|
|
210788
210788
|
const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute);
|
|
210789
|
-
const attrs =
|
|
210789
|
+
const attrs = map22(info.attributes, (attr) => {
|
|
210790
210790
|
const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration);
|
|
210791
210791
|
const name2 = factory.createIdentifier(attr.name);
|
|
210792
210792
|
const jsxAttribute = factory.createJsxAttribute(name2, factory.createJsxExpression(
|
|
@@ -210807,7 +210807,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
210807
210807
|
const quotePreference = getQuotePreference(context.sourceFile, context.preferences);
|
|
210808
210808
|
const target = getEmitScriptTarget(context.program.getCompilerOptions());
|
|
210809
210809
|
const checker = context.program.getTypeChecker();
|
|
210810
|
-
const props =
|
|
210810
|
+
const props = map22(info.properties, (prop) => {
|
|
210811
210811
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration);
|
|
210812
210812
|
return factory.createPropertyAssignment(createPropertyNameFromSymbol(prop, target, quotePreference, checker), initializer3);
|
|
210813
210813
|
});
|
|
@@ -210889,7 +210889,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
210889
210889
|
return factory.createArrayLiteralExpression();
|
|
210890
210890
|
}
|
|
210891
210891
|
if (isObjectLiteralType(type2)) {
|
|
210892
|
-
const props =
|
|
210892
|
+
const props = map22(checker.getPropertiesOfType(type2), (prop) => {
|
|
210893
210893
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), enclosingDeclaration);
|
|
210894
210894
|
return factory.createPropertyAssignment(prop.name, initializer3);
|
|
210895
210895
|
});
|
|
@@ -211227,7 +211227,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211227
211227
|
}
|
|
211228
211228
|
}
|
|
211229
211229
|
function updateParameters(importAdder, scriptTarget, node, newParameters) {
|
|
211230
|
-
const parameters =
|
|
211230
|
+
const parameters = map22(node.parameters, (p) => factory.createParameterDeclaration(
|
|
211231
211231
|
p.modifiers,
|
|
211232
211232
|
p.dotDotDotToken,
|
|
211233
211233
|
p.name,
|
|
@@ -211805,7 +211805,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211805
211805
|
jsDocParameterTag.isNameFirst,
|
|
211806
211806
|
jsDocParameterTag.comment
|
|
211807
211807
|
);
|
|
211808
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost,
|
|
211808
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map22(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t)));
|
|
211809
211809
|
return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name2.getText(sourceFile), parameterName]);
|
|
211810
211810
|
}
|
|
211811
211811
|
function getInfo14(sourceFile, pos) {
|
|
@@ -211921,7 +211921,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211921
211921
|
const elements = token.parent.elements;
|
|
211922
211922
|
const diagnostic = [
|
|
211923
211923
|
elements.length > 1 ? Diagnostics.Remove_unused_declarations_for_Colon_0 : Diagnostics.Remove_unused_declaration_for_Colon_0,
|
|
211924
|
-
|
|
211924
|
+
map22(elements, (e) => e.getText(sourceFile)).join(", ")
|
|
211925
211925
|
];
|
|
211926
211926
|
return [
|
|
211927
211927
|
createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteDestructuringElements(t, sourceFile, token.parent)), diagnostic)
|
|
@@ -213882,7 +213882,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
213882
213882
|
));
|
|
213883
213883
|
}
|
|
213884
213884
|
} else {
|
|
213885
|
-
const paramTags =
|
|
213885
|
+
const paramTags = map22(inferences, ({ name: name2, typeNode, isOptional }) => factory.createJSDocParameterTag(
|
|
213886
213886
|
/*tagName*/
|
|
213887
213887
|
void 0,
|
|
213888
213888
|
name2,
|
|
@@ -215016,8 +215016,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
215016
215016
|
const isJs = isInJSFile(contextNode);
|
|
215017
215017
|
const { typeArguments, arguments: args, parent: parent2 } = call;
|
|
215018
215018
|
const contextualType = isJs ? void 0 : checker.getContextualType(call);
|
|
215019
|
-
const names =
|
|
215020
|
-
const instanceTypes = isJs ? [] :
|
|
215019
|
+
const names = map22(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0);
|
|
215020
|
+
const instanceTypes = isJs ? [] : map22(args, (arg) => checker.getTypeAtLocation(arg));
|
|
215021
215021
|
const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters(
|
|
215022
215022
|
checker,
|
|
215023
215023
|
importAdder,
|
|
@@ -215325,7 +215325,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
215325
215325
|
}
|
|
215326
215326
|
function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
|
|
215327
215327
|
if (length(signatures)) {
|
|
215328
|
-
const type2 = checker.getUnionType(
|
|
215328
|
+
const type2 = checker.getUnionType(map22(signatures, checker.getReturnTypeOfSignature));
|
|
215329
215329
|
return checker.typeToTypeNode(type2, enclosingDeclaration, 1, 8, getNoopSymbolTrackerWithResolver(context));
|
|
215330
215330
|
}
|
|
215331
215331
|
}
|
|
@@ -217330,7 +217330,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
217330
217330
|
if (elements.length === 0) {
|
|
217331
217331
|
return void 0;
|
|
217332
217332
|
}
|
|
217333
|
-
const newClauses =
|
|
217333
|
+
const newClauses = map22(elements, (element) => factory.createCaseClause(element, []));
|
|
217334
217334
|
const newLineChar = getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options);
|
|
217335
217335
|
const printer = createSnippetPrinter({
|
|
217336
217336
|
removeComments: true,
|
|
@@ -217340,7 +217340,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
217340
217340
|
newLine: getNewLineKind(newLineChar)
|
|
217341
217341
|
});
|
|
217342
217342
|
const printNode = formatContext ? (node) => printer.printAndFormatNode(4, node, sourceFile, formatContext) : (node) => printer.printNode(4, node, sourceFile);
|
|
217343
|
-
const insertText =
|
|
217343
|
+
const insertText = map22(newClauses, (clause, i) => {
|
|
217344
217344
|
if (preferences.includeCompletionsWithSnippetText) {
|
|
217345
217345
|
return `${printNode(clause)}$${i + 1}`;
|
|
217346
217346
|
}
|
|
@@ -220772,17 +220772,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
220772
220772
|
]: 2
|
|
220773
220773
|
};
|
|
220774
220774
|
function createNameAndKindSet() {
|
|
220775
|
-
const
|
|
220775
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
220776
220776
|
function add(value) {
|
|
220777
|
-
const existing =
|
|
220777
|
+
const existing = map23.get(value.name);
|
|
220778
220778
|
if (!existing || kindPrecedence[existing.kind] < kindPrecedence[value.kind]) {
|
|
220779
|
-
|
|
220779
|
+
map23.set(value.name, value);
|
|
220780
220780
|
}
|
|
220781
220781
|
}
|
|
220782
220782
|
return {
|
|
220783
220783
|
add,
|
|
220784
|
-
has:
|
|
220785
|
-
values:
|
|
220784
|
+
has: map23.has.bind(map23),
|
|
220785
|
+
values: map23.values.bind(map23)
|
|
220786
220786
|
};
|
|
220787
220787
|
}
|
|
220788
220788
|
function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program2, log, preferences, includeSymbol) {
|
|
@@ -222164,22 +222164,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222164
222164
|
return refs;
|
|
222165
222165
|
}
|
|
222166
222166
|
function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
|
|
222167
|
-
const
|
|
222167
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
222168
222168
|
for (const sourceFile of sourceFiles) {
|
|
222169
222169
|
if (cancellationToken) cancellationToken.throwIfCancellationRequested();
|
|
222170
222170
|
forEachImport(sourceFile, (importDecl, moduleSpecifier) => {
|
|
222171
222171
|
const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
|
|
222172
222172
|
if (moduleSymbol) {
|
|
222173
222173
|
const id = getSymbolId(moduleSymbol).toString();
|
|
222174
|
-
let imports =
|
|
222174
|
+
let imports = map23.get(id);
|
|
222175
222175
|
if (!imports) {
|
|
222176
|
-
|
|
222176
|
+
map23.set(id, imports = []);
|
|
222177
222177
|
}
|
|
222178
222178
|
imports.push(importDecl);
|
|
222179
222179
|
}
|
|
222180
222180
|
});
|
|
222181
222181
|
}
|
|
222182
|
-
return
|
|
222182
|
+
return map23;
|
|
222183
222183
|
}
|
|
222184
222184
|
function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
|
|
222185
222185
|
return forEach(sourceFileLike.kind === 308 ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => (
|
|
@@ -222567,7 +222567,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222567
222567
|
}
|
|
222568
222568
|
}
|
|
222569
222569
|
const checker = program2.getTypeChecker();
|
|
222570
|
-
return
|
|
222570
|
+
return map22(referenceEntries, (entry) => toImplementationLocation(entry, checker));
|
|
222571
222571
|
}
|
|
222572
222572
|
function getImplementationReferenceEntries(program2, cancellationToken, sourceFiles, node, position) {
|
|
222573
222573
|
if (node.kind === 308) {
|
|
@@ -222590,7 +222590,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222590
222590
|
}
|
|
222591
222591
|
}
|
|
222592
222592
|
function findReferenceOrRenameEntries(program2, cancellationToken, sourceFiles, node, position, options, convertEntry) {
|
|
222593
|
-
return
|
|
222593
|
+
return map22(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options)), (entry) => convertEntry(entry, node, program2.getTypeChecker()));
|
|
222594
222594
|
}
|
|
222595
222595
|
function getReferenceEntriesForNode(position, node, program2, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
222596
222596
|
return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options, sourceFilesSet));
|
|
@@ -224470,7 +224470,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
224470
224470
|
const staticBlocks = filter3(classDecl.members, isClassStaticBlockDeclaration);
|
|
224471
224471
|
const containerName = symbol22 ? typeChecker.symbolToString(symbol22, classDecl) : "";
|
|
224472
224472
|
const sourceFile2 = node.getSourceFile();
|
|
224473
|
-
return
|
|
224473
|
+
return map22(staticBlocks, (staticBlock) => {
|
|
224474
224474
|
let { pos } = moveRangePastModifiers(staticBlock);
|
|
224475
224475
|
pos = skipTrivia(sourceFile2.text, pos);
|
|
224476
224476
|
return createDefinitionInfoFromName(
|
|
@@ -224810,7 +224810,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
224810
224810
|
}
|
|
224811
224811
|
const withoutExpandos = filter3(filteredDeclarations, (d) => !isExpandoDeclaration(d));
|
|
224812
224812
|
const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations;
|
|
224813
|
-
return
|
|
224813
|
+
return map22(results, (declaration) => createDefinitionInfo(
|
|
224814
224814
|
declaration,
|
|
224815
224815
|
typeChecker,
|
|
224816
224816
|
symbol2,
|
|
@@ -226037,7 +226037,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226037
226037
|
}
|
|
226038
226038
|
}
|
|
226039
226039
|
function getJSDocTagNameCompletions() {
|
|
226040
|
-
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries =
|
|
226040
|
+
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map22(jsDocTagNames, (tagName) => {
|
|
226041
226041
|
return {
|
|
226042
226042
|
name: tagName,
|
|
226043
226043
|
kind: "keyword",
|
|
@@ -226048,7 +226048,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226048
226048
|
}
|
|
226049
226049
|
var getJSDocTagNameCompletionDetails = getJSDocTagCompletionDetails;
|
|
226050
226050
|
function getJSDocTagCompletions() {
|
|
226051
|
-
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries =
|
|
226051
|
+
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = map22(jsDocTagNames, (tagName) => {
|
|
226052
226052
|
return {
|
|
226053
226053
|
name: `@${tagName}`,
|
|
226054
226054
|
kind: "keyword",
|
|
@@ -226880,7 +226880,7 @@ ${content}
|
|
|
226880
226880
|
return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText);
|
|
226881
226881
|
}
|
|
226882
226882
|
function getNewImportSpecifiers(namedImports) {
|
|
226883
|
-
return flatMap(namedImports, (namedImport) =>
|
|
226883
|
+
return flatMap(namedImports, (namedImport) => map22(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier(
|
|
226884
226884
|
importSpecifier,
|
|
226885
226885
|
importSpecifier.isTypeOnly,
|
|
226886
226886
|
/*propertyName*/
|
|
@@ -228046,7 +228046,7 @@ ${content}
|
|
|
228046
228046
|
/*meaning*/
|
|
228047
228047
|
void 0
|
|
228048
228048
|
) : emptyArray;
|
|
228049
|
-
const items =
|
|
228049
|
+
const items = map22(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile));
|
|
228050
228050
|
let selectedItemIndex = 0;
|
|
228051
228051
|
let itemsSeen = 0;
|
|
228052
228052
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -228106,7 +228106,7 @@ ${content}
|
|
|
228106
228106
|
), spacePart()];
|
|
228107
228107
|
function getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) {
|
|
228108
228108
|
const infos = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile);
|
|
228109
|
-
return
|
|
228109
|
+
return map22(infos, ({ isVariadic, parameters, prefix, suffix }) => {
|
|
228110
228110
|
const prefixDisplayParts = [...callTargetDisplayParts, ...prefix];
|
|
228111
228111
|
const suffixDisplayParts = [...suffix, ...returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)];
|
|
228112
228112
|
const documentation = candidateSignature.getDocumentationComment(checker);
|
|
@@ -228144,7 +228144,7 @@ ${content}
|
|
|
228144
228144
|
const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
|
|
228145
228145
|
const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
|
|
228146
228146
|
return checker.getExpandedParameters(candidateSignature).map((paramList) => {
|
|
228147
|
-
const params = factory.createNodeArray([...thisParameter, ...
|
|
228147
|
+
const params = factory.createNodeArray([...thisParameter, ...map22(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]);
|
|
228148
228148
|
const parameterParts = mapToDisplayParts((writer) => {
|
|
228149
228149
|
printer.writeList(2576, params, sourceFile, writer);
|
|
228150
228150
|
});
|
|
@@ -233048,9 +233048,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
233048
233048
|
return mask2;
|
|
233049
233049
|
}
|
|
233050
233050
|
function createRulesMap(rules) {
|
|
233051
|
-
const
|
|
233051
|
+
const map23 = buildMap(rules);
|
|
233052
233052
|
return (context) => {
|
|
233053
|
-
const bucket =
|
|
233053
|
+
const bucket = map23[getRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind)];
|
|
233054
233054
|
if (bucket) {
|
|
233055
233055
|
const rules2 = [];
|
|
233056
233056
|
let ruleActionMask = 0;
|
|
@@ -233068,22 +233068,22 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
233068
233068
|
};
|
|
233069
233069
|
}
|
|
233070
233070
|
function buildMap(rules) {
|
|
233071
|
-
const
|
|
233072
|
-
const rulesBucketConstructionStateList = new Array(
|
|
233071
|
+
const map23 = new Array(mapRowLength * mapRowLength);
|
|
233072
|
+
const rulesBucketConstructionStateList = new Array(map23.length);
|
|
233073
233073
|
for (const rule2 of rules) {
|
|
233074
233074
|
const specificRule = rule2.leftTokenRange.isSpecific && rule2.rightTokenRange.isSpecific;
|
|
233075
233075
|
for (const left of rule2.leftTokenRange.tokens) {
|
|
233076
233076
|
for (const right of rule2.rightTokenRange.tokens) {
|
|
233077
233077
|
const index = getRuleBucketIndex(left, right);
|
|
233078
|
-
let rulesBucket =
|
|
233078
|
+
let rulesBucket = map23[index];
|
|
233079
233079
|
if (rulesBucket === void 0) {
|
|
233080
|
-
rulesBucket =
|
|
233080
|
+
rulesBucket = map23[index] = [];
|
|
233081
233081
|
}
|
|
233082
233082
|
addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList, index);
|
|
233083
233083
|
}
|
|
233084
233084
|
}
|
|
233085
233085
|
}
|
|
233086
|
-
return
|
|
233086
|
+
return map23;
|
|
233087
233087
|
}
|
|
233088
233088
|
function getRuleBucketIndex(row, column) {
|
|
233089
233089
|
Debug.assert(row <= 166 && column <= 166, "Must compute formatting context from tokens");
|
|
@@ -236661,7 +236661,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
236661
236661
|
makeImport: () => makeImport,
|
|
236662
236662
|
makeStringLiteral: () => makeStringLiteral,
|
|
236663
236663
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
236664
|
-
map: () =>
|
|
236664
|
+
map: () => map22,
|
|
236665
236665
|
mapAllOrFail: () => mapAllOrFail,
|
|
236666
236666
|
mapDefined: () => mapDefined,
|
|
236667
236667
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -237776,19 +237776,19 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
237776
237776
|
return fileName;
|
|
237777
237777
|
}
|
|
237778
237778
|
function createNormalizedPathMap() {
|
|
237779
|
-
const
|
|
237779
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
237780
237780
|
return {
|
|
237781
237781
|
get(path2) {
|
|
237782
|
-
return
|
|
237782
|
+
return map23.get(path2);
|
|
237783
237783
|
},
|
|
237784
237784
|
set(path2, value) {
|
|
237785
|
-
|
|
237785
|
+
map23.set(path2, value);
|
|
237786
237786
|
},
|
|
237787
237787
|
contains(path2) {
|
|
237788
|
-
return
|
|
237788
|
+
return map23.has(path2);
|
|
237789
237789
|
},
|
|
237790
237790
|
remove(path2) {
|
|
237791
|
-
|
|
237791
|
+
map23.delete(path2);
|
|
237792
237792
|
}
|
|
237793
237793
|
};
|
|
237794
237794
|
}
|
|
@@ -239336,7 +239336,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
239336
239336
|
if (!this.languageServiceEnabled) {
|
|
239337
239337
|
return this.getRootScriptInfos();
|
|
239338
239338
|
}
|
|
239339
|
-
return
|
|
239339
|
+
return map22(this.program.getSourceFiles(), (sourceFile) => {
|
|
239340
239340
|
const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
239341
239341
|
Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`);
|
|
239342
239342
|
return scriptInfo;
|
|
@@ -241017,17 +241017,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
241017
241017
|
var CloseFileWatcherEvent = "closeFileWatcher";
|
|
241018
241018
|
var ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*";
|
|
241019
241019
|
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
|
|
241020
|
-
const
|
|
241020
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
241021
241021
|
for (const option of commandLineOptions) {
|
|
241022
241022
|
if (typeof option.type === "object") {
|
|
241023
241023
|
const optionMap = option.type;
|
|
241024
241024
|
optionMap.forEach((value) => {
|
|
241025
241025
|
Debug.assert(typeof value === "number");
|
|
241026
241026
|
});
|
|
241027
|
-
|
|
241027
|
+
map23.set(option.name, optionMap);
|
|
241028
241028
|
}
|
|
241029
241029
|
}
|
|
241030
|
-
return
|
|
241030
|
+
return map23;
|
|
241031
241031
|
}
|
|
241032
241032
|
var compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(optionDeclarations);
|
|
241033
241033
|
var watchOptionsConverters = prepareConvertersForEnumLikeCompilerOptions(optionsForWatch);
|
|
@@ -244827,7 +244827,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
244827
244827
|
async enableRequestedPluginsWorker(pendingPlugins) {
|
|
244828
244828
|
Debug.assert(this.currentPluginEnablementPromise === void 0);
|
|
244829
244829
|
let sendProjectsUpdatedInBackgroundEvent = false;
|
|
244830
|
-
await Promise.all(
|
|
244830
|
+
await Promise.all(map22(pendingPlugins, async ([project, promises]) => {
|
|
244831
244831
|
const results = await Promise.all(promises);
|
|
244832
244832
|
if (project.isClosed() || isProjectDeferredClose(project)) {
|
|
244833
244833
|
this.logger.info(`Cancelling plugin enabling for ${project.getProjectName()} as it is ${project.isClosed() ? "closed" : "deferred close"}`);
|
|
@@ -245163,7 +245163,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
245163
245163
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
245164
245164
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
245165
245165
|
source: diag2.source,
|
|
245166
|
-
relatedInformation:
|
|
245166
|
+
relatedInformation: map22(diag2.relatedInformation, formatRelatedInformation)
|
|
245167
245167
|
};
|
|
245168
245168
|
}
|
|
245169
245169
|
function formatRelatedInformation(info) {
|
|
@@ -245204,7 +245204,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
245204
245204
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
245205
245205
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
245206
245206
|
source,
|
|
245207
|
-
relatedInformation:
|
|
245207
|
+
relatedInformation: map22(diag2.relatedInformation, formatRelatedInformation)
|
|
245208
245208
|
};
|
|
245209
245209
|
return includeFileName ? { ...common2, fileName: diag2.file && diag2.file.fileName } : common2;
|
|
245210
245210
|
}
|
|
@@ -245717,7 +245717,7 @@ ${json3}${newLine}`;
|
|
|
245717
245717
|
if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) {
|
|
245718
245718
|
return this.requiredResponse(result);
|
|
245719
245719
|
}
|
|
245720
|
-
const converted =
|
|
245720
|
+
const converted = map22(result, (p) => {
|
|
245721
245721
|
if (!p.projectErrors || p.projectErrors.length === 0) {
|
|
245722
245722
|
return p;
|
|
245723
245723
|
}
|
|
@@ -246789,7 +246789,7 @@ ${json3}${newLine}`;
|
|
|
246789
246789
|
this.event({
|
|
246790
246790
|
triggerFile: event.data.triggerFile,
|
|
246791
246791
|
configFile: event.data.configFileName,
|
|
246792
|
-
diagnostics:
|
|
246792
|
+
diagnostics: map22(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol(
|
|
246793
246793
|
diagnostic,
|
|
246794
246794
|
/*includeFileName*/
|
|
246795
246795
|
true
|
|
@@ -247130,7 +247130,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
247130
247130
|
concatenate(projectErrors, optionsErrors),
|
|
247131
247131
|
(diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile
|
|
247132
247132
|
);
|
|
247133
|
-
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) :
|
|
247133
|
+
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map22(
|
|
247134
247134
|
diagnosticsForConfigFile,
|
|
247135
247135
|
(diagnostic) => formatDiagnosticToProtocol(
|
|
247136
247136
|
diagnostic,
|
|
@@ -247155,7 +247155,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
247155
247155
|
// TODO: GH#18217
|
|
247156
247156
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
247157
247157
|
reportsDeprecated: d.reportsDeprecated,
|
|
247158
|
-
relatedInformation:
|
|
247158
|
+
relatedInformation: map22(d.relatedInformation, formatRelatedInformation)
|
|
247159
247159
|
}));
|
|
247160
247160
|
}
|
|
247161
247161
|
getCompilerOptionsDiagnostics(args) {
|
|
@@ -247183,7 +247183,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
247183
247183
|
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length),
|
|
247184
247184
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
247185
247185
|
reportsDeprecated: d.reportsDeprecated,
|
|
247186
|
-
relatedInformation:
|
|
247186
|
+
relatedInformation: map22(d.relatedInformation, formatRelatedInformation)
|
|
247187
247187
|
})
|
|
247188
247188
|
);
|
|
247189
247189
|
}
|
|
@@ -247763,14 +247763,14 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
247763
247763
|
}
|
|
247764
247764
|
}
|
|
247765
247765
|
toSpanGroups(locations) {
|
|
247766
|
-
const
|
|
247766
|
+
const map23 = /* @__PURE__ */ new Map();
|
|
247767
247767
|
for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _3, originalFileName: _1, ...prefixSuffixText } of locations) {
|
|
247768
|
-
let group2 =
|
|
247769
|
-
if (!group2)
|
|
247768
|
+
let group2 = map23.get(fileName);
|
|
247769
|
+
if (!group2) map23.set(fileName, group2 = { file: fileName, locs: [] });
|
|
247770
247770
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName));
|
|
247771
247771
|
group2.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText });
|
|
247772
247772
|
}
|
|
247773
|
-
return arrayFrom(
|
|
247773
|
+
return arrayFrom(map23.values());
|
|
247774
247774
|
}
|
|
247775
247775
|
getReferences(args, simplifiedResult) {
|
|
247776
247776
|
const file2 = toNormalizedPath(args.file);
|
|
@@ -248090,7 +248090,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248090
248090
|
false
|
|
248091
248091
|
) })) : result.map((details) => ({
|
|
248092
248092
|
...details,
|
|
248093
|
-
codeActions:
|
|
248093
|
+
codeActions: map22(details.codeActions, (action) => this.mapCodeAction(action)),
|
|
248094
248094
|
documentation: this.mapDisplayParts(details.documentation, project),
|
|
248095
248095
|
tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts)
|
|
248096
248096
|
}));
|
|
@@ -248230,7 +248230,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248230
248230
|
this.projectService.closeClientFile(file2);
|
|
248231
248231
|
}
|
|
248232
248232
|
mapLocationNavigationBarItems(items, scriptInfo) {
|
|
248233
|
-
return
|
|
248233
|
+
return map22(items, (item) => ({
|
|
248234
248234
|
text: item.text,
|
|
248235
248235
|
kind: item.kind,
|
|
248236
248236
|
kindModifiers: item.kindModifiers,
|
|
@@ -248251,7 +248251,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248251
248251
|
kindModifiers: tree.kindModifiers,
|
|
248252
248252
|
spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)),
|
|
248253
248253
|
nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo),
|
|
248254
|
-
childItems:
|
|
248254
|
+
childItems: map22(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo))
|
|
248255
248255
|
};
|
|
248256
248256
|
}
|
|
248257
248257
|
getNavigationTree(args, simplifiedResult) {
|
|
@@ -248643,7 +248643,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
248643
248643
|
const { locations } = args;
|
|
248644
248644
|
const { file: file2, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
248645
248645
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file2));
|
|
248646
|
-
return
|
|
248646
|
+
return map22(locations, (location) => {
|
|
248647
248647
|
const pos = this.getPosition(location, scriptInfo);
|
|
248648
248648
|
const selectionRange = languageService.getSmartSelectionRange(file2, pos);
|
|
248649
248649
|
return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange;
|
|
@@ -251656,19 +251656,19 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
251656
251656
|
};
|
|
251657
251657
|
};
|
|
251658
251658
|
function createObjectStash() {
|
|
251659
|
-
const
|
|
251659
|
+
const map22 = /* @__PURE__ */ new Map();
|
|
251660
251660
|
let nextID = 0;
|
|
251661
251661
|
return {
|
|
251662
251662
|
clear() {
|
|
251663
|
-
|
|
251663
|
+
map22.clear();
|
|
251664
251664
|
},
|
|
251665
251665
|
load(id) {
|
|
251666
|
-
return
|
|
251666
|
+
return map22.get(id);
|
|
251667
251667
|
},
|
|
251668
251668
|
store(value) {
|
|
251669
251669
|
if (value === void 0) return -1;
|
|
251670
251670
|
const id = nextID++;
|
|
251671
|
-
|
|
251671
|
+
map22.set(id, value);
|
|
251672
251672
|
return id;
|
|
251673
251673
|
}
|
|
251674
251674
|
};
|
|
@@ -251857,10 +251857,10 @@ ${file2}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
|
|
|
251857
251857
|
}
|
|
251858
251858
|
return result;
|
|
251859
251859
|
}
|
|
251860
|
-
function sanitizeStringMap(
|
|
251860
|
+
function sanitizeStringMap(map22, property) {
|
|
251861
251861
|
const result = /* @__PURE__ */ Object.create(null);
|
|
251862
|
-
for (const key in
|
|
251863
|
-
const value =
|
|
251862
|
+
for (const key in map22) {
|
|
251863
|
+
const value = map22[key];
|
|
251864
251864
|
if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`);
|
|
251865
251865
|
result[key] = value;
|
|
251866
251866
|
}
|
|
@@ -252520,90 +252520,6 @@ error: ${text}`);
|
|
|
252520
252520
|
}
|
|
252521
252521
|
});
|
|
252522
252522
|
|
|
252523
|
-
// src/commands/build/build.ts
|
|
252524
|
-
var build_exports = {};
|
|
252525
|
-
__export(build_exports, {
|
|
252526
|
-
default: () => build_default
|
|
252527
|
-
});
|
|
252528
|
-
var import_esbuild_decorators, build_default;
|
|
252529
|
-
var init_build = __esm({
|
|
252530
|
-
"src/commands/build/build.ts"() {
|
|
252531
|
-
import_esbuild_decorators = __toESM(require_src());
|
|
252532
|
-
init_log();
|
|
252533
|
-
build_default = async (args) => {
|
|
252534
|
-
Logger.info(
|
|
252535
|
-
`\u{1F528} Bundling ${args.files?.length ? args.files.join("") : "index.ts"}`
|
|
252536
|
-
);
|
|
252537
|
-
const time3 = Date.now();
|
|
252538
|
-
return (await Promise.resolve().then(() => __toESM(require_main()))).build({
|
|
252539
|
-
entryPoints: args.files?.length ? args.files : ["index.ts"],
|
|
252540
|
-
bundle: args.bundle ?? true,
|
|
252541
|
-
minify: args.minify ?? false,
|
|
252542
|
-
platform: args.platform ?? "node",
|
|
252543
|
-
target: args.target ?? "node14.4",
|
|
252544
|
-
outfile: args.outfile ?? "index.js",
|
|
252545
|
-
external: args.external ?? [],
|
|
252546
|
-
plugins: [
|
|
252547
|
-
(0, import_esbuild_decorators.esbuildDecorators)({
|
|
252548
|
-
tsconfig: "tsconfig.json",
|
|
252549
|
-
cwd: process.cwd()
|
|
252550
|
-
})
|
|
252551
|
-
]
|
|
252552
|
-
}).then((data) => {
|
|
252553
|
-
if (data.warnings.length) {
|
|
252554
|
-
Logger.warn(data.warnings);
|
|
252555
|
-
}
|
|
252556
|
-
if (data.errors.length) {
|
|
252557
|
-
Logger.error(data.errors);
|
|
252558
|
-
}
|
|
252559
|
-
Logger.warn(`\u{1F3D7}\uFE0F Bundling finish in ${Date.now() - time3}ms`);
|
|
252560
|
-
Logger.info(
|
|
252561
|
-
`\u2705 Finished bundling output file ${args.outfile ?? "index.js"}`
|
|
252562
|
-
);
|
|
252563
|
-
}).catch((e) => {
|
|
252564
|
-
console.error(e);
|
|
252565
|
-
process.exit(1);
|
|
252566
|
-
});
|
|
252567
|
-
};
|
|
252568
|
-
}
|
|
252569
|
-
});
|
|
252570
|
-
|
|
252571
|
-
// src/commands/environment/list-environments.ts
|
|
252572
|
-
var list_environments_exports = {};
|
|
252573
|
-
__export(list_environments_exports, {
|
|
252574
|
-
default: () => list_environments_default
|
|
252575
|
-
});
|
|
252576
|
-
var import_operators5, list_environments_default;
|
|
252577
|
-
var init_list_environments = __esm({
|
|
252578
|
-
"src/commands/environment/list-environments.ts"() {
|
|
252579
|
-
import_operators5 = __toESM(require_operators());
|
|
252580
|
-
init_helpers();
|
|
252581
|
-
init_gql_client();
|
|
252582
|
-
init_log();
|
|
252583
|
-
list_environments_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
252584
|
-
(0, import_operators5.switchMap)((projectId) => GraphqlClienAPI.listEnvironments(projectId)),
|
|
252585
|
-
(0, import_operators5.tap)((data) => {
|
|
252586
|
-
const columns = [
|
|
252587
|
-
"id",
|
|
252588
|
-
"name",
|
|
252589
|
-
"image",
|
|
252590
|
-
"builder",
|
|
252591
|
-
"poolSize",
|
|
252592
|
-
"minCpu",
|
|
252593
|
-
"maxCpu",
|
|
252594
|
-
"minMemory",
|
|
252595
|
-
"maxMemory",
|
|
252596
|
-
"region"
|
|
252597
|
-
];
|
|
252598
|
-
Logger.log("-------------------");
|
|
252599
|
-
Logger.log("[Action][listEnvironments]");
|
|
252600
|
-
Logger.table(data, columns);
|
|
252601
|
-
Logger.log("-------------------");
|
|
252602
|
-
})
|
|
252603
|
-
).toPromise();
|
|
252604
|
-
}
|
|
252605
|
-
});
|
|
252606
|
-
|
|
252607
252523
|
// ../../node_modules/js-yaml/dist/js-yaml.mjs
|
|
252608
252524
|
function isNothing(subject) {
|
|
252609
252525
|
return typeof subject === "undefined" || subject === null;
|
|
@@ -252732,11 +252648,11 @@ function makeSnippet(mark, options) {
|
|
|
252732
252648
|
}
|
|
252733
252649
|
return result.replace(/\n$/, "");
|
|
252734
252650
|
}
|
|
252735
|
-
function compileStyleAliases(
|
|
252651
|
+
function compileStyleAliases(map22) {
|
|
252736
252652
|
var result = {};
|
|
252737
|
-
if (
|
|
252738
|
-
Object.keys(
|
|
252739
|
-
|
|
252653
|
+
if (map22 !== null) {
|
|
252654
|
+
Object.keys(map22).forEach(function(style) {
|
|
252655
|
+
map22[style].forEach(function(alias) {
|
|
252740
252656
|
result[String(alias)] = style;
|
|
252741
252657
|
});
|
|
252742
252658
|
});
|
|
@@ -253025,9 +252941,9 @@ function resolveYamlMerge(data) {
|
|
|
253025
252941
|
}
|
|
253026
252942
|
function resolveYamlBinary(data) {
|
|
253027
252943
|
if (data === null) return false;
|
|
253028
|
-
var code, idx, bitlen = 0, max = data.length,
|
|
252944
|
+
var code, idx, bitlen = 0, max = data.length, map22 = BASE64_MAP;
|
|
253029
252945
|
for (idx = 0; idx < max; idx++) {
|
|
253030
|
-
code =
|
|
252946
|
+
code = map22.indexOf(data.charAt(idx));
|
|
253031
252947
|
if (code > 64) continue;
|
|
253032
252948
|
if (code < 0) return false;
|
|
253033
252949
|
bitlen += 6;
|
|
@@ -253035,14 +252951,14 @@ function resolveYamlBinary(data) {
|
|
|
253035
252951
|
return bitlen % 8 === 0;
|
|
253036
252952
|
}
|
|
253037
252953
|
function constructYamlBinary(data) {
|
|
253038
|
-
var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length,
|
|
252954
|
+
var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map22 = BASE64_MAP, bits = 0, result = [];
|
|
253039
252955
|
for (idx = 0; idx < max; idx++) {
|
|
253040
252956
|
if (idx % 4 === 0 && idx) {
|
|
253041
252957
|
result.push(bits >> 16 & 255);
|
|
253042
252958
|
result.push(bits >> 8 & 255);
|
|
253043
252959
|
result.push(bits & 255);
|
|
253044
252960
|
}
|
|
253045
|
-
bits = bits << 6 |
|
|
252961
|
+
bits = bits << 6 | map22.indexOf(input.charAt(idx));
|
|
253046
252962
|
}
|
|
253047
252963
|
tailbits = max % 4 * 6;
|
|
253048
252964
|
if (tailbits === 0) {
|
|
@@ -253058,32 +252974,32 @@ function constructYamlBinary(data) {
|
|
|
253058
252974
|
return new Uint8Array(result);
|
|
253059
252975
|
}
|
|
253060
252976
|
function representYamlBinary(object3) {
|
|
253061
|
-
var result = "", bits = 0, idx, tail, max = object3.length,
|
|
252977
|
+
var result = "", bits = 0, idx, tail, max = object3.length, map22 = BASE64_MAP;
|
|
253062
252978
|
for (idx = 0; idx < max; idx++) {
|
|
253063
252979
|
if (idx % 3 === 0 && idx) {
|
|
253064
|
-
result +=
|
|
253065
|
-
result +=
|
|
253066
|
-
result +=
|
|
253067
|
-
result +=
|
|
252980
|
+
result += map22[bits >> 18 & 63];
|
|
252981
|
+
result += map22[bits >> 12 & 63];
|
|
252982
|
+
result += map22[bits >> 6 & 63];
|
|
252983
|
+
result += map22[bits & 63];
|
|
253068
252984
|
}
|
|
253069
252985
|
bits = (bits << 8) + object3[idx];
|
|
253070
252986
|
}
|
|
253071
252987
|
tail = max % 3;
|
|
253072
252988
|
if (tail === 0) {
|
|
253073
|
-
result +=
|
|
253074
|
-
result +=
|
|
253075
|
-
result +=
|
|
253076
|
-
result +=
|
|
252989
|
+
result += map22[bits >> 18 & 63];
|
|
252990
|
+
result += map22[bits >> 12 & 63];
|
|
252991
|
+
result += map22[bits >> 6 & 63];
|
|
252992
|
+
result += map22[bits & 63];
|
|
253077
252993
|
} else if (tail === 2) {
|
|
253078
|
-
result +=
|
|
253079
|
-
result +=
|
|
253080
|
-
result +=
|
|
253081
|
-
result +=
|
|
252994
|
+
result += map22[bits >> 10 & 63];
|
|
252995
|
+
result += map22[bits >> 4 & 63];
|
|
252996
|
+
result += map22[bits << 2 & 63];
|
|
252997
|
+
result += map22[64];
|
|
253082
252998
|
} else if (tail === 1) {
|
|
253083
|
-
result +=
|
|
253084
|
-
result +=
|
|
253085
|
-
result +=
|
|
253086
|
-
result +=
|
|
252999
|
+
result += map22[bits >> 2 & 63];
|
|
253000
|
+
result += map22[bits << 4 & 63];
|
|
253001
|
+
result += map22[64];
|
|
253002
|
+
result += map22[64];
|
|
253087
253003
|
}
|
|
253088
253004
|
return result;
|
|
253089
253005
|
}
|
|
@@ -254229,14 +254145,14 @@ function load$1(input, options) {
|
|
|
254229
254145
|
}
|
|
254230
254146
|
throw new exception("expected a single document in the stream, but found more");
|
|
254231
254147
|
}
|
|
254232
|
-
function compileStyleMap(schema2,
|
|
254148
|
+
function compileStyleMap(schema2, map22) {
|
|
254233
254149
|
var result, keys, index, length, tag, style, type2;
|
|
254234
|
-
if (
|
|
254150
|
+
if (map22 === null) return {};
|
|
254235
254151
|
result = {};
|
|
254236
|
-
keys = Object.keys(
|
|
254152
|
+
keys = Object.keys(map22);
|
|
254237
254153
|
for (index = 0, length = keys.length; index < length; index += 1) {
|
|
254238
254154
|
tag = keys[index];
|
|
254239
|
-
style = String(
|
|
254155
|
+
style = String(map22[tag]);
|
|
254240
254156
|
if (tag.slice(0, 2) === "!!") {
|
|
254241
254157
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
254242
254158
|
}
|
|
@@ -254783,7 +254699,7 @@ function renamed(from16, to) {
|
|
|
254783
254699
|
throw new Error("Function yaml." + from16 + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
|
|
254784
254700
|
};
|
|
254785
254701
|
}
|
|
254786
|
-
var isNothing_1, isObject_1, toArray_1, repeat_1, isNegativeZero_1, extend_1, common, exception, snippet, TYPE_CONSTRUCTOR_OPTIONS, YAML_NODE_KINDS, type, schema, str, seq,
|
|
254702
|
+
var isNothing_1, isObject_1, toArray_1, repeat_1, isNegativeZero_1, extend_1, common, exception, snippet, TYPE_CONSTRUCTOR_OPTIONS, YAML_NODE_KINDS, type, schema, str, seq, map4, failsafe, _null, bool, int, YAML_FLOAT_PATTERN, SCIENTIFIC_WITHOUT_DOT, float, json, core, YAML_DATE_REGEXP, YAML_TIMESTAMP_REGEXP, timestamp, merge, BASE64_MAP, binary, _hasOwnProperty$3, _toString$2, omap, _toString$1, pairs, _hasOwnProperty$2, set, _default, _hasOwnProperty$1, CONTEXT_FLOW_IN, CONTEXT_FLOW_OUT, CONTEXT_BLOCK_IN, CONTEXT_BLOCK_OUT, CHOMPING_CLIP, CHOMPING_STRIP, CHOMPING_KEEP, PATTERN_NON_PRINTABLE, PATTERN_NON_ASCII_LINE_BREAKS, PATTERN_FLOW_INDICATORS, PATTERN_TAG_HANDLE, PATTERN_TAG_URI, simpleEscapeCheck, simpleEscapeMap, i, directiveHandlers, loadAll_1, load_1, loader, _toString, _hasOwnProperty, CHAR_BOM, CHAR_TAB, CHAR_LINE_FEED, CHAR_CARRIAGE_RETURN, CHAR_SPACE, CHAR_EXCLAMATION, CHAR_DOUBLE_QUOTE, CHAR_SHARP, CHAR_PERCENT, CHAR_AMPERSAND, CHAR_SINGLE_QUOTE, CHAR_ASTERISK, CHAR_COMMA, CHAR_MINUS, CHAR_COLON, CHAR_EQUALS, CHAR_GREATER_THAN, CHAR_QUESTION, CHAR_COMMERCIAL_AT, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_GRAVE_ACCENT, CHAR_LEFT_CURLY_BRACKET, CHAR_VERTICAL_LINE, CHAR_RIGHT_CURLY_BRACKET, ESCAPE_SEQUENCES, DEPRECATED_BOOLEANS_SYNTAX, DEPRECATED_BASE60_SYNTAX, QUOTING_TYPE_SINGLE, QUOTING_TYPE_DOUBLE, STYLE_PLAIN, STYLE_SINGLE, STYLE_LITERAL, STYLE_FOLDED, STYLE_DOUBLE, dump_1, dumper, load, loadAll, dump, safeLoad, safeLoadAll, safeDump;
|
|
254787
254703
|
var init_js_yaml = __esm({
|
|
254788
254704
|
"../../node_modules/js-yaml/dist/js-yaml.mjs"() {
|
|
254789
254705
|
isNothing_1 = isNothing;
|
|
@@ -254875,7 +254791,7 @@ var init_js_yaml = __esm({
|
|
|
254875
254791
|
return data !== null ? data : [];
|
|
254876
254792
|
}
|
|
254877
254793
|
});
|
|
254878
|
-
|
|
254794
|
+
map4 = new type("tag:yaml.org,2002:map", {
|
|
254879
254795
|
kind: "mapping",
|
|
254880
254796
|
construct: function(data) {
|
|
254881
254797
|
return data !== null ? data : {};
|
|
@@ -254885,7 +254801,7 @@ var init_js_yaml = __esm({
|
|
|
254885
254801
|
explicit: [
|
|
254886
254802
|
str,
|
|
254887
254803
|
seq,
|
|
254888
|
-
|
|
254804
|
+
map4
|
|
254889
254805
|
]
|
|
254890
254806
|
});
|
|
254891
254807
|
_null = new type("tag:yaml.org,2002:null", {
|
|
@@ -255192,72 +255108,179 @@ var init_js_yaml = __esm({
|
|
|
255192
255108
|
});
|
|
255193
255109
|
|
|
255194
255110
|
// src/commands/lambda/helpers/load-spec.ts
|
|
255195
|
-
var
|
|
255111
|
+
var import_rxjs5, import_operators4, loadSpec;
|
|
255196
255112
|
var init_load_spec = __esm({
|
|
255197
255113
|
"src/commands/lambda/helpers/load-spec.ts"() {
|
|
255198
255114
|
init_js_yaml();
|
|
255199
|
-
|
|
255200
|
-
|
|
255115
|
+
import_rxjs5 = __toESM(require_cjs());
|
|
255116
|
+
import_operators4 = __toESM(require_operators());
|
|
255201
255117
|
init_read_file();
|
|
255202
|
-
loadSpec = (spec) => (0,
|
|
255118
|
+
loadSpec = (spec) => (0, import_rxjs5.combineLatest)([
|
|
255203
255119
|
readFileAsObservable(spec).pipe(
|
|
255204
|
-
(0,
|
|
255205
|
-
(0,
|
|
255206
|
-
() => (0,
|
|
255207
|
-
(0,
|
|
255208
|
-
(0,
|
|
255120
|
+
(0, import_operators4.map)((spec2) => JSON.parse(spec2)),
|
|
255121
|
+
(0, import_operators4.catchError)(
|
|
255122
|
+
() => (0, import_rxjs5.from)(readFileAsObservable(spec)).pipe(
|
|
255123
|
+
(0, import_operators4.map)((file2) => load(file2)),
|
|
255124
|
+
(0, import_operators4.catchError)(() => (0, import_rxjs5.of)(false))
|
|
255209
255125
|
)
|
|
255210
255126
|
)
|
|
255211
255127
|
),
|
|
255212
255128
|
readFileAsObservable("lambforge.yaml").pipe(
|
|
255213
|
-
(0,
|
|
255214
|
-
(0,
|
|
255129
|
+
(0, import_operators4.map)((data) => load(data)),
|
|
255130
|
+
(0, import_operators4.catchError)(() => (0, import_rxjs5.of)(false))
|
|
255215
255131
|
),
|
|
255216
255132
|
readFileAsObservable("spec.json").pipe(
|
|
255217
|
-
(0,
|
|
255218
|
-
(0,
|
|
255133
|
+
(0, import_operators4.map)((spec2) => JSON.parse(spec2)),
|
|
255134
|
+
(0, import_operators4.catchError)(() => (0, import_rxjs5.of)(false))
|
|
255219
255135
|
),
|
|
255220
255136
|
readFileAsObservable("spec.yaml").pipe(
|
|
255221
|
-
(0,
|
|
255222
|
-
(0,
|
|
255137
|
+
(0, import_operators4.map)((data) => load(data)),
|
|
255138
|
+
(0, import_operators4.catchError)(() => (0, import_rxjs5.of)(false))
|
|
255223
255139
|
)
|
|
255224
255140
|
]).pipe(
|
|
255225
|
-
(0,
|
|
255141
|
+
(0, import_operators4.map)(
|
|
255226
255142
|
([custom2, lambforge, json3, yaml]) => custom2 || lambforge || json3 || yaml
|
|
255227
255143
|
)
|
|
255228
255144
|
);
|
|
255229
255145
|
}
|
|
255230
255146
|
});
|
|
255231
255147
|
|
|
255148
|
+
// src/commands/build/build.ts
|
|
255149
|
+
var build_exports = {};
|
|
255150
|
+
__export(build_exports, {
|
|
255151
|
+
default: () => build_default
|
|
255152
|
+
});
|
|
255153
|
+
var import_esbuild_decorators, import_esbuild, import_rxjs6, import_operators5, build_default;
|
|
255154
|
+
var init_build = __esm({
|
|
255155
|
+
"src/commands/build/build.ts"() {
|
|
255156
|
+
import_esbuild_decorators = __toESM(require_src());
|
|
255157
|
+
import_esbuild = __toESM(require_main());
|
|
255158
|
+
import_rxjs6 = __toESM(require_cjs());
|
|
255159
|
+
import_operators5 = __toESM(require_operators());
|
|
255160
|
+
init_log();
|
|
255161
|
+
init_load_spec();
|
|
255162
|
+
build_default = async (args) => {
|
|
255163
|
+
const time3 = Date.now();
|
|
255164
|
+
return (0, import_rxjs6.lastValueFrom)(
|
|
255165
|
+
loadSpec().pipe(
|
|
255166
|
+
(0, import_operators5.tap)((config2) => {
|
|
255167
|
+
Logger.info(
|
|
255168
|
+
`\u{1F528} Bundling ${args.files?.length ? args.files.join("") : config2?.function?.file ?? config2?.file ?? "index.ts"}`
|
|
255169
|
+
);
|
|
255170
|
+
}),
|
|
255171
|
+
(0, import_operators5.switchMap)(
|
|
255172
|
+
(config2) => (0, import_rxjs6.of)(config2).pipe(
|
|
255173
|
+
(0, import_operators5.map)((config3) => ({
|
|
255174
|
+
esbuild: import_esbuild.default,
|
|
255175
|
+
options: {
|
|
255176
|
+
entryPoints: args.files?.length ? args.files : [config3?.function?.file ?? config3?.file ?? "index.ts"],
|
|
255177
|
+
bundle: args.bundle ?? config3?.options?.bundler?.bundle ?? true,
|
|
255178
|
+
minify: args.minify ?? config3?.options?.bundler?.minify ?? false,
|
|
255179
|
+
platform: args.platform ?? "node",
|
|
255180
|
+
target: args.target ?? config3?.options?.bundler?.target ?? "node24",
|
|
255181
|
+
outfile: args.outfile ?? config3?.options?.bundler?.outfile ?? "index.js",
|
|
255182
|
+
external: args.external ?? config3?.options?.bundler?.external ?? []
|
|
255183
|
+
},
|
|
255184
|
+
plugins: [
|
|
255185
|
+
(0, import_esbuild_decorators.esbuildDecorators)({
|
|
255186
|
+
tsconfig: "tsconfig.json",
|
|
255187
|
+
cwd: process.cwd()
|
|
255188
|
+
})
|
|
255189
|
+
]
|
|
255190
|
+
})),
|
|
255191
|
+
(0, import_operators5.switchMap)(
|
|
255192
|
+
({ esbuild: esbuild2, options }) => esbuild2.build({
|
|
255193
|
+
...options
|
|
255194
|
+
})
|
|
255195
|
+
),
|
|
255196
|
+
(0, import_operators5.tap)((data) => {
|
|
255197
|
+
if (data.warnings.length) {
|
|
255198
|
+
Logger.warn(data.warnings);
|
|
255199
|
+
}
|
|
255200
|
+
if (data.errors.length) {
|
|
255201
|
+
Logger.error(data.errors);
|
|
255202
|
+
}
|
|
255203
|
+
Logger.warn(`\u{1F3D7}\uFE0F Bundling finish in ${Date.now() - time3}ms`);
|
|
255204
|
+
Logger.info(
|
|
255205
|
+
`\u2705 Finished bundling output file ${args.outfile ?? config2?.options?.bundler?.outfile ?? "index.js"}`
|
|
255206
|
+
);
|
|
255207
|
+
})
|
|
255208
|
+
)
|
|
255209
|
+
)
|
|
255210
|
+
)
|
|
255211
|
+
).catch((e) => {
|
|
255212
|
+
console.error(e);
|
|
255213
|
+
process.exit(1);
|
|
255214
|
+
});
|
|
255215
|
+
};
|
|
255216
|
+
}
|
|
255217
|
+
});
|
|
255218
|
+
|
|
255219
|
+
// src/commands/environment/list-environments.ts
|
|
255220
|
+
var list_environments_exports = {};
|
|
255221
|
+
__export(list_environments_exports, {
|
|
255222
|
+
default: () => list_environments_default
|
|
255223
|
+
});
|
|
255224
|
+
var import_operators7, list_environments_default;
|
|
255225
|
+
var init_list_environments = __esm({
|
|
255226
|
+
"src/commands/environment/list-environments.ts"() {
|
|
255227
|
+
import_operators7 = __toESM(require_operators());
|
|
255228
|
+
init_helpers();
|
|
255229
|
+
init_gql_client();
|
|
255230
|
+
init_log();
|
|
255231
|
+
list_environments_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
255232
|
+
(0, import_operators7.switchMap)((projectId) => GraphqlClienAPI.listEnvironments(projectId)),
|
|
255233
|
+
(0, import_operators7.tap)((data) => {
|
|
255234
|
+
const columns = [
|
|
255235
|
+
"id",
|
|
255236
|
+
"name",
|
|
255237
|
+
"image",
|
|
255238
|
+
"builder",
|
|
255239
|
+
"poolSize",
|
|
255240
|
+
"minCpu",
|
|
255241
|
+
"maxCpu",
|
|
255242
|
+
"minMemory",
|
|
255243
|
+
"maxMemory",
|
|
255244
|
+
"region"
|
|
255245
|
+
];
|
|
255246
|
+
Logger.log("-------------------");
|
|
255247
|
+
Logger.log("[Action][listEnvironments]");
|
|
255248
|
+
Logger.table(data, columns);
|
|
255249
|
+
Logger.log("-------------------");
|
|
255250
|
+
})
|
|
255251
|
+
).toPromise();
|
|
255252
|
+
}
|
|
255253
|
+
});
|
|
255254
|
+
|
|
255232
255255
|
// src/commands/environment/create-environment.ts
|
|
255233
255256
|
var create_environment_exports = {};
|
|
255234
255257
|
__export(create_environment_exports, {
|
|
255235
255258
|
default: () => create_environment_default
|
|
255236
255259
|
});
|
|
255237
|
-
var
|
|
255260
|
+
var import_operators8, create_environment_default;
|
|
255238
255261
|
var init_create_environment = __esm({
|
|
255239
255262
|
"src/commands/environment/create-environment.ts"() {
|
|
255240
|
-
|
|
255263
|
+
import_operators8 = __toESM(require_operators());
|
|
255241
255264
|
init_helpers();
|
|
255242
255265
|
init_gql_client();
|
|
255243
255266
|
init_log();
|
|
255244
255267
|
init_load_spec();
|
|
255245
255268
|
create_environment_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
255246
|
-
(0,
|
|
255269
|
+
(0, import_operators8.switchMap)(
|
|
255247
255270
|
(projectId) => loadSpec(cmd.spec ?? "env.yaml").pipe(
|
|
255248
|
-
(0,
|
|
255271
|
+
(0, import_operators8.map)((data) => ({
|
|
255249
255272
|
projectId,
|
|
255250
255273
|
...data?.environment ?? data
|
|
255251
255274
|
}))
|
|
255252
255275
|
)
|
|
255253
255276
|
),
|
|
255254
|
-
(0,
|
|
255277
|
+
(0, import_operators8.switchMap)(
|
|
255255
255278
|
({ projectId, ...data }) => GraphqlClienAPI.createEnvironment(projectId, {
|
|
255256
255279
|
...data,
|
|
255257
255280
|
...cmd
|
|
255258
255281
|
})
|
|
255259
255282
|
),
|
|
255260
|
-
(0,
|
|
255283
|
+
(0, import_operators8.tap)((data) => {
|
|
255261
255284
|
const columns = [
|
|
255262
255285
|
"id",
|
|
255263
255286
|
"name",
|
|
@@ -255284,31 +255307,31 @@ var update_environment_exports = {};
|
|
|
255284
255307
|
__export(update_environment_exports, {
|
|
255285
255308
|
default: () => update_environment_default
|
|
255286
255309
|
});
|
|
255287
|
-
var
|
|
255310
|
+
var import_operators9, update_environment_default;
|
|
255288
255311
|
var init_update_environment = __esm({
|
|
255289
255312
|
"src/commands/environment/update-environment.ts"() {
|
|
255290
|
-
|
|
255313
|
+
import_operators9 = __toESM(require_operators());
|
|
255291
255314
|
init_helpers();
|
|
255292
255315
|
init_gql_client();
|
|
255293
255316
|
init_log();
|
|
255294
255317
|
init_load_spec();
|
|
255295
255318
|
update_environment_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
255296
|
-
(0,
|
|
255319
|
+
(0, import_operators9.switchMap)(
|
|
255297
255320
|
(projectId) => loadSpec(cmd.spec ?? "env.yaml").pipe(
|
|
255298
|
-
(0,
|
|
255321
|
+
(0, import_operators9.map)((data) => ({
|
|
255299
255322
|
projectId,
|
|
255300
255323
|
...data?.environment ?? data
|
|
255301
255324
|
}))
|
|
255302
255325
|
)
|
|
255303
255326
|
),
|
|
255304
|
-
(0,
|
|
255305
|
-
(0,
|
|
255327
|
+
(0, import_operators9.tap)(Logger.log),
|
|
255328
|
+
(0, import_operators9.switchMap)(
|
|
255306
255329
|
({ projectId, ...data }) => GraphqlClienAPI.updateEnvironment(projectId, {
|
|
255307
255330
|
...data,
|
|
255308
255331
|
...cmd
|
|
255309
255332
|
})
|
|
255310
255333
|
),
|
|
255311
|
-
(0,
|
|
255334
|
+
(0, import_operators9.tap)((data) => {
|
|
255312
255335
|
const columns = [
|
|
255313
255336
|
"id",
|
|
255314
255337
|
"name",
|
|
@@ -255335,27 +255358,27 @@ var delete_environment_exports = {};
|
|
|
255335
255358
|
__export(delete_environment_exports, {
|
|
255336
255359
|
default: () => delete_environment_default
|
|
255337
255360
|
});
|
|
255338
|
-
var
|
|
255361
|
+
var import_operators10, delete_environment_default;
|
|
255339
255362
|
var init_delete_environment = __esm({
|
|
255340
255363
|
"src/commands/environment/delete-environment.ts"() {
|
|
255341
|
-
|
|
255364
|
+
import_operators10 = __toESM(require_operators());
|
|
255342
255365
|
init_helpers();
|
|
255343
255366
|
init_gql_client();
|
|
255344
255367
|
init_log();
|
|
255345
255368
|
init_load_spec();
|
|
255346
255369
|
delete_environment_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
255347
|
-
(0,
|
|
255370
|
+
(0, import_operators10.switchMap)(
|
|
255348
255371
|
(projectId) => loadSpec(cmd.spec ?? "env.yaml").pipe(
|
|
255349
|
-
(0,
|
|
255372
|
+
(0, import_operators10.map)((data) => ({
|
|
255350
255373
|
projectId,
|
|
255351
255374
|
...data?.environment ?? data
|
|
255352
255375
|
}))
|
|
255353
255376
|
)
|
|
255354
255377
|
),
|
|
255355
|
-
(0,
|
|
255378
|
+
(0, import_operators10.switchMap)(
|
|
255356
255379
|
({ projectId, name: name2 }) => GraphqlClienAPI.deleteEnvironment(name2, projectId, cmd.force)
|
|
255357
255380
|
),
|
|
255358
|
-
(0,
|
|
255381
|
+
(0, import_operators10.tap)((data) => {
|
|
255359
255382
|
const columns = [
|
|
255360
255383
|
"id",
|
|
255361
255384
|
"name",
|
|
@@ -255382,27 +255405,27 @@ var get_environment_exports = {};
|
|
|
255382
255405
|
__export(get_environment_exports, {
|
|
255383
255406
|
default: () => get_environment_default
|
|
255384
255407
|
});
|
|
255385
|
-
var
|
|
255408
|
+
var import_operators11, get_environment_default;
|
|
255386
255409
|
var init_get_environment = __esm({
|
|
255387
255410
|
"src/commands/environment/get-environment.ts"() {
|
|
255388
|
-
|
|
255411
|
+
import_operators11 = __toESM(require_operators());
|
|
255389
255412
|
init_helpers();
|
|
255390
255413
|
init_gql_client();
|
|
255391
255414
|
init_log();
|
|
255392
255415
|
init_load_spec();
|
|
255393
255416
|
get_environment_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
255394
|
-
(0,
|
|
255417
|
+
(0, import_operators11.switchMap)(
|
|
255395
255418
|
(projectId) => loadSpec(cmd.spec ?? "env.yaml").pipe(
|
|
255396
|
-
(0,
|
|
255419
|
+
(0, import_operators11.map)((data) => ({
|
|
255397
255420
|
projectId,
|
|
255398
255421
|
...data?.environment ?? data
|
|
255399
255422
|
}))
|
|
255400
255423
|
)
|
|
255401
255424
|
),
|
|
255402
|
-
(0,
|
|
255425
|
+
(0, import_operators11.switchMap)(
|
|
255403
255426
|
({ projectId, name: name2 }) => GraphqlClienAPI.getEnvironment(cmd.name ?? name2, projectId)
|
|
255404
255427
|
),
|
|
255405
|
-
(0,
|
|
255428
|
+
(0, import_operators11.tap)((data) => {
|
|
255406
255429
|
const columns = [
|
|
255407
255430
|
"id",
|
|
255408
255431
|
"name",
|
|
@@ -256735,10 +256758,10 @@ var require_async2 = __commonJS({
|
|
|
256735
256758
|
return eachOfImplementation(coll, wrapAsync(iteratee), callback);
|
|
256736
256759
|
}
|
|
256737
256760
|
var eachOf$1 = awaitify(eachOf, 3);
|
|
256738
|
-
function
|
|
256761
|
+
function map22(coll, iteratee, callback) {
|
|
256739
256762
|
return _asyncMap(eachOf$1, coll, iteratee, callback);
|
|
256740
256763
|
}
|
|
256741
|
-
var map$1 = awaitify(
|
|
256764
|
+
var map$1 = awaitify(map22, 3);
|
|
256742
256765
|
var applyEach$1 = applyEach(map$1);
|
|
256743
256766
|
function eachOfSeries(coll, iteratee, callback) {
|
|
256744
256767
|
return eachOfLimit$2(coll, 1, iteratee, callback);
|
|
@@ -261548,8 +261571,8 @@ var require_lodash3 = __commonJS({
|
|
|
261548
261571
|
return apply(func, this, otherArgs);
|
|
261549
261572
|
};
|
|
261550
261573
|
}
|
|
261551
|
-
function getMapData(
|
|
261552
|
-
var data =
|
|
261574
|
+
function getMapData(map22, key) {
|
|
261575
|
+
var data = map22.__data__;
|
|
261553
261576
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
261554
261577
|
}
|
|
261555
261578
|
function getNative(object3, key) {
|
|
@@ -261953,8 +261976,8 @@ var require_lodash4 = __commonJS({
|
|
|
261953
261976
|
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values) {
|
|
261954
261977
|
return new Set2(values);
|
|
261955
261978
|
};
|
|
261956
|
-
function getMapData(
|
|
261957
|
-
var data =
|
|
261979
|
+
function getMapData(map22, key) {
|
|
261980
|
+
var data = map22.__data__;
|
|
261958
261981
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
261959
261982
|
}
|
|
261960
261983
|
function getNative(object3, key) {
|
|
@@ -285562,15 +285585,15 @@ function streamToBufferPromise(file2) {
|
|
|
285562
285585
|
});
|
|
285563
285586
|
});
|
|
285564
285587
|
}
|
|
285565
|
-
var import_archiver, import_child_process, import_form_data, import_fs3,
|
|
285588
|
+
var import_archiver, import_child_process, import_form_data, import_fs3, import_rxjs9, import_operators13, import_stream_to_buffer, import_util3, ReadFile, createOrUpdateLambda, createCommand;
|
|
285566
285589
|
var init_helpers2 = __esm({
|
|
285567
285590
|
"src/commands/lambda/helpers/index.ts"() {
|
|
285568
285591
|
import_archiver = __toESM(require_archiver());
|
|
285569
285592
|
import_child_process = require("child_process");
|
|
285570
285593
|
import_form_data = __toESM(require_form_data());
|
|
285571
285594
|
import_fs3 = require("fs");
|
|
285572
|
-
|
|
285573
|
-
|
|
285595
|
+
import_rxjs9 = __toESM(require_cjs());
|
|
285596
|
+
import_operators13 = __toESM(require_operators());
|
|
285574
285597
|
import_stream_to_buffer = __toESM(require_stream_to_buffer());
|
|
285575
285598
|
import_util3 = require("util");
|
|
285576
285599
|
init_helpers();
|
|
@@ -285579,12 +285602,12 @@ var init_helpers2 = __esm({
|
|
|
285579
285602
|
init_load_spec();
|
|
285580
285603
|
init_parse_ignore();
|
|
285581
285604
|
init_read_file();
|
|
285582
|
-
ReadFile = (file2) => readFileAsObservable(file2).pipe((0,
|
|
285605
|
+
ReadFile = (file2) => readFileAsObservable(file2).pipe((0, import_operators13.catchError)(() => (0, import_rxjs9.of)("")));
|
|
285583
285606
|
createOrUpdateLambda = (cmd, type2) => parseProjectId(cmd.project).pipe(
|
|
285584
|
-
(0,
|
|
285585
|
-
(projectId) => GraphqlClienAPI.getProject(projectId).pipe((0,
|
|
285607
|
+
(0, import_operators13.switchMap)(
|
|
285608
|
+
(projectId) => GraphqlClienAPI.getProject(projectId).pipe((0, import_operators13.map)(() => projectId))
|
|
285586
285609
|
),
|
|
285587
|
-
(0,
|
|
285610
|
+
(0, import_operators13.switchMap)(async (projectId) => {
|
|
285588
285611
|
const spec = await loadSpec(cmd.spec).toPromise();
|
|
285589
285612
|
return {
|
|
285590
285613
|
projectId,
|
|
@@ -285593,7 +285616,7 @@ var init_helpers2 = __esm({
|
|
|
285593
285616
|
}),
|
|
285594
285617
|
/* Make zip archive */
|
|
285595
285618
|
/* Get file id */
|
|
285596
|
-
(0,
|
|
285619
|
+
(0, import_operators13.switchMap)(async (data) => {
|
|
285597
285620
|
if (!data.uploadAsZip) {
|
|
285598
285621
|
return { ...data, customUploadFileId: "" };
|
|
285599
285622
|
}
|
|
@@ -285602,16 +285625,16 @@ var init_helpers2 = __esm({
|
|
|
285602
285625
|
// Sets the compression level.
|
|
285603
285626
|
});
|
|
285604
285627
|
await (0, import_util3.promisify)(import_child_process.exec)(["chmod", "+x", data.script].join(" "));
|
|
285605
|
-
const ignore = await ReadFile(".gignore").pipe((0,
|
|
285628
|
+
const ignore = await ReadFile(".gignore").pipe((0, import_operators13.map)((ignore2) => parseIgnoredFiles(ignore2))).toPromise();
|
|
285606
285629
|
archive.glob("**", {
|
|
285607
285630
|
ignore: [".gcache/**", ...ignore]
|
|
285608
285631
|
});
|
|
285609
285632
|
archive.finalize();
|
|
285610
|
-
await (0,
|
|
285611
|
-
(0,
|
|
285612
|
-
(buffer) => (0,
|
|
285613
|
-
(0,
|
|
285614
|
-
(0,
|
|
285633
|
+
await (0, import_rxjs9.from)(streamToBufferPromise(archive)).pipe(
|
|
285634
|
+
(0, import_operators13.switchMap)(
|
|
285635
|
+
(buffer) => (0, import_rxjs9.from)((0, import_util3.promisify)(import_fs3.mkdir)(".gcache")).pipe(
|
|
285636
|
+
(0, import_operators13.catchError)(() => (0, import_rxjs9.of)(true)),
|
|
285637
|
+
(0, import_operators13.switchMap)(
|
|
285615
285638
|
() => (0, import_util3.promisify)(import_fs3.writeFile)(`.gcache/${data.name}.zip`, buffer, {
|
|
285616
285639
|
encoding: "utf-8"
|
|
285617
285640
|
})
|
|
@@ -285622,7 +285645,7 @@ var init_helpers2 = __esm({
|
|
|
285622
285645
|
const body = new import_form_data.default();
|
|
285623
285646
|
body.append("file[]", (0, import_fs3.createReadStream)(`.gcache/${data.name}.zip`));
|
|
285624
285647
|
const config2 = await GraphqlClienAPI.getConfig().toPromise();
|
|
285625
|
-
return (0,
|
|
285648
|
+
return (0, import_rxjs9.from)(
|
|
285626
285649
|
fetch(config2.uploadUrl, {
|
|
285627
285650
|
method: "POST",
|
|
285628
285651
|
body,
|
|
@@ -285634,15 +285657,15 @@ var init_helpers2 = __esm({
|
|
|
285634
285657
|
}
|
|
285635
285658
|
})
|
|
285636
285659
|
).pipe(
|
|
285637
|
-
(0,
|
|
285638
|
-
(0,
|
|
285639
|
-
(0,
|
|
285660
|
+
(0, import_operators13.switchMap)((res) => res.json()),
|
|
285661
|
+
(0, import_operators13.tap)((res) => Logger.log(res)),
|
|
285662
|
+
(0, import_operators13.map)((file2) => ({
|
|
285640
285663
|
...data,
|
|
285641
285664
|
customUploadFileId: file2.id
|
|
285642
285665
|
}))
|
|
285643
285666
|
).toPromise();
|
|
285644
285667
|
}),
|
|
285645
|
-
(0,
|
|
285668
|
+
(0, import_operators13.switchMap)(
|
|
285646
285669
|
async (payload) => GraphqlClienAPI[type2]({
|
|
285647
285670
|
code: cmd.code || await ReadFile(payload.file || cmd.file).toPromise() || "",
|
|
285648
285671
|
name: payload.name || cmd.name || "",
|
|
@@ -285673,7 +285696,7 @@ var init_helpers2 = __esm({
|
|
|
285673
285696
|
}
|
|
285674
285697
|
}).toPromise()
|
|
285675
285698
|
),
|
|
285676
|
-
(0,
|
|
285699
|
+
(0, import_operators13.tap)((data) => {
|
|
285677
285700
|
console.dir(data, { depth: null, colors: true });
|
|
285678
285701
|
})
|
|
285679
285702
|
).toPromise();
|
|
@@ -285692,16 +285715,16 @@ var list_exports = {};
|
|
|
285692
285715
|
__export(list_exports, {
|
|
285693
285716
|
default: () => list_default
|
|
285694
285717
|
});
|
|
285695
|
-
var
|
|
285718
|
+
var import_operators14, list_default;
|
|
285696
285719
|
var init_list = __esm({
|
|
285697
285720
|
"src/commands/lambda/list.ts"() {
|
|
285698
|
-
|
|
285721
|
+
import_operators14 = __toESM(require_operators());
|
|
285699
285722
|
init_helpers();
|
|
285700
285723
|
init_gql_client();
|
|
285701
285724
|
init_log();
|
|
285702
285725
|
list_default = (cmd) => parseProjectId(cmd.project).pipe(
|
|
285703
|
-
(0,
|
|
285704
|
-
(0,
|
|
285726
|
+
(0, import_operators14.switchMap)((projectId) => GraphqlClienAPI.listLambdas(projectId)),
|
|
285727
|
+
(0, import_operators14.tap)((data) => {
|
|
285705
285728
|
const columns = ["id", "name", "url"];
|
|
285706
285729
|
Logger.log("-------------------");
|
|
285707
285730
|
Logger.log("[Action][listLambdas]");
|
|
@@ -285717,17 +285740,17 @@ var get_exports = {};
|
|
|
285717
285740
|
__export(get_exports, {
|
|
285718
285741
|
default: () => get_default
|
|
285719
285742
|
});
|
|
285720
|
-
var
|
|
285743
|
+
var import_rxjs10, import_operators15, get_default;
|
|
285721
285744
|
var init_get = __esm({
|
|
285722
285745
|
"src/commands/lambda/get.ts"() {
|
|
285723
|
-
|
|
285724
|
-
|
|
285746
|
+
import_rxjs10 = __toESM(require_cjs());
|
|
285747
|
+
import_operators15 = __toESM(require_operators());
|
|
285725
285748
|
init_helpers();
|
|
285726
285749
|
init_gql_client();
|
|
285727
285750
|
init_log();
|
|
285728
285751
|
init_load_spec();
|
|
285729
285752
|
get_default = async (cmd) => {
|
|
285730
|
-
const table = (0,
|
|
285753
|
+
const table = (0, import_operators15.tap)((data) => {
|
|
285731
285754
|
const columns = [
|
|
285732
285755
|
"name",
|
|
285733
285756
|
"projectId",
|
|
@@ -285741,7 +285764,7 @@ var init_get = __esm({
|
|
|
285741
285764
|
});
|
|
285742
285765
|
if (cmd.lambda) {
|
|
285743
285766
|
return isMongoId(cmd.lambda).pipe(
|
|
285744
|
-
(0,
|
|
285767
|
+
(0, import_operators15.switchMap)((id) => GraphqlClienAPI.getLambda(id)),
|
|
285745
285768
|
table
|
|
285746
285769
|
).toPromise();
|
|
285747
285770
|
}
|
|
@@ -285749,16 +285772,16 @@ var init_get = __esm({
|
|
|
285749
285772
|
const name2 = typeof cmd.name === "string" ? cmd.name : spec.function?.name ?? spec.name;
|
|
285750
285773
|
if (name2) {
|
|
285751
285774
|
return parseProjectId(cmd.project).pipe(
|
|
285752
|
-
(0,
|
|
285775
|
+
(0, import_operators15.catchError)((error48) => {
|
|
285753
285776
|
if (!cmd.project) {
|
|
285754
|
-
return (0,
|
|
285777
|
+
return (0, import_rxjs10.throwError)(
|
|
285755
285778
|
`No project id try with "gcli use --project your-project-id" to specify one
|
|
285756
285779
|
Hint: "gcli lambda:get --name ${name2} --project your-project-id"`
|
|
285757
285780
|
);
|
|
285758
285781
|
}
|
|
285759
|
-
return (0,
|
|
285782
|
+
return (0, import_rxjs10.throwError)(error48);
|
|
285760
285783
|
}),
|
|
285761
|
-
(0,
|
|
285784
|
+
(0, import_operators15.switchMap)(
|
|
285762
285785
|
(projectId) => GraphqlClienAPI.getLambdaByName(name2, projectId)
|
|
285763
285786
|
),
|
|
285764
285787
|
table
|
|
@@ -285800,10 +285823,10 @@ var delete_exports = {};
|
|
|
285800
285823
|
__export(delete_exports, {
|
|
285801
285824
|
default: () => delete_default
|
|
285802
285825
|
});
|
|
285803
|
-
var
|
|
285826
|
+
var import_operators16, delete_default;
|
|
285804
285827
|
var init_delete = __esm({
|
|
285805
285828
|
"src/commands/lambda/delete.ts"() {
|
|
285806
|
-
|
|
285829
|
+
import_operators16 = __toESM(require_operators());
|
|
285807
285830
|
init_helpers();
|
|
285808
285831
|
init_gql_client();
|
|
285809
285832
|
init_log();
|
|
@@ -285812,10 +285835,10 @@ var init_delete = __esm({
|
|
|
285812
285835
|
const spec = await loadSpec(cmd.spec).toPromise();
|
|
285813
285836
|
const name2 = typeof cmd.name === "string" ? cmd.name : spec.function?.name ?? spec.name;
|
|
285814
285837
|
return parseProjectId(cmd.project).pipe(
|
|
285815
|
-
(0,
|
|
285838
|
+
(0, import_operators16.switchMap)(
|
|
285816
285839
|
(projectId) => GraphqlClienAPI.deleteLambda({ name: name2, projectId })
|
|
285817
285840
|
),
|
|
285818
|
-
(0,
|
|
285841
|
+
(0, import_operators16.tap)((data) => {
|
|
285819
285842
|
const columns = [
|
|
285820
285843
|
"name",
|
|
285821
285844
|
"projectId",
|
|
@@ -285837,20 +285860,20 @@ var logs_exports = {};
|
|
|
285837
285860
|
__export(logs_exports, {
|
|
285838
285861
|
default: () => logs_default
|
|
285839
285862
|
});
|
|
285840
|
-
var
|
|
285863
|
+
var import_rxjs11, import_operators17, logs_default;
|
|
285841
285864
|
var init_logs = __esm({
|
|
285842
285865
|
"src/commands/lambda/logs.ts"() {
|
|
285843
|
-
|
|
285844
|
-
|
|
285866
|
+
import_rxjs11 = __toESM(require_cjs());
|
|
285867
|
+
import_operators17 = __toESM(require_operators());
|
|
285845
285868
|
init_helpers();
|
|
285846
285869
|
init_gql_client();
|
|
285847
285870
|
init_log();
|
|
285848
285871
|
init_load_spec();
|
|
285849
285872
|
logs_default = async (cmd) => {
|
|
285850
|
-
const result = (0,
|
|
285873
|
+
const result = (0, import_operators17.tap)(({ data }) => Logger.log(data));
|
|
285851
285874
|
if (cmd.lambda) {
|
|
285852
285875
|
return isMongoId(cmd.lambda).pipe(
|
|
285853
|
-
(0,
|
|
285876
|
+
(0, import_operators17.switchMap)((id) => GraphqlClienAPI.getLambdaLogs(id)),
|
|
285854
285877
|
result
|
|
285855
285878
|
).toPromise();
|
|
285856
285879
|
}
|
|
@@ -285858,16 +285881,16 @@ var init_logs = __esm({
|
|
|
285858
285881
|
const name2 = typeof cmd.name === "string" ? cmd.name : spec.function?.name ?? spec.name;
|
|
285859
285882
|
if (name2) {
|
|
285860
285883
|
return parseProjectId(cmd.project).pipe(
|
|
285861
|
-
(0,
|
|
285884
|
+
(0, import_operators17.catchError)((error48) => {
|
|
285862
285885
|
if (!cmd.project) {
|
|
285863
|
-
return (0,
|
|
285886
|
+
return (0, import_rxjs11.throwError)(
|
|
285864
285887
|
() => `No project id try with "gcli use --project your-project-id" to specify one
|
|
285865
285888
|
Hint: "gcli lambda:logs --name ${name2} --project your-project-id"`
|
|
285866
285889
|
);
|
|
285867
285890
|
}
|
|
285868
|
-
return (0,
|
|
285891
|
+
return (0, import_rxjs11.throwError)(() => error48);
|
|
285869
285892
|
}),
|
|
285870
|
-
(0,
|
|
285893
|
+
(0, import_operators17.switchMap)(
|
|
285871
285894
|
(projectId) => GraphqlClienAPI.getLambdaLogsByName(name2, projectId)
|
|
285872
285895
|
),
|
|
285873
285896
|
result
|
|
@@ -285883,20 +285906,20 @@ var logs_builder_exports = {};
|
|
|
285883
285906
|
__export(logs_builder_exports, {
|
|
285884
285907
|
default: () => logs_builder_default
|
|
285885
285908
|
});
|
|
285886
|
-
var
|
|
285909
|
+
var import_rxjs12, import_operators18, logs_builder_default;
|
|
285887
285910
|
var init_logs_builder = __esm({
|
|
285888
285911
|
"src/commands/lambda/logs-builder.ts"() {
|
|
285889
|
-
|
|
285890
|
-
|
|
285912
|
+
import_rxjs12 = __toESM(require_cjs());
|
|
285913
|
+
import_operators18 = __toESM(require_operators());
|
|
285891
285914
|
init_helpers();
|
|
285892
285915
|
init_gql_client();
|
|
285893
285916
|
init_log();
|
|
285894
285917
|
init_load_spec();
|
|
285895
285918
|
logs_builder_default = async (cmd) => {
|
|
285896
|
-
const result = (0,
|
|
285919
|
+
const result = (0, import_operators18.tap)(({ data }) => Logger.log(data));
|
|
285897
285920
|
if (cmd.lambda) {
|
|
285898
285921
|
return isMongoId(cmd.lambda).pipe(
|
|
285899
|
-
(0,
|
|
285922
|
+
(0, import_operators18.switchMap)((id) => GraphqlClienAPI.getLambdaBuilderLogs(id)),
|
|
285900
285923
|
result
|
|
285901
285924
|
).toPromise();
|
|
285902
285925
|
}
|
|
@@ -285904,16 +285927,16 @@ var init_logs_builder = __esm({
|
|
|
285904
285927
|
const name2 = typeof cmd.name === "string" ? cmd.name : spec.function?.name ?? spec.name;
|
|
285905
285928
|
if (name2) {
|
|
285906
285929
|
return parseProjectId(cmd.project).pipe(
|
|
285907
|
-
(0,
|
|
285930
|
+
(0, import_operators18.catchError)((error48) => {
|
|
285908
285931
|
if (!cmd.project) {
|
|
285909
|
-
return (0,
|
|
285932
|
+
return (0, import_rxjs12.throwError)(
|
|
285910
285933
|
`No project id try with "gcli use --project your-project-id" to specify one
|
|
285911
285934
|
Hint: "gcli lambda:logs --name ${name2} --project your-project-id"`
|
|
285912
285935
|
);
|
|
285913
285936
|
}
|
|
285914
|
-
return (0,
|
|
285937
|
+
return (0, import_rxjs12.throwError)(error48);
|
|
285915
285938
|
}),
|
|
285916
|
-
(0,
|
|
285939
|
+
(0, import_operators18.switchMap)(
|
|
285917
285940
|
(projectId) => GraphqlClienAPI.getLambdaBuilderLogsByName(name2, projectId)
|
|
285918
285941
|
),
|
|
285919
285942
|
result
|
|
@@ -285929,56 +285952,56 @@ var test_exports = {};
|
|
|
285929
285952
|
__export(test_exports, {
|
|
285930
285953
|
default: () => test_default
|
|
285931
285954
|
});
|
|
285932
|
-
var
|
|
285955
|
+
var import_rxjs13, import_operators19, test_default;
|
|
285933
285956
|
var init_test = __esm({
|
|
285934
285957
|
"src/commands/lambda/test.ts"() {
|
|
285935
|
-
|
|
285936
|
-
|
|
285958
|
+
import_rxjs13 = __toESM(require_cjs());
|
|
285959
|
+
import_operators19 = __toESM(require_operators());
|
|
285937
285960
|
init_helpers();
|
|
285938
285961
|
init_gql_client();
|
|
285939
285962
|
init_log();
|
|
285940
285963
|
init_load_spec();
|
|
285941
285964
|
test_default = async (cmd) => {
|
|
285942
|
-
const processParameters = (lambda) => (0,
|
|
285943
|
-
(0,
|
|
285965
|
+
const processParameters = (lambda) => (0, import_rxjs13.of)(lambda).pipe(
|
|
285966
|
+
(0, import_operators19.map)((lambda2) => ({
|
|
285944
285967
|
...lambda2,
|
|
285945
285968
|
url: cmd.pathParams ? cmd.pathParams.split(";").map((param) => param.split("=")).reduce(
|
|
285946
285969
|
(prev, [key, value]) => prev.replace(key, value),
|
|
285947
285970
|
lambda2.url
|
|
285948
285971
|
) : lambda2.url
|
|
285949
285972
|
})),
|
|
285950
|
-
(0,
|
|
285951
|
-
(lambda2) => (0,
|
|
285973
|
+
(0, import_operators19.switchMap)(
|
|
285974
|
+
(lambda2) => (0, import_rxjs13.from)(
|
|
285952
285975
|
fetch([lambda2.url, cmd.queryParams].filter((i) => !!i).join(""), {
|
|
285953
285976
|
method: lambda2.method,
|
|
285954
285977
|
body: cmd.body
|
|
285955
285978
|
})
|
|
285956
|
-
).pipe((0,
|
|
285979
|
+
).pipe((0, import_operators19.switchMap)((res) => res.json()))
|
|
285957
285980
|
),
|
|
285958
|
-
(0,
|
|
285981
|
+
(0, import_operators19.tap)(Logger.log)
|
|
285959
285982
|
);
|
|
285960
285983
|
if (cmd.lambda) {
|
|
285961
285984
|
return isMongoId(cmd.lambda).pipe(
|
|
285962
|
-
(0,
|
|
285985
|
+
(0, import_operators19.switchMap)(
|
|
285963
285986
|
(id) => GraphqlClienAPI.getLambda(id, ["id", "url", "method", "params"])
|
|
285964
285987
|
),
|
|
285965
|
-
(0,
|
|
285988
|
+
(0, import_operators19.switchMap)(processParameters)
|
|
285966
285989
|
).toPromise();
|
|
285967
285990
|
}
|
|
285968
285991
|
const spec = await loadSpec(cmd.spec).toPromise();
|
|
285969
285992
|
const name2 = typeof cmd.name === "string" ? cmd.name : spec.function?.name ?? spec.name;
|
|
285970
285993
|
if (name2) {
|
|
285971
285994
|
return parseProjectId(cmd.project).pipe(
|
|
285972
|
-
(0,
|
|
285995
|
+
(0, import_operators19.catchError)((error48) => {
|
|
285973
285996
|
if (!cmd.project) {
|
|
285974
|
-
return (0,
|
|
285997
|
+
return (0, import_rxjs13.throwError)(
|
|
285975
285998
|
`No project id try with "gcli use --project your-project-id" to specify one
|
|
285976
285999
|
Hint: "gcli lambda:get --name ${name2} --project your-project-id"`
|
|
285977
286000
|
);
|
|
285978
286001
|
}
|
|
285979
|
-
return (0,
|
|
286002
|
+
return (0, import_rxjs13.throwError)(error48);
|
|
285980
286003
|
}),
|
|
285981
|
-
(0,
|
|
286004
|
+
(0, import_operators19.switchMap)(
|
|
285982
286005
|
(projectId) => GraphqlClienAPI.getLambdaByName(name2, projectId, [
|
|
285983
286006
|
"id",
|
|
285984
286007
|
"url",
|
|
@@ -285986,7 +286009,7 @@ var init_test = __esm({
|
|
|
285986
286009
|
"params"
|
|
285987
286010
|
])
|
|
285988
286011
|
),
|
|
285989
|
-
(0,
|
|
286012
|
+
(0, import_operators19.switchMap)(processParameters)
|
|
285990
286013
|
).toPromise();
|
|
285991
286014
|
}
|
|
285992
286015
|
throw new Error("unable-to-load-lambda");
|
|
@@ -285999,14 +286022,14 @@ var list_exports2 = {};
|
|
|
285999
286022
|
__export(list_exports2, {
|
|
286000
286023
|
default: () => list_default2
|
|
286001
286024
|
});
|
|
286002
|
-
var
|
|
286025
|
+
var import_operators21, list_default2;
|
|
286003
286026
|
var init_list2 = __esm({
|
|
286004
286027
|
"src/commands/project/list.ts"() {
|
|
286005
|
-
|
|
286028
|
+
import_operators21 = __toESM(require_operators());
|
|
286006
286029
|
init_gql_client();
|
|
286007
286030
|
init_log();
|
|
286008
286031
|
list_default2 = async () => GraphqlClienAPI.listProjects().pipe(
|
|
286009
|
-
(0,
|
|
286032
|
+
(0, import_operators21.tap)((project) => {
|
|
286010
286033
|
const columns = ["id", "name"];
|
|
286011
286034
|
Logger.log("-------------------");
|
|
286012
286035
|
Logger.log("[Action][listProjects]");
|
|
@@ -286022,23 +286045,23 @@ var use_exports = {};
|
|
|
286022
286045
|
__export(use_exports, {
|
|
286023
286046
|
default: () => use_default
|
|
286024
286047
|
});
|
|
286025
|
-
var import_fs4,
|
|
286048
|
+
var import_fs4, import_rxjs15, import_operators22, import_util4, use_default;
|
|
286026
286049
|
var init_use = __esm({
|
|
286027
286050
|
"src/commands/project/use.ts"() {
|
|
286028
286051
|
import_fs4 = require("fs");
|
|
286029
|
-
|
|
286030
|
-
|
|
286052
|
+
import_rxjs15 = __toESM(require_cjs());
|
|
286053
|
+
import_operators22 = __toESM(require_operators());
|
|
286031
286054
|
import_util4 = require("util");
|
|
286032
286055
|
init_helpers();
|
|
286033
286056
|
init_gql_client();
|
|
286034
286057
|
init_types();
|
|
286035
286058
|
use_default = async (cmd) => {
|
|
286036
286059
|
return parseProjectId(cmd).pipe(
|
|
286037
|
-
(0,
|
|
286038
|
-
(projectId) => GraphqlClienAPI.getProject(projectId).pipe((0,
|
|
286060
|
+
(0, import_operators22.switchMap)(
|
|
286061
|
+
(projectId) => GraphqlClienAPI.getProject(projectId).pipe((0, import_operators22.map)(() => projectId))
|
|
286039
286062
|
),
|
|
286040
|
-
(0,
|
|
286041
|
-
(projectId) => (0,
|
|
286063
|
+
(0, import_operators22.switchMap)(
|
|
286064
|
+
(projectId) => (0, import_rxjs15.from)(
|
|
286042
286065
|
(0, import_util4.promisify)(import_fs4.writeFile)(projectDirectory, projectId, {
|
|
286043
286066
|
encoding: "utf-8"
|
|
286044
286067
|
})
|
|
@@ -286054,14 +286077,14 @@ var clear_exports = {};
|
|
|
286054
286077
|
__export(clear_exports, {
|
|
286055
286078
|
default: () => clear_default
|
|
286056
286079
|
});
|
|
286057
|
-
var import_fs5,
|
|
286080
|
+
var import_fs5, import_rxjs16, import_util5, clear_default;
|
|
286058
286081
|
var init_clear = __esm({
|
|
286059
286082
|
"src/commands/project/clear.ts"() {
|
|
286060
286083
|
import_fs5 = require("fs");
|
|
286061
|
-
|
|
286084
|
+
import_rxjs16 = __toESM(require_cjs());
|
|
286062
286085
|
import_util5 = require("util");
|
|
286063
286086
|
init_types();
|
|
286064
|
-
clear_default = async () => (0,
|
|
286087
|
+
clear_default = async () => (0, import_rxjs16.from)((0, import_util5.promisify)(import_fs5.unlink)(projectDirectory)).toPromise();
|
|
286065
286088
|
}
|
|
286066
286089
|
});
|
|
286067
286090
|
|
|
@@ -286485,8 +286508,8 @@ var init_parseUtil = __esm({
|
|
|
286485
286508
|
}
|
|
286486
286509
|
let errorMessage = "";
|
|
286487
286510
|
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
286488
|
-
for (const
|
|
286489
|
-
errorMessage =
|
|
286511
|
+
for (const map22 of maps) {
|
|
286512
|
+
errorMessage = map22(fullIssue, { data, defaultError: errorMessage }).message;
|
|
286490
286513
|
}
|
|
286491
286514
|
return {
|
|
286492
286515
|
...issueData,
|
|
@@ -293008,19 +293031,19 @@ var init_schemas = __esm({
|
|
|
293008
293031
|
});
|
|
293009
293032
|
const disc = cached(() => {
|
|
293010
293033
|
const opts = def.options;
|
|
293011
|
-
const
|
|
293034
|
+
const map22 = /* @__PURE__ */ new Map();
|
|
293012
293035
|
for (const o of opts) {
|
|
293013
293036
|
const values = o._zod.propValues?.[def.discriminator];
|
|
293014
293037
|
if (!values || values.size === 0)
|
|
293015
293038
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
293016
293039
|
for (const v of values) {
|
|
293017
|
-
if (
|
|
293040
|
+
if (map22.has(v)) {
|
|
293018
293041
|
throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
293019
293042
|
}
|
|
293020
|
-
|
|
293043
|
+
map22.set(v, o);
|
|
293021
293044
|
}
|
|
293022
293045
|
}
|
|
293023
|
-
return
|
|
293046
|
+
return map22;
|
|
293024
293047
|
});
|
|
293025
293048
|
inst._zod.parse = (payload, ctx) => {
|
|
293026
293049
|
const input = payload.value;
|
|
@@ -302503,7 +302526,7 @@ __export(schemas_exports3, {
|
|
|
302503
302526
|
looseObject: () => looseObject,
|
|
302504
302527
|
looseRecord: () => looseRecord,
|
|
302505
302528
|
mac: () => mac2,
|
|
302506
|
-
map: () =>
|
|
302529
|
+
map: () => map18,
|
|
302507
302530
|
meta: () => meta2,
|
|
302508
302531
|
nan: () => nan,
|
|
302509
302532
|
nanoid: () => nanoid2,
|
|
@@ -302799,7 +302822,7 @@ function looseRecord(keyType, valueType, params) {
|
|
|
302799
302822
|
...util_exports.normalizeParams(params)
|
|
302800
302823
|
});
|
|
302801
302824
|
}
|
|
302802
|
-
function
|
|
302825
|
+
function map18(keyType, valueType, params) {
|
|
302803
302826
|
return new ZodMap2({
|
|
302804
302827
|
type: "map",
|
|
302805
302828
|
keyType,
|
|
@@ -303641,9 +303664,9 @@ var init_schemas3 = __esm({
|
|
|
303641
303664
|
});
|
|
303642
303665
|
|
|
303643
303666
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
303644
|
-
function setErrorMap(
|
|
303667
|
+
function setErrorMap(map22) {
|
|
303645
303668
|
config({
|
|
303646
|
-
customError:
|
|
303669
|
+
customError: map22
|
|
303647
303670
|
});
|
|
303648
303671
|
}
|
|
303649
303672
|
function getErrorMap2() {
|
|
@@ -304343,7 +304366,7 @@ __export(external_exports3, {
|
|
|
304343
304366
|
lt: () => _lt,
|
|
304344
304367
|
lte: () => _lte,
|
|
304345
304368
|
mac: () => mac2,
|
|
304346
|
-
map: () =>
|
|
304369
|
+
map: () => map18,
|
|
304347
304370
|
maxLength: () => _maxLength,
|
|
304348
304371
|
maxSize: () => _maxSize,
|
|
304349
304372
|
meta: () => meta2,
|
|
@@ -316876,31 +316899,31 @@ __export(start_exports, {
|
|
|
316876
316899
|
});
|
|
316877
316900
|
async function startProxy(cmd) {
|
|
316878
316901
|
return GraphqlClienAPI.getConfig().pipe(
|
|
316879
|
-
(0,
|
|
316880
|
-
(0,
|
|
316902
|
+
(0, import_operators24.take)(1),
|
|
316903
|
+
(0, import_operators24.map)((config2) => ({
|
|
316881
316904
|
...config2,
|
|
316882
316905
|
mcpUrl: new URL(
|
|
316883
316906
|
cmd.url || [config2.url.replace(/\/graphql$/, ""), "/mcp"].join("") || "http://127.0.0.1:8000/mcp"
|
|
316884
316907
|
)
|
|
316885
316908
|
})),
|
|
316886
|
-
(0,
|
|
316909
|
+
(0, import_operators24.tap)((config2) => {
|
|
316887
316910
|
config2.mcpUrl.searchParams.set("transportType", "streamable-http");
|
|
316888
316911
|
process.stderr.write(`Starting MCP proxy \u2192 ${config2.mcpUrl}
|
|
316889
316912
|
`);
|
|
316890
316913
|
process.stderr.write("Retrieving config for auth...\n");
|
|
316891
316914
|
}),
|
|
316892
|
-
(0,
|
|
316893
|
-
(config2) => config2?.token ? (0,
|
|
316915
|
+
(0, import_operators24.switchMap)(
|
|
316916
|
+
(config2) => config2?.token ? (0, import_rxjs18.of)(config2) : (0, import_rxjs18.throwError)(
|
|
316894
316917
|
() => new Error("User is not authenticated (no token in config)")
|
|
316895
316918
|
)
|
|
316896
316919
|
),
|
|
316897
|
-
(0,
|
|
316920
|
+
(0, import_operators24.tap)((config2) => {
|
|
316898
316921
|
process.stderr.write(
|
|
316899
316922
|
`Config retrieved. Token start: ${config2.token.substring(0, 5)}
|
|
316900
316923
|
`
|
|
316901
316924
|
);
|
|
316902
316925
|
}),
|
|
316903
|
-
(0,
|
|
316926
|
+
(0, import_operators24.map)((config2) => ({
|
|
316904
316927
|
...config2,
|
|
316905
316928
|
transport: new StreamableHTTPClientTransport(config2.mcpUrl, {
|
|
316906
316929
|
requestInit: {
|
|
@@ -316908,34 +316931,34 @@ async function startProxy(cmd) {
|
|
|
316908
316931
|
Authorization: config2.token
|
|
316909
316932
|
}
|
|
316910
316933
|
},
|
|
316911
|
-
fetch: (input, init) => (0,
|
|
316934
|
+
fetch: (input, init) => (0, import_rxjs18.lastValueFrom)(performFetch(input, init))
|
|
316912
316935
|
}),
|
|
316913
316936
|
client: new Client({
|
|
316914
316937
|
name: "gapi-proxy-client",
|
|
316915
316938
|
version: "1.0.0"
|
|
316916
316939
|
})
|
|
316917
316940
|
})),
|
|
316918
|
-
(0,
|
|
316941
|
+
(0, import_operators24.tap)(() => {
|
|
316919
316942
|
process.stderr.write("Connecting to upstream...\n");
|
|
316920
316943
|
}),
|
|
316921
|
-
(0,
|
|
316922
|
-
(config2) => (0,
|
|
316944
|
+
(0, import_operators24.switchMap)(
|
|
316945
|
+
(config2) => (0, import_rxjs18.from)(config2.client.connect(config2.transport)).pipe((0, import_operators24.map)(() => config2))
|
|
316923
316946
|
),
|
|
316924
|
-
(0,
|
|
316947
|
+
(0, import_operators24.tap)(() => {
|
|
316925
316948
|
process.stderr.write("Connected to upstream MCP server\n");
|
|
316926
316949
|
}),
|
|
316927
316950
|
// Get capabilities AFTER connection is established
|
|
316928
|
-
(0,
|
|
316951
|
+
(0, import_operators24.map)((config2) => ({
|
|
316929
316952
|
...config2,
|
|
316930
316953
|
capabilities: config2.client.getServerCapabilities()
|
|
316931
316954
|
})),
|
|
316932
|
-
(0,
|
|
316955
|
+
(0, import_operators24.tap)((config2) => {
|
|
316933
316956
|
process.stderr.write(
|
|
316934
316957
|
`Upstream capabilities: ${JSON.stringify(config2.capabilities)}
|
|
316935
316958
|
`
|
|
316936
316959
|
);
|
|
316937
316960
|
}),
|
|
316938
|
-
(0,
|
|
316961
|
+
(0, import_operators24.map)((config2) => {
|
|
316939
316962
|
const server2 = new Server(
|
|
316940
316963
|
{
|
|
316941
316964
|
name: "gapi-proxy",
|
|
@@ -316945,66 +316968,66 @@ async function startProxy(cmd) {
|
|
|
316945
316968
|
capabilities: config2.capabilities || {}
|
|
316946
316969
|
}
|
|
316947
316970
|
);
|
|
316948
|
-
server2.fallbackRequestHandler = async (request) => (0,
|
|
316949
|
-
(0,
|
|
316950
|
-
(0,
|
|
316971
|
+
server2.fallbackRequestHandler = async (request) => (0, import_rxjs18.lastValueFrom)(
|
|
316972
|
+
(0, import_rxjs18.defer)(() => config2.client.request(request, external_exports3.any())).pipe(
|
|
316973
|
+
(0, import_operators24.catchError)((e) => {
|
|
316951
316974
|
process.stderr.write(`Upstream error: ${e.message}
|
|
316952
316975
|
`);
|
|
316953
|
-
return (0,
|
|
316976
|
+
return (0, import_rxjs18.throwError)(() => e);
|
|
316954
316977
|
})
|
|
316955
316978
|
)
|
|
316956
316979
|
);
|
|
316957
316980
|
server2.fallbackNotificationHandler = async (notification) => {
|
|
316958
|
-
await (0,
|
|
316959
|
-
(0,
|
|
316960
|
-
(0,
|
|
316961
|
-
(0,
|
|
316962
|
-
(n) => (0,
|
|
316963
|
-
(0,
|
|
316981
|
+
await (0, import_rxjs18.lastValueFrom)(
|
|
316982
|
+
(0, import_rxjs18.of)(notification).pipe(
|
|
316983
|
+
(0, import_operators24.filter)((n) => n.method !== "notifications/initialized"),
|
|
316984
|
+
(0, import_operators24.switchMap)(
|
|
316985
|
+
(n) => (0, import_rxjs18.defer)(() => config2.client.notification(n)).pipe(
|
|
316986
|
+
(0, import_operators24.catchError)((e) => {
|
|
316964
316987
|
process.stderr.write(`Notification error: ${e}
|
|
316965
316988
|
`);
|
|
316966
|
-
return
|
|
316989
|
+
return import_rxjs18.EMPTY;
|
|
316967
316990
|
})
|
|
316968
316991
|
)
|
|
316969
316992
|
),
|
|
316970
|
-
(0,
|
|
316993
|
+
(0, import_operators24.defaultIfEmpty)(null)
|
|
316971
316994
|
)
|
|
316972
316995
|
);
|
|
316973
316996
|
};
|
|
316974
316997
|
return server2;
|
|
316975
316998
|
}),
|
|
316976
|
-
(0,
|
|
316977
|
-
(0,
|
|
316999
|
+
(0, import_operators24.switchMap)((server2) => (0, import_rxjs18.from)(server2.connect(new StdioServerTransport()))),
|
|
317000
|
+
(0, import_operators24.tap)(() => {
|
|
316978
317001
|
process.stderr.write("MCP stdio server ready\n");
|
|
316979
317002
|
}),
|
|
316980
317003
|
// Keep the process running indefinitely to handle stdio communication
|
|
316981
|
-
(0,
|
|
317004
|
+
(0, import_operators24.switchMap)(() => new Promise(() => {
|
|
316982
317005
|
}))
|
|
316983
317006
|
).toPromise();
|
|
316984
317007
|
}
|
|
316985
|
-
var
|
|
317008
|
+
var import_rxjs18, import_operators24, import_stream2, performFetch;
|
|
316986
317009
|
var init_start = __esm({
|
|
316987
317010
|
"src/commands/proxy/start.ts"() {
|
|
316988
317011
|
init_client2();
|
|
316989
317012
|
init_streamableHttp();
|
|
316990
317013
|
init_server2();
|
|
316991
317014
|
init_stdio2();
|
|
316992
|
-
|
|
316993
|
-
|
|
317015
|
+
import_rxjs18 = __toESM(require_cjs());
|
|
317016
|
+
import_operators24 = __toESM(require_operators());
|
|
316994
317017
|
import_stream2 = require("stream");
|
|
316995
317018
|
init_zod();
|
|
316996
317019
|
init_gql_client();
|
|
316997
317020
|
performFetch = (input, init) => {
|
|
316998
|
-
return (0,
|
|
316999
|
-
(0,
|
|
317021
|
+
return (0, import_rxjs18.from)(fetch(input, init)).pipe(
|
|
317022
|
+
(0, import_operators24.switchMap)((res) => {
|
|
317000
317023
|
if (res.status === 401 || res.status === 403) {
|
|
317001
317024
|
process.stderr.write(
|
|
317002
317025
|
`[DEBUG] Request failed with ${res.status}. Refreshing token...
|
|
317003
317026
|
`
|
|
317004
317027
|
);
|
|
317005
317028
|
return GraphqlClienAPI.getConfig(true).pipe(
|
|
317006
|
-
(0,
|
|
317007
|
-
(0,
|
|
317029
|
+
(0, import_operators24.take)(1),
|
|
317030
|
+
(0, import_operators24.switchMap)((config2) => {
|
|
317008
317031
|
process.stderr.write(
|
|
317009
317032
|
"[DEBUG] Token refreshed. Retrying request...\n"
|
|
317010
317033
|
);
|
|
@@ -317017,9 +317040,9 @@ var init_start = __esm({
|
|
|
317017
317040
|
})
|
|
317018
317041
|
);
|
|
317019
317042
|
}
|
|
317020
|
-
return (0,
|
|
317043
|
+
return (0, import_rxjs18.of)(res);
|
|
317021
317044
|
}),
|
|
317022
|
-
(0,
|
|
317045
|
+
(0, import_operators24.map)((res) => {
|
|
317023
317046
|
if (typeof res?.body?.pipeThrough !== "function") {
|
|
317024
317047
|
try {
|
|
317025
317048
|
const webStream = import_stream2.Readable.toWeb(res.body);
|
|
@@ -317033,10 +317056,10 @@ var init_start = __esm({
|
|
|
317033
317056
|
}
|
|
317034
317057
|
return res;
|
|
317035
317058
|
}),
|
|
317036
|
-
(0,
|
|
317059
|
+
(0, import_operators24.catchError)((e) => {
|
|
317037
317060
|
process.stderr.write(`[ERROR] Fetch error: ${e.message}
|
|
317038
317061
|
`);
|
|
317039
|
-
return (0,
|
|
317062
|
+
return (0, import_rxjs18.throwError)(() => e);
|
|
317040
317063
|
})
|
|
317041
317064
|
);
|
|
317042
317065
|
};
|
|
@@ -317050,62 +317073,85 @@ __export(start_exports2, {
|
|
|
317050
317073
|
});
|
|
317051
317074
|
async function start(args) {
|
|
317052
317075
|
Logger.log("---------------------------------");
|
|
317053
|
-
return (0,
|
|
317076
|
+
return (0, import_rxjs19.lastValueFrom)(
|
|
317054
317077
|
loadSpec().pipe(
|
|
317055
|
-
(0,
|
|
317056
|
-
(config2) => (0,
|
|
317078
|
+
(0, import_operators25.switchMap)(
|
|
317079
|
+
(config2) => (0, import_rxjs19.of)({
|
|
317057
317080
|
watcher: (0, import_node_fs.watch)(process.cwd(), {
|
|
317058
317081
|
recursive: true
|
|
317059
317082
|
}),
|
|
317060
317083
|
whitelist: new Map(
|
|
317061
317084
|
[
|
|
317062
317085
|
...args?.files ?? [],
|
|
317063
|
-
...config2
|
|
317064
|
-
|
|
317065
|
-
].map((name2) => [name2,
|
|
317086
|
+
...config2.file ? [config2.file] : [],
|
|
317087
|
+
...config2?.options?.bundler?.watch ?? []
|
|
317088
|
+
].map((name2) => [name2, true])
|
|
317066
317089
|
),
|
|
317067
|
-
child: null
|
|
317090
|
+
child: null,
|
|
317091
|
+
outfile: args.outfile ?? config2?.options?.bundler?.outfile ?? "index.js",
|
|
317092
|
+
startCommand: "node"
|
|
317068
317093
|
}).pipe(
|
|
317069
|
-
(0,
|
|
317070
|
-
({ child, watcher, whitelist }) => (0,
|
|
317071
|
-
(0,
|
|
317072
|
-
Logger.warn(
|
|
317073
|
-
`\u{1F4E2} Starting script "node ${args.outfile ?? "index.js"}"`
|
|
317074
|
-
);
|
|
317094
|
+
(0, import_operators25.switchMap)(
|
|
317095
|
+
({ child, watcher, whitelist, outfile, startCommand }) => (0, import_rxjs19.from)(build_default(args)).pipe(
|
|
317096
|
+
(0, import_operators25.tap)(() => {
|
|
317097
|
+
Logger.warn(`\u{1F4E2} Starting script "${startCommand} ${outfile}"`);
|
|
317075
317098
|
Logger.log("---------------------------------\n");
|
|
317076
317099
|
}),
|
|
317077
|
-
(0,
|
|
317078
|
-
|
|
317079
|
-
|
|
317080
|
-
|
|
317100
|
+
(0, import_operators25.tap)(() => {
|
|
317101
|
+
child = (0, import_node_child_process.spawn)(
|
|
317102
|
+
startCommand,
|
|
317103
|
+
["--disable-warning=DEP0040", outfile],
|
|
317104
|
+
{
|
|
317105
|
+
stdio: "inherit"
|
|
317106
|
+
}
|
|
317107
|
+
);
|
|
317081
317108
|
}),
|
|
317082
|
-
(0,
|
|
317083
|
-
() => (0,
|
|
317084
|
-
(0,
|
|
317109
|
+
(0, import_operators25.tap)(
|
|
317110
|
+
() => (0, import_rxjs19.merge)(
|
|
317111
|
+
(0, import_rxjs19.fromEvent)(process, "SIGINT"),
|
|
317112
|
+
(0, import_rxjs19.fromEvent)(process, "SIGTERM"),
|
|
317113
|
+
(0, import_rxjs19.fromEvent)(process, "exit")
|
|
317114
|
+
).pipe(
|
|
317115
|
+
(0, import_operators25.debounceTime)(100),
|
|
317116
|
+
(0, import_operators25.tap)(() => {
|
|
317117
|
+
Logger.warn("\u26A0\uFE0F Main process shutting down");
|
|
317118
|
+
child.kill("SIGTERM");
|
|
317119
|
+
process.exit();
|
|
317120
|
+
})
|
|
317121
|
+
).subscribe()
|
|
317122
|
+
),
|
|
317123
|
+
(0, import_operators25.switchMap)(
|
|
317124
|
+
() => (0, import_rxjs19.fromEvent)(watcher, "change").pipe(
|
|
317125
|
+
(0, import_operators25.map)(([event, filename]) => ({
|
|
317085
317126
|
event,
|
|
317086
317127
|
filename
|
|
317087
317128
|
})),
|
|
317088
|
-
(0,
|
|
317129
|
+
(0, import_operators25.filter)(({ filename }) => {
|
|
317089
317130
|
if (!filename) {
|
|
317090
317131
|
return false;
|
|
317091
317132
|
}
|
|
317092
317133
|
const rootDir = filename.split(/[/\\]/)[0];
|
|
317093
317134
|
return whitelist.has(rootDir);
|
|
317094
317135
|
}),
|
|
317095
|
-
(0,
|
|
317136
|
+
(0, import_operators25.debounceTime)(100)
|
|
317096
317137
|
)
|
|
317097
317138
|
),
|
|
317098
|
-
(0,
|
|
317139
|
+
(0, import_operators25.tap)((data) => {
|
|
317099
317140
|
Logger.log("\n---------------------------------");
|
|
317100
317141
|
Logger.log(`\u27F3 Restarting due to change in: ${data.filename}`);
|
|
317101
|
-
child?.kill();
|
|
317102
|
-
|
|
317103
|
-
|
|
317104
|
-
|
|
317105
|
-
);
|
|
317142
|
+
child?.kill("SIGTERM");
|
|
317143
|
+
}),
|
|
317144
|
+
(0, import_operators25.switchMap)(() => build_default(args)),
|
|
317145
|
+
(0, import_operators25.tap)(() => {
|
|
317146
|
+
Logger.warn(`\u{1F4E2} Starting script "${startCommand} ${outfile}"`);
|
|
317106
317147
|
Logger.log("---------------------------------\n");
|
|
317107
|
-
child = (0, import_node_child_process.
|
|
317108
|
-
|
|
317148
|
+
child = (0, import_node_child_process.spawn)(
|
|
317149
|
+
startCommand,
|
|
317150
|
+
["--disable-warning=DEP0040", outfile],
|
|
317151
|
+
{
|
|
317152
|
+
stdio: "inherit"
|
|
317153
|
+
}
|
|
317154
|
+
);
|
|
317109
317155
|
})
|
|
317110
317156
|
)
|
|
317111
317157
|
)
|
|
@@ -317114,13 +317160,13 @@ async function start(args) {
|
|
|
317114
317160
|
)
|
|
317115
317161
|
);
|
|
317116
317162
|
}
|
|
317117
|
-
var import_node_child_process, import_node_fs,
|
|
317163
|
+
var import_node_child_process, import_node_fs, import_rxjs19, import_operators25;
|
|
317118
317164
|
var init_start2 = __esm({
|
|
317119
317165
|
"src/commands/start/start.ts"() {
|
|
317120
317166
|
import_node_child_process = require("node:child_process");
|
|
317121
317167
|
import_node_fs = require("node:fs");
|
|
317122
|
-
|
|
317123
|
-
|
|
317168
|
+
import_rxjs19 = __toESM(require_cjs());
|
|
317169
|
+
import_operators25 = __toESM(require_operators());
|
|
317124
317170
|
init_log();
|
|
317125
317171
|
init_build();
|
|
317126
317172
|
init_load_spec();
|
|
@@ -317151,8 +317197,8 @@ function registerAuthCommands(program2) {
|
|
|
317151
317197
|
}
|
|
317152
317198
|
|
|
317153
317199
|
// src/commands/build/index.ts
|
|
317154
|
-
var
|
|
317155
|
-
var
|
|
317200
|
+
var import_rxjs7 = __toESM(require_cjs());
|
|
317201
|
+
var import_operators6 = __toESM(require_operators());
|
|
317156
317202
|
init_helpers();
|
|
317157
317203
|
function buildCommands(program2) {
|
|
317158
317204
|
program2.command("build").description("Build bundle using esbuild https://esbuild.github.io ").option(
|
|
@@ -317160,19 +317206,19 @@ function buildCommands(program2) {
|
|
|
317160
317206
|
"File or files to bundle defaults to index.ts"
|
|
317161
317207
|
).option("-b, --bundle", "Bundle code", true).option("-m, --minify", "Minify code", false).option("-p, --platform <char>", "Platform ", "node").option("-t, --target <char>", "Target ", "node14.4").option("-o, --outfile <char>", "Outfile name").option("-e, --external <external...>", "External libraries").action(
|
|
317162
317208
|
lazy(
|
|
317163
|
-
() => (0,
|
|
317209
|
+
() => (0, import_rxjs7.from)(Promise.resolve().then(() => (init_build(), build_exports))).pipe((0, import_operators6.map)((m) => m.default)).toPromise()
|
|
317164
317210
|
)
|
|
317165
317211
|
);
|
|
317166
317212
|
}
|
|
317167
317213
|
|
|
317168
317214
|
// src/commands/environment/index.ts
|
|
317169
|
-
var
|
|
317170
|
-
var
|
|
317215
|
+
var import_rxjs8 = __toESM(require_cjs());
|
|
317216
|
+
var import_operators12 = __toESM(require_operators());
|
|
317171
317217
|
init_helpers();
|
|
317172
317218
|
function registerEnvironmentCommands(program2) {
|
|
317173
317219
|
program2.command("environment:list").description("List of all environments for project").option("-p, --project <project>").action(
|
|
317174
317220
|
lazy(
|
|
317175
|
-
() => (0,
|
|
317221
|
+
() => (0, import_rxjs8.from)(Promise.resolve().then(() => (init_list_environments(), list_environments_exports))).pipe((0, import_operators12.map)((m) => m.default)).toPromise()
|
|
317176
317222
|
)
|
|
317177
317223
|
);
|
|
317178
317224
|
program2.command("environment:create").description("Create environment for project").option("-p, --project <project>").option("-minCpu, --minCpu <minCpu>").option("-maxCpu, --maxCpu <maxCpu>").option("-minMemory, --minMemory <minMemory>").option("-maxMemory, --maxMemory <maxMemory>").option("-poolSize, --poolSize <poolSize>").option("-builder, --builder <builder>").option("-image, --image <image>").option("-name, --name <name>").option("-spec, --spec <spec>").option(
|
|
@@ -317180,7 +317226,7 @@ function registerEnvironmentCommands(program2) {
|
|
|
317180
317226
|
"Default region is eu-central 'DEFAULT' | 'EU_BALKANS' | 'EU_CENTRAL'"
|
|
317181
317227
|
).action(
|
|
317182
317228
|
lazy(
|
|
317183
|
-
() => (0,
|
|
317229
|
+
() => (0, import_rxjs8.from)(Promise.resolve().then(() => (init_create_environment(), create_environment_exports))).pipe((0, import_operators12.map)((m) => m.default)).toPromise()
|
|
317184
317230
|
)
|
|
317185
317231
|
);
|
|
317186
317232
|
program2.command("environment:update").description("Update environment for project").option("-p, --project <project>").option("-minCpu, --minCpu <minCpu>").option("-maxCpu, --maxCpu <maxCpu>").option("-minMemory, --minMemory <minMemory>").option("-maxMemory, --maxMemory <maxMemory>").option("-poolSize, --poolSize <poolSize>").option("-builder, --builder <builder>").option("-image, --image <image>").option("-name, --name <name>").option("-spec, --spec <spec>").option(
|
|
@@ -317188,24 +317234,24 @@ function registerEnvironmentCommands(program2) {
|
|
|
317188
317234
|
"Default region is eu-central 'DEFAULT' | 'EU_BALKANS' | 'EU_CENTRAL'"
|
|
317189
317235
|
).action(
|
|
317190
317236
|
lazy(
|
|
317191
|
-
() => (0,
|
|
317237
|
+
() => (0, import_rxjs8.from)(Promise.resolve().then(() => (init_update_environment(), update_environment_exports))).pipe((0, import_operators12.map)((m) => m.default)).toPromise()
|
|
317192
317238
|
)
|
|
317193
317239
|
);
|
|
317194
317240
|
program2.command("environment:delete").description("Delete environment for project").option("-p, --project <project>").option("-n, --name <name>").option("-f, --force").option("-spec, --spec <spec>").action(
|
|
317195
317241
|
lazy(
|
|
317196
|
-
() => (0,
|
|
317242
|
+
() => (0, import_rxjs8.from)(Promise.resolve().then(() => (init_delete_environment(), delete_environment_exports))).pipe((0, import_operators12.map)((m) => m.default)).toPromise()
|
|
317197
317243
|
)
|
|
317198
317244
|
);
|
|
317199
317245
|
program2.command("environment:get").description("Get environment for project").option("-p, --project <project>").option("-n, --name <name>").action(
|
|
317200
317246
|
lazy(
|
|
317201
|
-
() => (0,
|
|
317247
|
+
() => (0, import_rxjs8.from)(Promise.resolve().then(() => (init_get_environment(), get_environment_exports))).pipe((0, import_operators12.map)((m) => m.default)).toPromise()
|
|
317202
317248
|
)
|
|
317203
317249
|
);
|
|
317204
317250
|
}
|
|
317205
317251
|
|
|
317206
317252
|
// src/commands/lambda/index.ts
|
|
317207
|
-
var
|
|
317208
|
-
var
|
|
317253
|
+
var import_rxjs14 = __toESM(require_cjs());
|
|
317254
|
+
var import_operators20 = __toESM(require_operators());
|
|
317209
317255
|
init_helpers();
|
|
317210
317256
|
init_helpers2();
|
|
317211
317257
|
function registerLambdaCommands(program2) {
|
|
@@ -317214,12 +317260,12 @@ function registerLambdaCommands(program2) {
|
|
|
317214
317260
|
"Specify custom token generated from the website"
|
|
317215
317261
|
).action(
|
|
317216
317262
|
lazy(
|
|
317217
|
-
() => (0,
|
|
317263
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_list(), list_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317218
317264
|
)
|
|
317219
317265
|
);
|
|
317220
317266
|
program2.command("lambda:get").description("Get lambda by id").option("-l, --lambda <lambda>", "get by lambda id").option("-n, --name <name>", "get by lambda name").option("-p, --project <project>", "get by lambda name").option("-p, --spec <spec>", "get by lambda name").action(
|
|
317221
317267
|
lazy(
|
|
317222
|
-
() => (0,
|
|
317268
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_get(), get_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317223
317269
|
)
|
|
317224
317270
|
);
|
|
317225
317271
|
const createOrUpdateOptions = [
|
|
@@ -317297,44 +317343,44 @@ function registerLambdaCommands(program2) {
|
|
|
317297
317343
|
];
|
|
317298
317344
|
createCommand("lambda:create")(createOrUpdateOptions)(program2).action(
|
|
317299
317345
|
lazy(
|
|
317300
|
-
() => (0,
|
|
317346
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_create(), create_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317301
317347
|
)
|
|
317302
317348
|
);
|
|
317303
317349
|
createCommand("lambda:update")(createOrUpdateOptions)(program2).action(
|
|
317304
317350
|
lazy(
|
|
317305
|
-
() => (0,
|
|
317351
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_update(), update_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317306
317352
|
)
|
|
317307
317353
|
);
|
|
317308
317354
|
program2.command("lambda:delete").description("Get lambda by id").option("-n, --name <name>", "get by lambda name").option("-p, --project <project>", "get by lambda name").option("-s, --spec <spec>", "get by lambda name").action(
|
|
317309
317355
|
lazy(
|
|
317310
|
-
() => (0,
|
|
317356
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_delete(), delete_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317311
317357
|
)
|
|
317312
317358
|
);
|
|
317313
317359
|
program2.command("lambda:log").description("Get lambda log").option("-l, --lambda <lambda>", "get by lambda id").option("-n, --name <name>", "get by lambda name").option("-p, --project <project>", "get by lambda name").option("-s, --spec <spec>", "get by lambda name").action(
|
|
317314
317360
|
lazy(
|
|
317315
|
-
() => (0,
|
|
317361
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_logs(), logs_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317316
317362
|
)
|
|
317317
317363
|
);
|
|
317318
317364
|
program2.command("lambda:build:log").description("Get build log").option("-l, --lambda <lambda>", "get by lambda id").option("-n, --name <name>", "get by lambda name").option("-p, --project <project>", "get by lambda project").option("-s, --spec <spec>", "use configuration").action(
|
|
317319
317365
|
lazy(
|
|
317320
|
-
() => (0,
|
|
317366
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_logs_builder(), logs_builder_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317321
317367
|
)
|
|
317322
317368
|
);
|
|
317323
317369
|
program2.command("lambda:test").description("Test lambda").option("-l, --lambda <lambda>", "get by lambda id").option("-n, --name <name>", "get by lambda name").option("-p, --project <project>", "get by lambda name").option("-s, --spec <spec>", "get by lambda name").option("-qp, --queryParams <queryParams>", "Adds query params to request").option("-pp, --pathParams <pathParams>", "Adds query params to request").option("-b, --body <body>", "Add body to request").action(
|
|
317324
317370
|
lazy(
|
|
317325
|
-
() => (0,
|
|
317371
|
+
() => (0, import_rxjs14.from)(Promise.resolve().then(() => (init_test(), test_exports))).pipe((0, import_operators20.map)((m) => m.default)).toPromise()
|
|
317326
317372
|
)
|
|
317327
317373
|
);
|
|
317328
317374
|
}
|
|
317329
317375
|
|
|
317330
317376
|
// src/commands/project/index.ts
|
|
317331
|
-
var
|
|
317332
|
-
var
|
|
317377
|
+
var import_rxjs17 = __toESM(require_cjs());
|
|
317378
|
+
var import_operators23 = __toESM(require_operators());
|
|
317333
317379
|
init_helpers();
|
|
317334
317380
|
function registerProjectCommands(program2) {
|
|
317335
317381
|
program2.command("project:list").description("List of all projects").action(
|
|
317336
317382
|
lazy(
|
|
317337
|
-
() => (0,
|
|
317383
|
+
() => (0, import_rxjs17.from)(Promise.resolve().then(() => (init_list2(), list_exports2))).pipe((0, import_operators23.map)((m) => m.default)).toPromise()
|
|
317338
317384
|
)
|
|
317339
317385
|
);
|
|
317340
317386
|
program2.command("project:use").arguments("<project>").description("Adds default project to be used all around the CLI").action(lazy(() => Promise.resolve().then(() => (init_use(), use_exports)).then((m) => m.default)));
|
|
@@ -317348,8 +317394,8 @@ function registerMcpCommands(program2) {
|
|
|
317348
317394
|
}
|
|
317349
317395
|
|
|
317350
317396
|
// src/commands/start/index.ts
|
|
317351
|
-
var
|
|
317352
|
-
var
|
|
317397
|
+
var import_rxjs20 = __toESM(require_cjs());
|
|
317398
|
+
var import_operators26 = __toESM(require_operators());
|
|
317353
317399
|
init_helpers();
|
|
317354
317400
|
function startCommands(program2) {
|
|
317355
317401
|
program2.command("start").description("Start bundle using esbuild https://esbuild.github.io ").option(
|
|
@@ -317357,7 +317403,7 @@ function startCommands(program2) {
|
|
|
317357
317403
|
"File or files to bundle defaults to index.ts"
|
|
317358
317404
|
).option("-b, --bundle", "Bundle code", true).option("-m, --minify", "Minify code", false).option("-p, --platform <char>", "Platform ", "node").option("-t, --target <char>", "Target ", "node14.4").option("-o, --outfile <char>", "Outfile name").option("-e, --external <external...>", "External libraries").action(
|
|
317359
317405
|
lazy(
|
|
317360
|
-
() => (0,
|
|
317406
|
+
() => (0, import_rxjs20.from)(Promise.resolve().then(() => (init_start2(), start_exports2))).pipe((0, import_operators26.map)((m) => m.default)).toPromise()
|
|
317361
317407
|
)
|
|
317362
317408
|
);
|
|
317363
317409
|
}
|