vscode-jsonrpc
A json rpc implementation over streams
Last updated 2 years ago by vscode-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install vscode-jsonrpc 
SYNC missed versions from official npm registry.

VSCode JSON RPC

NPM Version NPM Downloads Build Status

This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.

The npm module can also be used standalone to establish a JSON-RPC channel between a client and a server. Below an example how to setup a JSON-RPC connection. First the client side.

import * as cp from 'child_process';
import * as rpc from 'vscode-jsonrpc/node';

let childProcess = cp.spawn(...);

// Use stdin and stdout for communication:
let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(childProcess.stdout),
	new rpc.StreamMessageWriter(childProcess.stdin));

let notification = new rpc.NotificationType<string, void>('testNotification');

connection.listen();

connection.sendNotification(notification, 'Hello World');

The server side looks very symmetrical:

import * as rpc from 'vscode-jsonrpc/node';


let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(process.stdin),
	new rpc.StreamMessageWriter(process.stdout));

let notification = new rpc.NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();

History

5.0.0

  • add progress support
  • move JS target to ES2017

4.0.0

  • move JS target to ES6.

3.0.0:

  • converted the NPM module to use TypeScript 2.0.3.
  • added strict null support.
  • support for passing more than one parameter to a request or notification.
  • Breaking changes:
    • due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to TypeScript 2.0.3 as well.

License

MIT

Current Tags

  • 8.1.0                                ...           latest (2 years ago)
  • 8.1.0                                ...           next (2 years ago)

118 Versions

  • 8.1.0                                ...           2 years ago
  • 8.1.0-next.7                                ...           2 years ago
  • 8.1.0-next.6                                ...           2 years ago
  • 8.1.0-next.5                                ...           2 years ago
  • 8.1.0-next.4                                ...           2 years ago
  • 8.1.0-next.3                                ...           2 years ago
  • 8.1.0-next.2                                ...           2 years ago
  • 8.1.0-next.1                                ...           2 years ago
  • 8.0.2                                ...           2 years ago
  • 8.0.2-next.1                                ...           3 years ago
  • 8.0.1                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 8.0.0-next.8                                ...           3 years ago
  • 8.0.0-next.7                                ...           3 years ago
  • 8.0.0-next.6                                ...           3 years ago
  • 8.0.0-next.5                                ...           3 years ago
  • 8.0.0-next.4                                ...           3 years ago
  • 8.0.0-next.3                                ...           3 years ago
  • 8.0.0-next.2                                ...           3 years ago
  • 8.0.0-next.1                                ...           3 years ago
  • 7.0.0-next.1                                ...           3 years ago
  • 6.1.0-next.2                                ...           4 years ago
  • 6.1.0-next.1                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 6.0.0-next.10                                ...           4 years ago
  • 6.0.0-next.9                                ...           4 years ago
  • 6.0.0-next.8                                ...           4 years ago
  • 6.0.0-next.7                                ...           4 years ago
  • 6.0.0-next.6                                ...           4 years ago
  • 6.0.0-next.5                                ...           4 years ago
  • 6.0.0-next.4                                ...           4 years ago
  • 6.0.0-next.3                                ...           4 years ago
  • 6.0.0-next.2                                ...           5 years ago
  • 6.0.0-next.1                                ...           5 years ago
  • 5.1.0-next.1                                ...           5 years ago
  • 5.0.1                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 5.0.0-next.7                                ...           5 years ago
  • 5.0.0-next.6                                ...           5 years ago
  • 5.0.0-next.5                                ...           5 years ago
  • 5.0.0-next.4                                ...           5 years ago
  • 5.0.0-next.3                                ...           5 years ago
  • 5.0.0-next.2                                ...           5 years ago
  • 5.0.0-next.1                                ...           5 years ago
  • 4.1.0-next.3                                ...           5 years ago
  • 4.1.0-next.2                                ...           6 years ago
  • 4.1.0-next.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 4.0.0-next.1                                ...           6 years ago
  • 3.7.0-next.1                                ...           6 years ago
  • 3.6.2                                ...           7 years ago
  • 3.6.1                                ...           7 years ago
  • 3.6.0                                ...           7 years ago
  • 3.6.0-next.1                                ...           7 years ago
  • 3.5.0                                ...           7 years ago
  • 3.5.0-next.2                                ...           7 years ago
  • 3.5.0-next.1                                ...           7 years ago
  • 3.4.1                                ...           7 years ago
  • 3.4.0                                ...           7 years ago
  • 3.4.0-next.2                                ...           7 years ago
  • 3.4.0-next.1                                ...           7 years ago
  • 3.3.1                                ...           7 years ago
  • 3.3.0                                ...           7 years ago
  • 3.3.0-alpha.3                                ...           7 years ago
  • 3.3.0-alpha.2                                ...           8 years ago
  • 3.3.0-alpha.1                                ...           8 years ago
  • 3.2.0                                ...           8 years ago
  • 3.2.0-alpha.1                                ...           8 years ago
  • 3.1.0                                ...           8 years ago
  • 3.1.0-alpha.1                                ...           8 years ago
  • 3.0.4                                ...           8 years ago
  • 3.0.3                                ...           8 years ago
  • 3.0.2-beta.5                                ...           8 years ago
  • 3.0.2-beta.4                                ...           8 years ago
  • 3.0.2-beta.3                                ...           8 years ago
  • 3.0.2-beta.2                                ...           8 years ago
  • 3.0.2-beta.1                                ...           8 years ago
  • 3.0.1-alpha.7                                ...           8 years ago
  • 3.0.1-alpha.6                                ...           8 years ago
  • 3.0.1-alpha.5                                ...           8 years ago
  • 3.0.1-alpha.3                                ...           8 years ago
  • 3.0.1-alpha.2                                ...           8 years ago
  • 3.0.1-alpha.1                                ...           8 years ago
  • 3.0.0-alpha.5                                ...           8 years ago
  • 3.0.0-next.1                                ...           8 years ago
  • 3.0.0-alpha.4                                ...           8 years ago
  • 3.0.0-alpha.3                                ...           8 years ago
  • 3.0.0-alpha.2                                ...           8 years ago
  • 2.4.0                                ...           8 years ago
  • 2.3.2-next.5                                ...           8 years ago
  • 2.3.2-next.4                                ...           8 years ago
  • 2.3.2-next.3                                ...           8 years ago
  • 2.3.2-next.2                                ...           8 years ago
  • 2.3.2-next.1                                ...           8 years ago
  • 3.0.0-alpha.1                                ...           8 years ago
  • 2.3.1                                ...           8 years ago
  • 2.3.0                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.1                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 2.0.0-pre.2                                ...           9 years ago
  • 2.0.0-pre.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0-prerelease.1                                ...           9 years ago
  • 1.0.3-prerelease.1                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 0.10.1                                ...           9 years ago
  • 0.10.0                                ...           9 years ago
  • 0.10.0-pre.13                                ...           9 years ago
  • 0.10.0-pre.12                                ...           9 years ago
  • 0.10.0-pre.11                                ...           9 years ago
  • 0.10.0-pre.10                                ...           9 years ago
  • 0.10.0-pre.8                                ...           9 years ago
  • 0.10.0-pre.6                                ...           9 years ago
  • 0.10.0-pre.5                                ...           9 years ago
  • 0.10.0-pre.4                                ...           9 years ago
  • 0.10.0-pre.3                                ...           9 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |