@gapi/gcli 1.8.268 → 1.8.270
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/docs/changelog.d/2026-11-18-local-workspaces-list-returns-mtimems-the-browser-s-file-cache-key.md +12 -0
- package/docs/changelog.d/2026-11-18-local-workspaces-terminal-watch-and-listings-honour-.gitignore-with-or-withou.md +23 -0
- package/docs/features/local-workspaces.md +7 -1
- package/package.json +1 -1
- package/release/index.js +594 -431
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, from18, except, desc) => {
|
|
19
|
+
if (from18 && typeof from18 === "object" || typeof from18 === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from18))
|
|
21
21
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () =>
|
|
22
|
+
__defProp(to, key, { get: () => from18[key], enumerable: !(desc = __getOwnPropDesc(from18, 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, from18) {
|
|
8921
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
8922
|
+
to[j] = from18[i2];
|
|
8923
8923
|
return to;
|
|
8924
8924
|
};
|
|
8925
8925
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -8927,14 +8927,14 @@ var require_Subscription = __commonJS({
|
|
|
8927
8927
|
var isFunction_1 = require_isFunction();
|
|
8928
8928
|
var UnsubscriptionError_1 = require_UnsubscriptionError();
|
|
8929
8929
|
var arrRemove_1 = require_arrRemove();
|
|
8930
|
-
var
|
|
8931
|
-
function
|
|
8930
|
+
var Subscription2 = (function() {
|
|
8931
|
+
function Subscription3(initialTeardown) {
|
|
8932
8932
|
this.initialTeardown = initialTeardown;
|
|
8933
8933
|
this.closed = false;
|
|
8934
8934
|
this._parentage = null;
|
|
8935
8935
|
this._finalizers = null;
|
|
8936
8936
|
}
|
|
8937
|
-
|
|
8937
|
+
Subscription3.prototype.unsubscribe = function() {
|
|
8938
8938
|
var e_1, _a2, e_2, _b;
|
|
8939
8939
|
var errors;
|
|
8940
8940
|
if (!this.closed) {
|
|
@@ -9001,13 +9001,13 @@ var require_Subscription = __commonJS({
|
|
|
9001
9001
|
}
|
|
9002
9002
|
}
|
|
9003
9003
|
};
|
|
9004
|
-
|
|
9004
|
+
Subscription3.prototype.add = function(teardown) {
|
|
9005
9005
|
var _a2;
|
|
9006
9006
|
if (teardown && teardown !== this) {
|
|
9007
9007
|
if (this.closed) {
|
|
9008
9008
|
execFinalizer(teardown);
|
|
9009
9009
|
} else {
|
|
9010
|
-
if (teardown instanceof
|
|
9010
|
+
if (teardown instanceof Subscription3) {
|
|
9011
9011
|
if (teardown.closed || teardown._hasParent(this)) {
|
|
9012
9012
|
return;
|
|
9013
9013
|
}
|
|
@@ -9017,15 +9017,15 @@ var require_Subscription = __commonJS({
|
|
|
9017
9017
|
}
|
|
9018
9018
|
}
|
|
9019
9019
|
};
|
|
9020
|
-
|
|
9020
|
+
Subscription3.prototype._hasParent = function(parent) {
|
|
9021
9021
|
var _parentage = this._parentage;
|
|
9022
9022
|
return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
|
|
9023
9023
|
};
|
|
9024
|
-
|
|
9024
|
+
Subscription3.prototype._addParent = function(parent) {
|
|
9025
9025
|
var _parentage = this._parentage;
|
|
9026
9026
|
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
9027
9027
|
};
|
|
9028
|
-
|
|
9028
|
+
Subscription3.prototype._removeParent = function(parent) {
|
|
9029
9029
|
var _parentage = this._parentage;
|
|
9030
9030
|
if (_parentage === parent) {
|
|
9031
9031
|
this._parentage = null;
|
|
@@ -9033,24 +9033,24 @@ var require_Subscription = __commonJS({
|
|
|
9033
9033
|
arrRemove_1.arrRemove(_parentage, parent);
|
|
9034
9034
|
}
|
|
9035
9035
|
};
|
|
9036
|
-
|
|
9036
|
+
Subscription3.prototype.remove = function(teardown) {
|
|
9037
9037
|
var _finalizers = this._finalizers;
|
|
9038
9038
|
_finalizers && arrRemove_1.arrRemove(_finalizers, teardown);
|
|
9039
|
-
if (teardown instanceof
|
|
9039
|
+
if (teardown instanceof Subscription3) {
|
|
9040
9040
|
teardown._removeParent(this);
|
|
9041
9041
|
}
|
|
9042
9042
|
};
|
|
9043
|
-
|
|
9044
|
-
var empty = new
|
|
9043
|
+
Subscription3.EMPTY = (function() {
|
|
9044
|
+
var empty = new Subscription3();
|
|
9045
9045
|
empty.closed = true;
|
|
9046
9046
|
return empty;
|
|
9047
9047
|
})();
|
|
9048
|
-
return
|
|
9048
|
+
return Subscription3;
|
|
9049
9049
|
})();
|
|
9050
|
-
exports2.Subscription =
|
|
9051
|
-
exports2.EMPTY_SUBSCRIPTION =
|
|
9050
|
+
exports2.Subscription = Subscription2;
|
|
9051
|
+
exports2.EMPTY_SUBSCRIPTION = Subscription2.EMPTY;
|
|
9052
9052
|
function isSubscription(value) {
|
|
9053
|
-
return value instanceof
|
|
9053
|
+
return value instanceof Subscription2 || value && "closed" in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe);
|
|
9054
9054
|
}
|
|
9055
9055
|
exports2.isSubscription = isSubscription;
|
|
9056
9056
|
function execFinalizer(finalizer) {
|
|
@@ -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, from18) {
|
|
9104
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
9105
|
+
to[j] = from18[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, from18) {
|
|
9864
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
9865
|
+
to[j] = from18[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, from18) {
|
|
10464
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
10465
|
+
to[j] = from18[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, from18) {
|
|
10673
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
10674
|
+
to[j] = from18[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 from18(input, scheduler) {
|
|
12237
12237
|
return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input);
|
|
12238
12238
|
}
|
|
12239
|
-
exports2.from =
|
|
12239
|
+
exports2.from = from18;
|
|
12240
12240
|
}
|
|
12241
12241
|
});
|
|
12242
12242
|
|
|
@@ -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, from18) {
|
|
12628
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
12629
|
+
to[j] = from18[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, from18) {
|
|
12670
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
12671
|
+
to[j] = from18[i2];
|
|
12672
12672
|
return to;
|
|
12673
12673
|
};
|
|
12674
12674
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -12988,12 +12988,12 @@ var require_mergeMap = __commonJS({
|
|
|
12988
12988
|
var lift_1 = require_lift();
|
|
12989
12989
|
var mergeInternals_1 = require_mergeInternals();
|
|
12990
12990
|
var isFunction_1 = require_isFunction();
|
|
12991
|
-
function
|
|
12991
|
+
function mergeMap2(project, resultSelector, concurrent) {
|
|
12992
12992
|
if (concurrent === void 0) {
|
|
12993
12993
|
concurrent = Infinity;
|
|
12994
12994
|
}
|
|
12995
12995
|
if (isFunction_1.isFunction(resultSelector)) {
|
|
12996
|
-
return
|
|
12996
|
+
return mergeMap2(function(a, i2) {
|
|
12997
12997
|
return map_1.map(function(b, ii) {
|
|
12998
12998
|
return resultSelector(a, b, i2, ii);
|
|
12999
12999
|
})(innerFrom_1.innerFrom(project(a, i2)));
|
|
@@ -13005,7 +13005,7 @@ var require_mergeMap = __commonJS({
|
|
|
13005
13005
|
return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent);
|
|
13006
13006
|
});
|
|
13007
13007
|
}
|
|
13008
|
-
exports2.mergeMap =
|
|
13008
|
+
exports2.mergeMap = mergeMap2;
|
|
13009
13009
|
}
|
|
13010
13010
|
});
|
|
13011
13011
|
|
|
@@ -13644,7 +13644,7 @@ var require_filter = __commonJS({
|
|
|
13644
13644
|
exports2.filter = void 0;
|
|
13645
13645
|
var lift_1 = require_lift();
|
|
13646
13646
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
13647
|
-
function
|
|
13647
|
+
function filter6(predicate, thisArg) {
|
|
13648
13648
|
return lift_1.operate(function(source, subscriber) {
|
|
13649
13649
|
var index = 0;
|
|
13650
13650
|
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
|
|
@@ -13652,7 +13652,7 @@ var require_filter = __commonJS({
|
|
|
13652
13652
|
}));
|
|
13653
13653
|
});
|
|
13654
13654
|
}
|
|
13655
|
-
exports2.filter =
|
|
13655
|
+
exports2.filter = filter6;
|
|
13656
13656
|
}
|
|
13657
13657
|
});
|
|
13658
13658
|
|
|
@@ -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, from18) {
|
|
13804
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
13805
|
+
to[j] = from18[i2];
|
|
13806
13806
|
return to;
|
|
13807
13807
|
};
|
|
13808
13808
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14090,7 +14090,7 @@ var require_bufferTime = __commonJS({
|
|
|
14090
14090
|
var async_1 = require_async();
|
|
14091
14091
|
var args_1 = require_args();
|
|
14092
14092
|
var executeSchedule_1 = require_executeSchedule();
|
|
14093
|
-
function
|
|
14093
|
+
function bufferTime3(bufferTimeSpan) {
|
|
14094
14094
|
var _a2, _b;
|
|
14095
14095
|
var otherArgs = [];
|
|
14096
14096
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -14162,7 +14162,7 @@ var require_bufferTime = __commonJS({
|
|
|
14162
14162
|
source.subscribe(bufferTimeSubscriber);
|
|
14163
14163
|
});
|
|
14164
14164
|
}
|
|
14165
|
-
exports2.bufferTime =
|
|
14165
|
+
exports2.bufferTime = bufferTime3;
|
|
14166
14166
|
}
|
|
14167
14167
|
});
|
|
14168
14168
|
|
|
@@ -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, from18) {
|
|
14434
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
14435
|
+
to[j] = from18[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, from18) {
|
|
14482
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
14483
|
+
to[j] = from18[i2];
|
|
14484
14484
|
return to;
|
|
14485
14485
|
};
|
|
14486
14486
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -14505,10 +14505,10 @@ var require_concatMap = __commonJS({
|
|
|
14505
14505
|
exports2.concatMap = void 0;
|
|
14506
14506
|
var mergeMap_1 = require_mergeMap();
|
|
14507
14507
|
var isFunction_1 = require_isFunction();
|
|
14508
|
-
function
|
|
14508
|
+
function concatMap3(project, resultSelector) {
|
|
14509
14509
|
return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1);
|
|
14510
14510
|
}
|
|
14511
|
-
exports2.concatMap =
|
|
14511
|
+
exports2.concatMap = concatMap3;
|
|
14512
14512
|
}
|
|
14513
14513
|
});
|
|
14514
14514
|
|
|
@@ -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, from18) {
|
|
14556
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
14557
|
+
to[j] = from18[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, from18) {
|
|
14602
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
14603
|
+
to[j] = from18[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, from18) {
|
|
15095
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
15096
|
+
to[j] = from18[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, from18) {
|
|
15642
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
15643
|
+
to[j] = from18[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, from18) {
|
|
15689
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
15690
|
+
to[j] = from18[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, from18) {
|
|
15774
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
15775
|
+
to[j] = from18[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, from18) {
|
|
15958
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
15959
|
+
to[j] = from18[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, from18) {
|
|
16356
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
16357
|
+
to[j] = from18[i2];
|
|
16358
16358
|
return to;
|
|
16359
16359
|
};
|
|
16360
16360
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -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, from18) {
|
|
17358
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
17359
|
+
to[j] = from18[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, from18) {
|
|
17444
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
17445
|
+
to[j] = from18[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, from18) {
|
|
17487
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
17488
|
+
to[j] = from18[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, from18) {
|
|
18255
|
+
for (var i2 = 0, il = from18.length, j = to.length; i2 < il; i2++, j++)
|
|
18256
|
+
to[j] = from18[i2];
|
|
18257
18257
|
return to;
|
|
18258
18258
|
};
|
|
18259
18259
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -21369,7 +21369,7 @@ var require_lib = __commonJS({
|
|
|
21369
21369
|
var require_XMLHttpRequest = __commonJS({
|
|
21370
21370
|
"../../node_modules/xmlhttprequest/lib/XMLHttpRequest.js"(exports2) {
|
|
21371
21371
|
var Url = require("url");
|
|
21372
|
-
var
|
|
21372
|
+
var spawn7 = require("child_process").spawn;
|
|
21373
21373
|
var fs3 = require("fs");
|
|
21374
21374
|
exports2.XMLHttpRequest = function() {
|
|
21375
21375
|
"use strict";
|
|
@@ -21639,7 +21639,7 @@ var require_XMLHttpRequest = __commonJS({
|
|
|
21639
21639
|
var syncFile = ".node-xmlhttprequest-sync-" + process.pid;
|
|
21640
21640
|
fs3.writeFileSync(syncFile, "", "utf8");
|
|
21641
21641
|
var execString = "var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http" + (ssl ? "s" : "") + ".request;var options = " + JSON.stringify(options) + ";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('" + syncFile + "');});response.on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});}).on('error', function(error) {fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('" + syncFile + "');});" + (data ? "req.write('" + JSON.stringify(data).slice(1, -1).replace(/'/g, "\\'") + "');" : "") + "req.end();";
|
|
21642
|
-
var syncProc =
|
|
21642
|
+
var syncProc = spawn7(process.argv[0], ["-e", execString]);
|
|
21643
21643
|
while (fs3.existsSync(syncFile)) {
|
|
21644
21644
|
}
|
|
21645
21645
|
var resp = JSON.parse(fs3.readFileSync(contentFile, "utf8"));
|
|
@@ -29867,7 +29867,7 @@ var require_buffer_list = __commonJS({
|
|
|
29867
29867
|
}
|
|
29868
29868
|
}, {
|
|
29869
29869
|
key: "join",
|
|
29870
|
-
value: function
|
|
29870
|
+
value: function join8(s2) {
|
|
29871
29871
|
if (this.length === 0) return "";
|
|
29872
29872
|
var p = this.head;
|
|
29873
29873
|
var ret = "" + p.data;
|
|
@@ -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 from18(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 = from18;
|
|
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 from18;
|
|
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 (from18 === void 0) {
|
|
32154
|
+
from18 = require_from2();
|
|
32155
32155
|
}
|
|
32156
|
-
return
|
|
32156
|
+
return from18(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(from18, to) {
|
|
32337
|
+
return from18.pipe(to);
|
|
32338
32338
|
}
|
|
32339
32339
|
function popCallback(streams) {
|
|
32340
32340
|
if (!streams.length) return noop3;
|
|
@@ -32885,7 +32885,7 @@ var require_buffer_list2 = __commonJS({
|
|
|
32885
32885
|
}
|
|
32886
32886
|
}, {
|
|
32887
32887
|
key: "join",
|
|
32888
|
-
value: function
|
|
32888
|
+
value: function join8(s2) {
|
|
32889
32889
|
if (this.length === 0) return "";
|
|
32890
32890
|
var p = this.head;
|
|
32891
32891
|
var ret = "" + p.data;
|
|
@@ -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 from18(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 = from18;
|
|
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 from18;
|
|
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 (from18 === void 0) {
|
|
34881
|
+
from18 = require_from3();
|
|
34882
34882
|
}
|
|
34883
|
-
return
|
|
34883
|
+
return from18(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(from18, to) {
|
|
35064
|
+
return from18.pipe(to);
|
|
35065
35065
|
}
|
|
35066
35066
|
function popCallback(streams) {
|
|
35067
35067
|
if (!streams.length) return noop3;
|
|
@@ -38497,14 +38497,14 @@ function __spreadArrays() {
|
|
|
38497
38497
|
r2[k] = a[j];
|
|
38498
38498
|
return r2;
|
|
38499
38499
|
}
|
|
38500
|
-
function __spreadArray(to,
|
|
38501
|
-
if (pack || arguments.length === 2) for (var i2 = 0, l =
|
|
38502
|
-
if (ar || !(i2 in
|
|
38503
|
-
if (!ar) ar = Array.prototype.slice.call(
|
|
38504
|
-
ar[i2] =
|
|
38500
|
+
function __spreadArray(to, from18, pack) {
|
|
38501
|
+
if (pack || arguments.length === 2) for (var i2 = 0, l = from18.length, ar; i2 < l; i2++) {
|
|
38502
|
+
if (ar || !(i2 in from18)) {
|
|
38503
|
+
if (!ar) ar = Array.prototype.slice.call(from18, 0, i2);
|
|
38504
|
+
ar[i2] = from18[i2];
|
|
38505
38505
|
}
|
|
38506
38506
|
}
|
|
38507
|
-
return to.concat(ar || Array.prototype.slice.call(
|
|
38507
|
+
return to.concat(ar || Array.prototype.slice.call(from18));
|
|
38508
38508
|
}
|
|
38509
38509
|
function __await(v) {
|
|
38510
38510
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -38949,7 +38949,7 @@ var require_util = __commonJS({
|
|
|
38949
38949
|
return path2;
|
|
38950
38950
|
}
|
|
38951
38951
|
exports2.normalize = normalize2;
|
|
38952
|
-
function
|
|
38952
|
+
function join8(aRoot, aPath) {
|
|
38953
38953
|
if (aRoot === "") {
|
|
38954
38954
|
aRoot = ".";
|
|
38955
38955
|
}
|
|
@@ -38981,7 +38981,7 @@ var require_util = __commonJS({
|
|
|
38981
38981
|
}
|
|
38982
38982
|
return joined;
|
|
38983
38983
|
}
|
|
38984
|
-
exports2.join =
|
|
38984
|
+
exports2.join = join8;
|
|
38985
38985
|
exports2.isAbsolute = function(aPath) {
|
|
38986
38986
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
38987
38987
|
};
|
|
@@ -39154,7 +39154,7 @@ var require_util = __commonJS({
|
|
|
39154
39154
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
39155
39155
|
}
|
|
39156
39156
|
}
|
|
39157
|
-
sourceURL =
|
|
39157
|
+
sourceURL = join8(urlGenerate(parsed), sourceURL);
|
|
39158
39158
|
}
|
|
39159
39159
|
return normalize2(sourceURL);
|
|
39160
39160
|
}
|
|
@@ -41028,11 +41028,11 @@ var require_typescript = __commonJS({
|
|
|
41028
41028
|
for (var name2 in all)
|
|
41029
41029
|
__defProp2(target, name2, { get: all[name2], enumerable: true });
|
|
41030
41030
|
};
|
|
41031
|
-
var __copyProps2 = (to,
|
|
41032
|
-
if (
|
|
41033
|
-
for (let key of __getOwnPropNames2(
|
|
41031
|
+
var __copyProps2 = (to, from18, except, desc) => {
|
|
41032
|
+
if (from18 && typeof from18 === "object" || typeof from18 === "function") {
|
|
41033
|
+
for (let key of __getOwnPropNames2(from18))
|
|
41034
41034
|
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
41035
|
-
__defProp2(to, key, { get: () =>
|
|
41035
|
+
__defProp2(to, key, { get: () => from18[key], enumerable: !(desc = __getOwnPropDesc2(from18, key)) || desc.enumerable });
|
|
41036
41036
|
}
|
|
41037
41037
|
return to;
|
|
41038
41038
|
};
|
|
@@ -41552,7 +41552,7 @@ var require_typescript = __commonJS({
|
|
|
41552
41552
|
fileExtensionIsOneOf: () => fileExtensionIsOneOf,
|
|
41553
41553
|
fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
|
|
41554
41554
|
fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,
|
|
41555
|
-
filter: () =>
|
|
41555
|
+
filter: () => filter6,
|
|
41556
41556
|
filterMutate: () => filterMutate,
|
|
41557
41557
|
filterSemanticDiagnostics: () => filterSemanticDiagnostics,
|
|
41558
41558
|
find: () => find,
|
|
@@ -43449,7 +43449,7 @@ var require_typescript = __commonJS({
|
|
|
43449
43449
|
}
|
|
43450
43450
|
return count;
|
|
43451
43451
|
}
|
|
43452
|
-
function
|
|
43452
|
+
function filter6(array2, f3) {
|
|
43453
43453
|
if (array2 !== void 0) {
|
|
43454
43454
|
const len = array2.length;
|
|
43455
43455
|
let i2 = 0;
|
|
@@ -43876,14 +43876,14 @@ var require_typescript = __commonJS({
|
|
|
43876
43876
|
function toOffset(array2, offset) {
|
|
43877
43877
|
return offset < 0 ? array2.length + offset : offset;
|
|
43878
43878
|
}
|
|
43879
|
-
function addRange(to,
|
|
43880
|
-
if (
|
|
43881
|
-
if (to === void 0) return
|
|
43882
|
-
start3 = start3 === void 0 ? 0 : toOffset(
|
|
43883
|
-
end = end === void 0 ?
|
|
43884
|
-
for (let i2 = start3; i2 < end && i2 <
|
|
43885
|
-
if (
|
|
43886
|
-
to.push(
|
|
43879
|
+
function addRange(to, from18, start3, end) {
|
|
43880
|
+
if (from18 === void 0 || from18.length === 0) return to;
|
|
43881
|
+
if (to === void 0) return from18.slice(start3, end);
|
|
43882
|
+
start3 = start3 === void 0 ? 0 : toOffset(from18, start3);
|
|
43883
|
+
end = end === void 0 ? from18.length : toOffset(from18, end);
|
|
43884
|
+
for (let i2 = start3; i2 < end && i2 < from18.length; i2++) {
|
|
43885
|
+
if (from18[i2] !== void 0) {
|
|
43886
|
+
to.push(from18[i2]);
|
|
43887
43887
|
}
|
|
43888
43888
|
}
|
|
43889
43889
|
return to;
|
|
@@ -50392,8 +50392,8 @@ ${lanes.join("\n")}
|
|
|
50392
50392
|
const canonicalDirectoryName = getCanonicalFileName(directoryName);
|
|
50393
50393
|
return startsWith(canonicalFileName, canonicalDirectoryName + "/") || startsWith(canonicalFileName, canonicalDirectoryName + "\\");
|
|
50394
50394
|
}
|
|
50395
|
-
function getPathComponentsRelativeTo(
|
|
50396
|
-
const fromComponents = reducePathComponents(getPathComponents(
|
|
50395
|
+
function getPathComponentsRelativeTo(from18, to, stringEqualityComparer, getCanonicalFileName) {
|
|
50396
|
+
const fromComponents = reducePathComponents(getPathComponents(from18));
|
|
50397
50397
|
const toComponents = reducePathComponents(getPathComponents(to));
|
|
50398
50398
|
let start3;
|
|
50399
50399
|
for (start3 = 0; start3 < fromComponents.length && start3 < toComponents.length; start3++) {
|
|
@@ -50429,8 +50429,8 @@ ${lanes.join("\n")}
|
|
|
50429
50429
|
false
|
|
50430
50430
|
);
|
|
50431
50431
|
}
|
|
50432
|
-
function getRelativePathFromFile(
|
|
50433
|
-
return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(
|
|
50432
|
+
function getRelativePathFromFile(from18, to, getCanonicalFileName) {
|
|
50433
|
+
return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from18), to, getCanonicalFileName));
|
|
50434
50434
|
}
|
|
50435
50435
|
function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) {
|
|
50436
50436
|
const pathComponents2 = getPathComponentsRelativeTo(
|
|
@@ -56528,7 +56528,7 @@ ${lanes.join("\n")}
|
|
|
56528
56528
|
}
|
|
56529
56529
|
function getDecorators(node) {
|
|
56530
56530
|
if (hasDecorators(node)) {
|
|
56531
|
-
return
|
|
56531
|
+
return filter6(node.modifiers, isDecorator);
|
|
56532
56532
|
}
|
|
56533
56533
|
}
|
|
56534
56534
|
function getModifiers(node) {
|
|
@@ -56537,7 +56537,7 @@ ${lanes.join("\n")}
|
|
|
56537
56537
|
98303
|
|
56538
56538
|
/* Modifier */
|
|
56539
56539
|
)) {
|
|
56540
|
-
return
|
|
56540
|
+
return filter6(node.modifiers, isModifier);
|
|
56541
56541
|
}
|
|
56542
56542
|
}
|
|
56543
56543
|
function getJSDocParameterTagsWorker(param, noCache) {
|
|
@@ -57680,7 +57680,7 @@ ${lanes.join("\n")}
|
|
|
57680
57680
|
return void 0;
|
|
57681
57681
|
}
|
|
57682
57682
|
function getDeclarationsOfKind(symbol2, kind) {
|
|
57683
|
-
return
|
|
57683
|
+
return filter6(symbol2.declarations || emptyArray, (d) => d.kind === kind);
|
|
57684
57684
|
}
|
|
57685
57685
|
function createSymbolTable(symbols) {
|
|
57686
57686
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -57981,15 +57981,15 @@ ${lanes.join("\n")}
|
|
|
57981
57981
|
if (!nodeArray || isArray(child) || !isElement(child)) return false;
|
|
57982
57982
|
return contains(nodeArray, child);
|
|
57983
57983
|
}
|
|
57984
|
-
function insertStatementsAfterPrologue(to,
|
|
57985
|
-
if (
|
|
57984
|
+
function insertStatementsAfterPrologue(to, from18, isPrologueDirective2) {
|
|
57985
|
+
if (from18 === void 0 || from18.length === 0) return to;
|
|
57986
57986
|
let statementIndex = 0;
|
|
57987
57987
|
for (; statementIndex < to.length; ++statementIndex) {
|
|
57988
57988
|
if (!isPrologueDirective2(to[statementIndex])) {
|
|
57989
57989
|
break;
|
|
57990
57990
|
}
|
|
57991
57991
|
}
|
|
57992
|
-
to.splice(statementIndex, 0, ...
|
|
57992
|
+
to.splice(statementIndex, 0, ...from18);
|
|
57993
57993
|
return to;
|
|
57994
57994
|
}
|
|
57995
57995
|
function insertStatementAfterPrologue(to, statement, isPrologueDirective2) {
|
|
@@ -58006,11 +58006,11 @@ ${lanes.join("\n")}
|
|
|
58006
58006
|
function isAnyPrologueDirective(node) {
|
|
58007
58007
|
return isPrologueDirective(node) || !!(getEmitFlags(node) & 2097152);
|
|
58008
58008
|
}
|
|
58009
|
-
function insertStatementsAfterStandardPrologue(to,
|
|
58010
|
-
return insertStatementsAfterPrologue(to,
|
|
58009
|
+
function insertStatementsAfterStandardPrologue(to, from18) {
|
|
58010
|
+
return insertStatementsAfterPrologue(to, from18, isPrologueDirective);
|
|
58011
58011
|
}
|
|
58012
|
-
function insertStatementsAfterCustomPrologue(to,
|
|
58013
|
-
return insertStatementsAfterPrologue(to,
|
|
58012
|
+
function insertStatementsAfterCustomPrologue(to, from18) {
|
|
58013
|
+
return insertStatementsAfterPrologue(to, from18, isAnyPrologueDirective);
|
|
58014
58014
|
}
|
|
58015
58015
|
function insertStatementAfterStandardPrologue(to, statement) {
|
|
58016
58016
|
return insertStatementAfterPrologue(to, statement, isPrologueDirective);
|
|
@@ -59274,7 +59274,7 @@ ${lanes.join("\n")}
|
|
|
59274
59274
|
}
|
|
59275
59275
|
function getJSDocCommentRanges(node, text) {
|
|
59276
59276
|
const commentRanges = node.kind === 170 || node.kind === 169 || node.kind === 219 || node.kind === 220 || node.kind === 218 || node.kind === 261 || node.kind === 282 ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
|
|
59277
|
-
return
|
|
59277
|
+
return filter6(
|
|
59278
59278
|
commentRanges,
|
|
59279
59279
|
(comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range
|
|
59280
59280
|
text.charCodeAt(comment.pos + 1) === 42 && text.charCodeAt(comment.pos + 2) === 42 && text.charCodeAt(comment.pos + 3) !== 47
|
|
@@ -60576,10 +60576,10 @@ ${lanes.join("\n")}
|
|
|
60576
60576
|
const lastJsDoc = last(comments);
|
|
60577
60577
|
return flatMap(comments, (jsDoc) => {
|
|
60578
60578
|
if (jsDoc === lastJsDoc) {
|
|
60579
|
-
const ownedTags =
|
|
60579
|
+
const ownedTags = filter6(jsDoc.tags, (tag) => ownsJSDocTag(hostNode, tag));
|
|
60580
60580
|
return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags;
|
|
60581
60581
|
} else {
|
|
60582
|
-
return
|
|
60582
|
+
return filter6(jsDoc.tags, isJSDocOverloadTag);
|
|
60583
60583
|
}
|
|
60584
60584
|
});
|
|
60585
60585
|
}
|
|
@@ -61423,7 +61423,7 @@ ${lanes.join("\n")}
|
|
|
61423
61423
|
return -1;
|
|
61424
61424
|
}
|
|
61425
61425
|
function getSemanticJsxChildren(children) {
|
|
61426
|
-
return
|
|
61426
|
+
return filter6(children, (i2) => {
|
|
61427
61427
|
switch (i2.kind) {
|
|
61428
61428
|
case 295:
|
|
61429
61429
|
return !!i2.expression;
|
|
@@ -61884,13 +61884,13 @@ ${lanes.join("\n")}
|
|
|
61884
61884
|
if (options.outFile) {
|
|
61885
61885
|
const moduleKind = getEmitModuleKind(options);
|
|
61886
61886
|
const moduleEmitEnabled = options.emitDeclarationOnly || moduleKind === 2 || moduleKind === 4;
|
|
61887
|
-
return
|
|
61887
|
+
return filter6(
|
|
61888
61888
|
host.getSourceFiles(),
|
|
61889
61889
|
(sourceFile) => (moduleEmitEnabled || !isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit)
|
|
61890
61890
|
);
|
|
61891
61891
|
} else {
|
|
61892
61892
|
const sourceFiles = targetSourceFile === void 0 ? host.getSourceFiles() : [targetSourceFile];
|
|
61893
|
-
return
|
|
61893
|
+
return filter6(
|
|
61894
61894
|
sourceFiles,
|
|
61895
61895
|
(sourceFile) => sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit)
|
|
61896
61896
|
);
|
|
@@ -62108,7 +62108,7 @@ ${lanes.join("\n")}
|
|
|
62108
62108
|
let currentDetachedCommentInfo;
|
|
62109
62109
|
if (removeComments) {
|
|
62110
62110
|
if (node.pos === 0) {
|
|
62111
|
-
leadingComments =
|
|
62111
|
+
leadingComments = filter6(getLeadingCommentRanges(text, node.pos), isPinnedCommentLocal);
|
|
62112
62112
|
}
|
|
62113
62113
|
} else {
|
|
62114
62114
|
leadingComments = getLeadingCommentRanges(text, node.pos);
|
|
@@ -62814,7 +62814,7 @@ ${lanes.join("\n")}
|
|
|
62814
62814
|
return false;
|
|
62815
62815
|
}
|
|
62816
62816
|
function getInitializedVariables(node) {
|
|
62817
|
-
return
|
|
62817
|
+
return filter6(node.declarations, isInitializedVariable);
|
|
62818
62818
|
}
|
|
62819
62819
|
function isInitializedVariable(node) {
|
|
62820
62820
|
return isVariableDeclaration(node) && node.initializer !== void 0;
|
|
@@ -72489,13 +72489,13 @@ ${lanes.join("\n")}
|
|
|
72489
72489
|
[cooked, raw]
|
|
72490
72490
|
);
|
|
72491
72491
|
}
|
|
72492
|
-
function createSpreadArrayHelper(to,
|
|
72492
|
+
function createSpreadArrayHelper(to, from18, packFrom) {
|
|
72493
72493
|
context.requestEmitHelper(spreadArrayHelper);
|
|
72494
72494
|
return factory2.createCallExpression(
|
|
72495
72495
|
getUnscopedHelperName("__spreadArray"),
|
|
72496
72496
|
/*typeArguments*/
|
|
72497
72497
|
void 0,
|
|
72498
|
-
[to,
|
|
72498
|
+
[to, from18, packFrom ? immutableTrue() : immutableFalse()]
|
|
72499
72499
|
);
|
|
72500
72500
|
}
|
|
72501
72501
|
function createPropKeyHelper(expr) {
|
|
@@ -74406,7 +74406,7 @@ ${lanes.join("\n")}
|
|
|
74406
74406
|
}
|
|
74407
74407
|
}
|
|
74408
74408
|
function getImportedHelpers(sourceFile) {
|
|
74409
|
-
return
|
|
74409
|
+
return filter6(getEmitHelpers(sourceFile), (helper) => !helper.scoped);
|
|
74410
74410
|
}
|
|
74411
74411
|
function getOrCreateExternalHelpersModuleNameIfNeeded(factory2, node, compilerOptions, helpers, hasExportStarsToExportValues, hasImportStarOrImportDefault) {
|
|
74412
74412
|
const externalHelpersModuleName = getExternalHelpersModuleName(node);
|
|
@@ -86835,7 +86835,7 @@ ${lanes.join("\n")}
|
|
|
86835
86835
|
elements.forEach((element) => convertPropertyValueToJson(element, elementOption));
|
|
86836
86836
|
return void 0;
|
|
86837
86837
|
}
|
|
86838
|
-
return
|
|
86838
|
+
return filter6(elements.map((element) => convertPropertyValueToJson(element, elementOption)), (v) => v !== void 0);
|
|
86839
86839
|
}
|
|
86840
86840
|
function convertPropertyValueToJson(valueExpression, option) {
|
|
86841
86841
|
switch (valueExpression.kind) {
|
|
@@ -86899,7 +86899,7 @@ ${lanes.join("\n")}
|
|
|
86899
86899
|
var _a2, _b, _c;
|
|
86900
86900
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
86901
86901
|
const files = map32(
|
|
86902
|
-
|
|
86902
|
+
filter6(
|
|
86903
86903
|
configParseResult.fileNames,
|
|
86904
86904
|
!((_b = (_a2 = configParseResult.options.configFile) == null ? void 0 : _a2.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs(
|
|
86905
86905
|
configFileName,
|
|
@@ -87372,7 +87372,7 @@ ${lanes.join("\n")}
|
|
|
87372
87372
|
const outDir = options.outDir;
|
|
87373
87373
|
const declarationDir = options.declarationDir;
|
|
87374
87374
|
if (outDir || declarationDir) {
|
|
87375
|
-
excludeSpecs =
|
|
87375
|
+
excludeSpecs = filter6([outDir, declarationDir], (d) => !!d);
|
|
87376
87376
|
}
|
|
87377
87377
|
}
|
|
87378
87378
|
if (filesSpecs === void 0 && includeSpecs === void 0) {
|
|
@@ -87409,7 +87409,7 @@ ${lanes.join("\n")}
|
|
|
87409
87409
|
basePathForFileNames
|
|
87410
87410
|
) || validatedExcludeSpecsBeforeSubstitution;
|
|
87411
87411
|
}
|
|
87412
|
-
const validatedFilesSpecBeforeSubstitution =
|
|
87412
|
+
const validatedFilesSpecBeforeSubstitution = filter6(filesSpecs, isString);
|
|
87413
87413
|
const validatedFilesSpec = getSubstitutedStringArrayWithConfigDirTemplate(
|
|
87414
87414
|
validatedFilesSpecBeforeSubstitution,
|
|
87415
87415
|
basePathForFileNames
|
|
@@ -87926,7 +87926,7 @@ ${lanes.join("\n")}
|
|
|
87926
87926
|
}
|
|
87927
87927
|
}
|
|
87928
87928
|
function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) {
|
|
87929
|
-
return
|
|
87929
|
+
return filter6(map32(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v);
|
|
87930
87930
|
}
|
|
87931
87931
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
87932
87932
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
@@ -88015,7 +88015,7 @@ ${lanes.join("\n")}
|
|
|
88015
88015
|
function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
|
|
88016
88016
|
return matchesExcludeWorker(
|
|
88017
88017
|
pathToCheck,
|
|
88018
|
-
|
|
88018
|
+
filter6(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)),
|
|
88019
88019
|
useCaseSensitiveFileNames2,
|
|
88020
88020
|
currentDirectory
|
|
88021
88021
|
);
|
|
@@ -90242,7 +90242,7 @@ ${lanes.join("\n")}
|
|
|
90242
90242
|
moduleName
|
|
90243
90243
|
);
|
|
90244
90244
|
}
|
|
90245
|
-
const expandingKeys = toSorted(
|
|
90245
|
+
const expandingKeys = toSorted(filter6(getOwnKeys(lookupTable), (k) => hasOneAsterisk(k) || endsWith(k, "/")), comparePatternKeys);
|
|
90246
90246
|
for (const potentialTarget of expandingKeys) {
|
|
90247
90247
|
if (state.features & 16 && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
|
90248
90248
|
const target = lookupTable[potentialTarget];
|
|
@@ -97379,7 +97379,7 @@ ${lanes.join("\n")}
|
|
|
97379
97379
|
const propName = declaration2.name;
|
|
97380
97380
|
if (isIdentifier(propName) || isPrivateIdentifier(propName)) {
|
|
97381
97381
|
const type = getTypeOfSymbol(getSymbolOfDeclaration(declaration2));
|
|
97382
|
-
const staticBlocks =
|
|
97382
|
+
const staticBlocks = filter6(declaration2.parent.members, isClassStaticBlockDeclaration);
|
|
97383
97383
|
if (isPropertyInitializedInStaticBlocks(propName, type, staticBlocks, declaration2.parent.pos, current.pos)) {
|
|
97384
97384
|
return true;
|
|
97385
97385
|
}
|
|
@@ -99602,7 +99602,7 @@ ${lanes.join("\n")}
|
|
|
99602
99602
|
function getResolvedTypeWithoutAbstractConstructSignatures(type) {
|
|
99603
99603
|
if (type.constructSignatures.length === 0) return type;
|
|
99604
99604
|
if (type.objectTypeWithoutAbstractConstructSignatures) return type.objectTypeWithoutAbstractConstructSignatures;
|
|
99605
|
-
const constructSignatures =
|
|
99605
|
+
const constructSignatures = filter6(type.constructSignatures, (signature) => !(signature.flags & 4));
|
|
99606
99606
|
if (type.constructSignatures === constructSignatures) return type;
|
|
99607
99607
|
const typeCopy = createAnonymousType(
|
|
99608
99608
|
type.symbol,
|
|
@@ -99952,7 +99952,7 @@ ${lanes.join("\n")}
|
|
|
99952
99952
|
}
|
|
99953
99953
|
function hasVisibleDeclarations(symbol2, shouldComputeAliasToMakeVisible) {
|
|
99954
99954
|
let aliasesToMakeVisible;
|
|
99955
|
-
if (!every(
|
|
99955
|
+
if (!every(filter6(
|
|
99956
99956
|
symbol2.declarations,
|
|
99957
99957
|
(d) => d.kind !== 80
|
|
99958
99958
|
/* Identifier */
|
|
@@ -100608,7 +100608,7 @@ ${lanes.join("\n")}
|
|
|
100608
100608
|
});
|
|
100609
100609
|
}
|
|
100610
100610
|
function simplifyClassDeclaration(classDecl, symbol2) {
|
|
100611
|
-
const classDeclarations =
|
|
100611
|
+
const classDeclarations = filter6(symbol2.declarations, isClassLike);
|
|
100612
100612
|
const originalClassDecl = classDeclarations && classDeclarations.length > 0 ? classDeclarations[0] : classDecl;
|
|
100613
100613
|
const modifiers = getEffectiveModifierFlags(originalClassDecl) & ~(32 | 128);
|
|
100614
100614
|
const isAnonymous = isClassExpression(originalClassDecl);
|
|
@@ -100626,7 +100626,7 @@ ${lanes.join("\n")}
|
|
|
100626
100626
|
return factory.replaceModifiers(classDecl, modifiers);
|
|
100627
100627
|
}
|
|
100628
100628
|
function simplifyModifiers(newDecl, isDeclKind, symbol2) {
|
|
100629
|
-
const decls =
|
|
100629
|
+
const decls = filter6(symbol2.declarations, isDeclKind);
|
|
100630
100630
|
const declWithModifiers = decls && decls.length > 0 ? decls[0] : newDecl;
|
|
100631
100631
|
const modifiers = getEffectiveModifierFlags(declWithModifiers) & ~(32 | 128);
|
|
100632
100632
|
return factory.replaceModifiers(newDecl, modifiers);
|
|
@@ -101459,7 +101459,7 @@ ${lanes.join("\n")}
|
|
|
101459
101459
|
return signatureNode;
|
|
101460
101460
|
}
|
|
101461
101461
|
}
|
|
101462
|
-
const abstractSignatures =
|
|
101462
|
+
const abstractSignatures = filter6(resolved.constructSignatures, (signature) => !!(signature.flags & 4));
|
|
101463
101463
|
if (some(abstractSignatures)) {
|
|
101464
101464
|
const types3 = map32(abstractSignatures, getOrCreateTypeFromSignature);
|
|
101465
101465
|
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
|
|
@@ -101676,7 +101676,7 @@ ${lanes.join("\n")}
|
|
|
101676
101676
|
)) == null ? void 0 : _a22.accessibility) === 0);
|
|
101677
101677
|
});
|
|
101678
101678
|
if (allComponentComputedNamesSerializable) {
|
|
101679
|
-
const newComponents =
|
|
101679
|
+
const newComponents = filter6(indexInfo.components, (e2) => {
|
|
101680
101680
|
return !hasLateBindableName(e2);
|
|
101681
101681
|
});
|
|
101682
101682
|
return map32(newComponents, (e2) => {
|
|
@@ -103534,16 +103534,16 @@ ${lanes.join("\n")}
|
|
|
103534
103534
|
}
|
|
103535
103535
|
function getNamesOfDeclaration(statement) {
|
|
103536
103536
|
if (isVariableStatement(statement)) {
|
|
103537
|
-
return
|
|
103537
|
+
return filter6(map32(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined);
|
|
103538
103538
|
}
|
|
103539
|
-
return
|
|
103539
|
+
return filter6([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
|
|
103540
103540
|
}
|
|
103541
103541
|
function flattenExportAssignedNamespace(statements) {
|
|
103542
103542
|
const exportAssignment = find(statements, isExportAssignment);
|
|
103543
103543
|
const nsIndex = findIndex(statements, isModuleDeclaration);
|
|
103544
103544
|
let ns = nsIndex !== -1 ? statements[nsIndex] : void 0;
|
|
103545
103545
|
if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) {
|
|
103546
|
-
const excessExports =
|
|
103546
|
+
const excessExports = filter6(statements, (s2) => !!(getEffectiveModifierFlags(s2) & 32));
|
|
103547
103547
|
const name2 = ns.name;
|
|
103548
103548
|
let body = ns.body;
|
|
103549
103549
|
if (length(excessExports)) {
|
|
@@ -103589,15 +103589,15 @@ ${lanes.join("\n")}
|
|
|
103589
103589
|
/* None */
|
|
103590
103590
|
);
|
|
103591
103591
|
});
|
|
103592
|
-
statements = [...
|
|
103592
|
+
statements = [...filter6(statements, (s2) => s2 !== ns && s2 !== exportAssignment), ...results];
|
|
103593
103593
|
}
|
|
103594
103594
|
}
|
|
103595
103595
|
return statements;
|
|
103596
103596
|
}
|
|
103597
103597
|
function mergeExportDeclarations(statements) {
|
|
103598
|
-
const exports22 =
|
|
103598
|
+
const exports22 = filter6(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
|
|
103599
103599
|
if (length(exports22) > 1) {
|
|
103600
|
-
const nonExports =
|
|
103600
|
+
const nonExports = filter6(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause);
|
|
103601
103601
|
statements = [
|
|
103602
103602
|
...nonExports,
|
|
103603
103603
|
factory.createExportDeclaration(
|
|
@@ -103611,14 +103611,14 @@ ${lanes.join("\n")}
|
|
|
103611
103611
|
)
|
|
103612
103612
|
];
|
|
103613
103613
|
}
|
|
103614
|
-
const reexports =
|
|
103614
|
+
const reexports = filter6(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause));
|
|
103615
103615
|
if (length(reexports) > 1) {
|
|
103616
103616
|
const groups = group(reexports, (decl) => isStringLiteral(decl.moduleSpecifier) ? ">" + decl.moduleSpecifier.text : ">");
|
|
103617
103617
|
if (groups.length !== reexports.length) {
|
|
103618
103618
|
for (const group2 of groups) {
|
|
103619
103619
|
if (group2.length > 1) {
|
|
103620
103620
|
statements = [
|
|
103621
|
-
...
|
|
103621
|
+
...filter6(statements, (s2) => !group2.includes(s2)),
|
|
103622
103622
|
factory.createExportDeclaration(
|
|
103623
103623
|
/*modifiers*/
|
|
103624
103624
|
void 0,
|
|
@@ -103642,7 +103642,7 @@ ${lanes.join("\n")}
|
|
|
103642
103642
|
if (!e2.propertyName && e2.name.kind !== 11) {
|
|
103643
103643
|
const name2 = e2.name;
|
|
103644
103644
|
const indices = indicesOf(statements);
|
|
103645
|
-
const associatedIndices =
|
|
103645
|
+
const associatedIndices = filter6(indices, (i2) => nodeHasName(statements[i2], name2));
|
|
103646
103646
|
if (length(associatedIndices) && every(associatedIndices, (i2) => canHaveExportModifier(statements[i2]))) {
|
|
103647
103647
|
for (const index2 of associatedIndices) {
|
|
103648
103648
|
statements[index2] = addExportModifier(statements[index2]);
|
|
@@ -104115,7 +104115,7 @@ ${lanes.join("\n")}
|
|
|
104115
104115
|
}
|
|
104116
104116
|
exports22 = arrayFrom(membersSet);
|
|
104117
104117
|
}
|
|
104118
|
-
return
|
|
104118
|
+
return filter6(exports22, (m2) => isNamespaceMember(m2) && isIdentifierText(
|
|
104119
104119
|
m2.escapedName,
|
|
104120
104120
|
99
|
|
104121
104121
|
/* ESNext */
|
|
@@ -104158,7 +104158,7 @@ ${lanes.join("\n")}
|
|
|
104158
104158
|
void 0,
|
|
104159
104159
|
/*isTypeOnly*/
|
|
104160
104160
|
false,
|
|
104161
|
-
factory.createNamedExports(mapDefined(
|
|
104161
|
+
factory.createNamedExports(mapDefined(filter6(
|
|
104162
104162
|
mergedMembers,
|
|
104163
104163
|
(n) => n.escapedName !== "export="
|
|
104164
104164
|
/* ExportEquals */
|
|
@@ -104204,7 +104204,7 @@ ${lanes.join("\n")}
|
|
|
104204
104204
|
const internalSymbolName = getInternalSymbolName(symbol2, symbolName2);
|
|
104205
104205
|
context.approximateLength += 9 + internalSymbolName.length;
|
|
104206
104206
|
const members = [];
|
|
104207
|
-
const memberProps =
|
|
104207
|
+
const memberProps = filter6(getPropertiesOfType(getTypeOfSymbol(symbol2)), (p) => !!(p.flags & 8));
|
|
104208
104208
|
let i2 = 0;
|
|
104209
104209
|
for (const p of memberProps) {
|
|
104210
104210
|
i2++;
|
|
@@ -104262,7 +104262,7 @@ ${lanes.join("\n")}
|
|
|
104262
104262
|
addResult(setTextRange2(context, decl, getSignatureTextRangeLocation(sig)), modifierFlags);
|
|
104263
104263
|
}
|
|
104264
104264
|
if (!(symbol2.flags & (512 | 1024) && !!symbol2.exports && !!symbol2.exports.size)) {
|
|
104265
|
-
const props =
|
|
104265
|
+
const props = filter6(getPropertiesOfType(type), isNamespaceMember);
|
|
104266
104266
|
context.approximateLength += localName.length;
|
|
104267
104267
|
serializeAsNamespaceDeclaration(
|
|
104268
104268
|
props,
|
|
@@ -104425,10 +104425,10 @@ ${lanes.join("\n")}
|
|
|
104425
104425
|
...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119, implementsExpressions)]
|
|
104426
104426
|
];
|
|
104427
104427
|
const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType));
|
|
104428
|
-
const publicSymbolProps =
|
|
104428
|
+
const publicSymbolProps = filter6(symbolProps, (s2) => !isHashPrivate(s2));
|
|
104429
104429
|
const hasPrivateIdentifier = some(symbolProps, isHashPrivate);
|
|
104430
104430
|
const privateProperties = hasPrivateIdentifier ? isExpanding(context) ? serializePropertySymbolsForClassOrInterface(
|
|
104431
|
-
|
|
104431
|
+
filter6(symbolProps, isHashPrivate),
|
|
104432
104432
|
/*isClass*/
|
|
104433
104433
|
true,
|
|
104434
104434
|
baseTypes[0],
|
|
@@ -104457,7 +104457,7 @@ ${lanes.join("\n")}
|
|
|
104457
104457
|
false
|
|
104458
104458
|
);
|
|
104459
104459
|
const staticMembers = serializePropertySymbolsForClassOrInterface(
|
|
104460
|
-
|
|
104460
|
+
filter6(getPropertiesOfType(staticType), (p) => !(p.flags & 4194304) && p.escapedName !== "prototype" && !isNamespaceMember(p)),
|
|
104461
104461
|
/*isClass*/
|
|
104462
104462
|
true,
|
|
104463
104463
|
staticBaseType,
|
|
@@ -104498,7 +104498,7 @@ ${lanes.join("\n")}
|
|
|
104498
104498
|
heritageClauses,
|
|
104499
104499
|
[...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties]
|
|
104500
104500
|
),
|
|
104501
|
-
symbol2.declarations &&
|
|
104501
|
+
symbol2.declarations && filter6(symbol2.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]
|
|
104502
104502
|
),
|
|
104503
104503
|
modifierFlags
|
|
104504
104504
|
);
|
|
@@ -104929,7 +104929,7 @@ ${lanes.join("\n")}
|
|
|
104929
104929
|
const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
|
|
104930
104930
|
return getObjectFlags(typeToSerialize) & (16 | 32) && !some((_a22 = typeToSerialize.symbol) == null ? void 0 : _a22.declarations, isTypeNode) && // If the type comes straight from a type node, we shouldn't try to break it up
|
|
104931
104931
|
!length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
|
|
104932
|
-
!!(length(
|
|
104932
|
+
!!(length(filter6(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(
|
|
104933
104933
|
typeToSerialize,
|
|
104934
104934
|
0
|
|
104935
104935
|
/* Call */
|
|
@@ -106071,7 +106071,7 @@ ${lanes.join("\n")}
|
|
|
106071
106071
|
isOptional
|
|
106072
106072
|
);
|
|
106073
106073
|
} else {
|
|
106074
|
-
const staticBlocks =
|
|
106074
|
+
const staticBlocks = filter6(declaration.parent.members, isClassStaticBlockDeclaration);
|
|
106075
106075
|
const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0;
|
|
106076
106076
|
return type && addOptionality(
|
|
106077
106077
|
type,
|
|
@@ -107164,7 +107164,7 @@ ${lanes.join("\n")}
|
|
|
107164
107164
|
function getConstructorsForTypeArguments(type, typeArgumentNodes, location) {
|
|
107165
107165
|
const typeArgCount = length(typeArgumentNodes);
|
|
107166
107166
|
const isJavascript = isInJSFile(location);
|
|
107167
|
-
return
|
|
107167
|
+
return filter6(getSignaturesOfType(
|
|
107168
107168
|
type,
|
|
107169
107169
|
1
|
|
107170
107170
|
/* Construct */
|
|
@@ -107920,7 +107920,7 @@ ${lanes.join("\n")}
|
|
|
107920
107920
|
/* Construct */
|
|
107921
107921
|
));
|
|
107922
107922
|
const inheritedIndexInfos = instantiatedBaseType !== anyType2 ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo];
|
|
107923
|
-
indexInfos = concatenate(indexInfos,
|
|
107923
|
+
indexInfos = concatenate(indexInfos, filter6(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType)));
|
|
107924
107924
|
}
|
|
107925
107925
|
}
|
|
107926
107926
|
setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
|
|
@@ -110260,7 +110260,7 @@ ${lanes.join("\n")}
|
|
|
110260
110260
|
}
|
|
110261
110261
|
}
|
|
110262
110262
|
}
|
|
110263
|
-
const allPropertySymbols = concatenate(computedPropertySymbols,
|
|
110263
|
+
const allPropertySymbols = concatenate(computedPropertySymbols, filter6(siblingSymbols, (s2) => s2 !== indexSymbol));
|
|
110264
110264
|
if (hasComputedStringProperty && !findIndexInfo(indexInfos, stringType2)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedStringProperty, 0, allPropertySymbols, stringType2));
|
|
110265
110265
|
if (hasComputedNumberProperty && !findIndexInfo(indexInfos, numberType2)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedNumberProperty, 0, allPropertySymbols, numberType2));
|
|
110266
110266
|
if (hasComputedSymbolProperty && !findIndexInfo(indexInfos, esSymbolType)) indexInfos.push(getObjectLiteralIndexInfo(readonlyComputedSymbolProperty, 0, allPropertySymbols, esSymbolType));
|
|
@@ -110272,7 +110272,7 @@ ${lanes.join("\n")}
|
|
|
110272
110272
|
return !!(type.flags & (4 | 8 | 4096)) || isPatternLiteralType(type) || !!(type.flags & 2097152) && !isGenericType(type) && some(type.types, isValidIndexKeyType);
|
|
110273
110273
|
}
|
|
110274
110274
|
function getConstraintDeclaration(type) {
|
|
110275
|
-
return mapDefined(
|
|
110275
|
+
return mapDefined(filter6(type.symbol && type.symbol.declarations, isTypeParameterDeclaration), getEffectiveConstraintOfTypeParameter)[0];
|
|
110276
110276
|
}
|
|
110277
110277
|
function getInferredTypeParameterConstraint(typeParameter, omitTypeReferences) {
|
|
110278
110278
|
var _a2;
|
|
@@ -111699,7 +111699,7 @@ ${lanes.join("\n")}
|
|
|
111699
111699
|
}
|
|
111700
111700
|
}
|
|
111701
111701
|
function removeStringLiteralsMatchedByTemplateLiterals(types3) {
|
|
111702
|
-
const templates =
|
|
111702
|
+
const templates = filter6(types3, isPatternLiteralType);
|
|
111703
111703
|
if (templates.length) {
|
|
111704
111704
|
let i2 = types3.length;
|
|
111705
111705
|
while (i2 > 0) {
|
|
@@ -111984,7 +111984,7 @@ ${lanes.join("\n")}
|
|
|
111984
111984
|
}
|
|
111985
111985
|
function extractRedundantTemplateLiterals(types3) {
|
|
111986
111986
|
let i2 = types3.length;
|
|
111987
|
-
const literals =
|
|
111987
|
+
const literals = filter6(types3, (t2) => !!(t2.flags & 128));
|
|
111988
111988
|
while (i2 > 0) {
|
|
111989
111989
|
i2--;
|
|
111990
111990
|
const t2 = types3[i2];
|
|
@@ -113129,7 +113129,7 @@ ${lanes.join("\n")}
|
|
|
113129
113129
|
/*includeThisTypes*/
|
|
113130
113130
|
true
|
|
113131
113131
|
);
|
|
113132
|
-
const outerTypeParameters = aliasTypeArguments ? allOuterTypeParameters :
|
|
113132
|
+
const outerTypeParameters = aliasTypeArguments ? allOuterTypeParameters : filter6(allOuterTypeParameters, (tp) => isTypeParameterPossiblyReferenced(tp, node));
|
|
113133
113133
|
const root = {
|
|
113134
113134
|
node,
|
|
113135
113135
|
checkType,
|
|
@@ -113836,7 +113836,7 @@ ${lanes.join("\n")}
|
|
|
113836
113836
|
}
|
|
113837
113837
|
typeParameters = outerTypeParameters || emptyArray;
|
|
113838
113838
|
const allDeclarations = type.objectFlags & (4 | 8388608) ? [declaration] : type.symbol.declarations;
|
|
113839
|
-
typeParameters = (target.objectFlags & (4 | 8388608) || target.symbol.flags & 8192 || target.symbol.flags & 2048) && !target.aliasTypeArguments ?
|
|
113839
|
+
typeParameters = (target.objectFlags & (4 | 8388608) || target.symbol.flags & 8192 || target.symbol.flags & 2048) && !target.aliasTypeArguments ? filter6(typeParameters, (tp) => some(allDeclarations, (d) => isTypeParameterPossiblyReferenced(tp, d))) : typeParameters;
|
|
113840
113840
|
links.outerTypeParameters = typeParameters;
|
|
113841
113841
|
}
|
|
113842
113842
|
if (typeParameters.length) {
|
|
@@ -118926,7 +118926,7 @@ ${lanes.join("\n")}
|
|
|
118926
118926
|
};
|
|
118927
118927
|
}
|
|
118928
118928
|
function cloneInferredPartOfContext(context) {
|
|
118929
|
-
const inferences =
|
|
118929
|
+
const inferences = filter6(context.inferences, hasInferenceCandidates);
|
|
118930
118930
|
return inferences.length ? createInferenceContextWorker(map32(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0;
|
|
118931
118931
|
}
|
|
118932
118932
|
function getMapperFromContext(context) {
|
|
@@ -119500,8 +119500,8 @@ ${lanes.join("\n")}
|
|
|
119500
119500
|
}
|
|
119501
119501
|
}
|
|
119502
119502
|
return [
|
|
119503
|
-
matchedSources ?
|
|
119504
|
-
matchedTargets ?
|
|
119503
|
+
matchedSources ? filter6(sources, (t2) => !contains(matchedSources, t2)) : sources,
|
|
119504
|
+
matchedTargets ? filter6(targets, (t2) => !contains(matchedTargets, t2)) : targets
|
|
119505
119505
|
];
|
|
119506
119506
|
}
|
|
119507
119507
|
function inferFromTypeArguments(sourceTypes, targetTypes, variances) {
|
|
@@ -119927,14 +119927,14 @@ ${lanes.join("\n")}
|
|
|
119927
119927
|
}
|
|
119928
119928
|
function unionObjectAndArrayLiteralCandidates(candidates) {
|
|
119929
119929
|
if (candidates.length > 1) {
|
|
119930
|
-
const objectLiterals =
|
|
119930
|
+
const objectLiterals = filter6(candidates, isObjectOrArrayLiteralType);
|
|
119931
119931
|
if (objectLiterals.length) {
|
|
119932
119932
|
const literalsType = getUnionType(
|
|
119933
119933
|
objectLiterals,
|
|
119934
119934
|
2
|
|
119935
119935
|
/* Subtype */
|
|
119936
119936
|
);
|
|
119937
|
-
return concatenate(
|
|
119937
|
+
return concatenate(filter6(candidates, (t2) => !isObjectOrArrayLiteralType(t2)), [literalsType]);
|
|
119938
119938
|
}
|
|
119939
119939
|
}
|
|
119940
119940
|
return candidates;
|
|
@@ -120674,7 +120674,7 @@ ${lanes.join("\n")}
|
|
|
120674
120674
|
function filterType(type, f3) {
|
|
120675
120675
|
if (type.flags & 1048576) {
|
|
120676
120676
|
const types3 = type.types;
|
|
120677
|
-
const filtered =
|
|
120677
|
+
const filtered = filter6(types3, f3);
|
|
120678
120678
|
if (filtered === types3) {
|
|
120679
120679
|
return type;
|
|
120680
120680
|
}
|
|
@@ -120682,7 +120682,7 @@ ${lanes.join("\n")}
|
|
|
120682
120682
|
let newOrigin;
|
|
120683
120683
|
if (origin && origin.flags & 1048576) {
|
|
120684
120684
|
const originTypes = origin.types;
|
|
120685
|
-
const originFiltered =
|
|
120685
|
+
const originFiltered = filter6(originTypes, (t2) => !!(t2.flags & 1048576) || f3(t2));
|
|
120686
120686
|
if (originTypes.length - originFiltered.length === types3.length - filtered.length) {
|
|
120687
120687
|
if (originFiltered.length === 1) {
|
|
120688
120688
|
return originFiltered[0];
|
|
@@ -124325,7 +124325,7 @@ ${lanes.join("\n")}
|
|
|
124325
124325
|
contextualType,
|
|
124326
124326
|
concatenate(
|
|
124327
124327
|
map32(
|
|
124328
|
-
|
|
124328
|
+
filter6(node.properties, (p) => {
|
|
124329
124329
|
if (!p.symbol) {
|
|
124330
124330
|
return false;
|
|
124331
124331
|
}
|
|
@@ -124340,7 +124340,7 @@ ${lanes.join("\n")}
|
|
|
124340
124340
|
(prop) => [() => getContextFreeTypeOfExpression(prop.kind === 304 ? prop.initializer : prop.name), prop.symbol.escapedName]
|
|
124341
124341
|
),
|
|
124342
124342
|
map32(
|
|
124343
|
-
|
|
124343
|
+
filter6(getPropertiesOfType(contextualType), (s2) => {
|
|
124344
124344
|
var _a2;
|
|
124345
124345
|
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);
|
|
124346
124346
|
}),
|
|
@@ -124362,11 +124362,11 @@ ${lanes.join("\n")}
|
|
|
124362
124362
|
contextualType,
|
|
124363
124363
|
concatenate(
|
|
124364
124364
|
map32(
|
|
124365
|
-
|
|
124365
|
+
filter6(node.properties, (p) => !!p.symbol && p.kind === 292 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))),
|
|
124366
124366
|
(prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName]
|
|
124367
124367
|
),
|
|
124368
124368
|
map32(
|
|
124369
|
-
|
|
124369
|
+
filter6(getPropertiesOfType(contextualType), (s2) => {
|
|
124370
124370
|
var _a2;
|
|
124371
124371
|
if (!(s2.flags & 16777216) || !((_a2 = node == null ? void 0 : node.symbol) == null ? void 0 : _a2.members)) {
|
|
124372
124372
|
return false;
|
|
@@ -124807,7 +124807,7 @@ ${lanes.join("\n")}
|
|
|
124807
124807
|
0
|
|
124808
124808
|
/* Call */
|
|
124809
124809
|
);
|
|
124810
|
-
const applicableByArity =
|
|
124810
|
+
const applicableByArity = filter6(signatures, (s2) => !isAritySmaller(s2, node));
|
|
124811
124811
|
return applicableByArity.length === 1 ? applicableByArity[0] : getIntersectedSignatures(applicableByArity);
|
|
124812
124812
|
}
|
|
124813
124813
|
function isAritySmaller(signature, target) {
|
|
@@ -126623,7 +126623,7 @@ ${lanes.join("\n")}
|
|
|
126623
126623
|
if (typeof name2 !== "string") {
|
|
126624
126624
|
const parent2 = name2.parent;
|
|
126625
126625
|
if (isPropertyAccessExpression(parent2)) {
|
|
126626
|
-
props =
|
|
126626
|
+
props = filter6(props, (prop) => isValidPropertyAccessForCompletions(parent2, containingType, prop));
|
|
126627
126627
|
}
|
|
126628
126628
|
name2 = idText(name2);
|
|
126629
126629
|
}
|
|
@@ -127943,7 +127943,7 @@ ${lanes.join("\n")}
|
|
|
127943
127943
|
headMessage
|
|
127944
127944
|
);
|
|
127945
127945
|
} else if (!isJsxOpenFragment) {
|
|
127946
|
-
const signaturesWithCorrectTypeArgumentArity =
|
|
127946
|
+
const signaturesWithCorrectTypeArgumentArity = filter6(signatures, (s2) => hasCorrectTypeArgumentArity(s2, typeArguments));
|
|
127947
127947
|
if (signaturesWithCorrectTypeArgumentArity.length === 0) {
|
|
127948
127948
|
diagnostics.add(getTypeArgumentArityError(node, signatures, typeArguments, headMessage));
|
|
127949
127949
|
} else {
|
|
@@ -129394,7 +129394,7 @@ ${lanes.join("\n")}
|
|
|
129394
129394
|
}
|
|
129395
129395
|
}
|
|
129396
129396
|
function getInstantiatedSignatures(signatures) {
|
|
129397
|
-
const applicableSignatures =
|
|
129397
|
+
const applicableSignatures = filter6(signatures, (sig) => !!sig.typeParameters && hasCorrectTypeArgumentArity(sig, typeArguments));
|
|
129398
129398
|
return sameMap(applicableSignatures, (sig) => {
|
|
129399
129399
|
const typeArgumentTypes = checkTypeArguments(
|
|
129400
129400
|
sig,
|
|
@@ -133872,7 +133872,7 @@ ${lanes.join("\n")}
|
|
|
133872
133872
|
});
|
|
133873
133873
|
}
|
|
133874
133874
|
if (hasNonAmbientClass && !isConstructor && symbol2.flags & 16 && declarations) {
|
|
133875
|
-
const relatedDiagnostics =
|
|
133875
|
+
const relatedDiagnostics = filter6(
|
|
133876
133876
|
declarations,
|
|
133877
133877
|
(d) => d.kind === 264
|
|
133878
133878
|
/* ClassDeclaration */
|
|
@@ -135765,7 +135765,7 @@ ${lanes.join("\n")}
|
|
|
135765
135765
|
if (use & 4) {
|
|
135766
135766
|
if (arrayType2.flags & 1048576) {
|
|
135767
135767
|
const arrayTypes = inputType.types;
|
|
135768
|
-
const filteredTypes =
|
|
135768
|
+
const filteredTypes = filter6(arrayTypes, (t2) => !(t2.flags & 402653316));
|
|
135769
135769
|
if (filteredTypes !== arrayTypes) {
|
|
135770
135770
|
arrayType2 = getUnionType(
|
|
135771
135771
|
filteredTypes,
|
|
@@ -136076,7 +136076,7 @@ ${lanes.join("\n")}
|
|
|
136076
136076
|
0
|
|
136077
136077
|
/* Call */
|
|
136078
136078
|
) : void 0;
|
|
136079
|
-
const validSignatures =
|
|
136079
|
+
const validSignatures = filter6(allSignatures, (sig) => getMinArgumentCount(sig) === 0);
|
|
136080
136080
|
if (!some(validSignatures)) {
|
|
136081
136081
|
if (errorNode && some(allSignatures)) {
|
|
136082
136082
|
checkTypeAssignableTo(
|
|
@@ -136660,7 +136660,7 @@ ${lanes.join("\n")}
|
|
|
136660
136660
|
}
|
|
136661
136661
|
}
|
|
136662
136662
|
function checkUnmatchedJSDocParameters(node) {
|
|
136663
|
-
const jsdocParameters =
|
|
136663
|
+
const jsdocParameters = filter6(getJSDocTags(node), isJSDocParameterTag);
|
|
136664
136664
|
if (!length(jsdocParameters)) return;
|
|
136665
136665
|
const isJs = isInJSFile(node);
|
|
136666
136666
|
const parameters = /* @__PURE__ */ new Set();
|
|
@@ -137219,7 +137219,7 @@ ${lanes.join("\n")}
|
|
|
137219
137219
|
return getCheckFlags(s2) & 1 ? s2.links.target : s2;
|
|
137220
137220
|
}
|
|
137221
137221
|
function getClassOrInterfaceDeclarationsOfSymbol(symbol2) {
|
|
137222
|
-
return
|
|
137222
|
+
return filter6(
|
|
137223
137223
|
symbol2.declarations,
|
|
137224
137224
|
(d) => d.kind === 264 || d.kind === 265
|
|
137225
137225
|
/* InterfaceDeclaration */
|
|
@@ -139610,7 +139610,7 @@ ${lanes.join("\n")}
|
|
|
139610
139610
|
const keyType = getLiteralTypeFromPropertyName(node);
|
|
139611
139611
|
const objectType2 = getTypeOfExpression(node.parent.expression);
|
|
139612
139612
|
const objectTypes = objectType2.flags & 1048576 ? objectType2.types : [objectType2];
|
|
139613
|
-
return flatMap(objectTypes, (t2) =>
|
|
139613
|
+
return flatMap(objectTypes, (t2) => filter6(getIndexInfosOfType(t2), (info) => isApplicableIndexType(keyType, info.keyType)));
|
|
139614
139614
|
}
|
|
139615
139615
|
return void 0;
|
|
139616
139616
|
}
|
|
@@ -140495,7 +140495,7 @@ ${lanes.join("\n")}
|
|
|
140495
140495
|
if (reference) {
|
|
140496
140496
|
const symbol2 = getReferencedValueSymbol(reference);
|
|
140497
140497
|
if (symbol2) {
|
|
140498
|
-
return
|
|
140498
|
+
return filter6(getExportSymbolOfValueSymbolIfExported(symbol2).declarations, (declaration) => {
|
|
140499
140499
|
switch (declaration.kind) {
|
|
140500
140500
|
case 261:
|
|
140501
140501
|
case 170:
|
|
@@ -140690,7 +140690,7 @@ ${lanes.join("\n")}
|
|
|
140690
140690
|
)) == null ? void 0 : _a2.accessibility) === 0);
|
|
140691
140691
|
});
|
|
140692
140692
|
if (allComponentComputedNamesSerializable) {
|
|
140693
|
-
const newComponents =
|
|
140693
|
+
const newComponents = filter6(info.components, (e2) => {
|
|
140694
140694
|
return !hasLateBindableName(e2);
|
|
140695
140695
|
});
|
|
140696
140696
|
result.push(...map32(newComponents, (e2) => {
|
|
@@ -141536,7 +141536,7 @@ ${lanes.join("\n")}
|
|
|
141536
141536
|
}
|
|
141537
141537
|
}
|
|
141538
141538
|
function getNonSimpleParameters(parameters) {
|
|
141539
|
-
return
|
|
141539
|
+
return filter6(parameters, (parameter) => !!parameter.initializer || isBindingPattern(parameter.name) || isRestParameter(parameter));
|
|
141540
141540
|
}
|
|
141541
141541
|
function checkGrammarForUseStrictSimpleParameterList(node) {
|
|
141542
141542
|
if (languageVersion >= 3) {
|
|
@@ -145507,13 +145507,13 @@ ${lanes.join("\n")}
|
|
|
145507
145507
|
return indices;
|
|
145508
145508
|
}
|
|
145509
145509
|
function getProperties(node, requireInitializer, isStatic2) {
|
|
145510
|
-
return
|
|
145510
|
+
return filter6(node.members, (m2) => isInitializedOrStaticProperty(m2, requireInitializer, isStatic2));
|
|
145511
145511
|
}
|
|
145512
145512
|
function isStaticPropertyDeclarationOrClassStaticBlockDeclaration(element) {
|
|
145513
145513
|
return isStaticPropertyDeclaration(element) || isClassStaticBlockDeclaration(element);
|
|
145514
145514
|
}
|
|
145515
145515
|
function getStaticPropertiesAndClassStaticBlock(node) {
|
|
145516
|
-
return
|
|
145516
|
+
return filter6(node.members, isStaticPropertyDeclarationOrClassStaticBlockDeclaration);
|
|
145517
145517
|
}
|
|
145518
145518
|
function isInitializedOrStaticProperty(member, requireInitializer, isStatic2) {
|
|
145519
145519
|
return isPropertyDeclaration(member) && (!!member.initializer || !requireInitializer) && hasStaticModifier(member) === isStatic2;
|
|
@@ -147025,7 +147025,7 @@ ${lanes.join("\n")}
|
|
|
147025
147025
|
const members = visitNodes2(node.members, getClassElementVisitor(node), isClassElement);
|
|
147026
147026
|
let newMembers;
|
|
147027
147027
|
const constructor = getFirstConstructorWithBody(node);
|
|
147028
|
-
const parametersWithPropertyAssignments = constructor &&
|
|
147028
|
+
const parametersWithPropertyAssignments = constructor && filter6(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));
|
|
147029
147029
|
if (parametersWithPropertyAssignments) {
|
|
147030
147030
|
for (const parameter of parametersWithPropertyAssignments) {
|
|
147031
147031
|
const parameterProperty = factory2.createPropertyDeclaration(
|
|
@@ -147058,9 +147058,9 @@ ${lanes.join("\n")}
|
|
|
147058
147058
|
if (some(metadata)) {
|
|
147059
147059
|
const modifiersArray = [];
|
|
147060
147060
|
addRange(modifiersArray, takeWhile(modifiers, isExportOrDefaultModifier));
|
|
147061
|
-
addRange(modifiersArray,
|
|
147061
|
+
addRange(modifiersArray, filter6(modifiers, isDecorator));
|
|
147062
147062
|
addRange(modifiersArray, metadata);
|
|
147063
|
-
addRange(modifiersArray,
|
|
147063
|
+
addRange(modifiersArray, filter6(skipWhile(modifiers, isExportOrDefaultModifier), isModifier));
|
|
147064
147064
|
modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers);
|
|
147065
147065
|
}
|
|
147066
147066
|
return modifiers;
|
|
@@ -147070,9 +147070,9 @@ ${lanes.join("\n")}
|
|
|
147070
147070
|
const metadata = getTypeMetadata(node, container);
|
|
147071
147071
|
if (some(metadata)) {
|
|
147072
147072
|
const modifiersArray = [];
|
|
147073
|
-
addRange(modifiersArray,
|
|
147073
|
+
addRange(modifiersArray, filter6(modifiers, isDecorator));
|
|
147074
147074
|
addRange(modifiersArray, metadata);
|
|
147075
|
-
addRange(modifiersArray,
|
|
147075
|
+
addRange(modifiersArray, filter6(modifiers, isModifier));
|
|
147076
147076
|
modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers);
|
|
147077
147077
|
}
|
|
147078
147078
|
}
|
|
@@ -147306,7 +147306,7 @@ ${lanes.join("\n")}
|
|
|
147306
147306
|
addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1));
|
|
147307
147307
|
}
|
|
147308
147308
|
function transformConstructorBody(body, constructor) {
|
|
147309
|
-
const parametersWithPropertyAssignments = constructor &&
|
|
147309
|
+
const parametersWithPropertyAssignments = constructor && filter6(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor));
|
|
147310
147310
|
if (!some(parametersWithPropertyAssignments)) {
|
|
147311
147311
|
return visitFunctionBody(body, visitor, context);
|
|
147312
147312
|
}
|
|
@@ -148738,7 +148738,7 @@ ${lanes.join("\n")}
|
|
|
148738
148738
|
factory2.createAssignment(
|
|
148739
148739
|
functionName,
|
|
148740
148740
|
factory2.createFunctionExpression(
|
|
148741
|
-
|
|
148741
|
+
filter6(node.modifiers, (m2) => isModifier(m2) && !isStaticModifier(m2) && !isAccessorModifier(m2)),
|
|
148742
148742
|
node.asteriskToken,
|
|
148743
148743
|
functionName,
|
|
148744
148744
|
/*typeParameters*/
|
|
@@ -149386,7 +149386,7 @@ ${lanes.join("\n")}
|
|
|
149386
149386
|
}
|
|
149387
149387
|
}
|
|
149388
149388
|
function getPrivateInstanceMethodsAndAccessors(node) {
|
|
149389
|
-
return
|
|
149389
|
+
return filter6(node.members, isNonStaticMethodOrAccessorWithPrivateName);
|
|
149390
149390
|
}
|
|
149391
149391
|
function getClassFacts(node) {
|
|
149392
149392
|
var _a2;
|
|
@@ -149800,7 +149800,7 @@ ${lanes.join("\n")}
|
|
|
149800
149800
|
membersArray = append(membersArray, classNamedEvaluationHelperBlock);
|
|
149801
149801
|
membersArray = append(membersArray, syntheticConstructor);
|
|
149802
149802
|
membersArray = append(membersArray, syntheticStaticBlock);
|
|
149803
|
-
const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ?
|
|
149803
|
+
const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter6(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members;
|
|
149804
149804
|
membersArray = addRange(membersArray, remainingMembers);
|
|
149805
149805
|
members = setTextRange(
|
|
149806
149806
|
factory2.createNodeArray(membersArray),
|
|
@@ -149912,7 +149912,7 @@ ${lanes.join("\n")}
|
|
|
149912
149912
|
);
|
|
149913
149913
|
let properties = instanceProperties;
|
|
149914
149914
|
if (!useDefineForClassFields) {
|
|
149915
|
-
properties =
|
|
149915
|
+
properties = filter6(properties, (property) => !!property.initializer || isPrivateIdentifier(property.name) || hasAccessorModifier(property));
|
|
149916
149916
|
}
|
|
149917
149917
|
const privateMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node);
|
|
149918
149918
|
const needsConstructorBody = some(properties) || some(privateMethodsAndAccessors);
|
|
@@ -149932,8 +149932,8 @@ ${lanes.join("\n")}
|
|
|
149932
149932
|
const receiver = factory2.createThis();
|
|
149933
149933
|
addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver);
|
|
149934
149934
|
if (constructor) {
|
|
149935
|
-
const parameterProperties =
|
|
149936
|
-
const nonParameterProperties =
|
|
149935
|
+
const parameterProperties = filter6(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor));
|
|
149936
|
+
const nonParameterProperties = filter6(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor));
|
|
149937
149937
|
addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver);
|
|
149938
149938
|
addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver);
|
|
149939
149939
|
} else {
|
|
@@ -151470,7 +151470,7 @@ ${lanes.join("\n")}
|
|
|
151470
151470
|
) && isStaticElement === isStatic(member);
|
|
151471
151471
|
}
|
|
151472
151472
|
function getDecoratedClassElements(node, isStatic2) {
|
|
151473
|
-
return
|
|
151473
|
+
return filter6(node.members, (m2) => isDecoratedClassElement(m2, isStatic2, node));
|
|
151474
151474
|
}
|
|
151475
151475
|
function generateClassElementDecorationExpressions(node, isStatic2) {
|
|
151476
151476
|
const members = getDecoratedClassElements(node, isStatic2);
|
|
@@ -157335,7 +157335,7 @@ ${lanes.join("\n")}
|
|
|
157335
157335
|
const tagName = getTagName(node);
|
|
157336
157336
|
const childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : void 0;
|
|
157337
157337
|
const keyAttr = find(node.attributes.properties, (p) => !!p.name && isIdentifier(p.name) && p.name.escapedText === "key");
|
|
157338
|
-
const attrs = keyAttr ?
|
|
157338
|
+
const attrs = keyAttr ? filter6(node.attributes.properties, (p) => p !== keyAttr) : node.attributes.properties;
|
|
157339
157339
|
const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) : factory2.createObjectLiteralExpression(childrenProp ? [childrenProp] : emptyArray);
|
|
157340
157340
|
return visitJsxOpeningLikeElementOrFragmentJSX(
|
|
157341
157341
|
tagName,
|
|
@@ -161254,8 +161254,8 @@ ${lanes.join("\n")}
|
|
|
161254
161254
|
convertedLoopState = void 0;
|
|
161255
161255
|
const bodyStatements = visitNodes2(body.statements, classWrapperStatementVisitor, isStatement);
|
|
161256
161256
|
convertedLoopState = savedConvertedLoopState;
|
|
161257
|
-
const classStatements =
|
|
161258
|
-
const remainingStatements =
|
|
161257
|
+
const classStatements = filter6(bodyStatements, isVariableStatementWithInitializer);
|
|
161258
|
+
const remainingStatements = filter6(bodyStatements, (stmt) => !isVariableStatementWithInitializer(stmt));
|
|
161259
161259
|
const varStatement = cast(first2(classStatements), isVariableStatement);
|
|
161260
161260
|
const variable = varStatement.declarationList.declarations[0];
|
|
161261
161261
|
const initializer3 = skipOuterExpressions(variable.initializer);
|
|
@@ -168185,7 +168185,7 @@ ${lanes.join("\n")}
|
|
|
168185
168185
|
}
|
|
168186
168186
|
function getDeclarationDiagnostics(host, resolver, file2) {
|
|
168187
168187
|
const compilerOptions = host.getCompilerOptions();
|
|
168188
|
-
const files =
|
|
168188
|
+
const files = filter6(getSourceFilesToEmit(host, file2), isSourceFileNotJson);
|
|
168189
168189
|
return contains(files, file2) ? transformNodes(
|
|
168190
168190
|
resolver,
|
|
168191
168191
|
host,
|
|
@@ -168346,7 +168346,7 @@ ${lanes.join("\n")}
|
|
|
168346
168346
|
function reportNonlocalAugmentation(containingFile, parentSymbol, symbol2) {
|
|
168347
168347
|
var _a2;
|
|
168348
168348
|
const primaryDeclaration = (_a2 = parentSymbol.declarations) == null ? void 0 : _a2.find((d) => getSourceFileOfNode(d) === containingFile);
|
|
168349
|
-
const augmentingDeclarations =
|
|
168349
|
+
const augmentingDeclarations = filter6(symbol2.declarations, (d) => getSourceFileOfNode(d) !== containingFile);
|
|
168350
168350
|
if (primaryDeclaration && augmentingDeclarations) {
|
|
168351
168351
|
for (const augmentations of augmentingDeclarations) {
|
|
168352
168352
|
context.addDiagnostic(addRelatedInfo(
|
|
@@ -169675,7 +169675,7 @@ ${lanes.join("\n")}
|
|
|
169675
169675
|
getSymbolAccessibilityDiagnostic = oldDiag2;
|
|
169676
169676
|
return newClause;
|
|
169677
169677
|
}
|
|
169678
|
-
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(
|
|
169678
|
+
return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter6(
|
|
169679
169679
|
clause.types,
|
|
169680
169680
|
(t2) => isEntityNameExpression(t2.expression) || t2.expression.kind === 106
|
|
169681
169681
|
/* NullKeyword */
|
|
@@ -169832,11 +169832,11 @@ ${lanes.join("\n")}
|
|
|
169832
169832
|
return maskModifierFlags(node, mask2, additions);
|
|
169833
169833
|
}
|
|
169834
169834
|
function transformHeritageClauses(nodes) {
|
|
169835
|
-
return factory2.createNodeArray(
|
|
169835
|
+
return factory2.createNodeArray(filter6(
|
|
169836
169836
|
map32(nodes, (clause) => factory2.updateHeritageClause(
|
|
169837
169837
|
clause,
|
|
169838
169838
|
visitNodes2(
|
|
169839
|
-
factory2.createNodeArray(
|
|
169839
|
+
factory2.createNodeArray(filter6(clause.types, (t2) => {
|
|
169840
169840
|
return isEntityNameExpression(t2.expression) || clause.token === 96 && t2.expression.kind === 106;
|
|
169841
169841
|
})),
|
|
169842
169842
|
visitDeclarationSubtree,
|
|
@@ -170571,7 +170571,7 @@ ${lanes.join("\n")}
|
|
|
170571
170571
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
170572
170572
|
return getCommonSourceDirectory(
|
|
170573
170573
|
options,
|
|
170574
|
-
() =>
|
|
170574
|
+
() => filter6(fileNames, (file2) => !(options.noEmitForJsFiles && fileExtensionIsOneOf(file2, supportedJSExtensionsFlat)) && !isDeclarationFileName(file2)),
|
|
170575
170575
|
getDirectoryPath(normalizeSlashes(Debug.checkDefined(options.configFilePath))),
|
|
170576
170576
|
createGetCanonicalFileName(!ignoreCase)
|
|
170577
170577
|
);
|
|
@@ -170695,7 +170695,7 @@ ${lanes.join("\n")}
|
|
|
170695
170695
|
emitSkipped = true;
|
|
170696
170696
|
return;
|
|
170697
170697
|
}
|
|
170698
|
-
(isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] :
|
|
170698
|
+
(isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : filter6(sourceFileOrBundle.sourceFiles, isSourceFileNotJson)).forEach(
|
|
170699
170699
|
(sourceFile) => {
|
|
170700
170700
|
if (compilerOptions.noCheck || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) markLinkedReferences(sourceFile);
|
|
170701
170701
|
}
|
|
@@ -170747,7 +170747,7 @@ ${lanes.join("\n")}
|
|
|
170747
170747
|
return;
|
|
170748
170748
|
}
|
|
170749
170749
|
const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
|
|
170750
|
-
const filesForEmit = forceDtsEmit ? sourceFiles :
|
|
170750
|
+
const filesForEmit = forceDtsEmit ? sourceFiles : filter6(sourceFiles, isSourceFileNotJson);
|
|
170751
170751
|
const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
|
|
170752
170752
|
filesForEmit.forEach((sourceFile) => {
|
|
170753
170753
|
if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck || emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) || !canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)) {
|
|
@@ -177580,7 +177580,7 @@ ${lanes.join("\n")}
|
|
|
177580
177580
|
if (commonSourceDirectory !== void 0) {
|
|
177581
177581
|
return commonSourceDirectory;
|
|
177582
177582
|
}
|
|
177583
|
-
const emittedFiles =
|
|
177583
|
+
const emittedFiles = filter6(files, (file2) => sourceFileMayBeEmitted(file2, program2));
|
|
177584
177584
|
commonSourceDirectory = getCommonSourceDirectory(
|
|
177585
177585
|
options,
|
|
177586
177586
|
() => mapDefined(emittedFiles, (file2) => file2.isDeclarationFile ? void 0 : file2.fileName),
|
|
@@ -178177,8 +178177,8 @@ ${lanes.join("\n")}
|
|
|
178177
178177
|
let bindDiagnostics = sourceFile.bindDiagnostics;
|
|
178178
178178
|
let checkDiagnostics = typeChecker2.getDiagnostics(sourceFile, cancellationToken, nodesToCheck);
|
|
178179
178179
|
if (isPlainJs) {
|
|
178180
|
-
bindDiagnostics =
|
|
178181
|
-
checkDiagnostics =
|
|
178180
|
+
bindDiagnostics = filter6(bindDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
178181
|
+
checkDiagnostics = filter6(checkDiagnostics, (d) => plainJSErrors.has(d.code));
|
|
178182
178182
|
}
|
|
178183
178183
|
return getMergedBindAndCheckDiagnostics(
|
|
178184
178184
|
sourceFile,
|
|
@@ -180068,7 +180068,7 @@ ${lanes.join("\n")}
|
|
|
180068
180068
|
return { diagnostics, sourceMaps: void 0, emittedFiles, emitSkipped: true };
|
|
180069
180069
|
}
|
|
180070
180070
|
function filterSemanticDiagnostics(diagnostic, option) {
|
|
180071
|
-
return
|
|
180071
|
+
return filter6(diagnostic, (d) => !d.skippedOn || !option[d.skippedOn]);
|
|
180072
180072
|
}
|
|
180073
180073
|
function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host) {
|
|
180074
180074
|
return {
|
|
@@ -183610,7 +183610,7 @@ ${lanes.join("\n")}
|
|
|
183610
183610
|
);
|
|
183611
183611
|
}
|
|
183612
183612
|
function getFilesInErrorForSummary(diagnostics) {
|
|
183613
|
-
const filesInError =
|
|
183613
|
+
const filesInError = filter6(
|
|
183614
183614
|
diagnostics,
|
|
183615
183615
|
(diagnostic) => diagnostic.category === 1
|
|
183616
183616
|
/* Error */
|
|
@@ -186820,7 +186820,7 @@ ${lanes.join("\n")}
|
|
|
186820
186820
|
return options.pretty;
|
|
186821
186821
|
}
|
|
186822
186822
|
function getOptionsForHelp(commandLine) {
|
|
186823
|
-
return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) :
|
|
186823
|
+
return !!commandLine.options.all ? toSorted(optionDeclarations.concat(tscBuildOption), (a, b) => compareStringsCaseInsensitive(a.name, b.name)) : filter6(optionDeclarations.concat(tscBuildOption), (v) => !!v.showInSimplifiedHelpView);
|
|
186824
186824
|
}
|
|
186825
186825
|
function printVersion(sys2) {
|
|
186826
186826
|
sys2.write(getDiagnosticText(Diagnostics.Version_0, version3) + sys2.newLine);
|
|
@@ -187144,7 +187144,7 @@ ${lanes.join("\n")}
|
|
|
187144
187144
|
output = [...output, ...generateSectionOptionsOutput(
|
|
187145
187145
|
sys2,
|
|
187146
187146
|
getDiagnosticText(Diagnostics.BUILD_OPTIONS),
|
|
187147
|
-
|
|
187147
|
+
filter6(buildOptions, (option) => option !== tscBuildOption),
|
|
187148
187148
|
/*subCategory*/
|
|
187149
187149
|
false,
|
|
187150
187150
|
formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")
|
|
@@ -187158,7 +187158,7 @@ ${lanes.join("\n")}
|
|
|
187158
187158
|
output = [...output, ...generateSectionOptionsOutput(
|
|
187159
187159
|
sys2,
|
|
187160
187160
|
getDiagnosticText(Diagnostics.BUILD_OPTIONS),
|
|
187161
|
-
|
|
187161
|
+
filter6(buildOptions, (option) => option !== tscBuildOption),
|
|
187162
187162
|
/*subCategory*/
|
|
187163
187163
|
false,
|
|
187164
187164
|
formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")
|
|
@@ -191418,7 +191418,7 @@ ${lanes.join("\n")}
|
|
|
191418
191418
|
var _a2;
|
|
191419
191419
|
const decl = isArray(imports) ? imports[0] : imports;
|
|
191420
191420
|
const importKindPredicate = decl.kind === 244 ? isRequireVariableStatement : isAnyImportSyntax;
|
|
191421
|
-
const existingImportStatements =
|
|
191421
|
+
const existingImportStatements = filter6(sourceFile.statements, importKindPredicate);
|
|
191422
191422
|
const { comparer, isSorted } = ts_OrganizeImports_exports.getOrganizeImportsStringComparerWithDetection(existingImportStatements, preferences);
|
|
191423
191423
|
const sortedNewImports = isArray(imports) ? toSorted(imports, (a, b) => ts_OrganizeImports_exports.compareImportsOrRequireStatements(a, b, comparer)) : [imports];
|
|
191424
191424
|
if (!(existingImportStatements == null ? void 0 : existingImportStatements.length)) {
|
|
@@ -196256,7 +196256,7 @@ interface Symbol {
|
|
|
196256
196256
|
}
|
|
196257
196257
|
var commandLineOptionsStringToEnum;
|
|
196258
196258
|
function fixupCompilerOptions(options, diagnostics) {
|
|
196259
|
-
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum ||
|
|
196259
|
+
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || filter6(optionDeclarations, (o) => typeof o.type === "object" && !forEachEntry(o.type, (v) => typeof v !== "number"));
|
|
196260
196260
|
options = cloneCompilerOptions(options);
|
|
196261
196261
|
for (const opt of commandLineOptionsStringToEnum) {
|
|
196262
196262
|
if (!hasProperty(options, opt.name)) {
|
|
@@ -198843,7 +198843,7 @@ interface Symbol {
|
|
|
198843
198843
|
for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {
|
|
198844
198844
|
if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) {
|
|
198845
198845
|
const elements = exportDeclaration.exportClause.elements;
|
|
198846
|
-
const updatedElements =
|
|
198846
|
+
const updatedElements = filter6(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);
|
|
198847
198847
|
if (length(updatedElements) === 0) {
|
|
198848
198848
|
changes.deleteNode(targetFile, exportDeclaration);
|
|
198849
198849
|
removedExports.add(exportDeclaration);
|
|
@@ -203136,7 +203136,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203136
203136
|
if (isGetAccessor(context)) {
|
|
203137
203137
|
if (!this.contextualGetAccessorDocumentationComment) {
|
|
203138
203138
|
this.contextualGetAccessorDocumentationComment = emptyArray;
|
|
203139
|
-
this.contextualGetAccessorDocumentationComment = getDocumentationComment(
|
|
203139
|
+
this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter6(this.declarations, isGetAccessor), checker);
|
|
203140
203140
|
}
|
|
203141
203141
|
if (length(this.contextualGetAccessorDocumentationComment)) {
|
|
203142
203142
|
return this.contextualGetAccessorDocumentationComment;
|
|
@@ -203145,7 +203145,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203145
203145
|
if (isSetAccessor(context)) {
|
|
203146
203146
|
if (!this.contextualSetAccessorDocumentationComment) {
|
|
203147
203147
|
this.contextualSetAccessorDocumentationComment = emptyArray;
|
|
203148
|
-
this.contextualSetAccessorDocumentationComment = getDocumentationComment(
|
|
203148
|
+
this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter6(this.declarations, isSetAccessor), checker);
|
|
203149
203149
|
}
|
|
203150
203150
|
if (length(this.contextualSetAccessorDocumentationComment)) {
|
|
203151
203151
|
return this.contextualSetAccessorDocumentationComment;
|
|
@@ -203166,7 +203166,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203166
203166
|
if (isGetAccessor(context)) {
|
|
203167
203167
|
if (!this.contextualGetAccessorTags) {
|
|
203168
203168
|
this.contextualGetAccessorTags = emptyArray;
|
|
203169
|
-
this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(
|
|
203169
|
+
this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter6(this.declarations, isGetAccessor), checker);
|
|
203170
203170
|
}
|
|
203171
203171
|
if (length(this.contextualGetAccessorTags)) {
|
|
203172
203172
|
return this.contextualGetAccessorTags;
|
|
@@ -203175,7 +203175,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
203175
203175
|
if (isSetAccessor(context)) {
|
|
203176
203176
|
if (!this.contextualSetAccessorTags) {
|
|
203177
203177
|
this.contextualSetAccessorTags = emptyArray;
|
|
203178
|
-
this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(
|
|
203178
|
+
this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter6(this.declarations, isSetAccessor), checker);
|
|
203179
203179
|
}
|
|
203180
203180
|
if (length(this.contextualSetAccessorTags)) {
|
|
203181
203181
|
return this.contextualSetAccessorTags;
|
|
@@ -204859,8 +204859,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
204859
204859
|
}
|
|
204860
204860
|
} else {
|
|
204861
204861
|
for (const pos2 of positions) {
|
|
204862
|
-
const
|
|
204863
|
-
const offset = text.substr(
|
|
204862
|
+
const from18 = pos2 - closeMultiline.length > 0 ? pos2 - closeMultiline.length : 0;
|
|
204863
|
+
const offset = text.substr(from18, closeMultiline.length) === closeMultiline ? closeMultiline.length : 0;
|
|
204864
204864
|
textChanges2.push({
|
|
204865
204865
|
newText: "",
|
|
204866
204866
|
span: {
|
|
@@ -205248,7 +205248,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
205248
205248
|
const symbol2 = contextualType.getProperty(name2);
|
|
205249
205249
|
return symbol2 ? [symbol2] : emptyArray;
|
|
205250
205250
|
}
|
|
205251
|
-
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ?
|
|
205251
|
+
const filteredTypes = isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent) ? filter6(contextualType.types, (t2) => !checker.isTypeInvalidDueToUnionDiscriminant(t2, node.parent)) : contextualType.types;
|
|
205252
205252
|
const discriminatedPropertySymbols = mapDefined(filteredTypes, (t2) => t2.getProperty(name2));
|
|
205253
205253
|
if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) {
|
|
205254
205254
|
const symbol2 = contextualType.getProperty(name2);
|
|
@@ -206045,8 +206045,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
206045
206045
|
function getCallSiteGroupKey(entry) {
|
|
206046
206046
|
return getNodeId(entry.declaration);
|
|
206047
206047
|
}
|
|
206048
|
-
function createCallHierarchyIncomingCall(
|
|
206049
|
-
return { from:
|
|
206048
|
+
function createCallHierarchyIncomingCall(from18, fromSpans) {
|
|
206049
|
+
return { from: from18, fromSpans };
|
|
206050
206050
|
}
|
|
206051
206051
|
function convertCallSiteGroupToIncomingCall(program2, entries) {
|
|
206052
206052
|
return createCallHierarchyIncomingCall(createCallHierarchyItem(program2, entries[0].declaration), map32(entries, (entry) => createTextSpanFromRange(entry.range)));
|
|
@@ -206056,7 +206056,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
206056
206056
|
return [];
|
|
206057
206057
|
}
|
|
206058
206058
|
const location = getCallHierarchyDeclarationReferenceNode(declaration);
|
|
206059
|
-
const calls =
|
|
206059
|
+
const calls = filter6(ts_FindAllReferences_exports.findReferenceOrRenameEntries(
|
|
206060
206060
|
program2,
|
|
206061
206061
|
cancellationToken,
|
|
206062
206062
|
program2.getSourceFiles(),
|
|
@@ -207563,7 +207563,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
207563
207563
|
}
|
|
207564
207564
|
}
|
|
207565
207565
|
function getModifierKindFromSource(source, kind) {
|
|
207566
|
-
return canHaveModifiers(source) ?
|
|
207566
|
+
return canHaveModifiers(source) ? filter6(source.modifiers, (modifier) => modifier.kind === kind) : void 0;
|
|
207567
207567
|
}
|
|
207568
207568
|
function isConstructorAssignment(x2) {
|
|
207569
207569
|
if (!x2.name) return false;
|
|
@@ -208363,13 +208363,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
208363
208363
|
convertExportsAccesses(sourceFile, exports22, changes);
|
|
208364
208364
|
let moduleExportsChangedToDefault = false;
|
|
208365
208365
|
let useSitesToUnqualify;
|
|
208366
|
-
for (const statement of
|
|
208366
|
+
for (const statement of filter6(sourceFile.statements, isVariableStatement)) {
|
|
208367
208367
|
const newUseSites = convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference);
|
|
208368
208368
|
if (newUseSites) {
|
|
208369
208369
|
copyEntries(newUseSites, useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map()));
|
|
208370
208370
|
}
|
|
208371
208371
|
}
|
|
208372
|
-
for (const statement of
|
|
208372
|
+
for (const statement of filter6(sourceFile.statements, (s2) => !isVariableStatement(s2))) {
|
|
208373
208373
|
const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports22, useSitesToUnqualify, quotePreference);
|
|
208374
208374
|
moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged;
|
|
208375
208375
|
}
|
|
@@ -208948,7 +208948,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
208948
208948
|
exportDeclaration.modifiers,
|
|
208949
208949
|
/*isTypeOnly*/
|
|
208950
208950
|
false,
|
|
208951
|
-
factory.updateNamedExports(exportClause,
|
|
208951
|
+
factory.updateNamedExports(exportClause, filter6(exportClause.elements, (e2) => !contains(typeExportSpecifiers, e2))),
|
|
208952
208952
|
exportDeclaration.moduleSpecifier,
|
|
208953
208953
|
/*attributes*/
|
|
208954
208954
|
void 0
|
|
@@ -208979,7 +208979,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
208979
208979
|
createTextSpanFromNode(exportClause),
|
|
208980
208980
|
context.program.getSemanticDiagnostics(context.sourceFile, context.cancellationToken)
|
|
208981
208981
|
);
|
|
208982
|
-
return
|
|
208982
|
+
return filter6(exportClause.elements, (element) => {
|
|
208983
208983
|
var _a2;
|
|
208984
208984
|
return element === originExportSpecifier || ((_a2 = findDiagnosticForNode(element, diagnostics)) == null ? void 0 : _a2.code) === errorCodes14[0];
|
|
208985
208985
|
});
|
|
@@ -209220,11 +209220,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
209220
209220
|
const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0;
|
|
209221
209221
|
return { leftSibling, rightSibling };
|
|
209222
209222
|
}
|
|
209223
|
-
function findEndOfTextBetween(jsDocComment,
|
|
209224
|
-
const comment = jsDocComment.getText().substring(
|
|
209223
|
+
function findEndOfTextBetween(jsDocComment, from18, to) {
|
|
209224
|
+
const comment = jsDocComment.getText().substring(from18 - jsDocComment.getStart(), to - jsDocComment.getStart());
|
|
209225
209225
|
for (let i2 = comment.length; i2 > 0; i2--) {
|
|
209226
209226
|
if (!/[*/\s]/.test(comment.substring(i2 - 1, i2))) {
|
|
209227
|
-
return
|
|
209227
|
+
return from18 + i2;
|
|
209228
209228
|
}
|
|
209229
209229
|
}
|
|
209230
209230
|
return to;
|
|
@@ -212644,7 +212644,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212644
212644
|
}
|
|
212645
212645
|
}
|
|
212646
212646
|
}
|
|
212647
|
-
return
|
|
212647
|
+
return filter6(targetProps, (targetProp) => isIdentifierText(
|
|
212648
212648
|
targetProp.name,
|
|
212649
212649
|
target,
|
|
212650
212650
|
1
|
|
@@ -212786,7 +212786,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
212786
212786
|
}
|
|
212787
212787
|
const checker = program2.getTypeChecker();
|
|
212788
212788
|
const type = checker.getTypeAtLocation(callExpression.expression);
|
|
212789
|
-
const convertibleSignatureDeclarations =
|
|
212789
|
+
const convertibleSignatureDeclarations = filter6(type.symbol.declarations, isConvertibleSignatureDeclaration);
|
|
212790
212790
|
if (convertibleSignatureDeclarations === void 0) {
|
|
212791
212791
|
return void 0;
|
|
212792
212792
|
}
|
|
@@ -219593,7 +219593,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
219593
219593
|
/* Subtype */
|
|
219594
219594
|
) : type;
|
|
219595
219595
|
if (effectiveType.flags & 1048576) {
|
|
219596
|
-
const functionTypes =
|
|
219596
|
+
const functionTypes = filter6(effectiveType.types, (type2) => checker.getSignaturesOfType(
|
|
219597
219597
|
type2,
|
|
219598
219598
|
0
|
|
219599
219599
|
/* Call */
|
|
@@ -220759,7 +220759,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
220759
220759
|
}
|
|
220760
220760
|
}
|
|
220761
220761
|
} else {
|
|
220762
|
-
symbols.push(...
|
|
220762
|
+
symbols.push(...filter6(getPropertiesForCompletion(type, typeChecker), (s2) => typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, s2)));
|
|
220763
220763
|
}
|
|
220764
220764
|
if (insertAwait && preferences.includeCompletionsWithInsertText) {
|
|
220765
220765
|
const promiseType2 = typeChecker.getPromisedTypeOfPromise(type);
|
|
@@ -221034,7 +221034,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
221034
221034
|
if (detailsEntryId && !some(info, (i2) => detailsEntryId.source === stripQuotes(i2.moduleSymbol.name))) {
|
|
221035
221035
|
return;
|
|
221036
221036
|
}
|
|
221037
|
-
info =
|
|
221037
|
+
info = filter6(info, isImportableExportInfo);
|
|
221038
221038
|
if (!info.length) {
|
|
221039
221039
|
return;
|
|
221040
221040
|
}
|
|
@@ -221295,7 +221295,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
221295
221295
|
const existingMembers = getPropertiesForCompletion(containerActualType, typeChecker);
|
|
221296
221296
|
const existingMemberEscapedNames = /* @__PURE__ */ new Set();
|
|
221297
221297
|
existingMembers.forEach((s2) => existingMemberEscapedNames.add(s2.escapedName));
|
|
221298
|
-
symbols = concatenate(symbols,
|
|
221298
|
+
symbols = concatenate(symbols, filter6(members, (s2) => !existingMemberEscapedNames.has(s2.escapedName)));
|
|
221299
221299
|
completionKind = 0;
|
|
221300
221300
|
isNewIdentifierLocation = true;
|
|
221301
221301
|
return 1;
|
|
@@ -221408,7 +221408,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
221408
221408
|
const importAttributes = contextToken.kind === 19 || contextToken.kind === 28 ? tryCast(contextToken.parent, isImportAttributes) : contextToken.kind === 59 ? tryCast(contextToken.parent.parent, isImportAttributes) : void 0;
|
|
221409
221409
|
if (importAttributes === void 0) return 0;
|
|
221410
221410
|
const existing = new Set(importAttributes.elements.map(getNameFromImportAttribute));
|
|
221411
|
-
symbols =
|
|
221411
|
+
symbols = filter6(typeChecker.getTypeAtLocation(importAttributes).getApparentProperties(), (attr) => !existing.has(attr.escapedName));
|
|
221412
221412
|
return 1;
|
|
221413
221413
|
}
|
|
221414
221414
|
function tryGetLocalNamedExportCompletionSymbols() {
|
|
@@ -222057,14 +222057,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222057
222057
|
function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) {
|
|
222058
222058
|
const hasCompletionsType = completionsType && completionsType !== contextualType;
|
|
222059
222059
|
const promiseFilteredContextualType = checker.getUnionType(
|
|
222060
|
-
|
|
222060
|
+
filter6(
|
|
222061
222061
|
contextualType.flags & 1048576 ? contextualType.types : [contextualType],
|
|
222062
222062
|
(t2) => !checker.getPromisedTypeOfPromise(t2)
|
|
222063
222063
|
)
|
|
222064
222064
|
);
|
|
222065
222065
|
const type = hasCompletionsType && !(completionsType.flags & 3) ? checker.getUnionType([promiseFilteredContextualType, completionsType]) : promiseFilteredContextualType;
|
|
222066
222066
|
const properties = getApparentProperties(type, obj, checker);
|
|
222067
|
-
return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ?
|
|
222067
|
+
return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter6(properties, hasDeclarationOtherThanSelf) : properties;
|
|
222068
222068
|
function hasDeclarationOtherThanSelf(member) {
|
|
222069
222069
|
if (!length(member.declarations)) return true;
|
|
222070
222070
|
return some(member.declarations, (decl) => decl.parent !== obj);
|
|
@@ -222072,7 +222072,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222072
222072
|
}
|
|
222073
222073
|
function getApparentProperties(type, node, checker) {
|
|
222074
222074
|
if (!type.isUnion()) return type.getApparentProperties();
|
|
222075
|
-
return checker.getAllPossiblePropertiesOfTypes(
|
|
222075
|
+
return checker.getAllPossiblePropertiesOfTypes(filter6(type.types, (memberType) => !(memberType.flags & 402784252 || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties()))));
|
|
222076
222076
|
}
|
|
222077
222077
|
function containsNonPublicProperties(props) {
|
|
222078
222078
|
return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 6));
|
|
@@ -222783,7 +222783,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
222783
222783
|
function stringLiteralCompletionsFromProperties(type) {
|
|
222784
222784
|
return type && {
|
|
222785
222785
|
kind: 1,
|
|
222786
|
-
symbols:
|
|
222786
|
+
symbols: filter6(type.getApparentProperties(), (prop) => !(prop.valueDeclaration && isPrivateIdentifierClassElementDeclaration(prop.valueDeclaration))),
|
|
222787
222787
|
hasIndexSignature: hasIndexSignature(type)
|
|
222788
222788
|
};
|
|
222789
222789
|
}
|
|
@@ -225210,7 +225210,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
225210
225210
|
}
|
|
225211
225211
|
Core2.eachSymbolReferenceInFile = eachSymbolReferenceInFile;
|
|
225212
225212
|
function getTopMostDeclarationNamesInFile(declarationName, sourceFile) {
|
|
225213
|
-
const candidates =
|
|
225213
|
+
const candidates = filter6(getPossibleSymbolReferenceNodes(sourceFile, declarationName), (name2) => !!getDeclarationFromName(name2));
|
|
225214
225214
|
return candidates.reduce((topMost, decl) => {
|
|
225215
225215
|
const depth = getDepth(decl);
|
|
225216
225216
|
if (!some(topMost.declarationNames) || depth === topMost.depth) {
|
|
@@ -226147,7 +226147,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226147
226147
|
if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) {
|
|
226148
226148
|
const classDecl = node.parent.parent;
|
|
226149
226149
|
const { symbol: symbol22, failedAliasResolution: failedAliasResolution2 } = getSymbol(classDecl, typeChecker, stopAtAlias);
|
|
226150
|
-
const staticBlocks =
|
|
226150
|
+
const staticBlocks = filter6(classDecl.members, isClassStaticBlockDeclaration);
|
|
226151
226151
|
const containerName = symbol22 ? typeChecker.symbolToString(symbol22, classDecl) : "";
|
|
226152
226152
|
const sourceFile2 = node.getSourceFile();
|
|
226153
226153
|
return map32(staticBlocks, (staticBlock) => {
|
|
@@ -226483,12 +226483,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
226483
226483
|
return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5;
|
|
226484
226484
|
}
|
|
226485
226485
|
function getDefinitionFromSymbol(typeChecker, symbol2, node, failedAliasResolution, declarationFilter) {
|
|
226486
|
-
const filteredDeclarations = declarationFilter !== void 0 ?
|
|
226486
|
+
const filteredDeclarations = declarationFilter !== void 0 ? filter6(symbol2.declarations, declarationFilter) : symbol2.declarations;
|
|
226487
226487
|
const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());
|
|
226488
226488
|
if (signatureDefinition) {
|
|
226489
226489
|
return signatureDefinition;
|
|
226490
226490
|
}
|
|
226491
|
-
const withoutExpandos =
|
|
226491
|
+
const withoutExpandos = filter6(filteredDeclarations, (d) => !isExpandoDeclaration(d));
|
|
226492
226492
|
const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations;
|
|
226493
226493
|
return map32(results, (declaration) => createDefinitionInfo(
|
|
226494
226494
|
declaration,
|
|
@@ -231474,7 +231474,7 @@ ${content}
|
|
|
231474
231474
|
this.replaceJSDocComment(sourceFile, parent2, [...oldTags, ...unmergedNewTags]);
|
|
231475
231475
|
}
|
|
231476
231476
|
filterJSDocTags(sourceFile, parent2, predicate) {
|
|
231477
|
-
this.replaceJSDocComment(sourceFile, parent2,
|
|
231477
|
+
this.replaceJSDocComment(sourceFile, parent2, filter6(flatMapToMutable(parent2.jsDoc, (j) => j.tags), predicate));
|
|
231478
231478
|
}
|
|
231479
231479
|
replaceRangeWithText(sourceFile, range, text) {
|
|
231480
231480
|
this.changes.push({ kind: 3, sourceFile, range, text });
|
|
@@ -234300,9 +234300,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
234300
234300
|
function toTokenRange(arg) {
|
|
234301
234301
|
return typeof arg === "number" ? tokenRangeFrom([arg]) : isArray(arg) ? tokenRangeFrom(arg) : arg;
|
|
234302
234302
|
}
|
|
234303
|
-
function tokenRangeFromRange(
|
|
234303
|
+
function tokenRangeFromRange(from18, to, except = []) {
|
|
234304
234304
|
const tokens = [];
|
|
234305
|
-
for (let token =
|
|
234305
|
+
for (let token = from18; token <= to; token++) {
|
|
234306
234306
|
if (!contains(except, token)) {
|
|
234307
234307
|
tokens.push(token);
|
|
234308
234308
|
}
|
|
@@ -237055,7 +237055,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
237055
237055
|
fileExtensionIsOneOf: () => fileExtensionIsOneOf,
|
|
237056
237056
|
fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
|
|
237057
237057
|
fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire,
|
|
237058
|
-
filter: () =>
|
|
237058
|
+
filter: () => filter6,
|
|
237059
237059
|
filterMutate: () => filterMutate,
|
|
237060
237060
|
filterSemanticDiagnostics: () => filterSemanticDiagnostics,
|
|
237061
237061
|
find: () => find,
|
|
@@ -240767,7 +240767,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
240767
240767
|
* Get the errors that dont have any file name associated
|
|
240768
240768
|
*/
|
|
240769
240769
|
getGlobalProjectErrors() {
|
|
240770
|
-
return
|
|
240770
|
+
return filter6(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2;
|
|
240771
240771
|
}
|
|
240772
240772
|
/**
|
|
240773
240773
|
* Get all the project errors
|
|
@@ -241364,7 +241364,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
241364
241364
|
removeExistingTypings(include) {
|
|
241365
241365
|
if (!include.length) return include;
|
|
241366
241366
|
const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this);
|
|
241367
|
-
return
|
|
241367
|
+
return filter6(include, (i2) => !existing.includes(i2));
|
|
241368
241368
|
}
|
|
241369
241369
|
updateGraphWorker() {
|
|
241370
241370
|
var _a2, _b;
|
|
@@ -242595,7 +242595,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
242595
242595
|
* Get the errors that dont have any file name associated
|
|
242596
242596
|
*/
|
|
242597
242597
|
getGlobalProjectErrors() {
|
|
242598
|
-
return
|
|
242598
|
+
return filter6(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2;
|
|
242599
242599
|
}
|
|
242600
242600
|
/**
|
|
242601
242601
|
* Get all the project errors
|
|
@@ -248806,7 +248806,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248806
248806
|
getConfigFileDiagnostics(configFile, project, includeLinePosition) {
|
|
248807
248807
|
const projectErrors = project.getAllProjectErrors();
|
|
248808
248808
|
const optionsErrors = project.getLanguageService().getCompilerOptionsDiagnostics();
|
|
248809
|
-
const diagnosticsForConfigFile =
|
|
248809
|
+
const diagnosticsForConfigFile = filter6(
|
|
248810
248810
|
concatenate(projectErrors, optionsErrors),
|
|
248811
248811
|
(diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile
|
|
248812
248812
|
);
|
|
@@ -248841,7 +248841,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
248841
248841
|
getCompilerOptionsDiagnostics(args) {
|
|
248842
248842
|
const project = this.getProject(args.projectFileName);
|
|
248843
248843
|
return this.convertToDiagnosticsWithLinePosition(
|
|
248844
|
-
|
|
248844
|
+
filter6(
|
|
248845
248845
|
project.getLanguageService().getCompilerOptionsDiagnostics(),
|
|
248846
248846
|
(diagnostic) => !diagnostic.file
|
|
248847
248847
|
),
|
|
@@ -249389,7 +249389,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
249389
249389
|
projects = scriptInfo.containingProjects;
|
|
249390
249390
|
symLinkedProjects = this.projectService.getSymlinkedProjects(scriptInfo);
|
|
249391
249391
|
}
|
|
249392
|
-
projects =
|
|
249392
|
+
projects = filter6(projects, (p) => p.languageServiceEnabled && !p.isOrphan());
|
|
249393
249393
|
if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) {
|
|
249394
249394
|
this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName);
|
|
249395
249395
|
return Errors.ThrowNoProject();
|
|
@@ -250002,7 +250002,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
250002
250002
|
/*excludeLibFiles*/
|
|
250003
250003
|
preferences.excludeLibrarySymbolsInNavTo
|
|
250004
250004
|
);
|
|
250005
|
-
const unseenItems =
|
|
250005
|
+
const unseenItems = filter6(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project));
|
|
250006
250006
|
if (unseenItems.length) {
|
|
250007
250007
|
outputs.push({ project, navigateToItems: unseenItems });
|
|
250008
250008
|
}
|
|
@@ -266123,9 +266123,9 @@ var require_mime_types = __commonJS({
|
|
|
266123
266123
|
for (var i2 = 0; i2 < exts.length; i2++) {
|
|
266124
266124
|
var extension2 = exts[i2];
|
|
266125
266125
|
if (types3[extension2]) {
|
|
266126
|
-
var
|
|
266126
|
+
var from18 = preference.indexOf(db[types3[extension2]].source);
|
|
266127
266127
|
var to = preference.indexOf(mime.source);
|
|
266128
|
-
if (types3[extension2] !== "application/octet-stream" && (
|
|
266128
|
+
if (types3[extension2] !== "application/octet-stream" && (from18 > to || from18 === to && types3[extension2].substr(0, 12) === "application/")) {
|
|
266129
266129
|
continue;
|
|
266130
266130
|
}
|
|
266131
266131
|
}
|
|
@@ -267872,7 +267872,7 @@ var require_balanced_match = __commonJS({
|
|
|
267872
267872
|
// ../../node_modules/brace-expansion/index.js
|
|
267873
267873
|
var require_brace_expansion = __commonJS({
|
|
267874
267874
|
"../../node_modules/brace-expansion/index.js"(exports2, module2) {
|
|
267875
|
-
var
|
|
267875
|
+
var concatMap3 = require_concat_map();
|
|
267876
267876
|
var balanced = require_balanced_match();
|
|
267877
267877
|
module2.exports = expandTop;
|
|
267878
267878
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
@@ -267997,7 +267997,7 @@ var require_brace_expansion = __commonJS({
|
|
|
267997
267997
|
N.push(c);
|
|
267998
267998
|
}
|
|
267999
267999
|
} else {
|
|
268000
|
-
N =
|
|
268000
|
+
N = concatMap3(n, function(el) {
|
|
268001
268001
|
return expand(el, false);
|
|
268002
268002
|
});
|
|
268003
268003
|
}
|
|
@@ -268044,8 +268044,8 @@ var require_minimatch = __commonJS({
|
|
|
268044
268044
|
}, {});
|
|
268045
268045
|
}
|
|
268046
268046
|
var slashSplit = /\/+/;
|
|
268047
|
-
minimatch.filter =
|
|
268048
|
-
function
|
|
268047
|
+
minimatch.filter = filter6;
|
|
268048
|
+
function filter6(pattern, options) {
|
|
268049
268049
|
options = options || {};
|
|
268050
268050
|
return function(p, i2, list) {
|
|
268051
268051
|
return minimatch(p, pattern, options);
|
|
@@ -269851,13 +269851,13 @@ var require_async3 = __commonJS({
|
|
|
269851
269851
|
});
|
|
269852
269852
|
}
|
|
269853
269853
|
function _filter(eachfn, coll, iteratee, callback) {
|
|
269854
|
-
var
|
|
269855
|
-
return
|
|
269854
|
+
var filter7 = isArrayLike(coll) ? filterArray : filterGeneric;
|
|
269855
|
+
return filter7(eachfn, coll, wrapAsync(iteratee), callback);
|
|
269856
269856
|
}
|
|
269857
|
-
function
|
|
269857
|
+
function filter6(coll, iteratee, callback) {
|
|
269858
269858
|
return _filter(eachOf$1, coll, iteratee, callback);
|
|
269859
269859
|
}
|
|
269860
|
-
var filter$1 = awaitify(
|
|
269860
|
+
var filter$1 = awaitify(filter6, 3);
|
|
269861
269861
|
function filterLimit(coll, limit, iteratee, callback) {
|
|
269862
269862
|
return _filter(eachOfLimit(limit), coll, iteratee, callback);
|
|
269863
269863
|
}
|
|
@@ -270681,15 +270681,15 @@ var require_polyfills = __commonJS({
|
|
|
270681
270681
|
}
|
|
270682
270682
|
if (platform2 === "win32") {
|
|
270683
270683
|
fs3.rename = /* @__PURE__ */ (function(fs$rename) {
|
|
270684
|
-
return function(
|
|
270684
|
+
return function(from18, to, cb) {
|
|
270685
270685
|
var start3 = Date.now();
|
|
270686
270686
|
var backoff = 0;
|
|
270687
|
-
fs$rename(
|
|
270687
|
+
fs$rename(from18, to, function CB(er) {
|
|
270688
270688
|
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start3 < 6e4) {
|
|
270689
270689
|
setTimeout(function() {
|
|
270690
270690
|
fs3.stat(to, function(stater, st) {
|
|
270691
270691
|
if (stater && stater.code === "ENOENT")
|
|
270692
|
-
fs$rename(
|
|
270692
|
+
fs$rename(from18, to, CB);
|
|
270693
270693
|
else
|
|
270694
270694
|
cb(er);
|
|
270695
270695
|
});
|
|
@@ -271570,7 +271570,7 @@ var require_BufferList2 = __commonJS({
|
|
|
271570
271570
|
this.head = this.tail = null;
|
|
271571
271571
|
this.length = 0;
|
|
271572
271572
|
};
|
|
271573
|
-
BufferList.prototype.join = function
|
|
271573
|
+
BufferList.prototype.join = function join8(s2) {
|
|
271574
271574
|
if (this.length === 0) return "";
|
|
271575
271575
|
var p = this.head;
|
|
271576
271576
|
var ret = "" + p.data;
|
|
@@ -276370,7 +276370,7 @@ var require_buffer_list3 = __commonJS({
|
|
|
276370
276370
|
}
|
|
276371
276371
|
}, {
|
|
276372
276372
|
key: "join",
|
|
276373
|
-
value: function
|
|
276373
|
+
value: function join8(s2) {
|
|
276374
276374
|
if (this.length === 0) return "";
|
|
276375
276375
|
var p = this.head;
|
|
276376
276376
|
var ret = "" + p.data;
|
|
@@ -277597,7 +277597,7 @@ var require_from4 = __commonJS({
|
|
|
277597
277597
|
return obj;
|
|
277598
277598
|
}
|
|
277599
277599
|
var ERR_INVALID_ARG_TYPE = require_errors3().codes.ERR_INVALID_ARG_TYPE;
|
|
277600
|
-
function
|
|
277600
|
+
function from18(Readable2, iterable, opts) {
|
|
277601
277601
|
var iterator;
|
|
277602
277602
|
if (iterable && typeof iterable.next === "function") {
|
|
277603
277603
|
iterator = iterable;
|
|
@@ -277636,7 +277636,7 @@ var require_from4 = __commonJS({
|
|
|
277636
277636
|
}
|
|
277637
277637
|
return readable;
|
|
277638
277638
|
}
|
|
277639
|
-
module2.exports =
|
|
277639
|
+
module2.exports = from18;
|
|
277640
277640
|
}
|
|
277641
277641
|
});
|
|
277642
277642
|
|
|
@@ -277680,7 +277680,7 @@ var require_stream_readable4 = __commonJS({
|
|
|
277680
277680
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
277681
277681
|
var StringDecoder;
|
|
277682
277682
|
var createReadableStreamAsyncIterator;
|
|
277683
|
-
var
|
|
277683
|
+
var from18;
|
|
277684
277684
|
require_inherits()(Readable2, Stream3);
|
|
277685
277685
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
277686
277686
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -278362,10 +278362,10 @@ var require_stream_readable4 = __commonJS({
|
|
|
278362
278362
|
}
|
|
278363
278363
|
if (typeof Symbol === "function") {
|
|
278364
278364
|
Readable2.from = function(iterable, opts) {
|
|
278365
|
-
if (
|
|
278366
|
-
|
|
278365
|
+
if (from18 === void 0) {
|
|
278366
|
+
from18 = require_from4();
|
|
278367
278367
|
}
|
|
278368
|
-
return
|
|
278368
|
+
return from18(Readable2, iterable, opts);
|
|
278369
278369
|
};
|
|
278370
278370
|
}
|
|
278371
278371
|
function indexOf(xs, x2) {
|
|
@@ -278545,8 +278545,8 @@ var require_pipeline3 = __commonJS({
|
|
|
278545
278545
|
function call(fn) {
|
|
278546
278546
|
fn();
|
|
278547
278547
|
}
|
|
278548
|
-
function pipe2(
|
|
278549
|
-
return
|
|
278548
|
+
function pipe2(from18, to) {
|
|
278549
|
+
return from18.pipe(to);
|
|
278550
278550
|
}
|
|
278551
278551
|
function popCallback(streams) {
|
|
278552
278552
|
if (!streams.length) return noop3;
|
|
@@ -279712,7 +279712,7 @@ var require_buffer_list4 = __commonJS({
|
|
|
279712
279712
|
}
|
|
279713
279713
|
}, {
|
|
279714
279714
|
key: "join",
|
|
279715
|
-
value: function
|
|
279715
|
+
value: function join8(s2) {
|
|
279716
279716
|
if (this.length === 0) return "";
|
|
279717
279717
|
var p = this.head;
|
|
279718
279718
|
var ret = "" + p.data;
|
|
@@ -280939,7 +280939,7 @@ var require_from5 = __commonJS({
|
|
|
280939
280939
|
return obj;
|
|
280940
280940
|
}
|
|
280941
280941
|
var ERR_INVALID_ARG_TYPE = require_errors4().codes.ERR_INVALID_ARG_TYPE;
|
|
280942
|
-
function
|
|
280942
|
+
function from18(Readable2, iterable, opts) {
|
|
280943
280943
|
var iterator;
|
|
280944
280944
|
if (iterable && typeof iterable.next === "function") {
|
|
280945
280945
|
iterator = iterable;
|
|
@@ -280978,7 +280978,7 @@ var require_from5 = __commonJS({
|
|
|
280978
280978
|
}
|
|
280979
280979
|
return readable;
|
|
280980
280980
|
}
|
|
280981
|
-
module2.exports =
|
|
280981
|
+
module2.exports = from18;
|
|
280982
280982
|
}
|
|
280983
280983
|
});
|
|
280984
280984
|
|
|
@@ -281022,7 +281022,7 @@ var require_stream_readable5 = __commonJS({
|
|
|
281022
281022
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
281023
281023
|
var StringDecoder;
|
|
281024
281024
|
var createReadableStreamAsyncIterator;
|
|
281025
|
-
var
|
|
281025
|
+
var from18;
|
|
281026
281026
|
require_inherits()(Readable2, Stream3);
|
|
281027
281027
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
281028
281028
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -281704,10 +281704,10 @@ var require_stream_readable5 = __commonJS({
|
|
|
281704
281704
|
}
|
|
281705
281705
|
if (typeof Symbol === "function") {
|
|
281706
281706
|
Readable2.from = function(iterable, opts) {
|
|
281707
|
-
if (
|
|
281708
|
-
|
|
281707
|
+
if (from18 === void 0) {
|
|
281708
|
+
from18 = require_from5();
|
|
281709
281709
|
}
|
|
281710
|
-
return
|
|
281710
|
+
return from18(Readable2, iterable, opts);
|
|
281711
281711
|
};
|
|
281712
281712
|
}
|
|
281713
281713
|
function indexOf(xs, x2) {
|
|
@@ -281887,8 +281887,8 @@ var require_pipeline4 = __commonJS({
|
|
|
281887
281887
|
function call(fn) {
|
|
281888
281888
|
fn();
|
|
281889
281889
|
}
|
|
281890
|
-
function pipe2(
|
|
281891
|
-
return
|
|
281890
|
+
function pipe2(from18, to) {
|
|
281891
|
+
return from18.pipe(to);
|
|
281892
281892
|
}
|
|
281893
281893
|
function popCallback(streams) {
|
|
281894
281894
|
if (!streams.length) return noop3;
|
|
@@ -282484,7 +282484,7 @@ var require_buffer_list5 = __commonJS({
|
|
|
282484
282484
|
}
|
|
282485
282485
|
}, {
|
|
282486
282486
|
key: "join",
|
|
282487
|
-
value: function
|
|
282487
|
+
value: function join8(s2) {
|
|
282488
282488
|
if (this.length === 0) return "";
|
|
282489
282489
|
var p = this.head;
|
|
282490
282490
|
var ret = "" + p.data;
|
|
@@ -283711,7 +283711,7 @@ var require_from6 = __commonJS({
|
|
|
283711
283711
|
return obj;
|
|
283712
283712
|
}
|
|
283713
283713
|
var ERR_INVALID_ARG_TYPE = require_errors5().codes.ERR_INVALID_ARG_TYPE;
|
|
283714
|
-
function
|
|
283714
|
+
function from18(Readable2, iterable, opts) {
|
|
283715
283715
|
var iterator;
|
|
283716
283716
|
if (iterable && typeof iterable.next === "function") {
|
|
283717
283717
|
iterator = iterable;
|
|
@@ -283750,7 +283750,7 @@ var require_from6 = __commonJS({
|
|
|
283750
283750
|
}
|
|
283751
283751
|
return readable;
|
|
283752
283752
|
}
|
|
283753
|
-
module2.exports =
|
|
283753
|
+
module2.exports = from18;
|
|
283754
283754
|
}
|
|
283755
283755
|
});
|
|
283756
283756
|
|
|
@@ -283794,7 +283794,7 @@ var require_stream_readable6 = __commonJS({
|
|
|
283794
283794
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
283795
283795
|
var StringDecoder;
|
|
283796
283796
|
var createReadableStreamAsyncIterator;
|
|
283797
|
-
var
|
|
283797
|
+
var from18;
|
|
283798
283798
|
require_inherits()(Readable2, Stream3);
|
|
283799
283799
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
283800
283800
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -284476,10 +284476,10 @@ var require_stream_readable6 = __commonJS({
|
|
|
284476
284476
|
}
|
|
284477
284477
|
if (typeof Symbol === "function") {
|
|
284478
284478
|
Readable2.from = function(iterable, opts) {
|
|
284479
|
-
if (
|
|
284480
|
-
|
|
284479
|
+
if (from18 === void 0) {
|
|
284480
|
+
from18 = require_from6();
|
|
284481
284481
|
}
|
|
284482
|
-
return
|
|
284482
|
+
return from18(Readable2, iterable, opts);
|
|
284483
284483
|
};
|
|
284484
284484
|
}
|
|
284485
284485
|
function indexOf(xs, x2) {
|
|
@@ -284659,8 +284659,8 @@ var require_pipeline5 = __commonJS({
|
|
|
284659
284659
|
function call(fn) {
|
|
284660
284660
|
fn();
|
|
284661
284661
|
}
|
|
284662
|
-
function pipe2(
|
|
284663
|
-
return
|
|
284662
|
+
function pipe2(from18, to) {
|
|
284663
|
+
return from18.pipe(to);
|
|
284664
284664
|
}
|
|
284665
284665
|
function popCallback(streams) {
|
|
284666
284666
|
if (!streams.length) return noop3;
|
|
@@ -285721,7 +285721,7 @@ var require_buffer_list6 = __commonJS({
|
|
|
285721
285721
|
}
|
|
285722
285722
|
}, {
|
|
285723
285723
|
key: "join",
|
|
285724
|
-
value: function
|
|
285724
|
+
value: function join8(s2) {
|
|
285725
285725
|
if (this.length === 0) return "";
|
|
285726
285726
|
var p = this.head;
|
|
285727
285727
|
var ret = "" + p.data;
|
|
@@ -286948,7 +286948,7 @@ var require_from7 = __commonJS({
|
|
|
286948
286948
|
return obj;
|
|
286949
286949
|
}
|
|
286950
286950
|
var ERR_INVALID_ARG_TYPE = require_errors6().codes.ERR_INVALID_ARG_TYPE;
|
|
286951
|
-
function
|
|
286951
|
+
function from18(Readable2, iterable, opts) {
|
|
286952
286952
|
var iterator;
|
|
286953
286953
|
if (iterable && typeof iterable.next === "function") {
|
|
286954
286954
|
iterator = iterable;
|
|
@@ -286987,7 +286987,7 @@ var require_from7 = __commonJS({
|
|
|
286987
286987
|
}
|
|
286988
286988
|
return readable;
|
|
286989
286989
|
}
|
|
286990
|
-
module2.exports =
|
|
286990
|
+
module2.exports = from18;
|
|
286991
286991
|
}
|
|
286992
286992
|
});
|
|
286993
286993
|
|
|
@@ -287031,7 +287031,7 @@ var require_stream_readable7 = __commonJS({
|
|
|
287031
287031
|
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
287032
287032
|
var StringDecoder;
|
|
287033
287033
|
var createReadableStreamAsyncIterator;
|
|
287034
|
-
var
|
|
287034
|
+
var from18;
|
|
287035
287035
|
require_inherits()(Readable2, Stream3);
|
|
287036
287036
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
287037
287037
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
@@ -287713,10 +287713,10 @@ var require_stream_readable7 = __commonJS({
|
|
|
287713
287713
|
}
|
|
287714
287714
|
if (typeof Symbol === "function") {
|
|
287715
287715
|
Readable2.from = function(iterable, opts) {
|
|
287716
|
-
if (
|
|
287717
|
-
|
|
287716
|
+
if (from18 === void 0) {
|
|
287717
|
+
from18 = require_from7();
|
|
287718
287718
|
}
|
|
287719
|
-
return
|
|
287719
|
+
return from18(Readable2, iterable, opts);
|
|
287720
287720
|
};
|
|
287721
287721
|
}
|
|
287722
287722
|
function indexOf(xs, x2) {
|
|
@@ -287896,8 +287896,8 @@ var require_pipeline6 = __commonJS({
|
|
|
287896
287896
|
function call(fn) {
|
|
287897
287897
|
fn();
|
|
287898
287898
|
}
|
|
287899
|
-
function pipe2(
|
|
287900
|
-
return
|
|
287899
|
+
function pipe2(from18, to) {
|
|
287900
|
+
return from18.pipe(to);
|
|
287901
287901
|
}
|
|
287902
287902
|
function popCallback(streams) {
|
|
287903
287903
|
if (!streams.length) return noop3;
|
|
@@ -311356,17 +311356,17 @@ var require_codegen = __commonJS({
|
|
|
311356
311356
|
}
|
|
311357
311357
|
};
|
|
311358
311358
|
var ForRange = class extends For {
|
|
311359
|
-
constructor(varKind, name2,
|
|
311359
|
+
constructor(varKind, name2, from18, to) {
|
|
311360
311360
|
super();
|
|
311361
311361
|
this.varKind = varKind;
|
|
311362
311362
|
this.name = name2;
|
|
311363
|
-
this.from =
|
|
311363
|
+
this.from = from18;
|
|
311364
311364
|
this.to = to;
|
|
311365
311365
|
}
|
|
311366
311366
|
render(opts) {
|
|
311367
311367
|
const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
|
|
311368
|
-
const { name: name2, from:
|
|
311369
|
-
return `for(${varKind} ${name2}=${
|
|
311368
|
+
const { name: name2, from: from18, to } = this;
|
|
311369
|
+
return `for(${varKind} ${name2}=${from18}; ${name2}<${to}; ${name2}++)` + super.render(opts);
|
|
311370
311370
|
}
|
|
311371
311371
|
get names() {
|
|
311372
311372
|
const names = addExprNames(super.names, this.from);
|
|
@@ -311585,9 +311585,9 @@ var require_codegen = __commonJS({
|
|
|
311585
311585
|
return this._for(new ForLoop(iteration), forBody);
|
|
311586
311586
|
}
|
|
311587
311587
|
// `for` statement for a range of values
|
|
311588
|
-
forRange(nameOrPrefix,
|
|
311588
|
+
forRange(nameOrPrefix, from18, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
|
|
311589
311589
|
const name2 = this._scope.toName(nameOrPrefix);
|
|
311590
|
-
return this._for(new ForRange(varKind, name2,
|
|
311590
|
+
return this._for(new ForRange(varKind, name2, from18, to), () => forBody(name2));
|
|
311591
311591
|
}
|
|
311592
311592
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
311593
311593
|
forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
|
|
@@ -311726,13 +311726,13 @@ var require_codegen = __commonJS({
|
|
|
311726
311726
|
}
|
|
311727
311727
|
};
|
|
311728
311728
|
exports2.CodeGen = CodeGen;
|
|
311729
|
-
function addNames(names,
|
|
311730
|
-
for (const n in
|
|
311731
|
-
names[n] = (names[n] || 0) + (
|
|
311729
|
+
function addNames(names, from18) {
|
|
311730
|
+
for (const n in from18)
|
|
311731
|
+
names[n] = (names[n] || 0) + (from18[n] || 0);
|
|
311732
311732
|
return names;
|
|
311733
311733
|
}
|
|
311734
|
-
function addExprNames(names,
|
|
311735
|
-
return
|
|
311734
|
+
function addExprNames(names, from18) {
|
|
311735
|
+
return from18 instanceof code_1._CodeOrName ? addNames(names, from18.names) : names;
|
|
311736
311736
|
}
|
|
311737
311737
|
function optimizeExpr(expr, names, constants) {
|
|
311738
311738
|
if (expr instanceof code_1.Name)
|
|
@@ -311759,9 +311759,9 @@ var require_codegen = __commonJS({
|
|
|
311759
311759
|
return e2 instanceof code_1._Code && e2._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
|
|
311760
311760
|
}
|
|
311761
311761
|
}
|
|
311762
|
-
function subtractNames(names,
|
|
311763
|
-
for (const n in
|
|
311764
|
-
names[n] = (names[n] || 0) - (
|
|
311762
|
+
function subtractNames(names, from18) {
|
|
311763
|
+
for (const n in from18)
|
|
311764
|
+
names[n] = (names[n] || 0) - (from18[n] || 0);
|
|
311765
311765
|
}
|
|
311766
311766
|
function not(x2) {
|
|
311767
311767
|
return typeof x2 == "boolean" || typeof x2 == "number" || x2 === null ? !x2 : (0, code_1._)`!${par(x2)}`;
|
|
@@ -311879,31 +311879,31 @@ var require_util5 = __commonJS({
|
|
|
311879
311879
|
}
|
|
311880
311880
|
exports2.eachItem = eachItem;
|
|
311881
311881
|
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues3, resultToName }) {
|
|
311882
|
-
return (gen,
|
|
311883
|
-
const res = to === void 0 ?
|
|
311882
|
+
return (gen, from18, to, toName) => {
|
|
311883
|
+
const res = to === void 0 ? from18 : to instanceof codegen_1.Name ? (from18 instanceof codegen_1.Name ? mergeNames(gen, from18, to) : mergeToName(gen, from18, to), to) : from18 instanceof codegen_1.Name ? (mergeToName(gen, to, from18), from18) : mergeValues3(from18, to);
|
|
311884
311884
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
311885
311885
|
};
|
|
311886
311886
|
}
|
|
311887
311887
|
exports2.mergeEvaluated = {
|
|
311888
311888
|
props: makeMergeEvaluated({
|
|
311889
|
-
mergeNames: (gen,
|
|
311890
|
-
gen.if((0, codegen_1._)`${
|
|
311889
|
+
mergeNames: (gen, from18, to) => gen.if((0, codegen_1._)`${to} !== true && ${from18} !== undefined`, () => {
|
|
311890
|
+
gen.if((0, codegen_1._)`${from18} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from18})`));
|
|
311891
311891
|
}),
|
|
311892
|
-
mergeToName: (gen,
|
|
311893
|
-
if (
|
|
311892
|
+
mergeToName: (gen, from18, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
|
|
311893
|
+
if (from18 === true) {
|
|
311894
311894
|
gen.assign(to, true);
|
|
311895
311895
|
} else {
|
|
311896
311896
|
gen.assign(to, (0, codegen_1._)`${to} || {}`);
|
|
311897
|
-
setEvaluated(gen, to,
|
|
311897
|
+
setEvaluated(gen, to, from18);
|
|
311898
311898
|
}
|
|
311899
311899
|
}),
|
|
311900
|
-
mergeValues: (
|
|
311900
|
+
mergeValues: (from18, to) => from18 === true ? true : { ...from18, ...to },
|
|
311901
311901
|
resultToName: evaluatedPropsToName
|
|
311902
311902
|
}),
|
|
311903
311903
|
items: makeMergeEvaluated({
|
|
311904
|
-
mergeNames: (gen,
|
|
311905
|
-
mergeToName: (gen,
|
|
311906
|
-
mergeValues: (
|
|
311904
|
+
mergeNames: (gen, from18, to) => gen.if((0, codegen_1._)`${to} !== true && ${from18} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from18} === true ? true : ${to} > ${from18} ? ${to} : ${from18}`)),
|
|
311905
|
+
mergeToName: (gen, from18, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from18 === true ? true : (0, codegen_1._)`${to} > ${from18} ? ${to} : ${from18}`)),
|
|
311906
|
+
mergeValues: (from18, to) => from18 === true ? true : Math.max(from18, to),
|
|
311907
311907
|
resultToName: (gen, items) => gen.var("items", items)
|
|
311908
311908
|
})
|
|
311909
311909
|
};
|
|
@@ -323741,15 +323741,117 @@ var init_config2 = __esm({
|
|
|
323741
323741
|
}
|
|
323742
323742
|
});
|
|
323743
323743
|
|
|
323744
|
+
// src/commands/workspace/gitignore.ts
|
|
323745
|
+
function parseGitignore(text) {
|
|
323746
|
+
return text.split(/\r?\n/).map((line) => line.replace(/(?<!\\)\s+$/, "")).filter((line) => line && !line.startsWith("#")).map(toRule);
|
|
323747
|
+
}
|
|
323748
|
+
function toRule(pattern) {
|
|
323749
|
+
let line = pattern;
|
|
323750
|
+
const negate = line.startsWith("!");
|
|
323751
|
+
if (negate) line = line.slice(1);
|
|
323752
|
+
if (line.startsWith("\\")) line = line.slice(1);
|
|
323753
|
+
const dirOnly = line.endsWith("/");
|
|
323754
|
+
if (dirOnly) line = line.slice(0, -1);
|
|
323755
|
+
const anchored = line.includes("/");
|
|
323756
|
+
if (line.startsWith("/")) line = line.slice(1);
|
|
323757
|
+
const body = globToRegex(line);
|
|
323758
|
+
return {
|
|
323759
|
+
regex: new RegExp(anchored ? `^${body}$` : `^(?:.*/)?${body}$`),
|
|
323760
|
+
negate,
|
|
323761
|
+
dirOnly
|
|
323762
|
+
};
|
|
323763
|
+
}
|
|
323764
|
+
function globToRegex(glob) {
|
|
323765
|
+
let out = "";
|
|
323766
|
+
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
323767
|
+
const c = glob[i2];
|
|
323768
|
+
if (c === "*" && glob[i2 + 1] === "*") {
|
|
323769
|
+
const atStart = i2 === 0 || glob[i2 - 1] === "/";
|
|
323770
|
+
if (atStart && glob[i2 + 2] === "/") {
|
|
323771
|
+
out += "(?:.*/)?";
|
|
323772
|
+
i2 += 2;
|
|
323773
|
+
} else {
|
|
323774
|
+
out += ".*";
|
|
323775
|
+
i2 += 1;
|
|
323776
|
+
}
|
|
323777
|
+
} else if (c === "*") {
|
|
323778
|
+
out += "[^/]*";
|
|
323779
|
+
} else if (c === "?") {
|
|
323780
|
+
out += "[^/]";
|
|
323781
|
+
} else if (c === "[" && glob.indexOf("]", i2 + 1) > i2 + 1) {
|
|
323782
|
+
const end = glob.indexOf("]", i2 + 1);
|
|
323783
|
+
const set2 = glob.slice(i2 + 1, end).replace(/\\/g, "\\\\");
|
|
323784
|
+
out += `[${set2.startsWith("!") ? `^${set2.slice(1)}` : set2}]`;
|
|
323785
|
+
i2 = end;
|
|
323786
|
+
} else {
|
|
323787
|
+
out += c.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
323788
|
+
}
|
|
323789
|
+
}
|
|
323790
|
+
return out;
|
|
323791
|
+
}
|
|
323792
|
+
var import_fs11, import_path6, GitignoreMatcher;
|
|
323793
|
+
var init_gitignore = __esm({
|
|
323794
|
+
"src/commands/workspace/gitignore.ts"() {
|
|
323795
|
+
import_fs11 = require("fs");
|
|
323796
|
+
import_path6 = require("path");
|
|
323797
|
+
GitignoreMatcher = class {
|
|
323798
|
+
constructor(root, readText = (path2) => (0, import_fs11.readFileSync)(path2, "utf8")) {
|
|
323799
|
+
this.root = root;
|
|
323800
|
+
this.readText = readText;
|
|
323801
|
+
/** folder (relative, '' = root) -> its .gitignore rules */
|
|
323802
|
+
this.rules = /* @__PURE__ */ new Map();
|
|
323803
|
+
}
|
|
323804
|
+
/** A `.gitignore` changed: read them again. */
|
|
323805
|
+
clear() {
|
|
323806
|
+
this.rules.clear();
|
|
323807
|
+
}
|
|
323808
|
+
/** `rel` (root-relative, `/`-separated) or a folder above it is ignored. */
|
|
323809
|
+
ignored(rel, isDir = false) {
|
|
323810
|
+
const parts = rel.split("/").filter(Boolean);
|
|
323811
|
+
return parts.some(
|
|
323812
|
+
(_2, i2) => this.matches(parts.slice(0, i2 + 1), i2 < parts.length - 1 || isDir)
|
|
323813
|
+
);
|
|
323814
|
+
}
|
|
323815
|
+
matches(parts, isDir) {
|
|
323816
|
+
let ignored = false;
|
|
323817
|
+
for (let depth = 0; depth < parts.length; depth++) {
|
|
323818
|
+
const relToFile = parts.slice(depth).join("/");
|
|
323819
|
+
for (const rule of this.rulesOf(parts.slice(0, depth).join("/"))) {
|
|
323820
|
+
if ((!rule.dirOnly || isDir) && rule.regex.test(relToFile)) {
|
|
323821
|
+
ignored = !rule.negate;
|
|
323822
|
+
}
|
|
323823
|
+
}
|
|
323824
|
+
}
|
|
323825
|
+
return ignored;
|
|
323826
|
+
}
|
|
323827
|
+
rulesOf(dir) {
|
|
323828
|
+
let rules = this.rules.get(dir);
|
|
323829
|
+
if (!rules) {
|
|
323830
|
+
try {
|
|
323831
|
+
rules = parseGitignore(
|
|
323832
|
+
this.readText((0, import_path6.join)(this.root, dir, ".gitignore"))
|
|
323833
|
+
);
|
|
323834
|
+
} catch {
|
|
323835
|
+
rules = [];
|
|
323836
|
+
}
|
|
323837
|
+
this.rules.set(dir, rules);
|
|
323838
|
+
}
|
|
323839
|
+
return rules;
|
|
323840
|
+
}
|
|
323841
|
+
};
|
|
323842
|
+
}
|
|
323843
|
+
});
|
|
323844
|
+
|
|
323744
323845
|
// src/commands/workspace/files.ts
|
|
323745
|
-
var import_child_process6, import_crypto2,
|
|
323846
|
+
var import_child_process6, import_crypto2, import_fs12, import_path7, import_util12, run, WorkspaceError, MAX_READ_BYTES, MAX_WRITE_BYTES, DEFAULT_LIST_LIMIT, MAX_LIST_LIMIT, DEFAULT_SEARCH_RESULTS, MAX_SEARCH_RESULTS, MAX_MATCH_TEXT, SKIP_DIRS, SECRET_FILE, SECRET_TEMPLATE, isSecretFile, contentHash, toPosix, WorkspaceFiles;
|
|
323746
323847
|
var init_files = __esm({
|
|
323747
323848
|
"src/commands/workspace/files.ts"() {
|
|
323748
323849
|
import_child_process6 = require("child_process");
|
|
323749
323850
|
import_crypto2 = require("crypto");
|
|
323750
|
-
|
|
323751
|
-
|
|
323851
|
+
import_fs12 = require("fs");
|
|
323852
|
+
import_path7 = require("path");
|
|
323752
323853
|
import_util12 = require("util");
|
|
323854
|
+
init_gitignore();
|
|
323753
323855
|
run = (0, import_util12.promisify)(import_child_process6.execFile);
|
|
323754
323856
|
WorkspaceError = class extends Error {
|
|
323755
323857
|
constructor(message, status2 = 400) {
|
|
@@ -323768,22 +323870,23 @@ var init_files = __esm({
|
|
|
323768
323870
|
SECRET_FILE = /^(\.env(\..+)?|.*\.(pem|key|p12|pfx|keystore|jks)|id_(rsa|dsa|ecdsa|ed25519)(\.pub)?|\.npmrc|\.pypirc|\.netrc|credentials(\.json)?)$/i;
|
|
323769
323871
|
SECRET_TEMPLATE = /\.(example|sample|template|dist|defaults)$/i;
|
|
323770
323872
|
isSecretFile = (path2) => {
|
|
323771
|
-
const name2 = (0,
|
|
323873
|
+
const name2 = (0, import_path7.basename)(path2);
|
|
323772
323874
|
return SECRET_FILE.test(name2) && !SECRET_TEMPLATE.test(name2);
|
|
323773
323875
|
};
|
|
323774
323876
|
contentHash = (content) => (0, import_crypto2.createHash)("sha256").update(content).digest("hex").slice(0, 16);
|
|
323775
|
-
toPosix = (p) => p.split(
|
|
323877
|
+
toPosix = (p) => p.split(import_path7.sep).join("/");
|
|
323776
323878
|
WorkspaceFiles = class {
|
|
323777
323879
|
constructor(root, options = {}) {
|
|
323778
323880
|
this.root = root;
|
|
323779
323881
|
this.options = options;
|
|
323882
|
+
this.gitignore = new GitignoreMatcher(root);
|
|
323780
323883
|
}
|
|
323781
323884
|
/** Absolute path for a workspace-relative one, or a WorkspaceError. */
|
|
323782
323885
|
async resolvePath(input, { forWrite = false } = {}) {
|
|
323783
323886
|
const rel = (input ?? ".").trim() || ".";
|
|
323784
|
-
const abs = (0,
|
|
323785
|
-
const fromRoot = (0,
|
|
323786
|
-
if (fromRoot.startsWith("..") || (0,
|
|
323887
|
+
const abs = (0, import_path7.resolve)(this.root, rel);
|
|
323888
|
+
const fromRoot = (0, import_path7.relative)(this.root, abs);
|
|
323889
|
+
if (fromRoot.startsWith("..") || (0, import_path7.isAbsolute)(fromRoot)) {
|
|
323787
323890
|
throw new WorkspaceError(
|
|
323788
323891
|
`${input} is outside the workspace root - paths are relative to ${this.root}`,
|
|
323789
323892
|
403
|
|
@@ -323792,9 +323895,9 @@ var init_files = __esm({
|
|
|
323792
323895
|
let existing = abs;
|
|
323793
323896
|
for (; ; ) {
|
|
323794
323897
|
try {
|
|
323795
|
-
const real = await
|
|
323796
|
-
const realFromRoot = (0,
|
|
323797
|
-
if (realFromRoot.startsWith("..") || (0,
|
|
323898
|
+
const real = await import_fs12.promises.realpath(existing);
|
|
323899
|
+
const realFromRoot = (0, import_path7.relative)(this.root, real);
|
|
323900
|
+
if (realFromRoot.startsWith("..") || (0, import_path7.isAbsolute)(realFromRoot)) {
|
|
323798
323901
|
throw new WorkspaceError(
|
|
323799
323902
|
`${input} resolves outside the workspace root (symlink)`,
|
|
323800
323903
|
403
|
|
@@ -323803,7 +323906,7 @@ var init_files = __esm({
|
|
|
323803
323906
|
break;
|
|
323804
323907
|
} catch (e2) {
|
|
323805
323908
|
if (e2 instanceof WorkspaceError) throw e2;
|
|
323806
|
-
const parent = (0,
|
|
323909
|
+
const parent = (0, import_path7.dirname)(existing);
|
|
323807
323910
|
if (parent === existing) break;
|
|
323808
323911
|
existing = parent;
|
|
323809
323912
|
}
|
|
@@ -323838,6 +323941,41 @@ var init_files = __esm({
|
|
|
323838
323941
|
() => void 0
|
|
323839
323942
|
);
|
|
323840
323943
|
}
|
|
323944
|
+
/**
|
|
323945
|
+
* The paths `.gitignore` does not ignore (relative to the root), in one
|
|
323946
|
+
* `git check-ignore` - what the browser terminal's watcher reports, so a
|
|
323947
|
+
* build writing dist/ or a cache does not flood the editor. Outside a git
|
|
323948
|
+
* repo only node_modules / .git are dropped.
|
|
323949
|
+
*/
|
|
323950
|
+
async notIgnored(paths) {
|
|
323951
|
+
if (paths.some((p) => p.split("/").pop() === ".gitignore")) {
|
|
323952
|
+
this.gitignore.clear();
|
|
323953
|
+
}
|
|
323954
|
+
const kept = paths.filter(
|
|
323955
|
+
(p) => !p.split("/").some((part) => SKIP_DIRS.has(part))
|
|
323956
|
+
);
|
|
323957
|
+
if (!kept.length) return kept;
|
|
323958
|
+
const ignoredByGit = await this.isGitRepo() ? await this.gitCheckIgnore(kept) : null;
|
|
323959
|
+
return ignoredByGit ? kept.filter((p) => !ignoredByGit.has(p)) : kept.filter((p) => !this.gitignore.ignored(p));
|
|
323960
|
+
}
|
|
323961
|
+
/** The ignored ones of `paths` by git itself; null when git cannot run. */
|
|
323962
|
+
gitCheckIgnore(paths) {
|
|
323963
|
+
return new Promise((done) => {
|
|
323964
|
+
const git = (0, import_child_process6.spawn)("git", ["check-ignore", "--stdin", "-z"], {
|
|
323965
|
+
cwd: this.root
|
|
323966
|
+
});
|
|
323967
|
+
let out = "";
|
|
323968
|
+
git.stdout.on("data", (chunk) => out += chunk);
|
|
323969
|
+
git.on(
|
|
323970
|
+
"close",
|
|
323971
|
+
(code) => done(
|
|
323972
|
+
code === 0 || code === 1 ? new Set(out.split("\0").filter(Boolean)) : null
|
|
323973
|
+
)
|
|
323974
|
+
);
|
|
323975
|
+
git.on("error", () => done(null));
|
|
323976
|
+
git.stdin.end(paths.join("\0"));
|
|
323977
|
+
});
|
|
323978
|
+
}
|
|
323841
323979
|
/** Every file under `dir` (git-aware), relative to the root. */
|
|
323842
323980
|
async allFiles(dir, limit) {
|
|
323843
323981
|
if (await this.isGitRepo()) {
|
|
@@ -323851,10 +323989,11 @@ var init_files = __esm({
|
|
|
323851
323989
|
const out = [];
|
|
323852
323990
|
const walk = async (relDir) => {
|
|
323853
323991
|
if (out.length > limit) return;
|
|
323854
|
-
const entries = await
|
|
323992
|
+
const entries = await import_fs12.promises.readdir((0, import_path7.join)(this.root, relDir), { withFileTypes: true }).catch(() => []);
|
|
323855
323993
|
for (const entry of entries) {
|
|
323856
323994
|
if (SKIP_DIRS.has(entry.name)) continue;
|
|
323857
323995
|
const rel = relDir === "." ? entry.name : `${relDir}/${entry.name}`;
|
|
323996
|
+
if (this.gitignore.ignored(rel, entry.isDirectory())) continue;
|
|
323858
323997
|
if (entry.isDirectory()) await walk(rel);
|
|
323859
323998
|
else if (entry.isFile()) out.push(rel);
|
|
323860
323999
|
if (out.length > limit) return;
|
|
@@ -323894,7 +324033,9 @@ var init_files = __esm({
|
|
|
323894
324033
|
entries = entries.slice(0, limit);
|
|
323895
324034
|
await Promise.all(
|
|
323896
324035
|
entries.filter((e2) => e2.type === "file").map(async (e2) => {
|
|
323897
|
-
|
|
324036
|
+
const stat2 = await import_fs12.promises.stat((0, import_path7.join)(this.root, e2.path)).catch(() => void 0);
|
|
324037
|
+
e2.size = stat2?.size;
|
|
324038
|
+
e2.mtimeMs = stat2 ? Math.floor(stat2.mtimeMs) : void 0;
|
|
323898
324039
|
})
|
|
323899
324040
|
);
|
|
323900
324041
|
return {
|
|
@@ -323905,12 +324046,12 @@ var init_files = __esm({
|
|
|
323905
324046
|
async read(args) {
|
|
323906
324047
|
if (!args.path) throw new WorkspaceError("path is required");
|
|
323907
324048
|
const { abs, rel } = await this.resolvePath(args.path);
|
|
323908
|
-
const stat2 = await
|
|
324049
|
+
const stat2 = await import_fs12.promises.stat(abs).catch(() => null);
|
|
323909
324050
|
if (!stat2) throw new WorkspaceError(`${rel} does not exist`, 404);
|
|
323910
324051
|
if (stat2.isDirectory()) {
|
|
323911
324052
|
throw new WorkspaceError(`${rel} is a directory - use LocalListFiles`);
|
|
323912
324053
|
}
|
|
323913
|
-
const buffer = await
|
|
324054
|
+
const buffer = await import_fs12.promises.readFile(abs);
|
|
323914
324055
|
if (buffer.subarray(0, 8e3).includes(0)) {
|
|
323915
324056
|
return { path: rel, size: stat2.size, binary: true, content: "" };
|
|
323916
324057
|
}
|
|
@@ -323939,7 +324080,7 @@ var init_files = __esm({
|
|
|
323939
324080
|
};
|
|
323940
324081
|
}
|
|
323941
324082
|
async currentText(abs) {
|
|
323942
|
-
return
|
|
324083
|
+
return import_fs12.promises.readFile(abs, "utf-8").catch((e2) => {
|
|
323943
324084
|
if (e2?.code === "ENOENT") return null;
|
|
323944
324085
|
throw e2;
|
|
323945
324086
|
});
|
|
@@ -323960,8 +324101,8 @@ var init_files = __esm({
|
|
|
323960
324101
|
);
|
|
323961
324102
|
}
|
|
323962
324103
|
}
|
|
323963
|
-
await
|
|
323964
|
-
await
|
|
324104
|
+
await import_fs12.promises.mkdir((0, import_path7.dirname)(abs), { recursive: true });
|
|
324105
|
+
await import_fs12.promises.writeFile(abs, content, "utf-8");
|
|
323965
324106
|
return {
|
|
323966
324107
|
path: rel,
|
|
323967
324108
|
size: Buffer.byteLength(content),
|
|
@@ -323993,7 +324134,7 @@ var init_files = __esm({
|
|
|
323993
324134
|
);
|
|
323994
324135
|
}
|
|
323995
324136
|
const after = args.replaceAll ? before.split(args.oldText).join(args.newText ?? "") : before.replace(args.oldText, () => args.newText ?? "");
|
|
323996
|
-
await
|
|
324137
|
+
await import_fs12.promises.writeFile(abs, after, "utf-8");
|
|
323997
324138
|
return {
|
|
323998
324139
|
path: rel,
|
|
323999
324140
|
replacements: args.replaceAll ? count : 1,
|
|
@@ -324004,14 +324145,14 @@ var init_files = __esm({
|
|
|
324004
324145
|
async delete(args) {
|
|
324005
324146
|
if (!args.path) throw new WorkspaceError("path is required");
|
|
324006
324147
|
const { abs, rel } = await this.resolvePath(args.path, { forWrite: true });
|
|
324007
|
-
const stat2 = await
|
|
324148
|
+
const stat2 = await import_fs12.promises.lstat(abs).catch(() => null);
|
|
324008
324149
|
if (!stat2) return { path: rel, deleted: false };
|
|
324009
324150
|
if (stat2.isDirectory()) {
|
|
324010
324151
|
throw new WorkspaceError(
|
|
324011
324152
|
`${rel} is a directory - only files can be deleted (use RunCommand for more)`
|
|
324012
324153
|
);
|
|
324013
324154
|
}
|
|
324014
|
-
await
|
|
324155
|
+
await import_fs12.promises.unlink(abs);
|
|
324015
324156
|
return { path: rel, deleted: true };
|
|
324016
324157
|
}
|
|
324017
324158
|
async search(args) {
|
|
@@ -324063,7 +324204,7 @@ var init_files = __esm({
|
|
|
324063
324204
|
raw = [];
|
|
324064
324205
|
for (const file2 of await this.allFiles(rel, 2e4)) {
|
|
324065
324206
|
if (globRe && !globRe.test(file2)) continue;
|
|
324066
|
-
const text = await
|
|
324207
|
+
const text = await import_fs12.promises.readFile((0, import_path7.join)(this.root, file2)).catch(() => null);
|
|
324067
324208
|
if (!text || text.subarray(0, 8e3).includes(0)) continue;
|
|
324068
324209
|
text.toString("utf-8").split("\n").forEach((line, i2) => {
|
|
324069
324210
|
if (raw.length <= max && re.test(line)) {
|
|
@@ -324478,21 +324619,28 @@ function kill(child) {
|
|
|
324478
324619
|
} catch {
|
|
324479
324620
|
}
|
|
324480
324621
|
}
|
|
324481
|
-
var import_child_process8, import_crypto3,
|
|
324622
|
+
var import_child_process8, import_crypto3, import_fs13, import_path8, import_rxjs70, import_operators59, MAX_SESSIONS, WATCH_BATCH_MS, TerminalManager;
|
|
324482
324623
|
var init_terminals = __esm({
|
|
324483
324624
|
"src/commands/workspace/terminals.ts"() {
|
|
324484
324625
|
import_child_process8 = require("child_process");
|
|
324485
324626
|
import_crypto3 = require("crypto");
|
|
324486
|
-
|
|
324487
|
-
|
|
324627
|
+
import_fs13 = require("fs");
|
|
324628
|
+
import_path8 = require("path");
|
|
324488
324629
|
import_rxjs70 = __toESM(require_cjs());
|
|
324630
|
+
import_operators59 = __toESM(require_operators());
|
|
324489
324631
|
init_files();
|
|
324490
|
-
IGNORED = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
324491
324632
|
MAX_SESSIONS = 4;
|
|
324633
|
+
WATCH_BATCH_MS = 150;
|
|
324492
324634
|
TerminalManager = class {
|
|
324493
|
-
|
|
324635
|
+
/**
|
|
324636
|
+
* @param notIgnored keeps the paths `.gitignore` does not ignore
|
|
324637
|
+
* (WorkspaceFiles.notIgnored) - a build's output never reaches the
|
|
324638
|
+
* browser.
|
|
324639
|
+
*/
|
|
324640
|
+
constructor(root, env, notIgnored = (paths) => Promise.resolve(paths)) {
|
|
324494
324641
|
this.root = root;
|
|
324495
324642
|
this.env = env;
|
|
324643
|
+
this.notIgnored = notIgnored;
|
|
324496
324644
|
this.events$ = new import_rxjs70.Subject();
|
|
324497
324645
|
this.sessions = /* @__PURE__ */ new Map();
|
|
324498
324646
|
}
|
|
@@ -324531,9 +324679,17 @@ var init_terminals = __esm({
|
|
|
324531
324679
|
${e2.message}\r
|
|
324532
324680
|
` })
|
|
324533
324681
|
);
|
|
324682
|
+
const changed$ = new import_rxjs70.Subject();
|
|
324683
|
+
const changes = changed$.pipe(
|
|
324684
|
+
(0, import_operators59.bufferTime)(WATCH_BATCH_MS),
|
|
324685
|
+
(0, import_operators59.filter)((paths) => paths.length > 0),
|
|
324686
|
+
(0, import_operators59.concatMap)((paths) => (0, import_rxjs70.from)(this.notIgnored([...new Set(paths)]))),
|
|
324687
|
+
(0, import_operators59.mergeMap)((paths) => (0, import_rxjs70.from)(paths))
|
|
324688
|
+
).subscribe((path2) => emit({ kind: "changed", data: path2 }));
|
|
324534
324689
|
this.sessions.set(sessionId, {
|
|
324535
324690
|
child,
|
|
324536
|
-
watcher: this.watchRoot((path2) =>
|
|
324691
|
+
watcher: this.watchRoot((path2) => changed$.next(path2)),
|
|
324692
|
+
changes
|
|
324537
324693
|
});
|
|
324538
324694
|
return { sessionId, pty: command === "script" };
|
|
324539
324695
|
}
|
|
@@ -324560,15 +324716,17 @@ ${e2.message}\r
|
|
|
324560
324716
|
return session;
|
|
324561
324717
|
}
|
|
324562
324718
|
forget(sessionId) {
|
|
324563
|
-
this.sessions.get(sessionId)
|
|
324719
|
+
const session = this.sessions.get(sessionId);
|
|
324720
|
+
session?.watcher?.close();
|
|
324721
|
+
session?.changes.unsubscribe();
|
|
324564
324722
|
this.sessions.delete(sessionId);
|
|
324565
324723
|
}
|
|
324566
324724
|
/** Recursive watch of the root (Node >= 20 on Linux, macOS, Windows). */
|
|
324567
324725
|
watchRoot(onChange) {
|
|
324568
324726
|
try {
|
|
324569
|
-
return (0,
|
|
324570
|
-
const path2 = filename?.toString().split(
|
|
324571
|
-
if (path2
|
|
324727
|
+
return (0, import_fs13.watch)(this.root, { recursive: true }, (_event, filename) => {
|
|
324728
|
+
const path2 = filename?.toString().split(import_path8.sep).join("/");
|
|
324729
|
+
if (path2) {
|
|
324572
324730
|
onChange(path2);
|
|
324573
324731
|
}
|
|
324574
324732
|
});
|
|
@@ -324581,12 +324739,12 @@ ${e2.message}\r
|
|
|
324581
324739
|
});
|
|
324582
324740
|
|
|
324583
324741
|
// src/commands/workspace/connection.ts
|
|
324584
|
-
var import_os7, import_rxjs71,
|
|
324742
|
+
var import_os7, import_rxjs71, import_operators60, WORKSPACE_PATH_PREFIX, WORKSPACE_OPS, HEARTBEAT_MUTATION2, REQUEST_APPROVAL_MUTATION, PUSH_TERMINAL_MUTATION, SETTLE_APPROVAL_MUTATION, str, num2, short, WorkspaceConnection;
|
|
324585
324743
|
var init_connection2 = __esm({
|
|
324586
324744
|
"src/commands/workspace/connection.ts"() {
|
|
324587
324745
|
import_os7 = require("os");
|
|
324588
324746
|
import_rxjs71 = __toESM(require_cjs());
|
|
324589
|
-
|
|
324747
|
+
import_operators60 = __toESM(require_operators());
|
|
324590
324748
|
init_tunnel();
|
|
324591
324749
|
init_approvals();
|
|
324592
324750
|
init_files();
|
|
@@ -324630,13 +324788,18 @@ var init_connection2 = __esm({
|
|
|
324630
324788
|
constructor(options) {
|
|
324631
324789
|
super(options);
|
|
324632
324790
|
this.options = options;
|
|
324633
|
-
this.terminals = new TerminalManager(
|
|
324791
|
+
this.terminals = new TerminalManager(
|
|
324792
|
+
options.root,
|
|
324793
|
+
() => buildEnv(options),
|
|
324794
|
+
// read when a change comes in - this.files exists by then
|
|
324795
|
+
(paths) => this.files.notIgnored(paths)
|
|
324796
|
+
);
|
|
324634
324797
|
this.terminals.events$.pipe(
|
|
324635
|
-
(0,
|
|
324636
|
-
(0,
|
|
324637
|
-
(0,
|
|
324798
|
+
(0, import_operators60.bufferTime)(40),
|
|
324799
|
+
(0, import_operators60.filter)((events) => events.length > 0),
|
|
324800
|
+
(0, import_operators60.concatMap)(
|
|
324638
324801
|
(events) => (0, import_rxjs71.from)(this.operation(PUSH_TERMINAL_MUTATION, { events })).pipe(
|
|
324639
|
-
(0,
|
|
324802
|
+
(0, import_operators60.catchError)(() => import_rxjs71.EMPTY)
|
|
324640
324803
|
)
|
|
324641
324804
|
)
|
|
324642
324805
|
).subscribe();
|
|
@@ -325024,11 +325187,11 @@ __export(start_exports4, {
|
|
|
325024
325187
|
WORKSPACE_VERSION: () => WORKSPACE_VERSION,
|
|
325025
325188
|
default: () => start_default2
|
|
325026
325189
|
});
|
|
325027
|
-
var import_promises12,
|
|
325190
|
+
var import_promises12, import_path9, import_rxjs72, WORKSPACE_VERSION, csv, resolveWorkspace, start_default2;
|
|
325028
325191
|
var init_start4 = __esm({
|
|
325029
325192
|
"src/commands/workspace/start.ts"() {
|
|
325030
325193
|
import_promises12 = require("fs/promises");
|
|
325031
|
-
|
|
325194
|
+
import_path9 = require("path");
|
|
325032
325195
|
import_rxjs72 = __toESM(require_cjs());
|
|
325033
325196
|
init_helpers();
|
|
325034
325197
|
init_gql_client();
|
|
@@ -325046,7 +325209,7 @@ var init_start4 = __esm({
|
|
|
325046
325209
|
if (cmd.token) {
|
|
325047
325210
|
return {
|
|
325048
325211
|
id: "(from --token)",
|
|
325049
|
-
name: cmd.name ?? (0,
|
|
325212
|
+
name: cmd.name ?? (0, import_path9.basename)(root),
|
|
325050
325213
|
token: cmd.token,
|
|
325051
325214
|
projectId: cmd.project ?? "",
|
|
325052
325215
|
root
|
|
@@ -325066,7 +325229,7 @@ var init_start4 = __esm({
|
|
|
325066
325229
|
);
|
|
325067
325230
|
}
|
|
325068
325231
|
);
|
|
325069
|
-
const name2 = cmd.name || (0,
|
|
325232
|
+
const name2 = cmd.name || (0, import_path9.basename)(root);
|
|
325070
325233
|
Logger.info(`Registering ${root} as local workspace "${name2}"...`);
|
|
325071
325234
|
const { workspace, token } = await (0, import_rxjs72.lastValueFrom)(
|
|
325072
325235
|
GraphqlClienAPI.createLocalWorkspace(projectId, name2)
|
|
@@ -325978,7 +326141,7 @@ if (!isWebContainer) {
|
|
|
325978
326141
|
} else {
|
|
325979
326142
|
}
|
|
325980
326143
|
}
|
|
325981
|
-
var version2 = true ? "1.8.
|
|
326144
|
+
var version2 = true ? "1.8.269" : "development";
|
|
325982
326145
|
var main = (argv) => {
|
|
325983
326146
|
import_commander.program.name("gcli").version(version2);
|
|
325984
326147
|
commands.map((command) => command(import_commander.program));
|