
Product
Socket Brings Supply Chain Security to skills.sh
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.
Expose HTML5 Server Sent Events as an installable appliance on Node.JS http servers; connections are emitted as Writable streams.
var http = require('http')
, fs = require('fs')
, through = require('through')
, sse = require('sse-stream')('/sse')
, serv
module.exports = serv = http.createServer(function(req, resp) {
resp.setHeader('content-type', 'text/html')
resp.end('<html><body><script type="text/javascript">('+js+')()</script></body></html>')
})
sse.install(serv)
sse.on('connection', function(client) {
fs.createReadStream('/usr/share/dict/words')
.pipe(through(function(buf) { this.emit('data', buf.toString()) }))
.pipe(client)
})
// client-side code:
function js() {
var es = new EventSource('/sse')
, pre = document.createElement('pre')
, closed = false
document.body.appendChild(pre)
es.onmessage = function(ev) {
if(closed) return
pre.appendChild(document.createTextNode(ev.data))
window.scrollTo(0, pre.clientHeight)
}
es.addEventListener('end', function() {
es.close()
closed = true
}, true)
es.onerror = function(e) {
closed = true
}
}
Create a SSE server that emits connection events on new, successful eventstream connections.
The argument may either be a string path to listen on (defaults to /sse/) or an object:
{ path: '/listen/on/this/path'
, keepalive: 1000 }
keepalive determines the interval time in ms that keepalives will be sent to all connected clients.
client is a writable stream representing a client connection (request response pair).
Of note, all data sent through this connection will be stringified before sending due to the event stream spec.
Send a "retry" message that lets the client know how many MS to wait until retrying a connection that ended.
MIT
FAQs
expose html5 server sent events (sse) as a writable stream
The npm package sse-stream receives a total of 271 weekly downloads. As such, sse-stream popularity was classified as not popular.
We found that sse-stream 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.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.