@mrclrchtr/supi-lsp 1.11.1 → 1.11.3
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/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/vscode-jsonrpc/README.md +2 -17
- package/node_modules/vscode-jsonrpc/eslint.config.js +12 -0
- package/node_modules/vscode-jsonrpc/lib/browser/main.js +10 -3
- package/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +11 -1
- package/node_modules/vscode-jsonrpc/lib/browser/ril.js +58 -4
- package/node_modules/vscode-jsonrpc/lib/common/api.d.ts +3 -3
- package/node_modules/vscode-jsonrpc/lib/common/api.js +10 -4
- package/node_modules/vscode-jsonrpc/lib/common/cancellation.js +41 -5
- package/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +76 -67
- package/node_modules/vscode-jsonrpc/lib/common/connection.js +217 -160
- package/node_modules/vscode-jsonrpc/lib/common/events.js +10 -3
- package/node_modules/vscode-jsonrpc/lib/common/is.js +7 -8
- package/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +3 -1
- package/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +17 -3
- package/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +5 -2
- package/node_modules/vscode-jsonrpc/lib/common/messageReader.js +52 -3
- package/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +45 -3
- package/node_modules/vscode-jsonrpc/lib/common/messages.js +147 -17
- package/node_modules/vscode-jsonrpc/lib/common/semaphore.js +8 -2
- package/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +4 -3
- package/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -5
- package/node_modules/vscode-jsonrpc/lib/node/main.js +56 -24
- package/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -1
- package/node_modules/vscode-jsonrpc/lib/node/ril.js +3 -1
- package/node_modules/vscode-jsonrpc/package.json +20 -11
- package/node_modules/vscode-jsonrpc/tsconfig.tsbuildinfo +1 -0
- package/node_modules/vscode-languageserver-protocol/README.md +3 -3
- package/node_modules/vscode-languageserver-protocol/eslint.config.js +13 -0
- package/node_modules/vscode-languageserver-protocol/lib/browser/main.js +1 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts +1 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/api.js +1 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts +13 -13
- package/node_modules/vscode-languageserver-protocol/lib/common/connection.js +1 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts +7 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/messages.js +38 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts +5 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +3 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts +5 -3
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +3 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts +2 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts +735 -361
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts +12 -3
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +37 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts +8 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +6 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts +34 -25
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +4 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts +15 -8
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +3 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts +3 -7
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +1 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts +7 -6
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +2 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +97 -9
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts +91 -63
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +34 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts +2 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts +44 -26
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +4 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts +4 -3
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.d.ts +93 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js +33 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +2 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts +3 -2
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +1 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts +3 -1
- package/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +2 -0
- package/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +9 -10
- package/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts +0 -1
- package/node_modules/vscode-languageserver-protocol/lib/node/main.js +1 -2
- package/node_modules/vscode-languageserver-protocol/metaModel.schema.json +84 -3
- package/node_modules/vscode-languageserver-protocol/package.json +21 -12
- package/node_modules/vscode-languageserver-types/README.md +1 -1
- package/node_modules/vscode-languageserver-types/eslint.config.js +13 -0
- package/node_modules/vscode-languageserver-types/lib/esm/main.d.ts +483 -107
- package/node_modules/vscode-languageserver-types/lib/esm/main.js +255 -62
- package/node_modules/vscode-languageserver-types/lib/umd/main.d.ts +483 -107
- package/node_modules/vscode-languageserver-types/lib/umd/main.js +201 -8
- package/node_modules/vscode-languageserver-types/package.json +9 -8
- package/package.json +4 -4
- package/src/config/types.ts +3 -0
- package/src/diagnostics/diagnostic-context.ts +2 -1
- package/src/diagnostics/diagnostic-display.ts +2 -1
- package/src/diagnostics/diagnostics.ts +2 -1
- package/src/diagnostics/stale-diagnostics.ts +3 -1
- package/src/diagnostics/suppression-diagnostics.ts +3 -1
- package/src/format.ts +30 -3
- package/src/ui/ui.ts +3 -1
- package/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
- package/node_modules/vscode-jsonrpc/browser.js +0 -7
- package/node_modules/vscode-jsonrpc/node.cmd +0 -5
- package/node_modules/vscode-jsonrpc/node.d.ts +0 -6
- package/node_modules/vscode-jsonrpc/node.js +0 -7
- package/node_modules/vscode-languageserver-protocol/browser.d.ts +0 -6
- package/node_modules/vscode-languageserver-protocol/browser.js +0 -7
- package/node_modules/vscode-languageserver-protocol/node.cmd +0 -5
- package/node_modules/vscode-languageserver-protocol/node.d.ts +0 -6
- package/node_modules/vscode-languageserver-protocol/node.js +0 -7
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt +0 -11
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md +0 -69
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +0 -7
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -76
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +0 -12
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -156
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts +0 -14
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js +0 -81
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -96
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +0 -358
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -1212
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -16
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js +0 -70
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts +0 -39
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +0 -128
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts +0 -7
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +0 -35
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -53
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -398
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -152
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -197
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -115
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -306
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -23
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -68
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -76
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -63
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js +0 -257
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -13
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js +0 -161
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd +0 -5
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts +0 -6
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js +0 -7
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json +0 -45
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt +0 -16
- package/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts +0 -5
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
6
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
10
|
exports.Semaphore = void 0;
|
|
8
|
-
const ral_1 = require("./ral");
|
|
11
|
+
const ral_1 = __importDefault(require("./ral"));
|
|
9
12
|
class Semaphore {
|
|
13
|
+
_capacity;
|
|
14
|
+
_active;
|
|
15
|
+
_waiting;
|
|
10
16
|
constructor(capacity = 1) {
|
|
11
17
|
if (capacity <= 0) {
|
|
12
18
|
throw new Error('Capacity must be greater than 0');
|
|
@@ -37,7 +43,7 @@ class Semaphore {
|
|
|
37
43
|
const next = this._waiting.shift();
|
|
38
44
|
this._active++;
|
|
39
45
|
if (this._active > this._capacity) {
|
|
40
|
-
throw new Error(`
|
|
46
|
+
throw new Error(`Too many thunks active`);
|
|
41
47
|
}
|
|
42
48
|
try {
|
|
43
49
|
const result = next.thunk();
|
|
@@ -12,6 +12,7 @@ var CancellationState;
|
|
|
12
12
|
CancellationState.Cancelled = 1;
|
|
13
13
|
})(CancellationState || (CancellationState = {}));
|
|
14
14
|
class SharedArraySenderStrategy {
|
|
15
|
+
buffers;
|
|
15
16
|
constructor() {
|
|
16
17
|
this.buffers = new Map();
|
|
17
18
|
}
|
|
@@ -42,6 +43,7 @@ class SharedArraySenderStrategy {
|
|
|
42
43
|
}
|
|
43
44
|
exports.SharedArraySenderStrategy = SharedArraySenderStrategy;
|
|
44
45
|
class SharedArrayBufferCancellationToken {
|
|
46
|
+
data;
|
|
45
47
|
constructor(buffer) {
|
|
46
48
|
this.data = new Int32Array(buffer, 0, 1);
|
|
47
49
|
}
|
|
@@ -53,6 +55,7 @@ class SharedArrayBufferCancellationToken {
|
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
class SharedArrayBufferCancellationTokenSource {
|
|
58
|
+
token;
|
|
56
59
|
constructor(buffer) {
|
|
57
60
|
this.token = new SharedArrayBufferCancellationToken(buffer);
|
|
58
61
|
}
|
|
@@ -62,9 +65,7 @@ class SharedArrayBufferCancellationTokenSource {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
class SharedArrayReceiverStrategy {
|
|
65
|
-
|
|
66
|
-
this.kind = 'request';
|
|
67
|
-
}
|
|
68
|
+
kind = 'request';
|
|
68
69
|
createCancellationTokenSource(request) {
|
|
69
70
|
const buffer = request.$cancellationData;
|
|
70
71
|
if (buffer === undefined) {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
1
|
import { ChildProcess } from 'child_process';
|
|
7
2
|
import { Socket } from 'net';
|
|
8
3
|
import { MessagePort, Worker } from 'worker_threads';
|
|
@@ -10,29 +10,62 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
13
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
37
|
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
16
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
42
|
+
exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;
|
|
43
|
+
exports.generateRandomPipeName = generateRandomPipeName;
|
|
44
|
+
exports.createClientPipeTransport = createClientPipeTransport;
|
|
45
|
+
exports.createServerPipeTransport = createServerPipeTransport;
|
|
46
|
+
exports.createClientSocketTransport = createClientSocketTransport;
|
|
47
|
+
exports.createServerSocketTransport = createServerSocketTransport;
|
|
48
|
+
exports.createMessageConnection = createMessageConnection;
|
|
18
49
|
/* --------------------------------------------------------------------------------------------
|
|
19
50
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20
51
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
21
52
|
* ----------------------------------------------------------------------------------------- */
|
|
22
|
-
const ril_1 = require("./ril");
|
|
53
|
+
const ril_1 = __importDefault(require("./ril"));
|
|
23
54
|
// Install the node runtime abstract.
|
|
24
55
|
ril_1.default.install();
|
|
25
|
-
const path = require("path");
|
|
26
|
-
const os = require("os");
|
|
56
|
+
const path = __importStar(require("path"));
|
|
57
|
+
const os = __importStar(require("os"));
|
|
58
|
+
const fs = __importStar(require("fs"));
|
|
27
59
|
const crypto_1 = require("crypto");
|
|
28
60
|
const net_1 = require("net");
|
|
29
61
|
const api_1 = require("../common/api");
|
|
30
62
|
__exportStar(require("../common/api"), exports);
|
|
31
63
|
class IPCMessageReader extends api_1.AbstractMessageReader {
|
|
64
|
+
process;
|
|
32
65
|
constructor(process) {
|
|
33
66
|
super();
|
|
34
67
|
this.process = process;
|
|
35
|
-
|
|
68
|
+
const eventEmitter = this.process;
|
|
36
69
|
eventEmitter.on('error', (error) => this.fireError(error));
|
|
37
70
|
eventEmitter.on('close', () => this.fireClose());
|
|
38
71
|
}
|
|
@@ -43,6 +76,8 @@ class IPCMessageReader extends api_1.AbstractMessageReader {
|
|
|
43
76
|
}
|
|
44
77
|
exports.IPCMessageReader = IPCMessageReader;
|
|
45
78
|
class IPCMessageWriter extends api_1.AbstractMessageWriter {
|
|
79
|
+
process;
|
|
80
|
+
errorCount;
|
|
46
81
|
constructor(process) {
|
|
47
82
|
super();
|
|
48
83
|
this.process = process;
|
|
@@ -80,6 +115,7 @@ class IPCMessageWriter extends api_1.AbstractMessageWriter {
|
|
|
80
115
|
}
|
|
81
116
|
exports.IPCMessageWriter = IPCMessageWriter;
|
|
82
117
|
class PortMessageReader extends api_1.AbstractMessageReader {
|
|
118
|
+
onData;
|
|
83
119
|
constructor(port) {
|
|
84
120
|
super();
|
|
85
121
|
this.onData = new api_1.Emitter;
|
|
@@ -95,6 +131,8 @@ class PortMessageReader extends api_1.AbstractMessageReader {
|
|
|
95
131
|
}
|
|
96
132
|
exports.PortMessageReader = PortMessageReader;
|
|
97
133
|
class PortMessageWriter extends api_1.AbstractMessageWriter {
|
|
134
|
+
port;
|
|
135
|
+
errorCount;
|
|
98
136
|
constructor(port) {
|
|
99
137
|
super();
|
|
100
138
|
this.port = port;
|
|
@@ -127,6 +165,7 @@ class SocketMessageReader extends api_1.ReadableStreamMessageReader {
|
|
|
127
165
|
}
|
|
128
166
|
exports.SocketMessageReader = SocketMessageReader;
|
|
129
167
|
class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
|
|
168
|
+
socket;
|
|
130
169
|
constructor(socket, options) {
|
|
131
170
|
super((0, ril_1.default)().stream.asWritableStream(socket), options);
|
|
132
171
|
this.socket = socket;
|
|
@@ -155,31 +194,29 @@ const safeIpcPathLengths = new Map([
|
|
|
155
194
|
['darwin', 103]
|
|
156
195
|
]);
|
|
157
196
|
function generateRandomPipeName() {
|
|
158
|
-
const randomSuffix = (0, crypto_1.randomBytes)(21).toString('hex');
|
|
159
197
|
if (process.platform === 'win32') {
|
|
160
|
-
return `\\\\.\\pipe\\
|
|
161
|
-
}
|
|
162
|
-
let result;
|
|
163
|
-
if (XDG_RUNTIME_DIR) {
|
|
164
|
-
result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
|
|
198
|
+
return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`;
|
|
168
199
|
}
|
|
200
|
+
let randomLength = 32;
|
|
201
|
+
const fixedLength = '/lsp-.sock'.length;
|
|
202
|
+
const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir());
|
|
169
203
|
const limit = safeIpcPathLengths.get(process.platform);
|
|
170
|
-
if (limit !== undefined
|
|
171
|
-
|
|
204
|
+
if (limit !== undefined) {
|
|
205
|
+
randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength);
|
|
206
|
+
}
|
|
207
|
+
if (randomLength < 16) {
|
|
208
|
+
throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`);
|
|
172
209
|
}
|
|
173
|
-
|
|
210
|
+
const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex');
|
|
211
|
+
return path.join(tmpDir, `lsp-${randomSuffix}.sock`);
|
|
174
212
|
}
|
|
175
|
-
exports.generateRandomPipeName = generateRandomPipeName;
|
|
176
213
|
function createClientPipeTransport(pipeName, encoding = 'utf-8') {
|
|
177
214
|
let connectResolve;
|
|
178
215
|
const connected = new Promise((resolve, _reject) => {
|
|
179
216
|
connectResolve = resolve;
|
|
180
217
|
});
|
|
181
218
|
return new Promise((resolve, reject) => {
|
|
182
|
-
|
|
219
|
+
const server = (0, net_1.createServer)((socket) => {
|
|
183
220
|
server.close();
|
|
184
221
|
connectResolve([
|
|
185
222
|
new SocketMessageReader(socket, encoding),
|
|
@@ -195,7 +232,6 @@ function createClientPipeTransport(pipeName, encoding = 'utf-8') {
|
|
|
195
232
|
});
|
|
196
233
|
});
|
|
197
234
|
}
|
|
198
|
-
exports.createClientPipeTransport = createClientPipeTransport;
|
|
199
235
|
function createServerPipeTransport(pipeName, encoding = 'utf-8') {
|
|
200
236
|
const socket = (0, net_1.createConnection)(pipeName);
|
|
201
237
|
return [
|
|
@@ -203,7 +239,6 @@ function createServerPipeTransport(pipeName, encoding = 'utf-8') {
|
|
|
203
239
|
new SocketMessageWriter(socket, encoding)
|
|
204
240
|
];
|
|
205
241
|
}
|
|
206
|
-
exports.createServerPipeTransport = createServerPipeTransport;
|
|
207
242
|
function createClientSocketTransport(port, encoding = 'utf-8') {
|
|
208
243
|
let connectResolve;
|
|
209
244
|
const connected = new Promise((resolve, _reject) => {
|
|
@@ -226,7 +261,6 @@ function createClientSocketTransport(port, encoding = 'utf-8') {
|
|
|
226
261
|
});
|
|
227
262
|
});
|
|
228
263
|
}
|
|
229
|
-
exports.createClientSocketTransport = createClientSocketTransport;
|
|
230
264
|
function createServerSocketTransport(port, encoding = 'utf-8') {
|
|
231
265
|
const socket = (0, net_1.createConnection)(port, '127.0.0.1');
|
|
232
266
|
return [
|
|
@@ -234,7 +268,6 @@ function createServerSocketTransport(port, encoding = 'utf-8') {
|
|
|
234
268
|
new SocketMessageWriter(socket, encoding)
|
|
235
269
|
];
|
|
236
270
|
}
|
|
237
|
-
exports.createServerSocketTransport = createServerSocketTransport;
|
|
238
271
|
function isReadableStream(value) {
|
|
239
272
|
const candidate = value;
|
|
240
273
|
return candidate.read !== undefined && candidate.addListener !== undefined;
|
|
@@ -254,4 +287,3 @@ function createMessageConnection(input, output, logger, options) {
|
|
|
254
287
|
}
|
|
255
288
|
return (0, api_1.createMessageConnection)(reader, writer, logger, options);
|
|
256
289
|
}
|
|
257
|
-
exports.createMessageConnection = createMessageConnection;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const util_1 = require("util");
|
|
8
8
|
const api_1 = require("../common/api");
|
|
9
9
|
class MessageBuffer extends api_1.AbstractMessageBuffer {
|
|
10
|
+
static emptyBuffer = Buffer.allocUnsafe(0);
|
|
10
11
|
constructor(encoding = 'utf-8') {
|
|
11
12
|
super(encoding);
|
|
12
13
|
}
|
|
@@ -36,8 +37,8 @@ class MessageBuffer extends api_1.AbstractMessageBuffer {
|
|
|
36
37
|
return Buffer.allocUnsafe(length);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0);
|
|
40
40
|
class ReadableStreamWrapper {
|
|
41
|
+
stream;
|
|
41
42
|
constructor(stream) {
|
|
42
43
|
this.stream = stream;
|
|
43
44
|
}
|
|
@@ -59,6 +60,7 @@ class ReadableStreamWrapper {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
class WritableStreamWrapper {
|
|
63
|
+
stream;
|
|
62
64
|
constructor(stream) {
|
|
63
65
|
this.stream = stream;
|
|
64
66
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-jsonrpc",
|
|
3
3
|
"description": "A json rpc implementation over streams",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.0",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -15,23 +15,32 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=14.0.0"
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./lib/common/api.d.ts",
|
|
21
|
+
"default": "./lib/common/api.js"
|
|
22
|
+
},
|
|
23
|
+
"./node": {
|
|
24
|
+
"types": "./lib/node/main.d.ts",
|
|
25
|
+
"node": "./lib/node/main.js"
|
|
26
|
+
},
|
|
27
|
+
"./browser": {
|
|
28
|
+
"types": "./lib/browser/main.d.ts",
|
|
29
|
+
"browser": "./lib/browser/main.js"
|
|
30
|
+
}
|
|
21
31
|
},
|
|
22
|
-
"typings": "./lib/common/api.d.ts",
|
|
23
32
|
"devDependencies": {
|
|
24
|
-
"@types/msgpack-lite": "^0.1.
|
|
33
|
+
"@types/msgpack-lite": "^0.1.12",
|
|
25
34
|
"msgpack-lite": "^0.1.26"
|
|
26
35
|
},
|
|
27
36
|
"scripts": {
|
|
28
37
|
"prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail",
|
|
29
38
|
"prepack": "npm run all:publish",
|
|
30
39
|
"preversion": "npm test",
|
|
31
|
-
"compile": "
|
|
32
|
-
"watch": "
|
|
33
|
-
"clean": "
|
|
34
|
-
"lint": "
|
|
40
|
+
"compile": "tsc -b ./tsconfig.json",
|
|
41
|
+
"watch": "tsc -b ./tsconfig.watch.json -w",
|
|
42
|
+
"clean": "rimraf lib && rimraf dist",
|
|
43
|
+
"lint": "eslint src",
|
|
35
44
|
"test": "npm run test:node && npm run test:browser",
|
|
36
45
|
"test:node": "node ../node_modules/mocha/bin/_mocha",
|
|
37
46
|
"test:browser": "npm run webpack:test:silent && node ../build/bin/runBrowserTests.js http://127.0.0.1:8080/jsonrpc/src/browser/test/",
|
|
@@ -39,7 +48,7 @@
|
|
|
39
48
|
"webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js",
|
|
40
49
|
"webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js",
|
|
41
50
|
"all": "npm run clean && npm run compile && npm run lint && npm run test",
|
|
42
|
-
"compile:publish": "
|
|
51
|
+
"compile:publish": "tsc -b ./tsconfig.publish.json",
|
|
43
52
|
"all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test"
|
|
44
53
|
}
|
|
45
54
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":[],"fileInfos":[],"root":[],"options":{"composite":true}},"version":"5.5.2"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# VSCode Language Server - Protocol Module
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/vscode-
|
|
4
|
-
[](https://npmjs.org/package/vscode-
|
|
5
|
-
[](https://npmjs.org/package/vscode-languageserver-protocol)
|
|
4
|
+
[](https://npmjs.org/package/vscode-languageserver-protocol)
|
|
5
|
+
[](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)
|
|
6
6
|
|
|
7
7
|
This npm module is a tool independent implementation of the language server protocol and can be used in any type of node application. Please note that the protocol is versioned using the LSP specification version number. Since the protocol depends on the `vscode-jsonrpc` version a a breaking change on that dependencies might not be reflected in a major version change of this module. Changing the major version number in these cases was more confusing this it would result in a version mismatch between the protocol and the LSP specification.
|
|
8
8
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { createConfig } = require('../eslint.config.base.js');
|
|
5
|
+
|
|
6
|
+
module.exports = createConfig(
|
|
7
|
+
['src/common/tsconfig.json', 'src/browser/tsconfig.json', 'src/browser/test/tsconfig.json', 'src/node/tsconfig.json', 'src/node/test/tsconfig.json'],
|
|
8
|
+
undefined,
|
|
9
|
+
{
|
|
10
|
+
'no-console': 'error',
|
|
11
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
12
|
+
}
|
|
13
|
+
);
|
|
@@ -18,11 +18,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.createProtocolConnection =
|
|
21
|
+
exports.createProtocolConnection = createProtocolConnection;
|
|
22
22
|
const browser_1 = require("vscode-jsonrpc/browser");
|
|
23
23
|
__exportStar(require("vscode-jsonrpc/browser"), exports);
|
|
24
24
|
__exportStar(require("../common/api"), exports);
|
|
25
25
|
function createProtocolConnection(reader, writer, logger, options) {
|
|
26
26
|
return (0, browser_1.createMessageConnection)(reader, writer, logger, options);
|
|
27
27
|
}
|
|
28
|
-
exports.createProtocolConnection = createProtocolConnection;
|
|
@@ -41,7 +41,7 @@ export declare namespace LSPErrorCodes {
|
|
|
41
41
|
*/
|
|
42
42
|
const ContentModified: integer;
|
|
43
43
|
/**
|
|
44
|
-
* The client has canceled a request and a server
|
|
44
|
+
* The client has canceled a request and a server has detected
|
|
45
45
|
* the cancel.
|
|
46
46
|
*/
|
|
47
47
|
const RequestCancelled: integer;
|
|
@@ -63,7 +63,7 @@ var LSPErrorCodes;
|
|
|
63
63
|
*/
|
|
64
64
|
LSPErrorCodes.ContentModified = -32801;
|
|
65
65
|
/**
|
|
66
|
-
* The client has canceled a request and a server
|
|
66
|
+
* The client has canceled a request and a server has detected
|
|
67
67
|
* the cancel.
|
|
68
68
|
*/
|
|
69
69
|
LSPErrorCodes.RequestCancelled = -32800;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-jsonrpc';
|
|
1
|
+
import { Message, NotificationMessage, CancellationToken, RequestHandler0, RequestHandler, GenericRequestHandler, NotificationHandler0, NotificationHandler, GenericNotificationHandler, ProgressType, Trace, Tracer, TraceOptions, Disposable, Event, MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, RequestType0, RequestType, NotificationType0, NotificationType, RequestParam } from 'vscode-jsonrpc';
|
|
2
2
|
import { ProtocolRequestType, ProtocolRequestType0, ProtocolNotificationType, ProtocolNotificationType0 } from './messages';
|
|
3
3
|
export interface ProtocolConnection {
|
|
4
4
|
/**
|
|
@@ -18,8 +18,8 @@ export interface ProtocolConnection {
|
|
|
18
18
|
* @param token An optional cancellation token.
|
|
19
19
|
* @returns A promise resolving to the request's result.
|
|
20
20
|
*/
|
|
21
|
-
sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P
|
|
22
|
-
sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P
|
|
21
|
+
sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: NoInfer<RequestParam<P>>, token?: CancellationToken): Promise<R>;
|
|
22
|
+
sendRequest<P, R, E>(type: RequestType<P, R, E>, params: NoInfer<RequestParam<P>>, token?: CancellationToken): Promise<R>;
|
|
23
23
|
/**
|
|
24
24
|
* Sends a request and returns a promise resolving to the result of the request.
|
|
25
25
|
*
|
|
@@ -44,8 +44,8 @@ export interface ProtocolConnection {
|
|
|
44
44
|
* @param handler The actual handler.
|
|
45
45
|
* @returns A disposable to remove the handler.
|
|
46
46
|
*/
|
|
47
|
-
onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: RequestHandler0<R, E
|
|
48
|
-
onRequest<R, E>(type: RequestType0<R, E>, handler: RequestHandler0<R, E
|
|
47
|
+
onRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, handler: NoInfer<RequestHandler0<R, E>>): Disposable;
|
|
48
|
+
onRequest<R, E>(type: RequestType0<R, E>, handler: NoInfer<RequestHandler0<R, E>>): Disposable;
|
|
49
49
|
/**
|
|
50
50
|
* Installs a request handler.
|
|
51
51
|
*
|
|
@@ -53,8 +53,8 @@ export interface ProtocolConnection {
|
|
|
53
53
|
* @param handler The actual handler.
|
|
54
54
|
* @returns A disposable to remove the handler.
|
|
55
55
|
*/
|
|
56
|
-
onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: RequestHandler<P, R, E
|
|
57
|
-
onRequest<P, R, E>(type: RequestType<P, R, E>, handler: RequestHandler<P, R, E
|
|
56
|
+
onRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, handler: NoInfer<RequestHandler<P, R, E>>): Disposable;
|
|
57
|
+
onRequest<P, R, E>(type: RequestType<P, R, E>, handler: NoInfer<RequestHandler<P, R, E>>): Disposable;
|
|
58
58
|
/**
|
|
59
59
|
* Installs a request handler.
|
|
60
60
|
*
|
|
@@ -85,8 +85,8 @@ export interface ProtocolConnection {
|
|
|
85
85
|
* @returns A promise that resolves when the notification is written to the
|
|
86
86
|
* network layer.
|
|
87
87
|
*/
|
|
88
|
-
sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: P): Promise<void>;
|
|
89
|
-
sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void>;
|
|
88
|
+
sendNotification<P, RO>(type: ProtocolNotificationType<P, RO>, params?: NoInfer<RequestParam<P>>): Promise<void>;
|
|
89
|
+
sendNotification<P>(type: NotificationType<P>, params?: NoInfer<RequestParam<P>>): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Sends a notification.
|
|
92
92
|
*
|
|
@@ -120,8 +120,8 @@ export interface ProtocolConnection {
|
|
|
120
120
|
* @param handler The actual handler.
|
|
121
121
|
* @returns A disposable to remove the handler.
|
|
122
122
|
*/
|
|
123
|
-
onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NotificationHandler<P
|
|
124
|
-
onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P
|
|
123
|
+
onNotification<P, RO>(type: ProtocolNotificationType<P, RO>, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
124
|
+
onNotification<P>(type: NotificationType<P>, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
125
125
|
/**
|
|
126
126
|
* Installs a notification handler.
|
|
127
127
|
*
|
|
@@ -137,7 +137,7 @@ export interface ProtocolConnection {
|
|
|
137
137
|
* @param handler the handler
|
|
138
138
|
* @returns A disposable to remove the handler.
|
|
139
139
|
*/
|
|
140
|
-
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NotificationHandler<P
|
|
140
|
+
onProgress<P>(type: ProgressType<P>, token: string | number, handler: NoInfer<NotificationHandler<P>>): Disposable;
|
|
141
141
|
/**
|
|
142
142
|
* Sends progress.
|
|
143
143
|
* @param type the progress type
|
|
@@ -146,7 +146,7 @@ export interface ProtocolConnection {
|
|
|
146
146
|
* @returns A promise that resolves when the progress is written to the
|
|
147
147
|
* network layer.
|
|
148
148
|
*/
|
|
149
|
-
sendProgress<P>(type: ProgressType<P>, token: string | number, value: P): Promise<void>;
|
|
149
|
+
sendProgress<P>(type: ProgressType<P>, token: string | number, value: NoInfer<RequestParam<P>>): Promise<void>;
|
|
150
150
|
/**
|
|
151
151
|
* Enables tracing mode for the connection.
|
|
152
152
|
* @returns A promise that resolves when the trace value is written to the
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.createProtocolConnection =
|
|
7
|
+
exports.createProtocolConnection = createProtocolConnection;
|
|
8
8
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
9
|
function createProtocolConnection(input, output, logger, options) {
|
|
10
10
|
if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
|
|
@@ -12,4 +12,3 @@ function createProtocolConnection(input, output, logger, options) {
|
|
|
12
12
|
}
|
|
13
13
|
return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);
|
|
14
14
|
}
|
|
15
|
-
exports.createProtocolConnection = createProtocolConnection;
|
|
@@ -49,3 +49,10 @@ export declare class ProtocolNotificationType<P, RO> extends NotificationType<P>
|
|
|
49
49
|
readonly ____: [RO, _EM] | undefined;
|
|
50
50
|
constructor(method: string);
|
|
51
51
|
}
|
|
52
|
+
export type CM<C extends string | undefined, S extends string | undefined> = {
|
|
53
|
+
client: C;
|
|
54
|
+
server: S;
|
|
55
|
+
};
|
|
56
|
+
export declare namespace CM {
|
|
57
|
+
function create<C extends string | undefined, S extends string | undefined>(client: C, server: S): CM<C, S>;
|
|
58
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
* ------------------------------------------------------------------------------------------ */
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0;
|
|
7
|
+
exports.CM = exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0;
|
|
8
8
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
9
9
|
var MessageDirection;
|
|
10
10
|
(function (MessageDirection) {
|
|
@@ -13,32 +13,69 @@ var MessageDirection;
|
|
|
13
13
|
MessageDirection["both"] = "both";
|
|
14
14
|
})(MessageDirection || (exports.MessageDirection = MessageDirection = {}));
|
|
15
15
|
class RegistrationType {
|
|
16
|
+
/**
|
|
17
|
+
* Clients must not use this property. It is here to ensure correct typing.
|
|
18
|
+
*/
|
|
19
|
+
____;
|
|
20
|
+
method;
|
|
16
21
|
constructor(method) {
|
|
17
22
|
this.method = method;
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
exports.RegistrationType = RegistrationType;
|
|
21
26
|
class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
|
|
27
|
+
/**
|
|
28
|
+
* Clients must not use these properties. They are here to ensure correct typing.
|
|
29
|
+
* in TypeScript
|
|
30
|
+
*/
|
|
31
|
+
__;
|
|
32
|
+
___;
|
|
33
|
+
____;
|
|
34
|
+
_pr;
|
|
22
35
|
constructor(method) {
|
|
23
36
|
super(method);
|
|
24
37
|
}
|
|
25
38
|
}
|
|
26
39
|
exports.ProtocolRequestType0 = ProtocolRequestType0;
|
|
27
40
|
class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
|
|
41
|
+
/**
|
|
42
|
+
* Clients must not use this property. It is here to ensure correct typing.
|
|
43
|
+
*/
|
|
44
|
+
__;
|
|
45
|
+
___;
|
|
46
|
+
____;
|
|
47
|
+
_pr;
|
|
28
48
|
constructor(method) {
|
|
29
49
|
super(method, vscode_jsonrpc_1.ParameterStructures.byName);
|
|
30
50
|
}
|
|
31
51
|
}
|
|
32
52
|
exports.ProtocolRequestType = ProtocolRequestType;
|
|
33
53
|
class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
|
|
54
|
+
/**
|
|
55
|
+
* Clients must not use this property. It is here to ensure correct typing.
|
|
56
|
+
*/
|
|
57
|
+
___;
|
|
58
|
+
____;
|
|
34
59
|
constructor(method) {
|
|
35
60
|
super(method);
|
|
36
61
|
}
|
|
37
62
|
}
|
|
38
63
|
exports.ProtocolNotificationType0 = ProtocolNotificationType0;
|
|
39
64
|
class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
|
|
65
|
+
/**
|
|
66
|
+
* Clients must not use this property. It is here to ensure correct typing.
|
|
67
|
+
*/
|
|
68
|
+
___;
|
|
69
|
+
____;
|
|
40
70
|
constructor(method) {
|
|
41
71
|
super(method, vscode_jsonrpc_1.ParameterStructures.byName);
|
|
42
72
|
}
|
|
43
73
|
}
|
|
44
74
|
exports.ProtocolNotificationType = ProtocolNotificationType;
|
|
75
|
+
var CM;
|
|
76
|
+
(function (CM) {
|
|
77
|
+
function create(client, server) {
|
|
78
|
+
return { client, server };
|
|
79
|
+
}
|
|
80
|
+
CM.create = create;
|
|
81
|
+
})(CM || (exports.CM = CM = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RequestHandler } from 'vscode-jsonrpc';
|
|
2
2
|
import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types';
|
|
3
|
-
import { MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
-
import type
|
|
3
|
+
import { CM, MessageDirection, ProtocolRequestType } from './messages';
|
|
4
|
+
import { type TextDocumentRegistrationOptions, type StaticRegistrationOptions, type TextDocumentPositionParams, type PartialResultParams, type WorkDoneProgressParams, type WorkDoneProgressOptions } from './protocol';
|
|
5
5
|
/**
|
|
6
6
|
* @since 3.16.0
|
|
7
7
|
*/
|
|
@@ -45,6 +45,7 @@ export declare namespace CallHierarchyPrepareRequest {
|
|
|
45
45
|
const messageDirection: MessageDirection;
|
|
46
46
|
const type: ProtocolRequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void, CallHierarchyRegistrationOptions>;
|
|
47
47
|
type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>;
|
|
48
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* The parameter of a `callHierarchy/incomingCalls` request.
|
|
@@ -64,6 +65,7 @@ export declare namespace CallHierarchyIncomingCallsRequest {
|
|
|
64
65
|
const messageDirection: MessageDirection;
|
|
65
66
|
const type: ProtocolRequestType<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void, void>;
|
|
66
67
|
type HandlerSignature = RequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void>;
|
|
68
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* The parameter of a `callHierarchy/outgoingCalls` request.
|
|
@@ -83,4 +85,5 @@ export declare namespace CallHierarchyOutgoingCallsRequest {
|
|
|
83
85
|
const messageDirection: MessageDirection;
|
|
84
86
|
const type: ProtocolRequestType<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void, void>;
|
|
85
87
|
type HandlerSignature = RequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void>;
|
|
88
|
+
const capabilities: CM<"textDocument.callHierarchy", "callHierarchyProvider">;
|
|
86
89
|
}
|
|
@@ -17,6 +17,7 @@ var CallHierarchyPrepareRequest;
|
|
|
17
17
|
CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
|
|
18
18
|
CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
19
19
|
CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
|
|
20
|
+
CallHierarchyPrepareRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
20
21
|
})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {}));
|
|
21
22
|
/**
|
|
22
23
|
* A request to resolve the incoming calls for a given `CallHierarchyItem`.
|
|
@@ -28,6 +29,7 @@ var CallHierarchyIncomingCallsRequest;
|
|
|
28
29
|
CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
|
|
29
30
|
CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
30
31
|
CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
|
|
32
|
+
CallHierarchyIncomingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
31
33
|
})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {}));
|
|
32
34
|
/**
|
|
33
35
|
* A request to resolve the outgoing calls for a given `CallHierarchyItem`.
|
|
@@ -39,4 +41,5 @@ var CallHierarchyOutgoingCallsRequest;
|
|
|
39
41
|
CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
|
|
40
42
|
CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
41
43
|
CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
|
|
44
|
+
CallHierarchyOutgoingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider');
|
|
42
45
|
})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {}));
|