Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

disclose

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disclose

A ZeroMQ npm publish event source.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

disclose

disclose is a ZeroMQ publisher of the npm publish event stream.

Basic Usage

$ npm i -g disclose
$ disclose

Subscriber Example

import zmq from 'zmq';
import Disclose from 'disclose';


let socket = zmq.socket('sub');
socket.identity = 'npm-publish-subscriber-' + process.pid;
socket.connect('tcp://127.0.0.1:12345');
socket.subscribe(Disclose.EVENT);
socket.on('message', function(type/*, identity*/, event) {
    type = type.toString();
    event = JSON.parse(event.toString());
    console.log(event.id);
});

Options

All command-line flags are optional. Defaults are listed below.

--interval, -i

The polling interval, in milliseconds, disclose should use when checking for new packages. Defaults to 30,000 or 30 seconds.

--host, -h

The hostname, including protocol and port, (but not path) of the npm registry to observe. Defaults to 'https://skimdb.npmjs.com:443'.

--adddess, -a

The address to which ZeroMQ should bind. Defaults to 'tcp://127.0.0.1:12345'.

--identity, -id

The ZeroMQ socket identity to use. Will be formatted to include process pid if name contains '%d'. Defaults to 'npm-publish-source-%d'.

Keywords

npm

FAQs

Package last updated on 27 Feb 2015

Did you know?

Socket

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.

Install

Related posts