raas-client
Version:
344 lines • 20.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
/**
* Message types sent between the RSP server and the client
*/
var Messages;
(function (Messages) {
/**
* Server methods
*/
let Server;
(function (Server) {
/**
* The `server/getDiscoveryPaths` request is sent by the client to fetch a list
* of discovery paths that can be searched.
*
* Discovery paths exist in the RSP model as paths suitable to be searched for
* server runtime installations. Additional paths may be added via the
* `server/addDiscoveryPath` entry point, or removed via the
* `server/removeDiscoveryPath` entry point.
*/
let GetDiscoveryPathsRequest;
(function (GetDiscoveryPathsRequest) {
GetDiscoveryPathsRequest.type = new vscode_jsonrpc_1.RequestType0('server/getDiscoveryPaths');
})(GetDiscoveryPathsRequest = Server.GetDiscoveryPathsRequest || (Server.GetDiscoveryPathsRequest = {}));
/**
* The `server/findServerBeans` request is sent by the client to fetch a list of
* server beans for the given path.
*
* The RSP model will iterate through a number of `IServerBeanTypeProvider`
* instances and ask them if they recognize the contents of the folder
* underlying the discovery path. Any providers that claim to be able to handle
* the given path will return an object representing the details of this
* recognized server runtime, its version, etc.
*/
let FindServerBeansRequest;
(function (FindServerBeansRequest) {
FindServerBeansRequest.type = new vscode_jsonrpc_1.RequestType('server/findServerBeans');
})(FindServerBeansRequest = Server.FindServerBeansRequest || (Server.FindServerBeansRequest = {}));
/**
* The `server/addDiscoveryPath` request is sent by the client to add a new
* path to search when discovering servers. These paths will be stored in a
* model, to be queried or searched later by a client.
*/
let AddDiscoveryPathRequest;
(function (AddDiscoveryPathRequest) {
AddDiscoveryPathRequest.type = new vscode_jsonrpc_1.RequestType('server/addDiscoveryPath');
})(AddDiscoveryPathRequest = Server.AddDiscoveryPathRequest || (Server.AddDiscoveryPathRequest = {}));
/**
* The `server/removeDiscoveryPath` request is sent by the client to remove
* a path from the model and prevent it from being searched by clients when
* discovering servers in the future.
*/
let RemoveDiscoveryPathRequest;
(function (RemoveDiscoveryPathRequest) {
RemoveDiscoveryPathRequest.type = new vscode_jsonrpc_1.RequestType('server/removeDiscoveryPath');
})(RemoveDiscoveryPathRequest = Server.RemoveDiscoveryPathRequest || (Server.RemoveDiscoveryPathRequest = {}));
/**
* The `server/getServerHandles` request is sent by the client to list the
* server adapters currently configured. A server adapter is configured when a
* call to `server/createServer` completes without error, or, some may be
* pre-configured by the server upon installation.
*/
let GetServerHandlesRequest;
(function (GetServerHandlesRequest) {
GetServerHandlesRequest.type = new vscode_jsonrpc_1.RequestType0('server/getServerHandles');
})(GetServerHandlesRequest = Server.GetServerHandlesRequest || (Server.GetServerHandlesRequest = {}));
/**
* The `server/getServerTypes` request is sent by the client to list the server
* types currently supported. The details of how many server types are supported
* by an RSP, or how they are registered, is implementation-specific.
*/
let GetServerTypesRequest;
(function (GetServerTypesRequest) {
GetServerTypesRequest.type = new vscode_jsonrpc_1.RequestType0('server/getServerTypes');
})(GetServerTypesRequest = Server.GetServerTypesRequest || (Server.GetServerTypesRequest = {}));
/**
* The `server/deleteServer` request is sent by the client to delete a
* server from the model. This server will no longer be able to be started, shut
* down, or interacted with in any fashion.
*/
let DeleteServerRequest;
(function (DeleteServerRequest) {
DeleteServerRequest.type = new vscode_jsonrpc_1.RequestType('server/deleteServer');
})(DeleteServerRequest = Server.DeleteServerRequest || (Server.DeleteServerRequest = {}));
/**
* The `server/getRequiredAttributes` request is sent by the client to list the
* required attributes that must be stored on a server object of this type, such
* as a server-home or other required parameters.
*/
let GetRequiredAttributesRequest;
(function (GetRequiredAttributesRequest) {
GetRequiredAttributesRequest.type = new vscode_jsonrpc_1.RequestType('server/getRequiredAttributes');
})(GetRequiredAttributesRequest = Server.GetRequiredAttributesRequest || (Server.GetRequiredAttributesRequest = {}));
/**
* The `server/getOptionalAttributes` request is sent by the client to list the
* optional attributes that can be stored on a server object of this type. This
* may include things like customizing ports, or custom methods of interacting
* with various functionality specific to the server type.
*/
let GetOptionalAttributesRequest;
(function (GetOptionalAttributesRequest) {
GetOptionalAttributesRequest.type = new vscode_jsonrpc_1.RequestType('server/getOptionalAttributes');
})(GetOptionalAttributesRequest = Server.GetOptionalAttributesRequest || (Server.GetOptionalAttributesRequest = {}));
/**
* The `server/createServer` request is sent by the client to create a server in
* the model using the given attributes (both required and optional. This
* request may fail if required attributes are missing, any attributes
* have impossible, unexpected, or invalid values, or any error occurs
* while attempting to create the server adapter as requested.
*
* In the event of failure, the returend `Status` object will
* detail the cause of error.
*/
let CreateServerRequest;
(function (CreateServerRequest) {
CreateServerRequest.type = new vscode_jsonrpc_1.RequestType('server/createServer');
})(CreateServerRequest = Server.CreateServerRequest || (Server.CreateServerRequest = {}));
/**
* The `server/getLaunchModes` request is sent by the client to get
* a list of launch modes that are applicable to this server type.
* Some servers can only be started.
* Others can be started, debugged, profiled, etc.
*
* Server types may come up with their own launch modes if desired.
*/
let GetLaunchModesRequest;
(function (GetLaunchModesRequest) {
GetLaunchModesRequest.type = new vscode_jsonrpc_1.RequestType('server/getLaunchModes');
})(GetLaunchModesRequest = Server.GetLaunchModesRequest || (Server.GetLaunchModesRequest = {}));
/**
* The `server/getRequiredLaunchAttributes` request is sent by the client to get
* any additional attributes required for launch or that can customize launch
* behavior. Some server types may require references to a specific library, a
* clear decision about which of several configurations the server should be
* launched with, or any other required details required to successfully start
* up the server.
*/
let GetRequiredLaunchAttributesRequest;
(function (GetRequiredLaunchAttributesRequest) {
GetRequiredLaunchAttributesRequest.type = new vscode_jsonrpc_1.RequestType('server/getRequiredLaunchAttributes');
})(GetRequiredLaunchAttributesRequest = Server.GetRequiredLaunchAttributesRequest || (Server.GetRequiredLaunchAttributesRequest = {}));
/**
* The `server/getOptionalLaunchAttributes` request is sent by the client to get
* any optional attributes which can be used to modify the launch behavior. Some
* server types may allow overrides to any number of launch flags or settings,
* but not require these changes in order to function.
*/
let GetOptionalLaunchAttributesRequest;
(function (GetOptionalLaunchAttributesRequest) {
GetOptionalLaunchAttributesRequest.type = new vscode_jsonrpc_1.RequestType('server/getOptionalLaunchAttributes');
})(GetOptionalLaunchAttributesRequest = Server.GetOptionalLaunchAttributesRequest || (Server.GetOptionalLaunchAttributesRequest = {}));
/**
* The `server/getLaunchCommand` request is sent by the client to the server to
* get the command which can be used to launch the server.
*
* This entry point is most often used if an editor or IDE wishes to start
* the server by itself, but does not know the servertype-specific command
* that must be launched. The parameter will include a mode the server
* should run in (run, debug, etc), as well as any custom attributes
* that may have an effect on the generation of the launch command.
*/
let GetLaunchCommandRequest;
(function (GetLaunchCommandRequest) {
GetLaunchCommandRequest.type = new vscode_jsonrpc_1.RequestType('server/getLaunchCommand');
})(GetLaunchCommandRequest = Server.GetLaunchCommandRequest || (Server.GetLaunchCommandRequest = {}));
/**
* The `server/serverStartingByClient` request is sent by the client to the
* server to inform the server that the client itself has launched the server
* instead of asking the RSP to do so.
*
* The parameters include both the request used to get the launch command, and a
* boolean as to whether the server should initiate the 'state-polling'
* mechanism to inform the client when the selected server has completed its
* startup.
*
* If the `polling` boolean is false, the client is expected to also alert
* the RSP when the launched server has completed its startup via the
* `server/serverStartedByClient` request.
*/
let ServerStartingByClientRequest;
(function (ServerStartingByClientRequest) {
ServerStartingByClientRequest.type = new vscode_jsonrpc_1.RequestType('server/serverStartingByClient');
})(ServerStartingByClientRequest = Server.ServerStartingByClientRequest || (Server.ServerStartingByClientRequest = {}));
/**
* The `server/serverStartedByClient` request is sent by the client to the
* server to inform the server that the client itself has launched the server
* instead of asking the RSP to do so, AND that the startup has completed.
*/
let ServerStartedByClientRequest;
(function (ServerStartedByClientRequest) {
ServerStartedByClientRequest.type = new vscode_jsonrpc_1.RequestType('server/serverStartedByClient');
})(ServerStartedByClientRequest = Server.ServerStartedByClientRequest || (Server.ServerStartedByClientRequest = {}));
/**
* The `server/startServerAsync` request is sent by the client to the server to
* start an existing server in the model.
*
* This request will cause the server to launch the server and
* keep organized the spawned processes, their I/O streams,
* and any events that must be propagated to the client.
*/
let StartServerAsyncRequest;
(function (StartServerAsyncRequest) {
StartServerAsyncRequest.type = new vscode_jsonrpc_1.RequestType('server/startServerAsync');
})(StartServerAsyncRequest = Server.StartServerAsyncRequest || (Server.StartServerAsyncRequest = {}));
/**
* The `server/stopServerAsync` request is sent by the client to the server to
* stop an existing server in the model.
*/
let StopServerAsyncRequest;
(function (StopServerAsyncRequest) {
StopServerAsyncRequest.type = new vscode_jsonrpc_1.RequestType('server/stopServerAsync');
})(StopServerAsyncRequest = Server.StopServerAsyncRequest || (Server.StopServerAsyncRequest = {}));
/**
* The `server/shutdown` notification is sent by the client to shut down the
* RSP itself.
*/
let ShutdownNotification;
(function (ShutdownNotification) {
ShutdownNotification.type = new vscode_jsonrpc_1.NotificationType0('server/shutdown');
})(ShutdownNotification = Server.ShutdownNotification || (Server.ShutdownNotification = {}));
})(Server = Messages.Server || (Messages.Server = {}));
/**
* Client methods
*/
let Client;
(function (Client) {
/**
* The `client/discoveryPathAdded` notification is sent by the server to all
* clients in response to the `server/addDiscoveryPath` notification.
*
* This call indicates that a discovery path has been added to the RSP model
* which keeps track of filesystem paths that may be searched for server
* runtimes.
*/
let DiscoveryPathAddedNotification;
(function (DiscoveryPathAddedNotification) {
DiscoveryPathAddedNotification.type = new vscode_jsonrpc_1.NotificationType('client/discoveryPathAdded');
})(DiscoveryPathAddedNotification = Client.DiscoveryPathAddedNotification || (Client.DiscoveryPathAddedNotification = {}));
/**
* The `client/discoveryPathRemoved` notification is sent by the server to all
* clients in response to the `server/removeDiscoveryPath` notification.
*
* This call indicates that a discovery path has been removed from the RSP model
* which keeps track of filesystem paths that may be searched for server
* runtimes.
*/
let DiscoveryPathRemovedNotification;
(function (DiscoveryPathRemovedNotification) {
DiscoveryPathRemovedNotification.type = new vscode_jsonrpc_1.NotificationType('client/discoveryPathRemoved');
})(DiscoveryPathRemovedNotification = Client.DiscoveryPathRemovedNotification || (Client.DiscoveryPathRemovedNotification = {}));
/**
* The `client/serverAdded` notification is sent by the server to all clients in
* a response to the `server/createServer` notification.
*
* This notification indicates that a new server adapter has been created in the
* RSP model of existing servers. As mentioned above, this was most likely in
* response to a server/createServer notification, but is not strictly limited
* to this entrypoint.
*/
let ServerAddedNotification;
(function (ServerAddedNotification) {
ServerAddedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverAdded');
})(ServerAddedNotification = Client.ServerAddedNotification || (Client.ServerAddedNotification = {}));
/**
* The `client/serverRemoved` notification is sent by the server to all clients
* in response to the `server/deleteServer` notification.
*
* This notification indicates that a server adapter has been removed from the
* RSP model of existing servers. As mentioned above, this was most likely in
* response to a server/deleteServer notification, but is not strictly limited
* to this entrypoint.
*/
let ServerRemovedNotification;
(function (ServerRemovedNotification) {
ServerRemovedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverRemoved');
})(ServerRemovedNotification = Client.ServerRemovedNotification || (Client.ServerRemovedNotification = {}));
/**
* The `client/serverAttributesChanged` notification is sent by the server to all clients
* when any server has had one of its attributes changed.
*/
let ServerAttributesChangedNotification;
(function (ServerAttributesChangedNotification) {
ServerAttributesChangedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverAttributesChanged');
})(ServerAttributesChangedNotification = Client.ServerAttributesChangedNotification || (Client.ServerAttributesChangedNotification = {}));
/**
* The `client/serverStateChanged` notification is sent by the server to all
* clients when any server has had its state change.
*
* Possible values include:
* `0` representing an unknown state
* `1` representing starting
* `2` representing started
* `3` representing stopping
* `4` representing stopped
*/
let ServerStateChangedNotification;
(function (ServerStateChangedNotification) {
ServerStateChangedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverStateChanged');
})(ServerStateChangedNotification = Client.ServerStateChangedNotification || (Client.ServerStateChangedNotification = {}));
/**
* The `client/serverProcessCreated` notification is sent
* by the server to all clients when any server
* has launched a new process which can be monitored.
*
* This notification is most often sent in response to a call to
* `server/startServerAsync` which will typically launch a process
* to run the server in question.
*/
let ServerProcessCreatedNotification;
(function (ServerProcessCreatedNotification) {
ServerProcessCreatedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverProcessCreated');
})(ServerProcessCreatedNotification = Client.ServerProcessCreatedNotification || (Client.ServerProcessCreatedNotification = {}));
/**
* The `client/serverProcessTerminated` notification is sent by
* the server to all clients when any process associated with a
* server has been terminated.
*
* This notification is most often sent as a result of a call to
* `server/stopServerAsync`, which should shut down a given server
* and cause all of that server's processes to terminate after some time.
*/
let ServerProcessTerminatedNotification;
(function (ServerProcessTerminatedNotification) {
ServerProcessTerminatedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverProcessTerminated');
})(ServerProcessTerminatedNotification = Client.ServerProcessTerminatedNotification || (Client.ServerProcessTerminatedNotification = {}));
/**
* The `client/serverProcessOutputAppended` notification is sent by
* the server to all clients when any process associated with a
* server generated output on any of its output streams.
*
* This notification may be sent as a result of anything that
* causes a given server process to emit output, such as a change in
* configuration, a deployment, an error, normal logging,
* or any other number of possibilities.
*/
let ServerProcessOutputAppendedNotification;
(function (ServerProcessOutputAppendedNotification) {
ServerProcessOutputAppendedNotification.type = new vscode_jsonrpc_1.NotificationType('client/serverProcessOutputAppended');
})(ServerProcessOutputAppendedNotification = Client.ServerProcessOutputAppendedNotification || (Client.ServerProcessOutputAppendedNotification = {}));
})(Client = Messages.Client || (Messages.Client = {}));
})(Messages = exports.Messages || (exports.Messages = {}));
//# sourceMappingURL=messages.js.map