![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
jetstream
Advanced tools
Readme
Jetstream for Node is a server that brokers syncing Jetstream models over the Jetstream Sync protocol. Out of the box it has a single Websocket transport adapter with the ability to add custom transport adapters.
CONTRIBUTION.md
.npm install jetstream
npm start
npm test
See the docs
directory. A good start is with docs/overview.md
.
Jetstream works with two basic concepts: All your model objects extend from the superclass ModelObject
and one of your ModelObject instances will be the root for your model tree encapsulated by a Scope
.
Let's model a canvas of shapes:
var createModel = require('jetstream').model;
var Shape = createModel('Shape', function() {
this.has('x', Number);
this.has('y', Number);
this.has('width', Number);
this.has('height', Number);
this.has('type', Number);
});
var Canvas = createModel('Canvas', function() {
this.has('name', String);
this.has('shapes', [Shape]);
});
Supported types are String
, Number
, Boolean
, Date
, ModelObject
and [ModelObject]
var createScope = require('jetstream').scope;
var createServer = require('jetstream');
var createWebsocketTransport = require('jetstream').transport.WebsocketTransport.configure;
// Example of connecting multiple clients to a shared scope
var canvas = new Canvas();
canvas.name = 'Shapes Demo';
var scope = createScope({name: 'Canvas'});
scope.setRoot(canvas);
// Start server with default transports
var websocketTransport = createWebsocketTransport({port: 3000});
var transports = [websocketTransport];
var server = createServer({transports: transports});
server.on('session', function(session, params, callback) {
// Accept the session, no authentication or authorization in this example
callback();
session.on('fetch', function(name, params, callback) {
// Verify fetching the scope
if (name !== scope.name) {
return callback(new Error('No such scope'));
}
callback(null, scope);
});
});
Jetstream uses JSON-based messages to create sessions, fetch scopes and synchronize changes. In case you want to build your own client or server, refer to the protocol documentation.
Jetstream is available under the MIT license. See the LICENSE file for more info.
FAQs
Jetstream Sync server framework to sync local and remote models
The npm package jetstream receives a total of 5 weekly downloads. As such, jetstream popularity was classified as not popular.
We found that jetstream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.