@angular/language-server 13.2.4 → 13.3.0
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 +95 -63
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -74,9 +74,13 @@ var require_resolver = __commonJS({
|
|
|
74
74
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
75
75
|
if (k2 === void 0)
|
|
76
76
|
k2 = k;
|
|
77
|
-
Object.
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
78
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
79
|
+
desc = { enumerable: true, get: function() {
|
|
80
|
+
return m[k];
|
|
81
|
+
} };
|
|
82
|
+
}
|
|
83
|
+
Object.defineProperty(o, k2, desc);
|
|
80
84
|
} : function(o, m, k, k2) {
|
|
81
85
|
if (k2 === void 0)
|
|
82
86
|
k2 = k;
|
|
@@ -171,9 +175,13 @@ var require_version_provider = __commonJS({
|
|
|
171
175
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
172
176
|
if (k2 === void 0)
|
|
173
177
|
k2 = k;
|
|
174
|
-
Object.
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
179
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
180
|
+
desc = { enumerable: true, get: function() {
|
|
181
|
+
return m[k];
|
|
182
|
+
} };
|
|
183
|
+
}
|
|
184
|
+
Object.defineProperty(o, k2, desc);
|
|
177
185
|
} : function(o, m, k, k2) {
|
|
178
186
|
if (k2 === void 0)
|
|
179
187
|
k2 = k;
|
|
@@ -385,9 +393,13 @@ var require_logger = __commonJS({
|
|
|
385
393
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
386
394
|
if (k2 === void 0)
|
|
387
395
|
k2 = k;
|
|
388
|
-
Object.
|
|
389
|
-
|
|
390
|
-
|
|
396
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
397
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
398
|
+
desc = { enumerable: true, get: function() {
|
|
399
|
+
return m[k];
|
|
400
|
+
} };
|
|
401
|
+
}
|
|
402
|
+
Object.defineProperty(o, k2, desc);
|
|
391
403
|
} : function(o, m, k, k2) {
|
|
392
404
|
if (k2 === void 0)
|
|
393
405
|
k2 = k;
|
|
@@ -513,9 +525,13 @@ var require_server_host = __commonJS({
|
|
|
513
525
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
514
526
|
if (k2 === void 0)
|
|
515
527
|
k2 = k;
|
|
516
|
-
Object.
|
|
517
|
-
|
|
518
|
-
|
|
528
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
529
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
530
|
+
desc = { enumerable: true, get: function() {
|
|
531
|
+
return m[k];
|
|
532
|
+
} };
|
|
533
|
+
}
|
|
534
|
+
Object.defineProperty(o, k2, desc);
|
|
519
535
|
} : function(o, m, k, k2) {
|
|
520
536
|
if (k2 === void 0)
|
|
521
537
|
k2 = k;
|
|
@@ -703,24 +719,14 @@ var require_notifications = __commonJS({
|
|
|
703
719
|
"dist/common/notifications.js"(exports2) {
|
|
704
720
|
"use strict";
|
|
705
721
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
706
|
-
exports2.SuggestStrictMode = exports2.ProjectLanguageService = exports2.ProjectLoadingFinish = exports2.ProjectLoadingStart = void 0;
|
|
722
|
+
exports2.OpenOutputChannel = exports2.NgccProgressEnd = exports2.SuggestStrictMode = exports2.ProjectLanguageService = exports2.ProjectLoadingFinish = exports2.ProjectLoadingStart = void 0;
|
|
707
723
|
var vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
708
724
|
exports2.ProjectLoadingStart = new vscode_jsonrpc_1.NotificationType0("angular/projectLoadingStart");
|
|
709
725
|
exports2.ProjectLoadingFinish = new vscode_jsonrpc_1.NotificationType0("angular/projectLoadingFinish");
|
|
710
726
|
exports2.ProjectLanguageService = new vscode_jsonrpc_1.NotificationType("angular/projectLanguageService");
|
|
711
727
|
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();
|
|
728
|
+
exports2.NgccProgressEnd = new vscode_jsonrpc_1.NotificationType("angular/NgccProgressEnd");
|
|
729
|
+
exports2.OpenOutputChannel = new vscode_jsonrpc_1.NotificationType("angular/OpenOutputChannel");
|
|
724
730
|
}
|
|
725
731
|
});
|
|
726
732
|
|
|
@@ -3016,9 +3022,13 @@ var require_requests = __commonJS({
|
|
|
3016
3022
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3017
3023
|
if (k2 === void 0)
|
|
3018
3024
|
k2 = k;
|
|
3019
|
-
Object.
|
|
3020
|
-
|
|
3021
|
-
|
|
3025
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3026
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3027
|
+
desc = { enumerable: true, get: function() {
|
|
3028
|
+
return m[k];
|
|
3029
|
+
} };
|
|
3030
|
+
}
|
|
3031
|
+
Object.defineProperty(o, k2, desc);
|
|
3022
3032
|
} : function(o, m, k, k2) {
|
|
3023
3033
|
if (k2 === void 0)
|
|
3024
3034
|
k2 = k;
|
|
@@ -3058,9 +3068,13 @@ var require_utils = __commonJS({
|
|
|
3058
3068
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3059
3069
|
if (k2 === void 0)
|
|
3060
3070
|
k2 = k;
|
|
3061
|
-
Object.
|
|
3062
|
-
|
|
3063
|
-
|
|
3071
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3072
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3073
|
+
desc = { enumerable: true, get: function() {
|
|
3074
|
+
return m[k];
|
|
3075
|
+
} };
|
|
3076
|
+
}
|
|
3077
|
+
Object.defineProperty(o, k2, desc);
|
|
3064
3078
|
} : function(o, m, k, k2) {
|
|
3065
3079
|
if (k2 === void 0)
|
|
3066
3080
|
k2 = k;
|
|
@@ -3212,9 +3226,13 @@ var require_completion = __commonJS({
|
|
|
3212
3226
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3213
3227
|
if (k2 === void 0)
|
|
3214
3228
|
k2 = k;
|
|
3215
|
-
Object.
|
|
3216
|
-
|
|
3217
|
-
|
|
3229
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3230
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3231
|
+
desc = { enumerable: true, get: function() {
|
|
3232
|
+
return m[k];
|
|
3233
|
+
} };
|
|
3234
|
+
}
|
|
3235
|
+
Object.defineProperty(o, k2, desc);
|
|
3218
3236
|
} : function(o, m, k, k2) {
|
|
3219
3237
|
if (k2 === void 0)
|
|
3220
3238
|
k2 = k;
|
|
@@ -3340,9 +3358,13 @@ var require_diagnostic = __commonJS({
|
|
|
3340
3358
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3341
3359
|
if (k2 === void 0)
|
|
3342
3360
|
k2 = k;
|
|
3343
|
-
Object.
|
|
3344
|
-
|
|
3345
|
-
|
|
3361
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3362
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3363
|
+
desc = { enumerable: true, get: function() {
|
|
3364
|
+
return m[k];
|
|
3365
|
+
} };
|
|
3366
|
+
}
|
|
3367
|
+
Object.defineProperty(o, k2, desc);
|
|
3346
3368
|
} : function(o, m, k, k2) {
|
|
3347
3369
|
if (k2 === void 0)
|
|
3348
3370
|
k2 = k;
|
|
@@ -3401,9 +3423,13 @@ var require_resolver = __commonJS({
|
|
|
3401
3423
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3402
3424
|
if (k2 === void 0)
|
|
3403
3425
|
k2 = k;
|
|
3404
|
-
Object.
|
|
3405
|
-
|
|
3406
|
-
|
|
3426
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3427
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3428
|
+
desc = { enumerable: true, get: function() {
|
|
3429
|
+
return m[k];
|
|
3430
|
+
} };
|
|
3431
|
+
}
|
|
3432
|
+
Object.defineProperty(o, k2, desc);
|
|
3407
3433
|
} : function(o, m, k, k2) {
|
|
3408
3434
|
if (k2 === void 0)
|
|
3409
3435
|
k2 = k;
|
|
@@ -3498,9 +3524,13 @@ var require_version_provider = __commonJS({
|
|
|
3498
3524
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3499
3525
|
if (k2 === void 0)
|
|
3500
3526
|
k2 = k;
|
|
3501
|
-
Object.
|
|
3502
|
-
|
|
3503
|
-
|
|
3527
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3528
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3529
|
+
desc = { enumerable: true, get: function() {
|
|
3530
|
+
return m[k];
|
|
3531
|
+
} };
|
|
3532
|
+
}
|
|
3533
|
+
Object.defineProperty(o, k2, desc);
|
|
3504
3534
|
} : function(o, m, k, k2) {
|
|
3505
3535
|
if (k2 === void 0)
|
|
3506
3536
|
k2 = k;
|
|
@@ -3677,9 +3707,13 @@ var require_session = __commonJS({
|
|
|
3677
3707
|
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3678
3708
|
if (k2 === void 0)
|
|
3679
3709
|
k2 = k;
|
|
3680
|
-
Object.
|
|
3681
|
-
|
|
3682
|
-
|
|
3710
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3711
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3712
|
+
desc = { enumerable: true, get: function() {
|
|
3713
|
+
return m[k];
|
|
3714
|
+
} };
|
|
3715
|
+
}
|
|
3716
|
+
Object.defineProperty(o, k2, desc);
|
|
3683
3717
|
} : function(o, m, k, k2) {
|
|
3684
3718
|
if (k2 === void 0)
|
|
3685
3719
|
k2 = k;
|
|
@@ -3709,7 +3743,6 @@ var require_session = __commonJS({
|
|
|
3709
3743
|
var util_1 = require("util");
|
|
3710
3744
|
var lsp = __importStar(require("vscode-languageserver/node"));
|
|
3711
3745
|
var notifications_1 = require_notifications();
|
|
3712
|
-
var progress_1 = require_progress();
|
|
3713
3746
|
var requests_1 = require_requests();
|
|
3714
3747
|
var completion_1 = require_completion();
|
|
3715
3748
|
var diagnostic_1 = require_diagnostic();
|
|
@@ -3722,6 +3755,10 @@ var require_session = __commonJS({
|
|
|
3722
3755
|
})(LanguageId || (LanguageId = {}));
|
|
3723
3756
|
var EMPTY_RANGE = lsp.Range.create(0, 0, 0, 0);
|
|
3724
3757
|
var setImmediateP = (0, util_1.promisify)(setImmediate);
|
|
3758
|
+
var NgccErrorMessageAction;
|
|
3759
|
+
(function(NgccErrorMessageAction2) {
|
|
3760
|
+
NgccErrorMessageAction2[NgccErrorMessageAction2["showOutput"] = 0] = "showOutput";
|
|
3761
|
+
})(NgccErrorMessageAction || (NgccErrorMessageAction = {}));
|
|
3725
3762
|
var Session = class {
|
|
3726
3763
|
constructor(options) {
|
|
3727
3764
|
this.configuredProjToExternalProj = /* @__PURE__ */ new Map();
|
|
@@ -4534,37 +4571,32 @@ var require_session = __commonJS({
|
|
|
4534
4571
|
}
|
|
4535
4572
|
this.disableLanguageServiceForProject(project, "ngcc is running");
|
|
4536
4573
|
const configFilePath = project.getConfigFilePath();
|
|
4537
|
-
this.connection.
|
|
4538
|
-
|
|
4539
|
-
configFilePath,
|
|
4540
|
-
message: `Running ngcc for ${configFilePath}`
|
|
4541
|
-
});
|
|
4542
|
-
let success = false;
|
|
4574
|
+
const progressReporter = await this.connection.window.createWorkDoneProgress();
|
|
4575
|
+
progressReporter.begin("Angular", void 0, `Running ngcc for ${configFilePath}`);
|
|
4543
4576
|
try {
|
|
4544
4577
|
this.projectNgccQueue.push({ project, done: false });
|
|
4545
4578
|
await (0, ngcc_1.resolveAndRunNgcc)(configFilePath, {
|
|
4546
4579
|
report: (msg) => {
|
|
4547
|
-
|
|
4548
|
-
done: false,
|
|
4549
|
-
configFilePath,
|
|
4550
|
-
message: msg
|
|
4551
|
-
});
|
|
4580
|
+
progressReporter.report(msg);
|
|
4552
4581
|
}
|
|
4553
4582
|
});
|
|
4554
|
-
success = true;
|
|
4555
4583
|
} catch (e) {
|
|
4556
4584
|
this.error(`Failed to run ngcc for ${configFilePath}, language service may not operate correctly:
|
|
4557
4585
|
${e.message}`);
|
|
4586
|
+
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) => {
|
|
4587
|
+
if ((selection === null || selection === void 0 ? void 0 : selection.action) === NgccErrorMessageAction.showOutput) {
|
|
4588
|
+
this.connection.sendNotification(notifications_1.OpenOutputChannel, {});
|
|
4589
|
+
}
|
|
4590
|
+
});
|
|
4558
4591
|
} finally {
|
|
4559
4592
|
const loadingStatus = this.projectNgccQueue.find((p) => p.project === project);
|
|
4560
4593
|
if (loadingStatus !== void 0) {
|
|
4561
4594
|
loadingStatus.done = true;
|
|
4562
4595
|
}
|
|
4563
|
-
this.connection.
|
|
4564
|
-
|
|
4565
|
-
configFilePath,
|
|
4566
|
-
success
|
|
4596
|
+
this.connection.sendNotification(notifications_1.NgccProgressEnd, {
|
|
4597
|
+
configFilePath
|
|
4567
4598
|
});
|
|
4599
|
+
progressReporter.done();
|
|
4568
4600
|
}
|
|
4569
4601
|
for (let i = 0; i < this.projectNgccQueue.length && this.projectNgccQueue[i].done; i++) {
|
|
4570
4602
|
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.
|
|
4
|
+
"version": "13.3.0",
|
|
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.
|
|
18
|
+
"@angular/language-service": "13.3.0",
|
|
19
19
|
"vscode-jsonrpc": "6.0.0",
|
|
20
20
|
"vscode-languageserver": "7.0.0",
|
|
21
21
|
"vscode-uri": "3.0.3"
|