Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

changefeed

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changefeed - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

7

CHANGES.md

@@ -32,1 +32,8 @@ # node-sdc-changefeed changelog

publisher.
## 1.3.0
* Make `options.restifyServer` parameter optional for the `Publisher`
constructor.
* Add `Publisher.prototype.mountRestifyServerRoutes(restifyServer)` to the
`Publisher`'s API.
* Make `Listener.prototype.close` an alias for `Listener.prototype._endSocket`.

13

lib/listener.js

@@ -8,3 +8,3 @@ /*

/*
* Copyright (c) 2015, Joyent, Inc.
* Copyright (c) 2017, Joyent, Inc.
*/

@@ -123,3 +123,3 @@

var client = mod_restify.createClient(clientOpts);
var client = self.client = mod_restify.createClient(clientOpts);

@@ -253,7 +253,14 @@ var expBackoff_opts = self.backoff_opts ? {

Listener.prototype.close =
Listener.prototype._endSocket = function _endSocket() {
this.log.trace('cf: _endSocket: start');
this.wsc.end();
if (this.wsc) {
this.wsc.end();
}
if (this.client) {
this.client.close();
}
};
module.exports = Listener;

@@ -8,7 +8,7 @@ /*

/*
* Copyright (c) 2015, Joyent, Inc.
* Copyright (c) 2017, Joyent, Inc.
*/
var EventEmitter = require('events').EventEmitter;
var mod_assert = require('assert');
var mod_assert = require('assert-plus');
var mod_backoff = require('backoff');

@@ -176,3 +176,25 @@ var mod_bunyan = require('bunyan');

var server = options.restifyServer;
if (options && options.restifyServer) {
self.mountRestifyServerRoutes(options.restifyServer);
}
}
mod_util.inherits(Publisher, EventEmitter);
/*
* Sets up the restify handlers required for changefeed listeners to be able to
* use (query and connect to) this changefeed publisher instance.
*
* @params {Object} restifyServer - A restify server instance on which restify
* handlers will be registered
*
* Returns undefined.
*/
Publisher.prototype.mountRestifyServerRoutes =
function mountRestifyServerRoutes(restifyServer) {
mod_assert.object(restifyServer, 'restifyServer');
var log = this.log;
var self = this;
var server = restifyServer;
server.get({

@@ -245,6 +267,4 @@ name: 'changefeeds',

});
}
};
mod_util.inherits(Publisher, EventEmitter);
/*

@@ -251,0 +271,0 @@ * Halts all publishing operations including Moray polling and WebSocket push

{
"name": "changefeed",
"description": "Change Feed Modules",
"version": "1.2.2",
"version": "1.3.0",
"author": "Joyent (joyent.com)",

@@ -16,2 +16,3 @@ "repository": {

"bunyan": "1.5.1",
"jsprim": "1.4.0",
"libuuid": "0.2.1",

@@ -18,0 +19,0 @@ "moray": "git+ssh://git@github.com:joyent/node-moray.git#fd5781bc25a9",

@@ -8,3 +8,3 @@ <!--

<!--
Copyright (c) 2016, Joyent, Inc.
Copyright (c) 2017, Joyent, Inc.
-->

@@ -11,0 +11,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc