Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@todesktop/client-comm-server
Advanced tools
Communicate between the web browser and your desktop app.
Communicate between the web browser and your desktop app.
Install @todesktop/client-comm-server
in your client-side application using
npm install @todesktop/client-comm-server
Installation of the plugin package is also necessary. Using ToDesktop Builder, navigate to Plugins. Click on the Explore button for "Communication Server" and install the package.
Checks to see if the communication server is currently running. This should be executed from the context of the web app attempting communication with a local desktop app.
import { checkIfCommServerRunning } from "@todesktop/client-comm-server";
const ports = [20001, 39214];
checkIfCommServerRunning(ports).then(async (isRunning) => {
console.log(isRunning); // true
});
Broadcasts a message to the running desktop app.
import { broadcast } from "@todesktop/client-comm-server";
const ports = [20001, 39214];
const res = await broadcast(ports, { foo: "bar" });
console.log(res);
Listens to messages that have been forwarded from the communication server.
import { handleBroadcast } from "@todesktop/client-comm-server";
const unsubscribe = handleBroadcast((data) => {
console.log(data);
return "acknowledged";
});
// ...later
unsubscribe();
FAQs
Communicate between the web browser and your desktop app.
The npm package @todesktop/client-comm-server receives a total of 498 weekly downloads. As such, @todesktop/client-comm-server popularity was classified as not popular.
We found that @todesktop/client-comm-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.