Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@morgan-stanley/composeui-messaging-client
Advanced tools
JavaScript client for ComposeUI's Message Router
This package contains the client used to connect to the MessageRouter from web modules in ComposeUI.
Import createMessageRouter from the package
import { createMessageRouter } from "@morgan-stanley/composeui-messaging-client";
Use createMessageRouter() to instantiate the MessageRouter client in a ComposeUI application. It will connect to the MessageRouter hosted by the container when you call connect() on the client.
let client = createMessageRouter();
await client.connect();
Use the subscribe method of the client to set a handler on a topic. The message parameter of the handler method contains the payload as a string. The following example parses a JSON payload from the "exampleTopic" topic and logs it to console.
client.subscribe('exampleTopic', (message) => {
const payload = JSON.parse(message.payload);
console.log(payload);
});
Use the publish method of the client to publish a message to a topic. The payload of the message must be a string. The following example creates a JSON string out of an object, and publishes it to the "exampleTopic" topic.
await client.publish('exampleTopic', JSON.stringify(payload));
FAQs
JavaScript client for ComposeUI's Message Router
The npm package @morgan-stanley/composeui-messaging-client receives a total of 0 weekly downloads. As such, @morgan-stanley/composeui-messaging-client popularity was classified as not popular.
We found that @morgan-stanley/composeui-messaging-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.