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

consul

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consul - npm Package Compare versions

Comparing version 0.29.0 to 0.30.0

4

lib/agent.js

@@ -144,3 +144,3 @@ /**

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -172,3 +172,3 @@

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -175,0 +175,0 @@

@@ -94,3 +94,3 @@ /**

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -125,3 +125,3 @@

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -156,3 +156,3 @@

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -187,3 +187,3 @@

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -190,0 +190,0 @@

@@ -113,3 +113,3 @@ /**

this.consul._get(req, utils.empty, callback);
this.consul._put(req, utils.empty, callback);
};

@@ -116,0 +116,0 @@

@@ -73,3 +73,3 @@ /**

utils.options(req, opts);
utils.options(req, opts, { near: true });

@@ -138,3 +138,3 @@ this.consul._post(req, utils.body, callback);

utils.options(req, opts);
utils.options(req, opts, { near: true });

@@ -141,0 +141,0 @@ this.consul._put(req, utils.empty, callback);

@@ -89,23 +89,28 @@ /**

function options(req, opts) {
function options(req, opts, ignore) {
if (!opts) opts = {};
if (!ignore) ignore = {};
if (!req.query) req.query = {};
if (opts.dc) req.query.dc = opts.dc;
if (opts.wan) req.query.wan = '1';
if (opts.dc && !ignore.dc) req.query.dc = opts.dc;
if (opts.wan && !ignore.wan) req.query.wan = '1';
if (opts.consistent) {
if (opts.consistent && !ignore.consistent) {
req.query.consistent = '1';
} else if (opts.stale) {
} else if (opts.stale && !ignore.stale) {
req.query.stale = '1';
}
if (opts.hasOwnProperty('index')) req.query.index = opts.index;
if (opts.hasOwnProperty('wait')) req.query.wait = opts.wait;
if (opts.hasOwnProperty('token')) req.query.token = opts.token;
if (opts.hasOwnProperty('index') && !ignore.index) req.query.index = opts.index;
if (opts.hasOwnProperty('wait') && !ignore.wait) req.query.wait = opts.wait;
if (opts.hasOwnProperty('token') && !ignore.token) req.query.token = opts.token;
if (opts.hasOwnProperty('near') && !ignore.near) req.query.near = opts.near;
if (opts.hasOwnProperty('node-meta') && !ignore['node-meta']) {
req.query['node-meta'] = opts['node-meta'];
}
// papi
if (opts.hasOwnProperty('ctx')) req.ctx = opts.ctx;
if (opts.hasOwnProperty('timeout')) req.timeout = opts.timeout;
if (opts.hasOwnProperty('ctx') && !ignore.ctx) req.ctx = opts.ctx;
if (opts.hasOwnProperty('timeout') && !ignore.timeout) req.timeout = opts.timeout;
}

@@ -112,0 +117,0 @@

{
"name": "consul",
"version": "0.29.0",
"version": "0.30.0",
"description": "Consul client",

@@ -5,0 +5,0 @@ "main": "./lib",

@@ -80,2 +80,4 @@ # Consul [![Build Status](https://travis-ci.org/silas/node-consul.png?branch=master)](https://travis-ci.org/silas/node-consul)

* token (String, optional): ACL token
* near (String, optional): used to sort the node list in ascending order based on the estimated round trip time from that node
* node-meta (String[], optional): used to specify a desired node metadata key/value pair of the form key:value

@@ -82,0 +84,0 @@ These options work for all methods.

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