@eclipse-glsp/protocol
Advanced tools
Comparing version 0.9.0-next.a85c9fee to 0.9.0-next.af256baf
@@ -16,3 +16,3 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import { ActionMessage } from 'sprotty'; | ||
export interface InitializeParameters { | ||
@@ -86,3 +86,3 @@ /** | ||
*/ | ||
initializeServer(params: InitializeParameters): Promise<Boolean>; | ||
initializeServer(params: InitializeParameters): Promise<boolean>; | ||
/** | ||
@@ -89,0 +89,0 @@ * Send a `shutdown` notification to the server. |
@@ -51,4 +51,4 @@ "use strict"; | ||
function isOptions(object) { | ||
return object !== undefined && "id" in object && typeof object["id"] === "string" | ||
&& "name" in object && typeof object["name"] === "string"; | ||
return object !== undefined && 'id' in object && typeof object['id'] === 'string' | ||
&& 'name' in object && typeof object['name'] === 'string'; | ||
} | ||
@@ -55,0 +55,0 @@ GLSPClient.isOptions = isOptions; |
@@ -16,6 +16,6 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import { Message, MessageConnection } from "vscode-ws-jsonrpc"; | ||
import { ActionMessageHandler, ClientState, GLSPClient, InitializeParameters } from "../glsp-client"; | ||
import { ConnectionProvider, JsonrpcGLSPClient } from "./glsp-jsonrpc-client"; | ||
import { ActionMessage } from 'sprotty'; | ||
import { Message, MessageConnection } from 'vscode-ws-jsonrpc'; | ||
import { ActionMessageHandler, ClientState, GLSPClient, InitializeParameters } from '../glsp-client'; | ||
import { ConnectionProvider, JsonrpcGLSPClient } from './glsp-jsonrpc-client'; | ||
export declare class BaseJsonrpcGLSPClient implements GLSPClient { | ||
@@ -31,3 +31,3 @@ readonly name: string; | ||
shutdownServer(): void; | ||
initializeServer(params: InitializeParameters): Promise<Boolean>; | ||
initializeServer(params: InitializeParameters): Promise<boolean>; | ||
onActionMessage(handler: ActionMessageHandler): void; | ||
@@ -34,0 +34,0 @@ sendActionMessage(message: ActionMessage): void; |
@@ -16,6 +16,6 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import { MessageConnection, NotificationType, RequestType } from "vscode-jsonrpc"; | ||
import { Logger, NotificationType0 } from "vscode-ws-jsonrpc"; | ||
import { GLSPClient, InitializeParameters } from "../glsp-client"; | ||
import { ActionMessage } from 'sprotty'; | ||
import { MessageConnection, NotificationType, RequestType } from 'vscode-jsonrpc'; | ||
import { Logger, NotificationType0 } from 'vscode-ws-jsonrpc'; | ||
import { GLSPClient, InitializeParameters } from '../glsp-client'; | ||
export declare type MaybePromise<T> = T | Promise<T> | PromiseLike<T>; | ||
@@ -29,3 +29,3 @@ export declare type ConnectionProvider = MessageConnection | (() => MaybePromise<MessageConnection>); | ||
const ActionMessageNotification: NotificationType<ActionMessage, void>; | ||
const InitializeRequest: RequestType<InitializeParameters, Boolean, void, void>; | ||
const InitializeRequest: RequestType<InitializeParameters, boolean, void, void>; | ||
const ShutdownNotification: NotificationType0<void>; | ||
@@ -32,0 +32,0 @@ const ClientNotReadyMsg = "JsonrpcGLSPClient is not ready yet"; |
@@ -10,3 +10,3 @@ "use strict"; | ||
function isOptions(object) { | ||
return glsp_client_1.GLSPClient.isOptions(object) && "connectionProvider" in object; | ||
return glsp_client_1.GLSPClient.isOptions(object) && 'connectionProvider' in object; | ||
} | ||
@@ -13,0 +13,0 @@ JsonrpcGLSPClient.isOptions = isOptions; |
@@ -25,3 +25,3 @@ "use strict"; | ||
function getPort(argsKey, defaultPort) { | ||
argsKey = "--" + argsKey.replace("--", "").replace("=", "") + "="; | ||
argsKey = "--" + argsKey.replace('--', '').replace('=', '') + "="; | ||
var args = process.argv.filter(function (a) { return a.startsWith(argsKey); }); | ||
@@ -28,0 +28,0 @@ if (args.length > 0) { |
{ | ||
"name": "@eclipse-glsp/protocol", | ||
"version": "0.9.0-next.a85c9fee", | ||
"version": "0.9.0-next.af256baf", | ||
"description": "The protocol definition for client-server communication in GLSP", | ||
@@ -15,11 +15,11 @@ "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", | ||
], | ||
"homepage": "https://www.eclipse.org/glsp/", | ||
"bugs": "https://github.com/eclipse-glsp/glsp-client/issues", | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"author": { | ||
"name": "Eclipse GLSP" | ||
}, | ||
"homepage": "https://www.eclipse.org/glsp/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/eclipse-glsp/glsp-client.git" | ||
}, | ||
"bugs": "https://github.com/eclipse-glsp/glsp/issues", | ||
"contributors": [ | ||
@@ -42,6 +42,6 @@ { | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/eclipse-glsp/glsp-client.git" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"dependencies": { | ||
@@ -55,10 +55,9 @@ "uuid": "7.0.3", | ||
"rimraf": "^2.6.1", | ||
"tslint": "^5.5.0", | ||
"typescript": "^3.9.2" | ||
}, | ||
"scripts": { | ||
"prepare": "yarn run clean && yarn run build", | ||
"prepare": "yarn clean && yarn build && yarn lint", | ||
"clean": "rimraf lib", | ||
"build": "tsc && yarn run lint", | ||
"lint": "tslint -c ../../tslint.json --project ./tsconfig.json", | ||
"build": "tsc", | ||
"lint": "eslint -c ./.eslintrc.js --ext .ts ./src", | ||
"watch": "tsc -w" | ||
@@ -65,0 +64,0 @@ }, |
@@ -16,4 +16,4 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import * as uuid from "uuid"; | ||
import { ActionMessage } from 'sprotty'; | ||
import * as uuid from 'uuid'; | ||
@@ -29,3 +29,3 @@ export interface InitializeParameters<> { | ||
*/ | ||
options?: any | ||
options?: any; | ||
} | ||
@@ -103,3 +103,3 @@ | ||
*/ | ||
initializeServer(params: InitializeParameters): Promise<Boolean>; | ||
initializeServer(params: InitializeParameters): Promise<boolean>; | ||
@@ -109,3 +109,3 @@ /** | ||
*/ | ||
shutdownServer(): void | ||
shutdownServer(): void; | ||
@@ -139,5 +139,5 @@ /** | ||
export function isOptions(object: any): object is Options { | ||
return object !== undefined && "id" in object && typeof object["id"] === "string" | ||
&& "name" in object && typeof object["name"] === "string"; | ||
return object !== undefined && 'id' in object && typeof object['id'] === 'string' | ||
&& 'name' in object && typeof object['name'] === 'string'; | ||
} | ||
} |
@@ -16,7 +16,7 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import { Message, MessageConnection } from "vscode-ws-jsonrpc"; | ||
import { ActionMessage } from 'sprotty'; | ||
import { Message, MessageConnection } from 'vscode-ws-jsonrpc'; | ||
import { ActionMessageHandler, ClientState, GLSPClient, InitializeParameters } from "../glsp-client"; | ||
import { ConnectionProvider, JsonrpcGLSPClient } from "./glsp-jsonrpc-client"; | ||
import { ActionMessageHandler, ClientState, GLSPClient, InitializeParameters } from '../glsp-client'; | ||
import { ConnectionProvider, JsonrpcGLSPClient } from './glsp-jsonrpc-client'; | ||
@@ -44,3 +44,3 @@ export class BaseJsonrpcGLSPClient implements GLSPClient { | ||
initializeServer(params: InitializeParameters): Promise<Boolean> { | ||
initializeServer(params: InitializeParameters): Promise<boolean> { | ||
if (this.checkConnectionState()) { | ||
@@ -47,0 +47,0 @@ return this.resolvedConnection!.sendRequest(JsonrpcGLSPClient.InitializeRequest, params); |
@@ -16,4 +16,4 @@ /******************************************************************************** | ||
********************************************************************************/ | ||
import { ActionMessage } from "sprotty"; | ||
import { MessageConnection, NotificationType, RequestType } from "vscode-jsonrpc"; | ||
import { ActionMessage } from 'sprotty'; | ||
import { MessageConnection, NotificationType, RequestType } from 'vscode-jsonrpc'; | ||
import { | ||
@@ -26,7 +26,6 @@ createMessageConnection, | ||
WebSocketMessageWriter | ||
} from "vscode-ws-jsonrpc"; | ||
} from 'vscode-ws-jsonrpc'; | ||
import { GLSPClient, InitializeParameters } from "../glsp-client"; | ||
import { GLSPClient, InitializeParameters } from '../glsp-client'; | ||
export type MaybePromise<T> = T | Promise<T> | PromiseLike<T>; | ||
@@ -41,7 +40,7 @@ export type ConnectionProvider = MessageConnection | (() => MaybePromise<MessageConnection>); | ||
export function isOptions(object: any): object is Options { | ||
return GLSPClient.isOptions(object) && "connectionProvider" in object; | ||
return GLSPClient.isOptions(object) && 'connectionProvider' in object; | ||
} | ||
export const ActionMessageNotification = new NotificationType<ActionMessage, void>('process'); | ||
export const InitializeRequest = new RequestType<InitializeParameters, Boolean, void, void>('initialize'); | ||
export const InitializeRequest = new RequestType<InitializeParameters, boolean, void, void>('initialize'); | ||
export const ShutdownNotification = new NotificationType0<void>('shutdown'); | ||
@@ -58,3 +57,2 @@ export const ClientNotReadyMsg = 'JsonrpcGLSPClient is not ready yet'; | ||
export function error(message: string, ...optionalParams: any[]): void { | ||
@@ -61,0 +59,0 @@ console.error(`[JsonrpcGLSPClient] ${message}`, optionalParams); |
@@ -23,3 +23,3 @@ /******************************************************************************** | ||
export function getPort(argsKey: string, defaultPort?: number): number { | ||
argsKey = `--${argsKey.replace("--", "").replace("=", "")}=`; | ||
argsKey = `--${argsKey.replace('--', '').replace('=', '')}=`; | ||
const args = process.argv.filter(a => a.startsWith(argsKey)); | ||
@@ -26,0 +26,0 @@ if (args.length > 0) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
4
68541