@depup/vscode-languageserver-protocol 3.18.3-depup.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/License.txt +11 -0
- package/README.md +25 -0
- package/changes.json +5 -0
- package/eslint.config.js +13 -0
- package/lib/browser/main.d.ts +4 -0
- package/lib/browser/main.js +27 -0
- package/lib/common/api.d.ts +58 -0
- package/lib/common/api.js +77 -0
- package/lib/common/connection.d.ts +187 -0
- package/lib/common/connection.js +14 -0
- package/lib/common/messages.d.ts +58 -0
- package/lib/common/messages.js +81 -0
- package/lib/common/protocol.$.d.ts +1 -0
- package/lib/common/protocol.$.js +43 -0
- package/lib/common/protocol.callHierarchy.d.ts +89 -0
- package/lib/common/protocol.callHierarchy.js +45 -0
- package/lib/common/protocol.colorProvider.d.ts +68 -0
- package/lib/common/protocol.colorProvider.js +34 -0
- package/lib/common/protocol.configuration.d.ts +36 -0
- package/lib/common/protocol.configuration.js +25 -0
- package/lib/common/protocol.d.ts +3626 -0
- package/lib/common/protocol.declaration.d.ts +38 -0
- package/lib/common/protocol.declaration.js +23 -0
- package/lib/common/protocol.diagnostic.d.ts +369 -0
- package/lib/common/protocol.diagnostic.js +111 -0
- package/lib/common/protocol.fileOperations.d.ts +312 -0
- package/lib/common/protocol.fileOperations.js +107 -0
- package/lib/common/protocol.foldingRange.d.ts +118 -0
- package/lib/common/protocol.foldingRange.js +33 -0
- package/lib/common/protocol.implementation.d.ts +39 -0
- package/lib/common/protocol.implementation.js +22 -0
- package/lib/common/protocol.inlayHint.d.ts +117 -0
- package/lib/common/protocol.inlayHint.js +46 -0
- package/lib/common/protocol.inlineCompletion.d.ts +53 -0
- package/lib/common/protocol.inlineCompletion.js +22 -0
- package/lib/common/protocol.inlineValue.d.ts +88 -0
- package/lib/common/protocol.inlineValue.js +32 -0
- package/lib/common/protocol.js +1031 -0
- package/lib/common/protocol.linkedEditingRange.d.ts +53 -0
- package/lib/common/protocol.linkedEditingRange.js +20 -0
- package/lib/common/protocol.moniker.d.ts +107 -0
- package/lib/common/protocol.moniker.js +69 -0
- package/lib/common/protocol.notebook.d.ts +428 -0
- package/lib/common/protocol.notebook.js +247 -0
- package/lib/common/protocol.progress.d.ts +108 -0
- package/lib/common/protocol.progress.js +38 -0
- package/lib/common/protocol.selectionRange.d.ts +42 -0
- package/lib/common/protocol.selectionRange.js +21 -0
- package/lib/common/protocol.semanticTokens.d.ts +241 -0
- package/lib/common/protocol.semanticTokens.js +61 -0
- package/lib/common/protocol.showDocument.d.ts +73 -0
- package/lib/common/protocol.showDocument.js +23 -0
- package/lib/common/protocol.textDocumentContent.d.ts +93 -0
- package/lib/common/protocol.textDocumentContent.js +33 -0
- package/lib/common/protocol.typeDefinition.d.ts +39 -0
- package/lib/common/protocol.typeDefinition.js +22 -0
- package/lib/common/protocol.typeHierarchy.d.ts +84 -0
- package/lib/common/protocol.typeHierarchy.js +43 -0
- package/lib/common/protocol.workspaceFolder.d.ts +76 -0
- package/lib/common/protocol.workspaceFolder.js +29 -0
- package/lib/common/utils/is.d.ts +9 -0
- package/lib/common/utils/is.js +45 -0
- package/lib/node/main.d.ts +5 -0
- package/lib/node/main.js +27 -0
- package/metaModel.schema.json +864 -0
- package/package.json +68 -0
- package/thirdpartynotices.txt +31 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) TypeFox, Microsoft and others. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* A request to result a `TypeHierarchyItem` in a document at a given position.
|
|
11
|
+
* Can be used as an input to a subtypes or supertypes type hierarchy.
|
|
12
|
+
*
|
|
13
|
+
* @since 3.17.0
|
|
14
|
+
*/
|
|
15
|
+
var TypeHierarchyPrepareRequest;
|
|
16
|
+
(function (TypeHierarchyPrepareRequest) {
|
|
17
|
+
TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';
|
|
18
|
+
TypeHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
19
|
+
TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method);
|
|
20
|
+
TypeHierarchyPrepareRequest.capabilities = messages_1.CM.create('textDocument.typeHierarchy', 'typeHierarchyProvider');
|
|
21
|
+
})(TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {}));
|
|
22
|
+
/**
|
|
23
|
+
* A request to resolve the supertypes for a given `TypeHierarchyItem`.
|
|
24
|
+
*
|
|
25
|
+
* @since 3.17.0
|
|
26
|
+
*/
|
|
27
|
+
var TypeHierarchySupertypesRequest;
|
|
28
|
+
(function (TypeHierarchySupertypesRequest) {
|
|
29
|
+
TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';
|
|
30
|
+
TypeHierarchySupertypesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
31
|
+
TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method);
|
|
32
|
+
})(TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {}));
|
|
33
|
+
/**
|
|
34
|
+
* A request to resolve the subtypes for a given `TypeHierarchyItem`.
|
|
35
|
+
*
|
|
36
|
+
* @since 3.17.0
|
|
37
|
+
*/
|
|
38
|
+
var TypeHierarchySubtypesRequest;
|
|
39
|
+
(function (TypeHierarchySubtypesRequest) {
|
|
40
|
+
TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';
|
|
41
|
+
TypeHierarchySubtypesRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
42
|
+
TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method);
|
|
43
|
+
})(TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {}));
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { WorkspaceFolder } from 'vscode-languageserver-types';
|
|
2
|
+
import { RequestHandler0, NotificationHandler, HandlerResult, CancellationToken } from 'vscode-jsonrpc';
|
|
3
|
+
import { MessageDirection, ProtocolRequestType0, ProtocolNotificationType, CM } from './messages';
|
|
4
|
+
export interface WorkspaceFoldersInitializeParams {
|
|
5
|
+
/**
|
|
6
|
+
* The workspace folders configured in the client when the server starts.
|
|
7
|
+
*
|
|
8
|
+
* This property is only available if the client supports workspace folders.
|
|
9
|
+
* It can be `null` if the client supports workspace folders but none are
|
|
10
|
+
* configured.
|
|
11
|
+
*
|
|
12
|
+
* @since 3.6.0
|
|
13
|
+
*/
|
|
14
|
+
workspaceFolders?: WorkspaceFolder[] | null;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkspaceFoldersServerCapabilities {
|
|
17
|
+
/**
|
|
18
|
+
* The server has support for workspace folders
|
|
19
|
+
*/
|
|
20
|
+
supported?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the server wants to receive workspace folder
|
|
23
|
+
* change notifications.
|
|
24
|
+
*
|
|
25
|
+
* If a string is provided the string is treated as an ID
|
|
26
|
+
* under which the notification is registered on the client
|
|
27
|
+
* side. The ID can be used to unregister for these events
|
|
28
|
+
* using the `client/unregisterCapability` request.
|
|
29
|
+
*/
|
|
30
|
+
changeNotifications?: string | boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
|
|
34
|
+
*/
|
|
35
|
+
export declare namespace WorkspaceFoldersRequest {
|
|
36
|
+
const method: 'workspace/workspaceFolders';
|
|
37
|
+
const messageDirection: MessageDirection;
|
|
38
|
+
const type: ProtocolRequestType0<WorkspaceFolder[] | null, never, void, void>;
|
|
39
|
+
type HandlerSignature = RequestHandler0<WorkspaceFolder[] | null, void>;
|
|
40
|
+
type MiddlewareSignature = (token: CancellationToken, next: HandlerSignature) => HandlerResult<WorkspaceFolder[] | null, void>;
|
|
41
|
+
const capabilities: CM<"workspace.workspaceFolders", "workspace.workspaceFolders">;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
|
|
45
|
+
* folder configuration changes.
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace DidChangeWorkspaceFoldersNotification {
|
|
48
|
+
const method: 'workspace/didChangeWorkspaceFolders';
|
|
49
|
+
const messageDirection: MessageDirection;
|
|
50
|
+
const type: ProtocolNotificationType<DidChangeWorkspaceFoldersParams, void>;
|
|
51
|
+
type HandlerSignature = NotificationHandler<DidChangeWorkspaceFoldersParams>;
|
|
52
|
+
type MiddlewareSignature = (params: DidChangeWorkspaceFoldersParams, next: HandlerSignature) => void;
|
|
53
|
+
const capabilities: CM<undefined, "workspace.workspaceFolders.changeNotifications">;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The parameters of a `workspace/didChangeWorkspaceFolders` notification.
|
|
57
|
+
*/
|
|
58
|
+
export interface DidChangeWorkspaceFoldersParams {
|
|
59
|
+
/**
|
|
60
|
+
* The actual workspace folder change event.
|
|
61
|
+
*/
|
|
62
|
+
event: WorkspaceFoldersChangeEvent;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The workspace folder change event.
|
|
66
|
+
*/
|
|
67
|
+
export interface WorkspaceFoldersChangeEvent {
|
|
68
|
+
/**
|
|
69
|
+
* The array of added workspace folders
|
|
70
|
+
*/
|
|
71
|
+
added: WorkspaceFolder[];
|
|
72
|
+
/**
|
|
73
|
+
* The array of the removed workspace folders
|
|
74
|
+
*/
|
|
75
|
+
removed: WorkspaceFolder[];
|
|
76
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0;
|
|
8
|
+
const messages_1 = require("./messages");
|
|
9
|
+
/**
|
|
10
|
+
* The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
|
|
11
|
+
*/
|
|
12
|
+
var WorkspaceFoldersRequest;
|
|
13
|
+
(function (WorkspaceFoldersRequest) {
|
|
14
|
+
WorkspaceFoldersRequest.method = 'workspace/workspaceFolders';
|
|
15
|
+
WorkspaceFoldersRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
16
|
+
WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest.method);
|
|
17
|
+
WorkspaceFoldersRequest.capabilities = messages_1.CM.create('workspace.workspaceFolders', 'workspace.workspaceFolders');
|
|
18
|
+
})(WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {}));
|
|
19
|
+
/**
|
|
20
|
+
* The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
|
|
21
|
+
* folder configuration changes.
|
|
22
|
+
*/
|
|
23
|
+
var DidChangeWorkspaceFoldersNotification;
|
|
24
|
+
(function (DidChangeWorkspaceFoldersNotification) {
|
|
25
|
+
DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders';
|
|
26
|
+
DidChangeWorkspaceFoldersNotification.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
27
|
+
DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method);
|
|
28
|
+
DidChangeWorkspaceFoldersNotification.capabilities = messages_1.CM.create(undefined, 'workspace.workspaceFolders.changeNotifications');
|
|
29
|
+
})(DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function boolean(value: any): value is boolean;
|
|
2
|
+
export declare function string(value: any): value is string;
|
|
3
|
+
export declare function number(value: any): value is number;
|
|
4
|
+
export declare function error(value: any): value is Error;
|
|
5
|
+
export declare function func(value: any): value is Function;
|
|
6
|
+
export declare function array<T>(value: any): value is T[];
|
|
7
|
+
export declare function stringArray(value: any): value is string[];
|
|
8
|
+
export declare function typedArray<T>(value: any, check: (value: any) => boolean): value is T[];
|
|
9
|
+
export declare function objectLiteral(value: any): value is object;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.boolean = boolean;
|
|
8
|
+
exports.string = string;
|
|
9
|
+
exports.number = number;
|
|
10
|
+
exports.error = error;
|
|
11
|
+
exports.func = func;
|
|
12
|
+
exports.array = array;
|
|
13
|
+
exports.stringArray = stringArray;
|
|
14
|
+
exports.typedArray = typedArray;
|
|
15
|
+
exports.objectLiteral = objectLiteral;
|
|
16
|
+
function boolean(value) {
|
|
17
|
+
return value === true || value === false;
|
|
18
|
+
}
|
|
19
|
+
function string(value) {
|
|
20
|
+
return typeof value === 'string' || value instanceof String;
|
|
21
|
+
}
|
|
22
|
+
function number(value) {
|
|
23
|
+
return typeof value === 'number' || value instanceof Number;
|
|
24
|
+
}
|
|
25
|
+
function error(value) {
|
|
26
|
+
return value instanceof Error;
|
|
27
|
+
}
|
|
28
|
+
function func(value) {
|
|
29
|
+
return typeof value === 'function';
|
|
30
|
+
}
|
|
31
|
+
function array(value) {
|
|
32
|
+
return Array.isArray(value);
|
|
33
|
+
}
|
|
34
|
+
function stringArray(value) {
|
|
35
|
+
return array(value) && value.every(elem => string(elem));
|
|
36
|
+
}
|
|
37
|
+
function typedArray(value, check) {
|
|
38
|
+
return Array.isArray(value) && value.every(check);
|
|
39
|
+
}
|
|
40
|
+
function objectLiteral(value) {
|
|
41
|
+
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
42
|
+
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
43
|
+
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
44
|
+
return value !== null && typeof value === 'object';
|
|
45
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MessageReader, MessageWriter, Logger, ConnectionStrategy, ConnectionOptions, ProtocolConnection } from '../common/api';
|
|
2
|
+
export * from 'vscode-jsonrpc/node';
|
|
3
|
+
export * from '../common/api';
|
|
4
|
+
export declare function createProtocolConnection(input: MessageReader, output: MessageWriter, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection;
|
|
5
|
+
export declare function createProtocolConnection(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, logger?: Logger, options?: ConnectionStrategy | ConnectionOptions): ProtocolConnection;
|
package/lib/node/main.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.createProtocolConnection = createProtocolConnection;
|
|
22
|
+
const node_1 = require("vscode-jsonrpc/node");
|
|
23
|
+
__exportStar(require("vscode-jsonrpc/node"), exports);
|
|
24
|
+
__exportStar(require("../common/api"), exports);
|
|
25
|
+
function createProtocolConnection(input, output, logger, options) {
|
|
26
|
+
return (0, node_1.createMessageConnection)(input, output, logger, options);
|
|
27
|
+
}
|