Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-glsp/protocol

Package Overview
Dependencies
Maintainers
5
Versions
297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-glsp/protocol - npm Package Compare versions

Comparing version 0.8.0-next.8c2ad5ce to 0.8.0-next.c0cac101

lib/launch-util.d.ts

64

lib/glsp-client.d.ts

@@ -19,5 +19,8 @@ /********************************************************************************

/**
* Unique identifier for the current client application
*/
* Unique identifier for the current client application.
*/
applicationId: string;
/**
* Options that can include application-specific parameters.
*/
options?: any;

@@ -31,44 +34,75 @@ }

export declare enum ClientState {
/**
* The client has been created.
*/
Initial = 0,
/**
* `Start` has been called on the client and the start process is still on-going.
*/
Starting = 1,
/**
* The client failed to complete the start process.
*/
StartFailed = 2,
/**
* The client was successfully started and is now running.
*/
Running = 3,
/**
* `Stop` has been called on the client and the stop process is still on-going.
*/
Stopping = 4,
/**
* The client stopped and disposed the server connection. Thus, action messages can no longer be sent.
*/
Stopped = 5,
/**
* An error was encountered while connecting to the server. No action messages can be sent.
*/
ServerError = 6
}
export interface GLSPClient {
/**
* Unique client Id.
*/
readonly id: string;
/**
* Client name.
*/
readonly name: string;
/**
* Current client state.
*/
currentState(): ClientState;
/**
* Initialize the client and the server connection.
*
* Initializes the client and the server connection. During the start procedure the client is in the `Starting` state and will transition to either `Running` or `StartFailed`.
*/
start(): Promise<void>;
/**
* Send an initalize request to ther server. The server needs to be initialized
* in order to accept and process action messages
* Send an `initialize` request to the server. The server needs to be initialized in order to accept and process action messages.
*
* @param params Initialize parameter
* @returns true if the initialization was successfull
* @returns true if the initialization was successful
*/
initializeServer(params: InitializeParameters): Promise<Boolean>;
/**
* Send a shutdown notification to the server
* Send a `shutdown` notification to the server.
*/
shutdownServer(): void;
/**
* Stop the client and cleanup/dispose resources
* Stops the client and disposes any resources. During the stop procedure the client is in the `Stopping` state and will transition to either `Stopped` or `ServerError`.
*/
stop(): Promise<void>;
/**
* Set a handler/listener for action messages received from the server
* Send an action message to the server.
*
* @param message The message
*/
sendActionMessage(message: ActionMessage): void;
/**
* Sets a handler/listener for action messages received from the server.
*
* @param handler The action message handler
*/
onActionMessage(handler: ActionMessageHandler): void;
/**
* Send an action message to the server
* @param message The message
*/
sendActionMessage(message: ActionMessage): void;
}

@@ -75,0 +109,0 @@ export declare namespace GLSPClient {

@@ -19,8 +19,29 @@ "use strict";

(function (ClientState) {
/**
* The client has been created.
*/
ClientState[ClientState["Initial"] = 0] = "Initial";
/**
* `Start` has been called on the client and the start process is still on-going.
*/
ClientState[ClientState["Starting"] = 1] = "Starting";
/**
* The client failed to complete the start process.
*/
ClientState[ClientState["StartFailed"] = 2] = "StartFailed";
/**
* The client was successfully started and is now running.
*/
ClientState[ClientState["Running"] = 3] = "Running";
/**
* `Stop` has been called on the client and the stop process is still on-going.
*/
ClientState[ClientState["Stopping"] = 4] = "Stopping";
/**
* The client stopped and disposed the server connection. Thus, action messages can no longer be sent.
*/
ClientState[ClientState["Stopped"] = 5] = "Stopped";
/**
* An error was encountered while connecting to the server. No action messages can be sent.
*/
ClientState[ClientState["ServerError"] = 6] = "ServerError";

@@ -27,0 +48,0 @@ })(ClientState = exports.ClientState || (exports.ClientState = {}));

@@ -17,4 +17,5 @@ /********************************************************************************

export * from './glsp-client';
export * from './launch-util';
export * from './jsonrpc/glsp-jsonrpc-client';
export * from './jsonrpc/base-jsonrpc-glsp-client';
//# sourceMappingURL=index.d.ts.map

@@ -29,4 +29,5 @@ "use strict";

__exportStar(require("./glsp-client"), exports);
__exportStar(require("./launch-util"), exports);
__exportStar(require("./jsonrpc/glsp-jsonrpc-client"), exports);
__exportStar(require("./jsonrpc/base-jsonrpc-glsp-client"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@eclipse-glsp/protocol",
"version": "0.8.0-next.8c2ad5ce",
"version": "0.8.0-next.c0cac101",
"description": "The protocol definition for client-server communication in GLSP",

@@ -5,0 +5,0 @@ "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",

@@ -21,7 +21,12 @@ /********************************************************************************

/**
* Unique identifier for the current client application
*/
* Unique identifier for the current client application.
*/
applicationId: string;
/**
* Options that can include application-specific parameters.
*/
options?: any
}
export class ApplicationIdProvider {

@@ -36,11 +41,33 @@ private static _applicationId?: string;

}
export type ActionMessageHandler = (message: ActionMessage) => void;
export enum ClientState {
/**
* The client has been created.
*/
Initial,
/**
* `Start` has been called on the client and the start process is still on-going.
*/
Starting,
/**
* The client failed to complete the start process.
*/
StartFailed,
/**
* The client was successfully started and is now running.
*/
Running,
/**
* `Stop` has been called on the client and the stop process is still on-going.
*/
Stopping,
/**
* The client stopped and disposed the server connection. Thus, action messages can no longer be sent.
*/
Stopped,
/**
* An error was encountered while connecting to the server. No action messages can be sent.
*/
ServerError

@@ -50,35 +77,53 @@ }

export interface GLSPClient {
/**
* Unique client Id.
*/
readonly id: string;
/**
* Client name.
*/
readonly name: string;
/**
* Current client state.
*/
currentState(): ClientState;
/**
* Initialize the client and the server connection.
*
* Initializes the client and the server connection. During the start procedure the client is in the `Starting` state and will transition to either `Running` or `StartFailed`.
*/
start(): Promise<void>;
/**
* Send an initalize request to ther server. The server needs to be initialized
* in order to accept and process action messages
* Send an `initialize` request to the server. The server needs to be initialized in order to accept and process action messages.
*
* @param params Initialize parameter
* @returns true if the initialization was successfull
* @returns true if the initialization was successful
*/
initializeServer(params: InitializeParameters): Promise<Boolean>;
/**
* Send a shutdown notification to the server
* Send a `shutdown` notification to the server.
*/
shutdownServer(): void
/**
* Stop the client and cleanup/dispose resources
* Stops the client and disposes any resources. During the stop procedure the client is in the `Stopping` state and will transition to either `Stopped` or `ServerError`.
*/
stop(): Promise<void>;
/**
* Set a handler/listener for action messages received from the server
* Send an action message to the server.
*
* @param message The message
*/
sendActionMessage(message: ActionMessage): void;
/**
* Sets a handler/listener for action messages received from the server.
*
* @param handler The action message handler
*/
onActionMessage(handler: ActionMessageHandler): void;
/**
* Send an action message to the server
* @param message The message
*/
sendActionMessage(message: ActionMessage): void;
}

@@ -85,0 +130,0 @@

@@ -17,3 +17,4 @@ /********************************************************************************

export * from './glsp-client';
export * from './launch-util';
export * from './jsonrpc/glsp-jsonrpc-client';
export * from './jsonrpc/base-jsonrpc-glsp-client';

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc