Installations
npm install vscode-ws-jsonrpc
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=18.19.0
Node Version
22.12.0
NPM Version
10.9.0
Score
99.6
Supply Chain
93
Quality
90.7
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Languages
TypeScript (87.85%)
HTML (8.16%)
JavaScript (1.52%)
Shell (1.07%)
Dockerfile (0.76%)
CSS (0.37%)
PowerShell (0.14%)
Python (0.07%)
C++ (0.05%)
Java (0.02%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
5,827,230
Last Day
8,384
Last Week
45,816
Last Month
190,975
Last Year
1,917,549
GitHub Statistics
MIT License
1,123 Stars
972 Commits
189 Forks
20 Watchers
24 Branches
43 Contributors
Updated on Feb 13, 2025
Bundle Size
52.83 kB
Minified
12.47 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.4.0
Package Id
vscode-ws-jsonrpc@3.4.0
Unpacked Size
57.82 kB
Size
12.83 kB
File Count
64
NPM Version
10.9.0
Node Version
22.12.0
Published on
Dec 18, 2024
Total Downloads
Cumulative downloads
Total Downloads
5,827,230
Last Day
-9.9%
8,384
Compared to previous day
Last Week
6.2%
45,816
Compared to previous week
Last Month
44.6%
190,975
Compared to previous month
Last Year
43.4%
1,917,549
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
VSCode WebSocket JSON RPC
NPM module to implement communication between a jsonrpc client and server over WebSocket.
CHANGELOG
All changes are noted in the CHANGELOG.
Getting Started
This is npm package is part of the https://github.com/TypeFox/monaco-languageclient mono repo. Please follow the main repositories [instructions]](https://github.com/TypeFox/monaco-languageclient#getting-started) to get started with local development.
Usage
Client side connection handling
1import { MessageConnection, NotificationType } from 'vscode-jsonrpc'; 2import { listen } from 'vscode-ws-jsonrpc'; 3 4const webSocket = new WebSocket('ws://www.example.com/socketserver'); 5listen({ 6 webSocket, 7 onConnection: (connection: MessageConnection) => { 8 const notification = new rpc.NotificationType<string, void>('testNotification'); 9 connection.listen(); 10 connection.sendNotification(notification, 'Hello World'); 11 } 12});
Server side connection handling
1import { createWebSocketConnection, ConsoleLogger, IWebSocket } from 'vscode-ws-jsonrpc'; 2import { NotificationType } from 'vscode-languageserver'; 3 4const socket: IWebSocket; // open the web socket 5const logger = new ConsoleLogger(); 6const connection = createWebSocketConnection(socket, logger); 7const notification = new NotificationType<string, void>('testNotification'); 8connection.onNotification(notification, (param: string) => { 9 console.log(param); // This prints Hello World 10}); 11 12connection.listen();
Server side connection forwarding
1import { IWebSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'; 2import { createConnection, createServerProcess, forward } from 'vscode-ws-jsonrpc/server'; 3import { Message } from 'vscode-languageserver'; 4 5const socket: IWebSocket; // open the web socket 6const reader = new WebSocketMessageReader(socket); 7const writer = new WebSocketMessageWriter(socket); 8const socketConnection = createConnection(reader, writer, () => socket.dispose()) 9const serverConnection = createServerProcess('Example', 'node', ['example.js']); 10forward(socketConnection, serverConnection, message => { 11 if (Message.isNotification(message)) { 12 if (message.method === 'testNotification') { 13 // handle the test notification 14 } 15 } 16 return message; 17});
Examples
For a detailed list of examples please look at this section in the main repository.
License

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 30 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/debugger-py.yml:16
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99
- Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6
Reason
Found 4/10 approved changesets -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/debugger-py.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/debugger-py.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/debugger-py.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/debugger-py.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/debugger-py.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/debugger-py.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/debugger-py.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/debugger-py.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/debugger-py.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/debugger-py.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ghp.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ghp.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ghp.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ghp.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ghp.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ghp.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ghp.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-clangd.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-clangd.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-eclipsejdt.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-eclipsejdt.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-eclipsejdt.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-eclipsejdt.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-eclipsejdt.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-eclipsejdt.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-eclipsejdt.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-eclipsejdt.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-eclipsejdt.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-eclipsejdt.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-groovy.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-groovy.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-groovy.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-groovy.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-groovy.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-groovy.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ls-groovy.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-groovy.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ls-groovy.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/ls-groovy.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/main.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/main.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/peer.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/peer.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/peer.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/peer.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/peer.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/peer.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/verify.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/verify.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/verify.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/verify.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/TypeFox/monaco-languageclient/verify.yml/main?enable=pin
- Warn: containerImage not pinned by hash: packages/examples/resources/clangd/build.Dockerfile:1: pin your Docker image by updating ghcr.io/typefox/monaco-languageclient/clangd-wasm-configure:latest to ghcr.io/typefox/monaco-languageclient/clangd-wasm-configure:latest@sha256:6faa54b0b7ed7294a334c52d029756c7ac4a501f9145913d9ce3f691090a3703
- Warn: containerImage not pinned by hash: packages/examples/resources/clangd/configure.Dockerfile:1: pin your Docker image by updating ubuntu to ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782
- Warn: containerImage not pinned by hash: packages/examples/resources/debugger/Dockerfile:1: pin your Docker image by updating ghcr.io/graalvm/graalpy-community:24 to ghcr.io/graalvm/graalpy-community:24@sha256:56ebb0521872b0a78c3cdf42a727136f7fa0f78aa16ce508d64eecf8c9c2cf16
- Warn: containerImage not pinned by hash: packages/examples/resources/eclipse.jdt.ls/Dockerfile:1: pin your Docker image by updating eclipse-temurin:17-jdk to eclipse-temurin:17-jdk@sha256:3cbb344931142db86b06ea2b7aa24c62a02299108dd0d20260a982f071f3ce55
- Warn: containerImage not pinned by hash: packages/examples/resources/groovy/Dockerfile:1: pin your Docker image by updating gradle:7-jdk17-focal to gradle:7-jdk17-focal@sha256:6f93cc35c8231c536d5f15548ef3f6f7e3160e15be9e50eec000b60beac839d4
- Warn: downloadThenRun not pinned by hash: packages/examples/resources/clangd/configure.Dockerfile:7
- Warn: downloadThenRun not pinned by hash: packages/examples/resources/debugger/Dockerfile:3
- Warn: downloadThenRun not pinned by hash: packages/examples/resources/eclipse.jdt.ls/Dockerfile:12
- Warn: npmCommand not pinned by hash: packages/examples/resources/eclipse.jdt.ls/Dockerfile:24-26
- Warn: downloadThenRun not pinned by hash: packages/examples/resources/groovy/Dockerfile:12
- Warn: npmCommand not pinned by hash: packages/examples/resources/groovy/Dockerfile:32-34
- Info: 0 out of 16 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 22 third-party GitHubAction dependencies pinned
- Info: 0 out of 5 containerImage dependencies pinned
- Info: 0 out of 4 downloadThenRun dependencies pinned
- Info: 4 out of 6 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/debugger-py.yml:21
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/ls-clangd.yml:19
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/ls-eclipsejdt.yml:18
- Info: jobLevel 'contents' permission set to 'read': .github/workflows/ls-groovy.yml:18
- Warn: no topLevel permission defined: .github/workflows/debugger-py.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/ghp.yml:10
- Warn: no topLevel permission defined: .github/workflows/ls-clangd.yml:1
- Warn: no topLevel permission defined: .github/workflows/ls-eclipsejdt.yml:1
- Warn: no topLevel permission defined: .github/workflows/ls-groovy.yml:1
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Warn: no topLevel permission defined: .github/workflows/peer.yml:1
- Warn: no topLevel permission defined: .github/workflows/verify.yml:1
- Info: no jobLevel write permissions found
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 24 are checked with a SAST tool
Score
5.4
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More