@angular/language-server 13.2.3 → 13.2.6
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/index.js +18 -30
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -703,24 +703,14 @@ var require_notifications = __commonJS({
|
|
|
703
703
|
"dist/common/notifications.js"(exports2) {
|
|
704
704
|
"use strict";
|
|
705
705
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
706
|
-
exports2.SuggestStrictMode = exports2.ProjectLanguageService = exports2.ProjectLoadingFinish = exports2.ProjectLoadingStart = void 0;
|
|
706
|
+
exports2.OpenOutputChannel = exports2.NgccProgressEnd = exports2.SuggestStrictMode = exports2.ProjectLanguageService = exports2.ProjectLoadingFinish = exports2.ProjectLoadingStart = void 0;
|
|
707
707
|
var vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
708
708
|
exports2.ProjectLoadingStart = new vscode_jsonrpc_1.NotificationType0("angular/projectLoadingStart");
|
|
709
709
|
exports2.ProjectLoadingFinish = new vscode_jsonrpc_1.NotificationType0("angular/projectLoadingFinish");
|
|
710
710
|
exports2.ProjectLanguageService = new vscode_jsonrpc_1.NotificationType("angular/projectLanguageService");
|
|
711
711
|
exports2.SuggestStrictMode = new vscode_jsonrpc_1.NotificationType("angular/suggestStrictMode");
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
// dist/common/progress.js
|
|
716
|
-
var require_progress = __commonJS({
|
|
717
|
-
"dist/common/progress.js"(exports2) {
|
|
718
|
-
"use strict";
|
|
719
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
720
|
-
exports2.NgccProgressType = exports2.NgccProgressToken = void 0;
|
|
721
|
-
var vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
722
|
-
exports2.NgccProgressToken = "ngcc";
|
|
723
|
-
exports2.NgccProgressType = new vscode_jsonrpc_1.ProgressType();
|
|
712
|
+
exports2.NgccProgressEnd = new vscode_jsonrpc_1.NotificationType("angular/NgccProgressEnd");
|
|
713
|
+
exports2.OpenOutputChannel = new vscode_jsonrpc_1.NotificationType("angular/OpenOutputChannel");
|
|
724
714
|
}
|
|
725
715
|
});
|
|
726
716
|
|
|
@@ -3709,7 +3699,6 @@ var require_session = __commonJS({
|
|
|
3709
3699
|
var util_1 = require("util");
|
|
3710
3700
|
var lsp = __importStar(require("vscode-languageserver/node"));
|
|
3711
3701
|
var notifications_1 = require_notifications();
|
|
3712
|
-
var progress_1 = require_progress();
|
|
3713
3702
|
var requests_1 = require_requests();
|
|
3714
3703
|
var completion_1 = require_completion();
|
|
3715
3704
|
var diagnostic_1 = require_diagnostic();
|
|
@@ -3722,6 +3711,10 @@ var require_session = __commonJS({
|
|
|
3722
3711
|
})(LanguageId || (LanguageId = {}));
|
|
3723
3712
|
var EMPTY_RANGE = lsp.Range.create(0, 0, 0, 0);
|
|
3724
3713
|
var setImmediateP = (0, util_1.promisify)(setImmediate);
|
|
3714
|
+
var NgccErrorMessageAction;
|
|
3715
|
+
(function(NgccErrorMessageAction2) {
|
|
3716
|
+
NgccErrorMessageAction2[NgccErrorMessageAction2["showOutput"] = 0] = "showOutput";
|
|
3717
|
+
})(NgccErrorMessageAction || (NgccErrorMessageAction = {}));
|
|
3725
3718
|
var Session = class {
|
|
3726
3719
|
constructor(options) {
|
|
3727
3720
|
this.configuredProjToExternalProj = /* @__PURE__ */ new Map();
|
|
@@ -4534,37 +4527,32 @@ var require_session = __commonJS({
|
|
|
4534
4527
|
}
|
|
4535
4528
|
this.disableLanguageServiceForProject(project, "ngcc is running");
|
|
4536
4529
|
const configFilePath = project.getConfigFilePath();
|
|
4537
|
-
this.connection.
|
|
4538
|
-
|
|
4539
|
-
configFilePath,
|
|
4540
|
-
message: `Running ngcc for ${configFilePath}`
|
|
4541
|
-
});
|
|
4542
|
-
let success = false;
|
|
4530
|
+
const progressReporter = await this.connection.window.createWorkDoneProgress();
|
|
4531
|
+
progressReporter.begin("Angular", void 0, `Running ngcc for ${configFilePath}`);
|
|
4543
4532
|
try {
|
|
4544
4533
|
this.projectNgccQueue.push({ project, done: false });
|
|
4545
4534
|
await (0, ngcc_1.resolveAndRunNgcc)(configFilePath, {
|
|
4546
4535
|
report: (msg) => {
|
|
4547
|
-
|
|
4548
|
-
done: false,
|
|
4549
|
-
configFilePath,
|
|
4550
|
-
message: msg
|
|
4551
|
-
});
|
|
4536
|
+
progressReporter.report(msg);
|
|
4552
4537
|
}
|
|
4553
4538
|
});
|
|
4554
|
-
success = true;
|
|
4555
4539
|
} catch (e) {
|
|
4556
4540
|
this.error(`Failed to run ngcc for ${configFilePath}, language service may not operate correctly:
|
|
4557
4541
|
${e.message}`);
|
|
4542
|
+
this.connection.window.showErrorMessage(`Angular extension might not work correctly because ngcc operation failed. Try to invoke ngcc manually by running 'npm/yarn run ngcc'. Please see the extension output for more information.`, { title: "Show output", action: NgccErrorMessageAction.showOutput }).then((selection) => {
|
|
4543
|
+
if ((selection === null || selection === void 0 ? void 0 : selection.action) === NgccErrorMessageAction.showOutput) {
|
|
4544
|
+
this.connection.sendNotification(notifications_1.OpenOutputChannel, {});
|
|
4545
|
+
}
|
|
4546
|
+
});
|
|
4558
4547
|
} finally {
|
|
4559
4548
|
const loadingStatus = this.projectNgccQueue.find((p) => p.project === project);
|
|
4560
4549
|
if (loadingStatus !== void 0) {
|
|
4561
4550
|
loadingStatus.done = true;
|
|
4562
4551
|
}
|
|
4563
|
-
this.connection.
|
|
4564
|
-
|
|
4565
|
-
configFilePath,
|
|
4566
|
-
success
|
|
4552
|
+
this.connection.sendNotification(notifications_1.NgccProgressEnd, {
|
|
4553
|
+
configFilePath
|
|
4567
4554
|
});
|
|
4555
|
+
progressReporter.done();
|
|
4568
4556
|
}
|
|
4569
4557
|
for (let i = 0; i < this.projectNgccQueue.length && this.projectNgccQueue[i].done; i++) {
|
|
4570
4558
|
this.enableLanguageServiceForProject(this.projectNgccQueue[i].project);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/language-server",
|
|
3
3
|
"description": "LSP server for Angular Language Service",
|
|
4
|
-
"version": "13.2.
|
|
4
|
+
"version": "13.2.6",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/angular/vscode-ng-language-service.git"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"ngserver": "./bin/ngserver"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@angular/language-service": "13.2.
|
|
18
|
+
"@angular/language-service": "13.2.6",
|
|
19
19
|
"vscode-jsonrpc": "6.0.0",
|
|
20
20
|
"vscode-languageserver": "7.0.0",
|
|
21
21
|
"vscode-uri": "3.0.3"
|