@explorable-viz/fluid 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/shared/fluid.mjs +712 -651
- package/dist/fluid/shared/load-figure.js +866 -699
- package/dist/fluid/shared/webtest-lib.js +740 -740
- package/package.json +1 -1
@@ -380,7 +380,7 @@ function handleStoppedNotification(notification, subscriber) {
|
|
380
380
|
return onStoppedNotification(notification, subscriber);
|
381
381
|
});
|
382
382
|
}
|
383
|
-
function
|
383
|
+
function identity16(x) {
|
384
384
|
return x;
|
385
385
|
}
|
386
386
|
function pipe() {
|
@@ -392,7 +392,7 @@ function pipe() {
|
|
392
392
|
}
|
393
393
|
function pipeFromArray(fns) {
|
394
394
|
if (fns.length === 0) {
|
395
|
-
return
|
395
|
+
return identity16;
|
396
396
|
}
|
397
397
|
if (fns.length === 1) {
|
398
398
|
return fns[0];
|
@@ -910,12 +910,12 @@ function combineLatest() {
|
|
910
910
|
}
|
911
911
|
var result = new Observable(combineLatestInit(observables, scheduler, keys3 ? function(values2) {
|
912
912
|
return createObject(keys3, values2);
|
913
|
-
} :
|
913
|
+
} : identity16));
|
914
914
|
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
|
915
915
|
}
|
916
916
|
function combineLatestInit(observables, scheduler, valueTransform) {
|
917
917
|
if (valueTransform === void 0) {
|
918
|
-
valueTransform =
|
918
|
+
valueTransform = identity16;
|
919
919
|
}
|
920
920
|
return function(subscriber) {
|
921
921
|
maybeSchedule(scheduler, function() {
|
@@ -1035,7 +1035,7 @@ function mergeAll(concurrent) {
|
|
1035
1035
|
if (concurrent === void 0) {
|
1036
1036
|
concurrent = Infinity;
|
1037
1037
|
}
|
1038
|
-
return mergeMap(
|
1038
|
+
return mergeMap(identity16, concurrent);
|
1039
1039
|
}
|
1040
1040
|
function concatAll() {
|
1041
1041
|
return mergeAll(1);
|
@@ -1359,7 +1359,7 @@ function first(predicate, defaultValue) {
|
|
1359
1359
|
return function(source3) {
|
1360
1360
|
return source3.pipe(predicate ? filter5(function(v, i) {
|
1361
1361
|
return predicate(v, i, source3);
|
1362
|
-
}) :
|
1362
|
+
}) : identity16, take4(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() {
|
1363
1363
|
return new EmptyError();
|
1364
1364
|
}));
|
1365
1365
|
};
|
@@ -1384,7 +1384,7 @@ function raceWith() {
|
|
1384
1384
|
for (var _i = 0; _i < arguments.length; _i++) {
|
1385
1385
|
otherSources[_i] = arguments[_i];
|
1386
1386
|
}
|
1387
|
-
return !otherSources.length ?
|
1387
|
+
return !otherSources.length ? identity16 : operate(function(source3, subscriber) {
|
1388
1388
|
raceInit(__spreadArray([source3], __read(otherSources)))(subscriber);
|
1389
1389
|
});
|
1390
1390
|
}
|
@@ -1401,7 +1401,7 @@ function retry(configOrCount) {
|
|
1401
1401
|
};
|
1402
1402
|
}
|
1403
1403
|
var _a4 = config2.count, count = _a4 === void 0 ? Infinity : _a4, delay2 = config2.delay, _b2 = config2.resetOnSuccess, resetOnSuccess = _b2 === void 0 ? false : _b2;
|
1404
|
-
return count <= 0 ?
|
1404
|
+
return count <= 0 ? identity16 : operate(function(source3, subscriber) {
|
1405
1405
|
var soFar = 0;
|
1406
1406
|
var innerSub;
|
1407
1407
|
var subscribeForRetry = function() {
|
@@ -1516,7 +1516,7 @@ function tap(observerOrNext, error3, complete) {
|
|
1516
1516
|
}
|
1517
1517
|
(_b2 = tapObserver.finalize) === null || _b2 === void 0 ? void 0 : _b2.call(tapObserver);
|
1518
1518
|
}));
|
1519
|
-
}) :
|
1519
|
+
}) : identity16;
|
1520
1520
|
}
|
1521
1521
|
var extendStatics, UnsubscriptionError, Subscription, EMPTY_SUBSCRIPTION, config, timeoutProvider, COMPLETE_NOTIFICATION, context, Subscriber, _bind2, ConsumerObserver, SafeSubscriber, EMPTY_OBSERVER, observable, Observable, OperatorSubscriber, ObjectUnsubscribedError, Subject, AnonymousSubject, dateTimestampProvider, ReplaySubject, Action, intervalProvider, AsyncAction, Scheduler, AsyncScheduler, asyncScheduler, async, EMPTY, isArrayLike, iterator, EmptyError, isArray2, isArray22, getPrototypeOf, objectProto, getKeys, nodeEventEmitterMethods, eventTargetMethods, jqueryMethods, NEVER, isArray3;
|
1522
1522
|
var init_rxjs = __esm({
|
@@ -6638,7 +6638,7 @@ var init_locators = __esm({
|
|
6638
6638
|
}), mergeMap(() => {
|
6639
6639
|
return defer2(() => {
|
6640
6640
|
return from(handle.isIntersectingViewport({ threshold: 0 }));
|
6641
|
-
}).pipe(first(
|
6641
|
+
}).pipe(first(identity16), retry({ delay: RETRY_DELAY }), ignoreElements());
|
6642
6642
|
}));
|
6643
6643
|
};
|
6644
6644
|
#click(options) {
|
@@ -6945,7 +6945,7 @@ var init_locators = __esm({
|
|
6945
6945
|
return from(handle.isVisible());
|
6946
6946
|
});
|
6947
6947
|
}
|
6948
|
-
})().pipe(first(
|
6948
|
+
})().pipe(first(identity16), retry({ delay: RETRY_DELAY }), ignoreElements());
|
6949
6949
|
};
|
6950
6950
|
_clone() {
|
6951
6951
|
return new NodeLocator(this.#pageOrFrame, this.#selector).copyOptions(this);
|
@@ -7993,8 +7993,8 @@ var init_Page = __esm({
|
|
7993
7993
|
fromEmitterEvent(this, "request").pipe(mergeMap((originalRequest) => {
|
7994
7994
|
return concat2(of(1), merge(fromEmitterEvent(this, "requestfailed"), fromEmitterEvent(this, "requestfinished"), fromEmitterEvent(this, "response").pipe(map2((response) => {
|
7995
7995
|
return response.request();
|
7996
|
-
}))).pipe(filter5((
|
7997
|
-
return
|
7996
|
+
}))).pipe(filter5((request4) => {
|
7997
|
+
return request4.id === originalRequest.id;
|
7998
7998
|
}), take4(1), map2(() => {
|
7999
7999
|
return -1;
|
8000
8000
|
})));
|
@@ -8079,8 +8079,8 @@ var init_Page = __esm({
|
|
8079
8079
|
const { timeout: ms = this._timeoutSettings.timeout(), signal } = options;
|
8080
8080
|
if (typeof urlOrPredicate === "string") {
|
8081
8081
|
const url = urlOrPredicate;
|
8082
|
-
urlOrPredicate = (
|
8083
|
-
return
|
8082
|
+
urlOrPredicate = (request4) => {
|
8083
|
+
return request4.url() === url;
|
8084
8084
|
};
|
8085
8085
|
}
|
8086
8086
|
const observable$ = fromEmitterEvent(this, "request").pipe(filterAsync(urlOrPredicate), raceWith(timeout(ms), fromAbortSignal(signal), fromEmitterEvent(this, "close").pipe(map2(() => {
|
@@ -8994,11 +8994,11 @@ var init_CallbackRegistry = __esm({
|
|
8994
8994
|
CallbackRegistry = class {
|
8995
8995
|
#callbacks = /* @__PURE__ */ new Map();
|
8996
8996
|
#idGenerator = createIncrementalIdGenerator();
|
8997
|
-
create(label, timeout3,
|
8997
|
+
create(label, timeout3, request4) {
|
8998
8998
|
const callback = new Callback(this.#idGenerator(), label, timeout3);
|
8999
8999
|
this.#callbacks.set(callback.id, callback);
|
9000
9000
|
try {
|
9001
|
-
|
9001
|
+
request4(callback.id);
|
9002
9002
|
} catch (error3) {
|
9003
9003
|
callback.promise.catch(debugError).finally(() => {
|
9004
9004
|
this.#callbacks.delete(callback.id);
|
@@ -10607,14 +10607,14 @@ var require_BrowserProcessor = __commonJS({
|
|
10607
10607
|
return {};
|
10608
10608
|
}
|
10609
10609
|
async createUserContext(params) {
|
10610
|
-
const
|
10610
|
+
const request4 = {
|
10611
10611
|
proxyServer: params["goog:proxyServer"] ?? void 0
|
10612
10612
|
};
|
10613
10613
|
const proxyBypassList = params["goog:proxyBypassList"] ?? void 0;
|
10614
10614
|
if (proxyBypassList) {
|
10615
|
-
|
10615
|
+
request4.proxyBypassList = proxyBypassList.join(",");
|
10616
10616
|
}
|
10617
|
-
const context2 = await this.#browserCdpClient.sendCommand("Target.createBrowserContext",
|
10617
|
+
const context2 = await this.#browserCdpClient.sendCommand("Target.createBrowserContext", request4);
|
10618
10618
|
return {
|
10619
10619
|
userContext: context2.browserContextId
|
10620
10620
|
};
|
@@ -12785,11 +12785,11 @@ var require_NetworkProcessor = __commonJS({
|
|
12785
12785
|
if (params.headers) {
|
12786
12786
|
NetworkProcessor.validateHeaders(params.headers);
|
12787
12787
|
}
|
12788
|
-
const
|
12788
|
+
const request4 = this.#getBlockedRequestOrFail(params.request, [
|
12789
12789
|
"beforeRequestSent"
|
12790
12790
|
]);
|
12791
12791
|
try {
|
12792
|
-
await
|
12792
|
+
await request4.continueRequest(params);
|
12793
12793
|
} catch (error3) {
|
12794
12794
|
throw NetworkProcessor.wrapInterceptionError(error3);
|
12795
12795
|
}
|
@@ -12799,12 +12799,12 @@ var require_NetworkProcessor = __commonJS({
|
|
12799
12799
|
if (params.headers) {
|
12800
12800
|
NetworkProcessor.validateHeaders(params.headers);
|
12801
12801
|
}
|
12802
|
-
const
|
12802
|
+
const request4 = this.#getBlockedRequestOrFail(params.request, [
|
12803
12803
|
"authRequired",
|
12804
12804
|
"responseStarted"
|
12805
12805
|
]);
|
12806
12806
|
try {
|
12807
|
-
await
|
12807
|
+
await request4.continueResponse(params);
|
12808
12808
|
} catch (error3) {
|
12809
12809
|
throw NetworkProcessor.wrapInterceptionError(error3);
|
12810
12810
|
}
|
@@ -12812,34 +12812,34 @@ var require_NetworkProcessor = __commonJS({
|
|
12812
12812
|
}
|
12813
12813
|
async continueWithAuth(params) {
|
12814
12814
|
const networkId = params.request;
|
12815
|
-
const
|
12815
|
+
const request4 = this.#getBlockedRequestOrFail(networkId, [
|
12816
12816
|
"authRequired"
|
12817
12817
|
]);
|
12818
|
-
await
|
12818
|
+
await request4.continueWithAuth(params);
|
12819
12819
|
return {};
|
12820
12820
|
}
|
12821
12821
|
async failRequest({ request: networkId }) {
|
12822
|
-
const
|
12823
|
-
if (
|
12822
|
+
const request4 = this.#getRequestOrFail(networkId);
|
12823
|
+
if (request4.interceptPhase === "authRequired") {
|
12824
12824
|
throw new protocol_js_1.InvalidArgumentException(`Request '${networkId}' in 'authRequired' phase cannot be failed`);
|
12825
12825
|
}
|
12826
|
-
if (!
|
12826
|
+
if (!request4.interceptPhase) {
|
12827
12827
|
throw new protocol_js_1.NoSuchRequestException(`No blocked request found for network id '${networkId}'`);
|
12828
12828
|
}
|
12829
|
-
await
|
12829
|
+
await request4.failRequest("Failed");
|
12830
12830
|
return {};
|
12831
12831
|
}
|
12832
12832
|
async provideResponse(params) {
|
12833
12833
|
if (params.headers) {
|
12834
12834
|
NetworkProcessor.validateHeaders(params.headers);
|
12835
12835
|
}
|
12836
|
-
const
|
12836
|
+
const request4 = this.#getBlockedRequestOrFail(params.request, [
|
12837
12837
|
"beforeRequestSent",
|
12838
12838
|
"responseStarted",
|
12839
12839
|
"authRequired"
|
12840
12840
|
]);
|
12841
12841
|
try {
|
12842
|
-
await
|
12842
|
+
await request4.provideResponse(params);
|
12843
12843
|
} catch (error3) {
|
12844
12844
|
throw NetworkProcessor.wrapInterceptionError(error3);
|
12845
12845
|
}
|
@@ -12853,21 +12853,21 @@ var require_NetworkProcessor = __commonJS({
|
|
12853
12853
|
return {};
|
12854
12854
|
}
|
12855
12855
|
#getRequestOrFail(id2) {
|
12856
|
-
const
|
12857
|
-
if (!
|
12856
|
+
const request4 = this.#networkStorage.getRequestById(id2);
|
12857
|
+
if (!request4) {
|
12858
12858
|
throw new protocol_js_1.NoSuchRequestException(`Network request with ID '${id2}' doesn't exist`);
|
12859
12859
|
}
|
12860
|
-
return
|
12860
|
+
return request4;
|
12861
12861
|
}
|
12862
12862
|
#getBlockedRequestOrFail(id2, phases) {
|
12863
|
-
const
|
12864
|
-
if (!
|
12863
|
+
const request4 = this.#getRequestOrFail(id2);
|
12864
|
+
if (!request4.interceptPhase) {
|
12865
12865
|
throw new protocol_js_1.NoSuchRequestException(`No blocked request found for network id '${id2}'`);
|
12866
12866
|
}
|
12867
|
-
if (
|
12868
|
-
throw new protocol_js_1.InvalidArgumentException(`Blocked request for network id '${id2}' is in '${
|
12867
|
+
if (request4.interceptPhase && !phases.includes(request4.interceptPhase)) {
|
12868
|
+
throw new protocol_js_1.InvalidArgumentException(`Blocked request for network id '${id2}' is in '${request4.interceptPhase}' phase`);
|
12869
12869
|
}
|
12870
|
-
return
|
12870
|
+
return request4;
|
12871
12871
|
}
|
12872
12872
|
static validateHeaders(headers) {
|
12873
12873
|
for (const header of headers) {
|
@@ -18162,13 +18162,13 @@ var require_NetworkStorage = __commonJS({
|
|
18162
18162
|
this.#logger = logger;
|
18163
18163
|
}
|
18164
18164
|
#getOrCreateNetworkRequest(id2, cdpTarget, redirectCount) {
|
18165
|
-
let
|
18166
|
-
if (
|
18167
|
-
return
|
18165
|
+
let request4 = this.getRequestById(id2);
|
18166
|
+
if (request4) {
|
18167
|
+
return request4;
|
18168
18168
|
}
|
18169
|
-
|
18170
|
-
this.addRequest(
|
18171
|
-
return
|
18169
|
+
request4 = new NetworkRequest_js_1.NetworkRequest(id2, this.#eventManager, this, cdpTarget, redirectCount, this.#logger);
|
18170
|
+
this.addRequest(request4);
|
18171
|
+
return request4;
|
18172
18172
|
}
|
18173
18173
|
onCdpTargetCreated(cdpTarget) {
|
18174
18174
|
const cdpClient = cdpTarget.cdpClient;
|
@@ -18176,11 +18176,11 @@ var require_NetworkStorage = __commonJS({
|
|
18176
18176
|
[
|
18177
18177
|
"Network.requestWillBeSent",
|
18178
18178
|
(params) => {
|
18179
|
-
const
|
18180
|
-
if (
|
18181
|
-
|
18179
|
+
const request4 = this.getRequestById(params.requestId);
|
18180
|
+
if (request4 && request4.isRedirecting()) {
|
18181
|
+
request4.handleRedirect(params);
|
18182
18182
|
this.deleteRequest(params.requestId);
|
18183
|
-
this.#getOrCreateNetworkRequest(params.requestId, cdpTarget,
|
18183
|
+
this.#getOrCreateNetworkRequest(params.requestId, cdpTarget, request4.redirectCount + 1).onRequestWillBeSentEvent(params);
|
18184
18184
|
} else {
|
18185
18185
|
this.#getOrCreateNetworkRequest(params.requestId, cdpTarget).onRequestWillBeSentEvent(params);
|
18186
18186
|
}
|
@@ -18228,11 +18228,11 @@ var require_NetworkStorage = __commonJS({
|
|
18228
18228
|
[
|
18229
18229
|
"Fetch.authRequired",
|
18230
18230
|
(event) => {
|
18231
|
-
let
|
18232
|
-
if (!
|
18233
|
-
|
18231
|
+
let request4 = this.getRequestByFetchId(event.requestId);
|
18232
|
+
if (!request4) {
|
18233
|
+
request4 = this.#getOrCreateNetworkRequest(event.requestId, cdpTarget);
|
18234
18234
|
}
|
18235
|
-
|
18235
|
+
request4.onAuthRequired(event);
|
18236
18236
|
}
|
18237
18237
|
]
|
18238
18238
|
];
|
@@ -18256,13 +18256,13 @@ var require_NetworkStorage = __commonJS({
|
|
18256
18256
|
}
|
18257
18257
|
return stages;
|
18258
18258
|
}
|
18259
|
-
getInterceptsForPhase(
|
18260
|
-
if (
|
18259
|
+
getInterceptsForPhase(request4, phase) {
|
18260
|
+
if (request4.url === NetworkRequest_js_1.NetworkRequest.unknownParameter) {
|
18261
18261
|
return /* @__PURE__ */ new Set();
|
18262
18262
|
}
|
18263
18263
|
const intercepts = /* @__PURE__ */ new Set();
|
18264
18264
|
for (const [interceptId, intercept] of this.#intercepts.entries()) {
|
18265
|
-
if (!intercept.phases.includes(phase) || intercept.contexts && !intercept.contexts.includes(
|
18265
|
+
if (!intercept.phases.includes(phase) || intercept.contexts && !intercept.contexts.includes(request4.cdpTarget.topLevelId)) {
|
18266
18266
|
continue;
|
18267
18267
|
}
|
18268
18268
|
if (intercept.urlPatterns.length === 0) {
|
@@ -18270,7 +18270,7 @@ var require_NetworkStorage = __commonJS({
|
|
18270
18270
|
continue;
|
18271
18271
|
}
|
18272
18272
|
for (const pattern of intercept.urlPatterns) {
|
18273
|
-
if ((0, NetworkUtils_js_1.matchUrlPattern)(pattern,
|
18273
|
+
if ((0, NetworkUtils_js_1.matchUrlPattern)(pattern, request4.url)) {
|
18274
18274
|
intercepts.add(interceptId);
|
18275
18275
|
break;
|
18276
18276
|
}
|
@@ -18279,9 +18279,9 @@ var require_NetworkStorage = __commonJS({
|
|
18279
18279
|
return intercepts;
|
18280
18280
|
}
|
18281
18281
|
disposeRequestMap(sessionId) {
|
18282
|
-
for (const
|
18283
|
-
if (
|
18284
|
-
this.#requests.delete(
|
18282
|
+
for (const request4 of this.#requests.values()) {
|
18283
|
+
if (request4.cdpClient.sessionId === sessionId) {
|
18284
|
+
this.#requests.delete(request4.id);
|
18285
18285
|
}
|
18286
18286
|
}
|
18287
18287
|
}
|
@@ -18300,15 +18300,15 @@ var require_NetworkStorage = __commonJS({
|
|
18300
18300
|
return this.#requests.get(id2);
|
18301
18301
|
}
|
18302
18302
|
getRequestByFetchId(fetchId) {
|
18303
|
-
for (const
|
18304
|
-
if (
|
18305
|
-
return
|
18303
|
+
for (const request4 of this.#requests.values()) {
|
18304
|
+
if (request4.fetchId === fetchId) {
|
18305
|
+
return request4;
|
18306
18306
|
}
|
18307
18307
|
}
|
18308
18308
|
return;
|
18309
18309
|
}
|
18310
|
-
addRequest(
|
18311
|
-
this.#requests.set(
|
18310
|
+
addRequest(request4) {
|
18311
|
+
this.#requests.set(request4.id, request4);
|
18312
18312
|
}
|
18313
18313
|
deleteRequest(id2) {
|
18314
18314
|
this.#requests.delete(id2);
|
@@ -19431,15 +19431,15 @@ var init_Navigation = __esm({
|
|
19431
19431
|
});
|
19432
19432
|
this.dispose();
|
19433
19433
|
});
|
19434
|
-
browsingContextEmitter.on("request", ({ request:
|
19435
|
-
if (
|
19434
|
+
browsingContextEmitter.on("request", ({ request: request4 }) => {
|
19435
|
+
if (request4.navigation === void 0 || !this.#matches(request4.navigation)) {
|
19436
19436
|
return;
|
19437
19437
|
}
|
19438
|
-
this.#request =
|
19439
|
-
this.emit("request",
|
19438
|
+
this.#request = request4;
|
19439
|
+
this.emit("request", request4);
|
19440
19440
|
const requestEmitter = this.#disposables.use(new EventEmitter(this.#request));
|
19441
|
-
requestEmitter.on("redirect", (
|
19442
|
-
this.#request =
|
19441
|
+
requestEmitter.on("redirect", (request5) => {
|
19442
|
+
this.#request = request5;
|
19443
19443
|
});
|
19444
19444
|
});
|
19445
19445
|
const sessionEmitter = this.#disposables.use(new EventEmitter(this.#session));
|
@@ -19863,9 +19863,9 @@ var init_Request = __esm({
|
|
19863
19863
|
Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
19864
19864
|
}
|
19865
19865
|
static from(browsingContext, event) {
|
19866
|
-
const
|
19867
|
-
|
19868
|
-
return
|
19866
|
+
const request4 = new Request2(browsingContext, event);
|
19867
|
+
request4.#initialize();
|
19868
|
+
return request4;
|
19869
19869
|
}
|
19870
19870
|
#error = __runInitializers10(this, _instanceExtraInitializers);
|
19871
19871
|
#redirect;
|
@@ -20367,8 +20367,8 @@ var init_BrowsingContext = __esm({
|
|
20367
20367
|
if (info2.context !== this.id) {
|
20368
20368
|
return;
|
20369
20369
|
}
|
20370
|
-
for (const [id2,
|
20371
|
-
if (
|
20370
|
+
for (const [id2, request4] of this.#requests) {
|
20371
|
+
if (request4.disposed) {
|
20372
20372
|
this.#requests.delete(id2);
|
20373
20373
|
}
|
20374
20374
|
}
|
@@ -20392,9 +20392,9 @@ var init_BrowsingContext = __esm({
|
|
20392
20392
|
if (this.#requests.has(event.request.request)) {
|
20393
20393
|
return;
|
20394
20394
|
}
|
20395
|
-
const
|
20396
|
-
this.#requests.set(
|
20397
|
-
this.emit("request", { request:
|
20395
|
+
const request4 = Request.from(this, event);
|
20396
|
+
this.#requests.set(request4.id, request4);
|
20397
|
+
this.emit("request", { request: request4 });
|
20398
20398
|
});
|
20399
20399
|
sessionEmitter.on("log.entryAdded", (entry) => {
|
20400
20400
|
if (entry.source.context !== this.id) {
|
@@ -21550,8 +21550,8 @@ var init_HTTPResponse2 = __esm({
|
|
21550
21550
|
if (_metadata)
|
21551
21551
|
Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
21552
21552
|
}
|
21553
|
-
static from(data,
|
21554
|
-
const response = new BidiHTTPResponse2(data,
|
21553
|
+
static from(data, request4, cdpSupported) {
|
21554
|
+
const response = new BidiHTTPResponse2(data, request4, cdpSupported);
|
21555
21555
|
response.#initialize();
|
21556
21556
|
return response;
|
21557
21557
|
}
|
@@ -21559,10 +21559,10 @@ var init_HTTPResponse2 = __esm({
|
|
21559
21559
|
#request;
|
21560
21560
|
#securityDetails;
|
21561
21561
|
#cdpSupported = false;
|
21562
|
-
constructor(data,
|
21562
|
+
constructor(data, request4, cdpSupported) {
|
21563
21563
|
super();
|
21564
21564
|
this.#data = data;
|
21565
|
-
this.#request =
|
21565
|
+
this.#request = request4;
|
21566
21566
|
this.#cdpSupported = cdpSupported;
|
21567
21567
|
const securityDetails = data["goog:securityDetails"];
|
21568
21568
|
if (cdpSupported && securityDetails) {
|
@@ -21680,35 +21680,35 @@ var init_HTTPRequest2 = __esm({
|
|
21680
21680
|
requests = /* @__PURE__ */ new WeakMap();
|
21681
21681
|
BidiHTTPRequest = class extends HTTPRequest {
|
21682
21682
|
static from(bidiRequest, frame, redirect) {
|
21683
|
-
const
|
21684
|
-
|
21685
|
-
return
|
21683
|
+
const request4 = new _a2(bidiRequest, frame, redirect);
|
21684
|
+
request4.#initialize();
|
21685
|
+
return request4;
|
21686
21686
|
}
|
21687
21687
|
#redirectChain;
|
21688
21688
|
#response = null;
|
21689
21689
|
id;
|
21690
21690
|
#frame;
|
21691
21691
|
#request;
|
21692
|
-
constructor(
|
21692
|
+
constructor(request4, frame, redirect) {
|
21693
21693
|
super();
|
21694
|
-
requests.set(
|
21695
|
-
this.interception.enabled =
|
21696
|
-
this.#request =
|
21694
|
+
requests.set(request4, this);
|
21695
|
+
this.interception.enabled = request4.isBlocked;
|
21696
|
+
this.#request = request4;
|
21697
21697
|
this.#frame = frame;
|
21698
21698
|
this.#redirectChain = redirect ? redirect.#redirectChain : [];
|
21699
|
-
this.id =
|
21699
|
+
this.id = request4.id;
|
21700
21700
|
}
|
21701
21701
|
get client() {
|
21702
21702
|
return this.#frame.client;
|
21703
21703
|
}
|
21704
21704
|
#initialize() {
|
21705
|
-
this.#request.on("redirect", (
|
21706
|
-
const httpRequest2 = _a2.from(
|
21705
|
+
this.#request.on("redirect", (request4) => {
|
21706
|
+
const httpRequest2 = _a2.from(request4, this.#frame, this);
|
21707
21707
|
this.#redirectChain.push(this);
|
21708
|
-
|
21708
|
+
request4.once("success", () => {
|
21709
21709
|
this.#frame.page().trustedEmitter.emit("requestfinished", httpRequest2);
|
21710
21710
|
});
|
21711
|
-
|
21711
|
+
request4.once("error", () => {
|
21712
21712
|
this.#frame.page().trustedEmitter.emit("requestfailed", httpRequest2);
|
21713
21713
|
});
|
21714
21714
|
void httpRequest2.finalizeInterceptions();
|
@@ -22598,12 +22598,12 @@ var init_Frame2 = __esm({
|
|
22598
22598
|
}
|
22599
22599
|
this.page().trustedEmitter.emit("framedetached", this);
|
22600
22600
|
});
|
22601
|
-
this.browsingContext.on("request", ({ request:
|
22602
|
-
const httpRequest2 = BidiHTTPRequest.from(
|
22603
|
-
|
22601
|
+
this.browsingContext.on("request", ({ request: request4 }) => {
|
22602
|
+
const httpRequest2 = BidiHTTPRequest.from(request4, this);
|
22603
|
+
request4.once("success", () => {
|
22604
22604
|
this.page().trustedEmitter.emit("requestfinished", httpRequest2);
|
22605
22605
|
});
|
22606
|
-
|
22606
|
+
request4.once("error", () => {
|
22607
22607
|
this.page().trustedEmitter.emit("requestfailed", httpRequest2);
|
22608
22608
|
});
|
22609
22609
|
void httpRequest2.finalizeInterceptions();
|
@@ -22758,15 +22758,15 @@ var init_Frame2 = __esm({
|
|
22758
22758
|
throw new Error(`Navigation aborted: ${url}`);
|
22759
22759
|
}))), switchMap(() => {
|
22760
22760
|
if (navigation.request) {
|
22761
|
-
let requestFinished$ = function(
|
22762
|
-
if (
|
22761
|
+
let requestFinished$ = function(request4) {
|
22762
|
+
if (request4.response || request4.error) {
|
22763
22763
|
return of(navigation);
|
22764
22764
|
}
|
22765
|
-
if (
|
22766
|
-
return requestFinished$(
|
22765
|
+
if (request4.redirect) {
|
22766
|
+
return requestFinished$(request4.redirect);
|
22767
22767
|
}
|
22768
|
-
return fromEmitterEvent(
|
22769
|
-
return requestFinished$(
|
22768
|
+
return fromEmitterEvent(request4, "success").pipe(raceWith(fromEmitterEvent(request4, "error")), raceWith(fromEmitterEvent(request4, "redirect"))).pipe(switchMap(() => {
|
22769
|
+
return requestFinished$(request4);
|
22770
22770
|
}));
|
22771
22771
|
};
|
22772
22772
|
return requestFinished$(navigation.request);
|
@@ -22776,11 +22776,11 @@ var init_Frame2 = __esm({
|
|
22776
22776
|
})),
|
22777
22777
|
this.#waitForNetworkIdle$(options)
|
22778
22778
|
]).pipe(map2(([navigation]) => {
|
22779
|
-
const
|
22780
|
-
if (!
|
22779
|
+
const request4 = navigation.request;
|
22780
|
+
if (!request4) {
|
22781
22781
|
return null;
|
22782
22782
|
}
|
22783
|
-
const lastRequest =
|
22783
|
+
const lastRequest = request4.lastRedirect ?? request4;
|
22784
22784
|
const httpRequest2 = requests.get(lastRequest);
|
22785
22785
|
return httpRequest2.response();
|
22786
22786
|
}), raceWith(timeout(ms), fromAbortSignal(signal), this.#detached$().pipe(map2(() => {
|
@@ -27694,7 +27694,7 @@ var require_websocket = __commonJS({
|
|
27694
27694
|
}
|
27695
27695
|
const defaultPort = isSecure ? 443 : 80;
|
27696
27696
|
const key = randomBytes(16).toString("base64");
|
27697
|
-
const
|
27697
|
+
const request4 = isSecure ? https2.request : http2.request;
|
27698
27698
|
const protocolSet = /* @__PURE__ */ new Set();
|
27699
27699
|
let perMessageDeflate;
|
27700
27700
|
opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
@@ -27772,12 +27772,12 @@ var require_websocket = __commonJS({
|
|
27772
27772
|
if (opts.auth && !options.headers.authorization) {
|
27773
27773
|
options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
|
27774
27774
|
}
|
27775
|
-
req2 = websocket._req =
|
27775
|
+
req2 = websocket._req = request4(opts);
|
27776
27776
|
if (websocket._redirects) {
|
27777
27777
|
websocket.emit("redirect", websocket.url, req2);
|
27778
27778
|
}
|
27779
27779
|
} else {
|
27780
|
-
req2 = websocket._req =
|
27780
|
+
req2 = websocket._req = request4(opts);
|
27781
27781
|
}
|
27782
27782
|
if (opts.timeout) {
|
27783
27783
|
req2.on("timeout", () => {
|
@@ -29026,8 +29026,8 @@ var require_minor = __commonJS({
|
|
29026
29026
|
var require_patch = __commonJS({
|
29027
29027
|
"node_modules/semver/functions/patch.js"(exports, module2) {
|
29028
29028
|
var SemVer = require_semver();
|
29029
|
-
var
|
29030
|
-
module2.exports =
|
29029
|
+
var patch2 = (a, loose) => new SemVer(a, loose).patch;
|
29030
|
+
module2.exports = patch2;
|
29031
29031
|
}
|
29032
29032
|
});
|
29033
29033
|
|
@@ -29240,10 +29240,10 @@ var require_coerce = __commonJS({
|
|
29240
29240
|
}
|
29241
29241
|
const major = match3[2];
|
29242
29242
|
const minor = match3[3] || "0";
|
29243
|
-
const
|
29243
|
+
const patch2 = match3[4] || "0";
|
29244
29244
|
const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
|
29245
29245
|
const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
|
29246
|
-
return parse2(`${major}.${minor}.${
|
29246
|
+
return parse2(`${major}.${minor}.${patch2}${prerelease}${build}`, options);
|
29247
29247
|
};
|
29248
29248
|
module2.exports = coerce2;
|
29249
29249
|
}
|
@@ -30248,7 +30248,7 @@ var require_semver2 = __commonJS({
|
|
30248
30248
|
var diff = require_diff();
|
30249
30249
|
var major = require_major();
|
30250
30250
|
var minor = require_minor();
|
30251
|
-
var
|
30251
|
+
var patch2 = require_patch();
|
30252
30252
|
var prerelease = require_prerelease();
|
30253
30253
|
var compare2 = require_compare();
|
30254
30254
|
var rcompare = require_rcompare();
|
@@ -30286,7 +30286,7 @@ var require_semver2 = __commonJS({
|
|
30286
30286
|
diff,
|
30287
30287
|
major,
|
30288
30288
|
minor,
|
30289
|
-
patch,
|
30289
|
+
patch: patch2,
|
30290
30290
|
prerelease,
|
30291
30291
|
compare: compare2,
|
30292
30292
|
rcompare,
|
@@ -37071,8 +37071,8 @@ var require_polyfills = __commonJS({
|
|
37071
37071
|
cwd = null;
|
37072
37072
|
chdir.call(process, d);
|
37073
37073
|
};
|
37074
|
-
module2.exports =
|
37075
|
-
function
|
37074
|
+
module2.exports = patch2;
|
37075
|
+
function patch2(fs6) {
|
37076
37076
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
37077
37077
|
patchLchmod(fs6);
|
37078
37078
|
}
|
@@ -37548,14 +37548,14 @@ var require_graceful_fs = __commonJS({
|
|
37548
37548
|
if (!global[gracefulQueue]) {
|
37549
37549
|
publishQueue(global, fs6[gracefulQueue]);
|
37550
37550
|
}
|
37551
|
-
module2.exports =
|
37551
|
+
module2.exports = patch2(clone(fs6));
|
37552
37552
|
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs6.__patched) {
|
37553
|
-
module2.exports =
|
37553
|
+
module2.exports = patch2(fs6);
|
37554
37554
|
fs6.__patched = true;
|
37555
37555
|
}
|
37556
|
-
function
|
37556
|
+
function patch2(fs7) {
|
37557
37557
|
polyfills(fs7);
|
37558
|
-
fs7.gracefulify =
|
37558
|
+
fs7.gracefulify = patch2;
|
37559
37559
|
fs7.createReadStream = createReadStream;
|
37560
37560
|
fs7.createWriteStream = createWriteStream;
|
37561
37561
|
var fs$readFile = fs7.readFile;
|
@@ -42261,7 +42261,7 @@ var require_util2 = __commonJS({
|
|
42261
42261
|
var obj = /* @__PURE__ */ Object.create(null);
|
42262
42262
|
return !("__proto__" in obj);
|
42263
42263
|
}();
|
42264
|
-
function
|
42264
|
+
function identity17(s) {
|
42265
42265
|
return s;
|
42266
42266
|
}
|
42267
42267
|
function toSetString(aStr) {
|
@@ -42270,14 +42270,14 @@ var require_util2 = __commonJS({
|
|
42270
42270
|
}
|
42271
42271
|
return aStr;
|
42272
42272
|
}
|
42273
|
-
exports.toSetString = supportsNullProto ?
|
42273
|
+
exports.toSetString = supportsNullProto ? identity17 : toSetString;
|
42274
42274
|
function fromSetString(aStr) {
|
42275
42275
|
if (isProtoString(aStr)) {
|
42276
42276
|
return aStr.slice(1);
|
42277
42277
|
}
|
42278
42278
|
return aStr;
|
42279
42279
|
}
|
42280
|
-
exports.fromSetString = supportsNullProto ?
|
42280
|
+
exports.fromSetString = supportsNullProto ? identity17 : fromSetString;
|
42281
42281
|
function isProtoString(s) {
|
42282
42282
|
if (!s) {
|
42283
42283
|
return false;
|
@@ -54318,11 +54318,11 @@ var require_path_visitor = __commonJS({
|
|
54318
54318
|
PVp.abort = function() {
|
54319
54319
|
var visitor = this;
|
54320
54320
|
visitor._abortRequested = true;
|
54321
|
-
var
|
54322
|
-
|
54321
|
+
var request4 = new visitor.AbortRequest();
|
54322
|
+
request4.cancel = function() {
|
54323
54323
|
visitor._abortRequested = false;
|
54324
54324
|
};
|
54325
|
-
throw
|
54325
|
+
throw request4;
|
54326
54326
|
};
|
54327
54327
|
PVp.reset = function(_path) {
|
54328
54328
|
};
|
@@ -63758,7 +63758,7 @@ var require_headers = __commonJS({
|
|
63758
63758
|
}
|
63759
63759
|
return result;
|
63760
63760
|
};
|
63761
|
-
exports.encode = function
|
63761
|
+
exports.encode = function encode2(opts) {
|
63762
63762
|
const buf = b4a.alloc(512);
|
63763
63763
|
let name2 = opts.name;
|
63764
63764
|
let prefix = "";
|
@@ -68123,7 +68123,7 @@ var require_ansi_styles = __commonJS({
|
|
68123
68123
|
});
|
68124
68124
|
};
|
68125
68125
|
var colorConvert;
|
68126
|
-
var makeDynamicStyles = (wrap2, targetSpace,
|
68126
|
+
var makeDynamicStyles = (wrap2, targetSpace, identity17, isBackground) => {
|
68127
68127
|
if (colorConvert === void 0) {
|
68128
68128
|
colorConvert = require_color_convert();
|
68129
68129
|
}
|
@@ -68132,7 +68132,7 @@ var require_ansi_styles = __commonJS({
|
|
68132
68132
|
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
68133
68133
|
const name2 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
68134
68134
|
if (sourceSpace === targetSpace) {
|
68135
|
-
styles[name2] = wrap2(
|
68135
|
+
styles[name2] = wrap2(identity17, offset);
|
68136
68136
|
} else if (typeof suite === "object") {
|
68137
68137
|
styles[name2] = wrap2(suite[targetSpace], offset);
|
68138
68138
|
}
|
@@ -70793,7 +70793,7 @@ var require_json_parse_even_better_errors = __commonJS({
|
|
70793
70793
|
var kNewline = Symbol.for("newline");
|
70794
70794
|
var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
|
70795
70795
|
var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
|
70796
|
-
var
|
70796
|
+
var parseJson = (txt, reviver, context2) => {
|
70797
70797
|
const parseText = stripBOM(txt);
|
70798
70798
|
context2 = context2 || 20;
|
70799
70799
|
try {
|
@@ -70814,13 +70814,13 @@ var require_json_parse_even_better_errors = __commonJS({
|
|
70814
70814
|
systemError: e
|
70815
70815
|
});
|
70816
70816
|
}
|
70817
|
-
throw new JSONParseError(e, parseText, context2,
|
70817
|
+
throw new JSONParseError(e, parseText, context2, parseJson);
|
70818
70818
|
}
|
70819
70819
|
};
|
70820
70820
|
var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
|
70821
|
-
module2.exports =
|
70822
|
-
|
70823
|
-
|
70821
|
+
module2.exports = parseJson;
|
70822
|
+
parseJson.JSONParseError = JSONParseError;
|
70823
|
+
parseJson.noExceptions = (txt, reviver) => {
|
70824
70824
|
try {
|
70825
70825
|
return JSON.parse(stripBOM(txt), reviver);
|
70826
70826
|
} catch (e) {
|
@@ -73041,7 +73041,7 @@ var require_parse_json = __commonJS({
|
|
73041
73041
|
fileName: errorEx.append("in %s"),
|
73042
73042
|
codeFrame: errorEx.append("\n\n%s\n")
|
73043
73043
|
});
|
73044
|
-
var
|
73044
|
+
var parseJson = (string3, reviver, filename) => {
|
73045
73045
|
if (typeof reviver === "string") {
|
73046
73046
|
filename = reviver;
|
73047
73047
|
reviver = null;
|
@@ -73074,8 +73074,8 @@ var require_parse_json = __commonJS({
|
|
73074
73074
|
throw jsonError;
|
73075
73075
|
}
|
73076
73076
|
};
|
73077
|
-
|
73078
|
-
module2.exports =
|
73077
|
+
parseJson.JSONError = JSONError;
|
73078
|
+
module2.exports = parseJson;
|
73079
73079
|
}
|
73080
73080
|
});
|
73081
73081
|
|
@@ -76501,7 +76501,7 @@ var require_typescript2 = __commonJS({
|
|
76501
76501
|
filter: () => filter6,
|
76502
76502
|
filterMutate: () => filterMutate,
|
76503
76503
|
filterSemanticDiagnostics: () => filterSemanticDiagnostics,
|
76504
|
-
find: () =>
|
76504
|
+
find: () => find2,
|
76505
76505
|
findAncestor: () => findAncestor,
|
76506
76506
|
findBestPatternMatch: () => findBestPatternMatch,
|
76507
76507
|
findChildOfKind: () => findChildOfKind,
|
@@ -77088,7 +77088,7 @@ var require_typescript2 = __commonJS({
|
|
77088
77088
|
idText: () => idText,
|
77089
77089
|
identifierIsThisKeyword: () => identifierIsThisKeyword,
|
77090
77090
|
identifierToKeywordKind: () => identifierToKeywordKind,
|
77091
|
-
identity: () =>
|
77091
|
+
identity: () => identity17,
|
77092
77092
|
identitySourceMapConsumer: () => identitySourceMapConsumer,
|
77093
77093
|
ignoreSourceNewlines: () => ignoreSourceNewlines,
|
77094
77094
|
ignoredPaths: () => ignoredPaths,
|
@@ -78382,7 +78382,7 @@ var require_typescript2 = __commonJS({
|
|
78382
78382
|
}
|
78383
78383
|
return true;
|
78384
78384
|
}
|
78385
|
-
function
|
78385
|
+
function find2(array, predicate, startIndex) {
|
78386
78386
|
if (array === void 0)
|
78387
78387
|
return void 0;
|
78388
78388
|
for (let i = startIndex ?? 0; i < array.length; i++) {
|
@@ -78808,7 +78808,7 @@ var require_typescript2 = __commonJS({
|
|
78808
78808
|
array.push(insert3);
|
78809
78809
|
return true;
|
78810
78810
|
}
|
78811
|
-
const insertIndex = binarySearch(array, insert3,
|
78811
|
+
const insertIndex = binarySearch(array, insert3, identity17, compare2);
|
78812
78812
|
if (insertIndex < 0) {
|
78813
78813
|
if (equalityComparer && !allowDuplicates) {
|
78814
78814
|
const idx = ~insertIndex;
|
@@ -79157,7 +79157,7 @@ var require_typescript2 = __commonJS({
|
|
79157
79157
|
}
|
79158
79158
|
return true;
|
79159
79159
|
}
|
79160
|
-
function arrayToMap(array, makeKey, makeValue =
|
79160
|
+
function arrayToMap(array, makeKey, makeValue = identity17) {
|
79161
79161
|
const result = /* @__PURE__ */ new Map();
|
79162
79162
|
for (const value of array) {
|
79163
79163
|
const key = makeKey(value);
|
@@ -79166,21 +79166,21 @@ var require_typescript2 = __commonJS({
|
|
79166
79166
|
}
|
79167
79167
|
return result;
|
79168
79168
|
}
|
79169
|
-
function arrayToNumericMap(array, makeKey, makeValue =
|
79169
|
+
function arrayToNumericMap(array, makeKey, makeValue = identity17) {
|
79170
79170
|
const result = [];
|
79171
79171
|
for (const value of array) {
|
79172
79172
|
result[makeKey(value)] = makeValue(value);
|
79173
79173
|
}
|
79174
79174
|
return result;
|
79175
79175
|
}
|
79176
|
-
function arrayToMultiMap(values2, makeKey, makeValue =
|
79176
|
+
function arrayToMultiMap(values2, makeKey, makeValue = identity17) {
|
79177
79177
|
const result = createMultiMap();
|
79178
79178
|
for (const value of values2) {
|
79179
79179
|
result.add(makeKey(value), makeValue(value));
|
79180
79180
|
}
|
79181
79181
|
return result;
|
79182
79182
|
}
|
79183
|
-
function group2(values2, getGroupId, resultSelector =
|
79183
|
+
function group2(values2, getGroupId, resultSelector = identity17) {
|
79184
79184
|
return arrayFrom(arrayToMultiMap(values2, getGroupId).values(), resultSelector);
|
79185
79185
|
}
|
79186
79186
|
function groupBy3(values2, keySelector) {
|
@@ -79430,7 +79430,7 @@ var require_typescript2 = __commonJS({
|
|
79430
79430
|
function returnUndefined() {
|
79431
79431
|
return void 0;
|
79432
79432
|
}
|
79433
|
-
function
|
79433
|
+
function identity17(x) {
|
79434
79434
|
return x;
|
79435
79435
|
}
|
79436
79436
|
function toLowerCase(x) {
|
@@ -79736,7 +79736,7 @@ var require_typescript2 = __commonJS({
|
|
79736
79736
|
return false;
|
79737
79737
|
}
|
79738
79738
|
function createGetCanonicalFileName(useCaseSensitiveFileNames2) {
|
79739
|
-
return useCaseSensitiveFileNames2 ?
|
79739
|
+
return useCaseSensitiveFileNames2 ? identity17 : toFileNameLowerCase;
|
79740
79740
|
}
|
79741
79741
|
function patternText({ prefix, suffix }) {
|
79742
79742
|
return `${prefix}*${suffix}`;
|
@@ -79763,7 +79763,7 @@ var require_typescript2 = __commonJS({
|
|
79763
79763
|
function removePrefix(str, prefix) {
|
79764
79764
|
return startsWith(str, prefix) ? str.substr(prefix.length) : str;
|
79765
79765
|
}
|
79766
|
-
function tryRemovePrefix(str, prefix, getCanonicalFileName =
|
79766
|
+
function tryRemovePrefix(str, prefix, getCanonicalFileName = identity17) {
|
79767
79767
|
return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : void 0;
|
79768
79768
|
}
|
79769
79769
|
function isPatternMatch({ prefix, suffix }, candidate) {
|
@@ -80907,21 +80907,21 @@ ${lanes.join("\n")}
|
|
80907
80907
|
var buildPartRegExp = /^[a-z0-9-]+$/i;
|
80908
80908
|
var numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
|
80909
80909
|
var _Version = class _Version2 {
|
80910
|
-
constructor(major, minor = 0,
|
80910
|
+
constructor(major, minor = 0, patch2 = 0, prerelease = "", build2 = "") {
|
80911
80911
|
if (typeof major === "string") {
|
80912
80912
|
const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
|
80913
|
-
({ major, minor, patch, prerelease, build: build2 } = result);
|
80913
|
+
({ major, minor, patch: patch2, prerelease, build: build2 } = result);
|
80914
80914
|
}
|
80915
80915
|
Debug.assert(major >= 0, "Invalid argument: major");
|
80916
80916
|
Debug.assert(minor >= 0, "Invalid argument: minor");
|
80917
|
-
Debug.assert(
|
80917
|
+
Debug.assert(patch2 >= 0, "Invalid argument: patch");
|
80918
80918
|
const prereleaseArray = prerelease ? isArray4(prerelease) ? prerelease : prerelease.split(".") : emptyArray;
|
80919
80919
|
const buildArray = build2 ? isArray4(build2) ? build2 : build2.split(".") : emptyArray;
|
80920
80920
|
Debug.assert(every(prereleaseArray, (s) => prereleasePartRegExp.test(s)), "Invalid argument: prerelease");
|
80921
80921
|
Debug.assert(every(buildArray, (s) => buildPartRegExp.test(s)), "Invalid argument: build");
|
80922
80922
|
this.major = major;
|
80923
80923
|
this.minor = minor;
|
80924
|
-
this.patch =
|
80924
|
+
this.patch = patch2;
|
80925
80925
|
this.prerelease = prereleaseArray;
|
80926
80926
|
this.build = buildArray;
|
80927
80927
|
}
|
@@ -80929,8 +80929,8 @@ ${lanes.join("\n")}
|
|
80929
80929
|
const result = tryParseComponents(text2);
|
80930
80930
|
if (!result)
|
80931
80931
|
return void 0;
|
80932
|
-
const { major, minor, patch, prerelease, build: build2 } = result;
|
80933
|
-
return new _Version2(major, minor,
|
80932
|
+
const { major, minor, patch: patch2, prerelease, build: build2 } = result;
|
80933
|
+
return new _Version2(major, minor, patch2, prerelease, build2);
|
80934
80934
|
}
|
80935
80935
|
compareTo(other) {
|
80936
80936
|
if (this === other)
|
@@ -80955,11 +80955,11 @@ ${lanes.join("\n")}
|
|
80955
80955
|
const {
|
80956
80956
|
major = this.major,
|
80957
80957
|
minor = this.minor,
|
80958
|
-
patch = this.patch,
|
80958
|
+
patch: patch2 = this.patch,
|
80959
80959
|
prerelease = this.prerelease,
|
80960
80960
|
build: build2 = this.build
|
80961
80961
|
} = fields;
|
80962
|
-
return new _Version2(major, minor,
|
80962
|
+
return new _Version2(major, minor, patch2, prerelease, build2);
|
80963
80963
|
}
|
80964
80964
|
toString() {
|
80965
80965
|
let result = `${this.major}.${this.minor}.${this.patch}`;
|
@@ -80976,7 +80976,7 @@ ${lanes.join("\n")}
|
|
80976
80976
|
const match3 = versionRegExp.exec(text2);
|
80977
80977
|
if (!match3)
|
80978
80978
|
return void 0;
|
80979
|
-
const [, major, minor = "0",
|
80979
|
+
const [, major, minor = "0", patch2 = "0", prerelease = "", build2 = ""] = match3;
|
80980
80980
|
if (prerelease && !prereleaseRegExp.test(prerelease))
|
80981
80981
|
return void 0;
|
80982
80982
|
if (build2 && !buildRegExp.test(build2))
|
@@ -80984,7 +80984,7 @@ ${lanes.join("\n")}
|
|
80984
80984
|
return {
|
80985
80985
|
major: parseInt(major, 10),
|
80986
80986
|
minor: parseInt(minor, 10),
|
80987
|
-
patch: parseInt(
|
80987
|
+
patch: parseInt(patch2, 10),
|
80988
80988
|
prerelease,
|
80989
80989
|
build: build2
|
80990
80990
|
};
|
@@ -81071,15 +81071,15 @@ ${lanes.join("\n")}
|
|
81071
81071
|
const match3 = partialRegExp.exec(text2);
|
81072
81072
|
if (!match3)
|
81073
81073
|
return void 0;
|
81074
|
-
const [, major, minor = "*",
|
81074
|
+
const [, major, minor = "*", patch2 = "*", prerelease, build2] = match3;
|
81075
81075
|
const version2 = new Version(
|
81076
81076
|
isWildcard(major) ? 0 : parseInt(major, 10),
|
81077
81077
|
isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10),
|
81078
|
-
isWildcard(major) || isWildcard(minor) || isWildcard(
|
81078
|
+
isWildcard(major) || isWildcard(minor) || isWildcard(patch2) ? 0 : parseInt(patch2, 10),
|
81079
81079
|
prerelease,
|
81080
81080
|
build2
|
81081
81081
|
);
|
81082
|
-
return { version: version2, major, minor, patch };
|
81082
|
+
return { version: version2, major, minor, patch: patch2 };
|
81083
81083
|
}
|
81084
81084
|
function parseHyphen(left2, right2, comparators) {
|
81085
81085
|
const leftResult = parsePartial(left2);
|
@@ -81102,7 +81102,7 @@ ${lanes.join("\n")}
|
|
81102
81102
|
const result = parsePartial(text2);
|
81103
81103
|
if (!result)
|
81104
81104
|
return false;
|
81105
|
-
const { version: version2, major, minor, patch } = result;
|
81105
|
+
const { version: version2, major, minor, patch: patch2 } = result;
|
81106
81106
|
if (!isWildcard(major)) {
|
81107
81107
|
switch (operator) {
|
81108
81108
|
case "~":
|
@@ -81119,25 +81119,25 @@ ${lanes.join("\n")}
|
|
81119
81119
|
comparators.push(createComparator(
|
81120
81120
|
"<",
|
81121
81121
|
version2.increment(
|
81122
|
-
version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(
|
81122
|
+
version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch2) ? "minor" : "patch"
|
81123
81123
|
)
|
81124
81124
|
));
|
81125
81125
|
break;
|
81126
81126
|
case "<":
|
81127
81127
|
case ">=":
|
81128
81128
|
comparators.push(
|
81129
|
-
isWildcard(minor) || isWildcard(
|
81129
|
+
isWildcard(minor) || isWildcard(patch2) ? createComparator(operator, version2.with({ prerelease: "0" })) : createComparator(operator, version2)
|
81130
81130
|
);
|
81131
81131
|
break;
|
81132
81132
|
case "<=":
|
81133
81133
|
case ">":
|
81134
81134
|
comparators.push(
|
81135
|
-
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version2.increment("major").with({ prerelease: "0" })) : isWildcard(
|
81135
|
+
isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version2.increment("major").with({ prerelease: "0" })) : isWildcard(patch2) ? createComparator(operator === "<=" ? "<" : ">=", version2.increment("minor").with({ prerelease: "0" })) : createComparator(operator, version2)
|
81136
81136
|
);
|
81137
81137
|
break;
|
81138
81138
|
case "=":
|
81139
81139
|
case void 0:
|
81140
|
-
if (isWildcard(minor) || isWildcard(
|
81140
|
+
if (isWildcard(minor) || isWildcard(patch2)) {
|
81141
81141
|
comparators.push(createComparator(">=", version2.with({ prerelease: "0" })));
|
81142
81142
|
comparators.push(createComparator("<", version2.increment(isWildcard(minor) ? "major" : "minor").with({ prerelease: "0" })));
|
81143
81143
|
} else {
|
@@ -85186,7 +85186,7 @@ ${lanes.join("\n")}
|
|
85186
85186
|
}
|
85187
85187
|
function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
|
85188
85188
|
Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
|
85189
|
-
const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase :
|
85189
|
+
const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity17;
|
85190
85190
|
const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false;
|
85191
85191
|
const pathComponents2 = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName);
|
85192
85192
|
return getPathFromPathComponents(pathComponents2);
|
@@ -87695,7 +87695,7 @@ ${lanes.join("\n")}
|
|
87695
87695
|
};
|
87696
87696
|
}
|
87697
87697
|
function computeLineOfPosition(lineStarts, position2, lowerBound) {
|
87698
|
-
let lineNumber = binarySearch(lineStarts, position2,
|
87698
|
+
let lineNumber = binarySearch(lineStarts, position2, identity17, compareValues, lowerBound);
|
87699
87699
|
if (lineNumber < 0) {
|
87700
87700
|
lineNumber = ~lineNumber - 1;
|
87701
87701
|
Debug.assert(lineNumber !== -1, "position cannot precede the beginning of the file");
|
@@ -90090,7 +90090,7 @@ ${lanes.join("\n")}
|
|
90090
90090
|
error22(Diagnostics.Expected_a_Unicode_property_name);
|
90091
90091
|
} else if (propertyName === void 0) {
|
90092
90092
|
error22(Diagnostics.Unknown_Unicode_property_name, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
90093
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(),
|
90093
|
+
const suggestion = getSpellingSuggestion(propertyNameOrValue, nonBinaryUnicodeProperties.keys(), identity17);
|
90094
90094
|
if (suggestion) {
|
90095
90095
|
error22(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
90096
90096
|
}
|
@@ -90102,7 +90102,7 @@ ${lanes.join("\n")}
|
|
90102
90102
|
error22(Diagnostics.Expected_a_Unicode_property_value);
|
90103
90103
|
} else if (propertyName !== void 0 && !valuesOfNonBinaryUnicodeProperties[propertyName].has(propertyValue)) {
|
90104
90104
|
error22(Diagnostics.Unknown_Unicode_property_value, propertyValueStart, pos - propertyValueStart);
|
90105
|
-
const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName],
|
90105
|
+
const suggestion = getSpellingSuggestion(propertyValue, valuesOfNonBinaryUnicodeProperties[propertyName], identity17);
|
90106
90106
|
if (suggestion) {
|
90107
90107
|
error22(Diagnostics.Did_you_mean_0, propertyValueStart, pos - propertyValueStart, suggestion);
|
90108
90108
|
}
|
@@ -90120,7 +90120,7 @@ ${lanes.join("\n")}
|
|
90120
90120
|
}
|
90121
90121
|
} else if (!valuesOfNonBinaryUnicodeProperties.General_Category.has(propertyNameOrValue) && !binaryUnicodeProperties.has(propertyNameOrValue)) {
|
90122
90122
|
error22(Diagnostics.Unknown_Unicode_property_name_or_value, propertyNameOrValueStart, pos - propertyNameOrValueStart);
|
90123
|
-
const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings],
|
90123
|
+
const suggestion = getSpellingSuggestion(propertyNameOrValue, [...valuesOfNonBinaryUnicodeProperties.General_Category, ...binaryUnicodeProperties, ...binaryUnicodePropertiesOfStrings], identity17);
|
90124
90124
|
if (suggestion) {
|
90125
90125
|
error22(Diagnostics.Did_you_mean_0, propertyNameOrValueStart, pos - propertyNameOrValueStart, suggestion);
|
90126
90126
|
}
|
@@ -91137,7 +91137,7 @@ ${lanes.join("\n")}
|
|
91137
91137
|
function getJSDocType(node) {
|
91138
91138
|
let tag = getFirstJSDocTag(node, isJSDocTypeTag);
|
91139
91139
|
if (!tag && isParameter(node)) {
|
91140
|
-
tag =
|
91140
|
+
tag = find2(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression);
|
91141
91141
|
}
|
91142
91142
|
return tag && tag.typeExpression && tag.typeExpression.type;
|
91143
91143
|
}
|
@@ -91150,7 +91150,7 @@ ${lanes.join("\n")}
|
|
91150
91150
|
if (typeTag && typeTag.typeExpression) {
|
91151
91151
|
const type = typeTag.typeExpression.type;
|
91152
91152
|
if (isTypeLiteralNode(type)) {
|
91153
|
-
const sig =
|
91153
|
+
const sig = find2(type.members, isCallSignatureDeclaration);
|
91154
91154
|
return sig && sig.type;
|
91155
91155
|
}
|
91156
91156
|
if (isFunctionTypeNode(type) || isJSDocFunctionType(type)) {
|
@@ -91187,7 +91187,7 @@ ${lanes.join("\n")}
|
|
91187
91187
|
);
|
91188
91188
|
}
|
91189
91189
|
function getFirstJSDocTag(node, predicate, noCache) {
|
91190
|
-
return
|
91190
|
+
return find2(getJSDocTagsWorker(node, noCache), predicate);
|
91191
91191
|
}
|
91192
91192
|
function getAllJSDocTags(node, predicate) {
|
91193
91193
|
return getJSDocTags(node).filter(predicate);
|
@@ -93764,7 +93764,7 @@ ${lanes.join("\n")}
|
|
93764
93764
|
});
|
93765
93765
|
}
|
93766
93766
|
function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) {
|
93767
|
-
return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ?
|
93767
|
+
return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find2(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);
|
93768
93768
|
}
|
93769
93769
|
function getTsConfigObjectLiteralExpression(tsConfigSourceFile) {
|
93770
93770
|
if (tsConfigSourceFile && tsConfigSourceFile.statements.length) {
|
@@ -93773,7 +93773,7 @@ ${lanes.join("\n")}
|
|
93773
93773
|
}
|
93774
93774
|
}
|
93775
93775
|
function getTsConfigPropArrayElementValue(tsConfigSourceFile, propKey, elementValue) {
|
93776
|
-
return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression(property.initializer) ?
|
93776
|
+
return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find2(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);
|
93777
93777
|
}
|
93778
93778
|
function forEachTsConfigPropArray(tsConfigSourceFile, propKey, callback) {
|
93779
93779
|
return forEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback);
|
@@ -94816,12 +94816,12 @@ ${lanes.join("\n")}
|
|
94816
94816
|
if (!decl) {
|
94817
94817
|
return void 0;
|
94818
94818
|
}
|
94819
|
-
const parameter =
|
94819
|
+
const parameter = find2(decl.parameters, (p) => p.name.kind === 80 && p.name.escapedText === name2);
|
94820
94820
|
return parameter && parameter.symbol;
|
94821
94821
|
}
|
94822
94822
|
function getEffectiveContainerForJSDocTemplateTag(node) {
|
94823
94823
|
if (isJSDoc(node.parent) && node.parent.tags) {
|
94824
|
-
const typeAlias =
|
94824
|
+
const typeAlias = find2(node.parent.tags, isJSDocTypeAlias);
|
94825
94825
|
if (typeAlias) {
|
94826
94826
|
return typeAlias;
|
94827
94827
|
}
|
@@ -94860,7 +94860,7 @@ ${lanes.join("\n")}
|
|
94860
94860
|
function getTypeParameterFromJsDoc(node) {
|
94861
94861
|
const name2 = node.name.escapedText;
|
94862
94862
|
const { typeParameters } = node.parent.parent.parent;
|
94863
|
-
return typeParameters &&
|
94863
|
+
return typeParameters && find2(typeParameters, (p) => p.name.escapedText === name2);
|
94864
94864
|
}
|
94865
94865
|
function hasTypeArguments(node) {
|
94866
94866
|
return !!node.typeArguments;
|
@@ -95647,7 +95647,7 @@ ${lanes.join("\n")}
|
|
95647
95647
|
if (!diagnostics) {
|
95648
95648
|
return void 0;
|
95649
95649
|
}
|
95650
|
-
const result = binarySearch(diagnostics, diagnostic,
|
95650
|
+
const result = binarySearch(diagnostics, diagnostic, identity17, compareDiagnosticsSkipRelatedInformation);
|
95651
95651
|
if (result >= 0) {
|
95652
95652
|
return diagnostics[result];
|
95653
95653
|
}
|
@@ -96111,7 +96111,7 @@ ${lanes.join("\n")}
|
|
96111
96111
|
return computeLineOfPosition(lineMap, pos);
|
96112
96112
|
}
|
96113
96113
|
function getFirstConstructorWithBody(node) {
|
96114
|
-
return
|
96114
|
+
return find2(node.members, (member3) => isConstructorDeclaration(member3) && nodeIsPresent(member3.body));
|
96115
96115
|
}
|
96116
96116
|
function getSetAccessorValueParameter(accessor) {
|
96117
96117
|
if (accessor && accessor.parameters.length > 0) {
|
@@ -96661,7 +96661,7 @@ ${lanes.join("\n")}
|
|
96661
96661
|
return symbol && length4(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048);
|
96662
96662
|
}
|
96663
96663
|
function tryExtractTSExtension(fileName) {
|
96664
|
-
return
|
96664
|
+
return find2(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension));
|
96665
96665
|
}
|
96666
96666
|
function getExpandedCharCodes(input) {
|
96667
96667
|
const output = [];
|
@@ -96939,7 +96939,7 @@ ${lanes.join("\n")}
|
|
96939
96939
|
}
|
96940
96940
|
function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) {
|
96941
96941
|
if (s.valueDeclaration) {
|
96942
|
-
const declaration = isWrite && s.declarations &&
|
96942
|
+
const declaration = isWrite && s.declarations && find2(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 && find2(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration;
|
96943
96943
|
const flags = getCombinedModifierFlags(declaration);
|
96944
96944
|
return s.parent && s.parent.flags & 32 ? flags : flags & ~7;
|
96945
96945
|
}
|
@@ -98337,7 +98337,7 @@ ${lanes.join("\n")}
|
|
98337
98337
|
return tryGetExtensionFromPath2(path10) !== void 0;
|
98338
98338
|
}
|
98339
98339
|
function tryGetExtensionFromPath2(path10) {
|
98340
|
-
return
|
98340
|
+
return find2(extensionsToRemove, (e) => fileExtensionIs(path10, e));
|
98341
98341
|
}
|
98342
98342
|
function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
|
98343
98343
|
return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
|
@@ -99403,7 +99403,7 @@ ${lanes.join("\n")}
|
|
99403
99403
|
if (decl.kind === 168) {
|
99404
99404
|
const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent;
|
99405
99405
|
if (parent2 === container) {
|
99406
|
-
return !(isJSDocTemplateTag(decl.parent) &&
|
99406
|
+
return !(isJSDocTemplateTag(decl.parent) && find2(decl.parent.parent.tags, isJSDocTypeAlias));
|
99407
99407
|
}
|
99408
99408
|
}
|
99409
99409
|
}
|
@@ -99847,36 +99847,36 @@ ${lanes.join("\n")}
|
|
99847
99847
|
}
|
99848
99848
|
}
|
99849
99849
|
var nullParenthesizerRules = {
|
99850
|
-
getParenthesizeLeftSideOfBinaryForOperator: (_) =>
|
99851
|
-
getParenthesizeRightSideOfBinaryForOperator: (_) =>
|
99850
|
+
getParenthesizeLeftSideOfBinaryForOperator: (_) => identity17,
|
99851
|
+
getParenthesizeRightSideOfBinaryForOperator: (_) => identity17,
|
99852
99852
|
parenthesizeLeftSideOfBinary: (_binaryOperator, leftSide) => leftSide,
|
99853
99853
|
parenthesizeRightSideOfBinary: (_binaryOperator, _leftSide, rightSide) => rightSide,
|
99854
|
-
parenthesizeExpressionOfComputedPropertyName:
|
99855
|
-
parenthesizeConditionOfConditionalExpression:
|
99856
|
-
parenthesizeBranchOfConditionalExpression:
|
99857
|
-
parenthesizeExpressionOfExportDefault:
|
99854
|
+
parenthesizeExpressionOfComputedPropertyName: identity17,
|
99855
|
+
parenthesizeConditionOfConditionalExpression: identity17,
|
99856
|
+
parenthesizeBranchOfConditionalExpression: identity17,
|
99857
|
+
parenthesizeExpressionOfExportDefault: identity17,
|
99858
99858
|
parenthesizeExpressionOfNew: (expression) => cast(expression, isLeftHandSideExpression),
|
99859
99859
|
parenthesizeLeftSideOfAccess: (expression) => cast(expression, isLeftHandSideExpression),
|
99860
99860
|
parenthesizeOperandOfPostfixUnary: (operand) => cast(operand, isLeftHandSideExpression),
|
99861
99861
|
parenthesizeOperandOfPrefixUnary: (operand) => cast(operand, isUnaryExpression),
|
99862
99862
|
parenthesizeExpressionsOfCommaDelimitedList: (nodes) => cast(nodes, isNodeArray),
|
99863
|
-
parenthesizeExpressionForDisallowedComma:
|
99864
|
-
parenthesizeExpressionOfExpressionStatement:
|
99865
|
-
parenthesizeConciseBodyOfArrowFunction:
|
99866
|
-
parenthesizeCheckTypeOfConditionalType:
|
99867
|
-
parenthesizeExtendsTypeOfConditionalType:
|
99863
|
+
parenthesizeExpressionForDisallowedComma: identity17,
|
99864
|
+
parenthesizeExpressionOfExpressionStatement: identity17,
|
99865
|
+
parenthesizeConciseBodyOfArrowFunction: identity17,
|
99866
|
+
parenthesizeCheckTypeOfConditionalType: identity17,
|
99867
|
+
parenthesizeExtendsTypeOfConditionalType: identity17,
|
99868
99868
|
parenthesizeConstituentTypesOfUnionType: (nodes) => cast(nodes, isNodeArray),
|
99869
|
-
parenthesizeConstituentTypeOfUnionType:
|
99869
|
+
parenthesizeConstituentTypeOfUnionType: identity17,
|
99870
99870
|
parenthesizeConstituentTypesOfIntersectionType: (nodes) => cast(nodes, isNodeArray),
|
99871
|
-
parenthesizeConstituentTypeOfIntersectionType:
|
99872
|
-
parenthesizeOperandOfTypeOperator:
|
99873
|
-
parenthesizeOperandOfReadonlyTypeOperator:
|
99874
|
-
parenthesizeNonArrayTypeOfPostfixType:
|
99871
|
+
parenthesizeConstituentTypeOfIntersectionType: identity17,
|
99872
|
+
parenthesizeOperandOfTypeOperator: identity17,
|
99873
|
+
parenthesizeOperandOfReadonlyTypeOperator: identity17,
|
99874
|
+
parenthesizeNonArrayTypeOfPostfixType: identity17,
|
99875
99875
|
parenthesizeElementTypesOfTupleType: (nodes) => cast(nodes, isNodeArray),
|
99876
|
-
parenthesizeElementTypeOfTupleType:
|
99877
|
-
parenthesizeTypeOfOptionalType:
|
99876
|
+
parenthesizeElementTypeOfTupleType: identity17,
|
99877
|
+
parenthesizeTypeOfOptionalType: identity17,
|
99878
99878
|
parenthesizeTypeArguments: (nodes) => nodes && cast(nodes, isNodeArray),
|
99879
|
-
parenthesizeLeadingTypeArgument:
|
99879
|
+
parenthesizeLeadingTypeArgument: identity17
|
99880
99880
|
};
|
99881
99881
|
function createNodeConverters(factory2) {
|
99882
99882
|
return {
|
@@ -100039,7 +100039,7 @@ ${lanes.join("\n")}
|
|
100039
100039
|
nodeFactoryPatchers.push(fn);
|
100040
100040
|
}
|
100041
100041
|
function createNodeFactory(flags, baseFactory2) {
|
100042
|
-
const setOriginal = flags & 8 ?
|
100042
|
+
const setOriginal = flags & 8 ? identity17 : setOriginalNode;
|
100043
100043
|
const parenthesizerRules = memoize(() => flags & 1 ? nullParenthesizerRules : createParenthesizerRules(factory2));
|
100044
100044
|
const converters = memoize(() => flags & 2 ? nullNodeConverters : createNodeConverters(factory2));
|
100045
100045
|
const getBinaryCreateFunction = memoizeOne((operator) => (left2, right2) => createBinaryExpression(left2, operator, right2));
|
@@ -108152,7 +108152,7 @@ ${lanes.join("\n")}
|
|
108152
108152
|
var parsingContext;
|
108153
108153
|
var notParenthesizedArrow;
|
108154
108154
|
var contextFlags;
|
108155
|
-
var
|
108155
|
+
var topLevel = true;
|
108156
108156
|
var parseErrorBeforeNextFinishedNode = false;
|
108157
108157
|
function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0) {
|
108158
108158
|
var _a4;
|
@@ -108297,7 +108297,7 @@ ${lanes.join("\n")}
|
|
108297
108297
|
identifierCount = 0;
|
108298
108298
|
nodeCount = 0;
|
108299
108299
|
sourceFlags = 0;
|
108300
|
-
|
108300
|
+
topLevel = true;
|
108301
108301
|
switch (scriptKind) {
|
108302
108302
|
case 1:
|
108303
108303
|
case 2:
|
@@ -108335,7 +108335,7 @@ ${lanes.join("\n")}
|
|
108335
108335
|
parsingContext = 0;
|
108336
108336
|
identifiers = void 0;
|
108337
108337
|
notParenthesizedArrow = void 0;
|
108338
|
-
|
108338
|
+
topLevel = true;
|
108339
108339
|
}
|
108340
108340
|
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) {
|
108341
108341
|
const isDeclarationFile = isDeclarationFileName(fileName);
|
@@ -108459,7 +108459,7 @@ ${lanes.join("\n")}
|
|
108459
108459
|
}
|
108460
108460
|
function currentNode2(position2) {
|
108461
108461
|
const node = baseSyntaxCursor.currentNode(position2);
|
108462
|
-
if (
|
108462
|
+
if (topLevel && node && containsPossibleTopLevelAwait(node)) {
|
108463
108463
|
markAsIntersectingIncrementalChange(node);
|
108464
108464
|
}
|
108465
108465
|
return node;
|
@@ -108757,7 +108757,7 @@ ${lanes.join("\n")}
|
|
108757
108757
|
parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64);
|
108758
108758
|
return;
|
108759
108759
|
}
|
108760
|
-
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions,
|
108760
|
+
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, identity17) ?? getSpaceSuggestion(expressionText);
|
108761
108761
|
if (suggestion) {
|
108762
108762
|
parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
|
108763
108763
|
return;
|
@@ -109989,8 +109989,8 @@ ${lanes.join("\n")}
|
|
109989
109989
|
}
|
109990
109990
|
return withJSDoc(finishNode(node2, pos), hasJSDoc);
|
109991
109991
|
}
|
109992
|
-
const savedTopLevel =
|
109993
|
-
|
109992
|
+
const savedTopLevel = topLevel;
|
109993
|
+
topLevel = false;
|
109994
109994
|
const dotDotDotToken = parseOptionalToken(26);
|
109995
109995
|
if (!allowAmbiguity && !isParameterNameStart()) {
|
109996
109996
|
return void 0;
|
@@ -110009,7 +110009,7 @@ ${lanes.join("\n")}
|
|
110009
110009
|
),
|
110010
110010
|
hasJSDoc
|
110011
110011
|
);
|
110012
|
-
|
110012
|
+
topLevel = savedTopLevel;
|
110013
110013
|
return node;
|
110014
110014
|
}
|
110015
110015
|
function parseReturnType(returnToken, isType) {
|
@@ -111099,10 +111099,10 @@ ${lanes.join("\n")}
|
|
111099
111099
|
if (token() !== 27 && token() !== 100 && token() !== 86 && isStartOfStatement() && !isStartOfExpressionStatement()) {
|
111100
111100
|
return parseFunctionBlock(16 | (isAsync ? 2 : 0));
|
111101
111101
|
}
|
111102
|
-
const savedTopLevel =
|
111103
|
-
|
111102
|
+
const savedTopLevel = topLevel;
|
111103
|
+
topLevel = false;
|
111104
111104
|
const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction));
|
111105
|
-
|
111105
|
+
topLevel = savedTopLevel;
|
111106
111106
|
return node;
|
111107
111107
|
}
|
111108
111108
|
function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) {
|
@@ -112053,8 +112053,8 @@ ${lanes.join("\n")}
|
|
112053
112053
|
setYieldContext(!!(flags & 1));
|
112054
112054
|
const savedAwaitContext = inAwaitContext();
|
112055
112055
|
setAwaitContext(!!(flags & 2));
|
112056
|
-
const savedTopLevel =
|
112057
|
-
|
112056
|
+
const savedTopLevel = topLevel;
|
112057
|
+
topLevel = false;
|
112058
112058
|
const saveDecoratorContext = inDecoratorContext();
|
112059
112059
|
if (saveDecoratorContext) {
|
112060
112060
|
setDecoratorContext(
|
@@ -112067,7 +112067,7 @@ ${lanes.join("\n")}
|
|
112067
112067
|
true
|
112068
112068
|
);
|
112069
112069
|
}
|
112070
|
-
|
112070
|
+
topLevel = savedTopLevel;
|
112071
112071
|
setYieldContext(savedYieldContext);
|
112072
112072
|
setAwaitContext(savedAwaitContext);
|
112073
112073
|
return block;
|
@@ -117168,7 +117168,7 @@ ${lanes.join("\n")}
|
|
117168
117168
|
getBaseFileName(sourceFile.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json"
|
117169
117169
|
));
|
117170
117170
|
if (isArrayLiteralExpression(rootExpression)) {
|
117171
|
-
const firstObject =
|
117171
|
+
const firstObject = find2(rootExpression.elements, isObjectLiteralExpression);
|
117172
117172
|
if (firstObject) {
|
117173
117173
|
return convertToJson(
|
117174
117174
|
sourceFile,
|
@@ -118048,7 +118048,7 @@ ${lanes.join("\n")}
|
|
118048
118048
|
if (keyText === "excludes") {
|
118049
118049
|
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
|
118050
118050
|
}
|
118051
|
-
if (
|
118051
|
+
if (find2(commandOptionsWithoutBuild, (opt) => opt.name === keyText)) {
|
118052
118052
|
rootCompilerOptions = append(rootCompilerOptions, propertyAssignment.name);
|
118053
118053
|
}
|
118054
118054
|
}
|
@@ -127569,7 +127569,7 @@ ${lanes.join("\n")}
|
|
127569
127569
|
if (exportedEqualsSymbol) {
|
127570
127570
|
getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name2, declarationName, moduleName) : error22(name2, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);
|
127571
127571
|
} else {
|
127572
|
-
const exportedSymbol = exports2 ?
|
127572
|
+
const exportedSymbol = exports2 ? find2(symbolsToArray(exports2), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0;
|
127573
127573
|
const diagnostic = exportedSymbol ? error22(name2, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error22(name2, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
|
127574
127574
|
if (localSymbol.declarations) {
|
127575
127575
|
addRelatedInfo(diagnostic, ...map3(localSymbol.declarations, (decl, index3) => createDiagnosticForNode(decl, index3 === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
@@ -127820,7 +127820,7 @@ ${lanes.join("\n")}
|
|
127820
127820
|
var _a4;
|
127821
127821
|
if (target && (aliasDeclarationLinks.typeOnlyDeclaration === void 0 || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) {
|
127822
127822
|
const exportSymbol = ((_a4 = target.exports) == null ? void 0 : _a4.get("export=")) ?? target;
|
127823
|
-
const typeOnly = exportSymbol.declarations &&
|
127823
|
+
const typeOnly = exportSymbol.declarations && find2(exportSymbol.declarations, isTypeOnlyImportOrExportDeclaration);
|
127824
127824
|
aliasDeclarationLinks.typeOnlyDeclaration = typeOnly ?? getSymbolLinks(exportSymbol).typeOnlyDeclaration ?? false;
|
127825
127825
|
}
|
127826
127826
|
return !!aliasDeclarationLinks.typeOnlyDeclaration;
|
@@ -131230,7 +131230,7 @@ ${lanes.join("\n")}
|
|
131230
131230
|
};
|
131231
131231
|
}
|
131232
131232
|
function getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration) {
|
131233
|
-
return symbol.declarations &&
|
131233
|
+
return symbol.declarations && find2(symbol.declarations, (s) => !!getNonlocalEffectiveTypeAnnotationNode(s) && (!enclosingDeclaration || !!findAncestor(s, (n) => n === enclosingDeclaration)));
|
131234
131234
|
}
|
131235
131235
|
function existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) {
|
131236
131236
|
if (!(getObjectFlags(type) & 4))
|
@@ -132031,7 +132031,7 @@ ${lanes.join("\n")}
|
|
132031
132031
|
return filter6([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
|
132032
132032
|
}
|
132033
132033
|
function flattenExportAssignedNamespace(statements) {
|
132034
|
-
const exportAssignment =
|
132034
|
+
const exportAssignment = find2(statements, isExportAssignment);
|
132035
132035
|
const nsIndex = findIndex3(statements, isModuleDeclaration);
|
132036
132036
|
let ns = nsIndex !== -1 ? statements[nsIndex] : void 0;
|
132037
132037
|
if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) {
|
@@ -132062,7 +132062,7 @@ ${lanes.join("\n")}
|
|
132062
132062
|
);
|
132063
132063
|
statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)];
|
132064
132064
|
}
|
132065
|
-
if (!
|
132065
|
+
if (!find2(statements, (s) => s !== ns && nodeHasName(s, name2))) {
|
132066
132066
|
results = [];
|
132067
132067
|
const mixinExportFlag = !some4(body.statements, (s) => hasSyntacticModifier(s, 32) || isExportAssignment(s) || isExportDeclaration(s));
|
132068
132068
|
forEach(body.statements, (s) => {
|
@@ -132240,7 +132240,7 @@ ${lanes.join("\n")}
|
|
132240
132240
|
} else {
|
132241
132241
|
const flags = !(symbol.flags & 2) ? ((_c2 = symbol.parent) == null ? void 0 : _c2.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 : void 0 : isConstantVariable(symbol) ? 2 : 1;
|
132242
132242
|
const name2 = needsPostExportDefault || !(symbol.flags & 4) ? localName : getUnusedName(localName, symbol);
|
132243
|
-
let textRange = symbol.declarations &&
|
132243
|
+
let textRange = symbol.declarations && find2(symbol.declarations, (d) => isVariableDeclaration(d));
|
132244
132244
|
if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
|
132245
132245
|
textRange = textRange.parent.parent;
|
132246
132246
|
}
|
@@ -134676,7 +134676,7 @@ ${lanes.join("\n")}
|
|
134676
134676
|
}
|
134677
134677
|
function getBaseTypeVariableOfClass(symbol) {
|
134678
134678
|
const baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
|
134679
|
-
return baseConstructorType.flags & 8650752 ? baseConstructorType : baseConstructorType.flags & 2097152 ?
|
134679
|
+
return baseConstructorType.flags & 8650752 ? baseConstructorType : baseConstructorType.flags & 2097152 ? find2(baseConstructorType.types, (t) => !!(t.flags & 8650752)) : void 0;
|
134680
134680
|
}
|
134681
134681
|
function getTypeOfFuncClassEnumModule(symbol) {
|
134682
134682
|
let links = getSymbolLinks(symbol);
|
@@ -137078,7 +137078,7 @@ ${lanes.join("\n")}
|
|
137078
137078
|
}
|
137079
137079
|
function elaborateNeverIntersection(errorInfo, type) {
|
137080
137080
|
if (type.flags & 2097152 && getObjectFlags(type) & 33554432) {
|
137081
|
-
const neverProp =
|
137081
|
+
const neverProp = find2(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
|
137082
137082
|
if (neverProp) {
|
137083
137083
|
return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(
|
137084
137084
|
type,
|
@@ -137086,7 +137086,7 @@ ${lanes.join("\n")}
|
|
137086
137086
|
536870912
|
137087
137087
|
), symbolToString(neverProp));
|
137088
137088
|
}
|
137089
|
-
const privateProp =
|
137089
|
+
const privateProp = find2(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty);
|
137090
137090
|
if (privateProp) {
|
137091
137091
|
return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString(
|
137092
137092
|
type,
|
@@ -137178,7 +137178,7 @@ ${lanes.join("\n")}
|
|
137178
137178
|
return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol);
|
137179
137179
|
}
|
137180
137180
|
function findIndexInfo(indexInfos, keyType) {
|
137181
|
-
return
|
137181
|
+
return find2(indexInfos, (info2) => info2.keyType === keyType);
|
137182
137182
|
}
|
137183
137183
|
function findApplicableIndexInfo(indexInfos, keyType) {
|
137184
137184
|
let stringIndexInfo;
|
@@ -138349,7 +138349,7 @@ ${lanes.join("\n")}
|
|
138349
138349
|
if (symbol) {
|
138350
138350
|
getDeclaredTypeOfSymbol(symbol);
|
138351
138351
|
if (length4(getSymbolLinks(symbol).typeParameters) !== arity2) {
|
138352
|
-
const decl = symbol.declarations &&
|
138352
|
+
const decl = symbol.declarations && find2(symbol.declarations, isTypeAliasDeclaration);
|
138353
138353
|
error22(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity2);
|
138354
138354
|
return void 0;
|
138355
138355
|
}
|
@@ -139016,7 +139016,7 @@ ${lanes.join("\n")}
|
|
139016
139016
|
}
|
139017
139017
|
continue;
|
139018
139018
|
}
|
139019
|
-
const keyProperty = source3.flags & (524288 | 2097152 | 58982400) ?
|
139019
|
+
const keyProperty = source3.flags & (524288 | 2097152 | 58982400) ? find2(getPropertiesOfType(source3), (p) => isUnitType(getTypeOfSymbol(p))) : void 0;
|
139020
139020
|
const keyPropertyType = keyProperty && getRegularTypeOfLiteralType(getTypeOfSymbol(keyProperty));
|
139021
139021
|
for (const target of types) {
|
139022
139022
|
if (source3 !== target) {
|
@@ -140516,13 +140516,13 @@ ${lanes.join("\n")}
|
|
140516
140516
|
return type;
|
140517
140517
|
}
|
140518
140518
|
if (every(type.types, isEmptyObjectTypeOrSpreadsIntoEmptyObject)) {
|
140519
|
-
return
|
140519
|
+
return find2(type.types, isEmptyObjectType) || emptyObjectType;
|
140520
140520
|
}
|
140521
|
-
const firstType =
|
140521
|
+
const firstType = find2(type.types, (t) => !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t));
|
140522
140522
|
if (!firstType) {
|
140523
140523
|
return type;
|
140524
140524
|
}
|
140525
|
-
const secondType =
|
140525
|
+
const secondType = find2(type.types, (t) => t !== firstType && !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t));
|
140526
140526
|
if (secondType) {
|
140527
140527
|
return type;
|
140528
140528
|
}
|
@@ -145178,7 +145178,7 @@ ${lanes.join("\n")}
|
|
145178
145178
|
return t.flags & 2097152 ? some4(t.types, isUnitType) : isUnitType(t);
|
145179
145179
|
}
|
145180
145180
|
function extractUnitType(type) {
|
145181
|
-
return type.flags & 2097152 ?
|
145181
|
+
return type.flags & 2097152 ? find2(type.types, isUnitType) || type : type;
|
145182
145182
|
}
|
145183
145183
|
function isLiteralType(type) {
|
145184
145184
|
return type.flags & 16 ? true : type.flags & 1048576 ? type.flags & 1024 ? true : every(type.types, isUnitType) : isUnitType(type);
|
@@ -146303,7 +146303,7 @@ ${lanes.join("\n")}
|
|
146303
146303
|
function getSingleTypeVariableFromIntersectionTypes(types) {
|
146304
146304
|
let typeVariable;
|
146305
146305
|
for (const type of types) {
|
146306
|
-
const t = type.flags & 2097152 &&
|
146306
|
+
const t = type.flags & 2097152 && find2(type.types, (t2) => !!getInferenceInfoForType(t2));
|
146307
146307
|
if (!t || typeVariable && t !== typeVariable) {
|
146308
146308
|
return void 0;
|
146309
146309
|
}
|
@@ -147004,7 +147004,7 @@ ${lanes.join("\n")}
|
|
147004
147004
|
}
|
147005
147005
|
function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
|
147006
147006
|
const keyPropertyName = getKeyPropertyName(unionType);
|
147007
|
-
const propNode = keyPropertyName &&
|
147007
|
+
const propNode = keyPropertyName && find2(node.properties, (p) => p.symbol && p.kind === 303 && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer));
|
147008
147008
|
const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
|
147009
147009
|
return propType && getConstituentTypeForKeyType(unionType, propType);
|
147010
147010
|
}
|
@@ -149141,7 +149141,7 @@ ${lanes.join("\n")}
|
|
149141
149141
|
}
|
149142
149142
|
function markDecoratorAliasReferenced(node) {
|
149143
149143
|
if (compilerOptions.emitDecoratorMetadata) {
|
149144
|
-
const firstDecorator =
|
149144
|
+
const firstDecorator = find2(node.modifiers, isDecorator);
|
149145
149145
|
if (!firstDecorator) {
|
149146
149146
|
return;
|
149147
149147
|
}
|
@@ -149246,7 +149246,7 @@ ${lanes.join("\n")}
|
|
149246
149246
|
markAliasSymbolAsReferenced(rootSymbol);
|
149247
149247
|
} else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 && !symbolIsValue(rootSymbol) && !some4(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) {
|
149248
149248
|
const diag2 = error22(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled);
|
149249
|
-
const aliasDeclaration =
|
149249
|
+
const aliasDeclaration = find2(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2);
|
149250
149250
|
if (aliasDeclaration) {
|
149251
149251
|
addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName)));
|
149252
149252
|
}
|
@@ -152573,7 +152573,7 @@ ${lanes.join("\n")}
|
|
152573
152573
|
function getSuggestedSymbolForNonexistentJSXAttribute(name2, containingType) {
|
152574
152574
|
const strName = isString2(name2) ? name2 : idText(name2);
|
152575
152575
|
const properties = getPropertiesOfType(containingType);
|
152576
|
-
const jsxSpecific = strName === "for" ?
|
152576
|
+
const jsxSpecific = strName === "for" ? find2(properties, (x) => symbolName(x) === "htmlFor") : strName === "class" ? find2(properties, (x) => symbolName(x) === "className") : void 0;
|
152577
152577
|
return jsxSpecific ?? getSpellingSuggestionForName(strName, properties, 111551);
|
152578
152578
|
}
|
152579
152579
|
function getSuggestionForNonexistentProperty(name2, containingType) {
|
@@ -153016,7 +153016,7 @@ ${lanes.join("\n")}
|
|
153016
153016
|
const restType = getNonArrayRestType(signature);
|
153017
153017
|
const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length;
|
153018
153018
|
if (restType && restType.flags & 262144) {
|
153019
|
-
const info2 =
|
153019
|
+
const info2 = find2(context2.inferences, (info22) => info22.typeParameter === restType);
|
153020
153020
|
if (info2) {
|
153021
153021
|
info2.impliedArity = findIndex3(args, isSpreadArgument, argCount) < 0 ? args.length - argCount : void 0;
|
153022
153022
|
}
|
@@ -153761,7 +153761,7 @@ ${lanes.join("\n")}
|
|
153761
153761
|
const oldCandidateForTypeArgumentError = candidateForTypeArgumentError;
|
153762
153762
|
const failedSignatureDeclarations = ((_b2 = (_a4 = failed.declaration) == null ? void 0 : _a4.symbol) == null ? void 0 : _b2.declarations) || emptyArray;
|
153763
153763
|
const isOverload2 = failedSignatureDeclarations.length > 1;
|
153764
|
-
const implDecl = isOverload2 ?
|
153764
|
+
const implDecl = isOverload2 ? find2(failedSignatureDeclarations, (d) => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : void 0;
|
153765
153765
|
if (implDecl) {
|
153766
153766
|
const candidate = getSignatureFromDeclaration(implDecl);
|
153767
153767
|
const isSingleNonGenericCandidate2 = !candidate.typeParameters;
|
@@ -159310,7 +159310,7 @@ ${lanes.join("\n")}
|
|
159310
159310
|
if (!canHaveDecorators(node) || !hasDecorators(node) || !node.modifiers || !nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {
|
159311
159311
|
return;
|
159312
159312
|
}
|
159313
|
-
const firstDecorator =
|
159313
|
+
const firstDecorator = find2(node.modifiers, isDecorator);
|
159314
159314
|
if (!firstDecorator) {
|
159315
159315
|
return;
|
159316
159316
|
}
|
@@ -161428,7 +161428,7 @@ ${lanes.join("\n")}
|
|
161428
161428
|
registerForUnusedIdentifiersCheck(node);
|
161429
161429
|
}
|
161430
161430
|
function checkClassDeclaration(node) {
|
161431
|
-
const firstDecorator =
|
161431
|
+
const firstDecorator = find2(node.modifiers, isDecorator);
|
161432
161432
|
if (legacyDecorators && firstDecorator && some4(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) {
|
161433
161433
|
grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);
|
161434
161434
|
}
|
@@ -165374,7 +165374,7 @@ ${lanes.join("\n")}
|
|
165374
165374
|
case 147: {
|
165375
165375
|
const inOutFlag = modifier.kind === 103 ? 8192 : 16384;
|
165376
165376
|
const inOutText = modifier.kind === 103 ? "in" : "out";
|
165377
|
-
const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) ||
|
165377
|
+
const parent2 = isJSDocTemplateTag(node.parent) && (getEffectiveJSDocHost(node.parent) || find2((_a4 = getJSDocRoot(node.parent)) == null ? void 0 : _a4.tags, isJSDocTypedefTag)) || node.parent;
|
165378
165378
|
if (node.kind !== 168 || parent2 && !(isInterfaceDeclaration(parent2) || isClassLike(parent2) || isTypeAliasDeclaration(parent2) || isJSDocTypedefTag(parent2))) {
|
165379
165379
|
return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText);
|
165380
165380
|
}
|
@@ -165420,7 +165420,7 @@ ${lanes.join("\n")}
|
|
165420
165420
|
return modifier && grammarErrorOnFirstToken(modifier, Diagnostics.Modifiers_cannot_appear_here);
|
165421
165421
|
}
|
165422
165422
|
function findFirstModifierExcept(node, allowedModifier) {
|
165423
|
-
const modifier =
|
165423
|
+
const modifier = find2(node.modifiers, isModifier);
|
165424
165424
|
return modifier && modifier.kind !== allowedModifier ? modifier : void 0;
|
165425
165425
|
}
|
165426
165426
|
function findFirstIllegalModifier(node) {
|
@@ -165448,7 +165448,7 @@ ${lanes.join("\n")}
|
|
165448
165448
|
case 304:
|
165449
165449
|
case 270:
|
165450
165450
|
case 282:
|
165451
|
-
return
|
165451
|
+
return find2(node.modifiers, isModifier);
|
165452
165452
|
default:
|
165453
165453
|
if (node.parent.kind === 268 || node.parent.kind === 307) {
|
165454
165454
|
return void 0;
|
@@ -165462,9 +165462,9 @@ ${lanes.join("\n")}
|
|
165462
165462
|
case 231:
|
165463
165463
|
case 264:
|
165464
165464
|
case 265:
|
165465
|
-
return
|
165465
|
+
return find2(node.modifiers, isModifier);
|
165466
165466
|
case 243:
|
165467
|
-
return node.declarationList.flags & 4 ? findFirstModifierExcept(node, 135) :
|
165467
|
+
return node.declarationList.flags & 4 ? findFirstModifierExcept(node, 135) : find2(node.modifiers, isModifier);
|
165468
165468
|
case 266:
|
165469
165469
|
return findFirstModifierExcept(node, 87);
|
165470
165470
|
default:
|
@@ -165477,7 +165477,7 @@ ${lanes.join("\n")}
|
|
165477
165477
|
return decorator && grammarErrorOnFirstToken(decorator, Diagnostics.Decorators_are_not_valid_here);
|
165478
165478
|
}
|
165479
165479
|
function findFirstIllegalDecorator(node) {
|
165480
|
-
return canHaveIllegalDecorators(node) ?
|
165480
|
+
return canHaveIllegalDecorators(node) ? find2(node.modifiers, isDecorator) : void 0;
|
165481
165481
|
}
|
165482
165482
|
function checkGrammarAsyncModifier(node, asyncModifier) {
|
165483
165483
|
switch (node.kind) {
|
@@ -166486,7 +166486,7 @@ ${lanes.join("\n")}
|
|
166486
166486
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
166487
166487
|
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
|
166488
166488
|
}
|
166489
|
-
const spreadElement =
|
166489
|
+
const spreadElement = find2(nodeArguments, isSpreadElement);
|
166490
166490
|
if (spreadElement) {
|
166491
166491
|
return grammarErrorOnNode(spreadElement, Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element);
|
166492
166492
|
}
|
@@ -166495,7 +166495,7 @@ ${lanes.join("\n")}
|
|
166495
166495
|
function findMatchingTypeReferenceOrTypeAliasReference(source3, unionTarget) {
|
166496
166496
|
const sourceObjectFlags = getObjectFlags(source3);
|
166497
166497
|
if (sourceObjectFlags & (4 | 16) && unionTarget.flags & 1048576) {
|
166498
|
-
return
|
166498
|
+
return find2(unionTarget.types, (target) => {
|
166499
166499
|
if (target.flags & 524288) {
|
166500
166500
|
const overlapObjFlags = sourceObjectFlags & getObjectFlags(target);
|
166501
166501
|
if (overlapObjFlags & 4) {
|
@@ -166511,14 +166511,14 @@ ${lanes.join("\n")}
|
|
166511
166511
|
}
|
166512
166512
|
function findBestTypeForObjectLiteral(source3, unionTarget) {
|
166513
166513
|
if (getObjectFlags(source3) & 128 && someType(unionTarget, isArrayLikeType)) {
|
166514
|
-
return
|
166514
|
+
return find2(unionTarget.types, (t) => !isArrayLikeType(t));
|
166515
166515
|
}
|
166516
166516
|
}
|
166517
166517
|
function findBestTypeForInvokable(source3, unionTarget) {
|
166518
166518
|
let signatureKind = 0;
|
166519
166519
|
const hasSignatures = getSignaturesOfType(source3, signatureKind).length > 0 || (signatureKind = 1, getSignaturesOfType(source3, signatureKind).length > 0);
|
166520
166520
|
if (hasSignatures) {
|
166521
|
-
return
|
166521
|
+
return find2(unionTarget.types, (t) => getSignaturesOfType(t, signatureKind).length > 0);
|
166522
166522
|
}
|
166523
166523
|
}
|
166524
166524
|
function findMostOverlappyType(source3, unionTarget) {
|
@@ -168591,8 +168591,8 @@ ${lanes.join("\n")}
|
|
168591
168591
|
}
|
168592
168592
|
}
|
168593
168593
|
var identitySourceMapConsumer = {
|
168594
|
-
getSourcePosition:
|
168595
|
-
getGeneratedPosition:
|
168594
|
+
getSourcePosition: identity17,
|
168595
|
+
getGeneratedPosition: identity17
|
168596
168596
|
};
|
168597
168597
|
function getOriginalNodeId(node) {
|
168598
168598
|
node = getOriginalNode(node);
|
@@ -172881,8 +172881,8 @@ ${lanes.join("\n")}
|
|
172881
172881
|
}
|
172882
172882
|
if (syntheticConstructor || syntheticStaticBlock) {
|
172883
172883
|
let membersArray;
|
172884
|
-
const classThisAssignmentBlock =
|
172885
|
-
const classNamedEvaluationHelperBlock =
|
172884
|
+
const classThisAssignmentBlock = find2(members, isClassThisAssignmentBlock);
|
172885
|
+
const classNamedEvaluationHelperBlock = find2(members, isClassNamedEvaluationHelperBlock);
|
172886
172886
|
membersArray = append(membersArray, classThisAssignmentBlock);
|
172887
172887
|
membersArray = append(membersArray, classNamedEvaluationHelperBlock);
|
172888
172888
|
membersArray = append(membersArray, syntheticConstructor);
|
@@ -179451,7 +179451,7 @@ ${lanes.join("\n")}
|
|
179451
179451
|
function visitJsxOpeningLikeElementJSX(node, children, isChild, location) {
|
179452
179452
|
const tagName = getTagName(node);
|
179453
179453
|
const childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : void 0;
|
179454
|
-
const keyAttr =
|
179454
|
+
const keyAttr = find2(node.attributes.properties, (p) => !!p.name && isIdentifier(p.name) && p.name.escapedText === "key");
|
179455
179455
|
const attrs = keyAttr ? filter6(node.attributes.properties, (p) => p !== keyAttr) : node.attributes.properties;
|
179456
179456
|
const objectProperties = length4(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) : factory2.createObjectLiteralExpression(childrenProp ? [childrenProp] : emptyArray);
|
179457
179457
|
return visitJsxOpeningLikeElementOrFragmentJSX(
|
@@ -191629,7 +191629,7 @@ ${lanes.join("\n")}
|
|
191629
191629
|
output,
|
191630
191630
|
void 0
|
191631
191631
|
);
|
191632
|
-
|
191632
|
+
print2(hint, node, sourceFile);
|
191633
191633
|
reset2();
|
191634
191634
|
writer = previousWriter;
|
191635
191635
|
}
|
@@ -191659,7 +191659,7 @@ ${lanes.join("\n")}
|
|
191659
191659
|
emitHelpers(bundle);
|
191660
191660
|
emitSyntheticTripleSlashReferencesIfNeeded(bundle);
|
191661
191661
|
for (const sourceFile of bundle.sourceFiles) {
|
191662
|
-
|
191662
|
+
print2(0, sourceFile, sourceFile);
|
191663
191663
|
}
|
191664
191664
|
reset2();
|
191665
191665
|
writer = previousWriter;
|
@@ -191670,7 +191670,7 @@ ${lanes.join("\n")}
|
|
191670
191670
|
setWriter(output, sourceMapGenerator2);
|
191671
191671
|
emitShebangIfNeeded(sourceFile);
|
191672
191672
|
emitPrologueDirectivesIfNeeded(sourceFile);
|
191673
|
-
|
191673
|
+
print2(0, sourceFile, sourceFile);
|
191674
191674
|
reset2();
|
191675
191675
|
writer = previousWriter;
|
191676
191676
|
}
|
@@ -191682,7 +191682,7 @@ ${lanes.join("\n")}
|
|
191682
191682
|
ownWriter.clear();
|
191683
191683
|
return text2;
|
191684
191684
|
}
|
191685
|
-
function
|
191685
|
+
function print2(hint, node, sourceFile) {
|
191686
191686
|
if (sourceFile) {
|
191687
191687
|
setSourceFile(sourceFile);
|
191688
191688
|
}
|
@@ -195889,7 +195889,7 @@ ${lanes.join("\n")}
|
|
195889
195889
|
}
|
195890
195890
|
}
|
195891
195891
|
function hasEntry(entries, name2) {
|
195892
|
-
const index3 = binarySearch(entries, name2,
|
195892
|
+
const index3 = binarySearch(entries, name2, identity17, compareStringsCaseSensitive);
|
195893
195893
|
return index3 >= 0;
|
195894
195894
|
}
|
195895
195895
|
function writeFile22(fileName, data, writeByteOrderMark) {
|
@@ -196013,7 +196013,7 @@ ${lanes.join("\n")}
|
|
196013
196013
|
parentResult.files.push(baseName);
|
196014
196014
|
}
|
196015
196015
|
} else {
|
196016
|
-
const sortedIndex = binarySearch(canonicalizedFiles, canonicalizedBaseName,
|
196016
|
+
const sortedIndex = binarySearch(canonicalizedFiles, canonicalizedBaseName, identity17, compareStringsCaseSensitive);
|
196017
196017
|
if (sortedIndex >= 0) {
|
196018
196018
|
canonicalizedFiles.splice(sortedIndex, 1);
|
196019
196019
|
const unsortedIndex = parentResult.files.findIndex((entry) => getCanonicalFileName(entry) === canonicalizedBaseName);
|
@@ -196162,7 +196162,7 @@ ${lanes.join("\n")}
|
|
196162
196162
|
}
|
196163
196163
|
return false;
|
196164
196164
|
function hasSourceFile(file) {
|
196165
|
-
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!
|
196165
|
+
return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find2(program, (rootFile) => toPath3(rootFile) === file);
|
196166
196166
|
}
|
196167
196167
|
function isSupportedScriptKind() {
|
196168
196168
|
if (!getScriptKind2)
|
@@ -197524,7 +197524,7 @@ ${lanes.join("\n")}
|
|
197524
197524
|
const libReference = file.libReferenceDirectives[reason.index];
|
197525
197525
|
const libName = getLibNameFromLibReference(libReference);
|
197526
197526
|
const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
|
197527
|
-
const suggestion = getSpellingSuggestion(unqualifiedLibName, libs,
|
197527
|
+
const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity17);
|
197528
197528
|
return createFileDiagnostic(
|
197529
197529
|
file,
|
197530
197530
|
Debug.checkDefined(pos),
|
@@ -198426,7 +198426,7 @@ ${lanes.join("\n")}
|
|
198426
198426
|
}
|
198427
198427
|
function walkArray(nodes, parent2) {
|
198428
198428
|
if (canHaveIllegalDecorators(parent2)) {
|
198429
|
-
const decorator =
|
198429
|
+
const decorator = find2(parent2.modifiers, isDecorator);
|
198430
198430
|
if (decorator) {
|
198431
198431
|
diagnostics.push(createDiagnosticForNode2(decorator, Diagnostics.Decorators_are_not_valid_here));
|
198432
198432
|
}
|
@@ -199454,7 +199454,7 @@ ${lanes.join("\n")}
|
|
199454
199454
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib");
|
199455
199455
|
}
|
199456
199456
|
const languageVersion = getEmitScriptTarget(options);
|
199457
|
-
const firstNonAmbientExternalModuleSourceFile =
|
199457
|
+
const firstNonAmbientExternalModuleSourceFile = find2(files, (f) => isExternalModule(f) && !f.isDeclarationFile);
|
199458
199458
|
if (options.isolatedModules || options.verbatimModuleSyntax) {
|
199459
199459
|
if (options.module === 0 && languageVersion < 2 && options.isolatedModules) {
|
199460
199460
|
createDiagnosticForOptionName(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target");
|
@@ -200043,7 +200043,7 @@ ${lanes.join("\n")}
|
|
200043
200043
|
_compilerOptionsPropertySyntax = forEachPropertyAssignment(
|
200044
200044
|
getTsConfigObjectLiteralExpression(options.configFile),
|
200045
200045
|
"compilerOptions",
|
200046
|
-
|
200046
|
+
identity17
|
200047
200047
|
) || false;
|
200048
200048
|
}
|
200049
200049
|
return _compilerOptionsPropertySyntax || void 0;
|
@@ -203297,7 +203297,7 @@ ${lanes.join("\n")}
|
|
203297
203297
|
if (fileName === void 0) {
|
203298
203298
|
return void 0;
|
203299
203299
|
}
|
203300
|
-
const diagnosticForFileName =
|
203300
|
+
const diagnosticForFileName = find2(diagnostics, (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName);
|
203301
203301
|
if (diagnosticForFileName !== void 0) {
|
203302
203302
|
const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start);
|
203303
203303
|
return {
|
@@ -205072,7 +205072,7 @@ ${lanes.join("\n")}
|
|
205072
205072
|
buildOrder,
|
205073
205073
|
getCompilerOptions: () => config2.options,
|
205074
205074
|
getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(),
|
205075
|
-
getBuilderProgram: () => withProgramOrUndefined(
|
205075
|
+
getBuilderProgram: () => withProgramOrUndefined(identity17),
|
205076
205076
|
getProgram: () => withProgramOrUndefined(
|
205077
205077
|
(program2) => program2.getProgramOrUndefined()
|
205078
205078
|
),
|
@@ -209199,10 +209199,10 @@ ${lanes.join("\n")}
|
|
209199
209199
|
return !!findChildOfKind(n, kind, sourceFile);
|
209200
209200
|
}
|
209201
209201
|
function findChildOfKind(n, kind, sourceFile) {
|
209202
|
-
return
|
209202
|
+
return find2(n.getChildren(sourceFile), (c) => c.kind === kind);
|
209203
209203
|
}
|
209204
209204
|
function findContainingList(node) {
|
209205
|
-
const syntaxList =
|
209205
|
+
const syntaxList = find2(node.parent.getChildren(), (c) => isSyntaxList(c) && rangeContainsRange(c, node));
|
209206
209206
|
Debug.assert(!syntaxList || contains2(syntaxList.getChildren(), node));
|
209207
209207
|
return syntaxList;
|
209208
209208
|
}
|
@@ -209220,12 +209220,12 @@ ${lanes.join("\n")}
|
|
209220
209220
|
return node.name;
|
209221
209221
|
}
|
209222
209222
|
if (isClassDeclaration(node)) {
|
209223
|
-
const defaultModifier = node.modifiers &&
|
209223
|
+
const defaultModifier = node.modifiers && find2(node.modifiers, isDefaultModifier2);
|
209224
209224
|
if (defaultModifier)
|
209225
209225
|
return defaultModifier;
|
209226
209226
|
}
|
209227
209227
|
if (isClassExpression(node)) {
|
209228
|
-
const classKeyword =
|
209228
|
+
const classKeyword = find2(node.getChildren(), isClassKeyword);
|
209229
209229
|
if (classKeyword)
|
209230
209230
|
return classKeyword;
|
209231
209231
|
}
|
@@ -209235,12 +209235,12 @@ ${lanes.join("\n")}
|
|
209235
209235
|
return node.name;
|
209236
209236
|
}
|
209237
209237
|
if (isFunctionDeclaration(node)) {
|
209238
|
-
const defaultModifier =
|
209238
|
+
const defaultModifier = find2(node.modifiers, isDefaultModifier2);
|
209239
209239
|
if (defaultModifier)
|
209240
209240
|
return defaultModifier;
|
209241
209241
|
}
|
209242
209242
|
if (isFunctionExpression(node)) {
|
209243
|
-
const functionKeyword =
|
209243
|
+
const functionKeyword = find2(node.getChildren(), isFunctionKeyword);
|
209244
209244
|
if (functionKeyword)
|
209245
209245
|
return functionKeyword;
|
209246
209246
|
}
|
@@ -209544,22 +209544,22 @@ ${lanes.join("\n")}
|
|
209544
209544
|
return findPrecedingToken(position2, file);
|
209545
209545
|
}
|
209546
209546
|
function findNextToken(previousToken, parent2, sourceFile) {
|
209547
|
-
return
|
209548
|
-
function
|
209547
|
+
return find22(parent2);
|
209548
|
+
function find22(n) {
|
209549
209549
|
if (isToken(n) && n.pos === previousToken.end) {
|
209550
209550
|
return n;
|
209551
209551
|
}
|
209552
209552
|
return firstDefined(n.getChildren(sourceFile), (child) => {
|
209553
209553
|
const shouldDiveInChildNode = child.pos <= previousToken.pos && child.end > previousToken.end || child.pos === previousToken.end;
|
209554
|
-
return shouldDiveInChildNode && nodeHasTokens(child, sourceFile) ?
|
209554
|
+
return shouldDiveInChildNode && nodeHasTokens(child, sourceFile) ? find22(child) : void 0;
|
209555
209555
|
});
|
209556
209556
|
}
|
209557
209557
|
}
|
209558
209558
|
function findPrecedingToken(position2, sourceFile, startNode2, excludeJsdoc) {
|
209559
|
-
const result =
|
209559
|
+
const result = find22(startNode2 || sourceFile);
|
209560
209560
|
Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));
|
209561
209561
|
return result;
|
209562
|
-
function
|
209562
|
+
function find22(n) {
|
209563
209563
|
if (isNonWhitespaceToken(n) && n.kind !== 1) {
|
209564
209564
|
return n;
|
209565
209565
|
}
|
@@ -209590,13 +209590,13 @@ ${lanes.join("\n")}
|
|
209590
209590
|
);
|
209591
209591
|
if (candidate2) {
|
209592
209592
|
if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) {
|
209593
|
-
return
|
209593
|
+
return find22(candidate2);
|
209594
209594
|
}
|
209595
209595
|
return findRightmostToken(candidate2, sourceFile);
|
209596
209596
|
}
|
209597
209597
|
return void 0;
|
209598
209598
|
} else {
|
209599
|
-
return
|
209599
|
+
return find22(child);
|
209600
209600
|
}
|
209601
209601
|
}
|
209602
209602
|
}
|
@@ -210110,7 +210110,7 @@ ${lanes.join("\n")}
|
|
210110
210110
|
if (preferences.quotePreference && preferences.quotePreference !== "auto") {
|
210111
210111
|
return preferences.quotePreference === "single" ? 0 : 1;
|
210112
210112
|
} else {
|
210113
|
-
const firstModuleSpecifier = isFullSourceFile(sourceFile) && sourceFile.imports &&
|
210113
|
+
const firstModuleSpecifier = isFullSourceFile(sourceFile) && sourceFile.imports && find2(sourceFile.imports, (n) => isStringLiteral(n) && !nodeIsSynthesized(n.parent));
|
210114
210114
|
return firstModuleSpecifier ? quotePreferenceFromString(firstModuleSpecifier, sourceFile) : 1;
|
210115
210115
|
}
|
210116
210116
|
}
|
@@ -210164,7 +210164,7 @@ ${lanes.join("\n")}
|
|
210164
210164
|
return textSpanContainsPosition(span3, node.getStart(file)) && node.getEnd() <= textSpanEnd(span3);
|
210165
210165
|
}
|
210166
210166
|
function findModifier(node, kind) {
|
210167
|
-
return canHaveModifiers(node) ?
|
210167
|
+
return canHaveModifiers(node) ? find2(node.modifiers, (m) => m.kind === kind) : void 0;
|
210168
210168
|
}
|
210169
210169
|
function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) {
|
210170
210170
|
var _a4;
|
@@ -211154,7 +211154,7 @@ ${lanes.join("\n")}
|
|
211154
211154
|
}
|
211155
211155
|
function findDiagnosticForNode(node, sortedFileDiagnostics) {
|
211156
211156
|
const span3 = createTextSpanFromNode(node);
|
211157
|
-
const index3 = binarySearchKey(sortedFileDiagnostics, span3,
|
211157
|
+
const index3 = binarySearchKey(sortedFileDiagnostics, span3, identity17, compareTextSpans);
|
211158
211158
|
if (index3 >= 0) {
|
211159
211159
|
const diagnostic = sortedFileDiagnostics[index3];
|
211160
211160
|
Debug.assertEqual(diagnostic.file, node.getSourceFile(), "Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile");
|
@@ -211197,7 +211197,7 @@ ${lanes.join("\n")}
|
|
211197
211197
|
});
|
211198
211198
|
return expression;
|
211199
211199
|
}
|
211200
|
-
function mapOneOrMany(valueOrArray, f, resultSelector =
|
211200
|
+
function mapOneOrMany(valueOrArray, f, resultSelector = identity17) {
|
211201
211201
|
return valueOrArray ? isArray4(valueOrArray) ? resultSelector(map3(valueOrArray, f)) : f(valueOrArray, 0) : void 0;
|
211202
211202
|
}
|
211203
211203
|
function firstOrOnly(valueOrArray) {
|
@@ -212785,7 +212785,7 @@ ${lanes.join("\n")}
|
|
212785
212785
|
return void 0;
|
212786
212786
|
}
|
212787
212787
|
const redirectTarget = program.getSourceFile(fileName);
|
212788
|
-
const redirect =
|
212788
|
+
const redirect = find2(sourceFilesToSearch, (f) => !!f.redirectInfo && f.redirectInfo.redirectTarget === redirectTarget);
|
212789
212789
|
fileName = redirect.fileName;
|
212790
212790
|
Debug.assert(sourceFilesSet.has(fileName));
|
212791
212791
|
}
|
@@ -212849,7 +212849,7 @@ ${lanes.join("\n")}
|
|
212849
212849
|
function getFromAllDeclarations(nodeTest, keywords) {
|
212850
212850
|
return useParent(node.parent, nodeTest, (decl) => {
|
212851
212851
|
var _a4;
|
212852
|
-
return mapDefined((_a4 = tryCast(decl, canHaveSymbol)) == null ? void 0 : _a4.symbol.declarations, (d) => nodeTest(d) ?
|
212852
|
+
return mapDefined((_a4 = tryCast(decl, canHaveSymbol)) == null ? void 0 : _a4.symbol.declarations, (d) => nodeTest(d) ? find2(d.getChildren(sourceFile), (c) => contains2(keywords, c.kind)) : void 0);
|
212853
212853
|
});
|
212854
212854
|
}
|
212855
212855
|
function useParent(node2, nodeTest, getNodes4) {
|
@@ -212945,7 +212945,7 @@ ${lanes.join("\n")}
|
|
212945
212945
|
case 187:
|
212946
212946
|
const nodes = container.members;
|
212947
212947
|
if (modifierFlag & (7 | 8)) {
|
212948
|
-
const constructor =
|
212948
|
+
const constructor = find2(container.members, isConstructorDeclaration);
|
212949
212949
|
if (constructor) {
|
212950
212950
|
return [...nodes, ...constructor.parameters];
|
212951
212951
|
}
|
@@ -213327,7 +213327,7 @@ ${lanes.join("\n")}
|
|
213327
213327
|
} else {
|
213328
213328
|
bucketEntry.delete(scriptKind);
|
213329
213329
|
if (bucketEntry.size === 1) {
|
213330
|
-
bucket.set(path10, firstDefinedIterator(bucketEntry.values(),
|
213330
|
+
bucket.set(path10, firstDefinedIterator(bucketEntry.values(), identity17));
|
213331
213331
|
}
|
213332
213332
|
}
|
213333
213333
|
}
|
@@ -213489,7 +213489,7 @@ ${lanes.join("\n")}
|
|
213489
213489
|
}
|
213490
213490
|
function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) {
|
213491
213491
|
if (importedModuleSymbol) {
|
213492
|
-
const oldFileName =
|
213492
|
+
const oldFileName = find2(importedModuleSymbol.declarations, isSourceFile).fileName;
|
213493
213493
|
const newFileName = oldToNew(oldFileName);
|
213494
213494
|
return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true };
|
213495
213495
|
} else {
|
@@ -213512,7 +213512,7 @@ ${lanes.join("\n")}
|
|
213512
213512
|
return resolved.resolvedModule && { newFileName: resolved.resolvedModule.resolvedFileName, updated: false };
|
213513
213513
|
function tryChangeWithIgnoringPackageJsonExisting(oldFileName) {
|
213514
213514
|
const newFileName = oldToNew(oldFileName);
|
213515
|
-
return newFileName &&
|
213515
|
+
return newFileName && find2(sourceFiles, (src) => src.fileName === newFileName) ? tryChangeWithIgnoringPackageJson(oldFileName) : void 0;
|
213516
213516
|
}
|
213517
213517
|
function tryChangeWithIgnoringPackageJson(oldFileName) {
|
213518
213518
|
return !endsWith(oldFileName, "/package.json") ? tryChange(oldFileName) : void 0;
|
@@ -216558,7 +216558,7 @@ interface Symbol {
|
|
216558
216558
|
const newFileAbsolutePath = normalizePath(combinePaths(oldFileName, "..", newFileNameWithExtension));
|
216559
216559
|
const newFilePath = getRelativePathFromFile(cfg.fileName, newFileAbsolutePath, getCanonicalFileName);
|
216560
216560
|
const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression);
|
216561
|
-
const filesProp = cfgObject &&
|
216561
|
+
const filesProp = cfgObject && find2(cfgObject.properties, (prop) => isPropertyAssignment(prop) && isStringLiteral(prop.name) && prop.name.text === "files");
|
216562
216562
|
if (filesProp && isArrayLiteralExpression(filesProp.initializer)) {
|
216563
216563
|
changes.insertNodeInListAfter(cfg, last3(filesProp.initializer.elements), factory.createStringLiteral(newFilePath), filesProp.initializer.elements);
|
216564
216564
|
}
|
@@ -217001,7 +217001,7 @@ interface Symbol {
|
|
217001
217001
|
return all3.length === 0 ? void 0 : { all: all3, ranges };
|
217002
217002
|
}
|
217003
217003
|
function containsJsx(statements) {
|
217004
|
-
return
|
217004
|
+
return find2(statements, (statement) => !!(statement.transformFlags & 2));
|
217005
217005
|
}
|
217006
217006
|
function isAllowedStatementToMove(statement) {
|
217007
217007
|
return !isPureImport(statement) && !isPrologueDirective(statement);
|
@@ -217212,7 +217212,7 @@ interface Symbol {
|
|
217212
217212
|
for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) {
|
217213
217213
|
if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length4(exportDeclaration.exportClause.elements)) {
|
217214
217214
|
const elements = exportDeclaration.exportClause.elements;
|
217215
|
-
const updatedElements = filter6(elements, (elem2) =>
|
217215
|
+
const updatedElements = filter6(elements, (elem2) => find2(skipAlias(elem2.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0);
|
217216
217216
|
if (length4(updatedElements) === 0) {
|
217217
217217
|
changes.deleteNode(targetFile, exportDeclaration);
|
217218
217218
|
removedExports.add(exportDeclaration);
|
@@ -219882,7 +219882,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
219882
219882
|
while (isParenthesizedTypeNode(withoutParens)) {
|
219883
219883
|
withoutParens = withoutParens.type;
|
219884
219884
|
}
|
219885
|
-
return isUnionTypeNode(withoutParens) &&
|
219885
|
+
return isUnionTypeNode(withoutParens) && find2(withoutParens.types, (t) => t.kind === 157) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157)]);
|
219886
219886
|
}
|
219887
219887
|
}
|
219888
219888
|
function extractConstantInScope(node, scope, { substitutions }, rangeFacts, context2) {
|
@@ -220164,7 +220164,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
220164
220164
|
return emptyArray;
|
220165
220165
|
}
|
220166
220166
|
function getNodeToInsertFunctionBefore(minPos, scope) {
|
220167
|
-
return
|
220167
|
+
return find2(getStatementsOrClassElements(scope), (child) => child.pos >= minPos && isFunctionLikeDeclaration(child) && !isConstructorDeclaration(child));
|
220168
220168
|
}
|
220169
220169
|
function getNodeToInsertPropertyBefore(maxPos, scope) {
|
220170
220170
|
const members = scope.members;
|
@@ -220407,7 +220407,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
220407
220407
|
return symbolId;
|
220408
220408
|
}
|
220409
220409
|
const decls = symbol.getDeclarations();
|
220410
|
-
const declInFile = decls &&
|
220410
|
+
const declInFile = decls && find2(decls, (d) => d.getSourceFile() === sourceFile);
|
220411
220411
|
if (!declInFile) {
|
220412
220412
|
return void 0;
|
220413
220413
|
}
|
@@ -220457,7 +220457,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
220457
220457
|
}
|
220458
220458
|
const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node);
|
220459
220459
|
if (sym) {
|
220460
|
-
const decl =
|
220460
|
+
const decl = find2(visibleDeclarationsInExtractedRange, (d) => d.symbol === sym);
|
220461
220461
|
if (decl) {
|
220462
220462
|
if (isVariableDeclaration(decl)) {
|
220463
220463
|
const idString = decl.symbol.id.toString();
|
@@ -220966,7 +220966,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
220966
220966
|
if (!children.length) {
|
220967
220967
|
return void 0;
|
220968
220968
|
}
|
220969
|
-
const child =
|
220969
|
+
const child = find2(children, (kid) => kid.kind < 309 || kid.kind > 351);
|
220970
220970
|
return child.kind < 166 ? child : child.getFirstToken(sourceFile);
|
220971
220971
|
}
|
220972
220972
|
getLastToken(sourceFile) {
|
@@ -222102,7 +222102,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
222102
222102
|
}
|
222103
222103
|
function getCompletionsAtPosition2(fileName, position2, options = emptyOptions, formattingSettings) {
|
222104
222104
|
const fullPreferences = {
|
222105
|
-
...
|
222105
|
+
...identity17(options),
|
222106
222106
|
includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports,
|
222107
222107
|
includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions
|
222108
222108
|
};
|
@@ -223614,7 +223614,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
223614
223614
|
return node.name;
|
223615
223615
|
if (isAssignedExpression(node))
|
223616
223616
|
return node.parent.name;
|
223617
|
-
return Debug.checkDefined(node.modifiers &&
|
223617
|
+
return Debug.checkDefined(node.modifiers && find2(node.modifiers, isDefaultModifier3));
|
223618
223618
|
}
|
223619
223619
|
function isDefaultModifier3(node) {
|
223620
223620
|
return node.kind === 90;
|
@@ -223628,7 +223628,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
223628
223628
|
return { text: node.fileName, pos: 0, end: 0 };
|
223629
223629
|
}
|
223630
223630
|
if ((isFunctionDeclaration(node) || isClassDeclaration(node)) && !isNamedDeclaration(node)) {
|
223631
|
-
const defaultModifier = node.modifiers &&
|
223631
|
+
const defaultModifier = node.modifiers && find2(node.modifiers, isDefaultModifier3);
|
223632
223632
|
if (defaultModifier) {
|
223633
223633
|
return { text: "default", pos: defaultModifier.getStart(), end: defaultModifier.getEnd() };
|
223634
223634
|
}
|
@@ -224224,8 +224224,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
224224
224224
|
errorCodes: errorCodes2,
|
224225
224225
|
getCodeActions: function getCodeActionsToAddMissingAsync(context2) {
|
224226
224226
|
const { sourceFile, errorCode, cancellationToken, program, span: span3 } = context2;
|
224227
|
-
const diagnostic =
|
224228
|
-
const directSpan = diagnostic && diagnostic.relatedInformation &&
|
224227
|
+
const diagnostic = find2(program.getTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span3, errorCode));
|
224228
|
+
const directSpan = diagnostic && diagnostic.relatedInformation && find2(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);
|
224229
224229
|
const decl = getFixableErrorSpanDeclaration(sourceFile, directSpan);
|
224230
224230
|
if (!decl) {
|
224231
224231
|
return;
|
@@ -224237,7 +224237,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
224237
224237
|
const { sourceFile } = context2;
|
224238
224238
|
const fixedDeclarations = /* @__PURE__ */ new Set();
|
224239
224239
|
return codeFixAll(context2, errorCodes2, (t, diagnostic) => {
|
224240
|
-
const span3 = diagnostic.relatedInformation &&
|
224240
|
+
const span3 = diagnostic.relatedInformation && find2(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);
|
224241
224241
|
const decl = getFixableErrorSpanDeclaration(sourceFile, span3);
|
224242
224242
|
if (!decl) {
|
224243
224243
|
return;
|
@@ -224433,7 +224433,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
224433
224433
|
}
|
224434
224434
|
function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker) {
|
224435
224435
|
const errorNode = isPropertyAccessExpression(reference.parent) ? reference.parent.name : isBinaryExpression(reference.parent) ? reference.parent : reference;
|
224436
|
-
const diagnostic =
|
224436
|
+
const diagnostic = find2(diagnostics, (diagnostic2) => diagnostic2.start === errorNode.getStart(sourceFile) && diagnostic2.start + diagnostic2.length === errorNode.getEnd());
|
224437
224437
|
return diagnostic && contains2(errorCodes3, diagnostic.code) || checker.getTypeAtLocation(errorNode).flags & 1;
|
224438
224438
|
}
|
224439
224439
|
function isInsideAwaitableBody(node) {
|
@@ -226881,7 +226881,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
226881
226881
|
const implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
|
226882
226882
|
const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and(symbolPointsToNonPrivateMember, (symbol) => !maybeHeritageClauseSymbol.has(symbol.escapedName)));
|
226883
226883
|
const classType = checker.getTypeAtLocation(classDeclaration);
|
226884
|
-
const constructor =
|
226884
|
+
const constructor = find2(classDeclaration.members, (m) => isConstructorDeclaration(m));
|
226885
226885
|
if (!classType.getNumberIndexType()) {
|
226886
226886
|
createMissingIndexSignatureDeclaration(implementedType, 1);
|
226887
226887
|
}
|
@@ -227716,7 +227716,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
227716
227716
|
checker,
|
227717
227717
|
compilerOptions,
|
227718
227718
|
false,
|
227719
|
-
|
227719
|
+
identity17
|
227720
227720
|
);
|
227721
227721
|
}
|
227722
227722
|
namespacePrefix || (namespacePrefix = moduleSymbolToValidIdentifier(
|
@@ -228426,10 +228426,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
228426
228426
|
}
|
228427
228427
|
});
|
228428
228428
|
function getInfo6(program, sourceFile, span3) {
|
228429
|
-
const diag2 =
|
228429
|
+
const diag2 = find2(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span3.start && diag3.length === span3.length);
|
228430
228430
|
if (diag2 === void 0 || diag2.relatedInformation === void 0)
|
228431
228431
|
return;
|
228432
|
-
const related =
|
228432
|
+
const related = find2(diag2.relatedInformation, (related2) => related2.code === Diagnostics.This_type_parameter_might_need_an_extends_0_constraint.code);
|
228433
228433
|
if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0)
|
228434
228434
|
return;
|
228435
228435
|
let declaration = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length));
|
@@ -228597,9 +228597,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
228597
228597
|
return;
|
228598
228598
|
}
|
228599
228599
|
const modifiers = classElement.modifiers || emptyArray;
|
228600
|
-
const staticModifier =
|
228601
|
-
const abstractModifier =
|
228602
|
-
const accessibilityModifier =
|
228600
|
+
const staticModifier = find2(modifiers, isStaticModifier);
|
228601
|
+
const abstractModifier = find2(modifiers, isAbstractModifier);
|
228602
|
+
const accessibilityModifier = find2(modifiers, (m) => isAccessibilityModifier(m.kind));
|
228603
228603
|
const lastDecorator = findLast(modifiers, isDecorator);
|
228604
228604
|
const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile);
|
228605
228605
|
const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " };
|
@@ -228611,7 +228611,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
228611
228611
|
changeTracker.filterJSDocTags(sourceFile, classElement, not(isJSDocOverrideTag));
|
228612
228612
|
return;
|
228613
228613
|
}
|
228614
|
-
const overrideModifier =
|
228614
|
+
const overrideModifier = find2(classElement.modifiers, isOverrideModifier);
|
228615
228615
|
Debug.assertIsDefined(overrideModifier);
|
228616
228616
|
changeTracker.deleteModifier(sourceFile, overrideModifier);
|
228617
228617
|
}
|
@@ -228830,7 +228830,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
228830
228830
|
}
|
228831
228831
|
function updateExport(changes, program, sourceFile, node, names) {
|
228832
228832
|
const namedExports = node.exportClause && isNamedExports(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]);
|
228833
|
-
const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) ||
|
228833
|
+
const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) || find2(namedExports, (e) => e.isTypeOnly));
|
228834
228834
|
changes.replaceNode(
|
228835
228835
|
sourceFile,
|
228836
228836
|
node,
|
@@ -229460,22 +229460,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
229460
229460
|
if (!symbol || !symbol.declarations)
|
229461
229461
|
return void 0;
|
229462
229462
|
if (isIdentifier(token) && isCallExpression(parent2.parent)) {
|
229463
|
-
const moduleDeclaration =
|
229463
|
+
const moduleDeclaration = find2(symbol.declarations, isModuleDeclaration);
|
229464
229464
|
const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile();
|
229465
229465
|
if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) {
|
229466
229466
|
return { kind: 2, token, call: parent2.parent, sourceFile, modifierFlags: 32, parentDeclaration: moduleDeclaration };
|
229467
229467
|
}
|
229468
|
-
const moduleSourceFile =
|
229468
|
+
const moduleSourceFile = find2(symbol.declarations, isSourceFile);
|
229469
229469
|
if (sourceFile.commonJsModuleIndicator)
|
229470
229470
|
return void 0;
|
229471
229471
|
if (moduleSourceFile && !isSourceFileFromLibrary(program, moduleSourceFile)) {
|
229472
229472
|
return { kind: 2, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 32, parentDeclaration: moduleSourceFile };
|
229473
229473
|
}
|
229474
229474
|
}
|
229475
|
-
const classDeclaration =
|
229475
|
+
const classDeclaration = find2(symbol.declarations, isClassLike);
|
229476
229476
|
if (!classDeclaration && isPrivateIdentifier(token))
|
229477
229477
|
return void 0;
|
229478
|
-
const declaration = classDeclaration ||
|
229478
|
+
const declaration = classDeclaration || find2(symbol.declarations, (d) => isInterfaceDeclaration(d) || isTypeLiteralNode(d));
|
229479
229479
|
if (declaration && !isSourceFileFromLibrary(program, declaration.getSourceFile())) {
|
229480
229480
|
const makeStatic = !isTypeLiteralNode(declaration) && (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol);
|
229481
229481
|
if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(declaration)))
|
@@ -229486,7 +229486,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
229486
229486
|
const call = tryCast(parent2.parent, isCallExpression);
|
229487
229487
|
return { kind: 0, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile };
|
229488
229488
|
}
|
229489
|
-
const enumDeclaration =
|
229489
|
+
const enumDeclaration = find2(symbol.declarations, isEnumDeclaration);
|
229490
229490
|
if (enumDeclaration && !(leftExpressionType.flags & 1056) && !isPrivateIdentifier(token) && !isSourceFileFromLibrary(program, enumDeclaration.getSourceFile())) {
|
229491
229491
|
return { kind: 1, token, parentDeclaration: enumDeclaration };
|
229492
229492
|
}
|
@@ -229794,7 +229794,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
229794
229794
|
);
|
229795
229795
|
}
|
229796
229796
|
if (getObjectFlags(type) & 16) {
|
229797
|
-
const decl =
|
229797
|
+
const decl = find2(type.symbol.declarations || emptyArray, or(isFunctionTypeNode, isMethodSignature, isMethodDeclaration));
|
229798
229798
|
if (decl === void 0)
|
229799
229799
|
return createUndefined();
|
229800
229800
|
const signature = checker.getSignaturesOfType(type, 0);
|
@@ -230371,10 +230371,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
230371
230371
|
}
|
230372
230372
|
});
|
230373
230373
|
function getInfo12(program, sourceFile, span3) {
|
230374
|
-
const diag2 =
|
230374
|
+
const diag2 = find2(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span3.start && diag3.length === span3.length);
|
230375
230375
|
if (diag2 === void 0 || diag2.relatedInformation === void 0)
|
230376
230376
|
return;
|
230377
|
-
const related =
|
230377
|
+
const related = find2(diag2.relatedInformation, (related2) => related2.code === Diagnostics.Did_you_mean_0.code);
|
230378
230378
|
if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0)
|
230379
230379
|
return;
|
230380
230380
|
const token = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length));
|
@@ -230698,7 +230698,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
230698
230698
|
return;
|
230699
230699
|
const checker = program.getTypeChecker();
|
230700
230700
|
const symbol = checker.getSymbolAtLocation(identifier);
|
230701
|
-
return
|
230701
|
+
return find2((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration));
|
230702
230702
|
}
|
230703
230703
|
function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) {
|
230704
230704
|
if (importDeclaration.kind === 271) {
|
@@ -233893,7 +233893,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
233893
233893
|
return factory.createPropertyAssignment(factory.createStringLiteral(name2), initializer);
|
233894
233894
|
}
|
233895
233895
|
function findJsonProperty(obj, name2) {
|
233896
|
-
return
|
233896
|
+
return find2(obj.properties, (p) => isPropertyAssignment(p) && !!p.name && isStringLiteral(p.name) && p.name.text === name2);
|
233897
233897
|
}
|
233898
233898
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
233899
233899
|
let symbols;
|
@@ -234151,7 +234151,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
234151
234151
|
if (!superSymbol)
|
234152
234152
|
break;
|
234153
234153
|
const symbol = superSymbol.flags & 2097152 ? checker.getAliasedSymbol(superSymbol) : superSymbol;
|
234154
|
-
const superDecl = symbol.declarations &&
|
234154
|
+
const superDecl = symbol.declarations && find2(symbol.declarations, isClassLike);
|
234155
234155
|
if (!superDecl)
|
234156
234156
|
break;
|
234157
234157
|
res.push(superDecl);
|
@@ -235968,7 +235968,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
235968
235968
|
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none" && !(isJsxAttribute(location.parent) && location.parent.initializer)) {
|
235969
235969
|
let useBraces2 = preferences.jsxAttributeCompletionStyle === "braces";
|
235970
235970
|
const type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
235971
|
-
if (preferences.jsxAttributeCompletionStyle === "auto" && !(type.flags & 528) && !(type.flags & 1048576 &&
|
235971
|
+
if (preferences.jsxAttributeCompletionStyle === "auto" && !(type.flags & 528) && !(type.flags & 1048576 && find2(type.types, (type2) => !!(type2.flags & 528)))) {
|
235972
235972
|
if (type.flags & 402653316 || type.flags & 1048576 && every(type.types, (type2) => !!(type2.flags & (402653316 | 32768) || isStringAndEmptyAnonymousObjectIntersection(type2)))) {
|
235973
235973
|
insertText = `${escapeSnippetText(name2)}=${quote(sourceFile, preferences, "$1")}`;
|
235974
235974
|
isSnippet = true;
|
@@ -236657,7 +236657,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
236657
236657
|
return { type: "request", request: completionData };
|
236658
236658
|
}
|
236659
236659
|
const { symbols, literals, location, completionKind, symbolToOriginInfoMap, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData;
|
236660
|
-
const literal =
|
236660
|
+
const literal = find2(literals, (l) => completionNameForLiteral(sourceFile, preferences, l) === entryId.name);
|
236661
236661
|
if (literal !== void 0)
|
236662
236662
|
return { type: "literal", literal };
|
236663
236663
|
return firstDefined(symbols, (symbol, index3) => {
|
@@ -236677,8 +236677,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
236677
236677
|
const symbolCompletion = getSymbolCompletionFromEntryId(program, log3, sourceFile, position2, entryId, host, preferences);
|
236678
236678
|
switch (symbolCompletion.type) {
|
236679
236679
|
case "request": {
|
236680
|
-
const { request:
|
236681
|
-
switch (
|
236680
|
+
const { request: request4 } = symbolCompletion;
|
236681
|
+
switch (request4.kind) {
|
236682
236682
|
case 1:
|
236683
236683
|
return ts_JsDoc_exports.getJSDocTagNameCompletionDetails(name2);
|
236684
236684
|
case 2:
|
@@ -236686,9 +236686,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
236686
236686
|
case 3:
|
236687
236687
|
return ts_JsDoc_exports.getJSDocParameterNameCompletionDetails(name2);
|
236688
236688
|
case 4:
|
236689
|
-
return some4(
|
236689
|
+
return some4(request4.keywordCompletions, (c) => c.name === name2) ? createSimpleDetails(name2, "keyword", 5) : void 0;
|
236690
236690
|
default:
|
236691
|
-
return Debug.assertNever(
|
236691
|
+
return Debug.assertNever(request4);
|
236692
236692
|
}
|
236693
236693
|
}
|
236694
236694
|
case "symbol": {
|
@@ -237410,7 +237410,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
237410
237410
|
symbolToSortTextMap[getSymbolId(symbol)] = SortText.GlobalsOrKeywords;
|
237411
237411
|
}
|
237412
237412
|
if (typeOnlyAliasNeedsPromotion && !(symbol.flags & 111551)) {
|
237413
|
-
const typeOnlyAliasDeclaration = symbol.declarations &&
|
237413
|
+
const typeOnlyAliasDeclaration = symbol.declarations && find2(symbol.declarations, isTypeOnlyImportDeclaration);
|
237414
237414
|
if (typeOnlyAliasDeclaration) {
|
237415
237415
|
const origin = { kind: 64, declaration: typeOnlyAliasDeclaration };
|
237416
237416
|
symbolToOriginInfoMap[i] = origin;
|
@@ -238708,7 +238708,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
238708
238708
|
}
|
238709
238709
|
function getPotentiallyInvalidImportSpecifier(namedBindings) {
|
238710
238710
|
var _a4;
|
238711
|
-
return
|
238711
|
+
return find2(
|
238712
238712
|
(_a4 = tryCast(namedBindings, isNamedImports)) == null ? void 0 : _a4.elements,
|
238713
238713
|
(e) => {
|
238714
238714
|
var _a22;
|
@@ -238889,15 +238889,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
238889
238889
|
function stringLiteralCompletionDetails(name2, location, completion, sourceFile, checker, cancellationToken) {
|
238890
238890
|
switch (completion.kind) {
|
238891
238891
|
case 0: {
|
238892
|
-
const match3 =
|
238892
|
+
const match3 = find2(completion.paths, (p) => p.name === name2);
|
238893
238893
|
return match3 && createCompletionDetails(name2, kindModifiersFromExtension(match3.extension), match3.kind, [textPart(name2)]);
|
238894
238894
|
}
|
238895
238895
|
case 1: {
|
238896
|
-
const match3 =
|
238896
|
+
const match3 = find2(completion.symbols, (s) => s.name === name2);
|
238897
238897
|
return match3 && createCompletionDetailsForSymbol(match3, match3.name, checker, sourceFile, location, cancellationToken);
|
238898
238898
|
}
|
238899
238899
|
case 2:
|
238900
|
-
return
|
238900
|
+
return find2(completion.types, (t) => t.value === name2) ? createCompletionDetails(name2, "", "string", [textPart(name2)]) : void 0;
|
238901
238901
|
default:
|
238902
238902
|
return Debug.assertNever(completion);
|
238903
238903
|
}
|
@@ -239538,7 +239538,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
239538
239538
|
function getTripleSlashReferenceCompletion(sourceFile, position2, compilerOptions, host) {
|
239539
239539
|
const token = getTokenAtPosition(sourceFile, position2);
|
239540
239540
|
const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos);
|
239541
|
-
const range4 = commentRanges &&
|
239541
|
+
const range4 = commentRanges && find2(commentRanges, (commentRange) => position2 >= commentRange.pos && position2 <= commentRange.end);
|
239542
239542
|
if (!range4) {
|
239543
239543
|
return void 0;
|
239544
239544
|
}
|
@@ -240295,7 +240295,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
240295
240295
|
) : node;
|
240296
240296
|
case 255:
|
240297
240297
|
return {
|
240298
|
-
start:
|
240298
|
+
start: find2(node.getChildren(node.getSourceFile()), (node2) => node2.kind === 109),
|
240299
240299
|
end: node.caseBlock
|
240300
240300
|
};
|
240301
240301
|
default:
|
@@ -240789,7 +240789,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
240789
240789
|
return void 0;
|
240790
240790
|
}
|
240791
240791
|
function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) {
|
240792
|
-
const moduleSourceFile = symbol.flags & 1536 && symbol.declarations &&
|
240792
|
+
const moduleSourceFile = symbol.flags & 1536 && symbol.declarations && find2(symbol.declarations, isSourceFile);
|
240793
240793
|
if (!moduleSourceFile)
|
240794
240794
|
return void 0;
|
240795
240795
|
const exportEquals = symbol.exports.get("export=");
|
@@ -240951,7 +240951,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
240951
240951
|
const searchMeaning = node ? getIntersectingMeaningFromDeclarations(node, symbol) : 7;
|
240952
240952
|
const result = [];
|
240953
240953
|
const state = new State(sourceFiles, sourceFilesSet, node ? getSpecialSearchKind(node) : 0, checker, cancellationToken, searchMeaning, options, result);
|
240954
|
-
const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 :
|
240954
|
+
const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 : find2(symbol.declarations, isExportSpecifier);
|
240955
240955
|
if (exportSpecifier) {
|
240956
240956
|
getReferencesAtExportSpecifier(
|
240957
240957
|
exportSpecifier.name,
|
@@ -241034,7 +241034,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
241034
241034
|
function getNonModuleSymbolOfMergedModuleSymbol(symbol) {
|
241035
241035
|
if (!(symbol.flags & (1536 | 33554432)))
|
241036
241036
|
return void 0;
|
241037
|
-
const decl = symbol.declarations &&
|
241037
|
+
const decl = symbol.declarations && find2(symbol.declarations, (d) => !isSourceFile(d) && !isModuleDeclaration(d));
|
241038
241038
|
return decl && decl.symbol;
|
241039
241039
|
}
|
241040
241040
|
class State {
|
@@ -241186,7 +241186,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
241186
241186
|
return void 0;
|
241187
241187
|
}
|
241188
241188
|
if (flags & (4 | 8192)) {
|
241189
|
-
const privateDeclaration =
|
241189
|
+
const privateDeclaration = find2(declarations, (d) => hasEffectiveModifier(d, 2) || isPrivateIdentifierClassElementDeclaration(d));
|
241190
241190
|
if (privateDeclaration) {
|
241191
241191
|
return getAncestor(privateDeclaration, 263);
|
241192
241192
|
}
|
@@ -242442,7 +242442,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
242442
242442
|
));
|
242443
242443
|
function getConstructSignatureDefinition() {
|
242444
242444
|
if (symbol.flags & 32 && !(symbol.flags & (16 | 3)) && (isNewExpressionTarget(node) || node.kind === 137)) {
|
242445
|
-
const cls =
|
242445
|
+
const cls = find2(filteredDeclarations, isClassLike);
|
242446
242446
|
return cls && getSignatureDefinition(
|
242447
242447
|
cls.members,
|
242448
242448
|
true
|
@@ -242555,7 +242555,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
242555
242555
|
);
|
242556
242556
|
}
|
242557
242557
|
function findReferenceInPosition(refs, pos) {
|
242558
|
-
return
|
242558
|
+
return find2(refs, (ref) => textRangeContainsPositionInclusive(ref, pos));
|
242559
242559
|
}
|
242560
242560
|
function getDefinitionInfoForFileReference(name2, targetFileName, unverified) {
|
242561
242561
|
return {
|
@@ -243420,7 +243420,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
243420
243420
|
const parts = [];
|
243421
243421
|
forEachUnique(declarations, (declaration) => {
|
243422
243422
|
for (const jsdoc of getCommentHavingNodes(declaration)) {
|
243423
|
-
const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags &&
|
243423
|
+
const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find2(jsdoc.tags, (t) => t.kind === 327 && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc"));
|
243424
243424
|
if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 346 && declaration.kind !== 338 && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 346 || t.kind === 338) && !jsdoc.tags.some((t) => t.kind === 341 || t.kind === 342)) {
|
243425
243425
|
continue;
|
243426
243426
|
}
|
@@ -243736,7 +243736,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
243736
243736
|
case 219:
|
243737
243737
|
return rightHandSide;
|
243738
243738
|
case 231:
|
243739
|
-
return
|
243739
|
+
return find2(rightHandSide.members, isConstructorDeclaration);
|
243740
243740
|
}
|
243741
243741
|
}
|
243742
243742
|
var ts_MapCode_exports = {};
|
@@ -243820,7 +243820,7 @@ ${content}
|
|
243820
243820
|
function placeClassNodeGroup(originalFile, changeTracker, changes, focusLocations) {
|
243821
243821
|
let classOrInterface;
|
243822
243822
|
if (!focusLocations || !focusLocations.length) {
|
243823
|
-
classOrInterface =
|
243823
|
+
classOrInterface = find2(originalFile.statements, or(isClassLike, isInterfaceDeclaration));
|
243824
243824
|
} else {
|
243825
243825
|
classOrInterface = forEach(focusLocations, (location) => findAncestor(
|
243826
243826
|
getTokenAtPosition(originalFile, location.start),
|
@@ -244571,11 +244571,11 @@ ${content}
|
|
244571
244571
|
return { specifierComparer, isSorted };
|
244572
244572
|
}
|
244573
244573
|
function getImportDeclarationInsertionIndex(sortedImports, newImport, comparer) {
|
244574
|
-
const index3 = binarySearch(sortedImports, newImport,
|
244574
|
+
const index3 = binarySearch(sortedImports, newImport, identity17, (a, b) => compareImportsOrRequireStatements(a, b, comparer));
|
244575
244575
|
return index3 < 0 ? ~index3 : index3;
|
244576
244576
|
}
|
244577
244577
|
function getImportSpecifierInsertionIndex(sortedImports, newImport, comparer) {
|
244578
|
-
const index3 = binarySearch(sortedImports, newImport,
|
244578
|
+
const index3 = binarySearch(sortedImports, newImport, identity17, comparer);
|
244579
244579
|
return index3 < 0 ? ~index3 : index3;
|
244580
244580
|
}
|
244581
244581
|
function compareImportsOrRequireStatements(s1, s2, comparer) {
|
@@ -245016,7 +245016,7 @@ ${content}
|
|
245016
245016
|
}
|
245017
245017
|
function wouldRenameInOtherNodeModules(originalFile, symbol, checker, preferences) {
|
245018
245018
|
if (!preferences.providePrefixAndSuffixTextForRename && symbol.flags & 2097152) {
|
245019
|
-
const importSpecifier = symbol.declarations &&
|
245019
|
+
const importSpecifier = symbol.declarations && find2(symbol.declarations, (decl) => isImportSpecifier(decl));
|
245020
245020
|
if (importSpecifier && !importSpecifier.propertyName) {
|
245021
245021
|
symbol = checker.getAliasedSymbol(symbol);
|
245022
245022
|
}
|
@@ -245058,7 +245058,7 @@ ${content}
|
|
245058
245058
|
if (!isExternalModuleNameRelative(node.text)) {
|
245059
245059
|
return getRenameInfoError(Diagnostics.You_cannot_rename_a_module_via_a_global_import);
|
245060
245060
|
}
|
245061
|
-
const moduleSourceFile = moduleSymbol.declarations &&
|
245061
|
+
const moduleSourceFile = moduleSymbol.declarations && find2(moduleSymbol.declarations, isSourceFile);
|
245062
245062
|
if (!moduleSourceFile)
|
245063
245063
|
return void 0;
|
245064
245064
|
const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
|
@@ -245533,7 +245533,7 @@ ${content}
|
|
245533
245533
|
itemsSeen += item.length;
|
245534
245534
|
}
|
245535
245535
|
Debug.assert(selectedItemIndex !== -1);
|
245536
|
-
const help = { items: flatMapToMutable(items,
|
245536
|
+
const help = { items: flatMapToMutable(items, identity17), applicableSpan, selectedItemIndex, argumentIndex, argumentCount };
|
245537
245537
|
const selected = help.items[selectedItemIndex];
|
245538
245538
|
if (selected.isVariadic) {
|
245539
245539
|
const firstRest = findIndex3(selected.parameters, (p) => !!p.isRest);
|
@@ -245979,7 +245979,7 @@ ${content}
|
|
245979
245979
|
}
|
245980
245980
|
if (symbolKind !== "" || symbolFlags & 32 || symbolFlags & 2097152) {
|
245981
245981
|
if (symbolKind === "getter" || symbolKind === "setter") {
|
245982
|
-
const declaration =
|
245982
|
+
const declaration = find2(symbol.declarations, (declaration2) => declaration2.name === location);
|
245983
245983
|
if (declaration) {
|
245984
245984
|
switch (declaration.kind) {
|
245985
245985
|
case 177:
|
@@ -246079,7 +246079,7 @@ ${content}
|
|
246079
246079
|
}
|
246080
246080
|
} else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304) || location.kind === 137 && location.parent.kind === 176) {
|
246081
246081
|
const functionDeclaration = location.parent;
|
246082
|
-
const locationIsSymbolDeclaration = symbol.declarations &&
|
246082
|
+
const locationIsSymbolDeclaration = symbol.declarations && find2(symbol.declarations, (declaration) => declaration === (location.kind === 137 ? functionDeclaration.parent : functionDeclaration));
|
246083
246083
|
if (locationIsSymbolDeclaration) {
|
246084
246084
|
const allSignatures = functionDeclaration.kind === 176 ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures();
|
246085
246085
|
if (!typeChecker.isImplementationOfOverload(functionDeclaration)) {
|
@@ -246931,7 +246931,7 @@ ${content}
|
|
246931
246931
|
}
|
246932
246932
|
}
|
246933
246933
|
insertNodeAtConstructorStartAfterSuperCall(sourceFile, ctr, newStatement) {
|
246934
|
-
const superCallStatement =
|
246934
|
+
const superCallStatement = find2(ctr.body.statements, (stmt) => isExpressionStatement(stmt) && isSuperCall(stmt.expression));
|
246935
246935
|
if (!superCallStatement || !ctr.body.multiLine) {
|
246936
246936
|
this.replaceConstructorBody(sourceFile, ctr, [...ctr.body.statements, newStatement]);
|
246937
246937
|
} else {
|
@@ -247683,7 +247683,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
247683
247683
|
}
|
247684
247684
|
case 272:
|
247685
247685
|
case 271:
|
247686
|
-
const isFirstImport = sourceFile.imports.length && node === first2(sourceFile.imports).parent || node ===
|
247686
|
+
const isFirstImport = sourceFile.imports.length && node === first2(sourceFile.imports).parent || node === find2(sourceFile.statements, isAnyImportSyntax);
|
247687
247687
|
deleteNode(changes, sourceFile, node, {
|
247688
247688
|
leadingTriviaOption: isFirstImport ? 0 : hasJSDocNodes(node) ? 2 : 3
|
247689
247689
|
});
|
@@ -248984,11 +248984,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
248984
248984
|
return false;
|
248985
248985
|
}
|
248986
248986
|
function findEnclosingNode(range4, sourceFile) {
|
248987
|
-
return
|
248988
|
-
function
|
248987
|
+
return find22(sourceFile);
|
248988
|
+
function find22(n) {
|
248989
248989
|
const candidate = forEachChild(n, (c) => startEndContainsRange(c.getStart(sourceFile), c.end, range4) && c);
|
248990
248990
|
if (candidate) {
|
248991
|
-
const result =
|
248991
|
+
const result = find22(candidate);
|
248992
248992
|
if (result) {
|
248993
248993
|
return result;
|
248994
248994
|
}
|
@@ -249204,7 +249204,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
249204
249204
|
}
|
249205
249205
|
function getFirstNonDecoratorTokenOfNode(node) {
|
249206
249206
|
if (canHaveModifiers(node)) {
|
249207
|
-
const modifier =
|
249207
|
+
const modifier = find2(node.modifiers, isModifier, findIndex3(node.modifiers, isDecorator));
|
249208
249208
|
if (modifier)
|
249209
249209
|
return modifier.kind;
|
249210
249210
|
}
|
@@ -249767,7 +249767,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
249767
249767
|
const trailingRangesOfPreviousToken = precedingToken && getTrailingCommentRanges(sourceFile.text, precedingToken.end);
|
249768
249768
|
const leadingCommentRangesOfNextToken = getLeadingCommentRangesOfNode(tokenAtPosition, sourceFile);
|
249769
249769
|
const commentRanges = concatenate(trailingRangesOfPreviousToken, leadingCommentRangesOfNextToken);
|
249770
|
-
return commentRanges &&
|
249770
|
+
return commentRanges && find2(commentRanges, (range4) => rangeContainsPositionExclusive(range4, position2) || position2 === range4.end && (range4.kind === 2 || position2 === sourceFile.getFullWidth()));
|
249771
249771
|
}
|
249772
249772
|
function getOpenTokenForList(node, list) {
|
249773
249773
|
switch (node.kind) {
|
@@ -250113,7 +250113,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
250113
250113
|
if (isCallOrNewExpression(parent2)) {
|
250114
250114
|
if (!parent2.arguments)
|
250115
250115
|
return false;
|
250116
|
-
const currentNode =
|
250116
|
+
const currentNode = find2(parent2.arguments, (arg) => arg.pos === child.pos);
|
250117
250117
|
if (!currentNode)
|
250118
250118
|
return false;
|
250119
250119
|
const currentIndex = parent2.arguments.indexOf(currentNode);
|
@@ -251003,7 +251003,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
251003
251003
|
filter: () => filter6,
|
251004
251004
|
filterMutate: () => filterMutate,
|
251005
251005
|
filterSemanticDiagnostics: () => filterSemanticDiagnostics,
|
251006
|
-
find: () =>
|
251006
|
+
find: () => find2,
|
251007
251007
|
findAncestor: () => findAncestor,
|
251008
251008
|
findBestPatternMatch: () => findBestPatternMatch,
|
251009
251009
|
findChildOfKind: () => findChildOfKind,
|
@@ -251590,7 +251590,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
251590
251590
|
idText: () => idText,
|
251591
251591
|
identifierIsThisKeyword: () => identifierIsThisKeyword,
|
251592
251592
|
identifierToKeywordKind: () => identifierToKeywordKind,
|
251593
|
-
identity: () =>
|
251593
|
+
identity: () => identity17,
|
251594
251594
|
identitySourceMapConsumer: () => identitySourceMapConsumer,
|
251595
251595
|
ignoreSourceNewlines: () => ignoreSourceNewlines,
|
251596
251596
|
ignoredPaths: () => ignoredPaths,
|
@@ -253365,13 +253365,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253365
253365
|
this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: void 0 });
|
253366
253366
|
}
|
253367
253367
|
}
|
253368
|
-
createSetTypings(
|
253368
|
+
createSetTypings(request4, typings) {
|
253369
253369
|
return {
|
253370
|
-
projectName:
|
253371
|
-
typeAcquisition:
|
253372
|
-
compilerOptions:
|
253370
|
+
projectName: request4.projectName,
|
253371
|
+
typeAcquisition: request4.typeAcquisition,
|
253372
|
+
compilerOptions: request4.compilerOptions,
|
253373
253373
|
typings,
|
253374
|
-
unresolvedImports:
|
253374
|
+
unresolvedImports: request4.unresolvedImports,
|
253375
253375
|
kind: ActionSet
|
253376
253376
|
};
|
253377
253377
|
}
|
@@ -253382,10 +253382,10 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253382
253382
|
executeWithThrottling() {
|
253383
253383
|
while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) {
|
253384
253384
|
this.inFlightRequestCount++;
|
253385
|
-
const
|
253386
|
-
this.installWorker(
|
253385
|
+
const request4 = this.pendingRunRequests.pop();
|
253386
|
+
this.installWorker(request4.requestId, request4.packageNames, request4.cwd, (ok) => {
|
253387
253387
|
this.inFlightRequestCount--;
|
253388
|
-
|
253388
|
+
request4.onRequestCompleted(ok);
|
253389
253389
|
this.executeWithThrottling();
|
253390
253390
|
});
|
253391
253391
|
}
|
@@ -253552,7 +253552,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
253552
253552
|
array.splice(0, 1);
|
253553
253553
|
return;
|
253554
253554
|
}
|
253555
|
-
const removeIndex = binarySearch(array, remove,
|
253555
|
+
const removeIndex = binarySearch(array, remove, identity17, compare2);
|
253556
253556
|
if (removeIndex >= 0) {
|
253557
253557
|
array.splice(removeIndex, 1);
|
253558
253558
|
}
|
@@ -257397,7 +257397,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
257397
257397
|
return;
|
257398
257398
|
if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
|
257399
257399
|
const path10 = this.toPath(configFileName);
|
257400
|
-
if (
|
257400
|
+
if (find2((_a4 = project.getCurrentProgram()) == null ? void 0 : _a4.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path10)) {
|
257401
257401
|
project.markAutoImportProviderAsDirty();
|
257402
257402
|
}
|
257403
257403
|
}
|
@@ -257464,7 +257464,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
257464
257464
|
const path10 = this.toPath(canonicalConfigFilePath);
|
257465
257465
|
project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path10);
|
257466
257466
|
this.delayUpdateProjectGraph(project);
|
257467
|
-
if (this.getHostPreferences().includeCompletionsForModuleExports &&
|
257467
|
+
if (this.getHostPreferences().includeCompletionsForModuleExports && find2((_a4 = project.getCurrentProgram()) == null ? void 0 : _a4.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path10)) {
|
257468
257468
|
project.markAutoImportProviderAsDirty();
|
257469
257469
|
}
|
257470
257470
|
}
|
@@ -258147,7 +258147,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
258147
258147
|
return;
|
258148
258148
|
}
|
258149
258149
|
configFileExistenceInfo.config.projects.set(forProject.canonicalConfigFilePath, false);
|
258150
|
-
if (forEachEntry(configFileExistenceInfo.config.projects,
|
258150
|
+
if (forEachEntry(configFileExistenceInfo.config.projects, identity17))
|
258151
258151
|
return;
|
258152
258152
|
if (configFileExistenceInfo.config.watchedDirectories) {
|
258153
258153
|
clearMap(configFileExistenceInfo.config.watchedDirectories, closeFileWatcherOf);
|
@@ -258891,7 +258891,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
258891
258891
|
});
|
258892
258892
|
this.openFiles.forEach((_projectRootPath, path10) => {
|
258893
258893
|
const info2 = this.getScriptInfoForPath(path10);
|
258894
|
-
if (
|
258894
|
+
if (find2(info2.containingProjects, isExternalProject))
|
258895
258895
|
return;
|
258896
258896
|
this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
258897
258897
|
info2,
|
@@ -259017,7 +259017,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
259017
259017
|
return !!this.getScriptInfoForNormalizedPath(fileName) || this.host.fileExists(fileName);
|
259018
259018
|
}
|
259019
259019
|
findExternalProjectContainingOpenScriptInfo(info2) {
|
259020
|
-
return
|
259020
|
+
return find2(this.externalProjects, (proj) => {
|
259021
259021
|
updateProjectIfDirty(proj);
|
259022
259022
|
return proj.containsScriptInfo(info2);
|
259023
259023
|
});
|
@@ -259270,7 +259270,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
259270
259270
|
if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path10))
|
259271
259271
|
return;
|
259272
259272
|
const info2 = this.getScriptInfoForPath(path10);
|
259273
|
-
if (
|
259273
|
+
if (find2(info2.containingProjects, isExternalProject))
|
259274
259274
|
return;
|
259275
259275
|
const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
|
259276
259276
|
info2,
|
@@ -259372,7 +259372,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
259372
259372
|
}
|
259373
259373
|
collectChanges(lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) {
|
259374
259374
|
for (const proj of currentProjects) {
|
259375
|
-
const knownProject =
|
259375
|
+
const knownProject = find2(lastKnownProjectVersions, (p) => p.projectName === proj.getProjectName());
|
259376
259376
|
result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo));
|
259377
259377
|
}
|
259378
259378
|
}
|
@@ -260300,7 +260300,7 @@ ${json}${newLine}`;
|
|
260300
260300
|
fileName: mappedDefinitionFile.fileName,
|
260301
260301
|
contextSpan: getMappedContextSpanForProject(referencedSymbol.definition, project)
|
260302
260302
|
};
|
260303
|
-
let symbolToAddTo =
|
260303
|
+
let symbolToAddTo = find2(results, (o) => documentSpansEqual(o.definition, definition, useCaseSensitiveFileNames2));
|
260304
260304
|
if (!symbolToAddTo) {
|
260305
260305
|
symbolToAddTo = { definition, references: [] };
|
260306
260306
|
results.push(symbolToAddTo);
|
@@ -260515,32 +260515,32 @@ ${json}${newLine}`;
|
|
260515
260515
|
const response = { version };
|
260516
260516
|
return this.requiredResponse(response);
|
260517
260517
|
},
|
260518
|
-
["openExternalProject"]: (
|
260518
|
+
["openExternalProject"]: (request4) => {
|
260519
260519
|
this.projectService.openExternalProject(
|
260520
|
-
|
260520
|
+
request4.arguments,
|
260521
260521
|
true
|
260522
260522
|
);
|
260523
260523
|
return this.requiredResponse(
|
260524
260524
|
true
|
260525
260525
|
);
|
260526
260526
|
},
|
260527
|
-
["openExternalProjects"]: (
|
260528
|
-
this.projectService.openExternalProjects(
|
260527
|
+
["openExternalProjects"]: (request4) => {
|
260528
|
+
this.projectService.openExternalProjects(request4.arguments.projects);
|
260529
260529
|
return this.requiredResponse(
|
260530
260530
|
true
|
260531
260531
|
);
|
260532
260532
|
},
|
260533
|
-
["closeExternalProject"]: (
|
260533
|
+
["closeExternalProject"]: (request4) => {
|
260534
260534
|
this.projectService.closeExternalProject(
|
260535
|
-
|
260535
|
+
request4.arguments.projectFileName,
|
260536
260536
|
true
|
260537
260537
|
);
|
260538
260538
|
return this.requiredResponse(
|
260539
260539
|
true
|
260540
260540
|
);
|
260541
260541
|
},
|
260542
|
-
["synchronizeProjectList"]: (
|
260543
|
-
const result = this.projectService.synchronizeProjectList(
|
260542
|
+
["synchronizeProjectList"]: (request4) => {
|
260543
|
+
const result = this.projectService.synchronizeProjectList(request4.arguments.knownProjects, request4.arguments.includeProjectReferenceRedirectInfo);
|
260544
260544
|
if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) {
|
260545
260545
|
return this.requiredResponse(result);
|
260546
260546
|
}
|
@@ -260560,16 +260560,16 @@ ${json}${newLine}`;
|
|
260560
260560
|
});
|
260561
260561
|
return this.requiredResponse(converted);
|
260562
260562
|
},
|
260563
|
-
["updateOpen"]: (
|
260563
|
+
["updateOpen"]: (request4) => {
|
260564
260564
|
this.changeSeq++;
|
260565
260565
|
this.projectService.applyChangesInOpenFiles(
|
260566
|
-
|
260566
|
+
request4.arguments.openFiles && mapIterator(request4.arguments.openFiles, (file) => ({
|
260567
260567
|
fileName: file.file,
|
260568
260568
|
content: file.fileContent,
|
260569
260569
|
scriptKind: file.scriptKindName,
|
260570
260570
|
projectRootPath: file.projectRootPath
|
260571
260571
|
})),
|
260572
|
-
|
260572
|
+
request4.arguments.changedFiles && mapIterator(request4.arguments.changedFiles, (file) => ({
|
260573
260573
|
fileName: file.fileName,
|
260574
260574
|
changes: mapDefinedIterator(arrayReverseIterator(file.textChanges), (change) => {
|
260575
260575
|
const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file.fileName));
|
@@ -260578,21 +260578,21 @@ ${json}${newLine}`;
|
|
260578
260578
|
return start >= 0 ? { span: { start, length: end - start }, newText: change.newText } : void 0;
|
260579
260579
|
})
|
260580
260580
|
})),
|
260581
|
-
|
260581
|
+
request4.arguments.closedFiles
|
260582
260582
|
);
|
260583
260583
|
return this.requiredResponse(
|
260584
260584
|
true
|
260585
260585
|
);
|
260586
260586
|
},
|
260587
|
-
["applyChangedToOpenFiles"]: (
|
260587
|
+
["applyChangedToOpenFiles"]: (request4) => {
|
260588
260588
|
this.changeSeq++;
|
260589
260589
|
this.projectService.applyChangesInOpenFiles(
|
260590
|
-
|
260591
|
-
|
260590
|
+
request4.arguments.openFiles,
|
260591
|
+
request4.arguments.changedFiles && mapIterator(request4.arguments.changedFiles, (file) => ({
|
260592
260592
|
fileName: file.fileName,
|
260593
260593
|
changes: arrayReverseIterator(file.changes)
|
260594
260594
|
})),
|
260595
|
-
|
260595
|
+
request4.arguments.closedFiles
|
260596
260596
|
);
|
260597
260597
|
return this.requiredResponse(
|
260598
260598
|
true
|
@@ -260602,206 +260602,206 @@ ${json}${newLine}`;
|
|
260602
260602
|
this.exit();
|
260603
260603
|
return this.notRequired();
|
260604
260604
|
},
|
260605
|
-
["definition"]: (
|
260605
|
+
["definition"]: (request4) => {
|
260606
260606
|
return this.requiredResponse(this.getDefinition(
|
260607
|
-
|
260607
|
+
request4.arguments,
|
260608
260608
|
true
|
260609
260609
|
));
|
260610
260610
|
},
|
260611
|
-
["definition-full"]: (
|
260611
|
+
["definition-full"]: (request4) => {
|
260612
260612
|
return this.requiredResponse(this.getDefinition(
|
260613
|
-
|
260613
|
+
request4.arguments,
|
260614
260614
|
false
|
260615
260615
|
));
|
260616
260616
|
},
|
260617
|
-
["definitionAndBoundSpan"]: (
|
260617
|
+
["definitionAndBoundSpan"]: (request4) => {
|
260618
260618
|
return this.requiredResponse(this.getDefinitionAndBoundSpan(
|
260619
|
-
|
260619
|
+
request4.arguments,
|
260620
260620
|
true
|
260621
260621
|
));
|
260622
260622
|
},
|
260623
|
-
["definitionAndBoundSpan-full"]: (
|
260623
|
+
["definitionAndBoundSpan-full"]: (request4) => {
|
260624
260624
|
return this.requiredResponse(this.getDefinitionAndBoundSpan(
|
260625
|
-
|
260625
|
+
request4.arguments,
|
260626
260626
|
false
|
260627
260627
|
));
|
260628
260628
|
},
|
260629
|
-
["findSourceDefinition"]: (
|
260630
|
-
return this.requiredResponse(this.findSourceDefinition(
|
260629
|
+
["findSourceDefinition"]: (request4) => {
|
260630
|
+
return this.requiredResponse(this.findSourceDefinition(request4.arguments));
|
260631
260631
|
},
|
260632
|
-
["emit-output"]: (
|
260633
|
-
return this.requiredResponse(this.getEmitOutput(
|
260632
|
+
["emit-output"]: (request4) => {
|
260633
|
+
return this.requiredResponse(this.getEmitOutput(request4.arguments));
|
260634
260634
|
},
|
260635
|
-
["typeDefinition"]: (
|
260636
|
-
return this.requiredResponse(this.getTypeDefinition(
|
260635
|
+
["typeDefinition"]: (request4) => {
|
260636
|
+
return this.requiredResponse(this.getTypeDefinition(request4.arguments));
|
260637
260637
|
},
|
260638
|
-
["implementation"]: (
|
260638
|
+
["implementation"]: (request4) => {
|
260639
260639
|
return this.requiredResponse(this.getImplementation(
|
260640
|
-
|
260640
|
+
request4.arguments,
|
260641
260641
|
true
|
260642
260642
|
));
|
260643
260643
|
},
|
260644
|
-
["implementation-full"]: (
|
260644
|
+
["implementation-full"]: (request4) => {
|
260645
260645
|
return this.requiredResponse(this.getImplementation(
|
260646
|
-
|
260646
|
+
request4.arguments,
|
260647
260647
|
false
|
260648
260648
|
));
|
260649
260649
|
},
|
260650
|
-
["references"]: (
|
260650
|
+
["references"]: (request4) => {
|
260651
260651
|
return this.requiredResponse(this.getReferences(
|
260652
|
-
|
260652
|
+
request4.arguments,
|
260653
260653
|
true
|
260654
260654
|
));
|
260655
260655
|
},
|
260656
|
-
["references-full"]: (
|
260656
|
+
["references-full"]: (request4) => {
|
260657
260657
|
return this.requiredResponse(this.getReferences(
|
260658
|
-
|
260658
|
+
request4.arguments,
|
260659
260659
|
false
|
260660
260660
|
));
|
260661
260661
|
},
|
260662
|
-
["rename"]: (
|
260662
|
+
["rename"]: (request4) => {
|
260663
260663
|
return this.requiredResponse(this.getRenameLocations(
|
260664
|
-
|
260664
|
+
request4.arguments,
|
260665
260665
|
true
|
260666
260666
|
));
|
260667
260667
|
},
|
260668
|
-
["renameLocations-full"]: (
|
260668
|
+
["renameLocations-full"]: (request4) => {
|
260669
260669
|
return this.requiredResponse(this.getRenameLocations(
|
260670
|
-
|
260670
|
+
request4.arguments,
|
260671
260671
|
false
|
260672
260672
|
));
|
260673
260673
|
},
|
260674
|
-
["rename-full"]: (
|
260675
|
-
return this.requiredResponse(this.getRenameInfo(
|
260674
|
+
["rename-full"]: (request4) => {
|
260675
|
+
return this.requiredResponse(this.getRenameInfo(request4.arguments));
|
260676
260676
|
},
|
260677
|
-
["open"]: (
|
260677
|
+
["open"]: (request4) => {
|
260678
260678
|
this.openClientFile(
|
260679
|
-
toNormalizedPath(
|
260680
|
-
|
260681
|
-
convertScriptKindName(
|
260682
|
-
|
260679
|
+
toNormalizedPath(request4.arguments.file),
|
260680
|
+
request4.arguments.fileContent,
|
260681
|
+
convertScriptKindName(request4.arguments.scriptKindName),
|
260682
|
+
request4.arguments.projectRootPath ? toNormalizedPath(request4.arguments.projectRootPath) : void 0
|
260683
260683
|
);
|
260684
260684
|
return this.notRequired();
|
260685
260685
|
},
|
260686
|
-
["quickinfo"]: (
|
260686
|
+
["quickinfo"]: (request4) => {
|
260687
260687
|
return this.requiredResponse(this.getQuickInfoWorker(
|
260688
|
-
|
260688
|
+
request4.arguments,
|
260689
260689
|
true
|
260690
260690
|
));
|
260691
260691
|
},
|
260692
|
-
["quickinfo-full"]: (
|
260692
|
+
["quickinfo-full"]: (request4) => {
|
260693
260693
|
return this.requiredResponse(this.getQuickInfoWorker(
|
260694
|
-
|
260694
|
+
request4.arguments,
|
260695
260695
|
false
|
260696
260696
|
));
|
260697
260697
|
},
|
260698
|
-
["getOutliningSpans"]: (
|
260698
|
+
["getOutliningSpans"]: (request4) => {
|
260699
260699
|
return this.requiredResponse(this.getOutliningSpans(
|
260700
|
-
|
260700
|
+
request4.arguments,
|
260701
260701
|
true
|
260702
260702
|
));
|
260703
260703
|
},
|
260704
|
-
["outliningSpans"]: (
|
260704
|
+
["outliningSpans"]: (request4) => {
|
260705
260705
|
return this.requiredResponse(this.getOutliningSpans(
|
260706
|
-
|
260706
|
+
request4.arguments,
|
260707
260707
|
false
|
260708
260708
|
));
|
260709
260709
|
},
|
260710
|
-
["todoComments"]: (
|
260711
|
-
return this.requiredResponse(this.getTodoComments(
|
260710
|
+
["todoComments"]: (request4) => {
|
260711
|
+
return this.requiredResponse(this.getTodoComments(request4.arguments));
|
260712
260712
|
},
|
260713
|
-
["indentation"]: (
|
260714
|
-
return this.requiredResponse(this.getIndentation(
|
260713
|
+
["indentation"]: (request4) => {
|
260714
|
+
return this.requiredResponse(this.getIndentation(request4.arguments));
|
260715
260715
|
},
|
260716
|
-
["nameOrDottedNameSpan"]: (
|
260717
|
-
return this.requiredResponse(this.getNameOrDottedNameSpan(
|
260716
|
+
["nameOrDottedNameSpan"]: (request4) => {
|
260717
|
+
return this.requiredResponse(this.getNameOrDottedNameSpan(request4.arguments));
|
260718
260718
|
},
|
260719
|
-
["breakpointStatement"]: (
|
260720
|
-
return this.requiredResponse(this.getBreakpointStatement(
|
260719
|
+
["breakpointStatement"]: (request4) => {
|
260720
|
+
return this.requiredResponse(this.getBreakpointStatement(request4.arguments));
|
260721
260721
|
},
|
260722
|
-
["braceCompletion"]: (
|
260723
|
-
return this.requiredResponse(this.isValidBraceCompletion(
|
260722
|
+
["braceCompletion"]: (request4) => {
|
260723
|
+
return this.requiredResponse(this.isValidBraceCompletion(request4.arguments));
|
260724
260724
|
},
|
260725
|
-
["docCommentTemplate"]: (
|
260726
|
-
return this.requiredResponse(this.getDocCommentTemplate(
|
260725
|
+
["docCommentTemplate"]: (request4) => {
|
260726
|
+
return this.requiredResponse(this.getDocCommentTemplate(request4.arguments));
|
260727
260727
|
},
|
260728
|
-
["getSpanOfEnclosingComment"]: (
|
260729
|
-
return this.requiredResponse(this.getSpanOfEnclosingComment(
|
260728
|
+
["getSpanOfEnclosingComment"]: (request4) => {
|
260729
|
+
return this.requiredResponse(this.getSpanOfEnclosingComment(request4.arguments));
|
260730
260730
|
},
|
260731
|
-
["fileReferences"]: (
|
260731
|
+
["fileReferences"]: (request4) => {
|
260732
260732
|
return this.requiredResponse(this.getFileReferences(
|
260733
|
-
|
260733
|
+
request4.arguments,
|
260734
260734
|
true
|
260735
260735
|
));
|
260736
260736
|
},
|
260737
|
-
["fileReferences-full"]: (
|
260737
|
+
["fileReferences-full"]: (request4) => {
|
260738
260738
|
return this.requiredResponse(this.getFileReferences(
|
260739
|
-
|
260739
|
+
request4.arguments,
|
260740
260740
|
false
|
260741
260741
|
));
|
260742
260742
|
},
|
260743
|
-
["format"]: (
|
260744
|
-
return this.requiredResponse(this.getFormattingEditsForRange(
|
260743
|
+
["format"]: (request4) => {
|
260744
|
+
return this.requiredResponse(this.getFormattingEditsForRange(request4.arguments));
|
260745
260745
|
},
|
260746
|
-
["formatonkey"]: (
|
260747
|
-
return this.requiredResponse(this.getFormattingEditsAfterKeystroke(
|
260746
|
+
["formatonkey"]: (request4) => {
|
260747
|
+
return this.requiredResponse(this.getFormattingEditsAfterKeystroke(request4.arguments));
|
260748
260748
|
},
|
260749
|
-
["format-full"]: (
|
260750
|
-
return this.requiredResponse(this.getFormattingEditsForDocumentFull(
|
260749
|
+
["format-full"]: (request4) => {
|
260750
|
+
return this.requiredResponse(this.getFormattingEditsForDocumentFull(request4.arguments));
|
260751
260751
|
},
|
260752
|
-
["formatonkey-full"]: (
|
260753
|
-
return this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(
|
260752
|
+
["formatonkey-full"]: (request4) => {
|
260753
|
+
return this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(request4.arguments));
|
260754
260754
|
},
|
260755
|
-
["formatRange-full"]: (
|
260756
|
-
return this.requiredResponse(this.getFormattingEditsForRangeFull(
|
260755
|
+
["formatRange-full"]: (request4) => {
|
260756
|
+
return this.requiredResponse(this.getFormattingEditsForRangeFull(request4.arguments));
|
260757
260757
|
},
|
260758
|
-
["completionInfo"]: (
|
260759
|
-
return this.requiredResponse(this.getCompletions(
|
260758
|
+
["completionInfo"]: (request4) => {
|
260759
|
+
return this.requiredResponse(this.getCompletions(request4.arguments, "completionInfo"));
|
260760
260760
|
},
|
260761
|
-
["completions"]: (
|
260762
|
-
return this.requiredResponse(this.getCompletions(
|
260761
|
+
["completions"]: (request4) => {
|
260762
|
+
return this.requiredResponse(this.getCompletions(request4.arguments, "completions"));
|
260763
260763
|
},
|
260764
|
-
["completions-full"]: (
|
260765
|
-
return this.requiredResponse(this.getCompletions(
|
260764
|
+
["completions-full"]: (request4) => {
|
260765
|
+
return this.requiredResponse(this.getCompletions(request4.arguments, "completions-full"));
|
260766
260766
|
},
|
260767
|
-
["completionEntryDetails"]: (
|
260767
|
+
["completionEntryDetails"]: (request4) => {
|
260768
260768
|
return this.requiredResponse(this.getCompletionEntryDetails(
|
260769
|
-
|
260769
|
+
request4.arguments,
|
260770
260770
|
false
|
260771
260771
|
));
|
260772
260772
|
},
|
260773
|
-
["completionEntryDetails-full"]: (
|
260773
|
+
["completionEntryDetails-full"]: (request4) => {
|
260774
260774
|
return this.requiredResponse(this.getCompletionEntryDetails(
|
260775
|
-
|
260775
|
+
request4.arguments,
|
260776
260776
|
true
|
260777
260777
|
));
|
260778
260778
|
},
|
260779
|
-
["compileOnSaveAffectedFileList"]: (
|
260780
|
-
return this.requiredResponse(this.getCompileOnSaveAffectedFileList(
|
260779
|
+
["compileOnSaveAffectedFileList"]: (request4) => {
|
260780
|
+
return this.requiredResponse(this.getCompileOnSaveAffectedFileList(request4.arguments));
|
260781
260781
|
},
|
260782
|
-
["compileOnSaveEmitFile"]: (
|
260783
|
-
return this.requiredResponse(this.emitFile(
|
260782
|
+
["compileOnSaveEmitFile"]: (request4) => {
|
260783
|
+
return this.requiredResponse(this.emitFile(request4.arguments));
|
260784
260784
|
},
|
260785
|
-
["signatureHelp"]: (
|
260785
|
+
["signatureHelp"]: (request4) => {
|
260786
260786
|
return this.requiredResponse(this.getSignatureHelpItems(
|
260787
|
-
|
260787
|
+
request4.arguments,
|
260788
260788
|
true
|
260789
260789
|
));
|
260790
260790
|
},
|
260791
|
-
["signatureHelp-full"]: (
|
260791
|
+
["signatureHelp-full"]: (request4) => {
|
260792
260792
|
return this.requiredResponse(this.getSignatureHelpItems(
|
260793
|
-
|
260793
|
+
request4.arguments,
|
260794
260794
|
false
|
260795
260795
|
));
|
260796
260796
|
},
|
260797
|
-
["compilerOptionsDiagnostics-full"]: (
|
260798
|
-
return this.requiredResponse(this.getCompilerOptionsDiagnostics(
|
260797
|
+
["compilerOptionsDiagnostics-full"]: (request4) => {
|
260798
|
+
return this.requiredResponse(this.getCompilerOptionsDiagnostics(request4.arguments));
|
260799
260799
|
},
|
260800
|
-
["encodedSyntacticClassifications-full"]: (
|
260801
|
-
return this.requiredResponse(this.getEncodedSyntacticClassifications(
|
260800
|
+
["encodedSyntacticClassifications-full"]: (request4) => {
|
260801
|
+
return this.requiredResponse(this.getEncodedSyntacticClassifications(request4.arguments));
|
260802
260802
|
},
|
260803
|
-
["encodedSemanticClassifications-full"]: (
|
260804
|
-
return this.requiredResponse(this.getEncodedSemanticClassifications(
|
260803
|
+
["encodedSemanticClassifications-full"]: (request4) => {
|
260804
|
+
return this.requiredResponse(this.getEncodedSemanticClassifications(request4.arguments));
|
260805
260805
|
},
|
260806
260806
|
["cleanup"]: () => {
|
260807
260807
|
this.cleanup();
|
@@ -260809,289 +260809,289 @@ ${json}${newLine}`;
|
|
260809
260809
|
true
|
260810
260810
|
);
|
260811
260811
|
},
|
260812
|
-
["semanticDiagnosticsSync"]: (
|
260813
|
-
return this.requiredResponse(this.getSemanticDiagnosticsSync(
|
260812
|
+
["semanticDiagnosticsSync"]: (request4) => {
|
260813
|
+
return this.requiredResponse(this.getSemanticDiagnosticsSync(request4.arguments));
|
260814
260814
|
},
|
260815
|
-
["syntacticDiagnosticsSync"]: (
|
260816
|
-
return this.requiredResponse(this.getSyntacticDiagnosticsSync(
|
260815
|
+
["syntacticDiagnosticsSync"]: (request4) => {
|
260816
|
+
return this.requiredResponse(this.getSyntacticDiagnosticsSync(request4.arguments));
|
260817
260817
|
},
|
260818
|
-
["suggestionDiagnosticsSync"]: (
|
260819
|
-
return this.requiredResponse(this.getSuggestionDiagnosticsSync(
|
260818
|
+
["suggestionDiagnosticsSync"]: (request4) => {
|
260819
|
+
return this.requiredResponse(this.getSuggestionDiagnosticsSync(request4.arguments));
|
260820
260820
|
},
|
260821
|
-
["geterr"]: (
|
260822
|
-
this.errorCheck.startNew((next) => this.getDiagnostics(next,
|
260821
|
+
["geterr"]: (request4) => {
|
260822
|
+
this.errorCheck.startNew((next) => this.getDiagnostics(next, request4.arguments.delay, request4.arguments.files));
|
260823
260823
|
return this.notRequired();
|
260824
260824
|
},
|
260825
|
-
["geterrForProject"]: (
|
260826
|
-
this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next,
|
260825
|
+
["geterrForProject"]: (request4) => {
|
260826
|
+
this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next, request4.arguments.delay, request4.arguments.file));
|
260827
260827
|
return this.notRequired();
|
260828
260828
|
},
|
260829
|
-
["change"]: (
|
260830
|
-
this.change(
|
260829
|
+
["change"]: (request4) => {
|
260830
|
+
this.change(request4.arguments);
|
260831
260831
|
return this.notRequired();
|
260832
260832
|
},
|
260833
|
-
["configure"]: (
|
260834
|
-
this.projectService.setHostConfiguration(
|
260833
|
+
["configure"]: (request4) => {
|
260834
|
+
this.projectService.setHostConfiguration(request4.arguments);
|
260835
260835
|
this.doOutput(
|
260836
260836
|
void 0,
|
260837
260837
|
"configure",
|
260838
|
-
|
260838
|
+
request4.seq,
|
260839
260839
|
true
|
260840
260840
|
);
|
260841
260841
|
return this.notRequired();
|
260842
260842
|
},
|
260843
|
-
["reload"]: (
|
260844
|
-
this.reload(
|
260843
|
+
["reload"]: (request4) => {
|
260844
|
+
this.reload(request4.arguments, request4.seq);
|
260845
260845
|
return this.requiredResponse({ reloadFinished: true });
|
260846
260846
|
},
|
260847
|
-
["saveto"]: (
|
260848
|
-
const savetoArgs =
|
260847
|
+
["saveto"]: (request4) => {
|
260848
|
+
const savetoArgs = request4.arguments;
|
260849
260849
|
this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile);
|
260850
260850
|
return this.notRequired();
|
260851
260851
|
},
|
260852
|
-
["close"]: (
|
260853
|
-
const closeArgs =
|
260852
|
+
["close"]: (request4) => {
|
260853
|
+
const closeArgs = request4.arguments;
|
260854
260854
|
this.closeClientFile(closeArgs.file);
|
260855
260855
|
return this.notRequired();
|
260856
260856
|
},
|
260857
|
-
["navto"]: (
|
260857
|
+
["navto"]: (request4) => {
|
260858
260858
|
return this.requiredResponse(this.getNavigateToItems(
|
260859
|
-
|
260859
|
+
request4.arguments,
|
260860
260860
|
true
|
260861
260861
|
));
|
260862
260862
|
},
|
260863
|
-
["navto-full"]: (
|
260863
|
+
["navto-full"]: (request4) => {
|
260864
260864
|
return this.requiredResponse(this.getNavigateToItems(
|
260865
|
-
|
260865
|
+
request4.arguments,
|
260866
260866
|
false
|
260867
260867
|
));
|
260868
260868
|
},
|
260869
|
-
["brace"]: (
|
260869
|
+
["brace"]: (request4) => {
|
260870
260870
|
return this.requiredResponse(this.getBraceMatching(
|
260871
|
-
|
260871
|
+
request4.arguments,
|
260872
260872
|
true
|
260873
260873
|
));
|
260874
260874
|
},
|
260875
|
-
["brace-full"]: (
|
260875
|
+
["brace-full"]: (request4) => {
|
260876
260876
|
return this.requiredResponse(this.getBraceMatching(
|
260877
|
-
|
260877
|
+
request4.arguments,
|
260878
260878
|
false
|
260879
260879
|
));
|
260880
260880
|
},
|
260881
|
-
["navbar"]: (
|
260881
|
+
["navbar"]: (request4) => {
|
260882
260882
|
return this.requiredResponse(this.getNavigationBarItems(
|
260883
|
-
|
260883
|
+
request4.arguments,
|
260884
260884
|
true
|
260885
260885
|
));
|
260886
260886
|
},
|
260887
|
-
["navbar-full"]: (
|
260887
|
+
["navbar-full"]: (request4) => {
|
260888
260888
|
return this.requiredResponse(this.getNavigationBarItems(
|
260889
|
-
|
260889
|
+
request4.arguments,
|
260890
260890
|
false
|
260891
260891
|
));
|
260892
260892
|
},
|
260893
|
-
["navtree"]: (
|
260893
|
+
["navtree"]: (request4) => {
|
260894
260894
|
return this.requiredResponse(this.getNavigationTree(
|
260895
|
-
|
260895
|
+
request4.arguments,
|
260896
260896
|
true
|
260897
260897
|
));
|
260898
260898
|
},
|
260899
|
-
["navtree-full"]: (
|
260899
|
+
["navtree-full"]: (request4) => {
|
260900
260900
|
return this.requiredResponse(this.getNavigationTree(
|
260901
|
-
|
260901
|
+
request4.arguments,
|
260902
260902
|
false
|
260903
260903
|
));
|
260904
260904
|
},
|
260905
|
-
["documentHighlights"]: (
|
260905
|
+
["documentHighlights"]: (request4) => {
|
260906
260906
|
return this.requiredResponse(this.getDocumentHighlights(
|
260907
|
-
|
260907
|
+
request4.arguments,
|
260908
260908
|
true
|
260909
260909
|
));
|
260910
260910
|
},
|
260911
|
-
["documentHighlights-full"]: (
|
260911
|
+
["documentHighlights-full"]: (request4) => {
|
260912
260912
|
return this.requiredResponse(this.getDocumentHighlights(
|
260913
|
-
|
260913
|
+
request4.arguments,
|
260914
260914
|
false
|
260915
260915
|
));
|
260916
260916
|
},
|
260917
|
-
["compilerOptionsForInferredProjects"]: (
|
260918
|
-
this.setCompilerOptionsForInferredProjects(
|
260917
|
+
["compilerOptionsForInferredProjects"]: (request4) => {
|
260918
|
+
this.setCompilerOptionsForInferredProjects(request4.arguments);
|
260919
260919
|
return this.requiredResponse(
|
260920
260920
|
true
|
260921
260921
|
);
|
260922
260922
|
},
|
260923
|
-
["projectInfo"]: (
|
260924
|
-
return this.requiredResponse(this.getProjectInfo(
|
260923
|
+
["projectInfo"]: (request4) => {
|
260924
|
+
return this.requiredResponse(this.getProjectInfo(request4.arguments));
|
260925
260925
|
},
|
260926
260926
|
["reloadProjects"]: () => {
|
260927
260927
|
this.projectService.reloadProjects();
|
260928
260928
|
return this.notRequired();
|
260929
260929
|
},
|
260930
|
-
["jsxClosingTag"]: (
|
260931
|
-
return this.requiredResponse(this.getJsxClosingTag(
|
260930
|
+
["jsxClosingTag"]: (request4) => {
|
260931
|
+
return this.requiredResponse(this.getJsxClosingTag(request4.arguments));
|
260932
260932
|
},
|
260933
|
-
["linkedEditingRange"]: (
|
260934
|
-
return this.requiredResponse(this.getLinkedEditingRange(
|
260933
|
+
["linkedEditingRange"]: (request4) => {
|
260934
|
+
return this.requiredResponse(this.getLinkedEditingRange(request4.arguments));
|
260935
260935
|
},
|
260936
|
-
["getCodeFixes"]: (
|
260936
|
+
["getCodeFixes"]: (request4) => {
|
260937
260937
|
return this.requiredResponse(this.getCodeFixes(
|
260938
|
-
|
260938
|
+
request4.arguments,
|
260939
260939
|
true
|
260940
260940
|
));
|
260941
260941
|
},
|
260942
|
-
["getCodeFixes-full"]: (
|
260942
|
+
["getCodeFixes-full"]: (request4) => {
|
260943
260943
|
return this.requiredResponse(this.getCodeFixes(
|
260944
|
-
|
260944
|
+
request4.arguments,
|
260945
260945
|
false
|
260946
260946
|
));
|
260947
260947
|
},
|
260948
|
-
["getCombinedCodeFix"]: (
|
260948
|
+
["getCombinedCodeFix"]: (request4) => {
|
260949
260949
|
return this.requiredResponse(this.getCombinedCodeFix(
|
260950
|
-
|
260950
|
+
request4.arguments,
|
260951
260951
|
true
|
260952
260952
|
));
|
260953
260953
|
},
|
260954
|
-
["getCombinedCodeFix-full"]: (
|
260954
|
+
["getCombinedCodeFix-full"]: (request4) => {
|
260955
260955
|
return this.requiredResponse(this.getCombinedCodeFix(
|
260956
|
-
|
260956
|
+
request4.arguments,
|
260957
260957
|
false
|
260958
260958
|
));
|
260959
260959
|
},
|
260960
|
-
["applyCodeActionCommand"]: (
|
260961
|
-
return this.requiredResponse(this.applyCodeActionCommand(
|
260960
|
+
["applyCodeActionCommand"]: (request4) => {
|
260961
|
+
return this.requiredResponse(this.applyCodeActionCommand(request4.arguments));
|
260962
260962
|
},
|
260963
|
-
["getSupportedCodeFixes"]: (
|
260964
|
-
return this.requiredResponse(this.getSupportedCodeFixes(
|
260963
|
+
["getSupportedCodeFixes"]: (request4) => {
|
260964
|
+
return this.requiredResponse(this.getSupportedCodeFixes(request4.arguments));
|
260965
260965
|
},
|
260966
|
-
["getApplicableRefactors"]: (
|
260967
|
-
return this.requiredResponse(this.getApplicableRefactors(
|
260966
|
+
["getApplicableRefactors"]: (request4) => {
|
260967
|
+
return this.requiredResponse(this.getApplicableRefactors(request4.arguments));
|
260968
260968
|
},
|
260969
|
-
["getEditsForRefactor"]: (
|
260969
|
+
["getEditsForRefactor"]: (request4) => {
|
260970
260970
|
return this.requiredResponse(this.getEditsForRefactor(
|
260971
|
-
|
260971
|
+
request4.arguments,
|
260972
260972
|
true
|
260973
260973
|
));
|
260974
260974
|
},
|
260975
|
-
["getMoveToRefactoringFileSuggestions"]: (
|
260976
|
-
return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(
|
260975
|
+
["getMoveToRefactoringFileSuggestions"]: (request4) => {
|
260976
|
+
return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(request4.arguments));
|
260977
260977
|
},
|
260978
|
-
["getPasteEdits"]: (
|
260979
|
-
return this.requiredResponse(this.getPasteEdits(
|
260978
|
+
["getPasteEdits"]: (request4) => {
|
260979
|
+
return this.requiredResponse(this.getPasteEdits(request4.arguments));
|
260980
260980
|
},
|
260981
|
-
["getEditsForRefactor-full"]: (
|
260981
|
+
["getEditsForRefactor-full"]: (request4) => {
|
260982
260982
|
return this.requiredResponse(this.getEditsForRefactor(
|
260983
|
-
|
260983
|
+
request4.arguments,
|
260984
260984
|
false
|
260985
260985
|
));
|
260986
260986
|
},
|
260987
|
-
["organizeImports"]: (
|
260987
|
+
["organizeImports"]: (request4) => {
|
260988
260988
|
return this.requiredResponse(this.organizeImports(
|
260989
|
-
|
260989
|
+
request4.arguments,
|
260990
260990
|
true
|
260991
260991
|
));
|
260992
260992
|
},
|
260993
|
-
["organizeImports-full"]: (
|
260993
|
+
["organizeImports-full"]: (request4) => {
|
260994
260994
|
return this.requiredResponse(this.organizeImports(
|
260995
|
-
|
260995
|
+
request4.arguments,
|
260996
260996
|
false
|
260997
260997
|
));
|
260998
260998
|
},
|
260999
|
-
["getEditsForFileRename"]: (
|
260999
|
+
["getEditsForFileRename"]: (request4) => {
|
261000
261000
|
return this.requiredResponse(this.getEditsForFileRename(
|
261001
|
-
|
261001
|
+
request4.arguments,
|
261002
261002
|
true
|
261003
261003
|
));
|
261004
261004
|
},
|
261005
|
-
["getEditsForFileRename-full"]: (
|
261005
|
+
["getEditsForFileRename-full"]: (request4) => {
|
261006
261006
|
return this.requiredResponse(this.getEditsForFileRename(
|
261007
|
-
|
261007
|
+
request4.arguments,
|
261008
261008
|
false
|
261009
261009
|
));
|
261010
261010
|
},
|
261011
|
-
["configurePlugin"]: (
|
261012
|
-
this.configurePlugin(
|
261011
|
+
["configurePlugin"]: (request4) => {
|
261012
|
+
this.configurePlugin(request4.arguments);
|
261013
261013
|
this.doOutput(
|
261014
261014
|
void 0,
|
261015
261015
|
"configurePlugin",
|
261016
|
-
|
261016
|
+
request4.seq,
|
261017
261017
|
true
|
261018
261018
|
);
|
261019
261019
|
return this.notRequired();
|
261020
261020
|
},
|
261021
|
-
["selectionRange"]: (
|
261021
|
+
["selectionRange"]: (request4) => {
|
261022
261022
|
return this.requiredResponse(this.getSmartSelectionRange(
|
261023
|
-
|
261023
|
+
request4.arguments,
|
261024
261024
|
true
|
261025
261025
|
));
|
261026
261026
|
},
|
261027
|
-
["selectionRange-full"]: (
|
261027
|
+
["selectionRange-full"]: (request4) => {
|
261028
261028
|
return this.requiredResponse(this.getSmartSelectionRange(
|
261029
|
-
|
261029
|
+
request4.arguments,
|
261030
261030
|
false
|
261031
261031
|
));
|
261032
261032
|
},
|
261033
|
-
["prepareCallHierarchy"]: (
|
261034
|
-
return this.requiredResponse(this.prepareCallHierarchy(
|
261033
|
+
["prepareCallHierarchy"]: (request4) => {
|
261034
|
+
return this.requiredResponse(this.prepareCallHierarchy(request4.arguments));
|
261035
261035
|
},
|
261036
|
-
["provideCallHierarchyIncomingCalls"]: (
|
261037
|
-
return this.requiredResponse(this.provideCallHierarchyIncomingCalls(
|
261036
|
+
["provideCallHierarchyIncomingCalls"]: (request4) => {
|
261037
|
+
return this.requiredResponse(this.provideCallHierarchyIncomingCalls(request4.arguments));
|
261038
261038
|
},
|
261039
|
-
["provideCallHierarchyOutgoingCalls"]: (
|
261040
|
-
return this.requiredResponse(this.provideCallHierarchyOutgoingCalls(
|
261039
|
+
["provideCallHierarchyOutgoingCalls"]: (request4) => {
|
261040
|
+
return this.requiredResponse(this.provideCallHierarchyOutgoingCalls(request4.arguments));
|
261041
261041
|
},
|
261042
|
-
["toggleLineComment"]: (
|
261042
|
+
["toggleLineComment"]: (request4) => {
|
261043
261043
|
return this.requiredResponse(this.toggleLineComment(
|
261044
|
-
|
261044
|
+
request4.arguments,
|
261045
261045
|
true
|
261046
261046
|
));
|
261047
261047
|
},
|
261048
|
-
["toggleLineComment-full"]: (
|
261048
|
+
["toggleLineComment-full"]: (request4) => {
|
261049
261049
|
return this.requiredResponse(this.toggleLineComment(
|
261050
|
-
|
261050
|
+
request4.arguments,
|
261051
261051
|
false
|
261052
261052
|
));
|
261053
261053
|
},
|
261054
|
-
["toggleMultilineComment"]: (
|
261054
|
+
["toggleMultilineComment"]: (request4) => {
|
261055
261055
|
return this.requiredResponse(this.toggleMultilineComment(
|
261056
|
-
|
261056
|
+
request4.arguments,
|
261057
261057
|
true
|
261058
261058
|
));
|
261059
261059
|
},
|
261060
|
-
["toggleMultilineComment-full"]: (
|
261060
|
+
["toggleMultilineComment-full"]: (request4) => {
|
261061
261061
|
return this.requiredResponse(this.toggleMultilineComment(
|
261062
|
-
|
261062
|
+
request4.arguments,
|
261063
261063
|
false
|
261064
261064
|
));
|
261065
261065
|
},
|
261066
|
-
["commentSelection"]: (
|
261066
|
+
["commentSelection"]: (request4) => {
|
261067
261067
|
return this.requiredResponse(this.commentSelection(
|
261068
|
-
|
261068
|
+
request4.arguments,
|
261069
261069
|
true
|
261070
261070
|
));
|
261071
261071
|
},
|
261072
|
-
["commentSelection-full"]: (
|
261072
|
+
["commentSelection-full"]: (request4) => {
|
261073
261073
|
return this.requiredResponse(this.commentSelection(
|
261074
|
-
|
261074
|
+
request4.arguments,
|
261075
261075
|
false
|
261076
261076
|
));
|
261077
261077
|
},
|
261078
|
-
["uncommentSelection"]: (
|
261078
|
+
["uncommentSelection"]: (request4) => {
|
261079
261079
|
return this.requiredResponse(this.uncommentSelection(
|
261080
|
-
|
261080
|
+
request4.arguments,
|
261081
261081
|
true
|
261082
261082
|
));
|
261083
261083
|
},
|
261084
|
-
["uncommentSelection-full"]: (
|
261084
|
+
["uncommentSelection-full"]: (request4) => {
|
261085
261085
|
return this.requiredResponse(this.uncommentSelection(
|
261086
|
-
|
261086
|
+
request4.arguments,
|
261087
261087
|
false
|
261088
261088
|
));
|
261089
261089
|
},
|
261090
|
-
["provideInlayHints"]: (
|
261091
|
-
return this.requiredResponse(this.provideInlayHints(
|
261090
|
+
["provideInlayHints"]: (request4) => {
|
261091
|
+
return this.requiredResponse(this.provideInlayHints(request4.arguments));
|
261092
261092
|
},
|
261093
|
-
["mapCode"]: (
|
261094
|
-
return this.requiredResponse(this.mapCode(
|
261093
|
+
["mapCode"]: (request4) => {
|
261094
|
+
return this.requiredResponse(this.mapCode(request4.arguments));
|
261095
261095
|
}
|
261096
261096
|
}));
|
261097
261097
|
this.host = opts.host;
|
@@ -261145,15 +261145,15 @@ ${json}${newLine}`;
|
|
261145
261145
|
break;
|
261146
261146
|
case 1:
|
261147
261147
|
invalidPartialSemanticModeCommands.forEach(
|
261148
|
-
(commandName) => this.handlers.set(commandName, (
|
261149
|
-
throw new Error(`Request: ${
|
261148
|
+
(commandName) => this.handlers.set(commandName, (request4) => {
|
261149
|
+
throw new Error(`Request: ${request4.command} not allowed in LanguageServiceMode.PartialSemantic`);
|
261150
261150
|
})
|
261151
261151
|
);
|
261152
261152
|
break;
|
261153
261153
|
case 2:
|
261154
261154
|
invalidSyntacticModeCommands.forEach(
|
261155
|
-
(commandName) => this.handlers.set(commandName, (
|
261156
|
-
throw new Error(`Request: ${
|
261155
|
+
(commandName) => this.handlers.set(commandName, (request4) => {
|
261156
|
+
throw new Error(`Request: ${request4.command} not allowed in LanguageServiceMode.Syntactic`);
|
261157
261157
|
})
|
261158
261158
|
);
|
261159
261159
|
break;
|
@@ -262049,7 +262049,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
262049
262049
|
mapRenameInfo(info2, scriptInfo) {
|
262050
262050
|
if (info2.canRename) {
|
262051
262051
|
const { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan } = info2;
|
262052
|
-
return
|
262052
|
+
return identity17(
|
262053
262053
|
{ canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: toProtocolTextSpan(triggerSpan, scriptInfo) }
|
262054
262054
|
);
|
262055
262055
|
} else {
|
@@ -263095,20 +263095,20 @@ ${e.message}`;
|
|
263095
263095
|
this.resetCurrentRequest(requestId);
|
263096
263096
|
}
|
263097
263097
|
}
|
263098
|
-
executeCommand(
|
263099
|
-
const handler = this.handlers.get(
|
263098
|
+
executeCommand(request4) {
|
263099
|
+
const handler = this.handlers.get(request4.command);
|
263100
263100
|
if (handler) {
|
263101
|
-
const response = this.executeWithRequestId(
|
263101
|
+
const response = this.executeWithRequestId(request4.seq, () => handler(request4));
|
263102
263102
|
this.projectService.enableRequestedPlugins();
|
263103
263103
|
return response;
|
263104
263104
|
} else {
|
263105
|
-
this.logger.msg(`Unrecognized JSON command:${stringifyIndented(
|
263105
|
+
this.logger.msg(`Unrecognized JSON command:${stringifyIndented(request4)}`, "Err");
|
263106
263106
|
this.doOutput(
|
263107
263107
|
void 0,
|
263108
263108
|
"unknown",
|
263109
|
-
|
263109
|
+
request4.seq,
|
263110
263110
|
false,
|
263111
|
-
`Unrecognized JSON command: ${
|
263111
|
+
`Unrecognized JSON command: ${request4.command}`
|
263112
263112
|
);
|
263113
263113
|
return { responseRequired: false };
|
263114
263114
|
}
|
@@ -263124,43 +263124,43 @@ ${e.message}`;
|
|
263124
263124
|
this.logger.info(`request:${indent2(this.toStringMessage(message2))}`);
|
263125
263125
|
}
|
263126
263126
|
}
|
263127
|
-
let
|
263127
|
+
let request4;
|
263128
263128
|
let relevantFile;
|
263129
263129
|
try {
|
263130
|
-
|
263131
|
-
relevantFile =
|
263132
|
-
(_a4 = tracing) == null ? void 0 : _a4.instant(tracing.Phase.Session, "request", { seq:
|
263133
|
-
(_b2 = perfLogger) == null ? void 0 : _b2.logStartCommand("" +
|
263130
|
+
request4 = this.parseMessage(message2);
|
263131
|
+
relevantFile = request4.arguments && request4.arguments.file ? request4.arguments : void 0;
|
263132
|
+
(_a4 = tracing) == null ? void 0 : _a4.instant(tracing.Phase.Session, "request", { seq: request4.seq, command: request4.command });
|
263133
|
+
(_b2 = perfLogger) == null ? void 0 : _b2.logStartCommand("" + request4.command, this.toStringMessage(message2).substring(0, 100));
|
263134
263134
|
(_c2 = tracing) == null ? void 0 : _c2.push(
|
263135
263135
|
tracing.Phase.Session,
|
263136
263136
|
"executeCommand",
|
263137
|
-
{ seq:
|
263137
|
+
{ seq: request4.seq, command: request4.command },
|
263138
263138
|
true
|
263139
263139
|
);
|
263140
|
-
const { response, responseRequired } = this.executeCommand(
|
263140
|
+
const { response, responseRequired } = this.executeCommand(request4);
|
263141
263141
|
(_d = tracing) == null ? void 0 : _d.pop();
|
263142
263142
|
if (this.logger.hasLevel(2)) {
|
263143
263143
|
const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
|
263144
263144
|
if (responseRequired) {
|
263145
|
-
this.logger.perftrc(`${
|
263145
|
+
this.logger.perftrc(`${request4.seq}::${request4.command}: elapsed time (in milliseconds) ${elapsedTime}`);
|
263146
263146
|
} else {
|
263147
|
-
this.logger.perftrc(`${
|
263147
|
+
this.logger.perftrc(`${request4.seq}::${request4.command}: async elapsed time (in milliseconds) ${elapsedTime}`);
|
263148
263148
|
}
|
263149
263149
|
}
|
263150
|
-
(_e = perfLogger) == null ? void 0 : _e.logStopCommand("" +
|
263151
|
-
(_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq:
|
263150
|
+
(_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request4.command, "Success");
|
263151
|
+
(_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request4.seq, command: request4.command, success: !!response });
|
263152
263152
|
if (response) {
|
263153
263153
|
this.doOutput(
|
263154
263154
|
response,
|
263155
|
-
|
263156
|
-
|
263155
|
+
request4.command,
|
263156
|
+
request4.seq,
|
263157
263157
|
true
|
263158
263158
|
);
|
263159
263159
|
} else if (responseRequired) {
|
263160
263160
|
this.doOutput(
|
263161
263161
|
void 0,
|
263162
|
-
|
263163
|
-
|
263162
|
+
request4.command,
|
263163
|
+
request4.seq,
|
263164
263164
|
false,
|
263165
263165
|
"No content available."
|
263166
263166
|
);
|
@@ -263168,23 +263168,23 @@ ${e.message}`;
|
|
263168
263168
|
} catch (err) {
|
263169
263169
|
(_g = tracing) == null ? void 0 : _g.popAll();
|
263170
263170
|
if (err instanceof OperationCanceledException) {
|
263171
|
-
(_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (
|
263172
|
-
(_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq:
|
263171
|
+
(_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request4 && request4.command), "Canceled: " + err);
|
263172
|
+
(_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request4 == null ? void 0 : request4.seq, command: request4 == null ? void 0 : request4.command });
|
263173
263173
|
this.doOutput(
|
263174
263174
|
{ canceled: true },
|
263175
|
-
|
263176
|
-
|
263175
|
+
request4.command,
|
263176
|
+
request4.seq,
|
263177
263177
|
true
|
263178
263178
|
);
|
263179
263179
|
return;
|
263180
263180
|
}
|
263181
263181
|
this.logErrorWorker(err, this.toStringMessage(message2), relevantFile);
|
263182
|
-
(_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (
|
263183
|
-
(_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq:
|
263182
|
+
(_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request4 && request4.command), "Error: " + err);
|
263183
|
+
(_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request4 == null ? void 0 : request4.seq, command: request4 == null ? void 0 : request4.command, message: err.message });
|
263184
263184
|
this.doOutput(
|
263185
263185
|
void 0,
|
263186
|
-
|
263187
|
-
|
263186
|
+
request4 ? request4.command : "unknown",
|
263187
|
+
request4 ? request4.seq : 0,
|
263188
263188
|
false,
|
263189
263189
|
"Error processing request. " + err.message + "\n" + err.stack
|
263190
263190
|
);
|
@@ -263994,11 +263994,11 @@ ${e.message}`;
|
|
263994
263994
|
}
|
263995
263995
|
installPackage(options) {
|
263996
263996
|
this.packageInstallId++;
|
263997
|
-
const
|
263997
|
+
const request4 = { kind: "installPackage", ...options, id: this.packageInstallId };
|
263998
263998
|
const promise2 = new Promise((resolve5, reject) => {
|
263999
263999
|
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve5, reject });
|
264000
264000
|
});
|
264001
|
-
this.installer.send(
|
264001
|
+
this.installer.send(request4);
|
264002
264002
|
return promise2;
|
264003
264003
|
}
|
264004
264004
|
attach(projectService) {
|
@@ -264009,18 +264009,18 @@ ${e.message}`;
|
|
264009
264009
|
this.installer.send({ projectName: p.getProjectName(), kind: "closeProject" });
|
264010
264010
|
}
|
264011
264011
|
enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports) {
|
264012
|
-
const
|
264012
|
+
const request4 = createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
264013
264013
|
if (this.logger.hasLevel(3)) {
|
264014
|
-
this.logger.info(`TIAdapter:: Scheduling throttled operation:${stringifyIndented(
|
264014
|
+
this.logger.info(`TIAdapter:: Scheduling throttled operation:${stringifyIndented(request4)}`);
|
264015
264015
|
}
|
264016
264016
|
if (this.activeRequestCount < this.maxActiveRequestCount) {
|
264017
|
-
this.scheduleRequest(
|
264017
|
+
this.scheduleRequest(request4);
|
264018
264018
|
} else {
|
264019
264019
|
if (this.logger.hasLevel(3)) {
|
264020
|
-
this.logger.info(`TIAdapter:: Deferring request for: ${
|
264020
|
+
this.logger.info(`TIAdapter:: Deferring request for: ${request4.projectName}`);
|
264021
264021
|
}
|
264022
|
-
this.requestQueue.enqueue(
|
264023
|
-
this.requestMap.set(
|
264022
|
+
this.requestQueue.enqueue(request4);
|
264023
|
+
this.requestMap.set(request4.projectName, request4);
|
264024
264024
|
}
|
264025
264025
|
}
|
264026
264026
|
handleMessage(response) {
|
@@ -264116,20 +264116,20 @@ ${e.message}`;
|
|
264116
264116
|
assertType(response);
|
264117
264117
|
}
|
264118
264118
|
}
|
264119
|
-
scheduleRequest(
|
264119
|
+
scheduleRequest(request4) {
|
264120
264120
|
if (this.logger.hasLevel(3)) {
|
264121
|
-
this.logger.info(`TIAdapter:: Scheduling request for: ${
|
264121
|
+
this.logger.info(`TIAdapter:: Scheduling request for: ${request4.projectName}`);
|
264122
264122
|
}
|
264123
264123
|
this.activeRequestCount++;
|
264124
264124
|
this.host.setTimeout(
|
264125
264125
|
() => {
|
264126
264126
|
if (this.logger.hasLevel(3)) {
|
264127
|
-
this.logger.info(`TIAdapter:: Sending request:${stringifyIndented(
|
264127
|
+
this.logger.info(`TIAdapter:: Sending request:${stringifyIndented(request4)}`);
|
264128
264128
|
}
|
264129
|
-
this.installer.send(
|
264129
|
+
this.installer.send(request4);
|
264130
264130
|
},
|
264131
264131
|
_TypingsInstallerAdapter2.requestDelayMillis,
|
264132
|
-
`${
|
264132
|
+
`${request4.projectName}::${request4.kind}`
|
264133
264133
|
);
|
264134
264134
|
}
|
264135
264135
|
};
|
@@ -264297,13 +264297,13 @@ var require_loaders = __commonJS({
|
|
264297
264297
|
}
|
264298
264298
|
};
|
264299
264299
|
exports.loadJs = loadJs;
|
264300
|
-
var
|
264300
|
+
var parseJson;
|
264301
264301
|
var loadJson = function loadJson2(filepath, content) {
|
264302
|
-
if (
|
264303
|
-
|
264302
|
+
if (parseJson === void 0) {
|
264303
|
+
parseJson = require_parse_json();
|
264304
264304
|
}
|
264305
264305
|
try {
|
264306
|
-
return
|
264306
|
+
return parseJson(content);
|
264307
264307
|
} catch (error3) {
|
264308
264308
|
error3.message = `JSON Error in ${filepath}:
|
264309
264309
|
${error3.message}`;
|
@@ -265167,7 +265167,7 @@ var require_dist15 = __commonJS({
|
|
265167
265167
|
var Explorer_js_1 = require_Explorer();
|
265168
265168
|
var ExplorerSync_js_1 = require_ExplorerSync();
|
265169
265169
|
var util_1 = require_util4();
|
265170
|
-
var
|
265170
|
+
var identity17 = function identity18(x) {
|
265171
265171
|
return x;
|
265172
265172
|
};
|
265173
265173
|
function getUserDefinedOptionsFromMetaConfig() {
|
@@ -265178,7 +265178,7 @@ var require_dist15 = __commonJS({
|
|
265178
265178
|
ignoreEmptySearchPlaces: false,
|
265179
265179
|
applyPackagePropertyPathToConfiguration: true,
|
265180
265180
|
loaders: defaults_1.defaultLoaders,
|
265181
|
-
transform:
|
265181
|
+
transform: identity17,
|
265182
265182
|
cache: true,
|
265183
265183
|
metaConfigFilePath: null,
|
265184
265184
|
mergeImportArrays: true,
|
@@ -265249,7 +265249,7 @@ var require_dist15 = __commonJS({
|
|
265249
265249
|
searchPlaces: (0, defaults_1.getDefaultSearchPlaces)(moduleName),
|
265250
265250
|
ignoreEmptySearchPlaces: true,
|
265251
265251
|
cache: true,
|
265252
|
-
transform:
|
265252
|
+
transform: identity17,
|
265253
265253
|
loaders: defaults_1.defaultLoaders,
|
265254
265254
|
metaConfigFilePath: null,
|
265255
265255
|
mergeImportArrays: true,
|
@@ -265265,7 +265265,7 @@ var require_dist15 = __commonJS({
|
|
265265
265265
|
searchPlaces: (0, defaults_1.getDefaultSearchPlacesSync)(moduleName),
|
265266
265266
|
ignoreEmptySearchPlaces: true,
|
265267
265267
|
cache: true,
|
265268
|
-
transform:
|
265268
|
+
transform: identity17,
|
265269
265269
|
loaders: defaults_1.defaultLoadersSync,
|
265270
265270
|
metaConfigFilePath: null,
|
265271
265271
|
mergeImportArrays: true,
|
@@ -268844,19 +268844,19 @@ var LifecycleWatcher = class {
|
|
268844
268844
|
});
|
268845
268845
|
this.#checkLifecycleComplete();
|
268846
268846
|
}
|
268847
|
-
#onRequest(
|
268848
|
-
if (
|
268847
|
+
#onRequest(request4) {
|
268848
|
+
if (request4.frame() !== this.#frame || !request4.isNavigationRequest()) {
|
268849
268849
|
return;
|
268850
268850
|
}
|
268851
|
-
this.#navigationRequest =
|
268851
|
+
this.#navigationRequest = request4;
|
268852
268852
|
this.#navigationResponseReceived?.resolve();
|
268853
268853
|
this.#navigationResponseReceived = Deferred.create();
|
268854
|
-
if (
|
268854
|
+
if (request4.response() !== null) {
|
268855
268855
|
this.#navigationResponseReceived?.resolve();
|
268856
268856
|
}
|
268857
268857
|
}
|
268858
|
-
#onRequestFailed(
|
268859
|
-
if (this.#navigationRequest?.id !==
|
268858
|
+
#onRequestFailed(request4) {
|
268859
|
+
if (this.#navigationRequest?.id !== request4.id) {
|
268860
268860
|
return;
|
268861
268861
|
}
|
268862
268862
|
this.#navigationResponseReceived?.resolve();
|
@@ -269280,8 +269280,8 @@ var FrameTree = class {
|
|
269280
269280
|
this.#mainFrame = frame;
|
269281
269281
|
this.#isMainFrameStale = false;
|
269282
269282
|
}
|
269283
|
-
this.#waitRequests.get(frame._id)?.forEach((
|
269284
|
-
return
|
269283
|
+
this.#waitRequests.get(frame._id)?.forEach((request4) => {
|
269284
|
+
return request4.resolve(frame);
|
269285
269285
|
});
|
269286
269286
|
}
|
269287
269287
|
removeFrame(frame) {
|
@@ -269493,16 +269493,16 @@ var CdpHTTPResponse = class extends HTTPResponse {
|
|
269493
269493
|
#headers = {};
|
269494
269494
|
#securityDetails;
|
269495
269495
|
#timing;
|
269496
|
-
constructor(client,
|
269496
|
+
constructor(client, request4, responsePayload, extraInfo) {
|
269497
269497
|
super();
|
269498
269498
|
this.#client = client;
|
269499
|
-
this.#request =
|
269499
|
+
this.#request = request4;
|
269500
269500
|
this.#remoteAddress = {
|
269501
269501
|
ip: responsePayload.remoteIPAddress,
|
269502
269502
|
port: responsePayload.remotePort
|
269503
269503
|
};
|
269504
269504
|
this.#statusText = this.#parseStatusTextFromExtraInfo(extraInfo) || responsePayload.statusText;
|
269505
|
-
this.#url =
|
269505
|
+
this.#url = request4.url();
|
269506
269506
|
this.#fromDiskCache = !!responsePayload.fromDiskCache;
|
269507
269507
|
this.#fromServiceWorker = !!responsePayload.fromServiceWorker;
|
269508
269508
|
this.#status = extraInfo ? extraInfo.statusCode : responsePayload.status;
|
@@ -269625,8 +269625,8 @@ var NetworkEventManager = class {
|
|
269625
269625
|
}
|
269626
269626
|
inFlightRequestsCount() {
|
269627
269627
|
let inFlightRequestCounter = 0;
|
269628
|
-
for (const
|
269629
|
-
if (!
|
269628
|
+
for (const request4 of this.#httpRequestsMap.values()) {
|
269629
|
+
if (!request4.response()) {
|
269630
269630
|
inFlightRequestCounter++;
|
269631
269631
|
}
|
269632
269632
|
}
|
@@ -269653,8 +269653,8 @@ var NetworkEventManager = class {
|
|
269653
269653
|
getRequest(networkRequestId) {
|
269654
269654
|
return this.#httpRequestsMap.get(networkRequestId);
|
269655
269655
|
}
|
269656
|
-
storeRequest(networkRequestId,
|
269657
|
-
this.#httpRequestsMap.set(networkRequestId,
|
269656
|
+
storeRequest(networkRequestId, request4) {
|
269657
|
+
this.#httpRequestsMap.set(networkRequestId, request4);
|
269658
269658
|
}
|
269659
269659
|
forgetRequest(networkRequestId) {
|
269660
269660
|
this.#httpRequestsMap.delete(networkRequestId);
|
@@ -269918,9 +269918,9 @@ var NetworkManager = class extends EventEmitter {
|
|
269918
269918
|
}
|
269919
269919
|
#onRequestWithoutNetworkInstrumentation(client, event) {
|
269920
269920
|
const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
|
269921
|
-
const
|
269922
|
-
this.emit(NetworkManagerEvent.Request,
|
269923
|
-
void
|
269921
|
+
const request4 = new CdpHTTPRequest(client, frame, event.requestId, this.#userRequestInterceptionEnabled, event, []);
|
269922
|
+
this.emit(NetworkManagerEvent.Request, request4);
|
269923
|
+
void request4.finalizeInterceptions();
|
269924
269924
|
}
|
269925
269925
|
#onRequest(client, event, fetchRequestId) {
|
269926
269926
|
let redirectChain = [];
|
@@ -269936,37 +269936,37 @@ var NetworkManager = class extends EventEmitter {
|
|
269936
269936
|
return;
|
269937
269937
|
}
|
269938
269938
|
}
|
269939
|
-
const
|
269940
|
-
if (
|
269941
|
-
this.#handleRequestRedirect(client,
|
269942
|
-
redirectChain =
|
269939
|
+
const request5 = this.#networkEventManager.getRequest(event.requestId);
|
269940
|
+
if (request5) {
|
269941
|
+
this.#handleRequestRedirect(client, request5, event.redirectResponse, redirectResponseExtraInfo);
|
269942
|
+
redirectChain = request5._redirectChain;
|
269943
269943
|
}
|
269944
269944
|
}
|
269945
269945
|
const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
|
269946
|
-
const
|
269947
|
-
this.#networkEventManager.storeRequest(event.requestId,
|
269948
|
-
this.emit(NetworkManagerEvent.Request,
|
269949
|
-
void
|
269946
|
+
const request4 = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain);
|
269947
|
+
this.#networkEventManager.storeRequest(event.requestId, request4);
|
269948
|
+
this.emit(NetworkManagerEvent.Request, request4);
|
269949
|
+
void request4.finalizeInterceptions();
|
269950
269950
|
}
|
269951
269951
|
#onRequestServedFromCache(_client, event) {
|
269952
|
-
const
|
269953
|
-
if (
|
269954
|
-
|
269952
|
+
const request4 = this.#networkEventManager.getRequest(event.requestId);
|
269953
|
+
if (request4) {
|
269954
|
+
request4._fromMemoryCache = true;
|
269955
269955
|
}
|
269956
|
-
this.emit(NetworkManagerEvent.RequestServedFromCache,
|
269956
|
+
this.emit(NetworkManagerEvent.RequestServedFromCache, request4);
|
269957
269957
|
}
|
269958
|
-
#handleRequestRedirect(client,
|
269959
|
-
const response = new CdpHTTPResponse(client,
|
269960
|
-
|
269961
|
-
|
269958
|
+
#handleRequestRedirect(client, request4, responsePayload, extraInfo) {
|
269959
|
+
const response = new CdpHTTPResponse(client, request4, responsePayload, extraInfo);
|
269960
|
+
request4._response = response;
|
269961
|
+
request4._redirectChain.push(request4);
|
269962
269962
|
response._resolveBody(new Error("Response body is unavailable for redirect responses"));
|
269963
|
-
this.#forgetRequest(
|
269963
|
+
this.#forgetRequest(request4, false);
|
269964
269964
|
this.emit(NetworkManagerEvent.Response, response);
|
269965
|
-
this.emit(NetworkManagerEvent.RequestFinished,
|
269965
|
+
this.emit(NetworkManagerEvent.RequestFinished, request4);
|
269966
269966
|
}
|
269967
269967
|
#emitResponseEvent(client, responseReceived, extraInfo) {
|
269968
|
-
const
|
269969
|
-
if (!
|
269968
|
+
const request4 = this.#networkEventManager.getRequest(responseReceived.requestId);
|
269969
|
+
if (!request4) {
|
269970
269970
|
return;
|
269971
269971
|
}
|
269972
269972
|
const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId);
|
@@ -269976,14 +269976,14 @@ var NetworkManager = class extends EventEmitter {
|
|
269976
269976
|
if (responseReceived.response.fromDiskCache) {
|
269977
269977
|
extraInfo = null;
|
269978
269978
|
}
|
269979
|
-
const response = new CdpHTTPResponse(client,
|
269980
|
-
|
269979
|
+
const response = new CdpHTTPResponse(client, request4, responseReceived.response, extraInfo);
|
269980
|
+
request4._response = response;
|
269981
269981
|
this.emit(NetworkManagerEvent.Response, response);
|
269982
269982
|
}
|
269983
269983
|
#onResponseReceived(client, event) {
|
269984
|
-
const
|
269984
|
+
const request4 = this.#networkEventManager.getRequest(event.requestId);
|
269985
269985
|
let extraInfo = null;
|
269986
|
-
if (
|
269986
|
+
if (request4 && !request4._fromMemoryCache && event.hasExtraInfo) {
|
269987
269987
|
extraInfo = this.#networkEventManager.responseExtraInfo(event.requestId).shift();
|
269988
269988
|
if (!extraInfo) {
|
269989
269989
|
this.#networkEventManager.queueEventGroup(event.requestId, {
|
@@ -270015,9 +270015,9 @@ var NetworkManager = class extends EventEmitter {
|
|
270015
270015
|
}
|
270016
270016
|
this.#networkEventManager.responseExtraInfo(event.requestId).push(event);
|
270017
270017
|
}
|
270018
|
-
#forgetRequest(
|
270019
|
-
const requestId =
|
270020
|
-
const interceptionId =
|
270018
|
+
#forgetRequest(request4, events) {
|
270019
|
+
const requestId = request4.id;
|
270020
|
+
const interceptionId = request4._interceptionId;
|
270021
270021
|
this.#networkEventManager.forgetRequest(requestId);
|
270022
270022
|
interceptionId !== void 0 && this.#attemptedAuthentications.delete(interceptionId);
|
270023
270023
|
if (events) {
|
@@ -270033,15 +270033,15 @@ var NetworkManager = class extends EventEmitter {
|
|
270033
270033
|
}
|
270034
270034
|
}
|
270035
270035
|
#emitLoadingFinished(event) {
|
270036
|
-
const
|
270037
|
-
if (!
|
270036
|
+
const request4 = this.#networkEventManager.getRequest(event.requestId);
|
270037
|
+
if (!request4) {
|
270038
270038
|
return;
|
270039
270039
|
}
|
270040
|
-
if (
|
270041
|
-
|
270040
|
+
if (request4.response()) {
|
270041
|
+
request4.response()?._resolveBody();
|
270042
270042
|
}
|
270043
|
-
this.#forgetRequest(
|
270044
|
-
this.emit(NetworkManagerEvent.RequestFinished,
|
270043
|
+
this.#forgetRequest(request4, true);
|
270044
|
+
this.emit(NetworkManagerEvent.RequestFinished, request4);
|
270045
270045
|
}
|
270046
270046
|
#onLoadingFailed(_client, event) {
|
270047
270047
|
const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId);
|
@@ -270052,17 +270052,17 @@ var NetworkManager = class extends EventEmitter {
|
|
270052
270052
|
}
|
270053
270053
|
}
|
270054
270054
|
#emitLoadingFailed(event) {
|
270055
|
-
const
|
270056
|
-
if (!
|
270055
|
+
const request4 = this.#networkEventManager.getRequest(event.requestId);
|
270056
|
+
if (!request4) {
|
270057
270057
|
return;
|
270058
270058
|
}
|
270059
|
-
|
270060
|
-
const response =
|
270059
|
+
request4._failureText = event.errorText;
|
270060
|
+
const response = request4.response();
|
270061
270061
|
if (response) {
|
270062
270062
|
response._resolveBody();
|
270063
270063
|
}
|
270064
|
-
this.#forgetRequest(
|
270065
|
-
this.emit(NetworkManagerEvent.RequestFailed,
|
270064
|
+
this.#forgetRequest(request4, true);
|
270065
|
+
this.emit(NetworkManagerEvent.RequestFailed, request4);
|
270066
270066
|
}
|
270067
270067
|
};
|
270068
270068
|
|
@@ -271462,20 +271462,20 @@ var CdpPage = class extends Page {
|
|
271462
271462
|
void this.#onBindingCalled(world, event);
|
271463
271463
|
});
|
271464
271464
|
const networkManagerEmitter = new EventEmitter(this.#frameManager.networkManager);
|
271465
|
-
networkManagerEmitter.on(NetworkManagerEvent.Request, (
|
271466
|
-
this.emit("request",
|
271465
|
+
networkManagerEmitter.on(NetworkManagerEvent.Request, (request4) => {
|
271466
|
+
this.emit("request", request4);
|
271467
271467
|
});
|
271468
|
-
networkManagerEmitter.on(NetworkManagerEvent.RequestServedFromCache, (
|
271469
|
-
this.emit("requestservedfromcache",
|
271468
|
+
networkManagerEmitter.on(NetworkManagerEvent.RequestServedFromCache, (request4) => {
|
271469
|
+
this.emit("requestservedfromcache", request4);
|
271470
271470
|
});
|
271471
271471
|
networkManagerEmitter.on(NetworkManagerEvent.Response, (response) => {
|
271472
271472
|
this.emit("response", response);
|
271473
271473
|
});
|
271474
|
-
networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, (
|
271475
|
-
this.emit("requestfailed",
|
271474
|
+
networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, (request4) => {
|
271475
|
+
this.emit("requestfailed", request4);
|
271476
271476
|
});
|
271477
|
-
networkManagerEmitter.on(NetworkManagerEvent.RequestFinished, (
|
271478
|
-
this.emit("requestfinished",
|
271477
|
+
networkManagerEmitter.on(NetworkManagerEvent.RequestFinished, (request4) => {
|
271478
|
+
this.emit("requestfinished", request4);
|
271479
271479
|
});
|
271480
271480
|
this.#tabTargetClient.on(CDPSessionEvent.Swapped, this.#onActivation.bind(this));
|
271481
271481
|
this.#tabTargetClient.on(CDPSessionEvent.Ready, this.#onSecondaryTarget.bind(this));
|
@@ -274677,9 +274677,9 @@ function httpRequest(url, method, response, keepAlive = true) {
|
|
274677
274677
|
response(res);
|
274678
274678
|
}
|
274679
274679
|
};
|
274680
|
-
const
|
274681
|
-
|
274682
|
-
return
|
274680
|
+
const request4 = options.protocol === "https:" ? https.request(options, requestCallback) : http.request(options, requestCallback);
|
274681
|
+
request4.end();
|
274682
|
+
return request4;
|
274683
274683
|
}
|
274684
274684
|
async function getJSON(url) {
|
274685
274685
|
const text2 = await getText(url);
|
@@ -274691,7 +274691,7 @@ async function getJSON(url) {
|
|
274691
274691
|
}
|
274692
274692
|
function getText(url) {
|
274693
274693
|
return new Promise((resolve5, reject) => {
|
274694
|
-
const
|
274694
|
+
const request4 = httpRequest(url, "GET", (response) => {
|
274695
274695
|
let data = "";
|
274696
274696
|
if (response.statusCode && response.statusCode >= 400) {
|
274697
274697
|
return reject(new Error(`Got status code ${response.statusCode}`));
|
@@ -274707,7 +274707,7 @@ function getText(url) {
|
|
274707
274707
|
}
|
274708
274708
|
});
|
274709
274709
|
}, false);
|
274710
|
-
|
274710
|
+
request4.on("error", (err) => {
|
274711
274711
|
reject(err);
|
274712
274712
|
});
|
274713
274713
|
});
|
@@ -275401,8 +275401,8 @@ function isWindows11(version) {
|
|
275401
275401
|
if (parts.length > 2) {
|
275402
275402
|
const major = parseInt(parts[0], 10);
|
275403
275403
|
const minor = parseInt(parts[1], 10);
|
275404
|
-
const
|
275405
|
-
return major > 10 || major === 10 && minor > 0 || major === 10 && minor === 0 &&
|
275404
|
+
const patch2 = parseInt(parts[2], 10);
|
275405
|
+
return major > 10 || major === 10 && minor > 0 || major === 10 && minor === 0 && patch2 >= 22e3;
|
275406
275406
|
}
|
275407
275407
|
return false;
|
275408
275408
|
}
|