@gapi/gcli 1.8.241 → 1.8.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-CLI.md +67 -0
- package/README.md +29 -0
- package/docs/changelog.d/2026-10-19-ci-token-scopes-mq-trigger-list-create-update-delete-commands-readme-documen.md +21 -0
- package/docs/features/README.md +1 -0
- package/docs/features/ci-token-scopes.md +25 -0
- package/package.json +1 -1
- package/release/index.js +680 -412
package/release/index.js
CHANGED
|
@@ -12248,7 +12248,7 @@ var require_of = __commonJS({
|
|
|
12248
12248
|
exports2.of = void 0;
|
|
12249
12249
|
var args_1 = require_args();
|
|
12250
12250
|
var from_1 = require_from();
|
|
12251
|
-
function
|
|
12251
|
+
function of14() {
|
|
12252
12252
|
var args = [];
|
|
12253
12253
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
12254
12254
|
args[_i] = arguments[_i];
|
|
@@ -12256,7 +12256,7 @@ var require_of = __commonJS({
|
|
|
12256
12256
|
var scheduler = args_1.popScheduler(args);
|
|
12257
12257
|
return from_1.from(args, scheduler);
|
|
12258
12258
|
}
|
|
12259
|
-
exports2.of =
|
|
12259
|
+
exports2.of = of14;
|
|
12260
12260
|
}
|
|
12261
12261
|
});
|
|
12262
12262
|
|
|
@@ -12391,7 +12391,7 @@ var require_lastValueFrom = __commonJS({
|
|
|
12391
12391
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12392
12392
|
exports2.lastValueFrom = void 0;
|
|
12393
12393
|
var EmptyError_1 = require_EmptyError();
|
|
12394
|
-
function
|
|
12394
|
+
function lastValueFrom48(source, config2) {
|
|
12395
12395
|
var hasConfig = typeof config2 === "object";
|
|
12396
12396
|
return new Promise(function(resolve, reject) {
|
|
12397
12397
|
var _hasValue = false;
|
|
@@ -12414,7 +12414,7 @@ var require_lastValueFrom = __commonJS({
|
|
|
12414
12414
|
});
|
|
12415
12415
|
});
|
|
12416
12416
|
}
|
|
12417
|
-
exports2.lastValueFrom =
|
|
12417
|
+
exports2.lastValueFrom = lastValueFrom48;
|
|
12418
12418
|
}
|
|
12419
12419
|
});
|
|
12420
12420
|
|
|
@@ -12591,7 +12591,7 @@ var require_map = __commonJS({
|
|
|
12591
12591
|
exports2.map = void 0;
|
|
12592
12592
|
var lift_1 = require_lift();
|
|
12593
12593
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
12594
|
-
function
|
|
12594
|
+
function map26(project, thisArg) {
|
|
12595
12595
|
return lift_1.operate(function(source, subscriber) {
|
|
12596
12596
|
var index = 0;
|
|
12597
12597
|
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
|
|
@@ -12599,7 +12599,7 @@ var require_map = __commonJS({
|
|
|
12599
12599
|
}));
|
|
12600
12600
|
});
|
|
12601
12601
|
}
|
|
12602
|
-
exports2.map =
|
|
12602
|
+
exports2.map = map26;
|
|
12603
12603
|
}
|
|
12604
12604
|
});
|
|
12605
12605
|
|
|
@@ -16648,7 +16648,7 @@ var require_switchMap = __commonJS({
|
|
|
16648
16648
|
var innerFrom_1 = require_innerFrom();
|
|
16649
16649
|
var lift_1 = require_lift();
|
|
16650
16650
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16651
|
-
function
|
|
16651
|
+
function switchMap39(project, resultSelector) {
|
|
16652
16652
|
return lift_1.operate(function(source, subscriber) {
|
|
16653
16653
|
var innerSubscriber = null;
|
|
16654
16654
|
var index = 0;
|
|
@@ -16672,7 +16672,7 @@ var require_switchMap = __commonJS({
|
|
|
16672
16672
|
}));
|
|
16673
16673
|
});
|
|
16674
16674
|
}
|
|
16675
|
-
exports2.switchMap =
|
|
16675
|
+
exports2.switchMap = switchMap39;
|
|
16676
16676
|
}
|
|
16677
16677
|
});
|
|
16678
16678
|
|
|
@@ -16792,7 +16792,7 @@ var require_tap = __commonJS({
|
|
|
16792
16792
|
var lift_1 = require_lift();
|
|
16793
16793
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16794
16794
|
var identity_1 = require_identity();
|
|
16795
|
-
function
|
|
16795
|
+
function tap37(observerOrNext, error48, complete) {
|
|
16796
16796
|
var tapObserver = isFunction_1.isFunction(observerOrNext) || error48 || complete ? { next: observerOrNext, error: error48, complete } : observerOrNext;
|
|
16797
16797
|
return tapObserver ? lift_1.operate(function(source, subscriber) {
|
|
16798
16798
|
var _a2;
|
|
@@ -16821,7 +16821,7 @@ var require_tap = __commonJS({
|
|
|
16821
16821
|
}));
|
|
16822
16822
|
}) : identity_1.identity;
|
|
16823
16823
|
}
|
|
16824
|
-
exports2.tap =
|
|
16824
|
+
exports2.tap = tap37;
|
|
16825
16825
|
}
|
|
16826
16826
|
});
|
|
16827
16827
|
|
|
@@ -19972,7 +19972,7 @@ var require_index_node_cjs = __commonJS({
|
|
|
19972
19972
|
}
|
|
19973
19973
|
return true;
|
|
19974
19974
|
}
|
|
19975
|
-
function
|
|
19975
|
+
function map26(obj, fn, contextObj) {
|
|
19976
19976
|
var res = {};
|
|
19977
19977
|
for (var key in obj) {
|
|
19978
19978
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -20462,7 +20462,7 @@ var require_index_node_cjs = __commonJS({
|
|
|
20462
20462
|
exports2.isValidTimestamp = isValidTimestamp;
|
|
20463
20463
|
exports2.issuedAtTime = issuedAtTime;
|
|
20464
20464
|
exports2.jsonEval = jsonEval;
|
|
20465
|
-
exports2.map =
|
|
20465
|
+
exports2.map = map26;
|
|
20466
20466
|
exports2.querystring = querystring;
|
|
20467
20467
|
exports2.querystringDecode = querystringDecode;
|
|
20468
20468
|
exports2.safeGet = safeGet;
|
|
@@ -24364,7 +24364,7 @@ var require_auth = __commonJS({
|
|
|
24364
24364
|
var b = a && (a[mf] ? "phone" : null);
|
|
24365
24365
|
if (b && a && a[nf]) {
|
|
24366
24366
|
K(this, "uid", a[nf]);
|
|
24367
|
-
K(this, "displayName", a[
|
|
24367
|
+
K(this, "displayName", a[of14] || null);
|
|
24368
24368
|
var c = null;
|
|
24369
24369
|
a[pf] && (c = new Date(a[pf]).toUTCString());
|
|
24370
24370
|
K(this, "enrollmentTime", c);
|
|
@@ -24382,7 +24382,7 @@ var require_auth = __commonJS({
|
|
|
24382
24382
|
}
|
|
24383
24383
|
return b;
|
|
24384
24384
|
}
|
|
24385
|
-
var
|
|
24385
|
+
var of14 = "displayName", pf = "enrolledAt", nf = "mfaEnrollmentId", mf = "phoneInfo";
|
|
24386
24386
|
function rf(a) {
|
|
24387
24387
|
lf.call(this, a);
|
|
24388
24388
|
K(this, "phoneNumber", a[mf]);
|
|
@@ -27763,7 +27763,7 @@ var require_auth = __commonJS({
|
|
|
27763
27763
|
var e2 = null, f3 = {};
|
|
27764
27764
|
if (d) {
|
|
27765
27765
|
d.uid && (f3[nf] = d.uid);
|
|
27766
|
-
d.displayName && (f3[
|
|
27766
|
+
d.displayName && (f3[of14] = d.displayName);
|
|
27767
27767
|
d.enrollmentTime && (f3[pf] = new Date(d.enrollmentTime).toISOString());
|
|
27768
27768
|
d.phoneNumber && (f3[mf] = d.phoneNumber);
|
|
27769
27769
|
try {
|
|
@@ -35484,16 +35484,16 @@ var require_encoder = __commonJS({
|
|
|
35484
35484
|
}
|
|
35485
35485
|
return bl(acc);
|
|
35486
35486
|
}
|
|
35487
|
-
function encodeMap(
|
|
35488
|
-
const acc = [getHeader(
|
|
35489
|
-
const keys = [...
|
|
35487
|
+
function encodeMap(map26, options, encode3) {
|
|
35488
|
+
const acc = [getHeader(map26.size, 128, 222)];
|
|
35489
|
+
const keys = [...map26.keys()];
|
|
35490
35490
|
if (!options.preferMap) {
|
|
35491
35491
|
if (keys.every((item) => typeof item === "string")) {
|
|
35492
35492
|
console.warn("Map with string only keys will be deserialized as an object!");
|
|
35493
35493
|
}
|
|
35494
35494
|
}
|
|
35495
35495
|
keys.forEach((key) => {
|
|
35496
|
-
acc.push(encode3(key), encode3(
|
|
35496
|
+
acc.push(encode3(key), encode3(map26.get(key)));
|
|
35497
35497
|
});
|
|
35498
35498
|
return bl(acc);
|
|
35499
35499
|
}
|
|
@@ -36391,7 +36391,7 @@ function gql(...args) {
|
|
|
36391
36391
|
}
|
|
36392
36392
|
return result;
|
|
36393
36393
|
}
|
|
36394
|
-
var import_compressor, firebase, import_rxjs2, import_operators, GraphqlClienAPI;
|
|
36394
|
+
var import_compressor, firebase, import_rxjs2, import_operators, MessageQueueTriggerFragment, GraphqlClienAPI;
|
|
36395
36395
|
var init_gql_client = __esm({
|
|
36396
36396
|
"src/services/gql-client.ts"() {
|
|
36397
36397
|
init_index_cjs();
|
|
@@ -36410,6 +36410,22 @@ var init_gql_client = __esm({
|
|
|
36410
36410
|
init_project_fragment();
|
|
36411
36411
|
init_rabbitmq_fragment();
|
|
36412
36412
|
init_time_trigger_fragment();
|
|
36413
|
+
MessageQueueTriggerFragment = `
|
|
36414
|
+
id
|
|
36415
|
+
name
|
|
36416
|
+
lambdaName
|
|
36417
|
+
requestTopic
|
|
36418
|
+
responseTopic
|
|
36419
|
+
errorTopic
|
|
36420
|
+
rabbitMqId
|
|
36421
|
+
clusterName
|
|
36422
|
+
maxRetries
|
|
36423
|
+
coolDownPeriod
|
|
36424
|
+
pollingInterval
|
|
36425
|
+
minReplicaCount
|
|
36426
|
+
maxReplicaCount
|
|
36427
|
+
threshold
|
|
36428
|
+
`;
|
|
36413
36429
|
GraphqlClienAPI = class {
|
|
36414
36430
|
static query({
|
|
36415
36431
|
query,
|
|
@@ -36769,6 +36785,46 @@ var init_gql_client = __esm({
|
|
|
36769
36785
|
}).pipe((0, import_operators.map)((res) => res.deleteLambdaTimeTrigger));
|
|
36770
36786
|
}
|
|
36771
36787
|
// --------------------------------------------------------------------
|
|
36788
|
+
// Message-queue triggers (graphql-server-lambdas message-queue.controller)
|
|
36789
|
+
// --------------------------------------------------------------------
|
|
36790
|
+
static listMessageQueueTriggers(projectId) {
|
|
36791
|
+
return this.query({
|
|
36792
|
+
query: gql`
|
|
36793
|
+
query listMessageQueueTriggers($projectId: String!) {
|
|
36794
|
+
listMessageQueueTriggers(projectId: $projectId) {
|
|
36795
|
+
${MessageQueueTriggerFragment}
|
|
36796
|
+
}
|
|
36797
|
+
}
|
|
36798
|
+
`,
|
|
36799
|
+
variables: { projectId }
|
|
36800
|
+
}).pipe((0, import_operators.map)((res) => res.listMessageQueueTriggers));
|
|
36801
|
+
}
|
|
36802
|
+
static saveMessageQueueTrigger(mode, projectId, payload) {
|
|
36803
|
+
const field = `${mode}MessageQueueTrigger`;
|
|
36804
|
+
return this.query({
|
|
36805
|
+
query: gql`
|
|
36806
|
+
mutation ${field}($projectId: String!, $payload: MessageQueueTriggerInput!) {
|
|
36807
|
+
${field}(projectId: $projectId, payload: $payload) {
|
|
36808
|
+
${MessageQueueTriggerFragment}
|
|
36809
|
+
}
|
|
36810
|
+
}
|
|
36811
|
+
`,
|
|
36812
|
+
variables: { projectId, payload }
|
|
36813
|
+
}).pipe((0, import_operators.map)((res) => res[field]));
|
|
36814
|
+
}
|
|
36815
|
+
static deleteMessageQueueTrigger(projectId, name2) {
|
|
36816
|
+
return this.query({
|
|
36817
|
+
query: gql`
|
|
36818
|
+
mutation deleteMessageQueueTrigger($projectId: String!, $name: String!) {
|
|
36819
|
+
deleteMessageQueueTrigger(projectId: $projectId, name: $name) {
|
|
36820
|
+
${MessageQueueTriggerFragment}
|
|
36821
|
+
}
|
|
36822
|
+
}
|
|
36823
|
+
`,
|
|
36824
|
+
variables: { projectId, name: name2 }
|
|
36825
|
+
}).pipe((0, import_operators.map)((res) => res.deleteMessageQueueTrigger));
|
|
36826
|
+
}
|
|
36827
|
+
// --------------------------------------------------------------------
|
|
36772
36828
|
// Cluster (project-level; resolved by cluster-provisioner via the
|
|
36773
36829
|
// federation gateway - flat scalar mutation args, NOT a nested input
|
|
36774
36830
|
// object, confirmed against cluster.controller.ts)
|
|
@@ -38703,22 +38759,22 @@ var require_source_map_generator = __commonJS({
|
|
|
38703
38759
|
}, this);
|
|
38704
38760
|
};
|
|
38705
38761
|
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
38706
|
-
var
|
|
38762
|
+
var map26 = {
|
|
38707
38763
|
version: this._version,
|
|
38708
38764
|
sources: this._sources.toArray(),
|
|
38709
38765
|
names: this._names.toArray(),
|
|
38710
38766
|
mappings: this._serializeMappings()
|
|
38711
38767
|
};
|
|
38712
38768
|
if (this._file != null) {
|
|
38713
|
-
|
|
38769
|
+
map26.file = this._file;
|
|
38714
38770
|
}
|
|
38715
38771
|
if (this._sourceRoot != null) {
|
|
38716
|
-
|
|
38772
|
+
map26.sourceRoot = this._sourceRoot;
|
|
38717
38773
|
}
|
|
38718
38774
|
if (this._sourcesContents) {
|
|
38719
|
-
|
|
38775
|
+
map26.sourcesContent = this._generateSourcesContent(map26.sources, map26.sourceRoot);
|
|
38720
38776
|
}
|
|
38721
|
-
return
|
|
38777
|
+
return map26;
|
|
38722
38778
|
};
|
|
38723
38779
|
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
38724
38780
|
return JSON.stringify(this.toJSON());
|
|
@@ -39611,7 +39667,7 @@ var require_source_node = __commonJS({
|
|
|
39611
39667
|
line: 1,
|
|
39612
39668
|
column: 0
|
|
39613
39669
|
};
|
|
39614
|
-
var
|
|
39670
|
+
var map26 = new SourceMapGenerator(aArgs);
|
|
39615
39671
|
var sourceMappingActive = false;
|
|
39616
39672
|
var lastOriginalSource = null;
|
|
39617
39673
|
var lastOriginalLine = null;
|
|
@@ -39621,7 +39677,7 @@ var require_source_node = __commonJS({
|
|
|
39621
39677
|
generated.code += chunk;
|
|
39622
39678
|
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
39623
39679
|
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
39624
|
-
|
|
39680
|
+
map26.addMapping({
|
|
39625
39681
|
source: original.source,
|
|
39626
39682
|
original: {
|
|
39627
39683
|
line: original.line,
|
|
@@ -39640,7 +39696,7 @@ var require_source_node = __commonJS({
|
|
|
39640
39696
|
lastOriginalName = original.name;
|
|
39641
39697
|
sourceMappingActive = true;
|
|
39642
39698
|
} else if (sourceMappingActive) {
|
|
39643
|
-
|
|
39699
|
+
map26.addMapping({
|
|
39644
39700
|
generated: {
|
|
39645
39701
|
line: generated.line,
|
|
39646
39702
|
column: generated.column
|
|
@@ -39657,7 +39713,7 @@ var require_source_node = __commonJS({
|
|
|
39657
39713
|
lastOriginalSource = null;
|
|
39658
39714
|
sourceMappingActive = false;
|
|
39659
39715
|
} else if (sourceMappingActive) {
|
|
39660
|
-
|
|
39716
|
+
map26.addMapping({
|
|
39661
39717
|
source: original.source,
|
|
39662
39718
|
original: {
|
|
39663
39719
|
line: original.line,
|
|
@@ -39676,9 +39732,9 @@ var require_source_node = __commonJS({
|
|
|
39676
39732
|
}
|
|
39677
39733
|
});
|
|
39678
39734
|
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
39679
|
-
|
|
39735
|
+
map26.setSourceContent(sourceFile, sourceContent);
|
|
39680
39736
|
});
|
|
39681
|
-
return { code: generated.code, map:
|
|
39737
|
+
return { code: generated.code, map: map26 };
|
|
39682
39738
|
};
|
|
39683
39739
|
exports2.SourceNode = SourceNode;
|
|
39684
39740
|
}
|
|
@@ -42018,7 +42074,7 @@ var require_typescript = __commonJS({
|
|
|
42018
42074
|
makeImport: () => makeImport,
|
|
42019
42075
|
makeStringLiteral: () => makeStringLiteral,
|
|
42020
42076
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
42021
|
-
map: () =>
|
|
42077
|
+
map: () => map26,
|
|
42022
42078
|
mapAllOrFail: () => mapAllOrFail,
|
|
42023
42079
|
mapDefined: () => mapDefined,
|
|
42024
42080
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -42662,7 +42718,7 @@ var require_typescript = __commonJS({
|
|
|
42662
42718
|
function clear(array2) {
|
|
42663
42719
|
array2.length = 0;
|
|
42664
42720
|
}
|
|
42665
|
-
function
|
|
42721
|
+
function map26(array2, f3) {
|
|
42666
42722
|
let result;
|
|
42667
42723
|
if (array2 !== void 0) {
|
|
42668
42724
|
result = [];
|
|
@@ -42798,12 +42854,12 @@ var require_typescript = __commonJS({
|
|
|
42798
42854
|
}
|
|
42799
42855
|
}
|
|
42800
42856
|
}
|
|
42801
|
-
function getOrUpdate(
|
|
42802
|
-
if (
|
|
42803
|
-
return
|
|
42857
|
+
function getOrUpdate(map27, key, callback) {
|
|
42858
|
+
if (map27.has(key)) {
|
|
42859
|
+
return map27.get(key);
|
|
42804
42860
|
}
|
|
42805
42861
|
const value = callback();
|
|
42806
|
-
|
|
42862
|
+
map27.set(key, value);
|
|
42807
42863
|
return value;
|
|
42808
42864
|
}
|
|
42809
42865
|
function tryAddToSet(set2, value) {
|
|
@@ -42849,12 +42905,12 @@ var require_typescript = __commonJS({
|
|
|
42849
42905
|
}
|
|
42850
42906
|
return result;
|
|
42851
42907
|
}
|
|
42852
|
-
function mapEntries(
|
|
42853
|
-
if (
|
|
42908
|
+
function mapEntries(map27, f3) {
|
|
42909
|
+
if (map27 === void 0) {
|
|
42854
42910
|
return void 0;
|
|
42855
42911
|
}
|
|
42856
42912
|
const result = /* @__PURE__ */ new Map();
|
|
42857
|
-
|
|
42913
|
+
map27.forEach((value, key) => {
|
|
42858
42914
|
const [newKey, newValue] = f3(key, value);
|
|
42859
42915
|
result.set(newKey, newValue);
|
|
42860
42916
|
});
|
|
@@ -43203,16 +43259,16 @@ var require_typescript = __commonJS({
|
|
|
43203
43259
|
return initial;
|
|
43204
43260
|
}
|
|
43205
43261
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
43206
|
-
function hasProperty(
|
|
43207
|
-
return hasOwnProperty.call(
|
|
43262
|
+
function hasProperty(map27, key) {
|
|
43263
|
+
return hasOwnProperty.call(map27, key);
|
|
43208
43264
|
}
|
|
43209
|
-
function getProperty(
|
|
43210
|
-
return hasOwnProperty.call(
|
|
43265
|
+
function getProperty(map27, key) {
|
|
43266
|
+
return hasOwnProperty.call(map27, key) ? map27[key] : void 0;
|
|
43211
43267
|
}
|
|
43212
|
-
function getOwnKeys(
|
|
43268
|
+
function getOwnKeys(map27) {
|
|
43213
43269
|
const keys = [];
|
|
43214
|
-
for (const key in
|
|
43215
|
-
if (hasOwnProperty.call(
|
|
43270
|
+
for (const key in map27) {
|
|
43271
|
+
if (hasOwnProperty.call(map27, key)) {
|
|
43216
43272
|
keys.push(key);
|
|
43217
43273
|
}
|
|
43218
43274
|
}
|
|
@@ -43244,10 +43300,10 @@ var require_typescript = __commonJS({
|
|
|
43244
43300
|
}
|
|
43245
43301
|
return result;
|
|
43246
43302
|
}
|
|
43247
|
-
function arrayFrom(iterator,
|
|
43303
|
+
function arrayFrom(iterator, map27) {
|
|
43248
43304
|
const result = [];
|
|
43249
43305
|
for (const value of iterator) {
|
|
43250
|
-
result.push(
|
|
43306
|
+
result.push(map27 ? map27(value) : value);
|
|
43251
43307
|
}
|
|
43252
43308
|
return result;
|
|
43253
43309
|
}
|
|
@@ -43352,10 +43408,10 @@ var require_typescript = __commonJS({
|
|
|
43352
43408
|
return fn == null ? void 0 : fn.bind(obj);
|
|
43353
43409
|
}
|
|
43354
43410
|
function createMultiMap() {
|
|
43355
|
-
const
|
|
43356
|
-
|
|
43357
|
-
|
|
43358
|
-
return
|
|
43411
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
43412
|
+
map27.add = multiMapAdd;
|
|
43413
|
+
map27.remove = multiMapRemove;
|
|
43414
|
+
return map27;
|
|
43359
43415
|
}
|
|
43360
43416
|
function multiMapAdd(key, value) {
|
|
43361
43417
|
let values = this.get(key);
|
|
@@ -43571,13 +43627,13 @@ var require_typescript = __commonJS({
|
|
|
43571
43627
|
};
|
|
43572
43628
|
}
|
|
43573
43629
|
function memoizeOne(callback) {
|
|
43574
|
-
const
|
|
43630
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
43575
43631
|
return (arg) => {
|
|
43576
43632
|
const key = `${typeof arg}:${arg}`;
|
|
43577
|
-
let value =
|
|
43578
|
-
if (value === void 0 && !
|
|
43633
|
+
let value = map27.get(key);
|
|
43634
|
+
if (value === void 0 && !map27.has(key)) {
|
|
43579
43635
|
value = callback(arg);
|
|
43580
|
-
|
|
43636
|
+
map27.set(key, value);
|
|
43581
43637
|
}
|
|
43582
43638
|
return value;
|
|
43583
43639
|
};
|
|
@@ -44191,7 +44247,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
44191
44247
|
}
|
|
44192
44248
|
Debug2.getFunctionName = getFunctionName;
|
|
44193
44249
|
function formatSymbol(symbol2) {
|
|
44194
|
-
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${
|
|
44250
|
+
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${map26(symbol2.declarations, (node) => formatSyntaxKind(node.kind))} }`;
|
|
44195
44251
|
}
|
|
44196
44252
|
Debug2.formatSymbol = formatSymbol;
|
|
44197
44253
|
function formatEnum(value = 0, enumObject, isFlags) {
|
|
@@ -44617,7 +44673,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
44617
44673
|
case 1:
|
|
44618
44674
|
return zipWith(
|
|
44619
44675
|
this.sources,
|
|
44620
|
-
this.targets ||
|
|
44676
|
+
this.targets || map26(this.sources, () => "any"),
|
|
44621
44677
|
(s2, t2) => `${s2.__debugTypeToString()} -> ${typeof t2 === "string" ? t2 : t2.__debugTypeToString()}`
|
|
44622
44678
|
).join(", ");
|
|
44623
44679
|
case 2:
|
|
@@ -45252,10 +45308,10 @@ ${lanes.join("\n")}
|
|
|
45252
45308
|
}
|
|
45253
45309
|
}
|
|
45254
45310
|
function formatDisjunction(alternatives) {
|
|
45255
|
-
return
|
|
45311
|
+
return map26(alternatives, formatAlternative).join(" || ") || "*";
|
|
45256
45312
|
}
|
|
45257
45313
|
function formatAlternative(comparators) {
|
|
45258
|
-
return
|
|
45314
|
+
return map26(comparators, formatComparator).join(" ");
|
|
45259
45315
|
}
|
|
45260
45316
|
function formatComparator(comparator) {
|
|
45261
45317
|
return `${comparator.operator}${comparator.operand}`;
|
|
@@ -52115,20 +52171,20 @@ ${lanes.join("\n")}
|
|
|
52115
52171
|
var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
|
|
52116
52172
|
var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
|
|
52117
52173
|
var jsDocSeeOrLink = /@(?:see|link)/i;
|
|
52118
|
-
function lookupInUnicodeMap(code,
|
|
52119
|
-
if (code <
|
|
52174
|
+
function lookupInUnicodeMap(code, map27) {
|
|
52175
|
+
if (code < map27[0]) {
|
|
52120
52176
|
return false;
|
|
52121
52177
|
}
|
|
52122
52178
|
let lo = 0;
|
|
52123
|
-
let hi =
|
|
52179
|
+
let hi = map27.length;
|
|
52124
52180
|
let mid;
|
|
52125
52181
|
while (lo + 1 < hi) {
|
|
52126
52182
|
mid = lo + (hi - lo) / 2;
|
|
52127
52183
|
mid -= mid % 2;
|
|
52128
|
-
if (
|
|
52184
|
+
if (map27[mid] <= code && code <= map27[mid + 1]) {
|
|
52129
52185
|
return true;
|
|
52130
52186
|
}
|
|
52131
|
-
if (code <
|
|
52187
|
+
if (code < map27[mid]) {
|
|
52132
52188
|
hi = mid;
|
|
52133
52189
|
} else {
|
|
52134
52190
|
lo = mid + 2;
|
|
@@ -56932,8 +56988,8 @@ ${lanes.join("\n")}
|
|
|
56932
56988
|
node = node.parent;
|
|
56933
56989
|
}
|
|
56934
56990
|
}
|
|
56935
|
-
function forEachEntry(
|
|
56936
|
-
const iterator =
|
|
56991
|
+
function forEachEntry(map27, callback) {
|
|
56992
|
+
const iterator = map27.entries();
|
|
56937
56993
|
for (const [key, value] of iterator) {
|
|
56938
56994
|
const result = callback(value, key);
|
|
56939
56995
|
if (result) {
|
|
@@ -56942,8 +56998,8 @@ ${lanes.join("\n")}
|
|
|
56942
56998
|
}
|
|
56943
56999
|
return void 0;
|
|
56944
57000
|
}
|
|
56945
|
-
function forEachKey(
|
|
56946
|
-
const iterator =
|
|
57001
|
+
function forEachKey(map27, callback) {
|
|
57002
|
+
const iterator = map27.keys();
|
|
56947
57003
|
for (const key of iterator) {
|
|
56948
57004
|
const result = callback(key);
|
|
56949
57005
|
if (result) {
|
|
@@ -62095,28 +62151,28 @@ ${lanes.join("\n")}
|
|
|
62095
62151
|
}
|
|
62096
62152
|
return true;
|
|
62097
62153
|
}
|
|
62098
|
-
function clearMap(
|
|
62099
|
-
|
|
62100
|
-
|
|
62154
|
+
function clearMap(map27, onDeleteValue) {
|
|
62155
|
+
map27.forEach(onDeleteValue);
|
|
62156
|
+
map27.clear();
|
|
62101
62157
|
}
|
|
62102
|
-
function mutateMapSkippingNewValues(
|
|
62158
|
+
function mutateMapSkippingNewValues(map27, newMap, options) {
|
|
62103
62159
|
const { onDeleteValue, onExistingValue } = options;
|
|
62104
|
-
|
|
62160
|
+
map27.forEach((existingValue, key) => {
|
|
62105
62161
|
var _a2;
|
|
62106
62162
|
if (!(newMap == null ? void 0 : newMap.has(key))) {
|
|
62107
|
-
|
|
62163
|
+
map27.delete(key);
|
|
62108
62164
|
onDeleteValue(existingValue, key);
|
|
62109
62165
|
} else if (onExistingValue) {
|
|
62110
62166
|
onExistingValue(existingValue, (_a2 = newMap.get) == null ? void 0 : _a2.call(newMap, key), key);
|
|
62111
62167
|
}
|
|
62112
62168
|
});
|
|
62113
62169
|
}
|
|
62114
|
-
function mutateMap(
|
|
62115
|
-
mutateMapSkippingNewValues(
|
|
62170
|
+
function mutateMap(map27, newMap, options) {
|
|
62171
|
+
mutateMapSkippingNewValues(map27, newMap, options);
|
|
62116
62172
|
const { createNewValue } = options;
|
|
62117
62173
|
newMap == null ? void 0 : newMap.forEach((valueInNewMap, key) => {
|
|
62118
|
-
if (!
|
|
62119
|
-
|
|
62174
|
+
if (!map27.has(key)) {
|
|
62175
|
+
map27.set(key, createNewValue(key, valueInNewMap));
|
|
62120
62176
|
}
|
|
62121
62177
|
});
|
|
62122
62178
|
}
|
|
@@ -63182,7 +63238,7 @@ ${lanes.join("\n")}
|
|
|
63182
63238
|
currentDirectory = normalizePath(currentDirectory);
|
|
63183
63239
|
const absolutePath = combinePaths(currentDirectory, path2);
|
|
63184
63240
|
return {
|
|
63185
|
-
includeFilePatterns:
|
|
63241
|
+
includeFilePatterns: map26(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
63186
63242
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
63187
63243
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
63188
63244
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -65692,7 +65748,7 @@ ${lanes.join("\n")}
|
|
|
65692
65748
|
if (isObjectBindingPattern(node)) {
|
|
65693
65749
|
return setOriginalNode(
|
|
65694
65750
|
setTextRange(
|
|
65695
|
-
factory2.createObjectLiteralExpression(
|
|
65751
|
+
factory2.createObjectLiteralExpression(map26(node.elements, convertToObjectAssignmentElement)),
|
|
65696
65752
|
node
|
|
65697
65753
|
),
|
|
65698
65754
|
node
|
|
@@ -65704,7 +65760,7 @@ ${lanes.join("\n")}
|
|
|
65704
65760
|
if (isArrayBindingPattern(node)) {
|
|
65705
65761
|
return setOriginalNode(
|
|
65706
65762
|
setTextRange(
|
|
65707
|
-
factory2.createArrayLiteralExpression(
|
|
65763
|
+
factory2.createArrayLiteralExpression(map26(node.elements, convertToArrayAssignmentElement)),
|
|
65708
65764
|
node
|
|
65709
65765
|
),
|
|
65710
65766
|
node
|
|
@@ -73065,12 +73121,12 @@ ${lanes.join("\n")}
|
|
|
73065
73121
|
if (node.kind === 353) {
|
|
73066
73122
|
Debug.fail("Should not need to re-set the children of a SyntaxList.");
|
|
73067
73123
|
}
|
|
73068
|
-
let
|
|
73069
|
-
if (
|
|
73070
|
-
|
|
73071
|
-
sourceFileToNodeChildren.set(sourceFile,
|
|
73124
|
+
let map27 = sourceFileToNodeChildren.get(sourceFile);
|
|
73125
|
+
if (map27 === void 0) {
|
|
73126
|
+
map27 = /* @__PURE__ */ new WeakMap();
|
|
73127
|
+
sourceFileToNodeChildren.set(sourceFile, map27);
|
|
73072
73128
|
}
|
|
73073
|
-
|
|
73129
|
+
map27.set(node, children);
|
|
73074
73130
|
return children;
|
|
73075
73131
|
}
|
|
73076
73132
|
function unsetNodeChildren(node, origSourceFile) {
|
|
@@ -73081,10 +73137,10 @@ ${lanes.join("\n")}
|
|
|
73081
73137
|
(_a2 = sourceFileToNodeChildren.get(origSourceFile)) == null ? void 0 : _a2.delete(node);
|
|
73082
73138
|
}
|
|
73083
73139
|
function transferSourceFileChildren(sourceFile, targetSourceFile) {
|
|
73084
|
-
const
|
|
73085
|
-
if (
|
|
73140
|
+
const map27 = sourceFileToNodeChildren.get(sourceFile);
|
|
73141
|
+
if (map27 !== void 0) {
|
|
73086
73142
|
sourceFileToNodeChildren.delete(sourceFile);
|
|
73087
|
-
sourceFileToNodeChildren.set(targetSourceFile,
|
|
73143
|
+
sourceFileToNodeChildren.set(targetSourceFile, map27);
|
|
73088
73144
|
}
|
|
73089
73145
|
}
|
|
73090
73146
|
function createEmptyExports(factory2) {
|
|
@@ -73526,7 +73582,7 @@ ${lanes.join("\n")}
|
|
|
73526
73582
|
if (some(helperNames)) {
|
|
73527
73583
|
helperNames.sort(compareStringsCaseSensitive);
|
|
73528
73584
|
const namedBindings = nodeFactory.createNamedImports(
|
|
73529
|
-
|
|
73585
|
+
map26(helperNames, (name2) => isFileLevelUniqueName(sourceFile, name2) ? nodeFactory.createImportSpecifier(
|
|
73530
73586
|
/*isTypeOnly*/
|
|
73531
73587
|
false,
|
|
73532
73588
|
/*propertyName*/
|
|
@@ -83729,7 +83785,7 @@ ${lanes.join("\n")}
|
|
|
83729
83785
|
break;
|
|
83730
83786
|
}
|
|
83731
83787
|
case "amd-dependency": {
|
|
83732
|
-
context.amdDependencies =
|
|
83788
|
+
context.amdDependencies = map26(
|
|
83733
83789
|
toArray(entryOrList),
|
|
83734
83790
|
(x2) => ({ name: x2.arguments.name, path: x2.arguments.path })
|
|
83735
83791
|
);
|
|
@@ -86078,7 +86134,7 @@ ${lanes.join("\n")}
|
|
|
86078
86134
|
function convertToTSConfig(configParseResult, configFileName, host) {
|
|
86079
86135
|
var _a2, _b, _c;
|
|
86080
86136
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
86081
|
-
const files =
|
|
86137
|
+
const files = map26(
|
|
86082
86138
|
filter3(
|
|
86083
86139
|
configParseResult.fileNames,
|
|
86084
86140
|
!((_b = (_a2 = configParseResult.options.configFile) == null ? void 0 : _a2.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs(
|
|
@@ -86108,7 +86164,7 @@ ${lanes.join("\n")}
|
|
|
86108
86164
|
version: void 0
|
|
86109
86165
|
},
|
|
86110
86166
|
watchOptions: watchOptionMap && optionMapToObject(watchOptionMap),
|
|
86111
|
-
references:
|
|
86167
|
+
references: map26(configParseResult.projectReferences, (r2) => ({ ...r2, path: r2.originalPath ? r2.originalPath : "", originalPath: void 0 })),
|
|
86112
86168
|
files: length(files) ? files : void 0,
|
|
86113
86169
|
...((_c = configParseResult.options.configFile) == null ? void 0 : _c.configFileSpecs) ? {
|
|
86114
86170
|
include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs),
|
|
@@ -86396,17 +86452,17 @@ ${lanes.join("\n")}
|
|
|
86396
86452
|
function formatValueOrArray(settingName, value) {
|
|
86397
86453
|
const option = optionDeclarations.filter((c) => c.name === settingName)[0];
|
|
86398
86454
|
if (!option) Debug.fail(`No option named ${settingName}?`);
|
|
86399
|
-
const
|
|
86455
|
+
const map27 = option.type instanceof Map ? option.type : void 0;
|
|
86400
86456
|
if (isArray(value)) {
|
|
86401
86457
|
const map32 = "element" in option && option.element.type instanceof Map ? option.element.type : void 0;
|
|
86402
86458
|
return `[${value.map((v) => formatSingleValue(v, map32)).join(", ")}]`;
|
|
86403
86459
|
} else {
|
|
86404
|
-
return formatSingleValue(value,
|
|
86460
|
+
return formatSingleValue(value, map27);
|
|
86405
86461
|
}
|
|
86406
86462
|
}
|
|
86407
|
-
function formatSingleValue(value,
|
|
86408
|
-
if (
|
|
86409
|
-
value = getNameOfCompilerOptionValue(value,
|
|
86463
|
+
function formatSingleValue(value, map27) {
|
|
86464
|
+
if (map27) {
|
|
86465
|
+
value = getNameOfCompilerOptionValue(value, map27) ?? Debug.fail(`No matching value of ${value}`);
|
|
86410
86466
|
}
|
|
86411
86467
|
return JSON.stringify(value);
|
|
86412
86468
|
}
|
|
@@ -86797,7 +86853,7 @@ ${lanes.join("\n")}
|
|
|
86797
86853
|
const setPropertyInResultIfNotUndefined = (propertyName) => {
|
|
86798
86854
|
if (ownConfig.raw[propertyName]) return;
|
|
86799
86855
|
if (extendsRaw[propertyName]) {
|
|
86800
|
-
result[propertyName] =
|
|
86856
|
+
result[propertyName] = map26(extendsRaw[propertyName], (path2) => startsWithConfigDirTemplate(path2) || isRootedDiskPath(path2) ? path2 : combinePaths(
|
|
86801
86857
|
relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
|
|
86802
86858
|
path2
|
|
86803
86859
|
));
|
|
@@ -87106,7 +87162,7 @@ ${lanes.join("\n")}
|
|
|
87106
87162
|
}
|
|
87107
87163
|
}
|
|
87108
87164
|
function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {
|
|
87109
|
-
return filter3(
|
|
87165
|
+
return filter3(map26(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v);
|
|
87110
87166
|
}
|
|
87111
87167
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
87112
87168
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -87146,7 +87202,7 @@ ${lanes.join("\n")}
|
|
|
87146
87202
|
".json"
|
|
87147
87203
|
/* Json */
|
|
87148
87204
|
));
|
|
87149
|
-
const includeFilePatterns =
|
|
87205
|
+
const includeFilePatterns = map26(getRegularExpressionsForWildcards(includes, basePath, "files"), (pattern) => `^${pattern}$`);
|
|
87150
87206
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, host.useCaseSensitiveFileNames)) : emptyArray;
|
|
87151
87207
|
}
|
|
87152
87208
|
const includeIndex = findIndex(jsonOnlyIncludeRegexes, (re) => re.test(file2));
|
|
@@ -94446,7 +94502,7 @@ ${lanes.join("\n")}
|
|
|
94446
94502
|
}
|
|
94447
94503
|
const normalizedSourcePaths = getPathsRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName);
|
|
94448
94504
|
const relativePaths = flatMap(normalizedSourcePaths, (sourcePath) => {
|
|
94449
|
-
return
|
|
94505
|
+
return map26(normalizedTargetPaths, (targetPath) => ensurePathIsNonModuleName(getRelativePathFromDirectory(sourcePath, targetPath, getCanonicalFileName)));
|
|
94450
94506
|
});
|
|
94451
94507
|
const shortest = min(relativePaths, compareNumberOfDirectorySeparators);
|
|
94452
94508
|
if (!shortest) {
|
|
@@ -97491,7 +97547,7 @@ ${lanes.join("\n")}
|
|
|
97491
97547
|
const exportedSymbol = exports22 ? find(symbolsToArray(exports22), (symbol2) => !!getSymbolIfSameReference(symbol2, localSymbol)) : void 0;
|
|
97492
97548
|
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);
|
|
97493
97549
|
if (localSymbol.declarations) {
|
|
97494
|
-
addRelatedInfo(diagnostic, ...
|
|
97550
|
+
addRelatedInfo(diagnostic, ...map26(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
|
97495
97551
|
}
|
|
97496
97552
|
}
|
|
97497
97553
|
} else {
|
|
@@ -100272,7 +100328,7 @@ ${lanes.join("\n")}
|
|
|
100272
100328
|
const types3 = type.types;
|
|
100273
100329
|
const templateHead = factory.createTemplateHead(texts[0]);
|
|
100274
100330
|
const templateSpans = factory.createNodeArray(
|
|
100275
|
-
|
|
100331
|
+
map26(types3, (t2, i2) => factory.createTemplateLiteralTypeSpan(
|
|
100276
100332
|
typeToTypeNodeHelper(t2, context),
|
|
100277
100333
|
(i2 < types3.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i2 + 1])
|
|
100278
100334
|
))
|
|
@@ -100641,7 +100697,7 @@ ${lanes.join("\n")}
|
|
|
100641
100697
|
}
|
|
100642
100698
|
const abstractSignatures = filter3(resolved.constructSignatures, (signature) => !!(signature.flags & 4));
|
|
100643
100699
|
if (some(abstractSignatures)) {
|
|
100644
|
-
const types3 =
|
|
100700
|
+
const types3 = map26(abstractSignatures, getOrCreateTypeFromSignature);
|
|
100645
100701
|
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
|
|
100646
100702
|
// the logic in `createTypeNodesFromResolvedType`.
|
|
100647
100703
|
(context.flags & 2048 ? countWhere(resolved.properties, (p) => !(p.flags & 4194304)) : length(resolved.properties));
|
|
@@ -100859,7 +100915,7 @@ ${lanes.join("\n")}
|
|
|
100859
100915
|
const newComponents = filter3(indexInfo.components, (e2) => {
|
|
100860
100916
|
return !hasLateBindableName(e2);
|
|
100861
100917
|
});
|
|
100862
|
-
return
|
|
100918
|
+
return map26(newComponents, (e2) => {
|
|
100863
100919
|
trackComputedName(e2.name.expression, context2.enclosingDeclaration, context2);
|
|
100864
100920
|
return setTextRange2(
|
|
100865
100921
|
context2,
|
|
@@ -101668,7 +101724,7 @@ ${lanes.join("\n")}
|
|
|
101668
101724
|
const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol);
|
|
101669
101725
|
const parameterType = getTypeOfSymbol(parameterSymbol);
|
|
101670
101726
|
const parameterTypeNode = serializeTypeForDeclaration(context, parameterDeclaration, parameterType, parameterSymbol);
|
|
101671
|
-
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ?
|
|
101727
|
+
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map26(getModifiers(parameterDeclaration), factory.cloneNode) : void 0;
|
|
101672
101728
|
const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768;
|
|
101673
101729
|
const dotDotDotToken = isRest ? factory.createToken(
|
|
101674
101730
|
26
|
|
@@ -101866,7 +101922,7 @@ ${lanes.join("\n")}
|
|
|
101866
101922
|
let typeParameterNodes;
|
|
101867
101923
|
const targetSymbol = getTargetSymbol(symbol2);
|
|
101868
101924
|
if (targetSymbol.flags & (32 | 64 | 524288)) {
|
|
101869
|
-
typeParameterNodes = factory.createNodeArray(
|
|
101925
|
+
typeParameterNodes = factory.createNodeArray(map26(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2), (tp) => typeParameterToDeclaration(tp, context)));
|
|
101870
101926
|
}
|
|
101871
101927
|
return typeParameterNodes;
|
|
101872
101928
|
}
|
|
@@ -101891,7 +101947,7 @@ ${lanes.join("\n")}
|
|
|
101891
101947
|
const params = getTypeParametersOfClassOrInterface(
|
|
101892
101948
|
parentSymbol.flags & 2097152 ? resolveAlias(parentSymbol) : parentSymbol
|
|
101893
101949
|
);
|
|
101894
|
-
typeParameterNodes = mapToTypeNodes(
|
|
101950
|
+
typeParameterNodes = mapToTypeNodes(map26(params, (t2) => getMappedType(t2, nextSymbol.links.mapper)), context);
|
|
101895
101951
|
} else {
|
|
101896
101952
|
typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol2, context);
|
|
101897
101953
|
}
|
|
@@ -102714,7 +102770,7 @@ ${lanes.join("\n")}
|
|
|
102714
102770
|
}
|
|
102715
102771
|
function getNamesOfDeclaration(statement) {
|
|
102716
102772
|
if (isVariableStatement(statement)) {
|
|
102717
|
-
return filter3(
|
|
102773
|
+
return filter3(map26(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined);
|
|
102718
102774
|
}
|
|
102719
102775
|
return filter3([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
|
|
102720
102776
|
}
|
|
@@ -102740,7 +102796,7 @@ ${lanes.join("\n")}
|
|
|
102740
102796
|
void 0,
|
|
102741
102797
|
/*isTypeOnly*/
|
|
102742
102798
|
false,
|
|
102743
|
-
factory.createNamedExports(
|
|
102799
|
+
factory.createNamedExports(map26(flatMap(excessExports, (e2) => getNamesOfDeclaration(e2)), (id) => factory.createExportSpecifier(
|
|
102744
102800
|
/*isTypeOnly*/
|
|
102745
102801
|
false,
|
|
102746
102802
|
/*propertyName*/
|
|
@@ -103160,7 +103216,7 @@ ${lanes.join("\n")}
|
|
|
103160
103216
|
var _a22;
|
|
103161
103217
|
const aliasType = getDeclaredTypeOfTypeAlias(symbol2);
|
|
103162
103218
|
const typeParams = getSymbolLinks(symbol2).typeParameters;
|
|
103163
|
-
const typeParamDecls =
|
|
103219
|
+
const typeParamDecls = map26(typeParams, (p) => typeParameterToDeclaration(p, context));
|
|
103164
103220
|
const jsdocAliasDecl = (_a22 = symbol2.declarations) == null ? void 0 : _a22.find(isJSDocTypeAlias);
|
|
103165
103221
|
const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
|
|
103166
103222
|
const restoreFlags = saveRestoreFlags(context);
|
|
@@ -103191,7 +103247,7 @@ ${lanes.join("\n")}
|
|
|
103191
103247
|
context.approximateLength += 14 + internalSymbolName.length;
|
|
103192
103248
|
const interfaceType = getDeclaredTypeOfClassOrInterface(symbol2);
|
|
103193
103249
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
103194
|
-
const typeParamDecls =
|
|
103250
|
+
const typeParamDecls = map26(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
103195
103251
|
const baseTypes = getBaseTypes(interfaceType);
|
|
103196
103252
|
const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0;
|
|
103197
103253
|
const members = serializePropertySymbolsForClassOrInterface(
|
|
@@ -103504,7 +103560,7 @@ ${lanes.join("\n")}
|
|
|
103504
103560
|
addingDeclare = oldAddingDeclare;
|
|
103505
103561
|
const declarations = results;
|
|
103506
103562
|
results = oldResults;
|
|
103507
|
-
const defaultReplaced =
|
|
103563
|
+
const defaultReplaced = map26(declarations, (d) => isExportAssignment(d) && !d.isExportEquals && isIdentifier(d.expression) ? factory.createExportDeclaration(
|
|
103508
103564
|
/*modifiers*/
|
|
103509
103565
|
void 0,
|
|
103510
103566
|
/*isTypeOnly*/
|
|
@@ -103523,7 +103579,7 @@ ${lanes.join("\n")}
|
|
|
103523
103579
|
d,
|
|
103524
103580
|
32
|
|
103525
103581
|
/* Export */
|
|
103526
|
-
)) ?
|
|
103582
|
+
)) ? map26(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
103527
103583
|
fakespace = factory.updateModuleDeclaration(
|
|
103528
103584
|
fakespace,
|
|
103529
103585
|
fakespace.modifiers,
|
|
@@ -103571,7 +103627,7 @@ ${lanes.join("\n")}
|
|
|
103571
103627
|
}
|
|
103572
103628
|
return cleanup(factory.createExpressionWithTypeArguments(
|
|
103573
103629
|
expr,
|
|
103574
|
-
|
|
103630
|
+
map26(e2.typeArguments, (a) => syntacticNodeBuilder.tryReuseExistingTypeNode(context, a) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context))
|
|
103575
103631
|
));
|
|
103576
103632
|
function cleanup(result2) {
|
|
103577
103633
|
context.enclosingDeclaration = oldEnclosing;
|
|
@@ -103590,7 +103646,7 @@ ${lanes.join("\n")}
|
|
|
103590
103646
|
const oldEnclosing = context.enclosingDeclaration;
|
|
103591
103647
|
context.enclosingDeclaration = originalDecl || oldEnclosing;
|
|
103592
103648
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
103593
|
-
const typeParamDecls =
|
|
103649
|
+
const typeParamDecls = map26(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
103594
103650
|
forEach(localParams, (p) => context.approximateLength += symbolName(p.symbol).length);
|
|
103595
103651
|
const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol2));
|
|
103596
103652
|
const baseTypes = getBaseTypes(classType);
|
|
@@ -103601,7 +103657,7 @@ ${lanes.join("\n")}
|
|
|
103601
103657
|
const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType2;
|
|
103602
103658
|
context.approximateLength += (length(baseTypes) ? 8 : 0) + (length(implementsExpressions) ? 11 : 0);
|
|
103603
103659
|
const heritageClauses = [
|
|
103604
|
-
...!length(baseTypes) ? [] : [factory.createHeritageClause(96,
|
|
103660
|
+
...!length(baseTypes) ? [] : [factory.createHeritageClause(96, map26(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))],
|
|
103605
103661
|
...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119, implementsExpressions)]
|
|
103606
103662
|
];
|
|
103607
103663
|
const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
@@ -104430,7 +104486,7 @@ ${lanes.join("\n")}
|
|
|
104430
104486
|
let typeArgs;
|
|
104431
104487
|
let reference;
|
|
104432
104488
|
if (t2.target && isSymbolAccessibleByFlags(t2.target.symbol, enclosingDeclaration, flags)) {
|
|
104433
|
-
typeArgs =
|
|
104489
|
+
typeArgs = map26(getTypeArguments(t2), (t22) => typeToTypeNodeHelper(t22, context));
|
|
104434
104490
|
reference = symbolToExpression(
|
|
104435
104491
|
t2.target.symbol,
|
|
104436
104492
|
context,
|
|
@@ -104894,7 +104950,7 @@ ${lanes.join("\n")}
|
|
|
104894
104950
|
}
|
|
104895
104951
|
function getTypeOfPrototypeProperty(prototype) {
|
|
104896
104952
|
const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
|
|
104897
|
-
return classType.typeParameters ? createTypeReference(classType,
|
|
104953
|
+
return classType.typeParameters ? createTypeReference(classType, map26(classType.typeParameters, (_2) => anyType2)) : classType;
|
|
104898
104954
|
}
|
|
104899
104955
|
function getTypeOfPropertyOfType(type, name2) {
|
|
104900
104956
|
const prop = getPropertyOfType(type, name2);
|
|
@@ -104942,7 +104998,7 @@ ${lanes.join("\n")}
|
|
|
104942
104998
|
if (source.flags & 1048576) {
|
|
104943
104999
|
return mapType2(source, (t2) => getRestType(t2, properties, symbol2));
|
|
104944
105000
|
}
|
|
104945
|
-
let omitKeyType = getUnionType(
|
|
105001
|
+
let omitKeyType = getUnionType(map26(properties, getLiteralTypeFromPropertyName));
|
|
104946
105002
|
const spreadableProperties = [];
|
|
104947
105003
|
const unspreadableToRestKeys = [];
|
|
104948
105004
|
for (const prop of getPropertiesOfType(source)) {
|
|
@@ -105668,9 +105724,9 @@ ${lanes.join("\n")}
|
|
|
105668
105724
|
if (elements.length === 0 || elements.length === 1 && restElement) {
|
|
105669
105725
|
return languageVersion >= 2 ? createIterableType(anyType2) : anyArrayType;
|
|
105670
105726
|
}
|
|
105671
|
-
const elementTypes =
|
|
105727
|
+
const elementTypes = map26(elements, (e2) => isOmittedExpression(e2) ? anyType2 : getTypeFromBindingElement(e2, includePatternInType, reportErrors2));
|
|
105672
105728
|
const minLength = findLastIndex(elements, (e2) => !(e2 === restElement || isOmittedExpression(e2) || hasDefaultValue(e2)), elements.length - 1) + 1;
|
|
105673
|
-
const elementFlags =
|
|
105729
|
+
const elementFlags = map26(
|
|
105674
105730
|
elements,
|
|
105675
105731
|
(e2, i2) => e2 === restElement ? 4 : i2 >= minLength ? 2 : 1
|
|
105676
105732
|
/* Required */
|
|
@@ -106352,7 +106408,7 @@ ${lanes.join("\n")}
|
|
|
106352
106408
|
}
|
|
106353
106409
|
function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
|
|
106354
106410
|
const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
|
|
106355
|
-
const typeArguments =
|
|
106411
|
+
const typeArguments = map26(typeArgumentNodes, getTypeFromTypeNode);
|
|
106356
106412
|
return sameMap(signatures, (sig) => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments, isInJSFile(location)) : sig);
|
|
106357
106413
|
}
|
|
106358
106414
|
function getBaseConstructorTypeOfClass(type) {
|
|
@@ -107183,14 +107239,14 @@ ${lanes.join("\n")}
|
|
|
107183
107239
|
if (isTupleType(restType)) {
|
|
107184
107240
|
return [expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol)];
|
|
107185
107241
|
} else if (!skipUnionExpanding && restType.flags & 1048576 && every(restType.types, isTupleType)) {
|
|
107186
|
-
return
|
|
107242
|
+
return map26(restType.types, (t2) => expandSignatureParametersWithTupleMembers(t2, restIndex, restSymbol));
|
|
107187
107243
|
}
|
|
107188
107244
|
}
|
|
107189
107245
|
return [sig.parameters];
|
|
107190
107246
|
function expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol) {
|
|
107191
107247
|
const elementTypes = getTypeArguments(restType);
|
|
107192
107248
|
const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restSymbol);
|
|
107193
|
-
const restParams =
|
|
107249
|
+
const restParams = map26(elementTypes, (t2, i2) => {
|
|
107194
107250
|
const name2 = associatedNames && associatedNames[i2] ? associatedNames[i2] : getParameterNameAtPosition(sig, restIndex + i2, restType);
|
|
107195
107251
|
const flags = restType.target.elementFlags[i2];
|
|
107196
107252
|
const checkFlags = flags & 12 ? 32768 : flags & 2 ? 16384 : 0;
|
|
@@ -107201,7 +107257,7 @@ ${lanes.join("\n")}
|
|
|
107201
107257
|
return concatenate(sig.parameters.slice(0, restIndex), restParams);
|
|
107202
107258
|
}
|
|
107203
107259
|
function getUniqAssociatedNamesFromTupleType(type, restSymbol) {
|
|
107204
|
-
const names =
|
|
107260
|
+
const names = map26(type.target.labeledElementDeclarations, (labeledElement, i2) => getTupleElementLabel(labeledElement, i2, type.target.elementFlags[i2], restSymbol));
|
|
107205
107261
|
if (names) {
|
|
107206
107262
|
const duplicates = [];
|
|
107207
107263
|
const uniqueNames = /* @__PURE__ */ new Set();
|
|
@@ -107372,7 +107428,7 @@ ${lanes.join("\n")}
|
|
|
107372
107428
|
if (signatures !== masterList) {
|
|
107373
107429
|
const signature = signatures[0];
|
|
107374
107430
|
Debug.assert(!!signature, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass");
|
|
107375
|
-
results = !!signature.typeParameters && some(results, (s2) => !!s2.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s2.typeParameters)) ? void 0 :
|
|
107431
|
+
results = !!signature.typeParameters && some(results, (s2) => !!s2.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s2.typeParameters)) ? void 0 : map26(results, (sig) => combineSignaturesOfUnionMembers(sig, signature));
|
|
107376
107432
|
if (!results) {
|
|
107377
107433
|
break;
|
|
107378
107434
|
}
|
|
@@ -107495,7 +107551,7 @@ ${lanes.join("\n")}
|
|
|
107495
107551
|
for (const info of sourceInfos) {
|
|
107496
107552
|
const indexType = info.keyType;
|
|
107497
107553
|
if (every(types3, (t2) => !!getIndexInfoOfType(t2, indexType))) {
|
|
107498
|
-
result.push(createIndexInfo(indexType, getUnionType(
|
|
107554
|
+
result.push(createIndexInfo(indexType, getUnionType(map26(types3, (t2) => getIndexTypeOfType(t2, indexType))), some(types3, (t2) => getIndexInfoOfType(t2, indexType).isReadonly)));
|
|
107499
107555
|
}
|
|
107500
107556
|
}
|
|
107501
107557
|
return result;
|
|
@@ -107503,12 +107559,12 @@ ${lanes.join("\n")}
|
|
|
107503
107559
|
return emptyArray;
|
|
107504
107560
|
}
|
|
107505
107561
|
function resolveUnionTypeMembers(type) {
|
|
107506
|
-
const callSignatures = getUnionSignatures(
|
|
107562
|
+
const callSignatures = getUnionSignatures(map26(type.types, (t2) => t2 === globalFunctionType ? [unknownSignature] : getSignaturesOfType(
|
|
107507
107563
|
t2,
|
|
107508
107564
|
0
|
|
107509
107565
|
/* Call */
|
|
107510
107566
|
)));
|
|
107511
|
-
const constructSignatures = getUnionSignatures(
|
|
107567
|
+
const constructSignatures = getUnionSignatures(map26(type.types, (t2) => getSignaturesOfType(
|
|
107512
107568
|
t2,
|
|
107513
107569
|
1
|
|
107514
107570
|
/* Construct */
|
|
@@ -107525,7 +107581,7 @@ ${lanes.join("\n")}
|
|
|
107525
107581
|
1
|
|
107526
107582
|
/* Construct */
|
|
107527
107583
|
).length > 0);
|
|
107528
|
-
const mixinFlags =
|
|
107584
|
+
const mixinFlags = map26(types3, isMixinConstructorType);
|
|
107529
107585
|
if (constructorTypeCount > 0 && constructorTypeCount === countWhere(mixinFlags, (b) => b)) {
|
|
107530
107586
|
const firstMixinIndex = mixinFlags.indexOf(
|
|
107531
107587
|
/*searchElement*/
|
|
@@ -107566,7 +107622,7 @@ ${lanes.join("\n")}
|
|
|
107566
107622
|
/* Construct */
|
|
107567
107623
|
);
|
|
107568
107624
|
if (signatures.length && mixinCount > 0) {
|
|
107569
|
-
signatures =
|
|
107625
|
+
signatures = map26(signatures, (s2) => {
|
|
107570
107626
|
const clone22 = cloneSignature(s2);
|
|
107571
107627
|
clone22.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s2), types3, mixinFlags, i2);
|
|
107572
107628
|
return clone22;
|
|
@@ -108355,7 +108411,7 @@ ${lanes.join("\n")}
|
|
|
108355
108411
|
return getBaseConstraint(getSubstitutionIntersection(t2));
|
|
108356
108412
|
}
|
|
108357
108413
|
if (isGenericTupleType(t2)) {
|
|
108358
|
-
const newElements =
|
|
108414
|
+
const newElements = map26(getElementTypes(t2), (v, i2) => {
|
|
108359
108415
|
const constraint = v.flags & 262144 && t2.target.elementFlags[i2] & 8 && getBaseConstraint(v) || v;
|
|
108360
108416
|
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
|
108361
108417
|
});
|
|
@@ -108791,7 +108847,7 @@ ${lanes.join("\n")}
|
|
|
108791
108847
|
}
|
|
108792
108848
|
}
|
|
108793
108849
|
}
|
|
108794
|
-
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(
|
|
108850
|
+
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(map26(applicableInfos, (info) => info.type)), reduceLeft(
|
|
108795
108851
|
applicableInfos,
|
|
108796
108852
|
(isReadonly, info) => isReadonly && info.isReadonly,
|
|
108797
108853
|
/*initial*/
|
|
@@ -109191,7 +109247,7 @@ ${lanes.join("\n")}
|
|
|
109191
109247
|
return errorType;
|
|
109192
109248
|
}
|
|
109193
109249
|
let type = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) : signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(
|
|
109194
|
-
|
|
109250
|
+
map26(signature.compositeSignatures, getReturnTypeOfSignature),
|
|
109195
109251
|
signature.compositeKind,
|
|
109196
109252
|
2
|
|
109197
109253
|
/* Subtype */
|
|
@@ -109330,7 +109386,7 @@ ${lanes.join("\n")}
|
|
|
109330
109386
|
function createCanonicalSignature(signature) {
|
|
109331
109387
|
return getSignatureInstantiation(
|
|
109332
109388
|
signature,
|
|
109333
|
-
|
|
109389
|
+
map26(signature.typeParameters, (tp) => tp.target && !getConstraintOfTypeParameter(tp.target) ? tp.target : tp),
|
|
109334
109390
|
isInJSFile(signature.declaration)
|
|
109335
109391
|
);
|
|
109336
109392
|
}
|
|
@@ -109341,8 +109397,8 @@ ${lanes.join("\n")}
|
|
|
109341
109397
|
return signature.baseSignatureCache;
|
|
109342
109398
|
}
|
|
109343
109399
|
const typeEraser = createTypeEraser(typeParameters);
|
|
109344
|
-
const baseConstraintMapper = createTypeMapper(typeParameters,
|
|
109345
|
-
let baseConstraints =
|
|
109400
|
+
const baseConstraintMapper = createTypeMapper(typeParameters, map26(typeParameters, (tp) => getConstraintOfTypeParameter(tp) || unknownType2));
|
|
109401
|
+
let baseConstraints = map26(typeParameters, (tp) => instantiateType(tp, baseConstraintMapper) || unknownType2);
|
|
109346
109402
|
for (let i2 = 0; i2 < typeParameters.length - 1; i2++) {
|
|
109347
109403
|
baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper);
|
|
109348
109404
|
}
|
|
@@ -109612,7 +109668,7 @@ ${lanes.join("\n")}
|
|
|
109612
109668
|
return concatenate(type.target.outerTypeParameters, (_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray;
|
|
109613
109669
|
}
|
|
109614
109670
|
const node = type.node;
|
|
109615
|
-
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
109671
|
+
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map26(node.elements, getTypeFromTypeNode);
|
|
109616
109672
|
if (popTypeResolution()) {
|
|
109617
109673
|
type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
|
|
109618
109674
|
} else {
|
|
@@ -110018,7 +110074,7 @@ ${lanes.join("\n")}
|
|
|
110018
110074
|
return links.resolvedType;
|
|
110019
110075
|
}
|
|
110020
110076
|
function typeArgumentsFromTypeReferenceNode(node) {
|
|
110021
|
-
return
|
|
110077
|
+
return map26(node.typeArguments, getTypeFromTypeNode);
|
|
110022
110078
|
}
|
|
110023
110079
|
function getTypeFromTypeQueryNode(node) {
|
|
110024
110080
|
const links = getNodeLinks(node);
|
|
@@ -110491,8 +110547,8 @@ ${lanes.join("\n")}
|
|
|
110491
110547
|
if (elementType) {
|
|
110492
110548
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
110493
110549
|
}
|
|
110494
|
-
const elementFlags =
|
|
110495
|
-
return getTupleTargetType(elementFlags, readonly2,
|
|
110550
|
+
const elementFlags = map26(node.elements, getTupleElementFlags);
|
|
110551
|
+
return getTupleTargetType(elementFlags, readonly2, map26(node.elements, memberIfLabeledElementDeclaration));
|
|
110496
110552
|
}
|
|
110497
110553
|
function memberIfLabeledElementDeclaration(member) {
|
|
110498
110554
|
return isNamedTupleMember(member) || isParameter(member) ? member : void 0;
|
|
@@ -110565,7 +110621,7 @@ ${lanes.join("\n")}
|
|
|
110565
110621
|
void 0
|
|
110566
110622
|
);
|
|
110567
110623
|
} else {
|
|
110568
|
-
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
110624
|
+
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map26(node.elements, getTypeFromTypeNode);
|
|
110569
110625
|
links.resolvedType = createNormalizedTypeReference(target, elementTypes);
|
|
110570
110626
|
}
|
|
110571
110627
|
}
|
|
@@ -110575,7 +110631,7 @@ ${lanes.join("\n")}
|
|
|
110575
110631
|
return isTypeOperatorNode(node) && node.operator === 148;
|
|
110576
110632
|
}
|
|
110577
110633
|
function createTupleType(elementTypes, elementFlags, readonly2 = false, namedMemberDeclarations = []) {
|
|
110578
|
-
const tupleTarget = getTupleTargetType(elementFlags ||
|
|
110634
|
+
const tupleTarget = getTupleTargetType(elementFlags || map26(
|
|
110579
110635
|
elementTypes,
|
|
110580
110636
|
(_2) => 1
|
|
110581
110637
|
/* Required */
|
|
@@ -110586,7 +110642,7 @@ ${lanes.join("\n")}
|
|
|
110586
110642
|
if (elementFlags.length === 1 && elementFlags[0] & 4) {
|
|
110587
110643
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
110588
110644
|
}
|
|
110589
|
-
const key =
|
|
110645
|
+
const key = map26(elementFlags, (f3) => f3 & 1 ? "#" : f3 & 2 ? "?" : f3 & 4 ? "." : "*").join() + (readonly2 ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map26(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
110590
110646
|
let type = tupleTypes.get(key);
|
|
110591
110647
|
if (!type) {
|
|
110592
110648
|
tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly2, namedMemberDeclarations));
|
|
@@ -110661,7 +110717,7 @@ ${lanes.join("\n")}
|
|
|
110661
110717
|
if (target.combinedFlags & 8) {
|
|
110662
110718
|
const unionIndex = findIndex(elementTypes, (t2, i2) => !!(target.elementFlags[i2] & 8 && t2.flags & (131072 | 1048576)));
|
|
110663
110719
|
if (unionIndex >= 0) {
|
|
110664
|
-
return checkCrossProductUnion(
|
|
110720
|
+
return checkCrossProductUnion(map26(elementTypes, (t2, i2) => target.elementFlags[i2] & 8 ? t2 : unknownType2)) ? mapType2(elementTypes[unionIndex], (t2) => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t2))) : errorType;
|
|
110665
110721
|
}
|
|
110666
110722
|
}
|
|
110667
110723
|
const expandedTypes = [];
|
|
@@ -110831,7 +110887,7 @@ ${lanes.join("\n")}
|
|
|
110831
110887
|
const source = types3[i2];
|
|
110832
110888
|
if (hasEmptyObject || source.flags & 469499904) {
|
|
110833
110889
|
if (source.flags & 262144 && getBaseConstraintOrType(source).flags & 1048576) {
|
|
110834
|
-
if (isTypeRelatedTo(source, getUnionType(
|
|
110890
|
+
if (isTypeRelatedTo(source, getUnionType(map26(types3, (t2) => t2 === source ? neverType2 : t2)), strictSubtypeRelation)) {
|
|
110835
110891
|
orderedRemoveItemAt(types3, i2);
|
|
110836
110892
|
}
|
|
110837
110893
|
continue;
|
|
@@ -111094,7 +111150,7 @@ ${lanes.join("\n")}
|
|
|
111094
111150
|
const links = getNodeLinks(node);
|
|
111095
111151
|
if (!links.resolvedType) {
|
|
111096
111152
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
111097
|
-
links.resolvedType = getUnionType(
|
|
111153
|
+
links.resolvedType = getUnionType(map26(node.types, getTypeFromTypeNode), 1, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
111098
111154
|
}
|
|
111099
111155
|
return links.resolvedType;
|
|
111100
111156
|
}
|
|
@@ -111377,7 +111433,7 @@ ${lanes.join("\n")}
|
|
|
111377
111433
|
const links = getNodeLinks(node);
|
|
111378
111434
|
if (!links.resolvedType) {
|
|
111379
111435
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
111380
|
-
const types3 =
|
|
111436
|
+
const types3 = map26(node.types, getTypeFromTypeNode);
|
|
111381
111437
|
const emptyIndex = types3.length === 2 ? types3.indexOf(emptyTypeLiteralType) : -1;
|
|
111382
111438
|
const t2 = emptyIndex >= 0 ? types3[1 - emptyIndex] : unknownType2;
|
|
111383
111439
|
const noSupertypeReduction = !!(t2.flags & (4 | 8 | 64) || t2.flags & 134217728 && isPatternLiteralType(t2));
|
|
@@ -111486,8 +111542,8 @@ ${lanes.join("\n")}
|
|
|
111486
111542
|
}
|
|
111487
111543
|
function getLiteralTypeFromProperties(type, include, includeOrigin) {
|
|
111488
111544
|
const origin = includeOrigin && (getObjectFlags(type) & (3 | 4) || type.aliasSymbol) ? createOriginIndexType(type) : void 0;
|
|
111489
|
-
const propertyTypes =
|
|
111490
|
-
const indexKeyTypes =
|
|
111545
|
+
const propertyTypes = map26(getPropertiesOfType(type), (prop) => getLiteralTypeFromProperty(prop, include));
|
|
111546
|
+
const indexKeyTypes = map26(getIndexInfosOfType(type), (info) => info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ? info.keyType === stringType2 && include & 8 ? stringOrNumberType : info.keyType : neverType2);
|
|
111491
111547
|
return getUnionType(
|
|
111492
111548
|
concatenate(propertyTypes, indexKeyTypes),
|
|
111493
111549
|
1,
|
|
@@ -111507,7 +111563,7 @@ ${lanes.join("\n")}
|
|
|
111507
111563
|
}
|
|
111508
111564
|
function getIndexType(type, indexFlags = 0) {
|
|
111509
111565
|
type = getReducedType(type);
|
|
111510
|
-
return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 ? getIntersectionType(
|
|
111566
|
+
return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 ? getIntersectionType(map26(type.types, (t2) => getIndexType(t2, indexFlags))) : type.flags & 2097152 ? getUnionType(map26(type.types, (t2) => getIndexType(t2, indexFlags))) : getObjectFlags(type) & 32 ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 ? neverType2 : type.flags & (1 | 131072) ? stringNumberSymbolType : getLiteralTypeFromProperties(
|
|
111511
111567
|
type,
|
|
111512
111568
|
(indexFlags & 2 ? 128 : 402653316) | (indexFlags & 1 ? 0 : 296 | 12288),
|
|
111513
111569
|
indexFlags === 0
|
|
@@ -111545,8 +111601,8 @@ ${lanes.join("\n")}
|
|
|
111545
111601
|
const links = getNodeLinks(node);
|
|
111546
111602
|
if (!links.resolvedType) {
|
|
111547
111603
|
links.resolvedType = getTemplateLiteralType(
|
|
111548
|
-
[node.head.text, ...
|
|
111549
|
-
|
|
111604
|
+
[node.head.text, ...map26(node.templateSpans, (span) => span.literal.text)],
|
|
111605
|
+
map26(node.templateSpans, (span) => getTypeFromTypeNode(span.type))
|
|
111550
111606
|
);
|
|
111551
111607
|
}
|
|
111552
111608
|
return links.resolvedType;
|
|
@@ -111577,7 +111633,7 @@ ${lanes.join("\n")}
|
|
|
111577
111633
|
return newTypes[0];
|
|
111578
111634
|
}
|
|
111579
111635
|
}
|
|
111580
|
-
const id = `${getTypeListId(newTypes)}|${
|
|
111636
|
+
const id = `${getTypeListId(newTypes)}|${map26(newTexts, (t2) => t2.length).join(",")}|${newTexts.join("")}`;
|
|
111581
111637
|
let type = templateLiteralTypes.get(id);
|
|
111582
111638
|
if (!type) {
|
|
111583
111639
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -111807,7 +111863,7 @@ ${lanes.join("\n")}
|
|
|
111807
111863
|
diagnostics.add(createDiagnosticForNode(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, indexType.value, typeToString(objectType2)));
|
|
111808
111864
|
return undefinedType2;
|
|
111809
111865
|
} else if (indexType.flags & (8 | 4)) {
|
|
111810
|
-
const types3 =
|
|
111866
|
+
const types3 = map26(objectType2.properties, (property) => {
|
|
111811
111867
|
return getTypeOfSymbol(property);
|
|
111812
111868
|
});
|
|
111813
111869
|
return getUnionType(append(types3, undefinedType2));
|
|
@@ -111968,13 +112024,13 @@ ${lanes.join("\n")}
|
|
|
111968
112024
|
}
|
|
111969
112025
|
function distributeIndexOverObjectType(objectType2, indexType, writing) {
|
|
111970
112026
|
if (objectType2.flags & 1048576 || objectType2.flags & 2097152 && !shouldDeferIndexType(objectType2)) {
|
|
111971
|
-
const types3 =
|
|
112027
|
+
const types3 = map26(objectType2.types, (t2) => getSimplifiedType(getIndexedAccessType(t2, indexType), writing));
|
|
111972
112028
|
return objectType2.flags & 2097152 || writing ? getIntersectionType(types3) : getUnionType(types3);
|
|
111973
112029
|
}
|
|
111974
112030
|
}
|
|
111975
112031
|
function distributeObjectOverIndexType(objectType2, indexType, writing) {
|
|
111976
112032
|
if (indexType.flags & 1048576) {
|
|
111977
|
-
const types3 =
|
|
112033
|
+
const types3 = map26(indexType.types, (t2) => getSimplifiedType(getIndexedAccessType(objectType2, t2), writing));
|
|
111978
112034
|
return writing ? getIntersectionType(types3) : getUnionType(types3);
|
|
111979
112035
|
}
|
|
111980
112036
|
}
|
|
@@ -112257,7 +112313,7 @@ ${lanes.join("\n")}
|
|
|
112257
112313
|
const newRoot = newType.root;
|
|
112258
112314
|
if (newRoot.outerTypeParameters) {
|
|
112259
112315
|
const typeParamMapper = combineTypeMappers(newType.mapper, newMapper);
|
|
112260
|
-
const typeArguments =
|
|
112316
|
+
const typeArguments = map26(newRoot.outerTypeParameters, (t2) => getMappedType(t2, typeParamMapper));
|
|
112261
112317
|
const newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments);
|
|
112262
112318
|
const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : void 0;
|
|
112263
112319
|
if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 | 131072))) {
|
|
@@ -112918,7 +112974,7 @@ ${lanes.join("\n")}
|
|
|
112918
112974
|
}
|
|
112919
112975
|
function createBackreferenceMapper(context, index) {
|
|
112920
112976
|
const forwardInferences = context.inferences.slice(index);
|
|
112921
|
-
return createTypeMapper(
|
|
112977
|
+
return createTypeMapper(map26(forwardInferences, (i2) => i2.typeParameter), map26(forwardInferences, () => unknownType2));
|
|
112922
112978
|
}
|
|
112923
112979
|
function createOuterReturnMapper(context) {
|
|
112924
112980
|
return context.outerReturnMapper ?? (context.outerReturnMapper = mergeTypeMappers(context.returnMapper, cloneInferenceContext(context).mapper));
|
|
@@ -112949,7 +113005,7 @@ ${lanes.join("\n")}
|
|
|
112949
113005
|
function instantiateSignature(signature, mapper, eraseTypeParameters) {
|
|
112950
113006
|
let freshTypeParameters;
|
|
112951
113007
|
if (signature.typeParameters && !eraseTypeParameters) {
|
|
112952
|
-
freshTypeParameters =
|
|
113008
|
+
freshTypeParameters = map26(signature.typeParameters, cloneTypeParameter);
|
|
112953
113009
|
mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper);
|
|
112954
113010
|
for (const tp of freshTypeParameters) {
|
|
112955
113011
|
tp.mapper = mapper;
|
|
@@ -113021,7 +113077,7 @@ ${lanes.join("\n")}
|
|
|
113021
113077
|
}
|
|
113022
113078
|
if (typeParameters.length) {
|
|
113023
113079
|
const combinedMapper = combineTypeMappers(type.mapper, mapper);
|
|
113024
|
-
const typeArguments =
|
|
113080
|
+
const typeArguments = map26(typeParameters, (t2) => getMappedType(t2, combinedMapper));
|
|
113025
113081
|
const newAliasSymbol = aliasSymbol || type.aliasSymbol;
|
|
113026
113082
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
|
|
113027
113083
|
const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments);
|
|
@@ -113133,7 +113189,7 @@ ${lanes.join("\n")}
|
|
|
113133
113189
|
return instantiateMappedTupleType(t2, type, typeVariable, mapper);
|
|
113134
113190
|
}
|
|
113135
113191
|
if (isArrayOrTupleOrIntersection(t2)) {
|
|
113136
|
-
return getIntersectionType(
|
|
113192
|
+
return getIntersectionType(map26(t2.types, instantiateConstituent));
|
|
113137
113193
|
}
|
|
113138
113194
|
}
|
|
113139
113195
|
return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t2, mapper));
|
|
@@ -113148,12 +113204,12 @@ ${lanes.join("\n")}
|
|
|
113148
113204
|
const elementFlags = tupleType2.target.elementFlags;
|
|
113149
113205
|
const fixedLength = tupleType2.target.fixedLength;
|
|
113150
113206
|
const fixedMapper = fixedLength ? prependTypeMapping(typeVariable, tupleType2, mapper) : mapper;
|
|
113151
|
-
const newElementTypes =
|
|
113207
|
+
const newElementTypes = map26(getElementTypes(tupleType2), (type, i2) => {
|
|
113152
113208
|
const flags = elementFlags[i2];
|
|
113153
113209
|
return i2 < fixedLength ? instantiateMappedTypeTemplate(mappedType, getStringLiteralType("" + i2), !!(flags & 2), fixedMapper) : flags & 8 ? instantiateType(mappedType, prependTypeMapping(typeVariable, type, mapper)) : getElementTypeOfArrayType(instantiateType(mappedType, prependTypeMapping(typeVariable, createArrayType(type), mapper))) ?? unknownType2;
|
|
113154
113210
|
});
|
|
113155
113211
|
const modifiers = getMappedTypeModifiers(mappedType);
|
|
113156
|
-
const newElementFlags = modifiers & 4 ?
|
|
113212
|
+
const newElementFlags = modifiers & 4 ? map26(elementFlags, (f3) => f3 & 1 ? 2 : f3) : modifiers & 8 ? map26(elementFlags, (f3) => f3 & 2 ? 1 : f3) : elementFlags;
|
|
113157
113213
|
const newReadonly = getModifiedReadonlyState(tupleType2.target.readonly, getMappedTypeModifiers(mappedType));
|
|
113158
113214
|
return contains(newElementTypes, errorType) ? errorType : createTupleType(newElementTypes, newElementFlags, newReadonly, tupleType2.target.labeledElementDeclarations);
|
|
113159
113215
|
}
|
|
@@ -113209,7 +113265,7 @@ ${lanes.join("\n")}
|
|
|
113209
113265
|
function getConditionalTypeInstantiation(type, mapper, forConstraint, aliasSymbol, aliasTypeArguments) {
|
|
113210
113266
|
const root = type.root;
|
|
113211
113267
|
if (root.outerTypeParameters) {
|
|
113212
|
-
const typeArguments =
|
|
113268
|
+
const typeArguments = map26(root.outerTypeParameters, (t2) => getMappedType(t2, mapper));
|
|
113213
113269
|
const id = (forConstraint ? "C" : "") + getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
113214
113270
|
let result = root.instantiations.get(id);
|
|
113215
113271
|
if (!result) {
|
|
@@ -113441,7 +113497,7 @@ ${lanes.join("\n")}
|
|
|
113441
113497
|
return result;
|
|
113442
113498
|
}
|
|
113443
113499
|
} else if (type.flags & 2097152) {
|
|
113444
|
-
return getIntersectionType(
|
|
113500
|
+
return getIntersectionType(map26(type.types, getTypeWithoutSignatures));
|
|
113445
113501
|
}
|
|
113446
113502
|
return type;
|
|
113447
113503
|
}
|
|
@@ -113597,7 +113653,7 @@ ${lanes.join("\n")}
|
|
|
113597
113653
|
}
|
|
113598
113654
|
const returnExpression = node.body;
|
|
113599
113655
|
const sourceReturn = getReturnTypeOfSignature(sourceSig);
|
|
113600
|
-
const targetReturn = getUnionType(
|
|
113656
|
+
const targetReturn = getUnionType(map26(targetSignatures, getReturnTypeOfSignature));
|
|
113601
113657
|
if (!checkTypeRelatedTo(
|
|
113602
113658
|
sourceReturn,
|
|
113603
113659
|
targetReturn,
|
|
@@ -116436,9 +116492,9 @@ ${lanes.join("\n")}
|
|
|
116436
116492
|
false
|
|
116437
116493
|
)) {
|
|
116438
116494
|
if (props.length > 5) {
|
|
116439
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2),
|
|
116495
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2), map26(props.slice(0, 4), (p) => symbolToString(p)).join(", "), props.length - 4);
|
|
116440
116496
|
} else {
|
|
116441
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2),
|
|
116497
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2), map26(props, (p) => symbolToString(p)).join(", "));
|
|
116442
116498
|
}
|
|
116443
116499
|
if (shouldSkipElaboration && errorInfo) {
|
|
116444
116500
|
overrideNextErrorInfo++;
|
|
@@ -118015,7 +118071,7 @@ ${lanes.join("\n")}
|
|
|
118015
118071
|
return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable);
|
|
118016
118072
|
}
|
|
118017
118073
|
function cloneInferenceContext(context, extraFlags = 0) {
|
|
118018
|
-
return context && createInferenceContextWorker(
|
|
118074
|
+
return context && createInferenceContextWorker(map26(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes);
|
|
118019
118075
|
}
|
|
118020
118076
|
function createInferenceContextWorker(inferences, signature, flags, compareTypes) {
|
|
118021
118077
|
const context = {
|
|
@@ -118033,8 +118089,8 @@ ${lanes.join("\n")}
|
|
|
118033
118089
|
}
|
|
118034
118090
|
function makeFixingMapperForContext(context) {
|
|
118035
118091
|
return makeDeferredTypeMapper(
|
|
118036
|
-
|
|
118037
|
-
|
|
118092
|
+
map26(context.inferences, (i2) => i2.typeParameter),
|
|
118093
|
+
map26(context.inferences, (inference, i2) => () => {
|
|
118038
118094
|
if (!inference.isFixed) {
|
|
118039
118095
|
inferFromIntraExpressionSites(context);
|
|
118040
118096
|
clearCachedInferences(context.inferences);
|
|
@@ -118046,8 +118102,8 @@ ${lanes.join("\n")}
|
|
|
118046
118102
|
}
|
|
118047
118103
|
function makeNonFixingMapperForContext(context) {
|
|
118048
118104
|
return makeDeferredTypeMapper(
|
|
118049
|
-
|
|
118050
|
-
|
|
118105
|
+
map26(context.inferences, (i2) => i2.typeParameter),
|
|
118106
|
+
map26(context.inferences, (_2, i2) => () => {
|
|
118051
118107
|
return getInferredType(context, i2);
|
|
118052
118108
|
})
|
|
118053
118109
|
);
|
|
@@ -118107,7 +118163,7 @@ ${lanes.join("\n")}
|
|
|
118107
118163
|
}
|
|
118108
118164
|
function cloneInferredPartOfContext(context) {
|
|
118109
118165
|
const inferences = filter3(context.inferences, hasInferenceCandidates);
|
|
118110
|
-
return inferences.length ? createInferenceContextWorker(
|
|
118166
|
+
return inferences.length ? createInferenceContextWorker(map26(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0;
|
|
118111
118167
|
}
|
|
118112
118168
|
function getMapperFromContext(context) {
|
|
118113
118169
|
return context && context.mapper;
|
|
@@ -118195,7 +118251,7 @@ ${lanes.join("\n")}
|
|
|
118195
118251
|
return createArrayType(elementType, isReadonlyArrayType(source));
|
|
118196
118252
|
}
|
|
118197
118253
|
if (isTupleType(source)) {
|
|
118198
|
-
const elementTypes =
|
|
118254
|
+
const elementTypes = map26(getElementTypes(source), (t2) => inferReverseMappedType(t2, target, constraint));
|
|
118199
118255
|
if (!every(elementTypes, (t2) => !!t2)) {
|
|
118200
118256
|
return void 0;
|
|
118201
118257
|
}
|
|
@@ -118365,7 +118421,7 @@ ${lanes.join("\n")}
|
|
|
118365
118421
|
return false;
|
|
118366
118422
|
}
|
|
118367
118423
|
function inferTypesFromTemplateLiteralType(source, target) {
|
|
118368
|
-
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ?
|
|
118424
|
+
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ? map26(source.types, (s2, i2) => {
|
|
118369
118425
|
return isTypeAssignableTo(getBaseConstraintOrType(s2), getBaseConstraintOrType(target.types[i2])) ? s2 : getStringLikeTypeForType(s2);
|
|
118370
118426
|
}) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0;
|
|
118371
118427
|
}
|
|
@@ -118829,8 +118885,8 @@ ${lanes.join("\n")}
|
|
|
118829
118885
|
if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) {
|
|
118830
118886
|
return true;
|
|
118831
118887
|
}
|
|
118832
|
-
const propTypes =
|
|
118833
|
-
const indexTypes =
|
|
118888
|
+
const propTypes = map26(getPropertiesOfType(source), getTypeOfSymbol);
|
|
118889
|
+
const indexTypes = map26(getIndexInfosOfType(source), (info) => info !== enumNumberIndexInfo ? info.type : neverType2);
|
|
118834
118890
|
inferFromTypes(getUnionType(concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target));
|
|
118835
118891
|
return true;
|
|
118836
118892
|
}
|
|
@@ -119429,7 +119485,7 @@ ${lanes.join("\n")}
|
|
|
119429
119485
|
return result;
|
|
119430
119486
|
}
|
|
119431
119487
|
function mapTypesByKeyProperty(types3, name2) {
|
|
119432
|
-
const
|
|
119488
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
119433
119489
|
let count = 0;
|
|
119434
119490
|
for (const type of types3) {
|
|
119435
119491
|
if (type.flags & (524288 | 2097152 | 58982400)) {
|
|
@@ -119441,11 +119497,11 @@ ${lanes.join("\n")}
|
|
|
119441
119497
|
let duplicate = false;
|
|
119442
119498
|
forEachType(discriminant, (t2) => {
|
|
119443
119499
|
const id = getTypeId(getRegularTypeOfLiteralType(t2));
|
|
119444
|
-
const existing =
|
|
119500
|
+
const existing = map27.get(id);
|
|
119445
119501
|
if (!existing) {
|
|
119446
|
-
|
|
119502
|
+
map27.set(id, type);
|
|
119447
119503
|
} else if (existing !== unknownType2) {
|
|
119448
|
-
|
|
119504
|
+
map27.set(id, unknownType2);
|
|
119449
119505
|
duplicate = true;
|
|
119450
119506
|
}
|
|
119451
119507
|
});
|
|
@@ -119453,7 +119509,7 @@ ${lanes.join("\n")}
|
|
|
119453
119509
|
}
|
|
119454
119510
|
}
|
|
119455
119511
|
}
|
|
119456
|
-
return count >= 10 && count * 2 >= types3.length ?
|
|
119512
|
+
return count >= 10 && count * 2 >= types3.length ? map27 : void 0;
|
|
119457
119513
|
}
|
|
119458
119514
|
function getKeyPropertyName(unionType2) {
|
|
119459
119515
|
const types3 = unionType2.types;
|
|
@@ -119917,7 +119973,7 @@ ${lanes.join("\n")}
|
|
|
119917
119973
|
) : type;
|
|
119918
119974
|
}
|
|
119919
119975
|
function mapTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
119920
|
-
return type.flags & 1048576 && aliasSymbol ? getUnionType(
|
|
119976
|
+
return type.flags & 1048576 && aliasSymbol ? getUnionType(map26(type.types, mapper), 1, aliasSymbol, aliasTypeArguments) : mapType2(type, mapper);
|
|
119921
119977
|
}
|
|
119922
119978
|
function extractTypesOfKind(type, kind) {
|
|
119923
119979
|
return filterType(type, (t2) => (t2.flags & kind) !== 0);
|
|
@@ -120685,7 +120741,7 @@ ${lanes.join("\n")}
|
|
|
120685
120741
|
}
|
|
120686
120742
|
function getUnionOrEvolvingArrayType(types3, subtypeReduction) {
|
|
120687
120743
|
if (isEvolvingArrayTypeList(types3)) {
|
|
120688
|
-
return getEvolvingArrayType(getUnionType(
|
|
120744
|
+
return getEvolvingArrayType(getUnionType(map26(types3, getElementTypeOfEvolvingArrayType)));
|
|
120689
120745
|
}
|
|
120690
120746
|
const result = recombineUnknownType(getUnionType(sameMap(types3, finalizeEvolvingArrayType), subtypeReduction));
|
|
120691
120747
|
if (result !== declaredType && result.flags & declaredType.flags & 1048576 && arrayIsEqualTo(result.types, declaredType.types)) {
|
|
@@ -120779,7 +120835,7 @@ ${lanes.join("\n")}
|
|
|
120779
120835
|
function narrowTypeBySwitchOnDiscriminantProperty(type, access, data) {
|
|
120780
120836
|
if (data.clauseStart < data.clauseEnd && type.flags & 1048576 && getKeyPropertyName(type) === getAccessedPropertyName(access)) {
|
|
120781
120837
|
const clauseTypes = getSwitchClauseTypes(data.switchStatement).slice(data.clauseStart, data.clauseEnd);
|
|
120782
|
-
const candidate = getUnionType(
|
|
120838
|
+
const candidate = getUnionType(map26(clauseTypes, (t2) => getConstituentTypeForKeyType(type, t2) || unknownType2));
|
|
120783
120839
|
if (candidate !== unknownType2) {
|
|
120784
120840
|
return candidate;
|
|
120785
120841
|
}
|
|
@@ -121207,7 +121263,7 @@ ${lanes.join("\n")}
|
|
|
121207
121263
|
return filterType(type, (t2) => getTypeFacts(t2, notEqualFacts) === notEqualFacts);
|
|
121208
121264
|
}
|
|
121209
121265
|
const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);
|
|
121210
|
-
return getUnionType(
|
|
121266
|
+
return getUnionType(map26(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType2));
|
|
121211
121267
|
}
|
|
121212
121268
|
function narrowTypeBySwitchOnTrue(type, { switchStatement, clauseStart, clauseEnd }) {
|
|
121213
121269
|
const defaultIndex = findIndex(
|
|
@@ -121242,7 +121298,7 @@ ${lanes.join("\n")}
|
|
|
121242
121298
|
return type;
|
|
121243
121299
|
}
|
|
121244
121300
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
121245
|
-
return getUnionType(
|
|
121301
|
+
return getUnionType(map26(clauses, (clause) => clause.kind === 297 ? narrowType(
|
|
121246
121302
|
type,
|
|
121247
121303
|
clause.expression,
|
|
121248
121304
|
/*assumeTrue*/
|
|
@@ -121334,7 +121390,7 @@ ${lanes.join("\n")}
|
|
|
121334
121390
|
/* Construct */
|
|
121335
121391
|
);
|
|
121336
121392
|
if (constructSignatures.length) {
|
|
121337
|
-
return getUnionType(
|
|
121393
|
+
return getUnionType(map26(constructSignatures, (signature) => getReturnTypeOfSignature(getErasedSignature(signature))));
|
|
121338
121394
|
}
|
|
121339
121395
|
return emptyObjectType;
|
|
121340
121396
|
}
|
|
@@ -123504,7 +123560,7 @@ ${lanes.join("\n")}
|
|
|
123504
123560
|
getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(
|
|
123505
123561
|
contextualType,
|
|
123506
123562
|
concatenate(
|
|
123507
|
-
|
|
123563
|
+
map26(
|
|
123508
123564
|
filter3(node.properties, (p) => {
|
|
123509
123565
|
if (!p.symbol) {
|
|
123510
123566
|
return false;
|
|
@@ -123519,7 +123575,7 @@ ${lanes.join("\n")}
|
|
|
123519
123575
|
}),
|
|
123520
123576
|
(prop) => [() => getContextFreeTypeOfExpression(prop.kind === 304 ? prop.initializer : prop.name), prop.symbol.escapedName]
|
|
123521
123577
|
),
|
|
123522
|
-
|
|
123578
|
+
map26(
|
|
123523
123579
|
filter3(getPropertiesOfType(contextualType), (s2) => {
|
|
123524
123580
|
var _a2;
|
|
123525
123581
|
return !!(s2.flags & 16777216) && !!((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members) && !node.symbol.members.has(s2.escapedName) && isDiscriminantProperty(contextualType, s2.escapedName);
|
|
@@ -123541,11 +123597,11 @@ ${lanes.join("\n")}
|
|
|
123541
123597
|
discriminateTypeByDiscriminableItems(
|
|
123542
123598
|
contextualType,
|
|
123543
123599
|
concatenate(
|
|
123544
|
-
|
|
123600
|
+
map26(
|
|
123545
123601
|
filter3(node.properties, (p) => !!p.symbol && p.kind === 292 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))),
|
|
123546
123602
|
(prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName]
|
|
123547
123603
|
),
|
|
123548
|
-
|
|
123604
|
+
map26(
|
|
123549
123605
|
filter3(getPropertiesOfType(contextualType), (s2) => {
|
|
123550
123606
|
var _a2;
|
|
123551
123607
|
if (!(s2.flags & 16777216) || !((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members)) {
|
|
@@ -123604,13 +123660,13 @@ ${lanes.join("\n")}
|
|
|
123604
123660
|
}
|
|
123605
123661
|
if (type.flags & 1048576) {
|
|
123606
123662
|
return getUnionType(
|
|
123607
|
-
|
|
123663
|
+
map26(type.types, (t2) => instantiateInstantiableTypes(t2, mapper)),
|
|
123608
123664
|
0
|
|
123609
123665
|
/* None */
|
|
123610
123666
|
);
|
|
123611
123667
|
}
|
|
123612
123668
|
if (type.flags & 2097152) {
|
|
123613
|
-
return getIntersectionType(
|
|
123669
|
+
return getIntersectionType(map26(type.types, (t2) => instantiateInstantiableTypes(t2, mapper)));
|
|
123614
123670
|
}
|
|
123615
123671
|
return type;
|
|
123616
123672
|
}
|
|
@@ -124940,7 +124996,7 @@ ${lanes.join("\n")}
|
|
|
124940
124996
|
);
|
|
124941
124997
|
}
|
|
124942
124998
|
if (signatures.length === 0 && apparentElemType.flags & 1048576) {
|
|
124943
|
-
signatures = getUnionSignatures(
|
|
124999
|
+
signatures = getUnionSignatures(map26(apparentElemType.types, (t2) => getUninstantiatedJsxSignaturesOfType(t2, caller)));
|
|
124944
125000
|
}
|
|
124945
125001
|
return signatures;
|
|
124946
125002
|
}
|
|
@@ -126414,7 +126470,7 @@ ${lanes.join("\n")}
|
|
|
126414
126470
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
126415
126471
|
const isJavascript = isInJSFile(signature.declaration);
|
|
126416
126472
|
const typeParameters = signature.typeParameters;
|
|
126417
|
-
const typeArgumentTypes = fillMissingTypeArguments(
|
|
126473
|
+
const typeArgumentTypes = fillMissingTypeArguments(map26(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript);
|
|
126418
126474
|
let mapper;
|
|
126419
126475
|
for (let i2 = 0; i2 < typeArgumentNodes.length; i2++) {
|
|
126420
126476
|
Debug.assert(typeParameters[i2] !== void 0, "Should not call checkTypeArguments with too many type arguments");
|
|
@@ -127095,7 +127151,7 @@ ${lanes.join("\n")}
|
|
|
127095
127151
|
const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
|
|
127096
127152
|
Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
127097
127153
|
let chain = chainDiagnosticMessages(
|
|
127098
|
-
|
|
127154
|
+
map26(diags, createDiagnosticMessageChainFromDiagnostic),
|
|
127099
127155
|
Diagnostics.No_overload_matches_this_call
|
|
127100
127156
|
);
|
|
127101
127157
|
if (headMessage) {
|
|
@@ -131663,7 +131719,7 @@ ${lanes.join("\n")}
|
|
|
131663
131719
|
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
131664
131720
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
131665
131721
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
131666
|
-
const inferences =
|
|
131722
|
+
const inferences = map26(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
131667
131723
|
applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
131668
131724
|
inferTypes(
|
|
131669
131725
|
inferences,
|
|
@@ -132611,7 +132667,7 @@ ${lanes.join("\n")}
|
|
|
132611
132667
|
return getEffectiveTypeArguments2(node, typeParameters)[index];
|
|
132612
132668
|
}
|
|
132613
132669
|
function getEffectiveTypeArguments2(node, typeParameters) {
|
|
132614
|
-
return fillMissingTypeArguments(
|
|
132670
|
+
return fillMissingTypeArguments(map26(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node));
|
|
132615
132671
|
}
|
|
132616
132672
|
function checkTypeArgumentConstraints(node, typeParameters) {
|
|
132617
132673
|
let typeArguments;
|
|
@@ -133257,7 +133313,7 @@ ${lanes.join("\n")}
|
|
|
133257
133313
|
return void 0;
|
|
133258
133314
|
}
|
|
133259
133315
|
const onfulfilledParameterType = getTypeWithFacts(
|
|
133260
|
-
getUnionType(
|
|
133316
|
+
getUnionType(map26(candidates, getTypeOfFirstParameterOfSignature)),
|
|
133261
133317
|
2097152
|
|
133262
133318
|
/* NEUndefinedOrNull */
|
|
133263
133319
|
);
|
|
@@ -133276,7 +133332,7 @@ ${lanes.join("\n")}
|
|
|
133276
133332
|
return void 0;
|
|
133277
133333
|
}
|
|
133278
133334
|
return typeAsPromise.promisedTypeOfPromise = getUnionType(
|
|
133279
|
-
|
|
133335
|
+
map26(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature),
|
|
133280
133336
|
2
|
|
133281
133337
|
/* Subtype */
|
|
133282
133338
|
);
|
|
@@ -134042,13 +134098,13 @@ ${lanes.join("\n")}
|
|
|
134042
134098
|
function isTypeParameterUnused(typeParameter) {
|
|
134043
134099
|
return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144) && !isIdentifierThatStartsWithUnderscore(typeParameter.name);
|
|
134044
134100
|
}
|
|
134045
|
-
function addToGroup(
|
|
134101
|
+
function addToGroup(map27, key, value, getKey) {
|
|
134046
134102
|
const keyString = String(getKey(key));
|
|
134047
|
-
const group2 =
|
|
134103
|
+
const group2 = map27.get(keyString);
|
|
134048
134104
|
if (group2) {
|
|
134049
134105
|
group2[1].push(value);
|
|
134050
134106
|
} else {
|
|
134051
|
-
|
|
134107
|
+
map27.set(keyString, [key, [value]]);
|
|
134052
134108
|
}
|
|
134053
134109
|
}
|
|
134054
134110
|
function tryGetRootParameterDeclaration(node) {
|
|
@@ -135275,7 +135331,7 @@ ${lanes.join("\n")}
|
|
|
135275
135331
|
}
|
|
135276
135332
|
return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes);
|
|
135277
135333
|
}
|
|
135278
|
-
const iteratorType = getIntersectionType(
|
|
135334
|
+
const iteratorType = getIntersectionType(map26(validSignatures, getReturnTypeOfSignature));
|
|
135279
135335
|
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
|
|
135280
135336
|
return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);
|
|
135281
135337
|
}
|
|
@@ -136494,7 +136550,7 @@ ${lanes.join("\n")}
|
|
|
136494
136550
|
error210(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first2(memberInfo.missedProperties), memberInfo.baseTypeName);
|
|
136495
136551
|
}
|
|
136496
136552
|
} else if (length(memberInfo.missedProperties) > 5) {
|
|
136497
|
-
const missedProperties =
|
|
136553
|
+
const missedProperties = map26(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
|
|
136498
136554
|
const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
|
|
136499
136555
|
if (isClassExpression(errorNode)) {
|
|
136500
136556
|
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);
|
|
@@ -136502,7 +136558,7 @@ ${lanes.join("\n")}
|
|
|
136502
136558
|
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);
|
|
136503
136559
|
}
|
|
136504
136560
|
} else {
|
|
136505
|
-
const missedProperties =
|
|
136561
|
+
const missedProperties = map26(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
|
|
136506
136562
|
if (isClassExpression(errorNode)) {
|
|
136507
136563
|
error210(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
|
|
136508
136564
|
} else {
|
|
@@ -138617,7 +138673,7 @@ ${lanes.join("\n")}
|
|
|
138617
138673
|
} else if (symbol2) {
|
|
138618
138674
|
const symbolLinks2 = getSymbolLinks(symbol2);
|
|
138619
138675
|
const declarationList = mapDefined(infos, (i2) => i2.declaration);
|
|
138620
|
-
const nodeListId =
|
|
138676
|
+
const nodeListId = map26(declarationList, getNodeId).join(",");
|
|
138621
138677
|
if (!symbolLinks2.filteredIndexSymbolCache) {
|
|
138622
138678
|
symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();
|
|
138623
138679
|
}
|
|
@@ -139873,7 +139929,7 @@ ${lanes.join("\n")}
|
|
|
139873
139929
|
const newComponents = filter3(info.components, (e2) => {
|
|
139874
139930
|
return !hasLateBindableName(e2);
|
|
139875
139931
|
});
|
|
139876
|
-
result.push(...
|
|
139932
|
+
result.push(...map26(newComponents, (e2) => {
|
|
139877
139933
|
trackComputedName(e2.name.expression);
|
|
139878
139934
|
const mods = infoList === staticInfos ? [factory.createModifier(
|
|
139879
139935
|
126
|
|
@@ -141836,7 +141892,7 @@ ${lanes.join("\n")}
|
|
|
141836
141892
|
if (sourceProperties) {
|
|
141837
141893
|
const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target);
|
|
141838
141894
|
if (sourcePropertiesFiltered) {
|
|
141839
|
-
const discriminated = discriminateTypeByDiscriminableItems(target,
|
|
141895
|
+
const discriminated = discriminateTypeByDiscriminableItems(target, map26(sourcePropertiesFiltered, (p) => [() => getTypeOfSymbol(p), p.escapedName]), isRelatedTo);
|
|
141840
141896
|
if (discriminated !== target) {
|
|
141841
141897
|
return discriminated;
|
|
141842
141898
|
}
|
|
@@ -143872,13 +143928,13 @@ ${lanes.join("\n")}
|
|
|
143872
143928
|
}
|
|
143873
143929
|
exit();
|
|
143874
143930
|
}
|
|
143875
|
-
function appendSourceMap(generatedLine, generatedCharacter,
|
|
143931
|
+
function appendSourceMap(generatedLine, generatedCharacter, map27, sourceMapPath, start2, end) {
|
|
143876
143932
|
Debug.assert(generatedLine >= pendingGeneratedLine, "generatedLine cannot backtrack");
|
|
143877
143933
|
Debug.assert(generatedCharacter >= 0, "generatedCharacter cannot be negative");
|
|
143878
143934
|
enter();
|
|
143879
143935
|
const sourceIndexToNewSourceIndexMap = [];
|
|
143880
143936
|
let nameIndexToNewNameIndexMap;
|
|
143881
|
-
const mappingIterator = decodeMappings(
|
|
143937
|
+
const mappingIterator = decodeMappings(map27.mappings);
|
|
143882
143938
|
for (const raw of mappingIterator) {
|
|
143883
143939
|
if (end && (raw.generatedLine > end.line || raw.generatedLine === end.line && raw.generatedCharacter > end.character)) {
|
|
143884
143940
|
break;
|
|
@@ -143893,21 +143949,21 @@ ${lanes.join("\n")}
|
|
|
143893
143949
|
if (raw.sourceIndex !== void 0) {
|
|
143894
143950
|
newSourceIndex = sourceIndexToNewSourceIndexMap[raw.sourceIndex];
|
|
143895
143951
|
if (newSourceIndex === void 0) {
|
|
143896
|
-
const rawPath =
|
|
143897
|
-
const relativePath =
|
|
143952
|
+
const rawPath = map27.sources[raw.sourceIndex];
|
|
143953
|
+
const relativePath = map27.sourceRoot ? combinePaths(map27.sourceRoot, rawPath) : rawPath;
|
|
143898
143954
|
const combinedPath = combinePaths(getDirectoryPath(sourceMapPath), relativePath);
|
|
143899
143955
|
sourceIndexToNewSourceIndexMap[raw.sourceIndex] = newSourceIndex = addSource(combinedPath);
|
|
143900
|
-
if (
|
|
143901
|
-
setSourceContent(newSourceIndex,
|
|
143956
|
+
if (map27.sourcesContent && typeof map27.sourcesContent[raw.sourceIndex] === "string") {
|
|
143957
|
+
setSourceContent(newSourceIndex, map27.sourcesContent[raw.sourceIndex]);
|
|
143902
143958
|
}
|
|
143903
143959
|
}
|
|
143904
143960
|
newSourceLine = raw.sourceLine;
|
|
143905
143961
|
newSourceCharacter = raw.sourceCharacter;
|
|
143906
|
-
if (
|
|
143962
|
+
if (map27.names && raw.nameIndex !== void 0) {
|
|
143907
143963
|
if (!nameIndexToNewNameIndexMap) nameIndexToNewNameIndexMap = [];
|
|
143908
143964
|
newNameIndex = nameIndexToNewNameIndexMap[raw.nameIndex];
|
|
143909
143965
|
if (newNameIndex === void 0) {
|
|
143910
|
-
nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(
|
|
143966
|
+
nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(map27.names[raw.nameIndex]);
|
|
143911
143967
|
}
|
|
143912
143968
|
}
|
|
143913
143969
|
}
|
|
@@ -144192,12 +144248,12 @@ ${lanes.join("\n")}
|
|
|
144192
144248
|
function getGeneratedPositionOfMapping(value) {
|
|
144193
144249
|
return value.generatedPosition;
|
|
144194
144250
|
}
|
|
144195
|
-
function createDocumentPositionMapper(host,
|
|
144251
|
+
function createDocumentPositionMapper(host, map27, mapPath) {
|
|
144196
144252
|
const mapDirectory = getDirectoryPath(mapPath);
|
|
144197
|
-
const sourceRoot =
|
|
144198
|
-
const generatedAbsoluteFilePath = getNormalizedAbsolutePath(
|
|
144253
|
+
const sourceRoot = map27.sourceRoot ? getNormalizedAbsolutePath(map27.sourceRoot, mapDirectory) : mapDirectory;
|
|
144254
|
+
const generatedAbsoluteFilePath = getNormalizedAbsolutePath(map27.file, mapDirectory);
|
|
144199
144255
|
const generatedFile = host.getSourceFileLike(generatedAbsoluteFilePath);
|
|
144200
|
-
const sourceFileAbsolutePaths =
|
|
144256
|
+
const sourceFileAbsolutePaths = map27.sources.map((source) => getNormalizedAbsolutePath(source, sourceRoot));
|
|
144201
144257
|
const sourceToSourceIndexMap = new Map(sourceFileAbsolutePaths.map((source, i2) => [host.getCanonicalFileName(source), i2]));
|
|
144202
144258
|
let decodedMappings;
|
|
144203
144259
|
let generatedMappings;
|
|
@@ -144218,7 +144274,7 @@ ${lanes.join("\n")}
|
|
|
144218
144274
|
let sourcePosition;
|
|
144219
144275
|
if (isSourceMapping(mapping)) {
|
|
144220
144276
|
const sourceFile = host.getSourceFileLike(sourceFileAbsolutePaths[mapping.sourceIndex]);
|
|
144221
|
-
source =
|
|
144277
|
+
source = map27.sources[mapping.sourceIndex];
|
|
144222
144278
|
sourcePosition = sourceFile !== void 0 ? getPositionOfLineAndCharacter(
|
|
144223
144279
|
sourceFile,
|
|
144224
144280
|
mapping.sourceLine,
|
|
@@ -144237,7 +144293,7 @@ ${lanes.join("\n")}
|
|
|
144237
144293
|
}
|
|
144238
144294
|
function getDecodedMappings() {
|
|
144239
144295
|
if (decodedMappings === void 0) {
|
|
144240
|
-
const decoder = decodeMappings(
|
|
144296
|
+
const decoder = decodeMappings(map27.mappings);
|
|
144241
144297
|
const mappings = arrayFrom(decoder, processMapping);
|
|
144242
144298
|
if (decoder.error !== void 0) {
|
|
144243
144299
|
if (host.log) {
|
|
@@ -144324,7 +144380,7 @@ ${lanes.join("\n")}
|
|
|
144324
144380
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
144325
144381
|
}
|
|
144326
144382
|
function transformBundle(node) {
|
|
144327
|
-
return context.factory.createBundle(
|
|
144383
|
+
return context.factory.createBundle(map26(node.sourceFiles, transformSourceFile));
|
|
144328
144384
|
}
|
|
144329
144385
|
}
|
|
144330
144386
|
function getExportNeedsImportStarHelper(node) {
|
|
@@ -144530,12 +144586,12 @@ ${lanes.join("\n")}
|
|
|
144530
144586
|
}
|
|
144531
144587
|
return exportedNames;
|
|
144532
144588
|
}
|
|
144533
|
-
function multiMapSparseArrayAdd(
|
|
144534
|
-
let values =
|
|
144589
|
+
function multiMapSparseArrayAdd(map27, key, value) {
|
|
144590
|
+
let values = map27[key];
|
|
144535
144591
|
if (values) {
|
|
144536
144592
|
values.push(value);
|
|
144537
144593
|
} else {
|
|
144538
|
-
|
|
144594
|
+
map27[key] = values = [value];
|
|
144539
144595
|
}
|
|
144540
144596
|
return values;
|
|
144541
144597
|
}
|
|
@@ -145273,7 +145329,7 @@ ${lanes.join("\n")}
|
|
|
145273
145329
|
}
|
|
145274
145330
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
145275
145331
|
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
145276
|
-
return factory2.createArrayLiteralExpression(
|
|
145332
|
+
return factory2.createArrayLiteralExpression(map26(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
145277
145333
|
}
|
|
145278
145334
|
function makeObjectBindingPattern(factory2, elements) {
|
|
145279
145335
|
Debug.assertEachNode(elements, isBindingElement);
|
|
@@ -145281,7 +145337,7 @@ ${lanes.join("\n")}
|
|
|
145281
145337
|
}
|
|
145282
145338
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
145283
145339
|
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
145284
|
-
return factory2.createObjectLiteralExpression(
|
|
145340
|
+
return factory2.createObjectLiteralExpression(map26(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
145285
145341
|
}
|
|
145286
145342
|
function makeBindingElement(factory2, name2) {
|
|
145287
145343
|
return factory2.createBindingElement(
|
|
@@ -146727,7 +146783,7 @@ ${lanes.join("\n")}
|
|
|
146727
146783
|
return setTextRange(
|
|
146728
146784
|
factory2.createExpressionStatement(
|
|
146729
146785
|
factory2.inlineExpressions(
|
|
146730
|
-
|
|
146786
|
+
map26(variables, transformInitializedVariable)
|
|
146731
146787
|
)
|
|
146732
146788
|
),
|
|
146733
146789
|
node
|
|
@@ -146933,7 +146989,7 @@ ${lanes.join("\n")}
|
|
|
146933
146989
|
currentNamespaceContainerName = localName;
|
|
146934
146990
|
const statements = [];
|
|
146935
146991
|
startLexicalEnvironment();
|
|
146936
|
-
const members =
|
|
146992
|
+
const members = map26(node.members, transformEnumMember);
|
|
146937
146993
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
146938
146994
|
addRange(statements, members);
|
|
146939
146995
|
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
|
|
@@ -148844,7 +148900,7 @@ ${lanes.join("\n")}
|
|
|
148844
148900
|
if (isDecoratedClassDeclaration) {
|
|
148845
148901
|
Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration.");
|
|
148846
148902
|
if (some(pendingExpressions)) {
|
|
148847
|
-
addRange(pendingStatements,
|
|
148903
|
+
addRange(pendingStatements, map26(pendingExpressions, factory2.createExpressionStatement));
|
|
148848
148904
|
}
|
|
148849
148905
|
if (some(staticPropertiesOrClassStaticBlocks)) {
|
|
148850
148906
|
addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node));
|
|
@@ -150633,13 +150689,13 @@ ${lanes.join("\n")}
|
|
|
150633
150689
|
}
|
|
150634
150690
|
const { false: decorators, true: metadata } = groupBy(allDecorators.decorators, isSyntheticMetadataDecorator);
|
|
150635
150691
|
const decoratorExpressions = [];
|
|
150636
|
-
addRange(decoratorExpressions,
|
|
150692
|
+
addRange(decoratorExpressions, map26(decorators, transformDecorator));
|
|
150637
150693
|
addRange(decoratorExpressions, flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
|
|
150638
|
-
addRange(decoratorExpressions,
|
|
150694
|
+
addRange(decoratorExpressions, map26(metadata, transformDecorator));
|
|
150639
150695
|
return decoratorExpressions;
|
|
150640
150696
|
}
|
|
150641
150697
|
function addClassElementDecorationStatements(statements, node, isStatic2) {
|
|
150642
|
-
addRange(statements,
|
|
150698
|
+
addRange(statements, map26(generateClassElementDecorationExpressions(node, isStatic2), (expr) => factory2.createExpressionStatement(expr)));
|
|
150643
150699
|
}
|
|
150644
150700
|
function isDecoratedClassElement(member, isStaticElement, parent2) {
|
|
150645
150701
|
return nodeOrChildIsDecorated(
|
|
@@ -152544,7 +152600,7 @@ ${lanes.join("\n")}
|
|
|
152544
152600
|
return void 0;
|
|
152545
152601
|
}
|
|
152546
152602
|
const decoratorExpressions = [];
|
|
152547
|
-
addRange(decoratorExpressions,
|
|
152603
|
+
addRange(decoratorExpressions, map26(allDecorators.decorators, transformDecorator));
|
|
152548
152604
|
return decoratorExpressions;
|
|
152549
152605
|
}
|
|
152550
152606
|
function transformDecorator(decorator) {
|
|
@@ -153217,7 +153273,7 @@ ${lanes.join("\n")}
|
|
|
153217
153273
|
}
|
|
153218
153274
|
return void 0;
|
|
153219
153275
|
}
|
|
153220
|
-
return factory2.inlineExpressions(
|
|
153276
|
+
return factory2.inlineExpressions(map26(variables, transformInitializedVariable));
|
|
153221
153277
|
}
|
|
153222
153278
|
function hoistVariableDeclarationList(node) {
|
|
153223
153279
|
forEach(node.declarations, hoistVariable);
|
|
@@ -156633,7 +156689,7 @@ ${lanes.join("\n")}
|
|
|
156633
156689
|
return target && target >= 5 ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children);
|
|
156634
156690
|
}
|
|
156635
156691
|
function transformJsxAttributesToProps(attrs, children) {
|
|
156636
|
-
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(
|
|
156692
|
+
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map26(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));
|
|
156637
156693
|
if (children) {
|
|
156638
156694
|
props.push(children);
|
|
156639
156695
|
}
|
|
@@ -159922,7 +159978,7 @@ ${lanes.join("\n")}
|
|
|
159922
159978
|
/* NoHoisting */
|
|
159923
159979
|
)
|
|
159924
159980
|
);
|
|
159925
|
-
const part = factory2.createVariableDeclarationList(
|
|
159981
|
+
const part = factory2.createVariableDeclarationList(map26(currentState.loopOutParameters, createOutVariable));
|
|
159926
159982
|
return { functionName, containsYield, functionDeclaration, part };
|
|
159927
159983
|
}
|
|
159928
159984
|
function createFunctionForBodyOfIterationStatement(node, currentState, outerState) {
|
|
@@ -160050,7 +160106,7 @@ ${lanes.join("\n")}
|
|
|
160050
160106
|
loopFunctionExpressionName,
|
|
160051
160107
|
/*typeArguments*/
|
|
160052
160108
|
void 0,
|
|
160053
|
-
|
|
160109
|
+
map26(state.loopParameters, (p) => p.name)
|
|
160054
160110
|
);
|
|
160055
160111
|
const callResult = containsYield ? factory2.createYieldExpression(
|
|
160056
160112
|
factory2.createToken(
|
|
@@ -160628,7 +160684,7 @@ ${lanes.join("\n")}
|
|
|
160628
160684
|
return isSpreadElement(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads;
|
|
160629
160685
|
}
|
|
160630
160686
|
function visitSpanOfSpreads(chunk) {
|
|
160631
|
-
return
|
|
160687
|
+
return map26(chunk, visitExpressionOfSpread);
|
|
160632
160688
|
}
|
|
160633
160689
|
function visitExpressionOfSpread(node) {
|
|
160634
160690
|
Debug.assertNode(node, isSpreadElement);
|
|
@@ -161200,7 +161256,7 @@ ${lanes.join("\n")}
|
|
|
161200
161256
|
return setSourceMapRange(
|
|
161201
161257
|
factory2.createExpressionStatement(
|
|
161202
161258
|
factory2.inlineExpressions(
|
|
161203
|
-
|
|
161259
|
+
map26(variables, transformInitializedVariable)
|
|
161204
161260
|
)
|
|
161205
161261
|
),
|
|
161206
161262
|
node
|
|
@@ -161758,7 +161814,7 @@ ${lanes.join("\n")}
|
|
|
161758
161814
|
const variables = getInitializedVariables(initializer3);
|
|
161759
161815
|
node = factory2.updateForStatement(
|
|
161760
161816
|
node,
|
|
161761
|
-
variables.length > 0 ? factory2.inlineExpressions(
|
|
161817
|
+
variables.length > 0 ? factory2.inlineExpressions(map26(variables, transformInitializedVariable)) : void 0,
|
|
161762
161818
|
visitNode(node.condition, visitor, isExpression),
|
|
161763
161819
|
visitNode(node.incrementor, visitor, isExpression),
|
|
161764
161820
|
visitIterationBody(node.statement, visitor, context)
|
|
@@ -165084,7 +165140,7 @@ ${lanes.join("\n")}
|
|
|
165084
165140
|
moduleBodyBlock
|
|
165085
165141
|
);
|
|
165086
165142
|
const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);
|
|
165087
|
-
const dependencies = factory2.createArrayLiteralExpression(
|
|
165143
|
+
const dependencies = factory2.createArrayLiteralExpression(map26(dependencyGroups, (dependencyGroup) => dependencyGroup.name));
|
|
165088
165144
|
const updated = setEmitFlags(
|
|
165089
165145
|
factory2.updateSourceFile(
|
|
165090
165146
|
node,
|
|
@@ -166814,7 +166870,7 @@ ${lanes.join("\n")}
|
|
|
166814
166870
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
166815
166871
|
}
|
|
166816
166872
|
function transformBundle(node) {
|
|
166817
|
-
return context.factory.createBundle(
|
|
166873
|
+
return context.factory.createBundle(map26(node.sourceFiles, transformSourceFile));
|
|
166818
166874
|
}
|
|
166819
166875
|
}
|
|
166820
166876
|
function canProduceDiagnostics(node) {
|
|
@@ -167562,7 +167618,7 @@ ${lanes.join("\n")}
|
|
|
167562
167618
|
rawLibReferenceDirectives = [];
|
|
167563
167619
|
let hasNoDefaultLib = false;
|
|
167564
167620
|
const bundle = factory2.createBundle(
|
|
167565
|
-
|
|
167621
|
+
map26(node.sourceFiles, (sourceFile) => {
|
|
167566
167622
|
if (sourceFile.isDeclarationFile) return void 0;
|
|
167567
167623
|
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
|
167568
167624
|
currentSourceFile = sourceFile;
|
|
@@ -167673,7 +167729,7 @@ ${lanes.join("\n")}
|
|
|
167673
167729
|
getLibReferences()
|
|
167674
167730
|
);
|
|
167675
167731
|
function collectFileReferences(sourceFile) {
|
|
167676
|
-
rawReferencedFiles = concatenate(rawReferencedFiles,
|
|
167732
|
+
rawReferencedFiles = concatenate(rawReferencedFiles, map26(sourceFile.referencedFiles, (f3) => [sourceFile, f3]));
|
|
167677
167733
|
rawTypeReferenceDirectives = concatenate(rawTypeReferenceDirectives, sourceFile.typeReferenceDirectives);
|
|
167678
167734
|
rawLibReferenceDirectives = concatenate(rawLibReferenceDirectives, sourceFile.libReferenceDirectives);
|
|
167679
167735
|
}
|
|
@@ -167887,7 +167943,7 @@ ${lanes.join("\n")}
|
|
|
167887
167943
|
)) {
|
|
167888
167944
|
return factory2.createNodeArray();
|
|
167889
167945
|
}
|
|
167890
|
-
const newParams =
|
|
167946
|
+
const newParams = map26(params, (p) => ensureParameter(p, modifierMask));
|
|
167891
167947
|
if (!newParams) {
|
|
167892
167948
|
return factory2.createNodeArray();
|
|
167893
167949
|
}
|
|
@@ -168639,7 +168695,7 @@ ${lanes.join("\n")}
|
|
|
168639
168695
|
void 0,
|
|
168640
168696
|
/*isTypeOnly*/
|
|
168641
168697
|
false,
|
|
168642
|
-
factory2.createNamedExports(
|
|
168698
|
+
factory2.createNamedExports(map26(exportMappings, ([gen, exp]) => {
|
|
168643
168699
|
return factory2.createExportSpecifier(
|
|
168644
168700
|
/*isTypeOnly*/
|
|
168645
168701
|
false,
|
|
@@ -168847,11 +168903,11 @@ ${lanes.join("\n")}
|
|
|
168847
168903
|
2
|
|
168848
168904
|
/* Const */
|
|
168849
168905
|
));
|
|
168850
|
-
const heritageClauses = factory2.createNodeArray(
|
|
168906
|
+
const heritageClauses = factory2.createNodeArray(map26(input.heritageClauses, (clause) => {
|
|
168851
168907
|
if (clause.token === 96) {
|
|
168852
168908
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
168853
168909
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
168854
|
-
const newClause = factory2.updateHeritageClause(clause,
|
|
168910
|
+
const newClause = factory2.updateHeritageClause(clause, map26(clause.types, (t2) => factory2.updateExpressionWithTypeArguments(t2, newId, visitNodes2(t2.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
168855
168911
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
168856
168912
|
return newClause;
|
|
168857
168913
|
}
|
|
@@ -169013,7 +169069,7 @@ ${lanes.join("\n")}
|
|
|
169013
169069
|
}
|
|
169014
169070
|
function transformHeritageClauses(nodes) {
|
|
169015
169071
|
return factory2.createNodeArray(filter3(
|
|
169016
|
-
|
|
169072
|
+
map26(nodes, (clause) => factory2.updateHeritageClause(
|
|
169017
169073
|
clause,
|
|
169018
169074
|
visitNodes2(
|
|
169019
169075
|
factory2.createNodeArray(filter3(clause.types, (t2) => {
|
|
@@ -169135,7 +169191,7 @@ ${lanes.join("\n")}
|
|
|
169135
169191
|
const moduleKind = getEmitModuleKind(compilerOptions);
|
|
169136
169192
|
const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
|
|
169137
169193
|
const transformers = [];
|
|
169138
|
-
addRange(transformers, customTransformers &&
|
|
169194
|
+
addRange(transformers, customTransformers && map26(customTransformers.before, wrapScriptTransformerFactory));
|
|
169139
169195
|
transformers.push(transformTypeScript);
|
|
169140
169196
|
if (compilerOptions.experimentalDecorators) {
|
|
169141
169197
|
transformers.push(transformLegacyDecorators);
|
|
@@ -169173,13 +169229,13 @@ ${lanes.join("\n")}
|
|
|
169173
169229
|
transformers.push(transformGenerators);
|
|
169174
169230
|
}
|
|
169175
169231
|
transformers.push(getModuleTransformer(moduleKind));
|
|
169176
|
-
addRange(transformers, customTransformers &&
|
|
169232
|
+
addRange(transformers, customTransformers && map26(customTransformers.after, wrapScriptTransformerFactory));
|
|
169177
169233
|
return transformers;
|
|
169178
169234
|
}
|
|
169179
169235
|
function getDeclarationTransformers(customTransformers) {
|
|
169180
169236
|
const transformers = [];
|
|
169181
169237
|
transformers.push(transformDeclarations);
|
|
169182
|
-
addRange(transformers, customTransformers &&
|
|
169238
|
+
addRange(transformers, customTransformers && map26(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory));
|
|
169183
169239
|
return transformers;
|
|
169184
169240
|
}
|
|
169185
169241
|
function wrapCustomTransformer(transformer) {
|
|
@@ -174955,7 +175011,7 @@ ${lanes.join("\n")}
|
|
|
174955
175011
|
var _a2;
|
|
174956
175012
|
if (!host.realpath || ensureTrailingDirectorySeparator(toPath3(host.realpath(rootDir))) === rootDirPath) {
|
|
174957
175013
|
const resultFromHost = {
|
|
174958
|
-
files:
|
|
175014
|
+
files: map26(host.readDirectory(
|
|
174959
175015
|
rootDir,
|
|
174960
175016
|
/*extensions*/
|
|
174961
175017
|
void 0,
|
|
@@ -175054,7 +175110,7 @@ ${lanes.join("\n")}
|
|
|
175054
175110
|
function getFileSystemEntriesFromHost(dir, path2) {
|
|
175055
175111
|
if (rootSymLinkResult && path2 === rootDirPath) return rootSymLinkResult;
|
|
175056
175112
|
const result = {
|
|
175057
|
-
files:
|
|
175113
|
+
files: map26(host.readDirectory(
|
|
175058
175114
|
dir,
|
|
175059
175115
|
/*extensions*/
|
|
175060
175116
|
void 0,
|
|
@@ -175616,12 +175672,12 @@ ${lanes.join("\n")}
|
|
|
175616
175672
|
const value = readFileCache.get(key);
|
|
175617
175673
|
if (value !== void 0 && value !== data) {
|
|
175618
175674
|
readFileCache.delete(key);
|
|
175619
|
-
sourceFileCache.forEach((
|
|
175675
|
+
sourceFileCache.forEach((map27) => map27.delete(key));
|
|
175620
175676
|
} else if (getSourceFileWithCache) {
|
|
175621
|
-
sourceFileCache.forEach((
|
|
175622
|
-
const sourceFile =
|
|
175677
|
+
sourceFileCache.forEach((map27) => {
|
|
175678
|
+
const sourceFile = map27.get(key);
|
|
175623
175679
|
if (sourceFile && sourceFile.text !== data) {
|
|
175624
|
-
|
|
175680
|
+
map27.delete(key);
|
|
175625
175681
|
}
|
|
175626
175682
|
});
|
|
175627
175683
|
}
|
|
@@ -179628,7 +179684,7 @@ ${lanes.join("\n")}
|
|
|
179628
179684
|
((BuilderState2) => {
|
|
179629
179685
|
function createManyToManyPathMap() {
|
|
179630
179686
|
function create2(forward, reverse, deleted) {
|
|
179631
|
-
const
|
|
179687
|
+
const map27 = {
|
|
179632
179688
|
getKeys: (v) => reverse.get(v),
|
|
179633
179689
|
getValues: (k) => forward.get(k),
|
|
179634
179690
|
keys: () => forward.keys(),
|
|
@@ -179657,10 +179713,10 @@ ${lanes.join("\n")}
|
|
|
179657
179713
|
addToMultimap(reverse, v, k);
|
|
179658
179714
|
}
|
|
179659
179715
|
});
|
|
179660
|
-
return
|
|
179716
|
+
return map27;
|
|
179661
179717
|
}
|
|
179662
179718
|
};
|
|
179663
|
-
return
|
|
179719
|
+
return map27;
|
|
179664
179720
|
}
|
|
179665
179721
|
return create2(
|
|
179666
179722
|
/* @__PURE__ */ new Map(),
|
|
@@ -179670,19 +179726,19 @@ ${lanes.join("\n")}
|
|
|
179670
179726
|
);
|
|
179671
179727
|
}
|
|
179672
179728
|
BuilderState2.createManyToManyPathMap = createManyToManyPathMap;
|
|
179673
|
-
function addToMultimap(
|
|
179674
|
-
let set2 =
|
|
179729
|
+
function addToMultimap(map27, k, v) {
|
|
179730
|
+
let set2 = map27.get(k);
|
|
179675
179731
|
if (!set2) {
|
|
179676
179732
|
set2 = /* @__PURE__ */ new Set();
|
|
179677
|
-
|
|
179733
|
+
map27.set(k, set2);
|
|
179678
179734
|
}
|
|
179679
179735
|
set2.add(v);
|
|
179680
179736
|
}
|
|
179681
|
-
function deleteFromMultimap(
|
|
179682
|
-
const set2 =
|
|
179737
|
+
function deleteFromMultimap(map27, k, v) {
|
|
179738
|
+
const set2 = map27.get(k);
|
|
179683
179739
|
if (set2 == null ? void 0 : set2.delete(v)) {
|
|
179684
179740
|
if (!set2.size) {
|
|
179685
|
-
|
|
179741
|
+
map27.delete(k);
|
|
179686
179742
|
}
|
|
179687
179743
|
return true;
|
|
179688
179744
|
}
|
|
@@ -180033,8 +180089,8 @@ ${lanes.join("\n")}
|
|
|
180033
180089
|
if (diff & 48) result = result | emitKind & 48;
|
|
180034
180090
|
return result;
|
|
180035
180091
|
}
|
|
180036
|
-
function hasSameKeys(map1,
|
|
180037
|
-
return map1 ===
|
|
180092
|
+
function hasSameKeys(map1, map27) {
|
|
180093
|
+
return map1 === map27 || map1 !== void 0 && map27 !== void 0 && map1.size === map27.size && !forEachKey(map1, (key) => !map27.has(key));
|
|
180038
180094
|
}
|
|
180039
180095
|
function createBuilderProgramState(newProgram, oldState) {
|
|
180040
180096
|
var _a2, _b;
|
|
@@ -181368,7 +181424,7 @@ ${lanes.join("\n")}
|
|
|
181368
181424
|
let filePathsSetList;
|
|
181369
181425
|
const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0;
|
|
181370
181426
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
181371
|
-
const changedFilesSet = new Set(
|
|
181427
|
+
const changedFilesSet = new Set(map26(buildInfo.changeFileSet, toFilePath));
|
|
181372
181428
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
181373
181429
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
181374
181430
|
const path2 = toFilePath(index + 1);
|
|
@@ -181461,10 +181517,10 @@ ${lanes.join("\n")}
|
|
|
181461
181517
|
return filePathsSetList[fileIdsListId - 1];
|
|
181462
181518
|
}
|
|
181463
181519
|
function toManyToManyPathMap(referenceMap, options) {
|
|
181464
|
-
const
|
|
181465
|
-
if (!
|
|
181466
|
-
referenceMap.forEach(([fileId, fileIdListId]) =>
|
|
181467
|
-
return
|
|
181520
|
+
const map27 = BuilderState.createReferencedMap(options);
|
|
181521
|
+
if (!map27 || !referenceMap) return map27;
|
|
181522
|
+
referenceMap.forEach(([fileId, fileIdListId]) => map27.set(toFilePath(fileId), toFilePathsSet(fileIdListId)));
|
|
181523
|
+
return map27;
|
|
181468
181524
|
}
|
|
181469
181525
|
function toPerFileSemanticDiagnostics(diagnostics) {
|
|
181470
181526
|
const semanticDiagnostics = new Map(
|
|
@@ -187293,7 +187349,7 @@ ${lanes.join("\n")}
|
|
|
187293
187349
|
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
187294
187350
|
}
|
|
187295
187351
|
if (isJSDocTypeLiteral(node)) {
|
|
187296
|
-
return factory.createTypeLiteralNode(
|
|
187352
|
+
return factory.createTypeLiteralNode(map26(node.jsDocPropertyTags, (t2) => {
|
|
187297
187353
|
const name2 = visitNode(isIdentifier(t2.name) ? t2.name : t2.name.right, visitExistingNodeTreeSymbols, isIdentifier);
|
|
187298
187354
|
const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t2);
|
|
187299
187355
|
return factory.createPropertySignature(
|
|
@@ -187359,7 +187415,7 @@ ${lanes.join("\n")}
|
|
|
187359
187415
|
} else {
|
|
187360
187416
|
return factory.createFunctionTypeNode(
|
|
187361
187417
|
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
187362
|
-
|
|
187418
|
+
map26(node.parameters, (p, i2) => factory.createParameterDeclaration(
|
|
187363
187419
|
/*modifiers*/
|
|
187364
187420
|
void 0,
|
|
187365
187421
|
getEffectiveDotDotDotForParameter(p),
|
|
@@ -191642,7 +191698,7 @@ ${lanes.join("\n")}
|
|
|
191642
191698
|
return expression;
|
|
191643
191699
|
}
|
|
191644
191700
|
function mapOneOrMany(valueOrArray, f3, resultSelector = identity) {
|
|
191645
|
-
return valueOrArray ? isArray(valueOrArray) ? resultSelector(
|
|
191701
|
+
return valueOrArray ? isArray(valueOrArray) ? resultSelector(map26(valueOrArray, f3)) : f3(valueOrArray, 0) : void 0;
|
|
191646
191702
|
}
|
|
191647
191703
|
function firstOrOnly(valueOrArray) {
|
|
191648
191704
|
return isArray(valueOrArray) ? first2(valueOrArray) : valueOrArray;
|
|
@@ -193374,9 +193430,9 @@ ${lanes.join("\n")}
|
|
|
193374
193430
|
sourceFilesSet
|
|
193375
193431
|
);
|
|
193376
193432
|
if (!referenceEntries) return void 0;
|
|
193377
|
-
const
|
|
193433
|
+
const map27 = arrayToMultiMap(referenceEntries.map(ts_FindAllReferences_exports.toHighlightSpan), (e2) => e2.fileName, (e2) => e2.span);
|
|
193378
193434
|
const getCanonicalFileName = createGetCanonicalFileName(program2.useCaseSensitiveFileNames());
|
|
193379
|
-
return arrayFrom(mapDefinedIterator(
|
|
193435
|
+
return arrayFrom(mapDefinedIterator(map27.entries(), ([fileName, highlightSpans]) => {
|
|
193380
193436
|
if (!sourceFilesSet.has(fileName)) {
|
|
193381
193437
|
if (!program2.redirectTargetsMap.has(toPath(fileName, program2.getCurrentDirectory(), getCanonicalFileName))) {
|
|
193382
193438
|
return void 0;
|
|
@@ -195039,12 +195095,12 @@ ${lanes.join("\n")}
|
|
|
195039
195095
|
return void 0;
|
|
195040
195096
|
}
|
|
195041
195097
|
function convertDocumentToSourceMapper(host, contents, mapFileName) {
|
|
195042
|
-
const
|
|
195043
|
-
if (!
|
|
195098
|
+
const map27 = tryParseRawSourceMap(contents);
|
|
195099
|
+
if (!map27 || !map27.sources || !map27.file || !map27.mappings) {
|
|
195044
195100
|
return void 0;
|
|
195045
195101
|
}
|
|
195046
|
-
if (
|
|
195047
|
-
return createDocumentPositionMapper(host,
|
|
195102
|
+
if (map27.sourcesContent && map27.sourcesContent.some(isString)) return void 0;
|
|
195103
|
+
return createDocumentPositionMapper(host, map27, mapFileName);
|
|
195048
195104
|
}
|
|
195049
195105
|
function createSourceFileLike(text, lineMap) {
|
|
195050
195106
|
return {
|
|
@@ -195576,7 +195632,7 @@ interface Symbol {
|
|
|
195576
195632
|
curCancellationToken = cancellationToken;
|
|
195577
195633
|
curSourceFile = sourceFile;
|
|
195578
195634
|
try {
|
|
195579
|
-
return
|
|
195635
|
+
return map26(primaryNavBarMenuItems(rootNavigationBarNode(sourceFile)), convertToPrimaryNavBarMenuItem);
|
|
195580
195636
|
} finally {
|
|
195581
195637
|
reset();
|
|
195582
195638
|
}
|
|
@@ -196229,7 +196285,7 @@ interface Symbol {
|
|
|
196229
196285
|
kindModifiers: getModifiers2(n.node),
|
|
196230
196286
|
spans: getSpans(n),
|
|
196231
196287
|
nameSpan: n.name && getNodeSpan(n.name),
|
|
196232
|
-
childItems:
|
|
196288
|
+
childItems: map26(n.children, convertToTree)
|
|
196233
196289
|
};
|
|
196234
196290
|
}
|
|
196235
196291
|
function convertToPrimaryNavBarMenuItem(n) {
|
|
@@ -196238,7 +196294,7 @@ interface Symbol {
|
|
|
196238
196294
|
kind: getNodeKind(n.node),
|
|
196239
196295
|
kindModifiers: getModifiers2(n.node),
|
|
196240
196296
|
spans: getSpans(n),
|
|
196241
|
-
childItems:
|
|
196297
|
+
childItems: map26(n.children, convertToSecondaryNavBarMenuItem) || emptyChildItemArray,
|
|
196242
196298
|
indent: n.indent,
|
|
196243
196299
|
bolded: false,
|
|
196244
196300
|
grayed: false
|
|
@@ -198466,12 +198522,12 @@ interface Symbol {
|
|
|
198466
198522
|
"args",
|
|
198467
198523
|
/*questionToken*/
|
|
198468
198524
|
void 0,
|
|
198469
|
-
factory.createUnionTypeNode(
|
|
198525
|
+
factory.createUnionTypeNode(map26(signatureDeclarations, convertSignatureParametersToTuple))
|
|
198470
198526
|
)
|
|
198471
198527
|
]);
|
|
198472
198528
|
}
|
|
198473
198529
|
function convertSignatureParametersToTuple(decl) {
|
|
198474
|
-
const members =
|
|
198530
|
+
const members = map26(decl.parameters, convertParameterToNamedTupleMember);
|
|
198475
198531
|
return setEmitFlags(
|
|
198476
198532
|
factory.createTupleTypeNode(members),
|
|
198477
198533
|
some(members, (m2) => !!length(getSyntheticLeadingComments(m2))) ? 0 : 1
|
|
@@ -198951,9 +199007,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
198951
199007
|
}
|
|
198952
199008
|
function doChange5(sourceFile, program2, host, changes, functionDeclaration, groupedReferences) {
|
|
198953
199009
|
const signature = groupedReferences.signature;
|
|
198954
|
-
const newFunctionDeclarationParams =
|
|
199010
|
+
const newFunctionDeclarationParams = map26(createNewParameters(functionDeclaration, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
198955
199011
|
if (signature) {
|
|
198956
|
-
const newSignatureParams =
|
|
199012
|
+
const newSignatureParams = map26(createNewParameters(signature, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
198957
199013
|
replaceParameters(signature, newSignatureParams);
|
|
198958
199014
|
}
|
|
198959
199015
|
replaceParameters(functionDeclaration, newFunctionDeclarationParams);
|
|
@@ -199016,10 +199072,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199016
199072
|
function groupReferences(referenceEntries) {
|
|
199017
199073
|
const classReferences = { accessExpressions: [], typeUsages: [] };
|
|
199018
199074
|
const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true };
|
|
199019
|
-
const functionSymbols =
|
|
199020
|
-
const classSymbols =
|
|
199075
|
+
const functionSymbols = map26(functionNames, getSymbolTargetAtLocation);
|
|
199076
|
+
const classSymbols = map26(classNames, getSymbolTargetAtLocation);
|
|
199021
199077
|
const isConstructor = isConstructorDeclaration(functionDeclaration);
|
|
199022
|
-
const contextualSymbols =
|
|
199078
|
+
const contextualSymbols = map26(functionNames, (name2) => getSymbolForContextualType(name2, checker));
|
|
199023
199079
|
for (const entry of referenceEntries) {
|
|
199024
199080
|
if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) {
|
|
199025
199081
|
groupedReferences2.valid = false;
|
|
@@ -199283,7 +199339,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199283
199339
|
const parameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
199284
199340
|
const hasRestParameter2 = isRestParameter(last(parameters));
|
|
199285
199341
|
const nonRestArguments = hasRestParameter2 ? functionArguments.slice(0, parameters.length - 1) : functionArguments;
|
|
199286
|
-
const properties =
|
|
199342
|
+
const properties = map26(nonRestArguments, (arg, i2) => {
|
|
199287
199343
|
const parameterName = getParameterName(parameters[i2]);
|
|
199288
199344
|
const property = createPropertyOrShorthandAssignment(parameterName, arg);
|
|
199289
199345
|
suppressLeadingAndTrailingTrivia(property.name);
|
|
@@ -199306,7 +199362,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199306
199362
|
function createNewParameters(functionDeclaration, program2, host) {
|
|
199307
199363
|
const checker = program2.getTypeChecker();
|
|
199308
199364
|
const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
199309
|
-
const bindingElements =
|
|
199365
|
+
const bindingElements = map26(refactorableParameters, createBindingElementFromParameterDeclaration);
|
|
199310
199366
|
const objectParameterName = factory.createObjectBindingPattern(bindingElements);
|
|
199311
199367
|
const objectParameterType = createParameterTypeNode(refactorableParameters);
|
|
199312
199368
|
let objectInitializer;
|
|
@@ -199361,7 +199417,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199361
199417
|
return element;
|
|
199362
199418
|
}
|
|
199363
199419
|
function createParameterTypeNode(parameters) {
|
|
199364
|
-
const members =
|
|
199420
|
+
const members = map26(parameters, createPropertySignatureFromParameterDeclaration);
|
|
199365
199421
|
const typeNode = addEmitFlags(
|
|
199366
199422
|
factory.createTypeLiteralNode(members),
|
|
199367
199423
|
1
|
|
@@ -199636,7 +199692,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199636
199692
|
i2 = newIndex - 1;
|
|
199637
199693
|
const isLast = i2 === nodes.length - 1;
|
|
199638
199694
|
if (isTemplateExpression(currentNode)) {
|
|
199639
|
-
const spans =
|
|
199695
|
+
const spans = map26(currentNode.templateSpans, (span, index) => {
|
|
199640
199696
|
copyExpressionComments(span);
|
|
199641
199697
|
const isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
199642
199698
|
const text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
@@ -201263,8 +201319,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
201263
201319
|
}
|
|
201264
201320
|
}
|
|
201265
201321
|
function getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) {
|
|
201266
|
-
const variableAssignments =
|
|
201267
|
-
const writeAssignments =
|
|
201322
|
+
const variableAssignments = map26(exposedVariableDeclarations, (v) => factory.createShorthandPropertyAssignment(v.symbol.name));
|
|
201323
|
+
const writeAssignments = map26(writes, (w) => factory.createShorthandPropertyAssignment(w.symbol.name));
|
|
201268
201324
|
return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments);
|
|
201269
201325
|
}
|
|
201270
201326
|
function isReadonlyArray(v) {
|
|
@@ -202789,7 +202845,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
202789
202845
|
}
|
|
202790
202846
|
function displayPartsToString(displayParts) {
|
|
202791
202847
|
if (displayParts) {
|
|
202792
|
-
return
|
|
202848
|
+
return map26(displayParts, (displayPart2) => displayPart2.text).join("");
|
|
202793
202849
|
}
|
|
202794
202850
|
return "";
|
|
202795
202851
|
}
|
|
@@ -204152,7 +204208,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204152
204208
|
const multiLineCommentStart = /(?:\/\*+\s*)/.source;
|
|
204153
204209
|
const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
|
|
204154
204210
|
const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
|
|
204155
|
-
const literals = "(?:" +
|
|
204211
|
+
const literals = "(?:" + map26(descriptors, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")";
|
|
204156
204212
|
const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
|
|
204157
204213
|
const messageRemainder = /(?:.*?)/.source;
|
|
204158
204214
|
const messagePortion = "(" + literals + messageRemainder + ")";
|
|
@@ -205091,9 +205147,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205091
205147
|
let declarations;
|
|
205092
205148
|
if (symbol2 && symbol2.declarations) {
|
|
205093
205149
|
const indices = indicesOf(symbol2.declarations);
|
|
205094
|
-
const keys =
|
|
205150
|
+
const keys = map26(symbol2.declarations, (decl) => ({ file: decl.getSourceFile().fileName, pos: decl.pos }));
|
|
205095
205151
|
indices.sort((a, b) => compareStringsCaseSensitive(keys[a].file, keys[b].file) || keys[a].pos - keys[b].pos);
|
|
205096
|
-
const sortedDeclarations =
|
|
205152
|
+
const sortedDeclarations = map26(indices, (i2) => symbol2.declarations[i2]);
|
|
205097
205153
|
let lastDecl;
|
|
205098
205154
|
for (const decl of sortedDeclarations) {
|
|
205099
205155
|
if (isValidCallHierarchyDeclaration(decl)) {
|
|
@@ -205229,7 +205285,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205229
205285
|
return { from: from11, fromSpans };
|
|
205230
205286
|
}
|
|
205231
205287
|
function convertCallSiteGroupToIncomingCall(program2, entries) {
|
|
205232
|
-
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
205288
|
+
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration), map26(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
205233
205289
|
}
|
|
205234
205290
|
function getIncomingCalls(program2, declaration, cancellationToken) {
|
|
205235
205291
|
if (isSourceFile(declaration) || isModuleDeclaration(declaration) || isClassStaticBlockDeclaration(declaration)) {
|
|
@@ -205415,7 +205471,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205415
205471
|
return { to, fromSpans };
|
|
205416
205472
|
}
|
|
205417
205473
|
function convertCallSiteGroupToOutgoingCall(program2, entries) {
|
|
205418
|
-
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
205474
|
+
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration), map26(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
205419
205475
|
}
|
|
205420
205476
|
function getOutgoingCalls(program2, declaration) {
|
|
205421
205477
|
if (declaration.flags & 33554432 || isMethodSignature(declaration)) {
|
|
@@ -205528,7 +205584,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205528
205584
|
function getFixes(context) {
|
|
205529
205585
|
const diagnostics = getDiagnostics(context);
|
|
205530
205586
|
const registrations = errorCodeToFixes.get(String(context.errorCode));
|
|
205531
|
-
return flatMap(registrations, (f3) =>
|
|
205587
|
+
return flatMap(registrations, (f3) => map26(f3.getCodeActions(context), removeFixIdIfFixAllUnavailable(f3, diagnostics)));
|
|
205532
205588
|
}
|
|
205533
205589
|
function getAllFixes(context) {
|
|
205534
205590
|
return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context);
|
|
@@ -206364,7 +206420,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
206364
206420
|
}
|
|
206365
206421
|
}
|
|
206366
206422
|
function transformJSDocTypeLiteral(node) {
|
|
206367
|
-
const typeNode = factory.createTypeLiteralNode(
|
|
206423
|
+
const typeNode = factory.createTypeLiteralNode(map26(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(
|
|
206368
206424
|
/*modifiers*/
|
|
206369
206425
|
void 0,
|
|
206370
206426
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
@@ -207635,7 +207691,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
207635
207691
|
function convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference) {
|
|
207636
207692
|
const { declarationList } = statement;
|
|
207637
207693
|
let foundImport = false;
|
|
207638
|
-
const converted =
|
|
207694
|
+
const converted = map26(declarationList.declarations, (decl) => {
|
|
207639
207695
|
const { name: name2, initializer: initializer3 } = decl;
|
|
207640
207696
|
if (initializer3) {
|
|
207641
207697
|
if (isExportsOrModuleExportsOrAlias(sourceFile, initializer3)) {
|
|
@@ -207956,9 +208012,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
207956
208012
|
return name2;
|
|
207957
208013
|
}
|
|
207958
208014
|
function collectFreeIdentifiers(file2) {
|
|
207959
|
-
const
|
|
207960
|
-
forEachFreeIdentifier(file2, (id) =>
|
|
207961
|
-
return
|
|
208015
|
+
const map27 = createMultiMap();
|
|
208016
|
+
forEachFreeIdentifier(file2, (id) => map27.add(id.text, id));
|
|
208017
|
+
return map27;
|
|
207962
208018
|
}
|
|
207963
208019
|
function forEachFreeIdentifier(node, cb) {
|
|
207964
208020
|
if (isIdentifier(node) && isFreeIdentifier(node)) cb(node);
|
|
@@ -210760,7 +210816,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
210760
210816
|
));
|
|
210761
210817
|
}
|
|
210762
210818
|
function createExportSpecifiers(names, allowTypeModifier) {
|
|
210763
|
-
return factory.createNodeArray(
|
|
210819
|
+
return factory.createNodeArray(map26(names, (n) => factory.createExportSpecifier(
|
|
210764
210820
|
allowTypeModifier && n.isTypeOnly,
|
|
210765
210821
|
/*propertyName*/
|
|
210766
210822
|
void 0,
|
|
@@ -211646,7 +211702,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211646
211702
|
const checker = context.program.getTypeChecker();
|
|
211647
211703
|
const jsxAttributesNode = info.parentDeclaration.attributes;
|
|
211648
211704
|
const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute);
|
|
211649
|
-
const attrs =
|
|
211705
|
+
const attrs = map26(info.attributes, (attr) => {
|
|
211650
211706
|
const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration);
|
|
211651
211707
|
const name2 = factory.createIdentifier(attr.name);
|
|
211652
211708
|
const jsxAttribute = factory.createJsxAttribute(name2, factory.createJsxExpression(
|
|
@@ -211667,7 +211723,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211667
211723
|
const quotePreference = getQuotePreference(context.sourceFile, context.preferences);
|
|
211668
211724
|
const target = getEmitScriptTarget(context.program.getCompilerOptions());
|
|
211669
211725
|
const checker = context.program.getTypeChecker();
|
|
211670
|
-
const props =
|
|
211726
|
+
const props = map26(info.properties, (prop) => {
|
|
211671
211727
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration);
|
|
211672
211728
|
return factory.createPropertyAssignment(createPropertyNameFromSymbol(prop, target, quotePreference, checker), initializer3);
|
|
211673
211729
|
});
|
|
@@ -211749,7 +211805,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211749
211805
|
return factory.createArrayLiteralExpression();
|
|
211750
211806
|
}
|
|
211751
211807
|
if (isObjectLiteralType(type)) {
|
|
211752
|
-
const props =
|
|
211808
|
+
const props = map26(checker.getPropertiesOfType(type), (prop) => {
|
|
211753
211809
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), enclosingDeclaration);
|
|
211754
211810
|
return factory.createPropertyAssignment(prop.name, initializer3);
|
|
211755
211811
|
});
|
|
@@ -212087,7 +212143,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212087
212143
|
}
|
|
212088
212144
|
}
|
|
212089
212145
|
function updateParameters(importAdder, scriptTarget, node, newParameters) {
|
|
212090
|
-
const parameters =
|
|
212146
|
+
const parameters = map26(node.parameters, (p) => factory.createParameterDeclaration(
|
|
212091
212147
|
p.modifiers,
|
|
212092
212148
|
p.dotDotDotToken,
|
|
212093
212149
|
p.name,
|
|
@@ -212665,7 +212721,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212665
212721
|
jsDocParameterTag.isNameFirst,
|
|
212666
212722
|
jsDocParameterTag.comment
|
|
212667
212723
|
);
|
|
212668
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost,
|
|
212724
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map26(tags, (t2) => t2 === jsDocParameterTag ? newJSDocParameterTag : t2)));
|
|
212669
212725
|
return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name2.getText(sourceFile), parameterName]);
|
|
212670
212726
|
}
|
|
212671
212727
|
function getInfo14(sourceFile, pos) {
|
|
@@ -212781,7 +212837,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212781
212837
|
const elements = token.parent.elements;
|
|
212782
212838
|
const diagnostic = [
|
|
212783
212839
|
elements.length > 1 ? Diagnostics.Remove_unused_declarations_for_Colon_0 : Diagnostics.Remove_unused_declaration_for_Colon_0,
|
|
212784
|
-
|
|
212840
|
+
map26(elements, (e2) => e2.getText(sourceFile)).join(", ")
|
|
212785
212841
|
];
|
|
212786
212842
|
return [
|
|
212787
212843
|
createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t2) => deleteDestructuringElements(t2, sourceFile, token.parent)), diagnostic)
|
|
@@ -214742,7 +214798,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
214742
214798
|
));
|
|
214743
214799
|
}
|
|
214744
214800
|
} else {
|
|
214745
|
-
const paramTags =
|
|
214801
|
+
const paramTags = map26(inferences, ({ name: name2, typeNode, isOptional }) => factory.createJSDocParameterTag(
|
|
214746
214802
|
/*tagName*/
|
|
214747
214803
|
void 0,
|
|
214748
214804
|
name2,
|
|
@@ -215876,8 +215932,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
215876
215932
|
const isJs = isInJSFile(contextNode);
|
|
215877
215933
|
const { typeArguments, arguments: args, parent: parent2 } = call;
|
|
215878
215934
|
const contextualType = isJs ? void 0 : checker.getContextualType(call);
|
|
215879
|
-
const names =
|
|
215880
|
-
const instanceTypes = isJs ? [] :
|
|
215935
|
+
const names = map26(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0);
|
|
215936
|
+
const instanceTypes = isJs ? [] : map26(args, (arg) => checker.getTypeAtLocation(arg));
|
|
215881
215937
|
const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters(
|
|
215882
215938
|
checker,
|
|
215883
215939
|
importAdder,
|
|
@@ -216185,7 +216241,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
216185
216241
|
}
|
|
216186
216242
|
function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
|
|
216187
216243
|
if (length(signatures)) {
|
|
216188
|
-
const type = checker.getUnionType(
|
|
216244
|
+
const type = checker.getUnionType(map26(signatures, checker.getReturnTypeOfSignature));
|
|
216189
216245
|
return checker.typeToTypeNode(type, enclosingDeclaration, 1, 8, getNoopSymbolTrackerWithResolver(context));
|
|
216190
216246
|
}
|
|
216191
216247
|
}
|
|
@@ -218190,7 +218246,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
218190
218246
|
if (elements.length === 0) {
|
|
218191
218247
|
return void 0;
|
|
218192
218248
|
}
|
|
218193
|
-
const newClauses =
|
|
218249
|
+
const newClauses = map26(elements, (element) => factory.createCaseClause(element, []));
|
|
218194
218250
|
const newLineChar = getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options);
|
|
218195
218251
|
const printer = createSnippetPrinter({
|
|
218196
218252
|
removeComments: true,
|
|
@@ -218200,7 +218256,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
218200
218256
|
newLine: getNewLineKind(newLineChar)
|
|
218201
218257
|
});
|
|
218202
218258
|
const printNode = formatContext ? (node) => printer.printAndFormatNode(4, node, sourceFile, formatContext) : (node) => printer.printNode(4, node, sourceFile);
|
|
218203
|
-
const insertText =
|
|
218259
|
+
const insertText = map26(newClauses, (clause, i2) => {
|
|
218204
218260
|
if (preferences.includeCompletionsWithSnippetText) {
|
|
218205
218261
|
return `${printNode(clause)}$${i2 + 1}`;
|
|
218206
218262
|
}
|
|
@@ -221632,17 +221688,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
221632
221688
|
]: 2
|
|
221633
221689
|
};
|
|
221634
221690
|
function createNameAndKindSet() {
|
|
221635
|
-
const
|
|
221691
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
221636
221692
|
function add(value) {
|
|
221637
|
-
const existing =
|
|
221693
|
+
const existing = map27.get(value.name);
|
|
221638
221694
|
if (!existing || kindPrecedence[existing.kind] < kindPrecedence[value.kind]) {
|
|
221639
|
-
|
|
221695
|
+
map27.set(value.name, value);
|
|
221640
221696
|
}
|
|
221641
221697
|
}
|
|
221642
221698
|
return {
|
|
221643
221699
|
add,
|
|
221644
|
-
has:
|
|
221645
|
-
values:
|
|
221700
|
+
has: map27.has.bind(map27),
|
|
221701
|
+
values: map27.values.bind(map27)
|
|
221646
221702
|
};
|
|
221647
221703
|
}
|
|
221648
221704
|
function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program2, log, preferences, includeSymbol) {
|
|
@@ -223024,22 +223080,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
223024
223080
|
return refs;
|
|
223025
223081
|
}
|
|
223026
223082
|
function getDirectImportsMap(sourceFiles, checker, cancellationToken) {
|
|
223027
|
-
const
|
|
223083
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
223028
223084
|
for (const sourceFile of sourceFiles) {
|
|
223029
223085
|
if (cancellationToken) cancellationToken.throwIfCancellationRequested();
|
|
223030
223086
|
forEachImport(sourceFile, (importDecl, moduleSpecifier) => {
|
|
223031
223087
|
const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
|
|
223032
223088
|
if (moduleSymbol) {
|
|
223033
223089
|
const id = getSymbolId(moduleSymbol).toString();
|
|
223034
|
-
let imports =
|
|
223090
|
+
let imports = map27.get(id);
|
|
223035
223091
|
if (!imports) {
|
|
223036
|
-
|
|
223092
|
+
map27.set(id, imports = []);
|
|
223037
223093
|
}
|
|
223038
223094
|
imports.push(importDecl);
|
|
223039
223095
|
}
|
|
223040
223096
|
});
|
|
223041
223097
|
}
|
|
223042
|
-
return
|
|
223098
|
+
return map27;
|
|
223043
223099
|
}
|
|
223044
223100
|
function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
|
|
223045
223101
|
return forEach(sourceFileLike.kind === 308 ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => (
|
|
@@ -223427,7 +223483,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
223427
223483
|
}
|
|
223428
223484
|
}
|
|
223429
223485
|
const checker = program2.getTypeChecker();
|
|
223430
|
-
return
|
|
223486
|
+
return map26(referenceEntries, (entry) => toImplementationLocation(entry, checker));
|
|
223431
223487
|
}
|
|
223432
223488
|
function getImplementationReferenceEntries(program2, cancellationToken, sourceFiles, node, position) {
|
|
223433
223489
|
if (node.kind === 308) {
|
|
@@ -223450,7 +223506,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
223450
223506
|
}
|
|
223451
223507
|
}
|
|
223452
223508
|
function findReferenceOrRenameEntries(program2, cancellationToken, sourceFiles, node, position, options, convertEntry) {
|
|
223453
|
-
return
|
|
223509
|
+
return map26(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options)), (entry) => convertEntry(entry, node, program2.getTypeChecker()));
|
|
223454
223510
|
}
|
|
223455
223511
|
function getReferenceEntriesForNode(position, node, program2, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f3) => f3.fileName))) {
|
|
223456
223512
|
return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options, sourceFilesSet));
|
|
@@ -225330,7 +225386,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
225330
225386
|
const staticBlocks = filter3(classDecl.members, isClassStaticBlockDeclaration);
|
|
225331
225387
|
const containerName = symbol22 ? typeChecker.symbolToString(symbol22, classDecl) : "";
|
|
225332
225388
|
const sourceFile2 = node.getSourceFile();
|
|
225333
|
-
return
|
|
225389
|
+
return map26(staticBlocks, (staticBlock) => {
|
|
225334
225390
|
let { pos } = moveRangePastModifiers(staticBlock);
|
|
225335
225391
|
pos = skipTrivia(sourceFile2.text, pos);
|
|
225336
225392
|
return createDefinitionInfoFromName(
|
|
@@ -225670,7 +225726,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
225670
225726
|
}
|
|
225671
225727
|
const withoutExpandos = filter3(filteredDeclarations, (d) => !isExpandoDeclaration(d));
|
|
225672
225728
|
const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations;
|
|
225673
|
-
return
|
|
225729
|
+
return map26(results, (declaration) => createDefinitionInfo(
|
|
225674
225730
|
declaration,
|
|
225675
225731
|
typeChecker,
|
|
225676
225732
|
symbol2,
|
|
@@ -226897,7 +226953,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226897
226953
|
}
|
|
226898
226954
|
}
|
|
226899
226955
|
function getJSDocTagNameCompletions() {
|
|
226900
|
-
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries =
|
|
226956
|
+
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map26(jsDocTagNames, (tagName) => {
|
|
226901
226957
|
return {
|
|
226902
226958
|
name: tagName,
|
|
226903
226959
|
kind: "keyword",
|
|
@@ -226908,7 +226964,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226908
226964
|
}
|
|
226909
226965
|
var getJSDocTagNameCompletionDetails = getJSDocTagCompletionDetails;
|
|
226910
226966
|
function getJSDocTagCompletions() {
|
|
226911
|
-
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries =
|
|
226967
|
+
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = map26(jsDocTagNames, (tagName) => {
|
|
226912
226968
|
return {
|
|
226913
226969
|
name: `@${tagName}`,
|
|
226914
226970
|
kind: "keyword",
|
|
@@ -227740,7 +227796,7 @@ ${content}
|
|
|
227740
227796
|
return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText);
|
|
227741
227797
|
}
|
|
227742
227798
|
function getNewImportSpecifiers(namedImports) {
|
|
227743
|
-
return flatMap(namedImports, (namedImport) =>
|
|
227799
|
+
return flatMap(namedImports, (namedImport) => map26(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier(
|
|
227744
227800
|
importSpecifier,
|
|
227745
227801
|
importSpecifier.isTypeOnly,
|
|
227746
227802
|
/*propertyName*/
|
|
@@ -228906,7 +228962,7 @@ ${content}
|
|
|
228906
228962
|
/*meaning*/
|
|
228907
228963
|
void 0
|
|
228908
228964
|
) : emptyArray;
|
|
228909
|
-
const items =
|
|
228965
|
+
const items = map26(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile));
|
|
228910
228966
|
let selectedItemIndex = 0;
|
|
228911
228967
|
let itemsSeen = 0;
|
|
228912
228968
|
for (let i2 = 0; i2 < items.length; i2++) {
|
|
@@ -228966,7 +229022,7 @@ ${content}
|
|
|
228966
229022
|
), spacePart()];
|
|
228967
229023
|
function getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) {
|
|
228968
229024
|
const infos = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile);
|
|
228969
|
-
return
|
|
229025
|
+
return map26(infos, ({ isVariadic, parameters, prefix, suffix }) => {
|
|
228970
229026
|
const prefixDisplayParts = [...callTargetDisplayParts, ...prefix];
|
|
228971
229027
|
const suffixDisplayParts = [...suffix, ...returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)];
|
|
228972
229028
|
const documentation = candidateSignature.getDocumentationComment(checker);
|
|
@@ -229004,7 +229060,7 @@ ${content}
|
|
|
229004
229060
|
const parameters = (typeParameters || emptyArray).map((t2) => createSignatureHelpParameterForTypeParameter(t2, checker, enclosingDeclaration, sourceFile, printer));
|
|
229005
229061
|
const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
|
|
229006
229062
|
return checker.getExpandedParameters(candidateSignature).map((paramList) => {
|
|
229007
|
-
const params = factory.createNodeArray([...thisParameter, ...
|
|
229063
|
+
const params = factory.createNodeArray([...thisParameter, ...map26(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]);
|
|
229008
229064
|
const parameterParts = mapToDisplayParts((writer) => {
|
|
229009
229065
|
printer.writeList(2576, params, sourceFile, writer);
|
|
229010
229066
|
});
|
|
@@ -233908,9 +233964,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
233908
233964
|
return mask2;
|
|
233909
233965
|
}
|
|
233910
233966
|
function createRulesMap(rules) {
|
|
233911
|
-
const
|
|
233967
|
+
const map27 = buildMap(rules);
|
|
233912
233968
|
return (context) => {
|
|
233913
|
-
const bucket =
|
|
233969
|
+
const bucket = map27[getRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind)];
|
|
233914
233970
|
if (bucket) {
|
|
233915
233971
|
const rules2 = [];
|
|
233916
233972
|
let ruleActionMask = 0;
|
|
@@ -233928,22 +233984,22 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
233928
233984
|
};
|
|
233929
233985
|
}
|
|
233930
233986
|
function buildMap(rules) {
|
|
233931
|
-
const
|
|
233932
|
-
const rulesBucketConstructionStateList = new Array(
|
|
233987
|
+
const map27 = new Array(mapRowLength * mapRowLength);
|
|
233988
|
+
const rulesBucketConstructionStateList = new Array(map27.length);
|
|
233933
233989
|
for (const rule2 of rules) {
|
|
233934
233990
|
const specificRule = rule2.leftTokenRange.isSpecific && rule2.rightTokenRange.isSpecific;
|
|
233935
233991
|
for (const left of rule2.leftTokenRange.tokens) {
|
|
233936
233992
|
for (const right of rule2.rightTokenRange.tokens) {
|
|
233937
233993
|
const index = getRuleBucketIndex(left, right);
|
|
233938
|
-
let rulesBucket =
|
|
233994
|
+
let rulesBucket = map27[index];
|
|
233939
233995
|
if (rulesBucket === void 0) {
|
|
233940
|
-
rulesBucket =
|
|
233996
|
+
rulesBucket = map27[index] = [];
|
|
233941
233997
|
}
|
|
233942
233998
|
addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList, index);
|
|
233943
233999
|
}
|
|
233944
234000
|
}
|
|
233945
234001
|
}
|
|
233946
|
-
return
|
|
234002
|
+
return map27;
|
|
233947
234003
|
}
|
|
233948
234004
|
function getRuleBucketIndex(row, column) {
|
|
233949
234005
|
Debug.assert(row <= 166 && column <= 166, "Must compute formatting context from tokens");
|
|
@@ -237521,7 +237577,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
237521
237577
|
makeImport: () => makeImport,
|
|
237522
237578
|
makeStringLiteral: () => makeStringLiteral,
|
|
237523
237579
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
237524
|
-
map: () =>
|
|
237580
|
+
map: () => map26,
|
|
237525
237581
|
mapAllOrFail: () => mapAllOrFail,
|
|
237526
237582
|
mapDefined: () => mapDefined,
|
|
237527
237583
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -238636,19 +238692,19 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
238636
238692
|
return fileName;
|
|
238637
238693
|
}
|
|
238638
238694
|
function createNormalizedPathMap() {
|
|
238639
|
-
const
|
|
238695
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
238640
238696
|
return {
|
|
238641
238697
|
get(path2) {
|
|
238642
|
-
return
|
|
238698
|
+
return map27.get(path2);
|
|
238643
238699
|
},
|
|
238644
238700
|
set(path2, value) {
|
|
238645
|
-
|
|
238701
|
+
map27.set(path2, value);
|
|
238646
238702
|
},
|
|
238647
238703
|
contains(path2) {
|
|
238648
|
-
return
|
|
238704
|
+
return map27.has(path2);
|
|
238649
238705
|
},
|
|
238650
238706
|
remove(path2) {
|
|
238651
|
-
|
|
238707
|
+
map27.delete(path2);
|
|
238652
238708
|
}
|
|
238653
238709
|
};
|
|
238654
238710
|
}
|
|
@@ -240196,7 +240252,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
240196
240252
|
if (!this.languageServiceEnabled) {
|
|
240197
240253
|
return this.getRootScriptInfos();
|
|
240198
240254
|
}
|
|
240199
|
-
return
|
|
240255
|
+
return map26(this.program.getSourceFiles(), (sourceFile) => {
|
|
240200
240256
|
const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
240201
240257
|
Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`);
|
|
240202
240258
|
return scriptInfo;
|
|
@@ -241877,17 +241933,17 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
241877
241933
|
var CloseFileWatcherEvent = "closeFileWatcher";
|
|
241878
241934
|
var ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*";
|
|
241879
241935
|
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
|
|
241880
|
-
const
|
|
241936
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
241881
241937
|
for (const option of commandLineOptions) {
|
|
241882
241938
|
if (typeof option.type === "object") {
|
|
241883
241939
|
const optionMap = option.type;
|
|
241884
241940
|
optionMap.forEach((value) => {
|
|
241885
241941
|
Debug.assert(typeof value === "number");
|
|
241886
241942
|
});
|
|
241887
|
-
|
|
241943
|
+
map27.set(option.name, optionMap);
|
|
241888
241944
|
}
|
|
241889
241945
|
}
|
|
241890
|
-
return
|
|
241946
|
+
return map27;
|
|
241891
241947
|
}
|
|
241892
241948
|
var compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(optionDeclarations);
|
|
241893
241949
|
var watchOptionsConverters = prepareConvertersForEnumLikeCompilerOptions(optionsForWatch);
|
|
@@ -245687,7 +245743,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
245687
245743
|
async enableRequestedPluginsWorker(pendingPlugins) {
|
|
245688
245744
|
Debug.assert(this.currentPluginEnablementPromise === void 0);
|
|
245689
245745
|
let sendProjectsUpdatedInBackgroundEvent = false;
|
|
245690
|
-
await Promise.all(
|
|
245746
|
+
await Promise.all(map26(pendingPlugins, async ([project, promises]) => {
|
|
245691
245747
|
const results = await Promise.all(promises);
|
|
245692
245748
|
if (project.isClosed() || isProjectDeferredClose(project)) {
|
|
245693
245749
|
this.logger.info(`Cancelling plugin enabling for ${project.getProjectName()} as it is ${project.isClosed() ? "closed" : "deferred close"}`);
|
|
@@ -246023,7 +246079,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
246023
246079
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
246024
246080
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
246025
246081
|
source: diag2.source,
|
|
246026
|
-
relatedInformation:
|
|
246082
|
+
relatedInformation: map26(diag2.relatedInformation, formatRelatedInformation)
|
|
246027
246083
|
};
|
|
246028
246084
|
}
|
|
246029
246085
|
function formatRelatedInformation(info) {
|
|
@@ -246064,7 +246120,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
246064
246120
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
246065
246121
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
246066
246122
|
source,
|
|
246067
|
-
relatedInformation:
|
|
246123
|
+
relatedInformation: map26(diag2.relatedInformation, formatRelatedInformation)
|
|
246068
246124
|
};
|
|
246069
246125
|
return includeFileName ? { ...common, fileName: diag2.file && diag2.file.fileName } : common;
|
|
246070
246126
|
}
|
|
@@ -246577,7 +246633,7 @@ ${json2}${newLine}`;
|
|
|
246577
246633
|
if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) {
|
|
246578
246634
|
return this.requiredResponse(result);
|
|
246579
246635
|
}
|
|
246580
|
-
const converted =
|
|
246636
|
+
const converted = map26(result, (p) => {
|
|
246581
246637
|
if (!p.projectErrors || p.projectErrors.length === 0) {
|
|
246582
246638
|
return p;
|
|
246583
246639
|
}
|
|
@@ -247649,7 +247705,7 @@ ${json2}${newLine}`;
|
|
|
247649
247705
|
this.event({
|
|
247650
247706
|
triggerFile: event.data.triggerFile,
|
|
247651
247707
|
configFile: event.data.configFileName,
|
|
247652
|
-
diagnostics:
|
|
247708
|
+
diagnostics: map26(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol(
|
|
247653
247709
|
diagnostic,
|
|
247654
247710
|
/*includeFileName*/
|
|
247655
247711
|
true
|
|
@@ -247990,7 +248046,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
247990
248046
|
concatenate(projectErrors, optionsErrors),
|
|
247991
248047
|
(diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile
|
|
247992
248048
|
);
|
|
247993
|
-
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) :
|
|
248049
|
+
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map26(
|
|
247994
248050
|
diagnosticsForConfigFile,
|
|
247995
248051
|
(diagnostic) => formatDiagnosticToProtocol(
|
|
247996
248052
|
diagnostic,
|
|
@@ -248015,7 +248071,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248015
248071
|
// TODO: GH#18217
|
|
248016
248072
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
248017
248073
|
reportsDeprecated: d.reportsDeprecated,
|
|
248018
|
-
relatedInformation:
|
|
248074
|
+
relatedInformation: map26(d.relatedInformation, formatRelatedInformation)
|
|
248019
248075
|
}));
|
|
248020
248076
|
}
|
|
248021
248077
|
getCompilerOptionsDiagnostics(args) {
|
|
@@ -248043,7 +248099,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248043
248099
|
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length),
|
|
248044
248100
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
248045
248101
|
reportsDeprecated: d.reportsDeprecated,
|
|
248046
|
-
relatedInformation:
|
|
248102
|
+
relatedInformation: map26(d.relatedInformation, formatRelatedInformation)
|
|
248047
248103
|
})
|
|
248048
248104
|
);
|
|
248049
248105
|
}
|
|
@@ -248623,14 +248679,14 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248623
248679
|
}
|
|
248624
248680
|
}
|
|
248625
248681
|
toSpanGroups(locations) {
|
|
248626
|
-
const
|
|
248682
|
+
const map27 = /* @__PURE__ */ new Map();
|
|
248627
248683
|
for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _3, originalFileName: _1, ...prefixSuffixText } of locations) {
|
|
248628
|
-
let group2 =
|
|
248629
|
-
if (!group2)
|
|
248684
|
+
let group2 = map27.get(fileName);
|
|
248685
|
+
if (!group2) map27.set(fileName, group2 = { file: fileName, locs: [] });
|
|
248630
248686
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName));
|
|
248631
248687
|
group2.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText });
|
|
248632
248688
|
}
|
|
248633
|
-
return arrayFrom(
|
|
248689
|
+
return arrayFrom(map27.values());
|
|
248634
248690
|
}
|
|
248635
248691
|
getReferences(args, simplifiedResult) {
|
|
248636
248692
|
const file2 = toNormalizedPath(args.file);
|
|
@@ -248950,7 +249006,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248950
249006
|
false
|
|
248951
249007
|
) })) : result.map((details) => ({
|
|
248952
249008
|
...details,
|
|
248953
|
-
codeActions:
|
|
249009
|
+
codeActions: map26(details.codeActions, (action) => this.mapCodeAction(action)),
|
|
248954
249010
|
documentation: this.mapDisplayParts(details.documentation, project),
|
|
248955
249011
|
tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts)
|
|
248956
249012
|
}));
|
|
@@ -249090,7 +249146,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249090
249146
|
this.projectService.closeClientFile(file2);
|
|
249091
249147
|
}
|
|
249092
249148
|
mapLocationNavigationBarItems(items, scriptInfo) {
|
|
249093
|
-
return
|
|
249149
|
+
return map26(items, (item) => ({
|
|
249094
249150
|
text: item.text,
|
|
249095
249151
|
kind: item.kind,
|
|
249096
249152
|
kindModifiers: item.kindModifiers,
|
|
@@ -249111,7 +249167,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249111
249167
|
kindModifiers: tree.kindModifiers,
|
|
249112
249168
|
spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)),
|
|
249113
249169
|
nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo),
|
|
249114
|
-
childItems:
|
|
249170
|
+
childItems: map26(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo))
|
|
249115
249171
|
};
|
|
249116
249172
|
}
|
|
249117
249173
|
getNavigationTree(args, simplifiedResult) {
|
|
@@ -249503,7 +249559,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
249503
249559
|
const { locations } = args;
|
|
249504
249560
|
const { file: file2, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
249505
249561
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file2));
|
|
249506
|
-
return
|
|
249562
|
+
return map26(locations, (location) => {
|
|
249507
249563
|
const pos = this.getPosition(location, scriptInfo);
|
|
249508
249564
|
const selectionRange = languageService.getSmartSelectionRange(file2, pos);
|
|
249509
249565
|
return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange;
|
|
@@ -253063,9 +253119,9 @@ var init_js_yaml = __esm({
|
|
|
253063
253119
|
create: () => ({}),
|
|
253064
253120
|
identify: isPlainObject,
|
|
253065
253121
|
represent: (o) => {
|
|
253066
|
-
const
|
|
253067
|
-
for (const key of Object.keys(o))
|
|
253068
|
-
return
|
|
253122
|
+
const map26 = /* @__PURE__ */ new Map();
|
|
253123
|
+
for (const key of Object.keys(o)) map26.set(key, o[key]);
|
|
253124
|
+
return map26;
|
|
253069
253125
|
},
|
|
253070
253126
|
addPair: (container, key, value) => {
|
|
253071
253127
|
if (key !== null && typeof key === "object") return "object-based map does not support complex keys";
|
|
@@ -253090,9 +253146,9 @@ var init_js_yaml = __esm({
|
|
|
253090
253146
|
create: () => /* @__PURE__ */ new Set(),
|
|
253091
253147
|
identify: (data) => data instanceof Set,
|
|
253092
253148
|
represent: (data) => {
|
|
253093
|
-
const
|
|
253094
|
-
for (const key of data)
|
|
253095
|
-
return
|
|
253149
|
+
const map26 = /* @__PURE__ */ new Map();
|
|
253150
|
+
for (const key of data) map26.set(key, null);
|
|
253151
|
+
return map26;
|
|
253096
253152
|
},
|
|
253097
253153
|
addPair: (container, key, value) => {
|
|
253098
253154
|
if (value !== null) return "cannot resolve a set item";
|
|
@@ -253205,19 +253261,19 @@ var init_js_yaml = __esm({
|
|
|
253205
253261
|
identify: (data) => data instanceof Map || isPlainObject(data),
|
|
253206
253262
|
represent: (data) => {
|
|
253207
253263
|
if (data instanceof Map) return data;
|
|
253208
|
-
const
|
|
253264
|
+
const map26 = /* @__PURE__ */ new Map();
|
|
253209
253265
|
const obj = data;
|
|
253210
|
-
for (const key of Object.keys(obj))
|
|
253211
|
-
return
|
|
253266
|
+
for (const key of Object.keys(obj)) map26.set(key, obj[key]);
|
|
253267
|
+
return map26;
|
|
253212
253268
|
}
|
|
253213
253269
|
});
|
|
253214
253270
|
legacyMapTag = defineMappingTag("tag:yaml.org,2002:map", {
|
|
253215
253271
|
create: () => ({}),
|
|
253216
253272
|
identify: isPlainObject,
|
|
253217
253273
|
represent: (o) => {
|
|
253218
|
-
const
|
|
253219
|
-
for (const key of Object.keys(o))
|
|
253220
|
-
return
|
|
253274
|
+
const map26 = /* @__PURE__ */ new Map();
|
|
253275
|
+
for (const key of Object.keys(o)) map26.set(key, o[key]);
|
|
253276
|
+
return map26;
|
|
253221
253277
|
},
|
|
253222
253278
|
addPair: (container, key, value) => {
|
|
253223
253279
|
const normalizedKey = normalizeKey(key);
|
|
@@ -266533,10 +266589,10 @@ var require_async3 = __commonJS({
|
|
|
266533
266589
|
return eachOfImplementation(coll, wrapAsync(iteratee), callback);
|
|
266534
266590
|
}
|
|
266535
266591
|
var eachOf$1 = awaitify(eachOf, 3);
|
|
266536
|
-
function
|
|
266592
|
+
function map26(coll, iteratee, callback) {
|
|
266537
266593
|
return _asyncMap(eachOf$1, coll, iteratee, callback);
|
|
266538
266594
|
}
|
|
266539
|
-
var map$1 = awaitify(
|
|
266595
|
+
var map$1 = awaitify(map26, 3);
|
|
266540
266596
|
var applyEach$1 = applyEach(map$1);
|
|
266541
266597
|
function eachOfSeries(coll, iteratee, callback) {
|
|
266542
266598
|
return eachOfLimit$2(coll, 1, iteratee, callback);
|
|
@@ -271346,8 +271402,8 @@ var require_lodash3 = __commonJS({
|
|
|
271346
271402
|
return apply(func, this, otherArgs);
|
|
271347
271403
|
};
|
|
271348
271404
|
}
|
|
271349
|
-
function getMapData(
|
|
271350
|
-
var data =
|
|
271405
|
+
function getMapData(map26, key) {
|
|
271406
|
+
var data = map26.__data__;
|
|
271351
271407
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
271352
271408
|
}
|
|
271353
271409
|
function getNative(object3, key) {
|
|
@@ -271751,8 +271807,8 @@ var require_lodash4 = __commonJS({
|
|
|
271751
271807
|
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop3 : function(values) {
|
|
271752
271808
|
return new Set2(values);
|
|
271753
271809
|
};
|
|
271754
|
-
function getMapData(
|
|
271755
|
-
var data =
|
|
271810
|
+
function getMapData(map26, key) {
|
|
271811
|
+
var data = map26.__data__;
|
|
271756
271812
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
271757
271813
|
}
|
|
271758
271814
|
function getNative(object3, key) {
|
|
@@ -286238,6 +286294,9 @@ var init_helpers2 = __esm({
|
|
|
286238
286294
|
params: cmd.params || payload.params || [],
|
|
286239
286295
|
secrets: cmd.secrets || payload.secrets || [],
|
|
286240
286296
|
envSecrets: cmd.envSecrets || payload.envSecrets || [],
|
|
286297
|
+
/* Only sent when set, so gcli still works against an API
|
|
286298
|
+
without the field. */
|
|
286299
|
+
...cmd.bodyLimit ?? payload.bodyLimit ? { bodyLimit: String(cmd.bodyLimit ?? payload.bodyLimit) } : {},
|
|
286241
286300
|
clusterId,
|
|
286242
286301
|
network: cmd.network || payload.network || ["public", "private"],
|
|
286243
286302
|
federation: cmd.federation ?? !!payload.federation,
|
|
@@ -287322,8 +287381,8 @@ var init_parseUtil = __esm({
|
|
|
287322
287381
|
}
|
|
287323
287382
|
let errorMessage = "";
|
|
287324
287383
|
const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
|
|
287325
|
-
for (const
|
|
287326
|
-
errorMessage =
|
|
287384
|
+
for (const map26 of maps) {
|
|
287385
|
+
errorMessage = map26(fullIssue, { data, defaultError: errorMessage }).message;
|
|
287327
287386
|
}
|
|
287328
287387
|
return {
|
|
287329
287388
|
...issueData,
|
|
@@ -293845,19 +293904,19 @@ var init_schemas = __esm({
|
|
|
293845
293904
|
});
|
|
293846
293905
|
const disc = cached(() => {
|
|
293847
293906
|
const opts = def.options;
|
|
293848
|
-
const
|
|
293907
|
+
const map26 = /* @__PURE__ */ new Map();
|
|
293849
293908
|
for (const o of opts) {
|
|
293850
293909
|
const values = o._zod.propValues?.[def.discriminator];
|
|
293851
293910
|
if (!values || values.size === 0)
|
|
293852
293911
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
293853
293912
|
for (const v of values) {
|
|
293854
|
-
if (
|
|
293913
|
+
if (map26.has(v)) {
|
|
293855
293914
|
throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
293856
293915
|
}
|
|
293857
|
-
|
|
293916
|
+
map26.set(v, o);
|
|
293858
293917
|
}
|
|
293859
293918
|
}
|
|
293860
|
-
return
|
|
293919
|
+
return map26;
|
|
293861
293920
|
});
|
|
293862
293921
|
inst._zod.parse = (payload, ctx) => {
|
|
293863
293922
|
const input = payload.value;
|
|
@@ -304478,9 +304537,9 @@ var init_schemas3 = __esm({
|
|
|
304478
304537
|
});
|
|
304479
304538
|
|
|
304480
304539
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
304481
|
-
function setErrorMap(
|
|
304540
|
+
function setErrorMap(map26) {
|
|
304482
304541
|
config({
|
|
304483
|
-
customError:
|
|
304542
|
+
customError: map26
|
|
304484
304543
|
});
|
|
304485
304544
|
}
|
|
304486
304545
|
function getErrorMap2() {
|
|
@@ -319233,6 +319292,189 @@ var init_list_crons = __esm({
|
|
|
319233
319292
|
}
|
|
319234
319293
|
});
|
|
319235
319294
|
|
|
319295
|
+
// src/commands/triggers/message-queue/list.ts
|
|
319296
|
+
var list_exports7 = {};
|
|
319297
|
+
__export(list_exports7, {
|
|
319298
|
+
default: () => list_default7
|
|
319299
|
+
});
|
|
319300
|
+
var import_rxjs50, import_operators40, list_default7;
|
|
319301
|
+
var init_list7 = __esm({
|
|
319302
|
+
"src/commands/triggers/message-queue/list.ts"() {
|
|
319303
|
+
import_rxjs50 = __toESM(require_cjs());
|
|
319304
|
+
import_operators40 = __toESM(require_operators());
|
|
319305
|
+
init_helpers();
|
|
319306
|
+
init_gql_client();
|
|
319307
|
+
init_log();
|
|
319308
|
+
list_default7 = (cmd) => (0, import_rxjs50.lastValueFrom)(
|
|
319309
|
+
parseProjectId(cmd.project).pipe(
|
|
319310
|
+
(0, import_operators40.switchMap)(
|
|
319311
|
+
(projectId) => GraphqlClienAPI.listMessageQueueTriggers(projectId)
|
|
319312
|
+
),
|
|
319313
|
+
(0, import_operators40.tap)((triggers) => {
|
|
319314
|
+
Logger.log("-------------------");
|
|
319315
|
+
Logger.log("[Action][listMessageQueueTriggers]");
|
|
319316
|
+
if (!triggers?.length) {
|
|
319317
|
+
Logger.info("No message-queue triggers yet. See mq-trigger:create.");
|
|
319318
|
+
} else {
|
|
319319
|
+
Logger.table(
|
|
319320
|
+
triggers.map((t2) => ({
|
|
319321
|
+
name: t2.name,
|
|
319322
|
+
lambda: t2.lambdaName,
|
|
319323
|
+
requestTopic: t2.requestTopic,
|
|
319324
|
+
responseTopic: t2.responseTopic ?? "",
|
|
319325
|
+
errorTopic: t2.errorTopic ?? "",
|
|
319326
|
+
cluster: t2.clusterName ?? "Shared"
|
|
319327
|
+
}))
|
|
319328
|
+
);
|
|
319329
|
+
}
|
|
319330
|
+
Logger.log("-------------------");
|
|
319331
|
+
})
|
|
319332
|
+
)
|
|
319333
|
+
);
|
|
319334
|
+
}
|
|
319335
|
+
});
|
|
319336
|
+
|
|
319337
|
+
// src/commands/triggers/message-queue/save.ts
|
|
319338
|
+
var save_exports = {};
|
|
319339
|
+
__export(save_exports, {
|
|
319340
|
+
default: () => save_default,
|
|
319341
|
+
mergeOverExisting: () => mergeOverExisting,
|
|
319342
|
+
toTriggerInput: () => toTriggerInput
|
|
319343
|
+
});
|
|
319344
|
+
var import_rxjs51, import_operators41, int2, toTriggerInput, mergeOverExisting, save_default;
|
|
319345
|
+
var init_save = __esm({
|
|
319346
|
+
"src/commands/triggers/message-queue/save.ts"() {
|
|
319347
|
+
import_rxjs51 = __toESM(require_cjs());
|
|
319348
|
+
import_operators41 = __toESM(require_operators());
|
|
319349
|
+
init_helpers();
|
|
319350
|
+
init_gql_client();
|
|
319351
|
+
init_log();
|
|
319352
|
+
int2 = (value, flag) => {
|
|
319353
|
+
if (value === void 0) {
|
|
319354
|
+
return void 0;
|
|
319355
|
+
}
|
|
319356
|
+
const n = Number(value);
|
|
319357
|
+
if (!Number.isInteger(n) || n < 0) {
|
|
319358
|
+
throw new Error(`--${flag} must be a whole number, got "${value}"`);
|
|
319359
|
+
}
|
|
319360
|
+
return n;
|
|
319361
|
+
};
|
|
319362
|
+
toTriggerInput = (mode, cmd) => {
|
|
319363
|
+
if (mode === "create" && (!cmd.lambda || !cmd.requestTopic)) {
|
|
319364
|
+
throw new Error("mq-trigger:create needs --lambda and --request-topic");
|
|
319365
|
+
}
|
|
319366
|
+
const input = {
|
|
319367
|
+
name: cmd.name,
|
|
319368
|
+
lambdaName: cmd.lambda,
|
|
319369
|
+
requestTopic: cmd.requestTopic,
|
|
319370
|
+
responseTopic: cmd.responseTopic,
|
|
319371
|
+
errorTopic: cmd.errorTopic,
|
|
319372
|
+
rabbitMqId: cmd.broker,
|
|
319373
|
+
maxRetries: int2(cmd.maxRetries, "max-retries"),
|
|
319374
|
+
coolDownPeriod: int2(cmd.coolDownPeriod, "cool-down-period"),
|
|
319375
|
+
pollingInterval: int2(cmd.pollingInterval, "polling-interval"),
|
|
319376
|
+
minReplicaCount: int2(cmd.minReplicas, "min-replicas"),
|
|
319377
|
+
maxReplicaCount: int2(cmd.maxReplicas, "max-replicas"),
|
|
319378
|
+
threshold: int2(cmd.threshold, "threshold")
|
|
319379
|
+
};
|
|
319380
|
+
return Object.fromEntries(
|
|
319381
|
+
Object.entries(input).filter(([, v]) => v !== void 0)
|
|
319382
|
+
);
|
|
319383
|
+
};
|
|
319384
|
+
mergeOverExisting = (existing, changes) => {
|
|
319385
|
+
if (!existing) {
|
|
319386
|
+
throw new Error(
|
|
319387
|
+
`mq-trigger-not-found: no trigger named "${changes.name}" (see mq-trigger:list)`
|
|
319388
|
+
);
|
|
319389
|
+
}
|
|
319390
|
+
const current = {
|
|
319391
|
+
name: existing.name,
|
|
319392
|
+
lambdaName: existing.lambdaName,
|
|
319393
|
+
requestTopic: existing.requestTopic,
|
|
319394
|
+
responseTopic: existing.responseTopic ?? void 0,
|
|
319395
|
+
errorTopic: existing.errorTopic ?? void 0,
|
|
319396
|
+
rabbitMqId: existing.rabbitMqId ?? void 0,
|
|
319397
|
+
maxRetries: existing.maxRetries ?? void 0,
|
|
319398
|
+
coolDownPeriod: existing.coolDownPeriod ?? void 0,
|
|
319399
|
+
pollingInterval: existing.pollingInterval ?? void 0,
|
|
319400
|
+
minReplicaCount: existing.minReplicaCount ?? void 0,
|
|
319401
|
+
maxReplicaCount: existing.maxReplicaCount ?? void 0,
|
|
319402
|
+
threshold: existing.threshold ?? void 0
|
|
319403
|
+
};
|
|
319404
|
+
return Object.fromEntries(
|
|
319405
|
+
Object.entries({ ...current, ...changes }).filter(
|
|
319406
|
+
([, v]) => v !== void 0
|
|
319407
|
+
)
|
|
319408
|
+
);
|
|
319409
|
+
};
|
|
319410
|
+
save_default = (mode, cmd) => (0, import_rxjs51.lastValueFrom)(
|
|
319411
|
+
parseProjectId(cmd.project).pipe(
|
|
319412
|
+
(0, import_operators41.switchMap)((projectId) => {
|
|
319413
|
+
const changes = toTriggerInput(mode, cmd);
|
|
319414
|
+
const payload$ = mode === "create" ? (0, import_rxjs51.of)(changes) : GraphqlClienAPI.listMessageQueueTriggers(projectId).pipe(
|
|
319415
|
+
(0, import_operators41.map)(
|
|
319416
|
+
(triggers) => mergeOverExisting(
|
|
319417
|
+
triggers.find((t2) => t2.name === cmd.name),
|
|
319418
|
+
changes
|
|
319419
|
+
)
|
|
319420
|
+
)
|
|
319421
|
+
);
|
|
319422
|
+
return payload$.pipe(
|
|
319423
|
+
(0, import_operators41.switchMap)(
|
|
319424
|
+
(payload) => GraphqlClienAPI.saveMessageQueueTrigger(mode, projectId, payload)
|
|
319425
|
+
)
|
|
319426
|
+
);
|
|
319427
|
+
}),
|
|
319428
|
+
(0, import_operators41.tap)((trigger) => {
|
|
319429
|
+
Logger.log("-------------------");
|
|
319430
|
+
Logger.log(`[Action][${mode}MessageQueueTrigger]`);
|
|
319431
|
+
Logger.table([
|
|
319432
|
+
{
|
|
319433
|
+
name: trigger.name,
|
|
319434
|
+
lambda: trigger.lambdaName,
|
|
319435
|
+
requestTopic: trigger.requestTopic,
|
|
319436
|
+
responseTopic: trigger.responseTopic ?? "",
|
|
319437
|
+
errorTopic: trigger.errorTopic ?? ""
|
|
319438
|
+
}
|
|
319439
|
+
]);
|
|
319440
|
+
Logger.log("-------------------");
|
|
319441
|
+
})
|
|
319442
|
+
)
|
|
319443
|
+
);
|
|
319444
|
+
}
|
|
319445
|
+
});
|
|
319446
|
+
|
|
319447
|
+
// src/commands/triggers/message-queue/delete.ts
|
|
319448
|
+
var delete_exports4 = {};
|
|
319449
|
+
__export(delete_exports4, {
|
|
319450
|
+
default: () => delete_default4
|
|
319451
|
+
});
|
|
319452
|
+
var import_rxjs52, import_operators42, delete_default4;
|
|
319453
|
+
var init_delete4 = __esm({
|
|
319454
|
+
"src/commands/triggers/message-queue/delete.ts"() {
|
|
319455
|
+
import_rxjs52 = __toESM(require_cjs());
|
|
319456
|
+
import_operators42 = __toESM(require_operators());
|
|
319457
|
+
init_helpers();
|
|
319458
|
+
init_gql_client();
|
|
319459
|
+
init_log();
|
|
319460
|
+
delete_default4 = (cmd) => (0, import_rxjs52.lastValueFrom)(
|
|
319461
|
+
parseProjectId(cmd.project).pipe(
|
|
319462
|
+
(0, import_operators42.switchMap)(
|
|
319463
|
+
(projectId) => GraphqlClienAPI.deleteMessageQueueTrigger(projectId, cmd.name)
|
|
319464
|
+
),
|
|
319465
|
+
(0, import_operators42.tap)((trigger) => {
|
|
319466
|
+
Logger.log("-------------------");
|
|
319467
|
+
Logger.log("[Action][deleteMessageQueueTrigger]");
|
|
319468
|
+
Logger.info(
|
|
319469
|
+
`Deleted trigger ${trigger?.name ?? cmd.name}${trigger?.lambdaName ? ` (lambda ${trigger.lambdaName})` : ""}`
|
|
319470
|
+
);
|
|
319471
|
+
Logger.log("-------------------");
|
|
319472
|
+
})
|
|
319473
|
+
)
|
|
319474
|
+
);
|
|
319475
|
+
}
|
|
319476
|
+
});
|
|
319477
|
+
|
|
319236
319478
|
// src/main.ts
|
|
319237
319479
|
var main_exports = {};
|
|
319238
319480
|
__export(main_exports, {
|
|
@@ -319432,6 +319674,10 @@ function registerLambdaCommands(program2) {
|
|
|
319432
319674
|
"--envSecrets <envSecrets...>",
|
|
319433
319675
|
"List of kubernetes secret names projected into process.env (graphql environment only)"
|
|
319434
319676
|
],
|
|
319677
|
+
[
|
|
319678
|
+
"--bodyLimit <bodyLimit>",
|
|
319679
|
+
"Largest request body the lambda accepts, e.g. 20mb (default 10mb, max 100mb)"
|
|
319680
|
+
],
|
|
319435
319681
|
[
|
|
319436
319682
|
"--network <network>",
|
|
319437
319683
|
"Can be private or public meaning exposed to the router or just for private available can be both also --network private --network public"
|
|
@@ -319658,6 +319904,27 @@ function registerCronTriggerCommands(program2) {
|
|
|
319658
319904
|
program2.command("cron:list").description("List of all cron jobs for project").option("-p, --project <project>").action(lazy(() => Promise.resolve().then(() => (init_list_crons(), list_crons_exports)).then((m2) => m2.default)));
|
|
319659
319905
|
}
|
|
319660
319906
|
|
|
319907
|
+
// src/commands/triggers/message-queue/index.ts
|
|
319908
|
+
init_helpers();
|
|
319909
|
+
var triggerOptions = (command) => command.option("-p, --project <project>").requiredOption("-n, --name <name>", "Trigger name").option("-l, --lambda <lambda>", "Lambda the trigger runs per message").option("--request-topic <queue>", "Queue the trigger consumes").option("--response-topic <queue>", "Queue for the lambda response").option("--error-topic <queue>", "Queue for failed messages").option(
|
|
319910
|
+
"--broker <rabbitMqId>",
|
|
319911
|
+
"RabbitMQ broker id (see rabbitmq:list) - needed when several brokers share queue names"
|
|
319912
|
+
).option("--max-retries <n>").option("--cool-down-period <seconds>").option("--polling-interval <seconds>").option("--min-replicas <n>").option("--max-replicas <n>").option("--threshold <n>", "Messages per replica before scaling out");
|
|
319913
|
+
function registerMessageQueueTriggerCommands(program2) {
|
|
319914
|
+
program2.command("mq-trigger:list").description("List the message-queue triggers of a project").option("-p, --project <project>").action(lazy(() => Promise.resolve().then(() => (init_list7(), list_exports7)).then((m2) => m2.default)));
|
|
319915
|
+
triggerOptions(
|
|
319916
|
+
program2.command("mq-trigger:create").description("Run a lambda for every message on a RabbitMQ queue")
|
|
319917
|
+
).action(
|
|
319918
|
+
lazy(() => Promise.resolve().then(() => (init_save(), save_exports)).then((m2) => (cmd) => m2.default("create", cmd)))
|
|
319919
|
+
);
|
|
319920
|
+
triggerOptions(
|
|
319921
|
+
program2.command("mq-trigger:update").description("Change a message-queue trigger (same flags as create)")
|
|
319922
|
+
).action(
|
|
319923
|
+
lazy(() => Promise.resolve().then(() => (init_save(), save_exports)).then((m2) => (cmd) => m2.default("update", cmd)))
|
|
319924
|
+
);
|
|
319925
|
+
program2.command("mq-trigger:delete").description("Delete a message-queue trigger").option("-p, --project <project>").requiredOption("-n, --name <name>", "Trigger name").action(lazy(() => Promise.resolve().then(() => (init_delete4(), delete_exports4)).then((m2) => m2.default)));
|
|
319926
|
+
}
|
|
319927
|
+
|
|
319661
319928
|
// src/commands/index.ts
|
|
319662
319929
|
var commands = [
|
|
319663
319930
|
registerAuthCommands,
|
|
@@ -319668,6 +319935,7 @@ var commands = [
|
|
|
319668
319935
|
registerMcpCommands,
|
|
319669
319936
|
startCommands,
|
|
319670
319937
|
registerCronTriggerCommands,
|
|
319938
|
+
registerMessageQueueTriggerCommands,
|
|
319671
319939
|
registerClusterCommands,
|
|
319672
319940
|
registerRabbitMqCommands,
|
|
319673
319941
|
registerPluginCommands,
|