Skip to content

Commit

Permalink
GLSP-944 Remove usage of vscode-ws-jsonrpc (#76)
Browse files Browse the repository at this point in the history
* GLSP-944 Remove usage of vscode-ws-jsonrpc 

Requires eclipse-glsp/glsp-client#215
Part of eclipse-glsp/glsp#944

* Update yarn.lock
  • Loading branch information
tortmayr authored Mar 6, 2023
1 parent f524bb2 commit 52353f6
Show file tree
Hide file tree
Showing 3 changed files with 807 additions and 1,231 deletions.
8 changes: 3 additions & 5 deletions client/examples/workflow-webapp/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
TYPES
} from '@eclipse-glsp/client';
import { getParameters } from '@eclipse-glsp/ide';
import { ApplicationIdProvider, GLSPClient } from '@eclipse-glsp/protocol';
import { ApplicationIdProvider, GLSPClient, listen } from '@eclipse-glsp/protocol';
import { MessageConnection } from 'vscode-jsonrpc';
import createContainer from './di.config';

Expand All @@ -47,10 +47,8 @@ const container = createContainer(widgetId);
const diagramServer = container.get<GLSPDiagramServer>(TYPES.ModelSource);
diagramServer.clientId = clientId;

import('vscode-ws-jsonrpc').then(jsonrpc => {
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
jsonrpc.listen({ webSocket: websocket, onConnection: connection => initialize(connection) });
});
const websocket = new WebSocket(`ws://localhost:${port}/${id}`);
listen(websocket, connection => initialize(connection));

async function initialize(connectionProvider: MessageConnection): Promise<void> {
const client = new BaseJsonrpcGLSPClient({ id, connectionProvider });
Expand Down
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"watch": "lerna run --parallel watch"
},
"devDependencies": {
"@eclipse-glsp/dev": "1.1.0-next.164cf99.124",
"@eclipse-glsp/dev": "1.1.0-next.7026c40.129",
"@types/node": "16.x",
"copyfiles": "^2.4.1",
"typescript": "^4.9.3"
},
"engines": {
"node": ">=14.18.0",
"node": ">=16.11.0",
"yarn": ">=1.7.0 <2.x.x"
}
}
Loading

0 comments on commit 52353f6

Please sign in to comment.