@gapi/gcli 1.8.246 → 1.8.247
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/release/index.js
CHANGED
|
@@ -15,11 +15,11 @@ var __export = (target, all) => {
|
|
|
15
15
|
for (var name2 in all)
|
|
16
16
|
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
17
17
|
};
|
|
18
|
-
var __copyProps = (to,
|
|
19
|
-
if (
|
|
20
|
-
for (let key of __getOwnPropNames(
|
|
18
|
+
var __copyProps = (to, from15, except, desc) => {
|
|
19
|
+
if (from15 && typeof from15 === "object" || typeof from15 === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from15))
|
|
21
21
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () =>
|
|
22
|
+
__defProp(to, key, { get: () => from15[key], enumerable: !(desc = __getOwnPropDesc(from15, key)) || desc.enumerable });
|
|
23
23
|
}
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
@@ -8917,9 +8917,9 @@ var require_Subscription = __commonJS({
|
|
|
8917
8917
|
}
|
|
8918
8918
|
return ar;
|
|
8919
8919
|
};
|
|
8920
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
8921
|
-
for (var i2 = 0, il =
|
|
8922
|
-
to[j] =
|
|
8920
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
8921
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
8922
|
+
to[j] = from15[i2];
|
|
8923
8923
|
return to;
|
|
8924
8924
|
};
|
|
8925
8925
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -9100,9 +9100,9 @@ var require_timeoutProvider = __commonJS({
|
|
|
9100
9100
|
}
|
|
9101
9101
|
return ar;
|
|
9102
9102
|
};
|
|
9103
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
9104
|
-
for (var i2 = 0, il =
|
|
9105
|
-
to[j] =
|
|
9103
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
9104
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
9105
|
+
to[j] = from15[i2];
|
|
9106
9106
|
return to;
|
|
9107
9107
|
};
|
|
9108
9108
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -9860,9 +9860,9 @@ var require_animationFrameProvider = __commonJS({
|
|
|
9860
9860
|
}
|
|
9861
9861
|
return ar;
|
|
9862
9862
|
};
|
|
9863
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
9864
|
-
for (var i2 = 0, il =
|
|
9865
|
-
to[j] =
|
|
9863
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
9864
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
9865
|
+
to[j] = from15[i2];
|
|
9866
9866
|
return to;
|
|
9867
9867
|
};
|
|
9868
9868
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -10460,9 +10460,9 @@ var require_intervalProvider = __commonJS({
|
|
|
10460
10460
|
}
|
|
10461
10461
|
return ar;
|
|
10462
10462
|
};
|
|
10463
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
10464
|
-
for (var i2 = 0, il =
|
|
10465
|
-
to[j] =
|
|
10463
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
10464
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
10465
|
+
to[j] = from15[i2];
|
|
10466
10466
|
return to;
|
|
10467
10467
|
};
|
|
10468
10468
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -10669,9 +10669,9 @@ var require_immediateProvider = __commonJS({
|
|
|
10669
10669
|
}
|
|
10670
10670
|
return ar;
|
|
10671
10671
|
};
|
|
10672
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
10673
|
-
for (var i2 = 0, il =
|
|
10674
|
-
to[j] =
|
|
10672
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
10673
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
10674
|
+
to[j] = from15[i2];
|
|
10675
10675
|
return to;
|
|
10676
10676
|
};
|
|
10677
10677
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -12233,10 +12233,10 @@ var require_from = __commonJS({
|
|
|
12233
12233
|
exports2.from = void 0;
|
|
12234
12234
|
var scheduled_1 = require_scheduled();
|
|
12235
12235
|
var innerFrom_1 = require_innerFrom();
|
|
12236
|
-
function
|
|
12236
|
+
function from15(input, scheduler) {
|
|
12237
12237
|
return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input);
|
|
12238
12238
|
}
|
|
12239
|
-
exports2.from =
|
|
12239
|
+
exports2.from = from15;
|
|
12240
12240
|
}
|
|
12241
12241
|
});
|
|
12242
12242
|
|
|
@@ -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 of18() {
|
|
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 = of18;
|
|
12260
12260
|
}
|
|
12261
12261
|
});
|
|
12262
12262
|
|
|
@@ -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 map30(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 = map30;
|
|
12603
12603
|
}
|
|
12604
12604
|
});
|
|
12605
12605
|
|
|
@@ -12624,9 +12624,9 @@ var require_mapOneOrManyArgs = __commonJS({
|
|
|
12624
12624
|
}
|
|
12625
12625
|
return ar;
|
|
12626
12626
|
};
|
|
12627
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
12628
|
-
for (var i2 = 0, il =
|
|
12629
|
-
to[j] =
|
|
12627
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
12628
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
12629
|
+
to[j] = from15[i2];
|
|
12630
12630
|
return to;
|
|
12631
12631
|
};
|
|
12632
12632
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -12666,9 +12666,9 @@ var require_bindCallbackInternals = __commonJS({
|
|
|
12666
12666
|
}
|
|
12667
12667
|
return ar;
|
|
12668
12668
|
};
|
|
12669
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
12670
|
-
for (var i2 = 0, il =
|
|
12671
|
-
to[j] =
|
|
12669
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
12670
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
12671
|
+
to[j] = from15[i2];
|
|
12672
12672
|
return to;
|
|
12673
12673
|
};
|
|
12674
12674
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -13800,9 +13800,9 @@ var require_zip = __commonJS({
|
|
|
13800
13800
|
}
|
|
13801
13801
|
return ar;
|
|
13802
13802
|
};
|
|
13803
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
13804
|
-
for (var i2 = 0, il =
|
|
13805
|
-
to[j] =
|
|
13803
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
13804
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
13805
|
+
to[j] = from15[i2];
|
|
13806
13806
|
return to;
|
|
13807
13807
|
};
|
|
13808
13808
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14430,9 +14430,9 @@ var require_combineLatest2 = __commonJS({
|
|
|
14430
14430
|
}
|
|
14431
14431
|
return ar;
|
|
14432
14432
|
};
|
|
14433
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
14434
|
-
for (var i2 = 0, il =
|
|
14435
|
-
to[j] =
|
|
14433
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
14434
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
14435
|
+
to[j] = from15[i2];
|
|
14436
14436
|
return to;
|
|
14437
14437
|
};
|
|
14438
14438
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14478,9 +14478,9 @@ var require_combineLatestWith = __commonJS({
|
|
|
14478
14478
|
}
|
|
14479
14479
|
return ar;
|
|
14480
14480
|
};
|
|
14481
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
14482
|
-
for (var i2 = 0, il =
|
|
14483
|
-
to[j] =
|
|
14481
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
14482
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
14483
|
+
to[j] = from15[i2];
|
|
14484
14484
|
return to;
|
|
14485
14485
|
};
|
|
14486
14486
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14552,9 +14552,9 @@ var require_concat2 = __commonJS({
|
|
|
14552
14552
|
}
|
|
14553
14553
|
return ar;
|
|
14554
14554
|
};
|
|
14555
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
14556
|
-
for (var i2 = 0, il =
|
|
14557
|
-
to[j] =
|
|
14555
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
14556
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
14557
|
+
to[j] = from15[i2];
|
|
14558
14558
|
return to;
|
|
14559
14559
|
};
|
|
14560
14560
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14598,9 +14598,9 @@ var require_concatWith = __commonJS({
|
|
|
14598
14598
|
}
|
|
14599
14599
|
return ar;
|
|
14600
14600
|
};
|
|
14601
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
14602
|
-
for (var i2 = 0, il =
|
|
14603
|
-
to[j] =
|
|
14601
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
14602
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
14603
|
+
to[j] = from15[i2];
|
|
14604
14604
|
return to;
|
|
14605
14605
|
};
|
|
14606
14606
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -15091,9 +15091,9 @@ var require_endWith = __commonJS({
|
|
|
15091
15091
|
}
|
|
15092
15092
|
return ar;
|
|
15093
15093
|
};
|
|
15094
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
15095
|
-
for (var i2 = 0, il =
|
|
15096
|
-
to[j] =
|
|
15094
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
15095
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
15096
|
+
to[j] = from15[i2];
|
|
15097
15097
|
return to;
|
|
15098
15098
|
};
|
|
15099
15099
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -15638,9 +15638,9 @@ var require_merge2 = __commonJS({
|
|
|
15638
15638
|
}
|
|
15639
15639
|
return ar;
|
|
15640
15640
|
};
|
|
15641
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
15642
|
-
for (var i2 = 0, il =
|
|
15643
|
-
to[j] =
|
|
15641
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
15642
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
15643
|
+
to[j] = from15[i2];
|
|
15644
15644
|
return to;
|
|
15645
15645
|
};
|
|
15646
15646
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -15685,9 +15685,9 @@ var require_mergeWith = __commonJS({
|
|
|
15685
15685
|
}
|
|
15686
15686
|
return ar;
|
|
15687
15687
|
};
|
|
15688
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
15689
|
-
for (var i2 = 0, il =
|
|
15690
|
-
to[j] =
|
|
15688
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
15689
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
15690
|
+
to[j] = from15[i2];
|
|
15691
15691
|
return to;
|
|
15692
15692
|
};
|
|
15693
15693
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -15770,9 +15770,9 @@ var require_onErrorResumeNextWith = __commonJS({
|
|
|
15770
15770
|
}
|
|
15771
15771
|
return ar;
|
|
15772
15772
|
};
|
|
15773
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
15774
|
-
for (var i2 = 0, il =
|
|
15775
|
-
to[j] =
|
|
15773
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
15774
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
15775
|
+
to[j] = from15[i2];
|
|
15776
15776
|
return to;
|
|
15777
15777
|
};
|
|
15778
15778
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -15954,9 +15954,9 @@ var require_raceWith = __commonJS({
|
|
|
15954
15954
|
}
|
|
15955
15955
|
return ar;
|
|
15956
15956
|
};
|
|
15957
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
15958
|
-
for (var i2 = 0, il =
|
|
15959
|
-
to[j] =
|
|
15957
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
15958
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
15959
|
+
to[j] = from15[i2];
|
|
15960
15960
|
return to;
|
|
15961
15961
|
};
|
|
15962
15962
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -16352,9 +16352,9 @@ var require_share = __commonJS({
|
|
|
16352
16352
|
}
|
|
16353
16353
|
return ar;
|
|
16354
16354
|
};
|
|
16355
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
16356
|
-
for (var i2 = 0, il =
|
|
16357
|
-
to[j] =
|
|
16355
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
16356
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
16357
|
+
to[j] = from15[i2];
|
|
16358
16358
|
return to;
|
|
16359
16359
|
};
|
|
16360
16360
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -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 switchMap51(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 = switchMap51;
|
|
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 tap51(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 = tap51;
|
|
16825
16825
|
}
|
|
16826
16826
|
});
|
|
16827
16827
|
|
|
@@ -17354,9 +17354,9 @@ var require_withLatestFrom = __commonJS({
|
|
|
17354
17354
|
}
|
|
17355
17355
|
return ar;
|
|
17356
17356
|
};
|
|
17357
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
17358
|
-
for (var i2 = 0, il =
|
|
17359
|
-
to[j] =
|
|
17357
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
17358
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
17359
|
+
to[j] = from15[i2];
|
|
17360
17360
|
return to;
|
|
17361
17361
|
};
|
|
17362
17362
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -17440,9 +17440,9 @@ var require_zip2 = __commonJS({
|
|
|
17440
17440
|
}
|
|
17441
17441
|
return ar;
|
|
17442
17442
|
};
|
|
17443
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
17444
|
-
for (var i2 = 0, il =
|
|
17445
|
-
to[j] =
|
|
17443
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
17444
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
17445
|
+
to[j] = from15[i2];
|
|
17446
17446
|
return to;
|
|
17447
17447
|
};
|
|
17448
17448
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -17483,9 +17483,9 @@ var require_zipWith = __commonJS({
|
|
|
17483
17483
|
}
|
|
17484
17484
|
return ar;
|
|
17485
17485
|
};
|
|
17486
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
17487
|
-
for (var i2 = 0, il =
|
|
17488
|
-
to[j] =
|
|
17486
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
17487
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
17488
|
+
to[j] = from15[i2];
|
|
17489
17489
|
return to;
|
|
17490
17490
|
};
|
|
17491
17491
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -18251,9 +18251,9 @@ var require_race2 = __commonJS({
|
|
|
18251
18251
|
}
|
|
18252
18252
|
return ar;
|
|
18253
18253
|
};
|
|
18254
|
-
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to,
|
|
18255
|
-
for (var i2 = 0, il =
|
|
18256
|
-
to[j] =
|
|
18254
|
+
var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from15) {
|
|
18255
|
+
for (var i2 = 0, il = from15.length, j = to.length; i2 < il; i2++, j++)
|
|
18256
|
+
to[j] = from15[i2];
|
|
18257
18257
|
return to;
|
|
18258
18258
|
};
|
|
18259
18259
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -19972,7 +19972,7 @@ var require_index_node_cjs = __commonJS({
|
|
|
19972
19972
|
}
|
|
19973
19973
|
return true;
|
|
19974
19974
|
}
|
|
19975
|
-
function
|
|
19975
|
+
function map30(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 = map30;
|
|
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[of18] || 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 of18 = "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[of18] = d.displayName);
|
|
27767
27767
|
d.enrollmentTime && (f3[pf] = new Date(d.enrollmentTime).toISOString());
|
|
27768
27768
|
d.phoneNumber && (f3[mf] = d.phoneNumber);
|
|
27769
27769
|
try {
|
|
@@ -31385,7 +31385,7 @@ var require_from2 = __commonJS({
|
|
|
31385
31385
|
return obj;
|
|
31386
31386
|
}
|
|
31387
31387
|
var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE;
|
|
31388
|
-
function
|
|
31388
|
+
function from15(Readable2, iterable, opts) {
|
|
31389
31389
|
var iterator;
|
|
31390
31390
|
if (iterable && typeof iterable.next === "function") {
|
|
31391
31391
|
iterator = iterable;
|
|
@@ -31424,7 +31424,7 @@ var require_from2 = __commonJS({
|
|
|
31424
31424
|
}
|
|
31425
31425
|
return readable;
|
|
31426
31426
|
}
|
|
31427
|
-
module2.exports =
|
|
31427
|
+
module2.exports = from15;
|
|
31428
31428
|
}
|
|
31429
31429
|
});
|
|
31430
31430
|
|
|
@@ -31468,7 +31468,7 @@ var require_stream_readable = __commonJS({
|
|
|
31468
31468
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
31469
31469
|
var StringDecoder;
|
|
31470
31470
|
var createReadableStreamAsyncIterator;
|
|
31471
|
-
var
|
|
31471
|
+
var from15;
|
|
31472
31472
|
require_inherits()(Readable2, Stream3);
|
|
31473
31473
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
31474
31474
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -32150,10 +32150,10 @@ var require_stream_readable = __commonJS({
|
|
|
32150
32150
|
}
|
|
32151
32151
|
if (typeof Symbol === "function") {
|
|
32152
32152
|
Readable2.from = function(iterable, opts) {
|
|
32153
|
-
if (
|
|
32154
|
-
|
|
32153
|
+
if (from15 === void 0) {
|
|
32154
|
+
from15 = require_from2();
|
|
32155
32155
|
}
|
|
32156
|
-
return
|
|
32156
|
+
return from15(Readable2, iterable, opts);
|
|
32157
32157
|
};
|
|
32158
32158
|
}
|
|
32159
32159
|
function indexOf(xs, x2) {
|
|
@@ -32333,8 +32333,8 @@ var require_pipeline = __commonJS({
|
|
|
32333
32333
|
function call(fn) {
|
|
32334
32334
|
fn();
|
|
32335
32335
|
}
|
|
32336
|
-
function pipe2(
|
|
32337
|
-
return
|
|
32336
|
+
function pipe2(from15, to) {
|
|
32337
|
+
return from15.pipe(to);
|
|
32338
32338
|
}
|
|
32339
32339
|
function popCallback(streams) {
|
|
32340
32340
|
if (!streams.length) return noop3;
|
|
@@ -34112,7 +34112,7 @@ var require_from3 = __commonJS({
|
|
|
34112
34112
|
return obj;
|
|
34113
34113
|
}
|
|
34114
34114
|
var ERR_INVALID_ARG_TYPE = require_errors2().codes.ERR_INVALID_ARG_TYPE;
|
|
34115
|
-
function
|
|
34115
|
+
function from15(Readable2, iterable, opts) {
|
|
34116
34116
|
var iterator;
|
|
34117
34117
|
if (iterable && typeof iterable.next === "function") {
|
|
34118
34118
|
iterator = iterable;
|
|
@@ -34151,7 +34151,7 @@ var require_from3 = __commonJS({
|
|
|
34151
34151
|
}
|
|
34152
34152
|
return readable;
|
|
34153
34153
|
}
|
|
34154
|
-
module2.exports =
|
|
34154
|
+
module2.exports = from15;
|
|
34155
34155
|
}
|
|
34156
34156
|
});
|
|
34157
34157
|
|
|
@@ -34195,7 +34195,7 @@ var require_stream_readable2 = __commonJS({
|
|
|
34195
34195
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
34196
34196
|
var StringDecoder;
|
|
34197
34197
|
var createReadableStreamAsyncIterator;
|
|
34198
|
-
var
|
|
34198
|
+
var from15;
|
|
34199
34199
|
require_inherits()(Readable2, Stream3);
|
|
34200
34200
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
34201
34201
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -34877,10 +34877,10 @@ var require_stream_readable2 = __commonJS({
|
|
|
34877
34877
|
}
|
|
34878
34878
|
if (typeof Symbol === "function") {
|
|
34879
34879
|
Readable2.from = function(iterable, opts) {
|
|
34880
|
-
if (
|
|
34881
|
-
|
|
34880
|
+
if (from15 === void 0) {
|
|
34881
|
+
from15 = require_from3();
|
|
34882
34882
|
}
|
|
34883
|
-
return
|
|
34883
|
+
return from15(Readable2, iterable, opts);
|
|
34884
34884
|
};
|
|
34885
34885
|
}
|
|
34886
34886
|
function indexOf(xs, x2) {
|
|
@@ -35060,8 +35060,8 @@ var require_pipeline2 = __commonJS({
|
|
|
35060
35060
|
function call(fn) {
|
|
35061
35061
|
fn();
|
|
35062
35062
|
}
|
|
35063
|
-
function pipe2(
|
|
35064
|
-
return
|
|
35063
|
+
function pipe2(from15, to) {
|
|
35064
|
+
return from15.pipe(to);
|
|
35065
35065
|
}
|
|
35066
35066
|
function popCallback(streams) {
|
|
35067
35067
|
if (!streams.length) return noop3;
|
|
@@ -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(map30, options, encode3) {
|
|
35488
|
+
const acc = [getHeader(map30.size, 128, 222)];
|
|
35489
|
+
const keys = [...map30.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(map30.get(key)));
|
|
35497
35497
|
});
|
|
35498
35498
|
return bl(acc);
|
|
35499
35499
|
}
|
|
@@ -36418,6 +36418,17 @@ clusterId
|
|
|
36418
36418
|
name
|
|
36419
36419
|
description
|
|
36420
36420
|
definition
|
|
36421
|
+
triggers {
|
|
36422
|
+
id
|
|
36423
|
+
kind
|
|
36424
|
+
resourceName
|
|
36425
|
+
path
|
|
36426
|
+
methods
|
|
36427
|
+
cron
|
|
36428
|
+
input
|
|
36429
|
+
url
|
|
36430
|
+
createdAt
|
|
36431
|
+
}
|
|
36421
36432
|
createdAt
|
|
36422
36433
|
updatedAt
|
|
36423
36434
|
`;
|
|
@@ -36432,6 +36443,8 @@ finishedAt
|
|
|
36432
36443
|
activeStates
|
|
36433
36444
|
errorType
|
|
36434
36445
|
cause
|
|
36446
|
+
triggerKind
|
|
36447
|
+
triggerName
|
|
36435
36448
|
`;
|
|
36436
36449
|
WorkflowRunDetailsFragment = `
|
|
36437
36450
|
${WorkflowRunFragment}
|
|
@@ -37546,6 +37559,48 @@ var init_gql_client = __esm({
|
|
|
37546
37559
|
variables: { projectId, workflowId, runName }
|
|
37547
37560
|
}).pipe((0, import_operators.map)((res) => res.cancelWorkflowRun));
|
|
37548
37561
|
}
|
|
37562
|
+
/** Add an HTTP or cron trigger that starts runs (Fission 1.26+ on the
|
|
37563
|
+
workflow's cluster). Returns the workflow with its triggers. */
|
|
37564
|
+
static addWorkflowTrigger(projectId, workflowId, trigger) {
|
|
37565
|
+
return this.query({
|
|
37566
|
+
query: gql`
|
|
37567
|
+
mutation addWorkflowTrigger(
|
|
37568
|
+
$projectId: String!
|
|
37569
|
+
$workflowId: String!
|
|
37570
|
+
$trigger: WorkflowTriggerInput!
|
|
37571
|
+
) {
|
|
37572
|
+
addWorkflowTrigger(
|
|
37573
|
+
projectId: $projectId
|
|
37574
|
+
workflowId: $workflowId
|
|
37575
|
+
trigger: $trigger
|
|
37576
|
+
) {
|
|
37577
|
+
${WorkflowFragment}
|
|
37578
|
+
}
|
|
37579
|
+
}
|
|
37580
|
+
`,
|
|
37581
|
+
variables: { projectId, workflowId, trigger }
|
|
37582
|
+
}).pipe((0, import_operators.map)((res) => res.addWorkflowTrigger));
|
|
37583
|
+
}
|
|
37584
|
+
static removeWorkflowTrigger(projectId, workflowId, triggerId) {
|
|
37585
|
+
return this.query({
|
|
37586
|
+
query: gql`
|
|
37587
|
+
mutation removeWorkflowTrigger(
|
|
37588
|
+
$projectId: String!
|
|
37589
|
+
$workflowId: String!
|
|
37590
|
+
$triggerId: String!
|
|
37591
|
+
) {
|
|
37592
|
+
removeWorkflowTrigger(
|
|
37593
|
+
projectId: $projectId
|
|
37594
|
+
workflowId: $workflowId
|
|
37595
|
+
triggerId: $triggerId
|
|
37596
|
+
) {
|
|
37597
|
+
${WorkflowFragment}
|
|
37598
|
+
}
|
|
37599
|
+
}
|
|
37600
|
+
`,
|
|
37601
|
+
variables: { projectId, workflowId, triggerId }
|
|
37602
|
+
}).pipe((0, import_operators.map)((res) => res.removeWorkflowTrigger));
|
|
37603
|
+
}
|
|
37549
37604
|
/** AI draft (graphql-server, MiniMax): from plain language, or a change
|
|
37550
37605
|
to `current`. Nothing is saved. */
|
|
37551
37606
|
static generateWorkflowDraft(projectId, description, current) {
|
|
@@ -38044,14 +38099,14 @@ function __spreadArrays() {
|
|
|
38044
38099
|
r2[k] = a[j];
|
|
38045
38100
|
return r2;
|
|
38046
38101
|
}
|
|
38047
|
-
function __spreadArray(to,
|
|
38048
|
-
if (pack || arguments.length === 2) for (var i2 = 0, l =
|
|
38049
|
-
if (ar || !(i2 in
|
|
38050
|
-
if (!ar) ar = Array.prototype.slice.call(
|
|
38051
|
-
ar[i2] =
|
|
38102
|
+
function __spreadArray(to, from15, pack) {
|
|
38103
|
+
if (pack || arguments.length === 2) for (var i2 = 0, l = from15.length, ar; i2 < l; i2++) {
|
|
38104
|
+
if (ar || !(i2 in from15)) {
|
|
38105
|
+
if (!ar) ar = Array.prototype.slice.call(from15, 0, i2);
|
|
38106
|
+
ar[i2] = from15[i2];
|
|
38052
38107
|
}
|
|
38053
38108
|
}
|
|
38054
|
-
return to.concat(ar || Array.prototype.slice.call(
|
|
38109
|
+
return to.concat(ar || Array.prototype.slice.call(from15));
|
|
38055
38110
|
}
|
|
38056
38111
|
function __await(v) {
|
|
38057
38112
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -39070,22 +39125,22 @@ var require_source_map_generator = __commonJS({
|
|
|
39070
39125
|
}, this);
|
|
39071
39126
|
};
|
|
39072
39127
|
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
39073
|
-
var
|
|
39128
|
+
var map30 = {
|
|
39074
39129
|
version: this._version,
|
|
39075
39130
|
sources: this._sources.toArray(),
|
|
39076
39131
|
names: this._names.toArray(),
|
|
39077
39132
|
mappings: this._serializeMappings()
|
|
39078
39133
|
};
|
|
39079
39134
|
if (this._file != null) {
|
|
39080
|
-
|
|
39135
|
+
map30.file = this._file;
|
|
39081
39136
|
}
|
|
39082
39137
|
if (this._sourceRoot != null) {
|
|
39083
|
-
|
|
39138
|
+
map30.sourceRoot = this._sourceRoot;
|
|
39084
39139
|
}
|
|
39085
39140
|
if (this._sourcesContents) {
|
|
39086
|
-
|
|
39141
|
+
map30.sourcesContent = this._generateSourcesContent(map30.sources, map30.sourceRoot);
|
|
39087
39142
|
}
|
|
39088
|
-
return
|
|
39143
|
+
return map30;
|
|
39089
39144
|
};
|
|
39090
39145
|
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
39091
39146
|
return JSON.stringify(this.toJSON());
|
|
@@ -39978,7 +40033,7 @@ var require_source_node = __commonJS({
|
|
|
39978
40033
|
line: 1,
|
|
39979
40034
|
column: 0
|
|
39980
40035
|
};
|
|
39981
|
-
var
|
|
40036
|
+
var map30 = new SourceMapGenerator(aArgs);
|
|
39982
40037
|
var sourceMappingActive = false;
|
|
39983
40038
|
var lastOriginalSource = null;
|
|
39984
40039
|
var lastOriginalLine = null;
|
|
@@ -39988,7 +40043,7 @@ var require_source_node = __commonJS({
|
|
|
39988
40043
|
generated.code += chunk;
|
|
39989
40044
|
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
39990
40045
|
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
39991
|
-
|
|
40046
|
+
map30.addMapping({
|
|
39992
40047
|
source: original.source,
|
|
39993
40048
|
original: {
|
|
39994
40049
|
line: original.line,
|
|
@@ -40007,7 +40062,7 @@ var require_source_node = __commonJS({
|
|
|
40007
40062
|
lastOriginalName = original.name;
|
|
40008
40063
|
sourceMappingActive = true;
|
|
40009
40064
|
} else if (sourceMappingActive) {
|
|
40010
|
-
|
|
40065
|
+
map30.addMapping({
|
|
40011
40066
|
generated: {
|
|
40012
40067
|
line: generated.line,
|
|
40013
40068
|
column: generated.column
|
|
@@ -40024,7 +40079,7 @@ var require_source_node = __commonJS({
|
|
|
40024
40079
|
lastOriginalSource = null;
|
|
40025
40080
|
sourceMappingActive = false;
|
|
40026
40081
|
} else if (sourceMappingActive) {
|
|
40027
|
-
|
|
40082
|
+
map30.addMapping({
|
|
40028
40083
|
source: original.source,
|
|
40029
40084
|
original: {
|
|
40030
40085
|
line: original.line,
|
|
@@ -40043,9 +40098,9 @@ var require_source_node = __commonJS({
|
|
|
40043
40098
|
}
|
|
40044
40099
|
});
|
|
40045
40100
|
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
40046
|
-
|
|
40101
|
+
map30.setSourceContent(sourceFile, sourceContent);
|
|
40047
40102
|
});
|
|
40048
|
-
return { code: generated.code, map:
|
|
40103
|
+
return { code: generated.code, map: map30 };
|
|
40049
40104
|
};
|
|
40050
40105
|
exports2.SourceNode = SourceNode;
|
|
40051
40106
|
}
|
|
@@ -40575,11 +40630,11 @@ var require_typescript = __commonJS({
|
|
|
40575
40630
|
for (var name2 in all)
|
|
40576
40631
|
__defProp2(target, name2, { get: all[name2], enumerable: true });
|
|
40577
40632
|
};
|
|
40578
|
-
var __copyProps2 = (to,
|
|
40579
|
-
if (
|
|
40580
|
-
for (let key of __getOwnPropNames2(
|
|
40633
|
+
var __copyProps2 = (to, from15, except, desc) => {
|
|
40634
|
+
if (from15 && typeof from15 === "object" || typeof from15 === "function") {
|
|
40635
|
+
for (let key of __getOwnPropNames2(from15))
|
|
40581
40636
|
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
40582
|
-
__defProp2(to, key, { get: () =>
|
|
40637
|
+
__defProp2(to, key, { get: () => from15[key], enumerable: !(desc = __getOwnPropDesc2(from15, key)) || desc.enumerable });
|
|
40583
40638
|
}
|
|
40584
40639
|
return to;
|
|
40585
40640
|
};
|
|
@@ -42385,7 +42440,7 @@ var require_typescript = __commonJS({
|
|
|
42385
42440
|
makeImport: () => makeImport,
|
|
42386
42441
|
makeStringLiteral: () => makeStringLiteral,
|
|
42387
42442
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
42388
|
-
map: () =>
|
|
42443
|
+
map: () => map30,
|
|
42389
42444
|
mapAllOrFail: () => mapAllOrFail,
|
|
42390
42445
|
mapDefined: () => mapDefined,
|
|
42391
42446
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -43029,7 +43084,7 @@ var require_typescript = __commonJS({
|
|
|
43029
43084
|
function clear(array2) {
|
|
43030
43085
|
array2.length = 0;
|
|
43031
43086
|
}
|
|
43032
|
-
function
|
|
43087
|
+
function map30(array2, f3) {
|
|
43033
43088
|
let result;
|
|
43034
43089
|
if (array2 !== void 0) {
|
|
43035
43090
|
result = [];
|
|
@@ -43423,14 +43478,14 @@ var require_typescript = __commonJS({
|
|
|
43423
43478
|
function toOffset(array2, offset) {
|
|
43424
43479
|
return offset < 0 ? array2.length + offset : offset;
|
|
43425
43480
|
}
|
|
43426
|
-
function addRange(to,
|
|
43427
|
-
if (
|
|
43428
|
-
if (to === void 0) return
|
|
43429
|
-
start3 = start3 === void 0 ? 0 : toOffset(
|
|
43430
|
-
end = end === void 0 ?
|
|
43431
|
-
for (let i2 = start3; i2 < end && i2 <
|
|
43432
|
-
if (
|
|
43433
|
-
to.push(
|
|
43481
|
+
function addRange(to, from15, start3, end) {
|
|
43482
|
+
if (from15 === void 0 || from15.length === 0) return to;
|
|
43483
|
+
if (to === void 0) return from15.slice(start3, end);
|
|
43484
|
+
start3 = start3 === void 0 ? 0 : toOffset(from15, start3);
|
|
43485
|
+
end = end === void 0 ? from15.length : toOffset(from15, end);
|
|
43486
|
+
for (let i2 = start3; i2 < end && i2 < from15.length; i2++) {
|
|
43487
|
+
if (from15[i2] !== void 0) {
|
|
43488
|
+
to.push(from15[i2]);
|
|
43434
43489
|
}
|
|
43435
43490
|
}
|
|
43436
43491
|
return to;
|
|
@@ -44558,7 +44613,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
44558
44613
|
}
|
|
44559
44614
|
Debug2.getFunctionName = getFunctionName;
|
|
44560
44615
|
function formatSymbol(symbol2) {
|
|
44561
|
-
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${
|
|
44616
|
+
return `{ name: ${unescapeLeadingUnderscores(symbol2.escapedName)}; flags: ${formatSymbolFlags(symbol2.flags)}; declarations: ${map30(symbol2.declarations, (node) => formatSyntaxKind(node.kind))} }`;
|
|
44562
44617
|
}
|
|
44563
44618
|
Debug2.formatSymbol = formatSymbol;
|
|
44564
44619
|
function formatEnum(value = 0, enumObject, isFlags) {
|
|
@@ -44984,7 +45039,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
44984
45039
|
case 1:
|
|
44985
45040
|
return zipWith(
|
|
44986
45041
|
this.sources,
|
|
44987
|
-
this.targets ||
|
|
45042
|
+
this.targets || map30(this.sources, () => "any"),
|
|
44988
45043
|
(s2, t2) => `${s2.__debugTypeToString()} -> ${typeof t2 === "string" ? t2 : t2.__debugTypeToString()}`
|
|
44989
45044
|
).join(", ");
|
|
44990
45045
|
case 2:
|
|
@@ -45619,10 +45674,10 @@ ${lanes.join("\n")}
|
|
|
45619
45674
|
}
|
|
45620
45675
|
}
|
|
45621
45676
|
function formatDisjunction(alternatives) {
|
|
45622
|
-
return
|
|
45677
|
+
return map30(alternatives, formatAlternative).join(" || ") || "*";
|
|
45623
45678
|
}
|
|
45624
45679
|
function formatAlternative(comparators) {
|
|
45625
|
-
return
|
|
45680
|
+
return map30(comparators, formatComparator).join(" ");
|
|
45626
45681
|
}
|
|
45627
45682
|
function formatComparator(comparator) {
|
|
45628
45683
|
return `${comparator.operator}${comparator.operand}`;
|
|
@@ -49159,7 +49214,7 @@ ${lanes.join("\n")}
|
|
|
49159
49214
|
writeOutputIsTTY() {
|
|
49160
49215
|
return process.stdout.isTTY;
|
|
49161
49216
|
},
|
|
49162
|
-
readFile:
|
|
49217
|
+
readFile: readFile8,
|
|
49163
49218
|
writeFile: writeFile22,
|
|
49164
49219
|
watchFile: watchFile2,
|
|
49165
49220
|
watchDirectory,
|
|
@@ -49365,7 +49420,7 @@ ${lanes.join("\n")}
|
|
|
49365
49420
|
callback
|
|
49366
49421
|
);
|
|
49367
49422
|
}
|
|
49368
|
-
function
|
|
49423
|
+
function readFile8(fileName, _encoding) {
|
|
49369
49424
|
let buffer;
|
|
49370
49425
|
try {
|
|
49371
49426
|
buffer = _fs.readFileSync(fileName);
|
|
@@ -49939,8 +49994,8 @@ ${lanes.join("\n")}
|
|
|
49939
49994
|
const canonicalDirectoryName = getCanonicalFileName(directoryName);
|
|
49940
49995
|
return startsWith(canonicalFileName, canonicalDirectoryName + "/") || startsWith(canonicalFileName, canonicalDirectoryName + "\\");
|
|
49941
49996
|
}
|
|
49942
|
-
function getPathComponentsRelativeTo(
|
|
49943
|
-
const fromComponents = reducePathComponents(getPathComponents(
|
|
49997
|
+
function getPathComponentsRelativeTo(from15, to, stringEqualityComparer, getCanonicalFileName) {
|
|
49998
|
+
const fromComponents = reducePathComponents(getPathComponents(from15));
|
|
49944
49999
|
const toComponents = reducePathComponents(getPathComponents(to));
|
|
49945
50000
|
let start3;
|
|
49946
50001
|
for (start3 = 0; start3 < fromComponents.length && start3 < toComponents.length; start3++) {
|
|
@@ -49976,8 +50031,8 @@ ${lanes.join("\n")}
|
|
|
49976
50031
|
false
|
|
49977
50032
|
);
|
|
49978
50033
|
}
|
|
49979
|
-
function getRelativePathFromFile(
|
|
49980
|
-
return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(
|
|
50034
|
+
function getRelativePathFromFile(from15, to, getCanonicalFileName) {
|
|
50035
|
+
return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from15), to, getCanonicalFileName));
|
|
49981
50036
|
}
|
|
49982
50037
|
function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) {
|
|
49983
50038
|
const pathComponents2 = getPathComponentsRelativeTo(
|
|
@@ -57528,15 +57583,15 @@ ${lanes.join("\n")}
|
|
|
57528
57583
|
if (!nodeArray || isArray(child) || !isElement(child)) return false;
|
|
57529
57584
|
return contains(nodeArray, child);
|
|
57530
57585
|
}
|
|
57531
|
-
function insertStatementsAfterPrologue(to,
|
|
57532
|
-
if (
|
|
57586
|
+
function insertStatementsAfterPrologue(to, from15, isPrologueDirective2) {
|
|
57587
|
+
if (from15 === void 0 || from15.length === 0) return to;
|
|
57533
57588
|
let statementIndex = 0;
|
|
57534
57589
|
for (; statementIndex < to.length; ++statementIndex) {
|
|
57535
57590
|
if (!isPrologueDirective2(to[statementIndex])) {
|
|
57536
57591
|
break;
|
|
57537
57592
|
}
|
|
57538
57593
|
}
|
|
57539
|
-
to.splice(statementIndex, 0, ...
|
|
57594
|
+
to.splice(statementIndex, 0, ...from15);
|
|
57540
57595
|
return to;
|
|
57541
57596
|
}
|
|
57542
57597
|
function insertStatementAfterPrologue(to, statement, isPrologueDirective2) {
|
|
@@ -57553,11 +57608,11 @@ ${lanes.join("\n")}
|
|
|
57553
57608
|
function isAnyPrologueDirective(node) {
|
|
57554
57609
|
return isPrologueDirective(node) || !!(getEmitFlags(node) & 2097152);
|
|
57555
57610
|
}
|
|
57556
|
-
function insertStatementsAfterStandardPrologue(to,
|
|
57557
|
-
return insertStatementsAfterPrologue(to,
|
|
57611
|
+
function insertStatementsAfterStandardPrologue(to, from15) {
|
|
57612
|
+
return insertStatementsAfterPrologue(to, from15, isPrologueDirective);
|
|
57558
57613
|
}
|
|
57559
|
-
function insertStatementsAfterCustomPrologue(to,
|
|
57560
|
-
return insertStatementsAfterPrologue(to,
|
|
57614
|
+
function insertStatementsAfterCustomPrologue(to, from15) {
|
|
57615
|
+
return insertStatementsAfterPrologue(to, from15, isAnyPrologueDirective);
|
|
57561
57616
|
}
|
|
57562
57617
|
function insertStatementAfterStandardPrologue(to, statement) {
|
|
57563
57618
|
return insertStatementAfterPrologue(to, statement, isPrologueDirective);
|
|
@@ -63549,7 +63604,7 @@ ${lanes.join("\n")}
|
|
|
63549
63604
|
currentDirectory = normalizePath(currentDirectory);
|
|
63550
63605
|
const absolutePath = combinePaths(currentDirectory, path2);
|
|
63551
63606
|
return {
|
|
63552
|
-
includeFilePatterns:
|
|
63607
|
+
includeFilePatterns: map30(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
63553
63608
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
63554
63609
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
63555
63610
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -66059,7 +66114,7 @@ ${lanes.join("\n")}
|
|
|
66059
66114
|
if (isObjectBindingPattern(node)) {
|
|
66060
66115
|
return setOriginalNode(
|
|
66061
66116
|
setTextRange(
|
|
66062
|
-
factory2.createObjectLiteralExpression(
|
|
66117
|
+
factory2.createObjectLiteralExpression(map30(node.elements, convertToObjectAssignmentElement)),
|
|
66063
66118
|
node
|
|
66064
66119
|
),
|
|
66065
66120
|
node
|
|
@@ -66071,7 +66126,7 @@ ${lanes.join("\n")}
|
|
|
66071
66126
|
if (isArrayBindingPattern(node)) {
|
|
66072
66127
|
return setOriginalNode(
|
|
66073
66128
|
setTextRange(
|
|
66074
|
-
factory2.createArrayLiteralExpression(
|
|
66129
|
+
factory2.createArrayLiteralExpression(map30(node.elements, convertToArrayAssignmentElement)),
|
|
66075
66130
|
node
|
|
66076
66131
|
),
|
|
66077
66132
|
node
|
|
@@ -72036,13 +72091,13 @@ ${lanes.join("\n")}
|
|
|
72036
72091
|
[cooked, raw]
|
|
72037
72092
|
);
|
|
72038
72093
|
}
|
|
72039
|
-
function createSpreadArrayHelper(to,
|
|
72094
|
+
function createSpreadArrayHelper(to, from15, packFrom) {
|
|
72040
72095
|
context.requestEmitHelper(spreadArrayHelper);
|
|
72041
72096
|
return factory2.createCallExpression(
|
|
72042
72097
|
getUnscopedHelperName("__spreadArray"),
|
|
72043
72098
|
/*typeArguments*/
|
|
72044
72099
|
void 0,
|
|
72045
|
-
[to,
|
|
72100
|
+
[to, from15, packFrom ? immutableTrue() : immutableFalse()]
|
|
72046
72101
|
);
|
|
72047
72102
|
}
|
|
72048
72103
|
function createPropKeyHelper(expr) {
|
|
@@ -73893,7 +73948,7 @@ ${lanes.join("\n")}
|
|
|
73893
73948
|
if (some(helperNames)) {
|
|
73894
73949
|
helperNames.sort(compareStringsCaseSensitive);
|
|
73895
73950
|
const namedBindings = nodeFactory.createNamedImports(
|
|
73896
|
-
|
|
73951
|
+
map30(helperNames, (name2) => isFileLevelUniqueName(sourceFile, name2) ? nodeFactory.createImportSpecifier(
|
|
73897
73952
|
/*isTypeOnly*/
|
|
73898
73953
|
false,
|
|
73899
73954
|
/*propertyName*/
|
|
@@ -84096,7 +84151,7 @@ ${lanes.join("\n")}
|
|
|
84096
84151
|
break;
|
|
84097
84152
|
}
|
|
84098
84153
|
case "amd-dependency": {
|
|
84099
|
-
context.amdDependencies =
|
|
84154
|
+
context.amdDependencies = map30(
|
|
84100
84155
|
toArray(entryOrList),
|
|
84101
84156
|
(x2) => ({ name: x2.arguments.name, path: x2.arguments.path })
|
|
84102
84157
|
);
|
|
@@ -85921,7 +85976,7 @@ ${lanes.join("\n")}
|
|
|
85921
85976
|
const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
|
|
85922
85977
|
return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);
|
|
85923
85978
|
}
|
|
85924
|
-
function parseCommandLineWorker(diagnostics, commandLine,
|
|
85979
|
+
function parseCommandLineWorker(diagnostics, commandLine, readFile8) {
|
|
85925
85980
|
const options = {};
|
|
85926
85981
|
let watchOptions;
|
|
85927
85982
|
const fileNames = [];
|
|
@@ -85969,7 +86024,7 @@ ${lanes.join("\n")}
|
|
|
85969
86024
|
}
|
|
85970
86025
|
}
|
|
85971
86026
|
function parseResponseFile(fileName) {
|
|
85972
|
-
const text = tryReadFile(fileName,
|
|
86027
|
+
const text = tryReadFile(fileName, readFile8 || ((fileName2) => sys.readFile(fileName2)));
|
|
85973
86028
|
if (!isString(text)) {
|
|
85974
86029
|
errors.push(text);
|
|
85975
86030
|
return;
|
|
@@ -86072,8 +86127,8 @@ ${lanes.join("\n")}
|
|
|
86072
86127
|
unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,
|
|
86073
86128
|
optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument
|
|
86074
86129
|
};
|
|
86075
|
-
function parseCommandLine(commandLine,
|
|
86076
|
-
return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine,
|
|
86130
|
+
function parseCommandLine(commandLine, readFile8) {
|
|
86131
|
+
return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile8);
|
|
86077
86132
|
}
|
|
86078
86133
|
function getOptionFromName(optionName, allowShort) {
|
|
86079
86134
|
return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);
|
|
@@ -86155,8 +86210,8 @@ ${lanes.join("\n")}
|
|
|
86155
86210
|
watchOptionsToExtend
|
|
86156
86211
|
);
|
|
86157
86212
|
}
|
|
86158
|
-
function readConfigFile(fileName,
|
|
86159
|
-
const textOrDiagnostic = tryReadFile(fileName,
|
|
86213
|
+
function readConfigFile(fileName, readFile8) {
|
|
86214
|
+
const textOrDiagnostic = tryReadFile(fileName, readFile8);
|
|
86160
86215
|
return isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
|
|
86161
86216
|
}
|
|
86162
86217
|
function parseConfigFileTextToJson(fileName, jsonText) {
|
|
@@ -86171,14 +86226,14 @@ ${lanes.join("\n")}
|
|
|
86171
86226
|
error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0
|
|
86172
86227
|
};
|
|
86173
86228
|
}
|
|
86174
|
-
function readJsonConfigFile(fileName,
|
|
86175
|
-
const textOrDiagnostic = tryReadFile(fileName,
|
|
86229
|
+
function readJsonConfigFile(fileName, readFile8) {
|
|
86230
|
+
const textOrDiagnostic = tryReadFile(fileName, readFile8);
|
|
86176
86231
|
return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };
|
|
86177
86232
|
}
|
|
86178
|
-
function tryReadFile(fileName,
|
|
86233
|
+
function tryReadFile(fileName, readFile8) {
|
|
86179
86234
|
let text;
|
|
86180
86235
|
try {
|
|
86181
|
-
text =
|
|
86236
|
+
text = readFile8(fileName);
|
|
86182
86237
|
} catch (e2) {
|
|
86183
86238
|
return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e2.message);
|
|
86184
86239
|
}
|
|
@@ -86445,7 +86500,7 @@ ${lanes.join("\n")}
|
|
|
86445
86500
|
function convertToTSConfig(configParseResult, configFileName, host) {
|
|
86446
86501
|
var _a2, _b, _c;
|
|
86447
86502
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
86448
|
-
const files =
|
|
86503
|
+
const files = map30(
|
|
86449
86504
|
filter4(
|
|
86450
86505
|
configParseResult.fileNames,
|
|
86451
86506
|
!((_b = (_a2 = configParseResult.options.configFile) == null ? void 0 : _a2.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs(
|
|
@@ -86475,7 +86530,7 @@ ${lanes.join("\n")}
|
|
|
86475
86530
|
version: void 0
|
|
86476
86531
|
},
|
|
86477
86532
|
watchOptions: watchOptionMap && optionMapToObject(watchOptionMap),
|
|
86478
|
-
references:
|
|
86533
|
+
references: map30(configParseResult.projectReferences, (r2) => ({ ...r2, path: r2.originalPath ? r2.originalPath : "", originalPath: void 0 })),
|
|
86479
86534
|
files: length(files) ? files : void 0,
|
|
86480
86535
|
...((_c = configParseResult.options.configFile) == null ? void 0 : _c.configFileSpecs) ? {
|
|
86481
86536
|
include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs),
|
|
@@ -87164,7 +87219,7 @@ ${lanes.join("\n")}
|
|
|
87164
87219
|
const setPropertyInResultIfNotUndefined = (propertyName) => {
|
|
87165
87220
|
if (ownConfig.raw[propertyName]) return;
|
|
87166
87221
|
if (extendsRaw[propertyName]) {
|
|
87167
|
-
result[propertyName] =
|
|
87222
|
+
result[propertyName] = map30(extendsRaw[propertyName], (path2) => startsWithConfigDirTemplate(path2) || isRootedDiskPath(path2) ? path2 : combinePaths(
|
|
87168
87223
|
relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
|
|
87169
87224
|
path2
|
|
87170
87225
|
));
|
|
@@ -87473,7 +87528,7 @@ ${lanes.join("\n")}
|
|
|
87473
87528
|
}
|
|
87474
87529
|
}
|
|
87475
87530
|
function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {
|
|
87476
|
-
return filter4(
|
|
87531
|
+
return filter4(map30(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v);
|
|
87477
87532
|
}
|
|
87478
87533
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
87479
87534
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -87513,7 +87568,7 @@ ${lanes.join("\n")}
|
|
|
87513
87568
|
".json"
|
|
87514
87569
|
/* Json */
|
|
87515
87570
|
));
|
|
87516
|
-
const includeFilePatterns =
|
|
87571
|
+
const includeFilePatterns = map30(getRegularExpressionsForWildcards(includes, basePath, "files"), (pattern) => `^${pattern}$`);
|
|
87517
87572
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, host.useCaseSensitiveFileNames)) : emptyArray;
|
|
87518
87573
|
}
|
|
87519
87574
|
const includeIndex = findIndex(jsonOnlyIncludeRegexes, (re) => re.test(file2));
|
|
@@ -94813,7 +94868,7 @@ ${lanes.join("\n")}
|
|
|
94813
94868
|
}
|
|
94814
94869
|
const normalizedSourcePaths = getPathsRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName);
|
|
94815
94870
|
const relativePaths = flatMap(normalizedSourcePaths, (sourcePath) => {
|
|
94816
|
-
return
|
|
94871
|
+
return map30(normalizedTargetPaths, (targetPath) => ensurePathIsNonModuleName(getRelativePathFromDirectory(sourcePath, targetPath, getCanonicalFileName)));
|
|
94817
94872
|
});
|
|
94818
94873
|
const shortest = min(relativePaths, compareNumberOfDirectorySeparators);
|
|
94819
94874
|
if (!shortest) {
|
|
@@ -97858,7 +97913,7 @@ ${lanes.join("\n")}
|
|
|
97858
97913
|
const exportedSymbol = exports22 ? find(symbolsToArray(exports22), (symbol2) => !!getSymbolIfSameReference(symbol2, localSymbol)) : void 0;
|
|
97859
97914
|
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);
|
|
97860
97915
|
if (localSymbol.declarations) {
|
|
97861
|
-
addRelatedInfo(diagnostic, ...
|
|
97916
|
+
addRelatedInfo(diagnostic, ...map30(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
|
97862
97917
|
}
|
|
97863
97918
|
}
|
|
97864
97919
|
} else {
|
|
@@ -100639,7 +100694,7 @@ ${lanes.join("\n")}
|
|
|
100639
100694
|
const types3 = type.types;
|
|
100640
100695
|
const templateHead = factory.createTemplateHead(texts[0]);
|
|
100641
100696
|
const templateSpans = factory.createNodeArray(
|
|
100642
|
-
|
|
100697
|
+
map30(types3, (t2, i2) => factory.createTemplateLiteralTypeSpan(
|
|
100643
100698
|
typeToTypeNodeHelper(t2, context),
|
|
100644
100699
|
(i2 < types3.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i2 + 1])
|
|
100645
100700
|
))
|
|
@@ -101008,7 +101063,7 @@ ${lanes.join("\n")}
|
|
|
101008
101063
|
}
|
|
101009
101064
|
const abstractSignatures = filter4(resolved.constructSignatures, (signature) => !!(signature.flags & 4));
|
|
101010
101065
|
if (some(abstractSignatures)) {
|
|
101011
|
-
const types3 =
|
|
101066
|
+
const types3 = map30(abstractSignatures, getOrCreateTypeFromSignature);
|
|
101012
101067
|
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
|
|
101013
101068
|
// the logic in `createTypeNodesFromResolvedType`.
|
|
101014
101069
|
(context.flags & 2048 ? countWhere(resolved.properties, (p) => !(p.flags & 4194304)) : length(resolved.properties));
|
|
@@ -101226,7 +101281,7 @@ ${lanes.join("\n")}
|
|
|
101226
101281
|
const newComponents = filter4(indexInfo.components, (e2) => {
|
|
101227
101282
|
return !hasLateBindableName(e2);
|
|
101228
101283
|
});
|
|
101229
|
-
return
|
|
101284
|
+
return map30(newComponents, (e2) => {
|
|
101230
101285
|
trackComputedName(e2.name.expression, context2.enclosingDeclaration, context2);
|
|
101231
101286
|
return setTextRange2(
|
|
101232
101287
|
context2,
|
|
@@ -102035,7 +102090,7 @@ ${lanes.join("\n")}
|
|
|
102035
102090
|
const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol);
|
|
102036
102091
|
const parameterType = getTypeOfSymbol(parameterSymbol);
|
|
102037
102092
|
const parameterTypeNode = serializeTypeForDeclaration(context, parameterDeclaration, parameterType, parameterSymbol);
|
|
102038
|
-
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ?
|
|
102093
|
+
const modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map30(getModifiers(parameterDeclaration), factory.cloneNode) : void 0;
|
|
102039
102094
|
const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768;
|
|
102040
102095
|
const dotDotDotToken = isRest ? factory.createToken(
|
|
102041
102096
|
26
|
|
@@ -102233,7 +102288,7 @@ ${lanes.join("\n")}
|
|
|
102233
102288
|
let typeParameterNodes;
|
|
102234
102289
|
const targetSymbol = getTargetSymbol(symbol2);
|
|
102235
102290
|
if (targetSymbol.flags & (32 | 64 | 524288)) {
|
|
102236
|
-
typeParameterNodes = factory.createNodeArray(
|
|
102291
|
+
typeParameterNodes = factory.createNodeArray(map30(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2), (tp) => typeParameterToDeclaration(tp, context)));
|
|
102237
102292
|
}
|
|
102238
102293
|
return typeParameterNodes;
|
|
102239
102294
|
}
|
|
@@ -102258,7 +102313,7 @@ ${lanes.join("\n")}
|
|
|
102258
102313
|
const params = getTypeParametersOfClassOrInterface(
|
|
102259
102314
|
parentSymbol.flags & 2097152 ? resolveAlias(parentSymbol) : parentSymbol
|
|
102260
102315
|
);
|
|
102261
|
-
typeParameterNodes = mapToTypeNodes(
|
|
102316
|
+
typeParameterNodes = mapToTypeNodes(map30(params, (t2) => getMappedType(t2, nextSymbol.links.mapper)), context);
|
|
102262
102317
|
} else {
|
|
102263
102318
|
typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol2, context);
|
|
102264
102319
|
}
|
|
@@ -103081,7 +103136,7 @@ ${lanes.join("\n")}
|
|
|
103081
103136
|
}
|
|
103082
103137
|
function getNamesOfDeclaration(statement) {
|
|
103083
103138
|
if (isVariableStatement(statement)) {
|
|
103084
|
-
return filter4(
|
|
103139
|
+
return filter4(map30(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined);
|
|
103085
103140
|
}
|
|
103086
103141
|
return filter4([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
|
|
103087
103142
|
}
|
|
@@ -103107,7 +103162,7 @@ ${lanes.join("\n")}
|
|
|
103107
103162
|
void 0,
|
|
103108
103163
|
/*isTypeOnly*/
|
|
103109
103164
|
false,
|
|
103110
|
-
factory.createNamedExports(
|
|
103165
|
+
factory.createNamedExports(map30(flatMap(excessExports, (e2) => getNamesOfDeclaration(e2)), (id) => factory.createExportSpecifier(
|
|
103111
103166
|
/*isTypeOnly*/
|
|
103112
103167
|
false,
|
|
103113
103168
|
/*propertyName*/
|
|
@@ -103527,7 +103582,7 @@ ${lanes.join("\n")}
|
|
|
103527
103582
|
var _a22;
|
|
103528
103583
|
const aliasType = getDeclaredTypeOfTypeAlias(symbol2);
|
|
103529
103584
|
const typeParams = getSymbolLinks(symbol2).typeParameters;
|
|
103530
|
-
const typeParamDecls =
|
|
103585
|
+
const typeParamDecls = map30(typeParams, (p) => typeParameterToDeclaration(p, context));
|
|
103531
103586
|
const jsdocAliasDecl = (_a22 = symbol2.declarations) == null ? void 0 : _a22.find(isJSDocTypeAlias);
|
|
103532
103587
|
const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
|
|
103533
103588
|
const restoreFlags = saveRestoreFlags(context);
|
|
@@ -103558,7 +103613,7 @@ ${lanes.join("\n")}
|
|
|
103558
103613
|
context.approximateLength += 14 + internalSymbolName.length;
|
|
103559
103614
|
const interfaceType = getDeclaredTypeOfClassOrInterface(symbol2);
|
|
103560
103615
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
103561
|
-
const typeParamDecls =
|
|
103616
|
+
const typeParamDecls = map30(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
103562
103617
|
const baseTypes = getBaseTypes(interfaceType);
|
|
103563
103618
|
const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0;
|
|
103564
103619
|
const members = serializePropertySymbolsForClassOrInterface(
|
|
@@ -103871,7 +103926,7 @@ ${lanes.join("\n")}
|
|
|
103871
103926
|
addingDeclare = oldAddingDeclare;
|
|
103872
103927
|
const declarations = results;
|
|
103873
103928
|
results = oldResults;
|
|
103874
|
-
const defaultReplaced =
|
|
103929
|
+
const defaultReplaced = map30(declarations, (d) => isExportAssignment(d) && !d.isExportEquals && isIdentifier(d.expression) ? factory.createExportDeclaration(
|
|
103875
103930
|
/*modifiers*/
|
|
103876
103931
|
void 0,
|
|
103877
103932
|
/*isTypeOnly*/
|
|
@@ -103890,7 +103945,7 @@ ${lanes.join("\n")}
|
|
|
103890
103945
|
d,
|
|
103891
103946
|
32
|
|
103892
103947
|
/* Export */
|
|
103893
|
-
)) ?
|
|
103948
|
+
)) ? map30(defaultReplaced, removeExportModifier) : defaultReplaced;
|
|
103894
103949
|
fakespace = factory.updateModuleDeclaration(
|
|
103895
103950
|
fakespace,
|
|
103896
103951
|
fakespace.modifiers,
|
|
@@ -103938,7 +103993,7 @@ ${lanes.join("\n")}
|
|
|
103938
103993
|
}
|
|
103939
103994
|
return cleanup(factory.createExpressionWithTypeArguments(
|
|
103940
103995
|
expr,
|
|
103941
|
-
|
|
103996
|
+
map30(e2.typeArguments, (a) => syntacticNodeBuilder.tryReuseExistingTypeNode(context, a) || typeToTypeNodeHelper(getTypeFromTypeNode2(context, a), context))
|
|
103942
103997
|
));
|
|
103943
103998
|
function cleanup(result2) {
|
|
103944
103999
|
context.enclosingDeclaration = oldEnclosing;
|
|
@@ -103957,7 +104012,7 @@ ${lanes.join("\n")}
|
|
|
103957
104012
|
const oldEnclosing = context.enclosingDeclaration;
|
|
103958
104013
|
context.enclosingDeclaration = originalDecl || oldEnclosing;
|
|
103959
104014
|
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol2);
|
|
103960
|
-
const typeParamDecls =
|
|
104015
|
+
const typeParamDecls = map30(localParams, (p) => typeParameterToDeclaration(p, context));
|
|
103961
104016
|
forEach(localParams, (p) => context.approximateLength += symbolName(p.symbol).length);
|
|
103962
104017
|
const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol2));
|
|
103963
104018
|
const baseTypes = getBaseTypes(classType);
|
|
@@ -103968,7 +104023,7 @@ ${lanes.join("\n")}
|
|
|
103968
104023
|
const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType2;
|
|
103969
104024
|
context.approximateLength += (length(baseTypes) ? 8 : 0) + (length(implementsExpressions) ? 11 : 0);
|
|
103970
104025
|
const heritageClauses = [
|
|
103971
|
-
...!length(baseTypes) ? [] : [factory.createHeritageClause(96,
|
|
104026
|
+
...!length(baseTypes) ? [] : [factory.createHeritageClause(96, map30(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))],
|
|
103972
104027
|
...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119, implementsExpressions)]
|
|
103973
104028
|
];
|
|
103974
104029
|
const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
@@ -104797,7 +104852,7 @@ ${lanes.join("\n")}
|
|
|
104797
104852
|
let typeArgs;
|
|
104798
104853
|
let reference;
|
|
104799
104854
|
if (t2.target && isSymbolAccessibleByFlags(t2.target.symbol, enclosingDeclaration, flags)) {
|
|
104800
|
-
typeArgs =
|
|
104855
|
+
typeArgs = map30(getTypeArguments(t2), (t22) => typeToTypeNodeHelper(t22, context));
|
|
104801
104856
|
reference = symbolToExpression(
|
|
104802
104857
|
t2.target.symbol,
|
|
104803
104858
|
context,
|
|
@@ -105261,7 +105316,7 @@ ${lanes.join("\n")}
|
|
|
105261
105316
|
}
|
|
105262
105317
|
function getTypeOfPrototypeProperty(prototype) {
|
|
105263
105318
|
const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
|
|
105264
|
-
return classType.typeParameters ? createTypeReference(classType,
|
|
105319
|
+
return classType.typeParameters ? createTypeReference(classType, map30(classType.typeParameters, (_2) => anyType2)) : classType;
|
|
105265
105320
|
}
|
|
105266
105321
|
function getTypeOfPropertyOfType(type, name2) {
|
|
105267
105322
|
const prop = getPropertyOfType(type, name2);
|
|
@@ -105309,7 +105364,7 @@ ${lanes.join("\n")}
|
|
|
105309
105364
|
if (source.flags & 1048576) {
|
|
105310
105365
|
return mapType2(source, (t2) => getRestType(t2, properties, symbol2));
|
|
105311
105366
|
}
|
|
105312
|
-
let omitKeyType = getUnionType(
|
|
105367
|
+
let omitKeyType = getUnionType(map30(properties, getLiteralTypeFromPropertyName));
|
|
105313
105368
|
const spreadableProperties = [];
|
|
105314
105369
|
const unspreadableToRestKeys = [];
|
|
105315
105370
|
for (const prop of getPropertiesOfType(source)) {
|
|
@@ -106035,9 +106090,9 @@ ${lanes.join("\n")}
|
|
|
106035
106090
|
if (elements.length === 0 || elements.length === 1 && restElement) {
|
|
106036
106091
|
return languageVersion >= 2 ? createIterableType(anyType2) : anyArrayType;
|
|
106037
106092
|
}
|
|
106038
|
-
const elementTypes =
|
|
106093
|
+
const elementTypes = map30(elements, (e2) => isOmittedExpression(e2) ? anyType2 : getTypeFromBindingElement(e2, includePatternInType, reportErrors2));
|
|
106039
106094
|
const minLength = findLastIndex(elements, (e2) => !(e2 === restElement || isOmittedExpression(e2) || hasDefaultValue(e2)), elements.length - 1) + 1;
|
|
106040
|
-
const elementFlags =
|
|
106095
|
+
const elementFlags = map30(
|
|
106041
106096
|
elements,
|
|
106042
106097
|
(e2, i2) => e2 === restElement ? 4 : i2 >= minLength ? 2 : 1
|
|
106043
106098
|
/* Required */
|
|
@@ -106719,7 +106774,7 @@ ${lanes.join("\n")}
|
|
|
106719
106774
|
}
|
|
106720
106775
|
function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) {
|
|
106721
106776
|
const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
|
|
106722
|
-
const typeArguments =
|
|
106777
|
+
const typeArguments = map30(typeArgumentNodes, getTypeFromTypeNode);
|
|
106723
106778
|
return sameMap(signatures, (sig) => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments, isInJSFile(location)) : sig);
|
|
106724
106779
|
}
|
|
106725
106780
|
function getBaseConstructorTypeOfClass(type) {
|
|
@@ -107550,14 +107605,14 @@ ${lanes.join("\n")}
|
|
|
107550
107605
|
if (isTupleType(restType)) {
|
|
107551
107606
|
return [expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol)];
|
|
107552
107607
|
} else if (!skipUnionExpanding && restType.flags & 1048576 && every(restType.types, isTupleType)) {
|
|
107553
|
-
return
|
|
107608
|
+
return map30(restType.types, (t2) => expandSignatureParametersWithTupleMembers(t2, restIndex, restSymbol));
|
|
107554
107609
|
}
|
|
107555
107610
|
}
|
|
107556
107611
|
return [sig.parameters];
|
|
107557
107612
|
function expandSignatureParametersWithTupleMembers(restType, restIndex, restSymbol) {
|
|
107558
107613
|
const elementTypes = getTypeArguments(restType);
|
|
107559
107614
|
const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restSymbol);
|
|
107560
|
-
const restParams =
|
|
107615
|
+
const restParams = map30(elementTypes, (t2, i2) => {
|
|
107561
107616
|
const name2 = associatedNames && associatedNames[i2] ? associatedNames[i2] : getParameterNameAtPosition(sig, restIndex + i2, restType);
|
|
107562
107617
|
const flags = restType.target.elementFlags[i2];
|
|
107563
107618
|
const checkFlags = flags & 12 ? 32768 : flags & 2 ? 16384 : 0;
|
|
@@ -107568,7 +107623,7 @@ ${lanes.join("\n")}
|
|
|
107568
107623
|
return concatenate(sig.parameters.slice(0, restIndex), restParams);
|
|
107569
107624
|
}
|
|
107570
107625
|
function getUniqAssociatedNamesFromTupleType(type, restSymbol) {
|
|
107571
|
-
const names =
|
|
107626
|
+
const names = map30(type.target.labeledElementDeclarations, (labeledElement, i2) => getTupleElementLabel(labeledElement, i2, type.target.elementFlags[i2], restSymbol));
|
|
107572
107627
|
if (names) {
|
|
107573
107628
|
const duplicates = [];
|
|
107574
107629
|
const uniqueNames = /* @__PURE__ */ new Set();
|
|
@@ -107739,7 +107794,7 @@ ${lanes.join("\n")}
|
|
|
107739
107794
|
if (signatures !== masterList) {
|
|
107740
107795
|
const signature = signatures[0];
|
|
107741
107796
|
Debug.assert(!!signature, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass");
|
|
107742
|
-
results = !!signature.typeParameters && some(results, (s2) => !!s2.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s2.typeParameters)) ? void 0 :
|
|
107797
|
+
results = !!signature.typeParameters && some(results, (s2) => !!s2.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s2.typeParameters)) ? void 0 : map30(results, (sig) => combineSignaturesOfUnionMembers(sig, signature));
|
|
107743
107798
|
if (!results) {
|
|
107744
107799
|
break;
|
|
107745
107800
|
}
|
|
@@ -107862,7 +107917,7 @@ ${lanes.join("\n")}
|
|
|
107862
107917
|
for (const info of sourceInfos) {
|
|
107863
107918
|
const indexType = info.keyType;
|
|
107864
107919
|
if (every(types3, (t2) => !!getIndexInfoOfType(t2, indexType))) {
|
|
107865
|
-
result.push(createIndexInfo(indexType, getUnionType(
|
|
107920
|
+
result.push(createIndexInfo(indexType, getUnionType(map30(types3, (t2) => getIndexTypeOfType(t2, indexType))), some(types3, (t2) => getIndexInfoOfType(t2, indexType).isReadonly)));
|
|
107866
107921
|
}
|
|
107867
107922
|
}
|
|
107868
107923
|
return result;
|
|
@@ -107870,12 +107925,12 @@ ${lanes.join("\n")}
|
|
|
107870
107925
|
return emptyArray;
|
|
107871
107926
|
}
|
|
107872
107927
|
function resolveUnionTypeMembers(type) {
|
|
107873
|
-
const callSignatures = getUnionSignatures(
|
|
107928
|
+
const callSignatures = getUnionSignatures(map30(type.types, (t2) => t2 === globalFunctionType ? [unknownSignature] : getSignaturesOfType(
|
|
107874
107929
|
t2,
|
|
107875
107930
|
0
|
|
107876
107931
|
/* Call */
|
|
107877
107932
|
)));
|
|
107878
|
-
const constructSignatures = getUnionSignatures(
|
|
107933
|
+
const constructSignatures = getUnionSignatures(map30(type.types, (t2) => getSignaturesOfType(
|
|
107879
107934
|
t2,
|
|
107880
107935
|
1
|
|
107881
107936
|
/* Construct */
|
|
@@ -107892,7 +107947,7 @@ ${lanes.join("\n")}
|
|
|
107892
107947
|
1
|
|
107893
107948
|
/* Construct */
|
|
107894
107949
|
).length > 0);
|
|
107895
|
-
const mixinFlags =
|
|
107950
|
+
const mixinFlags = map30(types3, isMixinConstructorType);
|
|
107896
107951
|
if (constructorTypeCount > 0 && constructorTypeCount === countWhere(mixinFlags, (b) => b)) {
|
|
107897
107952
|
const firstMixinIndex = mixinFlags.indexOf(
|
|
107898
107953
|
/*searchElement*/
|
|
@@ -107933,7 +107988,7 @@ ${lanes.join("\n")}
|
|
|
107933
107988
|
/* Construct */
|
|
107934
107989
|
);
|
|
107935
107990
|
if (signatures.length && mixinCount > 0) {
|
|
107936
|
-
signatures =
|
|
107991
|
+
signatures = map30(signatures, (s2) => {
|
|
107937
107992
|
const clone22 = cloneSignature(s2);
|
|
107938
107993
|
clone22.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s2), types3, mixinFlags, i2);
|
|
107939
107994
|
return clone22;
|
|
@@ -108722,7 +108777,7 @@ ${lanes.join("\n")}
|
|
|
108722
108777
|
return getBaseConstraint(getSubstitutionIntersection(t2));
|
|
108723
108778
|
}
|
|
108724
108779
|
if (isGenericTupleType(t2)) {
|
|
108725
|
-
const newElements =
|
|
108780
|
+
const newElements = map30(getElementTypes(t2), (v, i2) => {
|
|
108726
108781
|
const constraint = v.flags & 262144 && t2.target.elementFlags[i2] & 8 && getBaseConstraint(v) || v;
|
|
108727
108782
|
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
|
108728
108783
|
});
|
|
@@ -109158,7 +109213,7 @@ ${lanes.join("\n")}
|
|
|
109158
109213
|
}
|
|
109159
109214
|
}
|
|
109160
109215
|
}
|
|
109161
|
-
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(
|
|
109216
|
+
return applicableInfos ? createIndexInfo(unknownType2, getIntersectionType(map30(applicableInfos, (info) => info.type)), reduceLeft(
|
|
109162
109217
|
applicableInfos,
|
|
109163
109218
|
(isReadonly, info) => isReadonly && info.isReadonly,
|
|
109164
109219
|
/*initial*/
|
|
@@ -109558,7 +109613,7 @@ ${lanes.join("\n")}
|
|
|
109558
109613
|
return errorType;
|
|
109559
109614
|
}
|
|
109560
109615
|
let type = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) : signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(
|
|
109561
|
-
|
|
109616
|
+
map30(signature.compositeSignatures, getReturnTypeOfSignature),
|
|
109562
109617
|
signature.compositeKind,
|
|
109563
109618
|
2
|
|
109564
109619
|
/* Subtype */
|
|
@@ -109697,7 +109752,7 @@ ${lanes.join("\n")}
|
|
|
109697
109752
|
function createCanonicalSignature(signature) {
|
|
109698
109753
|
return getSignatureInstantiation(
|
|
109699
109754
|
signature,
|
|
109700
|
-
|
|
109755
|
+
map30(signature.typeParameters, (tp) => tp.target && !getConstraintOfTypeParameter(tp.target) ? tp.target : tp),
|
|
109701
109756
|
isInJSFile(signature.declaration)
|
|
109702
109757
|
);
|
|
109703
109758
|
}
|
|
@@ -109708,8 +109763,8 @@ ${lanes.join("\n")}
|
|
|
109708
109763
|
return signature.baseSignatureCache;
|
|
109709
109764
|
}
|
|
109710
109765
|
const typeEraser = createTypeEraser(typeParameters);
|
|
109711
|
-
const baseConstraintMapper = createTypeMapper(typeParameters,
|
|
109712
|
-
let baseConstraints =
|
|
109766
|
+
const baseConstraintMapper = createTypeMapper(typeParameters, map30(typeParameters, (tp) => getConstraintOfTypeParameter(tp) || unknownType2));
|
|
109767
|
+
let baseConstraints = map30(typeParameters, (tp) => instantiateType(tp, baseConstraintMapper) || unknownType2);
|
|
109713
109768
|
for (let i2 = 0; i2 < typeParameters.length - 1; i2++) {
|
|
109714
109769
|
baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper);
|
|
109715
109770
|
}
|
|
@@ -109979,7 +110034,7 @@ ${lanes.join("\n")}
|
|
|
109979
110034
|
return concatenate(type.target.outerTypeParameters, (_a2 = type.target.localTypeParameters) == null ? void 0 : _a2.map(() => errorType)) || emptyArray;
|
|
109980
110035
|
}
|
|
109981
110036
|
const node = type.node;
|
|
109982
|
-
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
110037
|
+
const typeArguments = !node ? emptyArray : node.kind === 184 ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map30(node.elements, getTypeFromTypeNode);
|
|
109983
110038
|
if (popTypeResolution()) {
|
|
109984
110039
|
type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
|
|
109985
110040
|
} else {
|
|
@@ -110385,7 +110440,7 @@ ${lanes.join("\n")}
|
|
|
110385
110440
|
return links.resolvedType;
|
|
110386
110441
|
}
|
|
110387
110442
|
function typeArgumentsFromTypeReferenceNode(node) {
|
|
110388
|
-
return
|
|
110443
|
+
return map30(node.typeArguments, getTypeFromTypeNode);
|
|
110389
110444
|
}
|
|
110390
110445
|
function getTypeFromTypeQueryNode(node) {
|
|
110391
110446
|
const links = getNodeLinks(node);
|
|
@@ -110858,8 +110913,8 @@ ${lanes.join("\n")}
|
|
|
110858
110913
|
if (elementType) {
|
|
110859
110914
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
110860
110915
|
}
|
|
110861
|
-
const elementFlags =
|
|
110862
|
-
return getTupleTargetType(elementFlags, readonly2,
|
|
110916
|
+
const elementFlags = map30(node.elements, getTupleElementFlags);
|
|
110917
|
+
return getTupleTargetType(elementFlags, readonly2, map30(node.elements, memberIfLabeledElementDeclaration));
|
|
110863
110918
|
}
|
|
110864
110919
|
function memberIfLabeledElementDeclaration(member) {
|
|
110865
110920
|
return isNamedTupleMember(member) || isParameter(member) ? member : void 0;
|
|
@@ -110932,7 +110987,7 @@ ${lanes.join("\n")}
|
|
|
110932
110987
|
void 0
|
|
110933
110988
|
);
|
|
110934
110989
|
} else {
|
|
110935
|
-
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] :
|
|
110990
|
+
const elementTypes = node.kind === 189 ? [getTypeFromTypeNode(node.elementType)] : map30(node.elements, getTypeFromTypeNode);
|
|
110936
110991
|
links.resolvedType = createNormalizedTypeReference(target, elementTypes);
|
|
110937
110992
|
}
|
|
110938
110993
|
}
|
|
@@ -110942,7 +110997,7 @@ ${lanes.join("\n")}
|
|
|
110942
110997
|
return isTypeOperatorNode(node) && node.operator === 148;
|
|
110943
110998
|
}
|
|
110944
110999
|
function createTupleType(elementTypes, elementFlags, readonly2 = false, namedMemberDeclarations = []) {
|
|
110945
|
-
const tupleTarget = getTupleTargetType(elementFlags ||
|
|
111000
|
+
const tupleTarget = getTupleTargetType(elementFlags || map30(
|
|
110946
111001
|
elementTypes,
|
|
110947
111002
|
(_2) => 1
|
|
110948
111003
|
/* Required */
|
|
@@ -110953,7 +111008,7 @@ ${lanes.join("\n")}
|
|
|
110953
111008
|
if (elementFlags.length === 1 && elementFlags[0] & 4) {
|
|
110954
111009
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
110955
111010
|
}
|
|
110956
|
-
const key =
|
|
111011
|
+
const key = map30(elementFlags, (f3) => f3 & 1 ? "#" : f3 & 2 ? "?" : f3 & 4 ? "." : "*").join() + (readonly2 ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map30(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
110957
111012
|
let type = tupleTypes.get(key);
|
|
110958
111013
|
if (!type) {
|
|
110959
111014
|
tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly2, namedMemberDeclarations));
|
|
@@ -111028,7 +111083,7 @@ ${lanes.join("\n")}
|
|
|
111028
111083
|
if (target.combinedFlags & 8) {
|
|
111029
111084
|
const unionIndex = findIndex(elementTypes, (t2, i2) => !!(target.elementFlags[i2] & 8 && t2.flags & (131072 | 1048576)));
|
|
111030
111085
|
if (unionIndex >= 0) {
|
|
111031
|
-
return checkCrossProductUnion(
|
|
111086
|
+
return checkCrossProductUnion(map30(elementTypes, (t2, i2) => target.elementFlags[i2] & 8 ? t2 : unknownType2)) ? mapType2(elementTypes[unionIndex], (t2) => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t2))) : errorType;
|
|
111032
111087
|
}
|
|
111033
111088
|
}
|
|
111034
111089
|
const expandedTypes = [];
|
|
@@ -111198,7 +111253,7 @@ ${lanes.join("\n")}
|
|
|
111198
111253
|
const source = types3[i2];
|
|
111199
111254
|
if (hasEmptyObject || source.flags & 469499904) {
|
|
111200
111255
|
if (source.flags & 262144 && getBaseConstraintOrType(source).flags & 1048576) {
|
|
111201
|
-
if (isTypeRelatedTo(source, getUnionType(
|
|
111256
|
+
if (isTypeRelatedTo(source, getUnionType(map30(types3, (t2) => t2 === source ? neverType2 : t2)), strictSubtypeRelation)) {
|
|
111202
111257
|
orderedRemoveItemAt(types3, i2);
|
|
111203
111258
|
}
|
|
111204
111259
|
continue;
|
|
@@ -111461,7 +111516,7 @@ ${lanes.join("\n")}
|
|
|
111461
111516
|
const links = getNodeLinks(node);
|
|
111462
111517
|
if (!links.resolvedType) {
|
|
111463
111518
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
111464
|
-
links.resolvedType = getUnionType(
|
|
111519
|
+
links.resolvedType = getUnionType(map30(node.types, getTypeFromTypeNode), 1, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
|
|
111465
111520
|
}
|
|
111466
111521
|
return links.resolvedType;
|
|
111467
111522
|
}
|
|
@@ -111744,7 +111799,7 @@ ${lanes.join("\n")}
|
|
|
111744
111799
|
const links = getNodeLinks(node);
|
|
111745
111800
|
if (!links.resolvedType) {
|
|
111746
111801
|
const aliasSymbol = getAliasSymbolForTypeNode(node);
|
|
111747
|
-
const types3 =
|
|
111802
|
+
const types3 = map30(node.types, getTypeFromTypeNode);
|
|
111748
111803
|
const emptyIndex = types3.length === 2 ? types3.indexOf(emptyTypeLiteralType) : -1;
|
|
111749
111804
|
const t2 = emptyIndex >= 0 ? types3[1 - emptyIndex] : unknownType2;
|
|
111750
111805
|
const noSupertypeReduction = !!(t2.flags & (4 | 8 | 64) || t2.flags & 134217728 && isPatternLiteralType(t2));
|
|
@@ -111853,8 +111908,8 @@ ${lanes.join("\n")}
|
|
|
111853
111908
|
}
|
|
111854
111909
|
function getLiteralTypeFromProperties(type, include, includeOrigin) {
|
|
111855
111910
|
const origin = includeOrigin && (getObjectFlags(type) & (3 | 4) || type.aliasSymbol) ? createOriginIndexType(type) : void 0;
|
|
111856
|
-
const propertyTypes =
|
|
111857
|
-
const indexKeyTypes =
|
|
111911
|
+
const propertyTypes = map30(getPropertiesOfType(type), (prop) => getLiteralTypeFromProperty(prop, include));
|
|
111912
|
+
const indexKeyTypes = map30(getIndexInfosOfType(type), (info) => info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ? info.keyType === stringType2 && include & 8 ? stringOrNumberType : info.keyType : neverType2);
|
|
111858
111913
|
return getUnionType(
|
|
111859
111914
|
concatenate(propertyTypes, indexKeyTypes),
|
|
111860
111915
|
1,
|
|
@@ -111874,7 +111929,7 @@ ${lanes.join("\n")}
|
|
|
111874
111929
|
}
|
|
111875
111930
|
function getIndexType(type, indexFlags = 0) {
|
|
111876
111931
|
type = getReducedType(type);
|
|
111877
|
-
return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 ? getIntersectionType(
|
|
111932
|
+
return isNoInferType(type) ? getNoInferType(getIndexType(type.baseType, indexFlags)) : shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 ? getIntersectionType(map30(type.types, (t2) => getIndexType(t2, indexFlags))) : type.flags & 2097152 ? getUnionType(map30(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(
|
|
111878
111933
|
type,
|
|
111879
111934
|
(indexFlags & 2 ? 128 : 402653316) | (indexFlags & 1 ? 0 : 296 | 12288),
|
|
111880
111935
|
indexFlags === 0
|
|
@@ -111912,8 +111967,8 @@ ${lanes.join("\n")}
|
|
|
111912
111967
|
const links = getNodeLinks(node);
|
|
111913
111968
|
if (!links.resolvedType) {
|
|
111914
111969
|
links.resolvedType = getTemplateLiteralType(
|
|
111915
|
-
[node.head.text, ...
|
|
111916
|
-
|
|
111970
|
+
[node.head.text, ...map30(node.templateSpans, (span) => span.literal.text)],
|
|
111971
|
+
map30(node.templateSpans, (span) => getTypeFromTypeNode(span.type))
|
|
111917
111972
|
);
|
|
111918
111973
|
}
|
|
111919
111974
|
return links.resolvedType;
|
|
@@ -111944,7 +111999,7 @@ ${lanes.join("\n")}
|
|
|
111944
111999
|
return newTypes[0];
|
|
111945
112000
|
}
|
|
111946
112001
|
}
|
|
111947
|
-
const id = `${getTypeListId(newTypes)}|${
|
|
112002
|
+
const id = `${getTypeListId(newTypes)}|${map30(newTexts, (t2) => t2.length).join(",")}|${newTexts.join("")}`;
|
|
111948
112003
|
let type = templateLiteralTypes.get(id);
|
|
111949
112004
|
if (!type) {
|
|
111950
112005
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -112174,7 +112229,7 @@ ${lanes.join("\n")}
|
|
|
112174
112229
|
diagnostics.add(createDiagnosticForNode(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, indexType.value, typeToString(objectType2)));
|
|
112175
112230
|
return undefinedType2;
|
|
112176
112231
|
} else if (indexType.flags & (8 | 4)) {
|
|
112177
|
-
const types3 =
|
|
112232
|
+
const types3 = map30(objectType2.properties, (property) => {
|
|
112178
112233
|
return getTypeOfSymbol(property);
|
|
112179
112234
|
});
|
|
112180
112235
|
return getUnionType(append(types3, undefinedType2));
|
|
@@ -112335,13 +112390,13 @@ ${lanes.join("\n")}
|
|
|
112335
112390
|
}
|
|
112336
112391
|
function distributeIndexOverObjectType(objectType2, indexType, writing) {
|
|
112337
112392
|
if (objectType2.flags & 1048576 || objectType2.flags & 2097152 && !shouldDeferIndexType(objectType2)) {
|
|
112338
|
-
const types3 =
|
|
112393
|
+
const types3 = map30(objectType2.types, (t2) => getSimplifiedType(getIndexedAccessType(t2, indexType), writing));
|
|
112339
112394
|
return objectType2.flags & 2097152 || writing ? getIntersectionType(types3) : getUnionType(types3);
|
|
112340
112395
|
}
|
|
112341
112396
|
}
|
|
112342
112397
|
function distributeObjectOverIndexType(objectType2, indexType, writing) {
|
|
112343
112398
|
if (indexType.flags & 1048576) {
|
|
112344
|
-
const types3 =
|
|
112399
|
+
const types3 = map30(indexType.types, (t2) => getSimplifiedType(getIndexedAccessType(objectType2, t2), writing));
|
|
112345
112400
|
return writing ? getIntersectionType(types3) : getUnionType(types3);
|
|
112346
112401
|
}
|
|
112347
112402
|
}
|
|
@@ -112624,7 +112679,7 @@ ${lanes.join("\n")}
|
|
|
112624
112679
|
const newRoot = newType.root;
|
|
112625
112680
|
if (newRoot.outerTypeParameters) {
|
|
112626
112681
|
const typeParamMapper = combineTypeMappers(newType.mapper, newMapper);
|
|
112627
|
-
const typeArguments =
|
|
112682
|
+
const typeArguments = map30(newRoot.outerTypeParameters, (t2) => getMappedType(t2, typeParamMapper));
|
|
112628
112683
|
const newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments);
|
|
112629
112684
|
const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : void 0;
|
|
112630
112685
|
if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 | 131072))) {
|
|
@@ -113285,7 +113340,7 @@ ${lanes.join("\n")}
|
|
|
113285
113340
|
}
|
|
113286
113341
|
function createBackreferenceMapper(context, index) {
|
|
113287
113342
|
const forwardInferences = context.inferences.slice(index);
|
|
113288
|
-
return createTypeMapper(
|
|
113343
|
+
return createTypeMapper(map30(forwardInferences, (i2) => i2.typeParameter), map30(forwardInferences, () => unknownType2));
|
|
113289
113344
|
}
|
|
113290
113345
|
function createOuterReturnMapper(context) {
|
|
113291
113346
|
return context.outerReturnMapper ?? (context.outerReturnMapper = mergeTypeMappers(context.returnMapper, cloneInferenceContext(context).mapper));
|
|
@@ -113316,7 +113371,7 @@ ${lanes.join("\n")}
|
|
|
113316
113371
|
function instantiateSignature(signature, mapper, eraseTypeParameters) {
|
|
113317
113372
|
let freshTypeParameters;
|
|
113318
113373
|
if (signature.typeParameters && !eraseTypeParameters) {
|
|
113319
|
-
freshTypeParameters =
|
|
113374
|
+
freshTypeParameters = map30(signature.typeParameters, cloneTypeParameter);
|
|
113320
113375
|
mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper);
|
|
113321
113376
|
for (const tp of freshTypeParameters) {
|
|
113322
113377
|
tp.mapper = mapper;
|
|
@@ -113388,7 +113443,7 @@ ${lanes.join("\n")}
|
|
|
113388
113443
|
}
|
|
113389
113444
|
if (typeParameters.length) {
|
|
113390
113445
|
const combinedMapper = combineTypeMappers(type.mapper, mapper);
|
|
113391
|
-
const typeArguments =
|
|
113446
|
+
const typeArguments = map30(typeParameters, (t2) => getMappedType(t2, combinedMapper));
|
|
113392
113447
|
const newAliasSymbol = aliasSymbol || type.aliasSymbol;
|
|
113393
113448
|
const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
|
|
113394
113449
|
const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments);
|
|
@@ -113500,7 +113555,7 @@ ${lanes.join("\n")}
|
|
|
113500
113555
|
return instantiateMappedTupleType(t2, type, typeVariable, mapper);
|
|
113501
113556
|
}
|
|
113502
113557
|
if (isArrayOrTupleOrIntersection(t2)) {
|
|
113503
|
-
return getIntersectionType(
|
|
113558
|
+
return getIntersectionType(map30(t2.types, instantiateConstituent));
|
|
113504
113559
|
}
|
|
113505
113560
|
}
|
|
113506
113561
|
return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t2, mapper));
|
|
@@ -113515,12 +113570,12 @@ ${lanes.join("\n")}
|
|
|
113515
113570
|
const elementFlags = tupleType2.target.elementFlags;
|
|
113516
113571
|
const fixedLength = tupleType2.target.fixedLength;
|
|
113517
113572
|
const fixedMapper = fixedLength ? prependTypeMapping(typeVariable, tupleType2, mapper) : mapper;
|
|
113518
|
-
const newElementTypes =
|
|
113573
|
+
const newElementTypes = map30(getElementTypes(tupleType2), (type, i2) => {
|
|
113519
113574
|
const flags = elementFlags[i2];
|
|
113520
113575
|
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;
|
|
113521
113576
|
});
|
|
113522
113577
|
const modifiers = getMappedTypeModifiers(mappedType);
|
|
113523
|
-
const newElementFlags = modifiers & 4 ?
|
|
113578
|
+
const newElementFlags = modifiers & 4 ? map30(elementFlags, (f3) => f3 & 1 ? 2 : f3) : modifiers & 8 ? map30(elementFlags, (f3) => f3 & 2 ? 1 : f3) : elementFlags;
|
|
113524
113579
|
const newReadonly = getModifiedReadonlyState(tupleType2.target.readonly, getMappedTypeModifiers(mappedType));
|
|
113525
113580
|
return contains(newElementTypes, errorType) ? errorType : createTupleType(newElementTypes, newElementFlags, newReadonly, tupleType2.target.labeledElementDeclarations);
|
|
113526
113581
|
}
|
|
@@ -113576,7 +113631,7 @@ ${lanes.join("\n")}
|
|
|
113576
113631
|
function getConditionalTypeInstantiation(type, mapper, forConstraint, aliasSymbol, aliasTypeArguments) {
|
|
113577
113632
|
const root = type.root;
|
|
113578
113633
|
if (root.outerTypeParameters) {
|
|
113579
|
-
const typeArguments =
|
|
113634
|
+
const typeArguments = map30(root.outerTypeParameters, (t2) => getMappedType(t2, mapper));
|
|
113580
113635
|
const id = (forConstraint ? "C" : "") + getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
113581
113636
|
let result = root.instantiations.get(id);
|
|
113582
113637
|
if (!result) {
|
|
@@ -113808,7 +113863,7 @@ ${lanes.join("\n")}
|
|
|
113808
113863
|
return result;
|
|
113809
113864
|
}
|
|
113810
113865
|
} else if (type.flags & 2097152) {
|
|
113811
|
-
return getIntersectionType(
|
|
113866
|
+
return getIntersectionType(map30(type.types, getTypeWithoutSignatures));
|
|
113812
113867
|
}
|
|
113813
113868
|
return type;
|
|
113814
113869
|
}
|
|
@@ -113964,7 +114019,7 @@ ${lanes.join("\n")}
|
|
|
113964
114019
|
}
|
|
113965
114020
|
const returnExpression = node.body;
|
|
113966
114021
|
const sourceReturn = getReturnTypeOfSignature(sourceSig);
|
|
113967
|
-
const targetReturn = getUnionType(
|
|
114022
|
+
const targetReturn = getUnionType(map30(targetSignatures, getReturnTypeOfSignature));
|
|
113968
114023
|
if (!checkTypeRelatedTo(
|
|
113969
114024
|
sourceReturn,
|
|
113970
114025
|
targetReturn,
|
|
@@ -116803,9 +116858,9 @@ ${lanes.join("\n")}
|
|
|
116803
116858
|
false
|
|
116804
116859
|
)) {
|
|
116805
116860
|
if (props.length > 5) {
|
|
116806
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2),
|
|
116861
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2), map30(props.slice(0, 4), (p) => symbolToString(p)).join(", "), props.length - 4);
|
|
116807
116862
|
} else {
|
|
116808
|
-
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2),
|
|
116863
|
+
reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2), map30(props, (p) => symbolToString(p)).join(", "));
|
|
116809
116864
|
}
|
|
116810
116865
|
if (shouldSkipElaboration && errorInfo) {
|
|
116811
116866
|
overrideNextErrorInfo++;
|
|
@@ -118382,7 +118437,7 @@ ${lanes.join("\n")}
|
|
|
118382
118437
|
return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable);
|
|
118383
118438
|
}
|
|
118384
118439
|
function cloneInferenceContext(context, extraFlags = 0) {
|
|
118385
|
-
return context && createInferenceContextWorker(
|
|
118440
|
+
return context && createInferenceContextWorker(map30(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes);
|
|
118386
118441
|
}
|
|
118387
118442
|
function createInferenceContextWorker(inferences, signature, flags, compareTypes) {
|
|
118388
118443
|
const context = {
|
|
@@ -118400,8 +118455,8 @@ ${lanes.join("\n")}
|
|
|
118400
118455
|
}
|
|
118401
118456
|
function makeFixingMapperForContext(context) {
|
|
118402
118457
|
return makeDeferredTypeMapper(
|
|
118403
|
-
|
|
118404
|
-
|
|
118458
|
+
map30(context.inferences, (i2) => i2.typeParameter),
|
|
118459
|
+
map30(context.inferences, (inference, i2) => () => {
|
|
118405
118460
|
if (!inference.isFixed) {
|
|
118406
118461
|
inferFromIntraExpressionSites(context);
|
|
118407
118462
|
clearCachedInferences(context.inferences);
|
|
@@ -118413,8 +118468,8 @@ ${lanes.join("\n")}
|
|
|
118413
118468
|
}
|
|
118414
118469
|
function makeNonFixingMapperForContext(context) {
|
|
118415
118470
|
return makeDeferredTypeMapper(
|
|
118416
|
-
|
|
118417
|
-
|
|
118471
|
+
map30(context.inferences, (i2) => i2.typeParameter),
|
|
118472
|
+
map30(context.inferences, (_2, i2) => () => {
|
|
118418
118473
|
return getInferredType(context, i2);
|
|
118419
118474
|
})
|
|
118420
118475
|
);
|
|
@@ -118474,7 +118529,7 @@ ${lanes.join("\n")}
|
|
|
118474
118529
|
}
|
|
118475
118530
|
function cloneInferredPartOfContext(context) {
|
|
118476
118531
|
const inferences = filter4(context.inferences, hasInferenceCandidates);
|
|
118477
|
-
return inferences.length ? createInferenceContextWorker(
|
|
118532
|
+
return inferences.length ? createInferenceContextWorker(map30(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0;
|
|
118478
118533
|
}
|
|
118479
118534
|
function getMapperFromContext(context) {
|
|
118480
118535
|
return context && context.mapper;
|
|
@@ -118562,7 +118617,7 @@ ${lanes.join("\n")}
|
|
|
118562
118617
|
return createArrayType(elementType, isReadonlyArrayType(source));
|
|
118563
118618
|
}
|
|
118564
118619
|
if (isTupleType(source)) {
|
|
118565
|
-
const elementTypes =
|
|
118620
|
+
const elementTypes = map30(getElementTypes(source), (t2) => inferReverseMappedType(t2, target, constraint));
|
|
118566
118621
|
if (!every(elementTypes, (t2) => !!t2)) {
|
|
118567
118622
|
return void 0;
|
|
118568
118623
|
}
|
|
@@ -118732,7 +118787,7 @@ ${lanes.join("\n")}
|
|
|
118732
118787
|
return false;
|
|
118733
118788
|
}
|
|
118734
118789
|
function inferTypesFromTemplateLiteralType(source, target) {
|
|
118735
|
-
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ?
|
|
118790
|
+
return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 ? arrayIsEqualTo(source.texts, target.texts) ? map30(source.types, (s2, i2) => {
|
|
118736
118791
|
return isTypeAssignableTo(getBaseConstraintOrType(s2), getBaseConstraintOrType(target.types[i2])) ? s2 : getStringLikeTypeForType(s2);
|
|
118737
118792
|
}) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0;
|
|
118738
118793
|
}
|
|
@@ -119196,8 +119251,8 @@ ${lanes.join("\n")}
|
|
|
119196
119251
|
if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) {
|
|
119197
119252
|
return true;
|
|
119198
119253
|
}
|
|
119199
|
-
const propTypes =
|
|
119200
|
-
const indexTypes =
|
|
119254
|
+
const propTypes = map30(getPropertiesOfType(source), getTypeOfSymbol);
|
|
119255
|
+
const indexTypes = map30(getIndexInfosOfType(source), (info) => info !== enumNumberIndexInfo ? info.type : neverType2);
|
|
119201
119256
|
inferFromTypes(getUnionType(concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target));
|
|
119202
119257
|
return true;
|
|
119203
119258
|
}
|
|
@@ -120284,7 +120339,7 @@ ${lanes.join("\n")}
|
|
|
120284
120339
|
) : type;
|
|
120285
120340
|
}
|
|
120286
120341
|
function mapTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
120287
|
-
return type.flags & 1048576 && aliasSymbol ? getUnionType(
|
|
120342
|
+
return type.flags & 1048576 && aliasSymbol ? getUnionType(map30(type.types, mapper), 1, aliasSymbol, aliasTypeArguments) : mapType2(type, mapper);
|
|
120288
120343
|
}
|
|
120289
120344
|
function extractTypesOfKind(type, kind) {
|
|
120290
120345
|
return filterType(type, (t2) => (t2.flags & kind) !== 0);
|
|
@@ -121052,7 +121107,7 @@ ${lanes.join("\n")}
|
|
|
121052
121107
|
}
|
|
121053
121108
|
function getUnionOrEvolvingArrayType(types3, subtypeReduction) {
|
|
121054
121109
|
if (isEvolvingArrayTypeList(types3)) {
|
|
121055
|
-
return getEvolvingArrayType(getUnionType(
|
|
121110
|
+
return getEvolvingArrayType(getUnionType(map30(types3, getElementTypeOfEvolvingArrayType)));
|
|
121056
121111
|
}
|
|
121057
121112
|
const result = recombineUnknownType(getUnionType(sameMap(types3, finalizeEvolvingArrayType), subtypeReduction));
|
|
121058
121113
|
if (result !== declaredType && result.flags & declaredType.flags & 1048576 && arrayIsEqualTo(result.types, declaredType.types)) {
|
|
@@ -121146,7 +121201,7 @@ ${lanes.join("\n")}
|
|
|
121146
121201
|
function narrowTypeBySwitchOnDiscriminantProperty(type, access, data) {
|
|
121147
121202
|
if (data.clauseStart < data.clauseEnd && type.flags & 1048576 && getKeyPropertyName(type) === getAccessedPropertyName(access)) {
|
|
121148
121203
|
const clauseTypes = getSwitchClauseTypes(data.switchStatement).slice(data.clauseStart, data.clauseEnd);
|
|
121149
|
-
const candidate = getUnionType(
|
|
121204
|
+
const candidate = getUnionType(map30(clauseTypes, (t2) => getConstituentTypeForKeyType(type, t2) || unknownType2));
|
|
121150
121205
|
if (candidate !== unknownType2) {
|
|
121151
121206
|
return candidate;
|
|
121152
121207
|
}
|
|
@@ -121574,7 +121629,7 @@ ${lanes.join("\n")}
|
|
|
121574
121629
|
return filterType(type, (t2) => getTypeFacts(t2, notEqualFacts) === notEqualFacts);
|
|
121575
121630
|
}
|
|
121576
121631
|
const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);
|
|
121577
|
-
return getUnionType(
|
|
121632
|
+
return getUnionType(map30(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType2));
|
|
121578
121633
|
}
|
|
121579
121634
|
function narrowTypeBySwitchOnTrue(type, { switchStatement, clauseStart, clauseEnd }) {
|
|
121580
121635
|
const defaultIndex = findIndex(
|
|
@@ -121609,7 +121664,7 @@ ${lanes.join("\n")}
|
|
|
121609
121664
|
return type;
|
|
121610
121665
|
}
|
|
121611
121666
|
const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd);
|
|
121612
|
-
return getUnionType(
|
|
121667
|
+
return getUnionType(map30(clauses, (clause) => clause.kind === 297 ? narrowType(
|
|
121613
121668
|
type,
|
|
121614
121669
|
clause.expression,
|
|
121615
121670
|
/*assumeTrue*/
|
|
@@ -121701,7 +121756,7 @@ ${lanes.join("\n")}
|
|
|
121701
121756
|
/* Construct */
|
|
121702
121757
|
);
|
|
121703
121758
|
if (constructSignatures.length) {
|
|
121704
|
-
return getUnionType(
|
|
121759
|
+
return getUnionType(map30(constructSignatures, (signature) => getReturnTypeOfSignature(getErasedSignature(signature))));
|
|
121705
121760
|
}
|
|
121706
121761
|
return emptyObjectType;
|
|
121707
121762
|
}
|
|
@@ -123871,7 +123926,7 @@ ${lanes.join("\n")}
|
|
|
123871
123926
|
getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(
|
|
123872
123927
|
contextualType,
|
|
123873
123928
|
concatenate(
|
|
123874
|
-
|
|
123929
|
+
map30(
|
|
123875
123930
|
filter4(node.properties, (p) => {
|
|
123876
123931
|
if (!p.symbol) {
|
|
123877
123932
|
return false;
|
|
@@ -123886,7 +123941,7 @@ ${lanes.join("\n")}
|
|
|
123886
123941
|
}),
|
|
123887
123942
|
(prop) => [() => getContextFreeTypeOfExpression(prop.kind === 304 ? prop.initializer : prop.name), prop.symbol.escapedName]
|
|
123888
123943
|
),
|
|
123889
|
-
|
|
123944
|
+
map30(
|
|
123890
123945
|
filter4(getPropertiesOfType(contextualType), (s2) => {
|
|
123891
123946
|
var _a2;
|
|
123892
123947
|
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);
|
|
@@ -123908,11 +123963,11 @@ ${lanes.join("\n")}
|
|
|
123908
123963
|
discriminateTypeByDiscriminableItems(
|
|
123909
123964
|
contextualType,
|
|
123910
123965
|
concatenate(
|
|
123911
|
-
|
|
123966
|
+
map30(
|
|
123912
123967
|
filter4(node.properties, (p) => !!p.symbol && p.kind === 292 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))),
|
|
123913
123968
|
(prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName]
|
|
123914
123969
|
),
|
|
123915
|
-
|
|
123970
|
+
map30(
|
|
123916
123971
|
filter4(getPropertiesOfType(contextualType), (s2) => {
|
|
123917
123972
|
var _a2;
|
|
123918
123973
|
if (!(s2.flags & 16777216) || !((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members)) {
|
|
@@ -123971,13 +124026,13 @@ ${lanes.join("\n")}
|
|
|
123971
124026
|
}
|
|
123972
124027
|
if (type.flags & 1048576) {
|
|
123973
124028
|
return getUnionType(
|
|
123974
|
-
|
|
124029
|
+
map30(type.types, (t2) => instantiateInstantiableTypes(t2, mapper)),
|
|
123975
124030
|
0
|
|
123976
124031
|
/* None */
|
|
123977
124032
|
);
|
|
123978
124033
|
}
|
|
123979
124034
|
if (type.flags & 2097152) {
|
|
123980
|
-
return getIntersectionType(
|
|
124035
|
+
return getIntersectionType(map30(type.types, (t2) => instantiateInstantiableTypes(t2, mapper)));
|
|
123981
124036
|
}
|
|
123982
124037
|
return type;
|
|
123983
124038
|
}
|
|
@@ -125307,7 +125362,7 @@ ${lanes.join("\n")}
|
|
|
125307
125362
|
);
|
|
125308
125363
|
}
|
|
125309
125364
|
if (signatures.length === 0 && apparentElemType.flags & 1048576) {
|
|
125310
|
-
signatures = getUnionSignatures(
|
|
125365
|
+
signatures = getUnionSignatures(map30(apparentElemType.types, (t2) => getUninstantiatedJsxSignaturesOfType(t2, caller)));
|
|
125311
125366
|
}
|
|
125312
125367
|
return signatures;
|
|
125313
125368
|
}
|
|
@@ -126781,7 +126836,7 @@ ${lanes.join("\n")}
|
|
|
126781
126836
|
function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
|
|
126782
126837
|
const isJavascript = isInJSFile(signature.declaration);
|
|
126783
126838
|
const typeParameters = signature.typeParameters;
|
|
126784
|
-
const typeArgumentTypes = fillMissingTypeArguments(
|
|
126839
|
+
const typeArgumentTypes = fillMissingTypeArguments(map30(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript);
|
|
126785
126840
|
let mapper;
|
|
126786
126841
|
for (let i2 = 0; i2 < typeArgumentNodes.length; i2++) {
|
|
126787
126842
|
Debug.assert(typeParameters[i2] !== void 0, "Should not call checkTypeArguments with too many type arguments");
|
|
@@ -127462,7 +127517,7 @@ ${lanes.join("\n")}
|
|
|
127462
127517
|
const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
|
|
127463
127518
|
Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
127464
127519
|
let chain = chainDiagnosticMessages(
|
|
127465
|
-
|
|
127520
|
+
map30(diags, createDiagnosticMessageChainFromDiagnostic),
|
|
127466
127521
|
Diagnostics.No_overload_matches_this_call
|
|
127467
127522
|
);
|
|
127468
127523
|
if (headMessage) {
|
|
@@ -132030,7 +132085,7 @@ ${lanes.join("\n")}
|
|
|
132030
132085
|
if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) {
|
|
132031
132086
|
const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters);
|
|
132032
132087
|
const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters);
|
|
132033
|
-
const inferences =
|
|
132088
|
+
const inferences = map30(context.inferences, (info) => createInferenceInfo(info.typeParameter));
|
|
132034
132089
|
applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {
|
|
132035
132090
|
inferTypes(
|
|
132036
132091
|
inferences,
|
|
@@ -132978,7 +133033,7 @@ ${lanes.join("\n")}
|
|
|
132978
133033
|
return getEffectiveTypeArguments2(node, typeParameters)[index];
|
|
132979
133034
|
}
|
|
132980
133035
|
function getEffectiveTypeArguments2(node, typeParameters) {
|
|
132981
|
-
return fillMissingTypeArguments(
|
|
133036
|
+
return fillMissingTypeArguments(map30(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node));
|
|
132982
133037
|
}
|
|
132983
133038
|
function checkTypeArgumentConstraints(node, typeParameters) {
|
|
132984
133039
|
let typeArguments;
|
|
@@ -133624,7 +133679,7 @@ ${lanes.join("\n")}
|
|
|
133624
133679
|
return void 0;
|
|
133625
133680
|
}
|
|
133626
133681
|
const onfulfilledParameterType = getTypeWithFacts(
|
|
133627
|
-
getUnionType(
|
|
133682
|
+
getUnionType(map30(candidates, getTypeOfFirstParameterOfSignature)),
|
|
133628
133683
|
2097152
|
|
133629
133684
|
/* NEUndefinedOrNull */
|
|
133630
133685
|
);
|
|
@@ -133643,7 +133698,7 @@ ${lanes.join("\n")}
|
|
|
133643
133698
|
return void 0;
|
|
133644
133699
|
}
|
|
133645
133700
|
return typeAsPromise.promisedTypeOfPromise = getUnionType(
|
|
133646
|
-
|
|
133701
|
+
map30(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature),
|
|
133647
133702
|
2
|
|
133648
133703
|
/* Subtype */
|
|
133649
133704
|
);
|
|
@@ -135642,7 +135697,7 @@ ${lanes.join("\n")}
|
|
|
135642
135697
|
}
|
|
135643
135698
|
return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes);
|
|
135644
135699
|
}
|
|
135645
|
-
const iteratorType = getIntersectionType(
|
|
135700
|
+
const iteratorType = getIntersectionType(map30(validSignatures, getReturnTypeOfSignature));
|
|
135646
135701
|
const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes;
|
|
135647
135702
|
return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);
|
|
135648
135703
|
}
|
|
@@ -136861,7 +136916,7 @@ ${lanes.join("\n")}
|
|
|
136861
136916
|
error210(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first2(memberInfo.missedProperties), memberInfo.baseTypeName);
|
|
136862
136917
|
}
|
|
136863
136918
|
} else if (length(memberInfo.missedProperties) > 5) {
|
|
136864
|
-
const missedProperties =
|
|
136919
|
+
const missedProperties = map30(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
|
|
136865
136920
|
const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
|
|
136866
136921
|
if (isClassExpression(errorNode)) {
|
|
136867
136922
|
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);
|
|
@@ -136869,7 +136924,7 @@ ${lanes.join("\n")}
|
|
|
136869
136924
|
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);
|
|
136870
136925
|
}
|
|
136871
136926
|
} else {
|
|
136872
|
-
const missedProperties =
|
|
136927
|
+
const missedProperties = map30(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
|
|
136873
136928
|
if (isClassExpression(errorNode)) {
|
|
136874
136929
|
error210(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
|
|
136875
136930
|
} else {
|
|
@@ -138984,7 +139039,7 @@ ${lanes.join("\n")}
|
|
|
138984
139039
|
} else if (symbol2) {
|
|
138985
139040
|
const symbolLinks2 = getSymbolLinks(symbol2);
|
|
138986
139041
|
const declarationList = mapDefined(infos, (i2) => i2.declaration);
|
|
138987
|
-
const nodeListId =
|
|
139042
|
+
const nodeListId = map30(declarationList, getNodeId).join(",");
|
|
138988
139043
|
if (!symbolLinks2.filteredIndexSymbolCache) {
|
|
138989
139044
|
symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map();
|
|
138990
139045
|
}
|
|
@@ -140240,7 +140295,7 @@ ${lanes.join("\n")}
|
|
|
140240
140295
|
const newComponents = filter4(info.components, (e2) => {
|
|
140241
140296
|
return !hasLateBindableName(e2);
|
|
140242
140297
|
});
|
|
140243
|
-
result.push(...
|
|
140298
|
+
result.push(...map30(newComponents, (e2) => {
|
|
140244
140299
|
trackComputedName(e2.name.expression);
|
|
140245
140300
|
const mods = infoList === staticInfos ? [factory.createModifier(
|
|
140246
140301
|
126
|
|
@@ -142203,7 +142258,7 @@ ${lanes.join("\n")}
|
|
|
142203
142258
|
if (sourceProperties) {
|
|
142204
142259
|
const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target);
|
|
142205
142260
|
if (sourcePropertiesFiltered) {
|
|
142206
|
-
const discriminated = discriminateTypeByDiscriminableItems(target,
|
|
142261
|
+
const discriminated = discriminateTypeByDiscriminableItems(target, map30(sourcePropertiesFiltered, (p) => [() => getTypeOfSymbol(p), p.escapedName]), isRelatedTo);
|
|
142207
142262
|
if (discriminated !== target) {
|
|
142208
142263
|
return discriminated;
|
|
142209
142264
|
}
|
|
@@ -144691,7 +144746,7 @@ ${lanes.join("\n")}
|
|
|
144691
144746
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
144692
144747
|
}
|
|
144693
144748
|
function transformBundle(node) {
|
|
144694
|
-
return context.factory.createBundle(
|
|
144749
|
+
return context.factory.createBundle(map30(node.sourceFiles, transformSourceFile));
|
|
144695
144750
|
}
|
|
144696
144751
|
}
|
|
144697
144752
|
function getExportNeedsImportStarHelper(node) {
|
|
@@ -145640,7 +145695,7 @@ ${lanes.join("\n")}
|
|
|
145640
145695
|
}
|
|
145641
145696
|
function makeArrayAssignmentPattern(factory2, elements) {
|
|
145642
145697
|
Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement);
|
|
145643
|
-
return factory2.createArrayLiteralExpression(
|
|
145698
|
+
return factory2.createArrayLiteralExpression(map30(elements, factory2.converters.convertToArrayAssignmentElement));
|
|
145644
145699
|
}
|
|
145645
145700
|
function makeObjectBindingPattern(factory2, elements) {
|
|
145646
145701
|
Debug.assertEachNode(elements, isBindingElement);
|
|
@@ -145648,7 +145703,7 @@ ${lanes.join("\n")}
|
|
|
145648
145703
|
}
|
|
145649
145704
|
function makeObjectAssignmentPattern(factory2, elements) {
|
|
145650
145705
|
Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement);
|
|
145651
|
-
return factory2.createObjectLiteralExpression(
|
|
145706
|
+
return factory2.createObjectLiteralExpression(map30(elements, factory2.converters.convertToObjectAssignmentElement));
|
|
145652
145707
|
}
|
|
145653
145708
|
function makeBindingElement(factory2, name2) {
|
|
145654
145709
|
return factory2.createBindingElement(
|
|
@@ -147094,7 +147149,7 @@ ${lanes.join("\n")}
|
|
|
147094
147149
|
return setTextRange(
|
|
147095
147150
|
factory2.createExpressionStatement(
|
|
147096
147151
|
factory2.inlineExpressions(
|
|
147097
|
-
|
|
147152
|
+
map30(variables, transformInitializedVariable)
|
|
147098
147153
|
)
|
|
147099
147154
|
),
|
|
147100
147155
|
node
|
|
@@ -147300,7 +147355,7 @@ ${lanes.join("\n")}
|
|
|
147300
147355
|
currentNamespaceContainerName = localName;
|
|
147301
147356
|
const statements = [];
|
|
147302
147357
|
startLexicalEnvironment();
|
|
147303
|
-
const members =
|
|
147358
|
+
const members = map30(node.members, transformEnumMember);
|
|
147304
147359
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
147305
147360
|
addRange(statements, members);
|
|
147306
147361
|
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
|
|
@@ -149211,7 +149266,7 @@ ${lanes.join("\n")}
|
|
|
149211
149266
|
if (isDecoratedClassDeclaration) {
|
|
149212
149267
|
Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration.");
|
|
149213
149268
|
if (some(pendingExpressions)) {
|
|
149214
|
-
addRange(pendingStatements,
|
|
149269
|
+
addRange(pendingStatements, map30(pendingExpressions, factory2.createExpressionStatement));
|
|
149215
149270
|
}
|
|
149216
149271
|
if (some(staticPropertiesOrClassStaticBlocks)) {
|
|
149217
149272
|
addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node));
|
|
@@ -151000,13 +151055,13 @@ ${lanes.join("\n")}
|
|
|
151000
151055
|
}
|
|
151001
151056
|
const { false: decorators, true: metadata } = groupBy(allDecorators.decorators, isSyntheticMetadataDecorator);
|
|
151002
151057
|
const decoratorExpressions = [];
|
|
151003
|
-
addRange(decoratorExpressions,
|
|
151058
|
+
addRange(decoratorExpressions, map30(decorators, transformDecorator));
|
|
151004
151059
|
addRange(decoratorExpressions, flatMap(allDecorators.parameters, transformDecoratorsOfParameter));
|
|
151005
|
-
addRange(decoratorExpressions,
|
|
151060
|
+
addRange(decoratorExpressions, map30(metadata, transformDecorator));
|
|
151006
151061
|
return decoratorExpressions;
|
|
151007
151062
|
}
|
|
151008
151063
|
function addClassElementDecorationStatements(statements, node, isStatic2) {
|
|
151009
|
-
addRange(statements,
|
|
151064
|
+
addRange(statements, map30(generateClassElementDecorationExpressions(node, isStatic2), (expr) => factory2.createExpressionStatement(expr)));
|
|
151010
151065
|
}
|
|
151011
151066
|
function isDecoratedClassElement(member, isStaticElement, parent2) {
|
|
151012
151067
|
return nodeOrChildIsDecorated(
|
|
@@ -152911,7 +152966,7 @@ ${lanes.join("\n")}
|
|
|
152911
152966
|
return void 0;
|
|
152912
152967
|
}
|
|
152913
152968
|
const decoratorExpressions = [];
|
|
152914
|
-
addRange(decoratorExpressions,
|
|
152969
|
+
addRange(decoratorExpressions, map30(allDecorators.decorators, transformDecorator));
|
|
152915
152970
|
return decoratorExpressions;
|
|
152916
152971
|
}
|
|
152917
152972
|
function transformDecorator(decorator) {
|
|
@@ -153584,7 +153639,7 @@ ${lanes.join("\n")}
|
|
|
153584
153639
|
}
|
|
153585
153640
|
return void 0;
|
|
153586
153641
|
}
|
|
153587
|
-
return factory2.inlineExpressions(
|
|
153642
|
+
return factory2.inlineExpressions(map30(variables, transformInitializedVariable));
|
|
153588
153643
|
}
|
|
153589
153644
|
function hoistVariableDeclarationList(node) {
|
|
153590
153645
|
forEach(node.declarations, hoistVariable);
|
|
@@ -157000,7 +157055,7 @@ ${lanes.join("\n")}
|
|
|
157000
157055
|
return target && target >= 5 ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children);
|
|
157001
157056
|
}
|
|
157002
157057
|
function transformJsxAttributesToProps(attrs, children) {
|
|
157003
|
-
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(
|
|
157058
|
+
const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map30(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));
|
|
157004
157059
|
if (children) {
|
|
157005
157060
|
props.push(children);
|
|
157006
157061
|
}
|
|
@@ -160289,7 +160344,7 @@ ${lanes.join("\n")}
|
|
|
160289
160344
|
/* NoHoisting */
|
|
160290
160345
|
)
|
|
160291
160346
|
);
|
|
160292
|
-
const part = factory2.createVariableDeclarationList(
|
|
160347
|
+
const part = factory2.createVariableDeclarationList(map30(currentState.loopOutParameters, createOutVariable));
|
|
160293
160348
|
return { functionName, containsYield, functionDeclaration, part };
|
|
160294
160349
|
}
|
|
160295
160350
|
function createFunctionForBodyOfIterationStatement(node, currentState, outerState) {
|
|
@@ -160417,7 +160472,7 @@ ${lanes.join("\n")}
|
|
|
160417
160472
|
loopFunctionExpressionName,
|
|
160418
160473
|
/*typeArguments*/
|
|
160419
160474
|
void 0,
|
|
160420
|
-
|
|
160475
|
+
map30(state.loopParameters, (p) => p.name)
|
|
160421
160476
|
);
|
|
160422
160477
|
const callResult = containsYield ? factory2.createYieldExpression(
|
|
160423
160478
|
factory2.createToken(
|
|
@@ -160995,7 +161050,7 @@ ${lanes.join("\n")}
|
|
|
160995
161050
|
return isSpreadElement(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads;
|
|
160996
161051
|
}
|
|
160997
161052
|
function visitSpanOfSpreads(chunk) {
|
|
160998
|
-
return
|
|
161053
|
+
return map30(chunk, visitExpressionOfSpread);
|
|
160999
161054
|
}
|
|
161000
161055
|
function visitExpressionOfSpread(node) {
|
|
161001
161056
|
Debug.assertNode(node, isSpreadElement);
|
|
@@ -161567,7 +161622,7 @@ ${lanes.join("\n")}
|
|
|
161567
161622
|
return setSourceMapRange(
|
|
161568
161623
|
factory2.createExpressionStatement(
|
|
161569
161624
|
factory2.inlineExpressions(
|
|
161570
|
-
|
|
161625
|
+
map30(variables, transformInitializedVariable)
|
|
161571
161626
|
)
|
|
161572
161627
|
),
|
|
161573
161628
|
node
|
|
@@ -162125,7 +162180,7 @@ ${lanes.join("\n")}
|
|
|
162125
162180
|
const variables = getInitializedVariables(initializer3);
|
|
162126
162181
|
node = factory2.updateForStatement(
|
|
162127
162182
|
node,
|
|
162128
|
-
variables.length > 0 ? factory2.inlineExpressions(
|
|
162183
|
+
variables.length > 0 ? factory2.inlineExpressions(map30(variables, transformInitializedVariable)) : void 0,
|
|
162129
162184
|
visitNode3(node.condition, visitor, isExpression),
|
|
162130
162185
|
visitNode3(node.incrementor, visitor, isExpression),
|
|
162131
162186
|
visitIterationBody(node.statement, visitor, context)
|
|
@@ -165451,7 +165506,7 @@ ${lanes.join("\n")}
|
|
|
165451
165506
|
moduleBodyBlock
|
|
165452
165507
|
);
|
|
165453
165508
|
const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions);
|
|
165454
|
-
const dependencies = factory2.createArrayLiteralExpression(
|
|
165509
|
+
const dependencies = factory2.createArrayLiteralExpression(map30(dependencyGroups, (dependencyGroup) => dependencyGroup.name));
|
|
165455
165510
|
const updated = setEmitFlags(
|
|
165456
165511
|
factory2.updateSourceFile(
|
|
165457
165512
|
node,
|
|
@@ -167181,7 +167236,7 @@ ${lanes.join("\n")}
|
|
|
167181
167236
|
return node.kind === 308 ? transformSourceFile(node) : transformBundle(node);
|
|
167182
167237
|
}
|
|
167183
167238
|
function transformBundle(node) {
|
|
167184
|
-
return context.factory.createBundle(
|
|
167239
|
+
return context.factory.createBundle(map30(node.sourceFiles, transformSourceFile));
|
|
167185
167240
|
}
|
|
167186
167241
|
}
|
|
167187
167242
|
function canProduceDiagnostics(node) {
|
|
@@ -167929,7 +167984,7 @@ ${lanes.join("\n")}
|
|
|
167929
167984
|
rawLibReferenceDirectives = [];
|
|
167930
167985
|
let hasNoDefaultLib = false;
|
|
167931
167986
|
const bundle = factory2.createBundle(
|
|
167932
|
-
|
|
167987
|
+
map30(node.sourceFiles, (sourceFile) => {
|
|
167933
167988
|
if (sourceFile.isDeclarationFile) return void 0;
|
|
167934
167989
|
hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib;
|
|
167935
167990
|
currentSourceFile = sourceFile;
|
|
@@ -168040,7 +168095,7 @@ ${lanes.join("\n")}
|
|
|
168040
168095
|
getLibReferences()
|
|
168041
168096
|
);
|
|
168042
168097
|
function collectFileReferences(sourceFile) {
|
|
168043
|
-
rawReferencedFiles = concatenate(rawReferencedFiles,
|
|
168098
|
+
rawReferencedFiles = concatenate(rawReferencedFiles, map30(sourceFile.referencedFiles, (f3) => [sourceFile, f3]));
|
|
168044
168099
|
rawTypeReferenceDirectives = concatenate(rawTypeReferenceDirectives, sourceFile.typeReferenceDirectives);
|
|
168045
168100
|
rawLibReferenceDirectives = concatenate(rawLibReferenceDirectives, sourceFile.libReferenceDirectives);
|
|
168046
168101
|
}
|
|
@@ -168254,7 +168309,7 @@ ${lanes.join("\n")}
|
|
|
168254
168309
|
)) {
|
|
168255
168310
|
return factory2.createNodeArray();
|
|
168256
168311
|
}
|
|
168257
|
-
const newParams =
|
|
168312
|
+
const newParams = map30(params, (p) => ensureParameter(p, modifierMask));
|
|
168258
168313
|
if (!newParams) {
|
|
168259
168314
|
return factory2.createNodeArray();
|
|
168260
168315
|
}
|
|
@@ -169006,7 +169061,7 @@ ${lanes.join("\n")}
|
|
|
169006
169061
|
void 0,
|
|
169007
169062
|
/*isTypeOnly*/
|
|
169008
169063
|
false,
|
|
169009
|
-
factory2.createNamedExports(
|
|
169064
|
+
factory2.createNamedExports(map30(exportMappings, ([gen, exp]) => {
|
|
169010
169065
|
return factory2.createExportSpecifier(
|
|
169011
169066
|
/*isTypeOnly*/
|
|
169012
169067
|
false,
|
|
@@ -169214,11 +169269,11 @@ ${lanes.join("\n")}
|
|
|
169214
169269
|
2
|
|
169215
169270
|
/* Const */
|
|
169216
169271
|
));
|
|
169217
|
-
const heritageClauses = factory2.createNodeArray(
|
|
169272
|
+
const heritageClauses = factory2.createNodeArray(map30(input.heritageClauses, (clause) => {
|
|
169218
169273
|
if (clause.token === 96) {
|
|
169219
169274
|
const oldDiag2 = getSymbolAccessibilityDiagnostic;
|
|
169220
169275
|
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
169221
|
-
const newClause = factory2.updateHeritageClause(clause,
|
|
169276
|
+
const newClause = factory2.updateHeritageClause(clause, map30(clause.types, (t2) => factory2.updateExpressionWithTypeArguments(t2, newId, visitNodes2(t2.typeArguments, visitDeclarationSubtree, isTypeNode))));
|
|
169222
169277
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
169223
169278
|
return newClause;
|
|
169224
169279
|
}
|
|
@@ -169380,7 +169435,7 @@ ${lanes.join("\n")}
|
|
|
169380
169435
|
}
|
|
169381
169436
|
function transformHeritageClauses(nodes) {
|
|
169382
169437
|
return factory2.createNodeArray(filter4(
|
|
169383
|
-
|
|
169438
|
+
map30(nodes, (clause) => factory2.updateHeritageClause(
|
|
169384
169439
|
clause,
|
|
169385
169440
|
visitNodes2(
|
|
169386
169441
|
factory2.createNodeArray(filter4(clause.types, (t2) => {
|
|
@@ -169502,7 +169557,7 @@ ${lanes.join("\n")}
|
|
|
169502
169557
|
const moduleKind = getEmitModuleKind(compilerOptions);
|
|
169503
169558
|
const useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
|
|
169504
169559
|
const transformers = [];
|
|
169505
|
-
addRange(transformers, customTransformers &&
|
|
169560
|
+
addRange(transformers, customTransformers && map30(customTransformers.before, wrapScriptTransformerFactory));
|
|
169506
169561
|
transformers.push(transformTypeScript);
|
|
169507
169562
|
if (compilerOptions.experimentalDecorators) {
|
|
169508
169563
|
transformers.push(transformLegacyDecorators);
|
|
@@ -169540,13 +169595,13 @@ ${lanes.join("\n")}
|
|
|
169540
169595
|
transformers.push(transformGenerators);
|
|
169541
169596
|
}
|
|
169542
169597
|
transformers.push(getModuleTransformer(moduleKind));
|
|
169543
|
-
addRange(transformers, customTransformers &&
|
|
169598
|
+
addRange(transformers, customTransformers && map30(customTransformers.after, wrapScriptTransformerFactory));
|
|
169544
169599
|
return transformers;
|
|
169545
169600
|
}
|
|
169546
169601
|
function getDeclarationTransformers(customTransformers) {
|
|
169547
169602
|
const transformers = [];
|
|
169548
169603
|
transformers.push(transformDeclarations);
|
|
169549
|
-
addRange(transformers, customTransformers &&
|
|
169604
|
+
addRange(transformers, customTransformers && map30(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory));
|
|
169550
169605
|
return transformers;
|
|
169551
169606
|
}
|
|
169552
169607
|
function wrapCustomTransformer(transformer) {
|
|
@@ -175322,7 +175377,7 @@ ${lanes.join("\n")}
|
|
|
175322
175377
|
var _a2;
|
|
175323
175378
|
if (!host.realpath || ensureTrailingDirectorySeparator(toPath3(host.realpath(rootDir))) === rootDirPath) {
|
|
175324
175379
|
const resultFromHost = {
|
|
175325
|
-
files:
|
|
175380
|
+
files: map30(host.readDirectory(
|
|
175326
175381
|
rootDir,
|
|
175327
175382
|
/*extensions*/
|
|
175328
175383
|
void 0,
|
|
@@ -175421,7 +175476,7 @@ ${lanes.join("\n")}
|
|
|
175421
175476
|
function getFileSystemEntriesFromHost(dir, path2) {
|
|
175422
175477
|
if (rootSymLinkResult && path2 === rootDirPath) return rootSymLinkResult;
|
|
175423
175478
|
const result = {
|
|
175424
|
-
files:
|
|
175479
|
+
files: map30(host.readDirectory(
|
|
175425
175480
|
dir,
|
|
175426
175481
|
/*extensions*/
|
|
175427
175482
|
void 0,
|
|
@@ -175836,12 +175891,12 @@ ${lanes.join("\n")}
|
|
|
175836
175891
|
function createCompilerHost(options, setParentNodes) {
|
|
175837
175892
|
return createCompilerHostWorker(options, setParentNodes);
|
|
175838
175893
|
}
|
|
175839
|
-
function createGetSourceFile(
|
|
175894
|
+
function createGetSourceFile(readFile8, setParentNodes) {
|
|
175840
175895
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
175841
175896
|
let text;
|
|
175842
175897
|
try {
|
|
175843
175898
|
mark("beforeIORead");
|
|
175844
|
-
text =
|
|
175899
|
+
text = readFile8(fileName);
|
|
175845
175900
|
mark("afterIORead");
|
|
175846
175901
|
measure("I/O Read", "beforeIORead", "afterIORead");
|
|
175847
175902
|
} catch (e2) {
|
|
@@ -176745,7 +176800,7 @@ ${lanes.join("\n")}
|
|
|
176745
176800
|
getRedirectFromOutput,
|
|
176746
176801
|
forEachResolvedProjectReference: forEachResolvedProjectReference2
|
|
176747
176802
|
});
|
|
176748
|
-
const
|
|
176803
|
+
const readFile8 = host.readFile.bind(host);
|
|
176749
176804
|
(_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
|
|
176750
176805
|
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
|
|
176751
176806
|
(_f = tracing) == null ? void 0 : _f.pop();
|
|
@@ -176971,7 +177026,7 @@ ${lanes.join("\n")}
|
|
|
176971
177026
|
shouldTransformImportCall,
|
|
176972
177027
|
emitBuildInfo,
|
|
176973
177028
|
fileExists,
|
|
176974
|
-
readFile:
|
|
177029
|
+
readFile: readFile8,
|
|
176975
177030
|
directoryExists,
|
|
176976
177031
|
getSymlinkCache,
|
|
176977
177032
|
realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),
|
|
@@ -181735,7 +181790,7 @@ ${lanes.join("\n")}
|
|
|
181735
181790
|
let filePathsSetList;
|
|
181736
181791
|
const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : void 0;
|
|
181737
181792
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
181738
|
-
const changedFilesSet = new Set(
|
|
181793
|
+
const changedFilesSet = new Set(map30(buildInfo.changeFileSet, toFilePath));
|
|
181739
181794
|
if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
|
|
181740
181795
|
buildInfo.fileInfos.forEach((fileInfo, index) => {
|
|
181741
181796
|
const path2 = toFilePath(index + 1);
|
|
@@ -187660,7 +187715,7 @@ ${lanes.join("\n")}
|
|
|
187660
187715
|
return factory.createArrayTypeNode(visitNode3(node.type, visitExistingNodeTreeSymbols, isTypeNode));
|
|
187661
187716
|
}
|
|
187662
187717
|
if (isJSDocTypeLiteral(node)) {
|
|
187663
|
-
return factory.createTypeLiteralNode(
|
|
187718
|
+
return factory.createTypeLiteralNode(map30(node.jsDocPropertyTags, (t2) => {
|
|
187664
187719
|
const name2 = visitNode3(isIdentifier(t2.name) ? t2.name : t2.name.right, visitExistingNodeTreeSymbols, isIdentifier);
|
|
187665
187720
|
const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t2);
|
|
187666
187721
|
return factory.createPropertySignature(
|
|
@@ -187726,7 +187781,7 @@ ${lanes.join("\n")}
|
|
|
187726
187781
|
} else {
|
|
187727
187782
|
return factory.createFunctionTypeNode(
|
|
187728
187783
|
visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration),
|
|
187729
|
-
|
|
187784
|
+
map30(node.parameters, (p, i2) => factory.createParameterDeclaration(
|
|
187730
187785
|
/*modifiers*/
|
|
187731
187786
|
void 0,
|
|
187732
187787
|
getEffectiveDotDotDotForParameter(p),
|
|
@@ -192009,7 +192064,7 @@ ${lanes.join("\n")}
|
|
|
192009
192064
|
return expression;
|
|
192010
192065
|
}
|
|
192011
192066
|
function mapOneOrMany(valueOrArray, f3, resultSelector = identity) {
|
|
192012
|
-
return valueOrArray ? isArray(valueOrArray) ? resultSelector(
|
|
192067
|
+
return valueOrArray ? isArray(valueOrArray) ? resultSelector(map30(valueOrArray, f3)) : f3(valueOrArray, 0) : void 0;
|
|
192013
192068
|
}
|
|
192014
192069
|
function firstOrOnly(valueOrArray) {
|
|
192015
192070
|
return isArray(valueOrArray) ? first2(valueOrArray) : valueOrArray;
|
|
@@ -195943,7 +195998,7 @@ interface Symbol {
|
|
|
195943
195998
|
curCancellationToken = cancellationToken;
|
|
195944
195999
|
curSourceFile = sourceFile;
|
|
195945
196000
|
try {
|
|
195946
|
-
return
|
|
196001
|
+
return map30(primaryNavBarMenuItems(rootNavigationBarNode(sourceFile)), convertToPrimaryNavBarMenuItem);
|
|
195947
196002
|
} finally {
|
|
195948
196003
|
reset();
|
|
195949
196004
|
}
|
|
@@ -196596,7 +196651,7 @@ interface Symbol {
|
|
|
196596
196651
|
kindModifiers: getModifiers2(n.node),
|
|
196597
196652
|
spans: getSpans(n),
|
|
196598
196653
|
nameSpan: n.name && getNodeSpan(n.name),
|
|
196599
|
-
childItems:
|
|
196654
|
+
childItems: map30(n.children, convertToTree)
|
|
196600
196655
|
};
|
|
196601
196656
|
}
|
|
196602
196657
|
function convertToPrimaryNavBarMenuItem(n) {
|
|
@@ -196605,7 +196660,7 @@ interface Symbol {
|
|
|
196605
196660
|
kind: getNodeKind(n.node),
|
|
196606
196661
|
kindModifiers: getModifiers2(n.node),
|
|
196607
196662
|
spans: getSpans(n),
|
|
196608
|
-
childItems:
|
|
196663
|
+
childItems: map30(n.children, convertToSecondaryNavBarMenuItem) || emptyChildItemArray,
|
|
196609
196664
|
indent: n.indent,
|
|
196610
196665
|
bolded: false,
|
|
196611
196666
|
grayed: false
|
|
@@ -198833,12 +198888,12 @@ interface Symbol {
|
|
|
198833
198888
|
"args",
|
|
198834
198889
|
/*questionToken*/
|
|
198835
198890
|
void 0,
|
|
198836
|
-
factory.createUnionTypeNode(
|
|
198891
|
+
factory.createUnionTypeNode(map30(signatureDeclarations, convertSignatureParametersToTuple))
|
|
198837
198892
|
)
|
|
198838
198893
|
]);
|
|
198839
198894
|
}
|
|
198840
198895
|
function convertSignatureParametersToTuple(decl) {
|
|
198841
|
-
const members =
|
|
198896
|
+
const members = map30(decl.parameters, convertParameterToNamedTupleMember);
|
|
198842
198897
|
return setEmitFlags(
|
|
198843
198898
|
factory.createTupleTypeNode(members),
|
|
198844
198899
|
some(members, (m2) => !!length(getSyntheticLeadingComments(m2))) ? 0 : 1
|
|
@@ -199318,9 +199373,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199318
199373
|
}
|
|
199319
199374
|
function doChange5(sourceFile, program2, host, changes, functionDeclaration, groupedReferences) {
|
|
199320
199375
|
const signature = groupedReferences.signature;
|
|
199321
|
-
const newFunctionDeclarationParams =
|
|
199376
|
+
const newFunctionDeclarationParams = map30(createNewParameters(functionDeclaration, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
199322
199377
|
if (signature) {
|
|
199323
|
-
const newSignatureParams =
|
|
199378
|
+
const newSignatureParams = map30(createNewParameters(signature, program2, host), (param) => getSynthesizedDeepClone(param));
|
|
199324
199379
|
replaceParameters(signature, newSignatureParams);
|
|
199325
199380
|
}
|
|
199326
199381
|
replaceParameters(functionDeclaration, newFunctionDeclarationParams);
|
|
@@ -199383,10 +199438,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199383
199438
|
function groupReferences(referenceEntries) {
|
|
199384
199439
|
const classReferences = { accessExpressions: [], typeUsages: [] };
|
|
199385
199440
|
const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true };
|
|
199386
|
-
const functionSymbols =
|
|
199387
|
-
const classSymbols =
|
|
199441
|
+
const functionSymbols = map30(functionNames, getSymbolTargetAtLocation);
|
|
199442
|
+
const classSymbols = map30(classNames, getSymbolTargetAtLocation);
|
|
199388
199443
|
const isConstructor = isConstructorDeclaration(functionDeclaration);
|
|
199389
|
-
const contextualSymbols =
|
|
199444
|
+
const contextualSymbols = map30(functionNames, (name2) => getSymbolForContextualType(name2, checker));
|
|
199390
199445
|
for (const entry of referenceEntries) {
|
|
199391
199446
|
if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) {
|
|
199392
199447
|
groupedReferences2.valid = false;
|
|
@@ -199650,7 +199705,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199650
199705
|
const parameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
199651
199706
|
const hasRestParameter2 = isRestParameter(last(parameters));
|
|
199652
199707
|
const nonRestArguments = hasRestParameter2 ? functionArguments.slice(0, parameters.length - 1) : functionArguments;
|
|
199653
|
-
const properties =
|
|
199708
|
+
const properties = map30(nonRestArguments, (arg, i2) => {
|
|
199654
199709
|
const parameterName = getParameterName(parameters[i2]);
|
|
199655
199710
|
const property = createPropertyOrShorthandAssignment(parameterName, arg);
|
|
199656
199711
|
suppressLeadingAndTrailingTrivia(property.name);
|
|
@@ -199673,7 +199728,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199673
199728
|
function createNewParameters(functionDeclaration, program2, host) {
|
|
199674
199729
|
const checker = program2.getTypeChecker();
|
|
199675
199730
|
const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters);
|
|
199676
|
-
const bindingElements =
|
|
199731
|
+
const bindingElements = map30(refactorableParameters, createBindingElementFromParameterDeclaration);
|
|
199677
199732
|
const objectParameterName = factory.createObjectBindingPattern(bindingElements);
|
|
199678
199733
|
const objectParameterType = createParameterTypeNode(refactorableParameters);
|
|
199679
199734
|
let objectInitializer;
|
|
@@ -199728,7 +199783,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
199728
199783
|
return element;
|
|
199729
199784
|
}
|
|
199730
199785
|
function createParameterTypeNode(parameters) {
|
|
199731
|
-
const members =
|
|
199786
|
+
const members = map30(parameters, createPropertySignatureFromParameterDeclaration);
|
|
199732
199787
|
const typeNode = addEmitFlags(
|
|
199733
199788
|
factory.createTypeLiteralNode(members),
|
|
199734
199789
|
1
|
|
@@ -200003,7 +200058,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
200003
200058
|
i2 = newIndex - 1;
|
|
200004
200059
|
const isLast = i2 === nodes.length - 1;
|
|
200005
200060
|
if (isTemplateExpression(currentNode)) {
|
|
200006
|
-
const spans =
|
|
200061
|
+
const spans = map30(currentNode.templateSpans, (span, index) => {
|
|
200007
200062
|
copyExpressionComments(span);
|
|
200008
200063
|
const isLastSpan = index === currentNode.templateSpans.length - 1;
|
|
200009
200064
|
const text = span.literal.text + (isLastSpan ? subsequentText : "");
|
|
@@ -201630,8 +201685,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
201630
201685
|
}
|
|
201631
201686
|
}
|
|
201632
201687
|
function getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) {
|
|
201633
|
-
const variableAssignments =
|
|
201634
|
-
const writeAssignments =
|
|
201688
|
+
const variableAssignments = map30(exposedVariableDeclarations, (v) => factory.createShorthandPropertyAssignment(v.symbol.name));
|
|
201689
|
+
const writeAssignments = map30(writes, (w) => factory.createShorthandPropertyAssignment(w.symbol.name));
|
|
201635
201690
|
return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments);
|
|
201636
201691
|
}
|
|
201637
201692
|
function isReadonlyArray(v) {
|
|
@@ -203156,7 +203211,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203156
203211
|
}
|
|
203157
203212
|
function displayPartsToString(displayParts) {
|
|
203158
203213
|
if (displayParts) {
|
|
203159
|
-
return
|
|
203214
|
+
return map30(displayParts, (displayPart2) => displayPart2.text).join("");
|
|
203160
203215
|
}
|
|
203161
203216
|
return "";
|
|
203162
203217
|
}
|
|
@@ -204406,8 +204461,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204406
204461
|
}
|
|
204407
204462
|
} else {
|
|
204408
204463
|
for (const pos2 of positions) {
|
|
204409
|
-
const
|
|
204410
|
-
const offset = text.substr(
|
|
204464
|
+
const from15 = pos2 - closeMultiline.length > 0 ? pos2 - closeMultiline.length : 0;
|
|
204465
|
+
const offset = text.substr(from15, closeMultiline.length) === closeMultiline ? closeMultiline.length : 0;
|
|
204411
204466
|
textChanges2.push({
|
|
204412
204467
|
newText: "",
|
|
204413
204468
|
span: {
|
|
@@ -204519,7 +204574,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204519
204574
|
const multiLineCommentStart = /(?:\/\*+\s*)/.source;
|
|
204520
204575
|
const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
|
|
204521
204576
|
const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
|
|
204522
|
-
const literals = "(?:" +
|
|
204577
|
+
const literals = "(?:" + map30(descriptors, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")";
|
|
204523
204578
|
const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
|
|
204524
204579
|
const messageRemainder = /(?:.*?)/.source;
|
|
204525
204580
|
const messagePortion = "(" + literals + messageRemainder + ")";
|
|
@@ -205458,9 +205513,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205458
205513
|
let declarations;
|
|
205459
205514
|
if (symbol2 && symbol2.declarations) {
|
|
205460
205515
|
const indices = indicesOf(symbol2.declarations);
|
|
205461
|
-
const keys =
|
|
205516
|
+
const keys = map30(symbol2.declarations, (decl) => ({ file: decl.getSourceFile().fileName, pos: decl.pos }));
|
|
205462
205517
|
indices.sort((a, b) => compareStringsCaseSensitive(keys[a].file, keys[b].file) || keys[a].pos - keys[b].pos);
|
|
205463
|
-
const sortedDeclarations =
|
|
205518
|
+
const sortedDeclarations = map30(indices, (i2) => symbol2.declarations[i2]);
|
|
205464
205519
|
let lastDecl;
|
|
205465
205520
|
for (const decl of sortedDeclarations) {
|
|
205466
205521
|
if (isValidCallHierarchyDeclaration(decl)) {
|
|
@@ -205592,11 +205647,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205592
205647
|
function getCallSiteGroupKey(entry) {
|
|
205593
205648
|
return getNodeId(entry.declaration);
|
|
205594
205649
|
}
|
|
205595
|
-
function createCallHierarchyIncomingCall(
|
|
205596
|
-
return { from:
|
|
205650
|
+
function createCallHierarchyIncomingCall(from15, fromSpans) {
|
|
205651
|
+
return { from: from15, fromSpans };
|
|
205597
205652
|
}
|
|
205598
205653
|
function convertCallSiteGroupToIncomingCall(program2, entries) {
|
|
205599
|
-
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
205654
|
+
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration), map30(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
205600
205655
|
}
|
|
205601
205656
|
function getIncomingCalls(program2, declaration, cancellationToken) {
|
|
205602
205657
|
if (isSourceFile(declaration) || isModuleDeclaration(declaration) || isClassStaticBlockDeclaration(declaration)) {
|
|
@@ -205782,7 +205837,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205782
205837
|
return { to, fromSpans };
|
|
205783
205838
|
}
|
|
205784
205839
|
function convertCallSiteGroupToOutgoingCall(program2, entries) {
|
|
205785
|
-
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration),
|
|
205840
|
+
return createCallHierarchyOutgoingCall(createCallHierarchyItem(program2, entries[0].declaration), map30(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
205786
205841
|
}
|
|
205787
205842
|
function getOutgoingCalls(program2, declaration) {
|
|
205788
205843
|
if (declaration.flags & 33554432 || isMethodSignature(declaration)) {
|
|
@@ -205895,7 +205950,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205895
205950
|
function getFixes(context) {
|
|
205896
205951
|
const diagnostics = getDiagnostics(context);
|
|
205897
205952
|
const registrations = errorCodeToFixes.get(String(context.errorCode));
|
|
205898
|
-
return flatMap(registrations, (f3) =>
|
|
205953
|
+
return flatMap(registrations, (f3) => map30(f3.getCodeActions(context), removeFixIdIfFixAllUnavailable(f3, diagnostics)));
|
|
205899
205954
|
}
|
|
205900
205955
|
function getAllFixes(context) {
|
|
205901
205956
|
return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context);
|
|
@@ -206731,7 +206786,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
206731
206786
|
}
|
|
206732
206787
|
}
|
|
206733
206788
|
function transformJSDocTypeLiteral(node) {
|
|
206734
|
-
const typeNode = factory.createTypeLiteralNode(
|
|
206789
|
+
const typeNode = factory.createTypeLiteralNode(map30(node.jsDocPropertyTags, (tag) => factory.createPropertySignature(
|
|
206735
206790
|
/*modifiers*/
|
|
206736
206791
|
void 0,
|
|
206737
206792
|
isIdentifier(tag.name) ? tag.name : tag.name.right,
|
|
@@ -208002,7 +208057,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
208002
208057
|
function convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference) {
|
|
208003
208058
|
const { declarationList } = statement;
|
|
208004
208059
|
let foundImport = false;
|
|
208005
|
-
const converted =
|
|
208060
|
+
const converted = map30(declarationList.declarations, (decl) => {
|
|
208006
208061
|
const { name: name2, initializer: initializer3 } = decl;
|
|
208007
208062
|
if (initializer3) {
|
|
208008
208063
|
if (isExportsOrModuleExportsOrAlias(sourceFile, initializer3)) {
|
|
@@ -208767,11 +208822,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
208767
208822
|
const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0;
|
|
208768
208823
|
return { leftSibling, rightSibling };
|
|
208769
208824
|
}
|
|
208770
|
-
function findEndOfTextBetween(jsDocComment,
|
|
208771
|
-
const comment = jsDocComment.getText().substring(
|
|
208825
|
+
function findEndOfTextBetween(jsDocComment, from15, to) {
|
|
208826
|
+
const comment = jsDocComment.getText().substring(from15 - jsDocComment.getStart(), to - jsDocComment.getStart());
|
|
208772
208827
|
for (let i2 = comment.length; i2 > 0; i2--) {
|
|
208773
208828
|
if (!/[*/\s]/.test(comment.substring(i2 - 1, i2))) {
|
|
208774
|
-
return
|
|
208829
|
+
return from15 + i2;
|
|
208775
208830
|
}
|
|
208776
208831
|
}
|
|
208777
208832
|
return to;
|
|
@@ -211127,7 +211182,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
211127
211182
|
));
|
|
211128
211183
|
}
|
|
211129
211184
|
function createExportSpecifiers(names, allowTypeModifier) {
|
|
211130
|
-
return factory.createNodeArray(
|
|
211185
|
+
return factory.createNodeArray(map30(names, (n) => factory.createExportSpecifier(
|
|
211131
211186
|
allowTypeModifier && n.isTypeOnly,
|
|
211132
211187
|
/*propertyName*/
|
|
211133
211188
|
void 0,
|
|
@@ -212013,7 +212068,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212013
212068
|
const checker = context.program.getTypeChecker();
|
|
212014
212069
|
const jsxAttributesNode = info.parentDeclaration.attributes;
|
|
212015
212070
|
const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute);
|
|
212016
|
-
const attrs =
|
|
212071
|
+
const attrs = map30(info.attributes, (attr) => {
|
|
212017
212072
|
const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration);
|
|
212018
212073
|
const name2 = factory.createIdentifier(attr.name);
|
|
212019
212074
|
const jsxAttribute = factory.createJsxAttribute(name2, factory.createJsxExpression(
|
|
@@ -212034,7 +212089,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212034
212089
|
const quotePreference = getQuotePreference(context.sourceFile, context.preferences);
|
|
212035
212090
|
const target = getEmitScriptTarget(context.program.getCompilerOptions());
|
|
212036
212091
|
const checker = context.program.getTypeChecker();
|
|
212037
|
-
const props =
|
|
212092
|
+
const props = map30(info.properties, (prop) => {
|
|
212038
212093
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration);
|
|
212039
212094
|
return factory.createPropertyAssignment(createPropertyNameFromSymbol(prop, target, quotePreference, checker), initializer3);
|
|
212040
212095
|
});
|
|
@@ -212116,7 +212171,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212116
212171
|
return factory.createArrayLiteralExpression();
|
|
212117
212172
|
}
|
|
212118
212173
|
if (isObjectLiteralType(type)) {
|
|
212119
|
-
const props =
|
|
212174
|
+
const props = map30(checker.getPropertiesOfType(type), (prop) => {
|
|
212120
212175
|
const initializer3 = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), enclosingDeclaration);
|
|
212121
212176
|
return factory.createPropertyAssignment(prop.name, initializer3);
|
|
212122
212177
|
});
|
|
@@ -212454,7 +212509,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212454
212509
|
}
|
|
212455
212510
|
}
|
|
212456
212511
|
function updateParameters(importAdder, scriptTarget, node, newParameters) {
|
|
212457
|
-
const parameters =
|
|
212512
|
+
const parameters = map30(node.parameters, (p) => factory.createParameterDeclaration(
|
|
212458
212513
|
p.modifiers,
|
|
212459
212514
|
p.dotDotDotToken,
|
|
212460
212515
|
p.name,
|
|
@@ -213032,7 +213087,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
213032
213087
|
jsDocParameterTag.isNameFirst,
|
|
213033
213088
|
jsDocParameterTag.comment
|
|
213034
213089
|
);
|
|
213035
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost,
|
|
213090
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map30(tags, (t2) => t2 === jsDocParameterTag ? newJSDocParameterTag : t2)));
|
|
213036
213091
|
return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name2.getText(sourceFile), parameterName]);
|
|
213037
213092
|
}
|
|
213038
213093
|
function getInfo14(sourceFile, pos) {
|
|
@@ -213148,7 +213203,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
213148
213203
|
const elements = token.parent.elements;
|
|
213149
213204
|
const diagnostic = [
|
|
213150
213205
|
elements.length > 1 ? Diagnostics.Remove_unused_declarations_for_Colon_0 : Diagnostics.Remove_unused_declaration_for_Colon_0,
|
|
213151
|
-
|
|
213206
|
+
map30(elements, (e2) => e2.getText(sourceFile)).join(", ")
|
|
213152
213207
|
];
|
|
213153
213208
|
return [
|
|
213154
213209
|
createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t2) => deleteDestructuringElements(t2, sourceFile, token.parent)), diagnostic)
|
|
@@ -215109,7 +215164,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
215109
215164
|
));
|
|
215110
215165
|
}
|
|
215111
215166
|
} else {
|
|
215112
|
-
const paramTags =
|
|
215167
|
+
const paramTags = map30(inferences, ({ name: name2, typeNode, isOptional }) => factory.createJSDocParameterTag(
|
|
215113
215168
|
/*tagName*/
|
|
215114
215169
|
void 0,
|
|
215115
215170
|
name2,
|
|
@@ -216243,8 +216298,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
216243
216298
|
const isJs = isInJSFile(contextNode);
|
|
216244
216299
|
const { typeArguments, arguments: args, parent: parent2 } = call;
|
|
216245
216300
|
const contextualType = isJs ? void 0 : checker.getContextualType(call);
|
|
216246
|
-
const names =
|
|
216247
|
-
const instanceTypes = isJs ? [] :
|
|
216301
|
+
const names = map30(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0);
|
|
216302
|
+
const instanceTypes = isJs ? [] : map30(args, (arg) => checker.getTypeAtLocation(arg));
|
|
216248
216303
|
const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters(
|
|
216249
216304
|
checker,
|
|
216250
216305
|
importAdder,
|
|
@@ -216552,7 +216607,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
216552
216607
|
}
|
|
216553
216608
|
function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) {
|
|
216554
216609
|
if (length(signatures)) {
|
|
216555
|
-
const type = checker.getUnionType(
|
|
216610
|
+
const type = checker.getUnionType(map30(signatures, checker.getReturnTypeOfSignature));
|
|
216556
216611
|
return checker.typeToTypeNode(type, enclosingDeclaration, 1, 8, getNoopSymbolTrackerWithResolver(context));
|
|
216557
216612
|
}
|
|
216558
216613
|
}
|
|
@@ -218557,7 +218612,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
218557
218612
|
if (elements.length === 0) {
|
|
218558
218613
|
return void 0;
|
|
218559
218614
|
}
|
|
218560
|
-
const newClauses =
|
|
218615
|
+
const newClauses = map30(elements, (element) => factory.createCaseClause(element, []));
|
|
218561
218616
|
const newLineChar = getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options);
|
|
218562
218617
|
const printer = createSnippetPrinter({
|
|
218563
218618
|
removeComments: true,
|
|
@@ -218567,7 +218622,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
218567
218622
|
newLine: getNewLineKind(newLineChar)
|
|
218568
218623
|
});
|
|
218569
218624
|
const printNode = formatContext ? (node) => printer.printAndFormatNode(4, node, sourceFile, formatContext) : (node) => printer.printNode(4, node, sourceFile);
|
|
218570
|
-
const insertText =
|
|
218625
|
+
const insertText = map30(newClauses, (clause, i2) => {
|
|
218571
218626
|
if (preferences.includeCompletionsWithSnippetText) {
|
|
218572
218627
|
return `${printNode(clause)}$${i2 + 1}`;
|
|
218573
218628
|
}
|
|
@@ -223794,7 +223849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
223794
223849
|
}
|
|
223795
223850
|
}
|
|
223796
223851
|
const checker = program2.getTypeChecker();
|
|
223797
|
-
return
|
|
223852
|
+
return map30(referenceEntries, (entry) => toImplementationLocation(entry, checker));
|
|
223798
223853
|
}
|
|
223799
223854
|
function getImplementationReferenceEntries(program2, cancellationToken, sourceFiles, node, position) {
|
|
223800
223855
|
if (node.kind === 308) {
|
|
@@ -223817,7 +223872,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
223817
223872
|
}
|
|
223818
223873
|
}
|
|
223819
223874
|
function findReferenceOrRenameEntries(program2, cancellationToken, sourceFiles, node, position, options, convertEntry) {
|
|
223820
|
-
return
|
|
223875
|
+
return map30(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options)), (entry) => convertEntry(entry, node, program2.getTypeChecker()));
|
|
223821
223876
|
}
|
|
223822
223877
|
function getReferenceEntriesForNode(position, node, program2, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f3) => f3.fileName))) {
|
|
223823
223878
|
return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program2, sourceFiles, cancellationToken, options, sourceFilesSet));
|
|
@@ -225697,7 +225752,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
225697
225752
|
const staticBlocks = filter4(classDecl.members, isClassStaticBlockDeclaration);
|
|
225698
225753
|
const containerName = symbol22 ? typeChecker.symbolToString(symbol22, classDecl) : "";
|
|
225699
225754
|
const sourceFile2 = node.getSourceFile();
|
|
225700
|
-
return
|
|
225755
|
+
return map30(staticBlocks, (staticBlock) => {
|
|
225701
225756
|
let { pos } = moveRangePastModifiers(staticBlock);
|
|
225702
225757
|
pos = skipTrivia(sourceFile2.text, pos);
|
|
225703
225758
|
return createDefinitionInfoFromName(
|
|
@@ -226037,7 +226092,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226037
226092
|
}
|
|
226038
226093
|
const withoutExpandos = filter4(filteredDeclarations, (d) => !isExpandoDeclaration(d));
|
|
226039
226094
|
const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations;
|
|
226040
|
-
return
|
|
226095
|
+
return map30(results, (declaration) => createDefinitionInfo(
|
|
226041
226096
|
declaration,
|
|
226042
226097
|
typeChecker,
|
|
226043
226098
|
symbol2,
|
|
@@ -227264,7 +227319,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
227264
227319
|
}
|
|
227265
227320
|
}
|
|
227266
227321
|
function getJSDocTagNameCompletions() {
|
|
227267
|
-
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries =
|
|
227322
|
+
return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map30(jsDocTagNames, (tagName) => {
|
|
227268
227323
|
return {
|
|
227269
227324
|
name: tagName,
|
|
227270
227325
|
kind: "keyword",
|
|
@@ -227275,7 +227330,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
227275
227330
|
}
|
|
227276
227331
|
var getJSDocTagNameCompletionDetails = getJSDocTagCompletionDetails;
|
|
227277
227332
|
function getJSDocTagCompletions() {
|
|
227278
|
-
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries =
|
|
227333
|
+
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = map30(jsDocTagNames, (tagName) => {
|
|
227279
227334
|
return {
|
|
227280
227335
|
name: `@${tagName}`,
|
|
227281
227336
|
kind: "keyword",
|
|
@@ -228107,7 +228162,7 @@ ${content}
|
|
|
228107
228162
|
return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText);
|
|
228108
228163
|
}
|
|
228109
228164
|
function getNewImportSpecifiers(namedImports) {
|
|
228110
|
-
return flatMap(namedImports, (namedImport) =>
|
|
228165
|
+
return flatMap(namedImports, (namedImport) => map30(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier(
|
|
228111
228166
|
importSpecifier,
|
|
228112
228167
|
importSpecifier.isTypeOnly,
|
|
228113
228168
|
/*propertyName*/
|
|
@@ -229273,7 +229328,7 @@ ${content}
|
|
|
229273
229328
|
/*meaning*/
|
|
229274
229329
|
void 0
|
|
229275
229330
|
) : emptyArray;
|
|
229276
|
-
const items =
|
|
229331
|
+
const items = map30(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile));
|
|
229277
229332
|
let selectedItemIndex = 0;
|
|
229278
229333
|
let itemsSeen = 0;
|
|
229279
229334
|
for (let i2 = 0; i2 < items.length; i2++) {
|
|
@@ -229333,7 +229388,7 @@ ${content}
|
|
|
229333
229388
|
), spacePart()];
|
|
229334
229389
|
function getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) {
|
|
229335
229390
|
const infos = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile);
|
|
229336
|
-
return
|
|
229391
|
+
return map30(infos, ({ isVariadic, parameters, prefix, suffix }) => {
|
|
229337
229392
|
const prefixDisplayParts = [...callTargetDisplayParts, ...prefix];
|
|
229338
229393
|
const suffixDisplayParts = [...suffix, ...returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)];
|
|
229339
229394
|
const documentation = candidateSignature.getDocumentationComment(checker);
|
|
@@ -229371,7 +229426,7 @@ ${content}
|
|
|
229371
229426
|
const parameters = (typeParameters || emptyArray).map((t2) => createSignatureHelpParameterForTypeParameter(t2, checker, enclosingDeclaration, sourceFile, printer));
|
|
229372
229427
|
const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
|
|
229373
229428
|
return checker.getExpandedParameters(candidateSignature).map((paramList) => {
|
|
229374
|
-
const params = factory.createNodeArray([...thisParameter, ...
|
|
229429
|
+
const params = factory.createNodeArray([...thisParameter, ...map30(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]);
|
|
229375
229430
|
const parameterParts = mapToDisplayParts((writer) => {
|
|
229376
229431
|
printer.writeList(2576, params, sourceFile, writer);
|
|
229377
229432
|
});
|
|
@@ -233847,9 +233902,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
233847
233902
|
function toTokenRange(arg) {
|
|
233848
233903
|
return typeof arg === "number" ? tokenRangeFrom([arg]) : isArray(arg) ? tokenRangeFrom(arg) : arg;
|
|
233849
233904
|
}
|
|
233850
|
-
function tokenRangeFromRange(
|
|
233905
|
+
function tokenRangeFromRange(from15, to, except = []) {
|
|
233851
233906
|
const tokens = [];
|
|
233852
|
-
for (let token =
|
|
233907
|
+
for (let token = from15; token <= to; token++) {
|
|
233853
233908
|
if (!contains(except, token)) {
|
|
233854
233909
|
tokens.push(token);
|
|
233855
233910
|
}
|
|
@@ -237888,7 +237943,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
237888
237943
|
makeImport: () => makeImport,
|
|
237889
237944
|
makeStringLiteral: () => makeStringLiteral,
|
|
237890
237945
|
mangleScopedPackageName: () => mangleScopedPackageName,
|
|
237891
|
-
map: () =>
|
|
237946
|
+
map: () => map30,
|
|
237892
237947
|
mapAllOrFail: () => mapAllOrFail,
|
|
237893
237948
|
mapDefined: () => mapDefined,
|
|
237894
237949
|
mapDefinedIterator: () => mapDefinedIterator,
|
|
@@ -240563,7 +240618,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
240563
240618
|
if (!this.languageServiceEnabled) {
|
|
240564
240619
|
return this.getRootScriptInfos();
|
|
240565
240620
|
}
|
|
240566
|
-
return
|
|
240621
|
+
return map30(this.program.getSourceFiles(), (sourceFile) => {
|
|
240567
240622
|
const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
240568
240623
|
Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`);
|
|
240569
240624
|
return scriptInfo;
|
|
@@ -246054,7 +246109,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
246054
246109
|
async enableRequestedPluginsWorker(pendingPlugins) {
|
|
246055
246110
|
Debug.assert(this.currentPluginEnablementPromise === void 0);
|
|
246056
246111
|
let sendProjectsUpdatedInBackgroundEvent = false;
|
|
246057
|
-
await Promise.all(
|
|
246112
|
+
await Promise.all(map30(pendingPlugins, async ([project, promises]) => {
|
|
246058
246113
|
const results = await Promise.all(promises);
|
|
246059
246114
|
if (project.isClosed() || isProjectDeferredClose(project)) {
|
|
246060
246115
|
this.logger.info(`Cancelling plugin enabling for ${project.getProjectName()} as it is ${project.isClosed() ? "closed" : "deferred close"}`);
|
|
@@ -246390,7 +246445,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
246390
246445
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
246391
246446
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
246392
246447
|
source: diag2.source,
|
|
246393
|
-
relatedInformation:
|
|
246448
|
+
relatedInformation: map30(diag2.relatedInformation, formatRelatedInformation)
|
|
246394
246449
|
};
|
|
246395
246450
|
}
|
|
246396
246451
|
function formatRelatedInformation(info) {
|
|
@@ -246431,7 +246486,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
246431
246486
|
reportsUnnecessary: diag2.reportsUnnecessary,
|
|
246432
246487
|
reportsDeprecated: diag2.reportsDeprecated,
|
|
246433
246488
|
source,
|
|
246434
|
-
relatedInformation:
|
|
246489
|
+
relatedInformation: map30(diag2.relatedInformation, formatRelatedInformation)
|
|
246435
246490
|
};
|
|
246436
246491
|
return includeFileName ? { ...common, fileName: diag2.file && diag2.file.fileName } : common;
|
|
246437
246492
|
}
|
|
@@ -246944,7 +246999,7 @@ ${json2}${newLine}`;
|
|
|
246944
246999
|
if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) {
|
|
246945
247000
|
return this.requiredResponse(result);
|
|
246946
247001
|
}
|
|
246947
|
-
const converted =
|
|
247002
|
+
const converted = map30(result, (p) => {
|
|
246948
247003
|
if (!p.projectErrors || p.projectErrors.length === 0) {
|
|
246949
247004
|
return p;
|
|
246950
247005
|
}
|
|
@@ -248016,7 +248071,7 @@ ${json2}${newLine}`;
|
|
|
248016
248071
|
this.event({
|
|
248017
248072
|
triggerFile: event.data.triggerFile,
|
|
248018
248073
|
configFile: event.data.configFileName,
|
|
248019
|
-
diagnostics:
|
|
248074
|
+
diagnostics: map30(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol(
|
|
248020
248075
|
diagnostic,
|
|
248021
248076
|
/*includeFileName*/
|
|
248022
248077
|
true
|
|
@@ -248357,7 +248412,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248357
248412
|
concatenate(projectErrors, optionsErrors),
|
|
248358
248413
|
(diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile
|
|
248359
248414
|
);
|
|
248360
|
-
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) :
|
|
248415
|
+
return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map30(
|
|
248361
248416
|
diagnosticsForConfigFile,
|
|
248362
248417
|
(diagnostic) => formatDiagnosticToProtocol(
|
|
248363
248418
|
diagnostic,
|
|
@@ -248382,7 +248437,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248382
248437
|
// TODO: GH#18217
|
|
248383
248438
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
248384
248439
|
reportsDeprecated: d.reportsDeprecated,
|
|
248385
|
-
relatedInformation:
|
|
248440
|
+
relatedInformation: map30(d.relatedInformation, formatRelatedInformation)
|
|
248386
248441
|
}));
|
|
248387
248442
|
}
|
|
248388
248443
|
getCompilerOptionsDiagnostics(args) {
|
|
@@ -248410,7 +248465,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248410
248465
|
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length),
|
|
248411
248466
|
reportsUnnecessary: d.reportsUnnecessary,
|
|
248412
248467
|
reportsDeprecated: d.reportsDeprecated,
|
|
248413
|
-
relatedInformation:
|
|
248468
|
+
relatedInformation: map30(d.relatedInformation, formatRelatedInformation)
|
|
248414
248469
|
})
|
|
248415
248470
|
);
|
|
248416
248471
|
}
|
|
@@ -249317,7 +249372,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249317
249372
|
false
|
|
249318
249373
|
) })) : result.map((details) => ({
|
|
249319
249374
|
...details,
|
|
249320
|
-
codeActions:
|
|
249375
|
+
codeActions: map30(details.codeActions, (action) => this.mapCodeAction(action)),
|
|
249321
249376
|
documentation: this.mapDisplayParts(details.documentation, project),
|
|
249322
249377
|
tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts)
|
|
249323
249378
|
}));
|
|
@@ -249457,7 +249512,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249457
249512
|
this.projectService.closeClientFile(file2);
|
|
249458
249513
|
}
|
|
249459
249514
|
mapLocationNavigationBarItems(items, scriptInfo) {
|
|
249460
|
-
return
|
|
249515
|
+
return map30(items, (item) => ({
|
|
249461
249516
|
text: item.text,
|
|
249462
249517
|
kind: item.kind,
|
|
249463
249518
|
kindModifiers: item.kindModifiers,
|
|
@@ -249478,7 +249533,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249478
249533
|
kindModifiers: tree.kindModifiers,
|
|
249479
249534
|
spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)),
|
|
249480
249535
|
nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo),
|
|
249481
|
-
childItems:
|
|
249536
|
+
childItems: map30(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo))
|
|
249482
249537
|
};
|
|
249483
249538
|
}
|
|
249484
249539
|
getNavigationTree(args, simplifiedResult) {
|
|
@@ -249870,7 +249925,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
249870
249925
|
const { locations } = args;
|
|
249871
249926
|
const { file: file2, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
249872
249927
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file2));
|
|
249873
|
-
return
|
|
249928
|
+
return map30(locations, (location) => {
|
|
249874
249929
|
const pos = this.getPosition(location, scriptInfo);
|
|
249875
249930
|
const selectionRange = languageService.getSmartSelectionRange(file2, pos);
|
|
249876
249931
|
return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange;
|
|
@@ -251455,7 +251510,7 @@ var require_esbuild_decorators = __commonJS({
|
|
|
251455
251510
|
var typescript_1 = require_typescript();
|
|
251456
251511
|
var util_1 = require("util");
|
|
251457
251512
|
var strip_it_1 = require_strip_it();
|
|
251458
|
-
var { readFile:
|
|
251513
|
+
var { readFile: readFile8 } = fs_1.promises;
|
|
251459
251514
|
var theFinder = new RegExp(/((?<![(\s]\s*['"])@\w[.[\]\w\d]*\s*(?![;])[((?=\s)])/);
|
|
251460
251515
|
var findDecorators = (fileContent) => theFinder.test((0, strip_it_1.strip)(fileContent));
|
|
251461
251516
|
var esbuildDecorators2 = (options = {}) => ({
|
|
@@ -251479,7 +251534,7 @@ var require_esbuild_decorators = __commonJS({
|
|
|
251479
251534
|
if (!forceTsc && (!parsedTsConfig || !parsedTsConfig.options || !parsedTsConfig.options.emitDecoratorMetadata)) {
|
|
251480
251535
|
return;
|
|
251481
251536
|
}
|
|
251482
|
-
const ts = yield
|
|
251537
|
+
const ts = yield readFile8(args.path, "utf8").catch((err) => printDiagnostics({ file: args.path, err }));
|
|
251483
251538
|
const hasDecorator = findDecorators(ts);
|
|
251484
251539
|
if (!ts || !hasDecorator) {
|
|
251485
251540
|
return;
|
|
@@ -253249,7 +253304,7 @@ function build(state, object3) {
|
|
|
253249
253304
|
}
|
|
253250
253305
|
return node2;
|
|
253251
253306
|
}
|
|
253252
|
-
const
|
|
253307
|
+
const map30 = tag.represent(object3);
|
|
253253
253308
|
const style = new Style();
|
|
253254
253309
|
style.tagged = !implicitTag;
|
|
253255
253310
|
const node = {
|
|
@@ -253259,7 +253314,7 @@ function build(state, object3) {
|
|
|
253259
253314
|
items: []
|
|
253260
253315
|
};
|
|
253261
253316
|
if (!state.noRefs) state.refs.set(object3, node);
|
|
253262
|
-
for (const [objectKey, objectValue] of
|
|
253317
|
+
for (const [objectKey, objectValue] of map30) {
|
|
253263
253318
|
const key = build(state, objectKey);
|
|
253264
253319
|
if (key === INVALID) continue;
|
|
253265
253320
|
const value = build(state, objectValue);
|
|
@@ -254080,9 +254135,9 @@ var init_js_yaml = __esm({
|
|
|
254080
254135
|
create: () => ({}),
|
|
254081
254136
|
identify: isPlainObject,
|
|
254082
254137
|
represent: (o) => {
|
|
254083
|
-
const
|
|
254084
|
-
for (const key of Object.keys(o))
|
|
254085
|
-
return
|
|
254138
|
+
const map30 = /* @__PURE__ */ new Map();
|
|
254139
|
+
for (const key of Object.keys(o)) map30.set(key, o[key]);
|
|
254140
|
+
return map30;
|
|
254086
254141
|
},
|
|
254087
254142
|
addPair: (container, key, value) => {
|
|
254088
254143
|
if (key !== null && typeof key === "object") return "object-based map does not support complex keys";
|
|
@@ -254107,9 +254162,9 @@ var init_js_yaml = __esm({
|
|
|
254107
254162
|
create: () => /* @__PURE__ */ new Set(),
|
|
254108
254163
|
identify: (data) => data instanceof Set,
|
|
254109
254164
|
represent: (data) => {
|
|
254110
|
-
const
|
|
254111
|
-
for (const key of data)
|
|
254112
|
-
return
|
|
254165
|
+
const map30 = /* @__PURE__ */ new Map();
|
|
254166
|
+
for (const key of data) map30.set(key, null);
|
|
254167
|
+
return map30;
|
|
254113
254168
|
},
|
|
254114
254169
|
addPair: (container, key, value) => {
|
|
254115
254170
|
if (value !== null) return "cannot resolve a set item";
|
|
@@ -254222,19 +254277,19 @@ var init_js_yaml = __esm({
|
|
|
254222
254277
|
identify: (data) => data instanceof Map || isPlainObject(data),
|
|
254223
254278
|
represent: (data) => {
|
|
254224
254279
|
if (data instanceof Map) return data;
|
|
254225
|
-
const
|
|
254280
|
+
const map30 = /* @__PURE__ */ new Map();
|
|
254226
254281
|
const obj = data;
|
|
254227
|
-
for (const key of Object.keys(obj))
|
|
254228
|
-
return
|
|
254282
|
+
for (const key of Object.keys(obj)) map30.set(key, obj[key]);
|
|
254283
|
+
return map30;
|
|
254229
254284
|
}
|
|
254230
254285
|
});
|
|
254231
254286
|
legacyMapTag = defineMappingTag("tag:yaml.org,2002:map", {
|
|
254232
254287
|
create: () => ({}),
|
|
254233
254288
|
identify: isPlainObject,
|
|
254234
254289
|
represent: (o) => {
|
|
254235
|
-
const
|
|
254236
|
-
for (const key of Object.keys(o))
|
|
254237
|
-
return
|
|
254290
|
+
const map30 = /* @__PURE__ */ new Map();
|
|
254291
|
+
for (const key of Object.keys(o)) map30.set(key, o[key]);
|
|
254292
|
+
return map30;
|
|
254238
254293
|
},
|
|
254239
254294
|
addPair: (container, key, value) => {
|
|
254240
254295
|
const normalizedKey = normalizeKey(key);
|
|
@@ -264607,9 +264662,9 @@ var require_mime_types = __commonJS({
|
|
|
264607
264662
|
for (var i2 = 0; i2 < exts.length; i2++) {
|
|
264608
264663
|
var extension2 = exts[i2];
|
|
264609
264664
|
if (types3[extension2]) {
|
|
264610
|
-
var
|
|
264665
|
+
var from15 = preference.indexOf(db[types3[extension2]].source);
|
|
264611
264666
|
var to = preference.indexOf(mime.source);
|
|
264612
|
-
if (types3[extension2] !== "application/octet-stream" && (
|
|
264667
|
+
if (types3[extension2] !== "application/octet-stream" && (from15 > to || from15 === to && types3[extension2].substr(0, 12) === "application/")) {
|
|
264613
264668
|
continue;
|
|
264614
264669
|
}
|
|
264615
264670
|
}
|
|
@@ -267591,10 +267646,10 @@ var require_async3 = __commonJS({
|
|
|
267591
267646
|
return eachOfImplementation(coll, wrapAsync(iteratee), callback);
|
|
267592
267647
|
}
|
|
267593
267648
|
var eachOf$1 = awaitify(eachOf, 3);
|
|
267594
|
-
function
|
|
267649
|
+
function map30(coll, iteratee, callback) {
|
|
267595
267650
|
return _asyncMap(eachOf$1, coll, iteratee, callback);
|
|
267596
267651
|
}
|
|
267597
|
-
var map$1 = awaitify(
|
|
267652
|
+
var map$1 = awaitify(map30, 3);
|
|
267598
267653
|
var applyEach$1 = applyEach(map$1);
|
|
267599
267654
|
function eachOfSeries(coll, iteratee, callback) {
|
|
267600
267655
|
return eachOfLimit$2(coll, 1, iteratee, callback);
|
|
@@ -269165,15 +269220,15 @@ var require_polyfills = __commonJS({
|
|
|
269165
269220
|
}
|
|
269166
269221
|
if (platform === "win32") {
|
|
269167
269222
|
fs3.rename = /* @__PURE__ */ (function(fs$rename) {
|
|
269168
|
-
return function(
|
|
269223
|
+
return function(from15, to, cb) {
|
|
269169
269224
|
var start3 = Date.now();
|
|
269170
269225
|
var backoff = 0;
|
|
269171
|
-
fs$rename(
|
|
269226
|
+
fs$rename(from15, to, function CB(er) {
|
|
269172
269227
|
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start3 < 6e4) {
|
|
269173
269228
|
setTimeout(function() {
|
|
269174
269229
|
fs3.stat(to, function(stater, st) {
|
|
269175
269230
|
if (stater && stater.code === "ENOENT")
|
|
269176
|
-
fs$rename(
|
|
269231
|
+
fs$rename(from15, to, CB);
|
|
269177
269232
|
else
|
|
269178
269233
|
cb(er);
|
|
269179
269234
|
});
|
|
@@ -269586,8 +269641,8 @@ var require_graceful_fs = __commonJS({
|
|
|
269586
269641
|
fs4.createReadStream = createReadStream3;
|
|
269587
269642
|
fs4.createWriteStream = createWriteStream;
|
|
269588
269643
|
var fs$readFile = fs4.readFile;
|
|
269589
|
-
fs4.readFile =
|
|
269590
|
-
function
|
|
269644
|
+
fs4.readFile = readFile8;
|
|
269645
|
+
function readFile8(path2, options, cb) {
|
|
269591
269646
|
if (typeof options === "function")
|
|
269592
269647
|
cb = options, options = null;
|
|
269593
269648
|
return go$readFile(path2, options, cb);
|
|
@@ -272404,8 +272459,8 @@ var require_lodash3 = __commonJS({
|
|
|
272404
272459
|
return apply(func, this, otherArgs);
|
|
272405
272460
|
};
|
|
272406
272461
|
}
|
|
272407
|
-
function getMapData(
|
|
272408
|
-
var data =
|
|
272462
|
+
function getMapData(map30, key) {
|
|
272463
|
+
var data = map30.__data__;
|
|
272409
272464
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
272410
272465
|
}
|
|
272411
272466
|
function getNative(object3, key) {
|
|
@@ -272809,8 +272864,8 @@ var require_lodash4 = __commonJS({
|
|
|
272809
272864
|
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop3 : function(values) {
|
|
272810
272865
|
return new Set2(values);
|
|
272811
272866
|
};
|
|
272812
|
-
function getMapData(
|
|
272813
|
-
var data =
|
|
272867
|
+
function getMapData(map30, key) {
|
|
272868
|
+
var data = map30.__data__;
|
|
272814
272869
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
272815
272870
|
}
|
|
272816
272871
|
function getNative(object3, key) {
|
|
@@ -276081,7 +276136,7 @@ var require_from4 = __commonJS({
|
|
|
276081
276136
|
return obj;
|
|
276082
276137
|
}
|
|
276083
276138
|
var ERR_INVALID_ARG_TYPE = require_errors3().codes.ERR_INVALID_ARG_TYPE;
|
|
276084
|
-
function
|
|
276139
|
+
function from15(Readable2, iterable, opts) {
|
|
276085
276140
|
var iterator;
|
|
276086
276141
|
if (iterable && typeof iterable.next === "function") {
|
|
276087
276142
|
iterator = iterable;
|
|
@@ -276120,7 +276175,7 @@ var require_from4 = __commonJS({
|
|
|
276120
276175
|
}
|
|
276121
276176
|
return readable;
|
|
276122
276177
|
}
|
|
276123
|
-
module2.exports =
|
|
276178
|
+
module2.exports = from15;
|
|
276124
276179
|
}
|
|
276125
276180
|
});
|
|
276126
276181
|
|
|
@@ -276164,7 +276219,7 @@ var require_stream_readable4 = __commonJS({
|
|
|
276164
276219
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
276165
276220
|
var StringDecoder;
|
|
276166
276221
|
var createReadableStreamAsyncIterator;
|
|
276167
|
-
var
|
|
276222
|
+
var from15;
|
|
276168
276223
|
require_inherits()(Readable2, Stream3);
|
|
276169
276224
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
276170
276225
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -276846,10 +276901,10 @@ var require_stream_readable4 = __commonJS({
|
|
|
276846
276901
|
}
|
|
276847
276902
|
if (typeof Symbol === "function") {
|
|
276848
276903
|
Readable2.from = function(iterable, opts) {
|
|
276849
|
-
if (
|
|
276850
|
-
|
|
276904
|
+
if (from15 === void 0) {
|
|
276905
|
+
from15 = require_from4();
|
|
276851
276906
|
}
|
|
276852
|
-
return
|
|
276907
|
+
return from15(Readable2, iterable, opts);
|
|
276853
276908
|
};
|
|
276854
276909
|
}
|
|
276855
276910
|
function indexOf(xs, x2) {
|
|
@@ -277029,8 +277084,8 @@ var require_pipeline3 = __commonJS({
|
|
|
277029
277084
|
function call(fn) {
|
|
277030
277085
|
fn();
|
|
277031
277086
|
}
|
|
277032
|
-
function pipe2(
|
|
277033
|
-
return
|
|
277087
|
+
function pipe2(from15, to) {
|
|
277088
|
+
return from15.pipe(to);
|
|
277034
277089
|
}
|
|
277035
277090
|
function popCallback(streams) {
|
|
277036
277091
|
if (!streams.length) return noop3;
|
|
@@ -279423,7 +279478,7 @@ var require_from5 = __commonJS({
|
|
|
279423
279478
|
return obj;
|
|
279424
279479
|
}
|
|
279425
279480
|
var ERR_INVALID_ARG_TYPE = require_errors4().codes.ERR_INVALID_ARG_TYPE;
|
|
279426
|
-
function
|
|
279481
|
+
function from15(Readable2, iterable, opts) {
|
|
279427
279482
|
var iterator;
|
|
279428
279483
|
if (iterable && typeof iterable.next === "function") {
|
|
279429
279484
|
iterator = iterable;
|
|
@@ -279462,7 +279517,7 @@ var require_from5 = __commonJS({
|
|
|
279462
279517
|
}
|
|
279463
279518
|
return readable;
|
|
279464
279519
|
}
|
|
279465
|
-
module2.exports =
|
|
279520
|
+
module2.exports = from15;
|
|
279466
279521
|
}
|
|
279467
279522
|
});
|
|
279468
279523
|
|
|
@@ -279506,7 +279561,7 @@ var require_stream_readable5 = __commonJS({
|
|
|
279506
279561
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
279507
279562
|
var StringDecoder;
|
|
279508
279563
|
var createReadableStreamAsyncIterator;
|
|
279509
|
-
var
|
|
279564
|
+
var from15;
|
|
279510
279565
|
require_inherits()(Readable2, Stream3);
|
|
279511
279566
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
279512
279567
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -280188,10 +280243,10 @@ var require_stream_readable5 = __commonJS({
|
|
|
280188
280243
|
}
|
|
280189
280244
|
if (typeof Symbol === "function") {
|
|
280190
280245
|
Readable2.from = function(iterable, opts) {
|
|
280191
|
-
if (
|
|
280192
|
-
|
|
280246
|
+
if (from15 === void 0) {
|
|
280247
|
+
from15 = require_from5();
|
|
280193
280248
|
}
|
|
280194
|
-
return
|
|
280249
|
+
return from15(Readable2, iterable, opts);
|
|
280195
280250
|
};
|
|
280196
280251
|
}
|
|
280197
280252
|
function indexOf(xs, x2) {
|
|
@@ -280371,8 +280426,8 @@ var require_pipeline4 = __commonJS({
|
|
|
280371
280426
|
function call(fn) {
|
|
280372
280427
|
fn();
|
|
280373
280428
|
}
|
|
280374
|
-
function pipe2(
|
|
280375
|
-
return
|
|
280429
|
+
function pipe2(from15, to) {
|
|
280430
|
+
return from15.pipe(to);
|
|
280376
280431
|
}
|
|
280377
280432
|
function popCallback(streams) {
|
|
280378
280433
|
if (!streams.length) return noop3;
|
|
@@ -282195,7 +282250,7 @@ var require_from6 = __commonJS({
|
|
|
282195
282250
|
return obj;
|
|
282196
282251
|
}
|
|
282197
282252
|
var ERR_INVALID_ARG_TYPE = require_errors5().codes.ERR_INVALID_ARG_TYPE;
|
|
282198
|
-
function
|
|
282253
|
+
function from15(Readable2, iterable, opts) {
|
|
282199
282254
|
var iterator;
|
|
282200
282255
|
if (iterable && typeof iterable.next === "function") {
|
|
282201
282256
|
iterator = iterable;
|
|
@@ -282234,7 +282289,7 @@ var require_from6 = __commonJS({
|
|
|
282234
282289
|
}
|
|
282235
282290
|
return readable;
|
|
282236
282291
|
}
|
|
282237
|
-
module2.exports =
|
|
282292
|
+
module2.exports = from15;
|
|
282238
282293
|
}
|
|
282239
282294
|
});
|
|
282240
282295
|
|
|
@@ -282278,7 +282333,7 @@ var require_stream_readable6 = __commonJS({
|
|
|
282278
282333
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
282279
282334
|
var StringDecoder;
|
|
282280
282335
|
var createReadableStreamAsyncIterator;
|
|
282281
|
-
var
|
|
282336
|
+
var from15;
|
|
282282
282337
|
require_inherits()(Readable2, Stream3);
|
|
282283
282338
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
282284
282339
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -282960,10 +283015,10 @@ var require_stream_readable6 = __commonJS({
|
|
|
282960
283015
|
}
|
|
282961
283016
|
if (typeof Symbol === "function") {
|
|
282962
283017
|
Readable2.from = function(iterable, opts) {
|
|
282963
|
-
if (
|
|
282964
|
-
|
|
283018
|
+
if (from15 === void 0) {
|
|
283019
|
+
from15 = require_from6();
|
|
282965
283020
|
}
|
|
282966
|
-
return
|
|
283021
|
+
return from15(Readable2, iterable, opts);
|
|
282967
283022
|
};
|
|
282968
283023
|
}
|
|
282969
283024
|
function indexOf(xs, x2) {
|
|
@@ -283143,8 +283198,8 @@ var require_pipeline5 = __commonJS({
|
|
|
283143
283198
|
function call(fn) {
|
|
283144
283199
|
fn();
|
|
283145
283200
|
}
|
|
283146
|
-
function pipe2(
|
|
283147
|
-
return
|
|
283201
|
+
function pipe2(from15, to) {
|
|
283202
|
+
return from15.pipe(to);
|
|
283148
283203
|
}
|
|
283149
283204
|
function popCallback(streams) {
|
|
283150
283205
|
if (!streams.length) return noop3;
|
|
@@ -285432,7 +285487,7 @@ var require_from7 = __commonJS({
|
|
|
285432
285487
|
return obj;
|
|
285433
285488
|
}
|
|
285434
285489
|
var ERR_INVALID_ARG_TYPE = require_errors6().codes.ERR_INVALID_ARG_TYPE;
|
|
285435
|
-
function
|
|
285490
|
+
function from15(Readable2, iterable, opts) {
|
|
285436
285491
|
var iterator;
|
|
285437
285492
|
if (iterable && typeof iterable.next === "function") {
|
|
285438
285493
|
iterator = iterable;
|
|
@@ -285471,7 +285526,7 @@ var require_from7 = __commonJS({
|
|
|
285471
285526
|
}
|
|
285472
285527
|
return readable;
|
|
285473
285528
|
}
|
|
285474
|
-
module2.exports =
|
|
285529
|
+
module2.exports = from15;
|
|
285475
285530
|
}
|
|
285476
285531
|
});
|
|
285477
285532
|
|
|
@@ -285515,7 +285570,7 @@ var require_stream_readable7 = __commonJS({
|
|
|
285515
285570
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
285516
285571
|
var StringDecoder;
|
|
285517
285572
|
var createReadableStreamAsyncIterator;
|
|
285518
|
-
var
|
|
285573
|
+
var from15;
|
|
285519
285574
|
require_inherits()(Readable2, Stream3);
|
|
285520
285575
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
285521
285576
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -286197,10 +286252,10 @@ var require_stream_readable7 = __commonJS({
|
|
|
286197
286252
|
}
|
|
286198
286253
|
if (typeof Symbol === "function") {
|
|
286199
286254
|
Readable2.from = function(iterable, opts) {
|
|
286200
|
-
if (
|
|
286201
|
-
|
|
286255
|
+
if (from15 === void 0) {
|
|
286256
|
+
from15 = require_from7();
|
|
286202
286257
|
}
|
|
286203
|
-
return
|
|
286258
|
+
return from15(Readable2, iterable, opts);
|
|
286204
286259
|
};
|
|
286205
286260
|
}
|
|
286206
286261
|
function indexOf(xs, x2) {
|
|
@@ -286380,8 +286435,8 @@ var require_pipeline6 = __commonJS({
|
|
|
286380
286435
|
function call(fn) {
|
|
286381
286436
|
fn();
|
|
286382
286437
|
}
|
|
286383
|
-
function pipe2(
|
|
286384
|
-
return
|
|
286438
|
+
function pipe2(from15, to) {
|
|
286439
|
+
return from15.pipe(to);
|
|
286385
286440
|
}
|
|
286386
286441
|
function popCallback(streams) {
|
|
286387
286442
|
if (!streams.length) return noop3;
|
|
@@ -288383,8 +288438,8 @@ var init_parseUtil = __esm({
|
|
|
288383
288438
|
}
|
|
288384
288439
|
let errorMessage = "";
|
|
288385
288440
|
const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
|
|
288386
|
-
for (const
|
|
288387
|
-
errorMessage =
|
|
288441
|
+
for (const map30 of maps) {
|
|
288442
|
+
errorMessage = map30(fullIssue, { data, defaultError: errorMessage }).message;
|
|
288388
288443
|
}
|
|
288389
288444
|
return {
|
|
288390
288445
|
...issueData,
|
|
@@ -294906,19 +294961,19 @@ var init_schemas = __esm({
|
|
|
294906
294961
|
});
|
|
294907
294962
|
const disc = cached(() => {
|
|
294908
294963
|
const opts = def.options;
|
|
294909
|
-
const
|
|
294964
|
+
const map30 = /* @__PURE__ */ new Map();
|
|
294910
294965
|
for (const o of opts) {
|
|
294911
294966
|
const values = o._zod.propValues?.[def.discriminator];
|
|
294912
294967
|
if (!values || values.size === 0)
|
|
294913
294968
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
294914
294969
|
for (const v of values) {
|
|
294915
|
-
if (
|
|
294970
|
+
if (map30.has(v)) {
|
|
294916
294971
|
throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
294917
294972
|
}
|
|
294918
|
-
|
|
294973
|
+
map30.set(v, o);
|
|
294919
294974
|
}
|
|
294920
294975
|
}
|
|
294921
|
-
return
|
|
294976
|
+
return map30;
|
|
294922
294977
|
});
|
|
294923
294978
|
inst._zod.parse = (payload, ctx) => {
|
|
294924
294979
|
const input = payload.value;
|
|
@@ -305539,9 +305594,9 @@ var init_schemas3 = __esm({
|
|
|
305539
305594
|
});
|
|
305540
305595
|
|
|
305541
305596
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
305542
|
-
function setErrorMap(
|
|
305597
|
+
function setErrorMap(map30) {
|
|
305543
305598
|
config({
|
|
305544
|
-
customError:
|
|
305599
|
+
customError: map30
|
|
305545
305600
|
});
|
|
305546
305601
|
}
|
|
305547
305602
|
function getErrorMap2() {
|
|
@@ -309807,17 +309862,17 @@ var require_codegen = __commonJS({
|
|
|
309807
309862
|
}
|
|
309808
309863
|
};
|
|
309809
309864
|
var ForRange = class extends For {
|
|
309810
|
-
constructor(varKind, name2,
|
|
309865
|
+
constructor(varKind, name2, from15, to) {
|
|
309811
309866
|
super();
|
|
309812
309867
|
this.varKind = varKind;
|
|
309813
309868
|
this.name = name2;
|
|
309814
|
-
this.from =
|
|
309869
|
+
this.from = from15;
|
|
309815
309870
|
this.to = to;
|
|
309816
309871
|
}
|
|
309817
309872
|
render(opts) {
|
|
309818
309873
|
const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
|
|
309819
|
-
const { name: name2, from:
|
|
309820
|
-
return `for(${varKind} ${name2}=${
|
|
309874
|
+
const { name: name2, from: from15, to } = this;
|
|
309875
|
+
return `for(${varKind} ${name2}=${from15}; ${name2}<${to}; ${name2}++)` + super.render(opts);
|
|
309821
309876
|
}
|
|
309822
309877
|
get names() {
|
|
309823
309878
|
const names = addExprNames(super.names, this.from);
|
|
@@ -310036,9 +310091,9 @@ var require_codegen = __commonJS({
|
|
|
310036
310091
|
return this._for(new ForLoop(iteration), forBody);
|
|
310037
310092
|
}
|
|
310038
310093
|
// `for` statement for a range of values
|
|
310039
|
-
forRange(nameOrPrefix,
|
|
310094
|
+
forRange(nameOrPrefix, from15, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
|
|
310040
310095
|
const name2 = this._scope.toName(nameOrPrefix);
|
|
310041
|
-
return this._for(new ForRange(varKind, name2,
|
|
310096
|
+
return this._for(new ForRange(varKind, name2, from15, to), () => forBody(name2));
|
|
310042
310097
|
}
|
|
310043
310098
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
310044
310099
|
forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
|
|
@@ -310177,13 +310232,13 @@ var require_codegen = __commonJS({
|
|
|
310177
310232
|
}
|
|
310178
310233
|
};
|
|
310179
310234
|
exports2.CodeGen = CodeGen;
|
|
310180
|
-
function addNames(names,
|
|
310181
|
-
for (const n in
|
|
310182
|
-
names[n] = (names[n] || 0) + (
|
|
310235
|
+
function addNames(names, from15) {
|
|
310236
|
+
for (const n in from15)
|
|
310237
|
+
names[n] = (names[n] || 0) + (from15[n] || 0);
|
|
310183
310238
|
return names;
|
|
310184
310239
|
}
|
|
310185
|
-
function addExprNames(names,
|
|
310186
|
-
return
|
|
310240
|
+
function addExprNames(names, from15) {
|
|
310241
|
+
return from15 instanceof code_1._CodeOrName ? addNames(names, from15.names) : names;
|
|
310187
310242
|
}
|
|
310188
310243
|
function optimizeExpr(expr, names, constants) {
|
|
310189
310244
|
if (expr instanceof code_1.Name)
|
|
@@ -310210,9 +310265,9 @@ var require_codegen = __commonJS({
|
|
|
310210
310265
|
return e2 instanceof code_1._Code && e2._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
|
|
310211
310266
|
}
|
|
310212
310267
|
}
|
|
310213
|
-
function subtractNames(names,
|
|
310214
|
-
for (const n in
|
|
310215
|
-
names[n] = (names[n] || 0) - (
|
|
310268
|
+
function subtractNames(names, from15) {
|
|
310269
|
+
for (const n in from15)
|
|
310270
|
+
names[n] = (names[n] || 0) - (from15[n] || 0);
|
|
310216
310271
|
}
|
|
310217
310272
|
function not(x2) {
|
|
310218
310273
|
return typeof x2 == "boolean" || typeof x2 == "number" || x2 === null ? !x2 : (0, code_1._)`!${par(x2)}`;
|
|
@@ -310330,31 +310385,31 @@ var require_util5 = __commonJS({
|
|
|
310330
310385
|
}
|
|
310331
310386
|
exports2.eachItem = eachItem;
|
|
310332
310387
|
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues3, resultToName }) {
|
|
310333
|
-
return (gen,
|
|
310334
|
-
const res = to === void 0 ?
|
|
310388
|
+
return (gen, from15, to, toName) => {
|
|
310389
|
+
const res = to === void 0 ? from15 : to instanceof codegen_1.Name ? (from15 instanceof codegen_1.Name ? mergeNames(gen, from15, to) : mergeToName(gen, from15, to), to) : from15 instanceof codegen_1.Name ? (mergeToName(gen, to, from15), from15) : mergeValues3(from15, to);
|
|
310335
310390
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
310336
310391
|
};
|
|
310337
310392
|
}
|
|
310338
310393
|
exports2.mergeEvaluated = {
|
|
310339
310394
|
props: makeMergeEvaluated({
|
|
310340
|
-
mergeNames: (gen,
|
|
310341
|
-
gen.if((0, codegen_1._)`${
|
|
310395
|
+
mergeNames: (gen, from15, to) => gen.if((0, codegen_1._)`${to} !== true && ${from15} !== undefined`, () => {
|
|
310396
|
+
gen.if((0, codegen_1._)`${from15} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from15})`));
|
|
310342
310397
|
}),
|
|
310343
|
-
mergeToName: (gen,
|
|
310344
|
-
if (
|
|
310398
|
+
mergeToName: (gen, from15, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
|
|
310399
|
+
if (from15 === true) {
|
|
310345
310400
|
gen.assign(to, true);
|
|
310346
310401
|
} else {
|
|
310347
310402
|
gen.assign(to, (0, codegen_1._)`${to} || {}`);
|
|
310348
|
-
setEvaluated(gen, to,
|
|
310403
|
+
setEvaluated(gen, to, from15);
|
|
310349
310404
|
}
|
|
310350
310405
|
}),
|
|
310351
|
-
mergeValues: (
|
|
310406
|
+
mergeValues: (from15, to) => from15 === true ? true : { ...from15, ...to },
|
|
310352
310407
|
resultToName: evaluatedPropsToName
|
|
310353
310408
|
}),
|
|
310354
310409
|
items: makeMergeEvaluated({
|
|
310355
|
-
mergeNames: (gen,
|
|
310356
|
-
mergeToName: (gen,
|
|
310357
|
-
mergeValues: (
|
|
310410
|
+
mergeNames: (gen, from15, to) => gen.if((0, codegen_1._)`${to} !== true && ${from15} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from15} === true ? true : ${to} > ${from15} ? ${to} : ${from15}`)),
|
|
310411
|
+
mergeToName: (gen, from15, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from15 === true ? true : (0, codegen_1._)`${to} > ${from15} ? ${to} : ${from15}`)),
|
|
310412
|
+
mergeValues: (from15, to) => from15 === true ? true : Math.max(from15, to),
|
|
310358
310413
|
resultToName: (gen, items) => gen.var("items", items)
|
|
310359
310414
|
})
|
|
310360
310415
|
};
|
|
@@ -321064,6 +321119,61 @@ var init_run = __esm({
|
|
|
321064
321119
|
}
|
|
321065
321120
|
});
|
|
321066
321121
|
|
|
321122
|
+
// src/commands/workflow/triggers.ts
|
|
321123
|
+
var buildTriggerInput, findTrigger, triggerRow, runSource;
|
|
321124
|
+
var init_triggers = __esm({
|
|
321125
|
+
"src/commands/workflow/triggers.ts"() {
|
|
321126
|
+
init_definition();
|
|
321127
|
+
buildTriggerInput = (cmd) => {
|
|
321128
|
+
if (!!cmd.http === !!cmd.cron) {
|
|
321129
|
+
throw new Error('Pass either --http or --cron "<schedule>"');
|
|
321130
|
+
}
|
|
321131
|
+
if (cmd.http) {
|
|
321132
|
+
if (cmd.input || cmd.inputText) {
|
|
321133
|
+
throw new Error(
|
|
321134
|
+
"An HTTP trigger takes its input from the request body; --input is for --cron"
|
|
321135
|
+
);
|
|
321136
|
+
}
|
|
321137
|
+
const methods = (cmd.method ?? "").split(",").map((m2) => m2.trim().toUpperCase()).filter(Boolean);
|
|
321138
|
+
return {
|
|
321139
|
+
kind: "http",
|
|
321140
|
+
...cmd.path ? { path: cmd.path.replace(/^\/+/, "") } : {},
|
|
321141
|
+
...methods.length ? { methods } : {}
|
|
321142
|
+
};
|
|
321143
|
+
}
|
|
321144
|
+
return {
|
|
321145
|
+
kind: "cron",
|
|
321146
|
+
cron: cmd.cron.trim(),
|
|
321147
|
+
input: parseRunInput(cmd.inputText ?? cmd.input)
|
|
321148
|
+
};
|
|
321149
|
+
};
|
|
321150
|
+
findTrigger = (triggers, key) => {
|
|
321151
|
+
if (!key) {
|
|
321152
|
+
throw new Error(
|
|
321153
|
+
"--trigger is required (an id or path from workflow:trigger:list)"
|
|
321154
|
+
);
|
|
321155
|
+
}
|
|
321156
|
+
const k = key.replace(/^\/+/, "");
|
|
321157
|
+
const hit = (triggers ?? []).find(
|
|
321158
|
+
(t2) => t2.id === key || t2.resourceName === key || t2.path === k || t2.cron === key
|
|
321159
|
+
);
|
|
321160
|
+
if (!hit) {
|
|
321161
|
+
throw new Error(
|
|
321162
|
+
`No trigger "${key}" on this workflow (see workflow:trigger:list)`
|
|
321163
|
+
);
|
|
321164
|
+
}
|
|
321165
|
+
return hit;
|
|
321166
|
+
};
|
|
321167
|
+
triggerRow = (t2) => ({
|
|
321168
|
+
id: t2.id,
|
|
321169
|
+
kind: t2.kind,
|
|
321170
|
+
when: t2.kind === "http" ? `${(t2.methods ?? ["POST"]).filter(Boolean).join(",")} ${t2.url ?? `/workflows/${t2.path}`}` : t2.cron ?? "",
|
|
321171
|
+
input: t2.kind === "cron" ? JSON.stringify(t2.input ?? {}) : "request body"
|
|
321172
|
+
});
|
|
321173
|
+
runSource = (run2) => run2.triggerKind === "httptrigger" ? "http" : run2.triggerKind === "timetrigger" ? "schedule" : "manual";
|
|
321174
|
+
}
|
|
321175
|
+
});
|
|
321176
|
+
|
|
321067
321177
|
// src/commands/workflow/runs.ts
|
|
321068
321178
|
var runs_exports = {};
|
|
321069
321179
|
__export(runs_exports, {
|
|
@@ -321076,6 +321186,7 @@ var init_runs = __esm({
|
|
|
321076
321186
|
init_gql_client();
|
|
321077
321187
|
init_log();
|
|
321078
321188
|
init_helpers4();
|
|
321189
|
+
init_triggers();
|
|
321079
321190
|
runs_default = (cmd) => withProject(
|
|
321080
321191
|
cmd.project,
|
|
321081
321192
|
(projectId) => resolveWorkflow(projectId, cmd.name).pipe(
|
|
@@ -321093,7 +321204,8 @@ var init_runs = __esm({
|
|
|
321093
321204
|
phase: r2.phase,
|
|
321094
321205
|
started: r2.startedAt ?? "",
|
|
321095
321206
|
finished: r2.finishedAt ?? "",
|
|
321096
|
-
error: r2.errorType ?? ""
|
|
321207
|
+
error: r2.errorType ?? "",
|
|
321208
|
+
by: runSource(r2)
|
|
321097
321209
|
}))
|
|
321098
321210
|
) : Logger.info("No runs yet. Start one with workflow:run.")
|
|
321099
321211
|
)
|
|
@@ -321159,6 +321271,111 @@ var init_cancel = __esm({
|
|
|
321159
321271
|
}
|
|
321160
321272
|
});
|
|
321161
321273
|
|
|
321274
|
+
// src/commands/workflow/trigger-add.ts
|
|
321275
|
+
var trigger_add_exports = {};
|
|
321276
|
+
__export(trigger_add_exports, {
|
|
321277
|
+
default: () => trigger_add_default
|
|
321278
|
+
});
|
|
321279
|
+
var import_promises6, import_rxjs57, import_operators54, trigger_add_default;
|
|
321280
|
+
var init_trigger_add = __esm({
|
|
321281
|
+
"src/commands/workflow/trigger-add.ts"() {
|
|
321282
|
+
import_promises6 = require("fs/promises");
|
|
321283
|
+
import_rxjs57 = __toESM(require_cjs());
|
|
321284
|
+
import_operators54 = __toESM(require_operators());
|
|
321285
|
+
init_gql_client();
|
|
321286
|
+
init_log();
|
|
321287
|
+
init_helpers4();
|
|
321288
|
+
init_triggers();
|
|
321289
|
+
trigger_add_default = (cmd) => withProject(
|
|
321290
|
+
cmd.project,
|
|
321291
|
+
(projectId) => (cmd.inputFile ? (0, import_rxjs57.from)((0, import_promises6.readFile)(cmd.inputFile, "utf8")) : (0, import_rxjs57.of)(void 0)).pipe(
|
|
321292
|
+
(0, import_operators54.map)((inputText) => buildTriggerInput({ ...cmd, inputText })),
|
|
321293
|
+
(0, import_operators54.switchMap)(
|
|
321294
|
+
(trigger) => resolveWorkflow(projectId, cmd.name).pipe(
|
|
321295
|
+
(0, import_operators54.switchMap)(
|
|
321296
|
+
(w) => GraphqlClienAPI.addWorkflowTrigger(projectId, w.id, trigger).pipe(
|
|
321297
|
+
(0, import_operators54.map)((updated) => ({ before: w.triggers ?? [], updated }))
|
|
321298
|
+
)
|
|
321299
|
+
)
|
|
321300
|
+
)
|
|
321301
|
+
),
|
|
321302
|
+
(0, import_operators54.tap)(({ before, updated }) => {
|
|
321303
|
+
const added = (updated.triggers ?? []).find(
|
|
321304
|
+
(t2) => !before.some((b) => b.id === t2.id)
|
|
321305
|
+
);
|
|
321306
|
+
Logger.info(`Trigger added to ${updated.name}`);
|
|
321307
|
+
if (added) {
|
|
321308
|
+
Logger.table([triggerRow(added)]);
|
|
321309
|
+
if (added.kind === "http" && added.url) {
|
|
321310
|
+
Logger.log(
|
|
321311
|
+
`Start a run: curl -X ${(added.methods ?? ["POST"])[0]} '${added.url}' -H 'Content-Type: application/json' -d '{}'`
|
|
321312
|
+
);
|
|
321313
|
+
}
|
|
321314
|
+
}
|
|
321315
|
+
})
|
|
321316
|
+
)
|
|
321317
|
+
);
|
|
321318
|
+
}
|
|
321319
|
+
});
|
|
321320
|
+
|
|
321321
|
+
// src/commands/workflow/trigger-list.ts
|
|
321322
|
+
var trigger_list_exports = {};
|
|
321323
|
+
__export(trigger_list_exports, {
|
|
321324
|
+
default: () => trigger_list_default
|
|
321325
|
+
});
|
|
321326
|
+
var import_operators55, trigger_list_default;
|
|
321327
|
+
var init_trigger_list = __esm({
|
|
321328
|
+
"src/commands/workflow/trigger-list.ts"() {
|
|
321329
|
+
import_operators55 = __toESM(require_operators());
|
|
321330
|
+
init_log();
|
|
321331
|
+
init_helpers4();
|
|
321332
|
+
init_triggers();
|
|
321333
|
+
trigger_list_default = (cmd) => withProject(
|
|
321334
|
+
cmd.project,
|
|
321335
|
+
(projectId) => resolveWorkflow(projectId, cmd.name).pipe(
|
|
321336
|
+
(0, import_operators55.tap)(
|
|
321337
|
+
(w) => w.triggers?.length ? Logger.table(w.triggers.map(triggerRow)) : Logger.info(
|
|
321338
|
+
'No triggers. Add one with workflow:trigger:add --http or --cron "@daily".'
|
|
321339
|
+
)
|
|
321340
|
+
)
|
|
321341
|
+
)
|
|
321342
|
+
);
|
|
321343
|
+
}
|
|
321344
|
+
});
|
|
321345
|
+
|
|
321346
|
+
// src/commands/workflow/trigger-remove.ts
|
|
321347
|
+
var trigger_remove_exports = {};
|
|
321348
|
+
__export(trigger_remove_exports, {
|
|
321349
|
+
default: () => trigger_remove_default
|
|
321350
|
+
});
|
|
321351
|
+
var import_operators56, trigger_remove_default;
|
|
321352
|
+
var init_trigger_remove = __esm({
|
|
321353
|
+
"src/commands/workflow/trigger-remove.ts"() {
|
|
321354
|
+
import_operators56 = __toESM(require_operators());
|
|
321355
|
+
init_gql_client();
|
|
321356
|
+
init_log();
|
|
321357
|
+
init_helpers4();
|
|
321358
|
+
init_triggers();
|
|
321359
|
+
trigger_remove_default = (cmd) => withProject(
|
|
321360
|
+
cmd.project,
|
|
321361
|
+
(projectId) => resolveWorkflow(projectId, cmd.name).pipe(
|
|
321362
|
+
(0, import_operators56.switchMap)(
|
|
321363
|
+
(w) => GraphqlClienAPI.removeWorkflowTrigger(
|
|
321364
|
+
projectId,
|
|
321365
|
+
w.id,
|
|
321366
|
+
findTrigger(w.triggers, cmd.trigger).id
|
|
321367
|
+
)
|
|
321368
|
+
),
|
|
321369
|
+
(0, import_operators56.tap)(
|
|
321370
|
+
(w) => Logger.info(
|
|
321371
|
+
`Trigger removed from ${w.name} (${w.triggers?.length ?? 0} left)`
|
|
321372
|
+
)
|
|
321373
|
+
)
|
|
321374
|
+
)
|
|
321375
|
+
);
|
|
321376
|
+
}
|
|
321377
|
+
});
|
|
321378
|
+
|
|
321162
321379
|
// src/commands/workspace/approvals.ts
|
|
321163
321380
|
var import_readline, APPROVAL_TIMEOUT_MS, TerminalPrompt, ApprovalGate;
|
|
321164
321381
|
var init_approvals = __esm({
|
|
@@ -321287,23 +321504,23 @@ var init_approvals = __esm({
|
|
|
321287
321504
|
});
|
|
321288
321505
|
|
|
321289
321506
|
// src/commands/workspace/config.ts
|
|
321290
|
-
var
|
|
321507
|
+
var import_promises7, readSavedWorkspaces, writeAll, readSavedWorkspace, saveWorkspace, forgetWorkspace;
|
|
321291
321508
|
var init_config2 = __esm({
|
|
321292
321509
|
"src/commands/workspace/config.ts"() {
|
|
321293
|
-
|
|
321510
|
+
import_promises7 = require("fs/promises");
|
|
321294
321511
|
init_types();
|
|
321295
321512
|
readSavedWorkspaces = async () => {
|
|
321296
321513
|
try {
|
|
321297
|
-
const saved = JSON.parse(await (0,
|
|
321514
|
+
const saved = JSON.parse(await (0, import_promises7.readFile)(workspacesDirectory, "utf-8"));
|
|
321298
321515
|
return saved && typeof saved === "object" ? saved : {};
|
|
321299
321516
|
} catch {
|
|
321300
321517
|
return {};
|
|
321301
321518
|
}
|
|
321302
321519
|
};
|
|
321303
321520
|
writeAll = async (all) => {
|
|
321304
|
-
await (0,
|
|
321305
|
-
await (0,
|
|
321306
|
-
await (0,
|
|
321521
|
+
await (0, import_promises7.mkdir)(mainDirectory, { recursive: true });
|
|
321522
|
+
await (0, import_promises7.writeFile)(workspacesDirectory, JSON.stringify(all, null, 2), "utf-8");
|
|
321523
|
+
await (0, import_promises7.chmod)(workspacesDirectory, 384);
|
|
321307
321524
|
};
|
|
321308
321525
|
readSavedWorkspace = async (root) => {
|
|
321309
321526
|
const saved = (await readSavedWorkspaces())[root];
|
|
@@ -322446,12 +322663,12 @@ __export(start_exports4, {
|
|
|
322446
322663
|
WORKSPACE_VERSION: () => WORKSPACE_VERSION,
|
|
322447
322664
|
default: () => start_default2
|
|
322448
322665
|
});
|
|
322449
|
-
var
|
|
322666
|
+
var import_promises8, import_path3, import_rxjs58, WORKSPACE_VERSION, csv, resolveWorkspace, start_default2;
|
|
322450
322667
|
var init_start4 = __esm({
|
|
322451
322668
|
"src/commands/workspace/start.ts"() {
|
|
322452
|
-
|
|
322669
|
+
import_promises8 = require("fs/promises");
|
|
322453
322670
|
import_path3 = require("path");
|
|
322454
|
-
|
|
322671
|
+
import_rxjs58 = __toESM(require_cjs());
|
|
322455
322672
|
init_helpers();
|
|
322456
322673
|
init_gql_client();
|
|
322457
322674
|
init_log();
|
|
@@ -322481,7 +322698,7 @@ var init_start4 = __esm({
|
|
|
322481
322698
|
if (saved && (!cmd.project || cmd.project === saved.projectId)) {
|
|
322482
322699
|
return saved;
|
|
322483
322700
|
}
|
|
322484
|
-
const projectId = await (0,
|
|
322701
|
+
const projectId = await (0, import_rxjs58.lastValueFrom)(parseProjectId(cmd.project)).catch(
|
|
322485
322702
|
() => {
|
|
322486
322703
|
throw new Error(
|
|
322487
322704
|
"No project selected. Pass --project <projectId> or run `gcli project:use <projectId>` first."
|
|
@@ -322490,7 +322707,7 @@ var init_start4 = __esm({
|
|
|
322490
322707
|
);
|
|
322491
322708
|
const name2 = cmd.name || (0, import_path3.basename)(root);
|
|
322492
322709
|
Logger.info(`Registering ${root} as local workspace "${name2}"...`);
|
|
322493
|
-
const { workspace, token } = await (0,
|
|
322710
|
+
const { workspace, token } = await (0, import_rxjs58.lastValueFrom)(
|
|
322494
322711
|
GraphqlClienAPI.createLocalWorkspace(projectId, name2)
|
|
322495
322712
|
).catch((e2) => {
|
|
322496
322713
|
throw new Error(
|
|
@@ -322508,7 +322725,7 @@ var init_start4 = __esm({
|
|
|
322508
322725
|
return created;
|
|
322509
322726
|
};
|
|
322510
322727
|
start_default2 = async (cmd) => {
|
|
322511
|
-
const root = await (0,
|
|
322728
|
+
const root = await (0, import_promises8.realpath)(process.cwd());
|
|
322512
322729
|
const workspace = await resolveWorkspace(root, cmd);
|
|
322513
322730
|
const wsUrl = cmd.wsUrl || workspace.wsUrl || deriveSubscriptionsUrl(await readLoginApiUrl());
|
|
322514
322731
|
const policy = new CommandPolicy(
|
|
@@ -322581,16 +322798,16 @@ var list_exports9 = {};
|
|
|
322581
322798
|
__export(list_exports9, {
|
|
322582
322799
|
default: () => list_default9
|
|
322583
322800
|
});
|
|
322584
|
-
var
|
|
322801
|
+
var import_rxjs59, list_default9;
|
|
322585
322802
|
var init_list9 = __esm({
|
|
322586
322803
|
"src/commands/workspace/list.ts"() {
|
|
322587
|
-
|
|
322804
|
+
import_rxjs59 = __toESM(require_cjs());
|
|
322588
322805
|
init_gql_client();
|
|
322589
322806
|
init_log();
|
|
322590
322807
|
init_config2();
|
|
322591
322808
|
list_default9 = async (cmd) => {
|
|
322592
322809
|
const [workspaces, saved] = await Promise.all([
|
|
322593
|
-
(0,
|
|
322810
|
+
(0, import_rxjs59.lastValueFrom)(GraphqlClienAPI.listLocalWorkspaces(cmd.project)),
|
|
322594
322811
|
readSavedWorkspaces()
|
|
322595
322812
|
]);
|
|
322596
322813
|
const onThisMachine = new Set(Object.values(saved).map((w) => w.id));
|
|
@@ -322624,23 +322841,23 @@ var delete_exports6 = {};
|
|
|
322624
322841
|
__export(delete_exports6, {
|
|
322625
322842
|
default: () => delete_default6
|
|
322626
322843
|
});
|
|
322627
|
-
var
|
|
322844
|
+
var import_promises9, import_rxjs60, delete_default6;
|
|
322628
322845
|
var init_delete6 = __esm({
|
|
322629
322846
|
"src/commands/workspace/delete.ts"() {
|
|
322630
|
-
|
|
322631
|
-
|
|
322847
|
+
import_promises9 = require("fs/promises");
|
|
322848
|
+
import_rxjs60 = __toESM(require_cjs());
|
|
322632
322849
|
init_gql_client();
|
|
322633
322850
|
init_log();
|
|
322634
322851
|
init_config2();
|
|
322635
322852
|
delete_default6 = async (cmd) => {
|
|
322636
|
-
const root = await (0,
|
|
322853
|
+
const root = await (0, import_promises9.realpath)(process.cwd());
|
|
322637
322854
|
const workspaceId = cmd.id || (await readSavedWorkspace(root))?.id;
|
|
322638
322855
|
if (!workspaceId) {
|
|
322639
322856
|
throw new Error(
|
|
322640
322857
|
"No workspace registered for this directory - pass --id (see `gcli workspace:list`)."
|
|
322641
322858
|
);
|
|
322642
322859
|
}
|
|
322643
|
-
await (0,
|
|
322860
|
+
await (0, import_rxjs60.lastValueFrom)(GraphqlClienAPI.deleteLocalWorkspace(workspaceId));
|
|
322644
322861
|
await forgetWorkspace({ id: workspaceId });
|
|
322645
322862
|
Logger.log(
|
|
322646
322863
|
`Local workspace ${workspaceId} deleted; its token no longer works.`
|
|
@@ -323139,6 +323356,29 @@ function registerWorkflowCommands(program2) {
|
|
|
323139
323356
|
"Show a run: its step events, error and output (--follow until it ends)"
|
|
323140
323357
|
).option("-p, --project <project>").option("-n, --name <name>", "Workflow name").option("-r, --run <run>", "Run name (see workflow:runs)").option("-f, --follow", "Keep printing events until the run ends").action(lazy(() => Promise.resolve().then(() => (init_status2(), status_exports2)).then((m2) => m2.default)));
|
|
323141
323358
|
program2.command("workflow:cancel").description("Cancel a running run").option("-p, --project <project>").option("-n, --name <name>", "Workflow name").option("-r, --run <run>", "Run name (see workflow:runs)").action(lazy(() => Promise.resolve().then(() => (init_cancel(), cancel_exports)).then((m2) => m2.default)));
|
|
323359
|
+
program2.command("workflow:trigger:add").description(
|
|
323360
|
+
"Start runs from an HTTP URL (--http; the JSON body is the input) or a schedule (--cron). Needs Fission 1.26+ on the cluster"
|
|
323361
|
+
).option("-p, --project <project>").option("-n, --name <name>", "Workflow name").option("--http", "An HTTP trigger: <router>/<project>/workflows/<path>").option(
|
|
323362
|
+
"--path <path>",
|
|
323363
|
+
"HTTP path under /workflows/ (default: the workflow name)"
|
|
323364
|
+
).option(
|
|
323365
|
+
"--method <methods>",
|
|
323366
|
+
"HTTP methods, comma separated (default POST)"
|
|
323367
|
+
).option(
|
|
323368
|
+
"--cron <schedule>",
|
|
323369
|
+
'A schedule: "@every 1h", "0 9 * * 1-5", "@daily" (UTC)'
|
|
323370
|
+
).option(
|
|
323371
|
+
"-i, --input <json>",
|
|
323372
|
+
"Schedule: the input of every run (default {})"
|
|
323373
|
+
).option(
|
|
323374
|
+
"--input-file <file>",
|
|
323375
|
+
"Schedule: read the run input from a JSON file"
|
|
323376
|
+
).action(lazy(() => Promise.resolve().then(() => (init_trigger_add(), trigger_add_exports)).then((m2) => m2.default)));
|
|
323377
|
+
program2.command("workflow:trigger:list").description("List a workflow HTTP and schedule triggers").option("-p, --project <project>").option("-n, --name <name>", "Workflow name").action(lazy(() => Promise.resolve().then(() => (init_trigger_list(), trigger_list_exports)).then((m2) => m2.default)));
|
|
323378
|
+
program2.command("workflow:trigger:remove").description("Remove a workflow trigger").option("-p, --project <project>").option("-n, --name <name>", "Workflow name").option(
|
|
323379
|
+
"-t, --trigger <trigger>",
|
|
323380
|
+
"Trigger id, path or schedule (see workflow:trigger:list)"
|
|
323381
|
+
).action(lazy(() => Promise.resolve().then(() => (init_trigger_remove(), trigger_remove_exports)).then((m2) => m2.default)));
|
|
323142
323382
|
}
|
|
323143
323383
|
|
|
323144
323384
|
// src/commands/workspace/index.ts
|