Comparing version 3.0.2 to 3.1.0
@@ -175,4 +175,7 @@ var EventEmitter = require('events').EventEmitter, | ||
callback = opts; | ||
opts = undefined; | ||
} | ||
if (!opts) | ||
opts = {}; | ||
} | ||
@@ -491,2 +494,39 @@ opts.fromSrc = '-'; | ||
/** | ||
* Get images | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.getImages = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/images/get?', | ||
method: 'GET', | ||
options: args.opts, | ||
isStream: true, | ||
statusCodes: { | ||
200: true, | ||
400: 'bad parameter', | ||
500: 'server error' | ||
} | ||
}; | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
self.modem.dial(optsf, function(err, data) { | ||
if (err) { | ||
return reject(err); | ||
} | ||
resolve(data); | ||
}); | ||
}); | ||
} else { | ||
this.modem.dial(optsf, function(err, data) { | ||
args.callback(err, data); | ||
}); | ||
} | ||
}; | ||
/** | ||
* Lists Services | ||
@@ -1154,3 +1194,3 @@ * @param {Object} opts | ||
/** | ||
* Lists networkss | ||
* Lists networks | ||
* @param {Object} opts Options (optional) | ||
@@ -1157,0 +1197,0 @@ * @param {Function} callback Callback |
@@ -20,7 +20,8 @@ var util = require('./util'); | ||
*/ | ||
Network.prototype.inspect = function(callback) { | ||
Network.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var opts = { | ||
path: '/networks/' + this.id, | ||
path: '/networks/' + this.id + '?', | ||
method: 'GET', | ||
@@ -31,7 +32,7 @@ statusCodes: { | ||
500: 'server error' | ||
} | ||
}, | ||
options: args.opts | ||
}; | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -47,3 +48,3 @@ self.modem.dial(opts, function(err, data) { | ||
this.modem.dial(opts, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -50,0 +51,0 @@ } |
170
package.json
{ | ||
"name": "dockerode", | ||
"description": "Docker Remote API module.", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"author": "Pedro Dias <petermdias@gmail.com>", | ||
@@ -19,3 +19,3 @@ "maintainers": [ | ||
"concat-stream": "~2.0.0", | ||
"docker-modem": "^2.0.0", | ||
"docker-modem": "^2.1.0", | ||
"tar-fs": "~2.0.0" | ||
@@ -36,167 +36,3 @@ }, | ||
"node": ">= 8.0" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Pedro Dias", | ||
"email": "petermdias@gmail.com", | ||
"url": "https://github.com/apocas", | ||
"contributions": 150 | ||
}, | ||
{ | ||
"name": "James Lal", | ||
"email": "jlal@mozilla.com", | ||
"url": "https://github.com/lightsofapollo", | ||
"contributions": 12 | ||
}, | ||
{ | ||
"name": "Ron Waldon", | ||
"email": "jokeyrhyme@gmail.com", | ||
"url": "https://github.com/jokeyrhyme", | ||
"contributions": 7 | ||
}, | ||
{ | ||
"name": "Everton Ribeiro", | ||
"email": "nuxlli@gmail.com", | ||
"url": "https://github.com/nuxlli", | ||
"contributions": 4 | ||
}, | ||
{ | ||
"name": "Sam Rijs", | ||
"email": "srijs@airpost.net", | ||
"url": "https://github.com/srijs", | ||
"contributions": 4 | ||
}, | ||
{ | ||
"name": "Shannon Poole", | ||
"email": "shannon.m.poole@gmail.com", | ||
"url": "https://github.com/shannonmpoole", | ||
"contributions": 3 | ||
}, | ||
{ | ||
"name": "Max Claus Nunes", | ||
"email": "maxcnunes@gmail.com", | ||
"url": "https://github.com/maxcnunes", | ||
"contributions": 2 | ||
}, | ||
{ | ||
"name": "Mike MacCana", | ||
"email": "mike.maccana@gmail.com", | ||
"url": "https://github.com/mikemaccana", | ||
"contributions": 2 | ||
}, | ||
{ | ||
"name": "Niclas Hoyer", | ||
"email": "", | ||
"url": "https://github.com/niclashoyer", | ||
"contributions": 2 | ||
}, | ||
{ | ||
"name": "Nicholas Morsman", | ||
"email": "nicholas@publishlab.com", | ||
"url": "https://github.com/nmorsman", | ||
"contributions": 2 | ||
}, | ||
{ | ||
"name": "Philip Reichenberger", | ||
"email": null, | ||
"url": "https://github.com/preichenberger", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Anton Serdyuk", | ||
"email": "anton.serdyuk@gmail.com", | ||
"url": "https://github.com/m00t", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Dan Williams", | ||
"email": "me+github@deedubs.com", | ||
"url": "https://github.com/deedubs", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Alex Wolfe", | ||
"email": "alexkwolfe@gmail.com", | ||
"url": "https://github.com/alexkwolfe", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Henry Allen-Tilford", | ||
"email": "htilford@gmail.com", | ||
"url": "https://github.com/generalhenry", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Geoffrey Bachelet", | ||
"email": "geoffrey.bachelet@gmail.com", | ||
"url": "https://github.com/ubermuda", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Jacob Friis Saxberg", | ||
"email": "jacob@saxberg.dk", | ||
"url": "https://github.com/webjay", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Jeffrey Morgan", | ||
"email": "jmorganca@gmail.com", | ||
"url": "https://github.com/jeffdm", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Kishore Nallan", | ||
"email": "kishore@kishorelive.com", | ||
"url": "https://github.com/kishorenc", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Mathias Buus", | ||
"email": "mathiasbuus@gmail.com", | ||
"url": "https://github.com/mafintosh", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Matthew Gallagher", | ||
"email": "mattva01@gmail.com", | ||
"url": "https://github.com/mattva01", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Wojciech Kocjan", | ||
"email": null, | ||
"url": "https://github.com/wojciechka", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Mike Macaulay", | ||
"email": "mmacaula@gmail.com", | ||
"url": "https://github.com/mmacaula", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Josh Matthews", | ||
"email": "josh@jmatthews.us", | ||
"url": "https://github.com/jmatth", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Vincent Woo", | ||
"email": "vincent@coderpad.io", | ||
"url": "https://github.com/vincentwoo", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Lewis J Ellis", | ||
"email": "me@lewisjellis.com", | ||
"url": "https://github.com/LewisJEllis", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"name": "Adam Duncan", | ||
"email": "", | ||
"url": "https://github.com/microadam", | ||
"contributions": 1 | ||
} | ||
] | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4162
140014
Updateddocker-modem@^2.1.0