
Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Inter connect local machines together with a Express like socket router. Data transfer is cipphered with Diffie Hellman algorithm (dynamic public / private key exchange between peers based on a shared password).
Inter connect local machines together with a Express like socket router. Data transfer is cipphered with Diffie Hellman algorithm (dynamic public / private key exchange between peers based on a shared password).
var Synapsis = require('synapsis');
var synapse = new Synapsis({
namespace: 'namespace-name',
password: '123456',
// Identity will be shared to all peers
identity: {
name : 'dashboard1',
hostname : process.env.HOSTNAME
}
});
// Router
synapse.router('command:restart', () => {
console.log('Got Restart');
});
synapse.router('command:sync_db', (new_db, reply) => {
fs.writeFile('current_db.json', new_db, (err) => {
if (err)
return reply(err);
reply(null, 'DB Synced');
});
});
// Events
synapse.on('peer:connected', function(socket) {
console.log('New peer detected', socket.identity);
});
synapse.on('peer:disconnected', function(err) {
console.error(err);
});
synapse.on('error', function(err) {
console.error(err);
});
synapse.on('ready', function() {
// Broadcast a message to all nodes (w/o current) and do not wait for response
synapse.broadcast('command:restart');
// Broadcast a message + data to all nodes (w/o current) and do not wait for response
synapse.broadcast('command:restart', { some : 'data' });
// Broadcast a message to all nodes (w/o current) and receive messages from each (RPC like)
synapse.broadcast('command:sync_db', { my : { db : true } }, function(err, response) {
console.log(err, response);
});
});
MIT
FAQs
Automatic pub/sub over every possible network. It just works.
We found that synapsis 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
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.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.