New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

influx

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

influx - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

13

index.js

@@ -132,3 +132,16 @@

InfluxDB.prototype.getUsers = function(databaseName, callback) {
this.request.get({
url: this.url('db/' + databaseName + '/users'),
json: true
}, this._parseCallback(callback));
};
InfluxDB.prototype.getUser = function(databaseName, username, callback) {
this.request.get({
url: this.url('db/' + databaseName + '/users/' + username),
json: true
}, this._parseCallback(callback));
};
InfluxDB.prototype.createUser = function(databaseName, username, password, callback) {

@@ -135,0 +148,0 @@ this.request.post({

2

package.json
{
"name": "influx",
"version": "3.1.0",
"version": "3.2.0",
"description": "InfluxDB Client",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -132,2 +132,16 @@ # node-influx

###getUsers
Returns an array of database users - requires cluster admin privileges
```js
getUsers(databaseName, callback) { }
```
###getUser
Returns a database user - requires cluster admin privileges
```js
getUser(databaseName, username, callback) { }
```
###createUser

@@ -134,0 +148,0 @@ Creates a new database user - requires cluster admin privileges

@@ -130,2 +130,13 @@ var influx = require('./');

describe('#getUsers', function() {
it('should get an array of database users', function (done) {
client.getUsers(info.db.name, function(err, users) {
assert.equal(err, null);
assert(users instanceof Array);
assert.equal(users.length, 0);
done();
});
});
});
describe('#createUser', function () {

@@ -143,2 +154,13 @@ it('should create a user without error', function (done) {

describe('#getUser', function() {
it('should get a database user without error', function (done) {
client.getUser(info.db.name, info.db.username, done);
});
it('should error when getting non existing user', function (done) {
client.getUser(info.db.name, 'johndoe', function (err) {
assert(err instanceof Error);
done();
});
});
});

@@ -145,0 +167,0 @@ describe('#updateUser', function () {

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