
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
deskthing-client
Advanced tools
The DeskThing-App is one of two required modules needed to make your own DeskThing App. It serves as a communication layer between your webpage and the rest of the client.
To install the client, use the following command:
npm install deskthing-client
To use the DeskThing client in your application, you need to import it and get an instance:
import DeskThing from 'deskthing-client';
const deskThing = DeskThing.getInstance();
You can send messages to the server using the send method. For example, to send a JSON object to the server:
deskThing.send({ type: 'set', payload: examplePayload });
On the server side, you need to import the DeskThing server module and listen for events:
import DeskThing from 'deskthing-server';
const deskThing = DeskThing.getInstance();
deskThing.on('set', (socketData) => {
console.log(socketData.payload);
});
Here is a more complete example demonstrating two-way communication between the client and server:
import DeskThing from 'deskthing-client';
const deskThing = DeskThing.getInstance();
// Sending a message to the server
deskThing.send({ type: 'set', payload: { key: 'value' } });
// Listening for a response from the server
deskThing.on('response', (data) => {
console.log('Received response from server:', data);
});
import DeskThing from 'deskthing-server';
const deskThing = DeskThing.getInstance();
// Listening for a 'set' message from the client
deskThing.on('set', (socketData) => {
console.log('Received payload:', socketData.payload);
// Sending a response back to the client
deskThing.sendDataToClient(socketData.socketId, {
type: 'response',
payload: { message: 'Data received successfully' }
});
});
For more detailed examples and intended implementations, please refer to the apps located at https://github.com/itsriprod/deskthing-apps
FAQs
The Deskthing connector for the client webapps
The npm package deskthing-client receives a total of 3 weekly downloads. As such, deskthing-client popularity was classified as not popular.
We found that deskthing-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.