Installations
npm install dtp-vscode-ws-jsonrpc
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=16.11.0
Node Version
18.14.2
NPM Version
9.5.0
Score
73
Supply Chain
89.4
Quality
75.5
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Languages
TypeScript (88.35%)
HTML (7.77%)
JavaScript (1.47%)
Shell (1.03%)
Dockerfile (0.73%)
CSS (0.36%)
PowerShell (0.13%)
Python (0.08%)
C++ (0.05%)
Java (0.02%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
481
Last Day
1
Last Week
1
Last Month
28
Last Year
122
GitHub Statistics
MIT License
1,126 Stars
988 Commits
191 Forks
20 Watchers
24 Branches
45 Contributors
Updated on Feb 18, 2025
Bundle Size
52.93 kB
Minified
12.42 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.0.5
Package Id
dtp-vscode-ws-jsonrpc@3.0.5
Unpacked Size
56.14 kB
Size
12.24 kB
File Count
64
NPM Version
9.5.0
Node Version
18.14.2
Published on
Apr 19, 2023
Total Downloads
Cumulative downloads
Total Downloads
481
Last Day
0%
1
Compared to previous day
Last Week
-87.5%
1
Compared to previous week
Last Month
300%
28
Compared to previous month
Last Year
-66%
122
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.
See the following example code how to use this library or take a look of the monaco-languageclient
and vscode-ws-jsonrpc
examples here:
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});
License

No vulnerabilities found.
Reason
30 commit(s) and 28 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
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 6/9 approved changesets -- score normalized to 6
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: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/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/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:d987d62d4604023ac81576e88ce5032834f924e93c8c4e344993cea331426e46
- 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 27 are checked with a SAST tool
Score
5.6
/10
Last Scanned on 2025-02-17
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