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

@f5devcentral/f5-cloud-libs-consul

Package Overview
Dependencies
Maintainers
14
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@f5devcentral/f5-cloud-libs-consul - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

RELEASE_NOTES.md

2

lib/consulCloudProvider.js

@@ -101,3 +101,3 @@ /**

const jmesPathQueryOption = this.providerOptions.jmesPathQuery
|| '[*].{id:ID||Node,ip:{private:Node,public:Node}}';
|| '[*].{id:ID||Node,ip:{private:Address,public:Address}}';

@@ -104,0 +104,0 @@ if (this.providerOptions.secret) {

{
"name": "@f5devcentral/f5-cloud-libs-consul",
"version": "1.3.0",
"version": "1.3.1",
"description": "Hashicorp Consul implementation of f5-cloud-libs provider specific code",

@@ -20,2 +20,3 @@ "keywords": [

"dependencies": {
"@f5devcentral/f5-cloud-libs": "^4.24.0-beta.1",
"q": "^1.5.1"

@@ -22,0 +23,0 @@ },

@@ -26,2 +26,3 @@ /**

const origRunShellCommand = cloudUtil.runShellCommand;
const origGetDataFromUrl = cloudUtil.getDataFromUrl;
const origReadFile = fs.readFile;

@@ -51,2 +52,8 @@

function mockGetDataFromUrl(response) {
cloudUtil.getDataFromUrl = function getDataFromUrl() {
return response;
};
}
// Our tests cause too many event listeners. Turn off the check.

@@ -65,2 +72,3 @@ process.setMaxListeners(0);

cloudUtil.runShellCommand = origRunShellCommand;
cloudUtil.getDataFromUrl = origGetDataFromUrl;
fs.readFile = origReadFile;

@@ -240,4 +248,47 @@ callback();

});
},
testJmesPath(test) {
const consulResponse = [
{
ID: '40e4a748-2192-161a-0510-9bf59fe950b5',
Node: 'test-node-1',
Address: '192.0.1.100'
},
{
ID: '8f246b77-f3e1-ff88-5b48-8ec93abf3e05',
Node: 'test-node-2',
Address: '192.0.1.200'
}
];
mockGetDataFromUrl(q(consulResponse));
testProvider.getNodesFromUri('https://example.com')
.then((processedData) => {
test.deepEqual(processedData, [
{
id: '40e4a748-2192-161a-0510-9bf59fe950b5',
ip: {
public: '192.0.1.100',
private: '192.0.1.100'
}
},
{
id: '8f246b77-f3e1-ff88-5b48-8ec93abf3e05',
ip: {
public: '192.0.1.200',
private: '192.0.1.200'
}
}
]);
})
.catch((err) => {
test.ok(false, err);
})
.finally(() => {
test.done();
});
}
}
};
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