typescript 5.4.0-dev.20231114 → 5.4.0-dev.20231115
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/lib/tsc.js +1 -1
- package/lib/tsserver.js +223 -173
- package/lib/typescript.js +214 -3
- package/lib/typingsInstaller.js +28 -24
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20231115`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
package/lib/tsserver.js
CHANGED
|
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2330
2330
|
|
|
2331
2331
|
// src/compiler/corePublic.ts
|
|
2332
2332
|
var versionMajorMinor = "5.4";
|
|
2333
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-dev.20231115`;
|
|
2334
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2335
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2336
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -175255,6 +175255,7 @@ __export(ts_server_exports3, {
|
|
|
175255
175255
|
TextStorage: () => TextStorage,
|
|
175256
175256
|
ThrottledOperations: () => ThrottledOperations,
|
|
175257
175257
|
TypingsCache: () => TypingsCache,
|
|
175258
|
+
TypingsInstallerAdapter: () => TypingsInstallerAdapter,
|
|
175258
175259
|
allFilesAreJsOrDts: () => allFilesAreJsOrDts,
|
|
175259
175260
|
allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,
|
|
175260
175261
|
asNormalizedPath: () => asNormalizedPath,
|
|
@@ -175376,6 +175377,32 @@ var TypingsInstaller = class {
|
|
|
175376
175377
|
}
|
|
175377
175378
|
this.processCacheLocation(this.globalCachePath);
|
|
175378
175379
|
}
|
|
175380
|
+
/** @internal */
|
|
175381
|
+
handleRequest(req) {
|
|
175382
|
+
switch (req.kind) {
|
|
175383
|
+
case "discover":
|
|
175384
|
+
this.install(req);
|
|
175385
|
+
break;
|
|
175386
|
+
case "closeProject":
|
|
175387
|
+
this.closeProject(req);
|
|
175388
|
+
break;
|
|
175389
|
+
case "typesRegistry": {
|
|
175390
|
+
const typesRegistry = {};
|
|
175391
|
+
this.typesRegistry.forEach((value, key) => {
|
|
175392
|
+
typesRegistry[key] = value;
|
|
175393
|
+
});
|
|
175394
|
+
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
175395
|
+
this.sendResponse(response);
|
|
175396
|
+
break;
|
|
175397
|
+
}
|
|
175398
|
+
case "installPackage": {
|
|
175399
|
+
this.installPackage(req);
|
|
175400
|
+
break;
|
|
175401
|
+
}
|
|
175402
|
+
default:
|
|
175403
|
+
Debug.assertNever(req);
|
|
175404
|
+
}
|
|
175405
|
+
}
|
|
175379
175406
|
closeProject(req) {
|
|
175380
175407
|
this.closeWatchers(req.projectName);
|
|
175381
175408
|
}
|
|
@@ -176704,8 +176731,9 @@ var TypingsCache = class {
|
|
|
176704
176731
|
return !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : typings;
|
|
176705
176732
|
}
|
|
176706
176733
|
onProjectClosed(project) {
|
|
176707
|
-
this.perProjectCache.delete(project.getProjectName())
|
|
176708
|
-
|
|
176734
|
+
if (this.perProjectCache.delete(project.getProjectName())) {
|
|
176735
|
+
this.installer.onProjectClosed(project);
|
|
176736
|
+
}
|
|
176709
176737
|
}
|
|
176710
176738
|
};
|
|
176711
176739
|
|
|
@@ -186633,6 +186661,179 @@ var LineLeaf = class {
|
|
|
186633
186661
|
}
|
|
186634
186662
|
};
|
|
186635
186663
|
|
|
186664
|
+
// src/server/typingInstallerAdapter.ts
|
|
186665
|
+
var _TypingsInstallerAdapter = class _TypingsInstallerAdapter {
|
|
186666
|
+
constructor(telemetryEnabled, logger, host, globalTypingsCacheLocation, event, maxActiveRequestCount) {
|
|
186667
|
+
this.telemetryEnabled = telemetryEnabled;
|
|
186668
|
+
this.logger = logger;
|
|
186669
|
+
this.host = host;
|
|
186670
|
+
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
|
|
186671
|
+
this.event = event;
|
|
186672
|
+
this.maxActiveRequestCount = maxActiveRequestCount;
|
|
186673
|
+
this.activeRequestCount = 0;
|
|
186674
|
+
this.requestQueue = createQueue();
|
|
186675
|
+
this.requestMap = /* @__PURE__ */ new Map();
|
|
186676
|
+
// Maps project name to newest requestQueue entry for that project
|
|
186677
|
+
/** We will lazily request the types registry on the first call to `isKnownTypesPackageName` and store it in `typesRegistryCache`. */
|
|
186678
|
+
this.requestedRegistry = false;
|
|
186679
|
+
}
|
|
186680
|
+
isKnownTypesPackageName(name) {
|
|
186681
|
+
var _a;
|
|
186682
|
+
const validationResult = ts_JsTyping_exports.validatePackageName(name);
|
|
186683
|
+
if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {
|
|
186684
|
+
return false;
|
|
186685
|
+
}
|
|
186686
|
+
if (!this.requestedRegistry) {
|
|
186687
|
+
this.requestedRegistry = true;
|
|
186688
|
+
this.installer.send({ kind: "typesRegistry" });
|
|
186689
|
+
}
|
|
186690
|
+
return !!((_a = this.typesRegistryCache) == null ? void 0 : _a.has(name));
|
|
186691
|
+
}
|
|
186692
|
+
installPackage(options) {
|
|
186693
|
+
this.installer.send({ kind: "installPackage", ...options });
|
|
186694
|
+
Debug.assert(this.packageInstalledPromise === void 0);
|
|
186695
|
+
return new Promise((resolve, reject) => {
|
|
186696
|
+
this.packageInstalledPromise = { resolve, reject };
|
|
186697
|
+
});
|
|
186698
|
+
}
|
|
186699
|
+
attach(projectService) {
|
|
186700
|
+
this.projectService = projectService;
|
|
186701
|
+
this.installer = this.createInstallerProcess();
|
|
186702
|
+
}
|
|
186703
|
+
onProjectClosed(p) {
|
|
186704
|
+
this.installer.send({ projectName: p.getProjectName(), kind: "closeProject" });
|
|
186705
|
+
}
|
|
186706
|
+
enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports) {
|
|
186707
|
+
const request = createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
|
186708
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186709
|
+
this.logger.info(`TIAdapter:: Scheduling throttled operation:${stringifyIndented(request)}`);
|
|
186710
|
+
}
|
|
186711
|
+
if (this.activeRequestCount < this.maxActiveRequestCount) {
|
|
186712
|
+
this.scheduleRequest(request);
|
|
186713
|
+
} else {
|
|
186714
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186715
|
+
this.logger.info(`TIAdapter:: Deferring request for: ${request.projectName}`);
|
|
186716
|
+
}
|
|
186717
|
+
this.requestQueue.enqueue(request);
|
|
186718
|
+
this.requestMap.set(request.projectName, request);
|
|
186719
|
+
}
|
|
186720
|
+
}
|
|
186721
|
+
handleMessage(response) {
|
|
186722
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186723
|
+
this.logger.info(`TIAdapter:: Received response:${stringifyIndented(response)}`);
|
|
186724
|
+
}
|
|
186725
|
+
switch (response.kind) {
|
|
186726
|
+
case EventTypesRegistry:
|
|
186727
|
+
this.typesRegistryCache = new Map(Object.entries(response.typesRegistry));
|
|
186728
|
+
break;
|
|
186729
|
+
case ActionPackageInstalled: {
|
|
186730
|
+
const { success, message } = response;
|
|
186731
|
+
if (success) {
|
|
186732
|
+
this.packageInstalledPromise.resolve({ successMessage: message });
|
|
186733
|
+
} else {
|
|
186734
|
+
this.packageInstalledPromise.reject(message);
|
|
186735
|
+
}
|
|
186736
|
+
this.packageInstalledPromise = void 0;
|
|
186737
|
+
this.projectService.updateTypingsForProject(response);
|
|
186738
|
+
this.event(response, "setTypings");
|
|
186739
|
+
break;
|
|
186740
|
+
}
|
|
186741
|
+
case EventInitializationFailed: {
|
|
186742
|
+
const body = {
|
|
186743
|
+
message: response.message
|
|
186744
|
+
};
|
|
186745
|
+
const eventName = "typesInstallerInitializationFailed";
|
|
186746
|
+
this.event(body, eventName);
|
|
186747
|
+
break;
|
|
186748
|
+
}
|
|
186749
|
+
case EventBeginInstallTypes: {
|
|
186750
|
+
const body = {
|
|
186751
|
+
eventId: response.eventId,
|
|
186752
|
+
packages: response.packagesToInstall
|
|
186753
|
+
};
|
|
186754
|
+
const eventName = "beginInstallTypes";
|
|
186755
|
+
this.event(body, eventName);
|
|
186756
|
+
break;
|
|
186757
|
+
}
|
|
186758
|
+
case EventEndInstallTypes: {
|
|
186759
|
+
if (this.telemetryEnabled) {
|
|
186760
|
+
const body2 = {
|
|
186761
|
+
telemetryEventName: "typingsInstalled",
|
|
186762
|
+
payload: {
|
|
186763
|
+
installedPackages: response.packagesToInstall.join(","),
|
|
186764
|
+
installSuccess: response.installSuccess,
|
|
186765
|
+
typingsInstallerVersion: response.typingsInstallerVersion
|
|
186766
|
+
}
|
|
186767
|
+
};
|
|
186768
|
+
const eventName2 = "telemetry";
|
|
186769
|
+
this.event(body2, eventName2);
|
|
186770
|
+
}
|
|
186771
|
+
const body = {
|
|
186772
|
+
eventId: response.eventId,
|
|
186773
|
+
packages: response.packagesToInstall,
|
|
186774
|
+
success: response.installSuccess
|
|
186775
|
+
};
|
|
186776
|
+
const eventName = "endInstallTypes";
|
|
186777
|
+
this.event(body, eventName);
|
|
186778
|
+
break;
|
|
186779
|
+
}
|
|
186780
|
+
case ActionInvalidate: {
|
|
186781
|
+
this.projectService.updateTypingsForProject(response);
|
|
186782
|
+
break;
|
|
186783
|
+
}
|
|
186784
|
+
case ActionSet: {
|
|
186785
|
+
if (this.activeRequestCount > 0) {
|
|
186786
|
+
this.activeRequestCount--;
|
|
186787
|
+
} else {
|
|
186788
|
+
Debug.fail("TIAdapter:: Received too many responses");
|
|
186789
|
+
}
|
|
186790
|
+
while (!this.requestQueue.isEmpty()) {
|
|
186791
|
+
const queuedRequest = this.requestQueue.dequeue();
|
|
186792
|
+
if (this.requestMap.get(queuedRequest.projectName) === queuedRequest) {
|
|
186793
|
+
this.requestMap.delete(queuedRequest.projectName);
|
|
186794
|
+
this.scheduleRequest(queuedRequest);
|
|
186795
|
+
break;
|
|
186796
|
+
}
|
|
186797
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186798
|
+
this.logger.info(`TIAdapter:: Skipping defunct request for: ${queuedRequest.projectName}`);
|
|
186799
|
+
}
|
|
186800
|
+
}
|
|
186801
|
+
this.projectService.updateTypingsForProject(response);
|
|
186802
|
+
this.event(response, "setTypings");
|
|
186803
|
+
break;
|
|
186804
|
+
}
|
|
186805
|
+
case ActionWatchTypingLocations:
|
|
186806
|
+
this.projectService.watchTypingLocations(response);
|
|
186807
|
+
break;
|
|
186808
|
+
default:
|
|
186809
|
+
assertType(response);
|
|
186810
|
+
}
|
|
186811
|
+
}
|
|
186812
|
+
scheduleRequest(request) {
|
|
186813
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186814
|
+
this.logger.info(`TIAdapter:: Scheduling request for: ${request.projectName}`);
|
|
186815
|
+
}
|
|
186816
|
+
this.activeRequestCount++;
|
|
186817
|
+
this.host.setTimeout(
|
|
186818
|
+
() => {
|
|
186819
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
186820
|
+
this.logger.info(`TIAdapter:: Sending request:${stringifyIndented(request)}`);
|
|
186821
|
+
}
|
|
186822
|
+
this.installer.send(request);
|
|
186823
|
+
},
|
|
186824
|
+
_TypingsInstallerAdapter.requestDelayMillis,
|
|
186825
|
+
`${request.projectName}::${request.kind}`
|
|
186826
|
+
);
|
|
186827
|
+
}
|
|
186828
|
+
};
|
|
186829
|
+
// This number is essentially arbitrary. Processing more than one typings request
|
|
186830
|
+
// at a time makes sense, but having too many in the pipe results in a hang
|
|
186831
|
+
// (see https://github.com/nodejs/node/issues/7657).
|
|
186832
|
+
// It would be preferable to base our limit on the amount of space left in the
|
|
186833
|
+
// buffer, but we have yet to find a way to retrieve that value.
|
|
186834
|
+
_TypingsInstallerAdapter.requestDelayMillis = 100;
|
|
186835
|
+
var TypingsInstallerAdapter = _TypingsInstallerAdapter;
|
|
186836
|
+
|
|
186636
186837
|
// src/tsserver/_namespaces/ts.server.ts
|
|
186637
186838
|
var ts_server_exports4 = {};
|
|
186638
186839
|
__export(ts_server_exports4, {
|
|
@@ -186680,6 +186881,7 @@ __export(ts_server_exports4, {
|
|
|
186680
186881
|
TextStorage: () => TextStorage,
|
|
186681
186882
|
ThrottledOperations: () => ThrottledOperations,
|
|
186682
186883
|
TypingsCache: () => TypingsCache,
|
|
186884
|
+
TypingsInstallerAdapter: () => TypingsInstallerAdapter,
|
|
186683
186885
|
allFilesAreJsOrDts: () => allFilesAreJsOrDts,
|
|
186684
186886
|
allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,
|
|
186685
186887
|
asNormalizedPath: () => asNormalizedPath,
|
|
@@ -186799,7 +187001,7 @@ function initializeNodeSystem() {
|
|
|
186799
187001
|
const sys2 = Debug.checkDefined(sys);
|
|
186800
187002
|
const childProcess = require("child_process");
|
|
186801
187003
|
const fs = require("fs");
|
|
186802
|
-
class
|
|
187004
|
+
class Logger7 {
|
|
186803
187005
|
constructor(logFilename, traceToConsole, level) {
|
|
186804
187006
|
this.logFilename = logFilename;
|
|
186805
187007
|
this.traceToConsole = traceToConsole;
|
|
@@ -186866,7 +187068,7 @@ function initializeNodeSystem() {
|
|
|
186866
187068
|
s = `[${nowString()}] ${s}
|
|
186867
187069
|
`;
|
|
186868
187070
|
if (!this.inGroup || this.firstInGroup) {
|
|
186869
|
-
const prefix =
|
|
187071
|
+
const prefix = Logger7.padStringRight(type + " " + this.seq.toString(), " ");
|
|
186870
187072
|
s = prefix + s;
|
|
186871
187073
|
}
|
|
186872
187074
|
this.write(s, type);
|
|
@@ -187003,7 +187205,7 @@ function initializeNodeSystem() {
|
|
|
187003
187205
|
const unsubstitutedLogFileName = cmdLineLogFileName ? stripQuotes(cmdLineLogFileName) : envLogOptions.logToFile ? envLogOptions.file || libDirectory + "/.log" + process.pid.toString() : void 0;
|
|
187004
187206
|
const substitutedLogFileName = unsubstitutedLogFileName ? unsubstitutedLogFileName.replace("PID", process.pid.toString()) : void 0;
|
|
187005
187207
|
const logVerbosity = cmdLineVerbosity || envLogOptions.detailLevel;
|
|
187006
|
-
return new
|
|
187208
|
+
return new Logger7(substitutedLogFileName, envLogOptions.traceToConsole, logVerbosity);
|
|
187007
187209
|
}
|
|
187008
187210
|
function writeMessage(buf) {
|
|
187009
187211
|
if (!canWrite) {
|
|
@@ -187063,45 +187265,22 @@ function startNodeSession(options, logger, cancellationToken) {
|
|
|
187063
187265
|
output: process.stdout,
|
|
187064
187266
|
terminal: false
|
|
187065
187267
|
});
|
|
187066
|
-
const
|
|
187268
|
+
const _NodeTypingsInstallerAdapter = class _NodeTypingsInstallerAdapter extends TypingsInstallerAdapter {
|
|
187067
187269
|
constructor(telemetryEnabled2, logger2, host, globalTypingsCacheLocation, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, event) {
|
|
187068
|
-
|
|
187069
|
-
|
|
187070
|
-
|
|
187071
|
-
|
|
187270
|
+
super(
|
|
187271
|
+
telemetryEnabled2,
|
|
187272
|
+
logger2,
|
|
187273
|
+
host,
|
|
187274
|
+
globalTypingsCacheLocation,
|
|
187275
|
+
event,
|
|
187276
|
+
_NodeTypingsInstallerAdapter.maxActiveRequestCount
|
|
187277
|
+
);
|
|
187072
187278
|
this.typingSafeListLocation = typingSafeListLocation2;
|
|
187073
187279
|
this.typesMapLocation = typesMapLocation2;
|
|
187074
187280
|
this.npmLocation = npmLocation2;
|
|
187075
187281
|
this.validateDefaultNpmLocation = validateDefaultNpmLocation2;
|
|
187076
|
-
this.event = event;
|
|
187077
|
-
this.activeRequestCount = 0;
|
|
187078
|
-
this.requestQueue = createQueue();
|
|
187079
|
-
this.requestMap = /* @__PURE__ */ new Map();
|
|
187080
|
-
// Maps operation ID to newest requestQueue entry with that ID
|
|
187081
|
-
/** We will lazily request the types registry on the first call to `isKnownTypesPackageName` and store it in `typesRegistryCache`. */
|
|
187082
|
-
this.requestedRegistry = false;
|
|
187083
|
-
}
|
|
187084
|
-
isKnownTypesPackageName(name) {
|
|
187085
|
-
const validationResult = ts_JsTyping_exports.validatePackageName(name);
|
|
187086
|
-
if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {
|
|
187087
|
-
return false;
|
|
187088
|
-
}
|
|
187089
|
-
if (this.requestedRegistry) {
|
|
187090
|
-
return !!this.typesRegistryCache && this.typesRegistryCache.has(name);
|
|
187091
|
-
}
|
|
187092
|
-
this.requestedRegistry = true;
|
|
187093
|
-
this.send({ kind: "typesRegistry" });
|
|
187094
|
-
return false;
|
|
187095
187282
|
}
|
|
187096
|
-
|
|
187097
|
-
this.send({ kind: "installPackage", ...options2 });
|
|
187098
|
-
Debug.assert(this.packageInstalledPromise === void 0);
|
|
187099
|
-
return new Promise((resolve, reject) => {
|
|
187100
|
-
this.packageInstalledPromise = { resolve, reject };
|
|
187101
|
-
});
|
|
187102
|
-
}
|
|
187103
|
-
attach(projectService) {
|
|
187104
|
-
this.projectService = projectService;
|
|
187283
|
+
createInstallerProcess() {
|
|
187105
187284
|
if (this.logger.hasLevel(2 /* requestTime */)) {
|
|
187106
187285
|
this.logger.info("Binding...");
|
|
187107
187286
|
}
|
|
@@ -187140,135 +187319,7 @@ function startNodeSession(options, logger, cancellationToken) {
|
|
|
187140
187319
|
process.on("exit", () => {
|
|
187141
187320
|
this.installer.kill();
|
|
187142
187321
|
});
|
|
187143
|
-
|
|
187144
|
-
onProjectClosed(p) {
|
|
187145
|
-
this.send({ projectName: p.getProjectName(), kind: "closeProject" });
|
|
187146
|
-
}
|
|
187147
|
-
send(rq) {
|
|
187148
|
-
this.installer.send(rq);
|
|
187149
|
-
}
|
|
187150
|
-
enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports) {
|
|
187151
|
-
const request = createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
|
187152
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187153
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187154
|
-
this.logger.info(`Scheduling throttled operation:${stringifyIndented(request)}`);
|
|
187155
|
-
}
|
|
187156
|
-
}
|
|
187157
|
-
const operationId = project.getProjectName();
|
|
187158
|
-
const operation = () => {
|
|
187159
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187160
|
-
this.logger.info(`Sending request:${stringifyIndented(request)}`);
|
|
187161
|
-
}
|
|
187162
|
-
this.send(request);
|
|
187163
|
-
};
|
|
187164
|
-
const queuedRequest = { operationId, operation };
|
|
187165
|
-
if (this.activeRequestCount < _NodeTypingsInstaller.maxActiveRequestCount) {
|
|
187166
|
-
this.scheduleRequest(queuedRequest);
|
|
187167
|
-
} else {
|
|
187168
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187169
|
-
this.logger.info(`Deferring request for: ${operationId}`);
|
|
187170
|
-
}
|
|
187171
|
-
this.requestQueue.enqueue(queuedRequest);
|
|
187172
|
-
this.requestMap.set(operationId, queuedRequest);
|
|
187173
|
-
}
|
|
187174
|
-
}
|
|
187175
|
-
handleMessage(response) {
|
|
187176
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187177
|
-
this.logger.info(`Received response:${stringifyIndented(response)}`);
|
|
187178
|
-
}
|
|
187179
|
-
switch (response.kind) {
|
|
187180
|
-
case EventTypesRegistry:
|
|
187181
|
-
this.typesRegistryCache = new Map(Object.entries(response.typesRegistry));
|
|
187182
|
-
break;
|
|
187183
|
-
case ActionPackageInstalled: {
|
|
187184
|
-
const { success, message } = response;
|
|
187185
|
-
if (success) {
|
|
187186
|
-
this.packageInstalledPromise.resolve({ successMessage: message });
|
|
187187
|
-
} else {
|
|
187188
|
-
this.packageInstalledPromise.reject(message);
|
|
187189
|
-
}
|
|
187190
|
-
this.packageInstalledPromise = void 0;
|
|
187191
|
-
this.projectService.updateTypingsForProject(response);
|
|
187192
|
-
this.event(response, "setTypings");
|
|
187193
|
-
break;
|
|
187194
|
-
}
|
|
187195
|
-
case EventInitializationFailed: {
|
|
187196
|
-
const body = {
|
|
187197
|
-
message: response.message
|
|
187198
|
-
};
|
|
187199
|
-
const eventName = "typesInstallerInitializationFailed";
|
|
187200
|
-
this.event(body, eventName);
|
|
187201
|
-
break;
|
|
187202
|
-
}
|
|
187203
|
-
case EventBeginInstallTypes: {
|
|
187204
|
-
const body = {
|
|
187205
|
-
eventId: response.eventId,
|
|
187206
|
-
packages: response.packagesToInstall
|
|
187207
|
-
};
|
|
187208
|
-
const eventName = "beginInstallTypes";
|
|
187209
|
-
this.event(body, eventName);
|
|
187210
|
-
break;
|
|
187211
|
-
}
|
|
187212
|
-
case EventEndInstallTypes: {
|
|
187213
|
-
if (this.telemetryEnabled) {
|
|
187214
|
-
const body2 = {
|
|
187215
|
-
telemetryEventName: "typingsInstalled",
|
|
187216
|
-
payload: {
|
|
187217
|
-
installedPackages: response.packagesToInstall.join(","),
|
|
187218
|
-
installSuccess: response.installSuccess,
|
|
187219
|
-
typingsInstallerVersion: response.typingsInstallerVersion
|
|
187220
|
-
}
|
|
187221
|
-
};
|
|
187222
|
-
const eventName2 = "telemetry";
|
|
187223
|
-
this.event(body2, eventName2);
|
|
187224
|
-
}
|
|
187225
|
-
const body = {
|
|
187226
|
-
eventId: response.eventId,
|
|
187227
|
-
packages: response.packagesToInstall,
|
|
187228
|
-
success: response.installSuccess
|
|
187229
|
-
};
|
|
187230
|
-
const eventName = "endInstallTypes";
|
|
187231
|
-
this.event(body, eventName);
|
|
187232
|
-
break;
|
|
187233
|
-
}
|
|
187234
|
-
case ActionInvalidate: {
|
|
187235
|
-
this.projectService.updateTypingsForProject(response);
|
|
187236
|
-
break;
|
|
187237
|
-
}
|
|
187238
|
-
case ActionSet: {
|
|
187239
|
-
if (this.activeRequestCount > 0) {
|
|
187240
|
-
this.activeRequestCount--;
|
|
187241
|
-
} else {
|
|
187242
|
-
Debug.fail("Received too many responses");
|
|
187243
|
-
}
|
|
187244
|
-
while (!this.requestQueue.isEmpty()) {
|
|
187245
|
-
const queuedRequest = this.requestQueue.dequeue();
|
|
187246
|
-
if (this.requestMap.get(queuedRequest.operationId) === queuedRequest) {
|
|
187247
|
-
this.requestMap.delete(queuedRequest.operationId);
|
|
187248
|
-
this.scheduleRequest(queuedRequest);
|
|
187249
|
-
break;
|
|
187250
|
-
}
|
|
187251
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187252
|
-
this.logger.info(`Skipping defunct request for: ${queuedRequest.operationId}`);
|
|
187253
|
-
}
|
|
187254
|
-
}
|
|
187255
|
-
this.projectService.updateTypingsForProject(response);
|
|
187256
|
-
this.event(response, "setTypings");
|
|
187257
|
-
break;
|
|
187258
|
-
}
|
|
187259
|
-
case ActionWatchTypingLocations:
|
|
187260
|
-
this.projectService.watchTypingLocations(response);
|
|
187261
|
-
break;
|
|
187262
|
-
default:
|
|
187263
|
-
assertType(response);
|
|
187264
|
-
}
|
|
187265
|
-
}
|
|
187266
|
-
scheduleRequest(request) {
|
|
187267
|
-
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
187268
|
-
this.logger.info(`Scheduling request for: ${request.operationId}`);
|
|
187269
|
-
}
|
|
187270
|
-
this.activeRequestCount++;
|
|
187271
|
-
this.host.setTimeout(request.operation, _NodeTypingsInstaller.requestDelayMillis);
|
|
187322
|
+
return this.installer;
|
|
187272
187323
|
}
|
|
187273
187324
|
};
|
|
187274
187325
|
// This number is essentially arbitrary. Processing more than one typings request
|
|
@@ -187276,21 +187327,20 @@ function startNodeSession(options, logger, cancellationToken) {
|
|
|
187276
187327
|
// (see https://github.com/nodejs/node/issues/7657).
|
|
187277
187328
|
// It would be preferable to base our limit on the amount of space left in the
|
|
187278
187329
|
// buffer, but we have yet to find a way to retrieve that value.
|
|
187279
|
-
|
|
187280
|
-
|
|
187281
|
-
let NodeTypingsInstaller = _NodeTypingsInstaller;
|
|
187330
|
+
_NodeTypingsInstallerAdapter.maxActiveRequestCount = 10;
|
|
187331
|
+
let NodeTypingsInstallerAdapter = _NodeTypingsInstallerAdapter;
|
|
187282
187332
|
class IOSession extends Session3 {
|
|
187283
187333
|
constructor() {
|
|
187284
187334
|
const event = (body, eventName) => {
|
|
187285
187335
|
this.event(body, eventName);
|
|
187286
187336
|
};
|
|
187287
187337
|
const host = sys;
|
|
187288
|
-
const typingsInstaller = disableAutomaticTypingAcquisition ? void 0 : new
|
|
187338
|
+
const typingsInstaller = disableAutomaticTypingAcquisition ? void 0 : new NodeTypingsInstallerAdapter(telemetryEnabled, logger, host, getGlobalTypingsCacheLocation(), typingSafeListLocation, typesMapLocation, npmLocation, validateDefaultNpmLocation, event);
|
|
187289
187339
|
super({
|
|
187290
187340
|
host,
|
|
187291
187341
|
cancellationToken,
|
|
187292
187342
|
...options,
|
|
187293
|
-
typingsInstaller
|
|
187343
|
+
typingsInstaller,
|
|
187294
187344
|
byteLength: Buffer.byteLength,
|
|
187295
187345
|
hrtime: process.hrtime,
|
|
187296
187346
|
logger,
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20231115`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -172591,6 +172591,32 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
172591
172591
|
}
|
|
172592
172592
|
this.processCacheLocation(this.globalCachePath);
|
|
172593
172593
|
}
|
|
172594
|
+
/** @internal */
|
|
172595
|
+
handleRequest(req) {
|
|
172596
|
+
switch (req.kind) {
|
|
172597
|
+
case "discover":
|
|
172598
|
+
this.install(req);
|
|
172599
|
+
break;
|
|
172600
|
+
case "closeProject":
|
|
172601
|
+
this.closeProject(req);
|
|
172602
|
+
break;
|
|
172603
|
+
case "typesRegistry": {
|
|
172604
|
+
const typesRegistry = {};
|
|
172605
|
+
this.typesRegistry.forEach((value, key) => {
|
|
172606
|
+
typesRegistry[key] = value;
|
|
172607
|
+
});
|
|
172608
|
+
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
172609
|
+
this.sendResponse(response);
|
|
172610
|
+
break;
|
|
172611
|
+
}
|
|
172612
|
+
case "installPackage": {
|
|
172613
|
+
this.installPackage(req);
|
|
172614
|
+
break;
|
|
172615
|
+
}
|
|
172616
|
+
default:
|
|
172617
|
+
Debug.assertNever(req);
|
|
172618
|
+
}
|
|
172619
|
+
}
|
|
172594
172620
|
closeProject(req) {
|
|
172595
172621
|
this.closeWatchers(req.projectName);
|
|
172596
172622
|
}
|
|
@@ -173989,8 +174015,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
173989
174015
|
return !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : typings;
|
|
173990
174016
|
}
|
|
173991
174017
|
onProjectClosed(project) {
|
|
173992
|
-
this.perProjectCache.delete(project.getProjectName())
|
|
173993
|
-
|
|
174018
|
+
if (this.perProjectCache.delete(project.getProjectName())) {
|
|
174019
|
+
this.installer.onProjectClosed(project);
|
|
174020
|
+
}
|
|
173994
174021
|
}
|
|
173995
174022
|
};
|
|
173996
174023
|
}
|
|
@@ -183967,6 +183994,187 @@ ${e.message}`;
|
|
|
183967
183994
|
}
|
|
183968
183995
|
});
|
|
183969
183996
|
|
|
183997
|
+
// src/server/typingInstallerAdapter.ts
|
|
183998
|
+
var _TypingsInstallerAdapter, TypingsInstallerAdapter;
|
|
183999
|
+
var init_typingInstallerAdapter = __esm({
|
|
184000
|
+
"src/server/typingInstallerAdapter.ts"() {
|
|
184001
|
+
"use strict";
|
|
184002
|
+
init_ts7();
|
|
184003
|
+
init_ts_server3();
|
|
184004
|
+
_TypingsInstallerAdapter = class _TypingsInstallerAdapter {
|
|
184005
|
+
constructor(telemetryEnabled, logger, host, globalTypingsCacheLocation, event, maxActiveRequestCount) {
|
|
184006
|
+
this.telemetryEnabled = telemetryEnabled;
|
|
184007
|
+
this.logger = logger;
|
|
184008
|
+
this.host = host;
|
|
184009
|
+
this.globalTypingsCacheLocation = globalTypingsCacheLocation;
|
|
184010
|
+
this.event = event;
|
|
184011
|
+
this.maxActiveRequestCount = maxActiveRequestCount;
|
|
184012
|
+
this.activeRequestCount = 0;
|
|
184013
|
+
this.requestQueue = createQueue();
|
|
184014
|
+
this.requestMap = /* @__PURE__ */ new Map();
|
|
184015
|
+
// Maps project name to newest requestQueue entry for that project
|
|
184016
|
+
/** We will lazily request the types registry on the first call to `isKnownTypesPackageName` and store it in `typesRegistryCache`. */
|
|
184017
|
+
this.requestedRegistry = false;
|
|
184018
|
+
}
|
|
184019
|
+
isKnownTypesPackageName(name) {
|
|
184020
|
+
var _a;
|
|
184021
|
+
const validationResult = ts_JsTyping_exports.validatePackageName(name);
|
|
184022
|
+
if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {
|
|
184023
|
+
return false;
|
|
184024
|
+
}
|
|
184025
|
+
if (!this.requestedRegistry) {
|
|
184026
|
+
this.requestedRegistry = true;
|
|
184027
|
+
this.installer.send({ kind: "typesRegistry" });
|
|
184028
|
+
}
|
|
184029
|
+
return !!((_a = this.typesRegistryCache) == null ? void 0 : _a.has(name));
|
|
184030
|
+
}
|
|
184031
|
+
installPackage(options) {
|
|
184032
|
+
this.installer.send({ kind: "installPackage", ...options });
|
|
184033
|
+
Debug.assert(this.packageInstalledPromise === void 0);
|
|
184034
|
+
return new Promise((resolve, reject) => {
|
|
184035
|
+
this.packageInstalledPromise = { resolve, reject };
|
|
184036
|
+
});
|
|
184037
|
+
}
|
|
184038
|
+
attach(projectService) {
|
|
184039
|
+
this.projectService = projectService;
|
|
184040
|
+
this.installer = this.createInstallerProcess();
|
|
184041
|
+
}
|
|
184042
|
+
onProjectClosed(p) {
|
|
184043
|
+
this.installer.send({ projectName: p.getProjectName(), kind: "closeProject" });
|
|
184044
|
+
}
|
|
184045
|
+
enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports) {
|
|
184046
|
+
const request = createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
|
184047
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184048
|
+
this.logger.info(`TIAdapter:: Scheduling throttled operation:${stringifyIndented(request)}`);
|
|
184049
|
+
}
|
|
184050
|
+
if (this.activeRequestCount < this.maxActiveRequestCount) {
|
|
184051
|
+
this.scheduleRequest(request);
|
|
184052
|
+
} else {
|
|
184053
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184054
|
+
this.logger.info(`TIAdapter:: Deferring request for: ${request.projectName}`);
|
|
184055
|
+
}
|
|
184056
|
+
this.requestQueue.enqueue(request);
|
|
184057
|
+
this.requestMap.set(request.projectName, request);
|
|
184058
|
+
}
|
|
184059
|
+
}
|
|
184060
|
+
handleMessage(response) {
|
|
184061
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184062
|
+
this.logger.info(`TIAdapter:: Received response:${stringifyIndented(response)}`);
|
|
184063
|
+
}
|
|
184064
|
+
switch (response.kind) {
|
|
184065
|
+
case EventTypesRegistry:
|
|
184066
|
+
this.typesRegistryCache = new Map(Object.entries(response.typesRegistry));
|
|
184067
|
+
break;
|
|
184068
|
+
case ActionPackageInstalled: {
|
|
184069
|
+
const { success, message } = response;
|
|
184070
|
+
if (success) {
|
|
184071
|
+
this.packageInstalledPromise.resolve({ successMessage: message });
|
|
184072
|
+
} else {
|
|
184073
|
+
this.packageInstalledPromise.reject(message);
|
|
184074
|
+
}
|
|
184075
|
+
this.packageInstalledPromise = void 0;
|
|
184076
|
+
this.projectService.updateTypingsForProject(response);
|
|
184077
|
+
this.event(response, "setTypings");
|
|
184078
|
+
break;
|
|
184079
|
+
}
|
|
184080
|
+
case EventInitializationFailed: {
|
|
184081
|
+
const body = {
|
|
184082
|
+
message: response.message
|
|
184083
|
+
};
|
|
184084
|
+
const eventName = "typesInstallerInitializationFailed";
|
|
184085
|
+
this.event(body, eventName);
|
|
184086
|
+
break;
|
|
184087
|
+
}
|
|
184088
|
+
case EventBeginInstallTypes: {
|
|
184089
|
+
const body = {
|
|
184090
|
+
eventId: response.eventId,
|
|
184091
|
+
packages: response.packagesToInstall
|
|
184092
|
+
};
|
|
184093
|
+
const eventName = "beginInstallTypes";
|
|
184094
|
+
this.event(body, eventName);
|
|
184095
|
+
break;
|
|
184096
|
+
}
|
|
184097
|
+
case EventEndInstallTypes: {
|
|
184098
|
+
if (this.telemetryEnabled) {
|
|
184099
|
+
const body2 = {
|
|
184100
|
+
telemetryEventName: "typingsInstalled",
|
|
184101
|
+
payload: {
|
|
184102
|
+
installedPackages: response.packagesToInstall.join(","),
|
|
184103
|
+
installSuccess: response.installSuccess,
|
|
184104
|
+
typingsInstallerVersion: response.typingsInstallerVersion
|
|
184105
|
+
}
|
|
184106
|
+
};
|
|
184107
|
+
const eventName2 = "telemetry";
|
|
184108
|
+
this.event(body2, eventName2);
|
|
184109
|
+
}
|
|
184110
|
+
const body = {
|
|
184111
|
+
eventId: response.eventId,
|
|
184112
|
+
packages: response.packagesToInstall,
|
|
184113
|
+
success: response.installSuccess
|
|
184114
|
+
};
|
|
184115
|
+
const eventName = "endInstallTypes";
|
|
184116
|
+
this.event(body, eventName);
|
|
184117
|
+
break;
|
|
184118
|
+
}
|
|
184119
|
+
case ActionInvalidate: {
|
|
184120
|
+
this.projectService.updateTypingsForProject(response);
|
|
184121
|
+
break;
|
|
184122
|
+
}
|
|
184123
|
+
case ActionSet: {
|
|
184124
|
+
if (this.activeRequestCount > 0) {
|
|
184125
|
+
this.activeRequestCount--;
|
|
184126
|
+
} else {
|
|
184127
|
+
Debug.fail("TIAdapter:: Received too many responses");
|
|
184128
|
+
}
|
|
184129
|
+
while (!this.requestQueue.isEmpty()) {
|
|
184130
|
+
const queuedRequest = this.requestQueue.dequeue();
|
|
184131
|
+
if (this.requestMap.get(queuedRequest.projectName) === queuedRequest) {
|
|
184132
|
+
this.requestMap.delete(queuedRequest.projectName);
|
|
184133
|
+
this.scheduleRequest(queuedRequest);
|
|
184134
|
+
break;
|
|
184135
|
+
}
|
|
184136
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184137
|
+
this.logger.info(`TIAdapter:: Skipping defunct request for: ${queuedRequest.projectName}`);
|
|
184138
|
+
}
|
|
184139
|
+
}
|
|
184140
|
+
this.projectService.updateTypingsForProject(response);
|
|
184141
|
+
this.event(response, "setTypings");
|
|
184142
|
+
break;
|
|
184143
|
+
}
|
|
184144
|
+
case ActionWatchTypingLocations:
|
|
184145
|
+
this.projectService.watchTypingLocations(response);
|
|
184146
|
+
break;
|
|
184147
|
+
default:
|
|
184148
|
+
assertType(response);
|
|
184149
|
+
}
|
|
184150
|
+
}
|
|
184151
|
+
scheduleRequest(request) {
|
|
184152
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184153
|
+
this.logger.info(`TIAdapter:: Scheduling request for: ${request.projectName}`);
|
|
184154
|
+
}
|
|
184155
|
+
this.activeRequestCount++;
|
|
184156
|
+
this.host.setTimeout(
|
|
184157
|
+
() => {
|
|
184158
|
+
if (this.logger.hasLevel(3 /* verbose */)) {
|
|
184159
|
+
this.logger.info(`TIAdapter:: Sending request:${stringifyIndented(request)}`);
|
|
184160
|
+
}
|
|
184161
|
+
this.installer.send(request);
|
|
184162
|
+
},
|
|
184163
|
+
_TypingsInstallerAdapter.requestDelayMillis,
|
|
184164
|
+
`${request.projectName}::${request.kind}`
|
|
184165
|
+
);
|
|
184166
|
+
}
|
|
184167
|
+
};
|
|
184168
|
+
// This number is essentially arbitrary. Processing more than one typings request
|
|
184169
|
+
// at a time makes sense, but having too many in the pipe results in a hang
|
|
184170
|
+
// (see https://github.com/nodejs/node/issues/7657).
|
|
184171
|
+
// It would be preferable to base our limit on the amount of space left in the
|
|
184172
|
+
// buffer, but we have yet to find a way to retrieve that value.
|
|
184173
|
+
_TypingsInstallerAdapter.requestDelayMillis = 100;
|
|
184174
|
+
TypingsInstallerAdapter = _TypingsInstallerAdapter;
|
|
184175
|
+
}
|
|
184176
|
+
});
|
|
184177
|
+
|
|
183970
184178
|
// src/server/_namespaces/ts.server.ts
|
|
183971
184179
|
var ts_server_exports3 = {};
|
|
183972
184180
|
__export(ts_server_exports3, {
|
|
@@ -184014,6 +184222,7 @@ ${e.message}`;
|
|
|
184014
184222
|
TextStorage: () => TextStorage,
|
|
184015
184223
|
ThrottledOperations: () => ThrottledOperations,
|
|
184016
184224
|
TypingsCache: () => TypingsCache,
|
|
184225
|
+
TypingsInstallerAdapter: () => TypingsInstallerAdapter,
|
|
184017
184226
|
allFilesAreJsOrDts: () => allFilesAreJsOrDts,
|
|
184018
184227
|
allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,
|
|
184019
184228
|
asNormalizedPath: () => asNormalizedPath,
|
|
@@ -184082,6 +184291,7 @@ ${e.message}`;
|
|
|
184082
184291
|
init_packageJsonCache();
|
|
184083
184292
|
init_session();
|
|
184084
184293
|
init_scriptVersionCache();
|
|
184294
|
+
init_typingInstallerAdapter();
|
|
184085
184295
|
}
|
|
184086
184296
|
});
|
|
184087
184297
|
|
|
@@ -186436,6 +186646,7 @@ ${e.message}`;
|
|
|
186436
186646
|
TextStorage: () => TextStorage,
|
|
186437
186647
|
ThrottledOperations: () => ThrottledOperations,
|
|
186438
186648
|
TypingsCache: () => TypingsCache,
|
|
186649
|
+
TypingsInstallerAdapter: () => TypingsInstallerAdapter,
|
|
186439
186650
|
allFilesAreJsOrDts: () => allFilesAreJsOrDts,
|
|
186440
186651
|
allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts,
|
|
186441
186652
|
asNormalizedPath: () => asNormalizedPath,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231115`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -31850,6 +31850,32 @@ var TypingsInstaller = class {
|
|
|
31850
31850
|
}
|
|
31851
31851
|
this.processCacheLocation(this.globalCachePath);
|
|
31852
31852
|
}
|
|
31853
|
+
/** @internal */
|
|
31854
|
+
handleRequest(req) {
|
|
31855
|
+
switch (req.kind) {
|
|
31856
|
+
case "discover":
|
|
31857
|
+
this.install(req);
|
|
31858
|
+
break;
|
|
31859
|
+
case "closeProject":
|
|
31860
|
+
this.closeProject(req);
|
|
31861
|
+
break;
|
|
31862
|
+
case "typesRegistry": {
|
|
31863
|
+
const typesRegistry = {};
|
|
31864
|
+
this.typesRegistry.forEach((value, key) => {
|
|
31865
|
+
typesRegistry[key] = value;
|
|
31866
|
+
});
|
|
31867
|
+
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
31868
|
+
this.sendResponse(response);
|
|
31869
|
+
break;
|
|
31870
|
+
}
|
|
31871
|
+
case "installPackage": {
|
|
31872
|
+
this.installPackage(req);
|
|
31873
|
+
break;
|
|
31874
|
+
}
|
|
31875
|
+
default:
|
|
31876
|
+
Debug.assertNever(req);
|
|
31877
|
+
}
|
|
31878
|
+
}
|
|
31853
31879
|
closeProject(req) {
|
|
31854
31880
|
this.closeWatchers(req.projectName);
|
|
31855
31881
|
}
|
|
@@ -32267,29 +32293,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32267
32293
|
this.sendResponse(this.delayedInitializationError);
|
|
32268
32294
|
this.delayedInitializationError = void 0;
|
|
32269
32295
|
}
|
|
32270
|
-
|
|
32271
|
-
case "discover":
|
|
32272
|
-
this.install(req);
|
|
32273
|
-
break;
|
|
32274
|
-
case "closeProject":
|
|
32275
|
-
this.closeProject(req);
|
|
32276
|
-
break;
|
|
32277
|
-
case "typesRegistry": {
|
|
32278
|
-
const typesRegistry = {};
|
|
32279
|
-
this.typesRegistry.forEach((value, key) => {
|
|
32280
|
-
typesRegistry[key] = value;
|
|
32281
|
-
});
|
|
32282
|
-
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
32283
|
-
this.sendResponse(response);
|
|
32284
|
-
break;
|
|
32285
|
-
}
|
|
32286
|
-
case "installPackage": {
|
|
32287
|
-
this.installPackage(req);
|
|
32288
|
-
break;
|
|
32289
|
-
}
|
|
32290
|
-
default:
|
|
32291
|
-
Debug.assertNever(req);
|
|
32292
|
-
}
|
|
32296
|
+
super.handleRequest(req);
|
|
32293
32297
|
}
|
|
32294
32298
|
sendResponse(response) {
|
|
32295
32299
|
if (this.log.isEnabled()) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231115",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "e170bc59d4ba0d335ce86f66296bec71c5018317"
|
|
118
118
|
}
|