Comparing version 3.3.0 to 3.3.1
@@ -17,7 +17,10 @@ var util = require('./util'); | ||
* Inspect | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback, if specified Docker will be queried. | ||
* @return {Object} Name only if callback isn't specified. | ||
*/ | ||
Config.prototype.inspect = function(callback) { | ||
Config.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -27,2 +30,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -36,3 +40,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -48,3 +52,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -62,5 +66,3 @@ } | ||
var self = this; | ||
if (!callback && typeof opts === 'function') { | ||
callback = opts; | ||
} | ||
var args = util.processArgs(opts, callback); | ||
@@ -70,2 +72,3 @@ var optsf = { | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -77,6 +80,6 @@ 200: true, | ||
}, | ||
options: opts | ||
options: args.opts | ||
}; | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -92,3 +95,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -111,2 +114,3 @@ } | ||
method: 'DELETE', | ||
abortSignal: opts.abortSignal, | ||
statusCodes: { | ||
@@ -113,0 +117,0 @@ 200: true, |
@@ -55,2 +55,3 @@ var extend = require('./util').extend, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -91,2 +92,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -129,2 +131,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -168,2 +171,3 @@ 200: true, | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -195,9 +199,13 @@ 200: true, | ||
* Containers changes | ||
* @param {Object} Options | ||
* @param {Function} callback Callback | ||
*/ | ||
Container.prototype.changes = function(callback) { | ||
Container.prototype.changes = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/containers/' + this.id + '/changes', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -210,3 +218,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -222,3 +230,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -240,2 +248,3 @@ } | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -278,2 +287,3 @@ 200: true, | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -316,2 +326,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
allowEmpty: true, | ||
@@ -346,9 +357,13 @@ statusCodes: { | ||
* Export | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback with the octet-stream. | ||
*/ | ||
Container.prototype.export = function(callback) { | ||
Container.prototype.export = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/containers/' + this.id + '/export', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -362,3 +377,3 @@ statusCodes: { | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -374,3 +389,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -392,2 +407,3 @@ } | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -431,2 +447,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -468,2 +485,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -507,2 +525,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -550,2 +569,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -588,2 +608,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -627,2 +648,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -665,2 +687,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -703,2 +726,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -741,2 +765,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -781,2 +806,3 @@ hijack: args.opts.hijack, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -819,2 +845,3 @@ 200: true, | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -859,2 +886,3 @@ 200: true, // unofficial, but proxies may return it | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -897,2 +925,3 @@ statusCodes: { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -936,2 +965,3 @@ statusCodes: { | ||
method: 'HEAD', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -976,2 +1006,3 @@ statusCodes: { | ||
file: file, | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -1016,2 +1047,3 @@ statusCodes: { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: args.opts.follow || false, | ||
@@ -1057,2 +1089,3 @@ statusCodes: { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: isStream, | ||
@@ -1059,0 +1092,0 @@ statusCodes: { |
@@ -48,2 +48,3 @@ var EventEmitter = require('events').EventEmitter, | ||
authconfig: opts.authconfig, | ||
abortSignal: opts.abortSignal, | ||
statusCodes: { | ||
@@ -99,2 +100,3 @@ 200: true, // unofficial, but proxies may return it | ||
authconfig: auth, | ||
abortSignal: opts.abortSignal, | ||
isStream: true, | ||
@@ -141,2 +143,3 @@ statusCodes: { | ||
file: file, | ||
abortSignal: opts && opts.abortSignal, | ||
isStream: true, | ||
@@ -177,3 +180,3 @@ statusCodes: { | ||
} | ||
if (!opts) | ||
@@ -189,2 +192,3 @@ opts = {}; | ||
file: file, | ||
abortSignal: opts.abortSignal, | ||
isStream: true, | ||
@@ -224,2 +228,3 @@ statusCodes: { | ||
options: opts, | ||
abortSignal: opts.abortSignal, | ||
statusCodes: { | ||
@@ -256,3 +261,2 @@ 200: true, | ||
var self = this; | ||
var content; | ||
@@ -270,2 +274,3 @@ if (!callback && typeof opts === 'function') { | ||
options: opts, | ||
abortSignal: opts && opts.abortSignal, | ||
isStream: true, | ||
@@ -418,2 +423,3 @@ statusCodes: { | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -455,2 +461,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -492,2 +499,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -530,2 +538,3 @@ statusCodes: { | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -566,2 +575,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -605,2 +615,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -640,2 +651,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -681,2 +693,3 @@ 200: true, // unofficial, but proxies may return it | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -723,2 +736,3 @@ 200: true, // unofficial, but proxies may return it | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -759,2 +773,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -794,2 +809,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -834,2 +850,3 @@ 200: true, // unofficial, but proxies may return it | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -870,2 +887,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -895,6 +913,8 @@ 200: true, | ||
* Prune builder | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.pruneBuilder = function(callback) { | ||
Docker.prototype.pruneBuilder = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -904,2 +924,3 @@ var optsf = { | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -911,3 +932,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -923,3 +944,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -942,2 +963,3 @@ } | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -978,2 +1000,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1014,2 +1037,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1051,2 +1075,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1099,2 +1124,3 @@ 200: true, // unofficial, but proxies may return it | ||
authconfig: auth, | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -1138,2 +1164,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1174,2 +1201,3 @@ 200: true, | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1214,2 +1242,3 @@ 200: true, // unofficial, but proxies may return it | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1250,2 +1279,3 @@ 200: true, | ||
authconfig: opts.authconfig, | ||
abortSignal: opts.abortSignal, | ||
statusCodes: { | ||
@@ -1275,9 +1305,13 @@ 200: true, | ||
* Info | ||
* @param {Function} callback Callback with info | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback with info | ||
*/ | ||
Docker.prototype.info = function(callback) { | ||
Docker.prototype.info = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var opts = { | ||
path: '/info', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1290,3 +1324,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -1302,3 +1336,3 @@ self.modem.dial(opts, function(err, data) { | ||
this.modem.dial(opts, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -1310,9 +1344,13 @@ } | ||
* Version | ||
* @param {Function} callback Callback | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.version = function(callback) { | ||
Docker.prototype.version = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var opts = { | ||
path: '/version', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1324,3 +1362,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -1336,3 +1374,3 @@ self.modem.dial(opts, function(err, data) { | ||
this.modem.dial(opts, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -1344,9 +1382,13 @@ } | ||
* Ping | ||
* @param {Function} callback Callback | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.ping = function(callback) { | ||
Docker.prototype.ping = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/_ping', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1358,3 +1400,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -1370,3 +1412,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -1379,9 +1421,13 @@ } | ||
* get usage data information | ||
* @param {Function} callback Callback | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.df = function(callback) { | ||
Docker.prototype.df = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/system/df', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1393,3 +1439,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -1405,3 +1451,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -1424,2 +1470,3 @@ } | ||
options: args.opts, | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -1646,2 +1693,3 @@ statusCodes: { | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1684,2 +1732,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1722,2 +1771,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1759,2 +1809,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1789,9 +1840,13 @@ 200: true, | ||
* | ||
* @param {Function} callback Callback | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.swarmInspect = function(callback) { | ||
Docker.prototype.swarmInspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
path: '/swarm', | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -1804,3 +1859,3 @@ 200: true, | ||
if (callback === undefined) { | ||
if (args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -1816,3 +1871,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -1819,0 +1874,0 @@ } |
@@ -28,2 +28,3 @@ var util = require('./util'); | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -74,2 +75,3 @@ allowEmpty: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -103,6 +105,8 @@ 200: true, | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {function} callback | ||
*/ | ||
Exec.prototype.inspect = function(callback) { | ||
Exec.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -112,2 +116,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -120,3 +125,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -133,3 +138,3 @@ self.modem.dial(optsf, function(err, data) { | ||
if (err) return callback(err, data); | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -136,0 +141,0 @@ } |
@@ -172,2 +172,3 @@ var util = require('./util'); | ||
authconfig: args.opts.authconfig || auth, | ||
abortSignal: args.opts.abortSignal, | ||
isStream: isStream, | ||
@@ -210,2 +211,3 @@ statusCodes: { | ||
options: opts, | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -246,6 +248,6 @@ 200: true, // unofficial, but proxies may return it | ||
var optsf = { | ||
path: '/images/' + this.name + '?', | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -252,0 +254,0 @@ 200: true, |
@@ -63,2 +63,3 @@ var util = require('./util'); | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -103,2 +104,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -142,2 +144,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -144,0 +147,0 @@ 200: true, |
@@ -18,6 +18,8 @@ var util = require('./util'); | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {function} callback | ||
*/ | ||
Node.prototype.inspect = function(callback) { | ||
Node.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -27,2 +29,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.abortSignal, | ||
statusCodes: { | ||
@@ -35,3 +38,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -47,3 +50,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -69,2 +72,3 @@ } | ||
method: 'POST', | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -110,2 +114,3 @@ 200: true, | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -112,0 +117,0 @@ 200: true, |
@@ -18,7 +18,10 @@ var util = require('./util'); | ||
* Inspect | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback, if specified Docker will be queried. | ||
* @return {Object} Name only if callback isn't specified. | ||
*/ | ||
Plugin.prototype.inspect = function(callback) { | ||
Plugin.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -28,2 +31,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -36,3 +40,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -48,3 +52,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -66,2 +70,3 @@ } | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -94,7 +99,10 @@ 200: true, | ||
* get privileges | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
* @return {Object} Name only if callback isn't specified. | ||
*/ | ||
Plugin.prototype.privileges = function(callback) { | ||
Plugin.prototype.privileges = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
var optsf = { | ||
@@ -106,2 +114,3 @@ path: '/plugins/privileges?', | ||
}, | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -113,3 +122,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -125,3 +134,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -151,2 +160,3 @@ } | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: true, | ||
@@ -190,2 +200,3 @@ options: args.opts, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -226,2 +237,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -262,2 +274,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -299,2 +312,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -343,2 +357,3 @@ 200: true, | ||
method: 'POST', | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -345,0 +360,0 @@ 200: true, |
@@ -17,7 +17,9 @@ var util = require('./util'); | ||
* Inspect | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback, if specified Docker will be queried. | ||
* @return {Object} Name only if callback isn't specified. | ||
*/ | ||
Secret.prototype.inspect = function(callback) { | ||
Secret.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -27,2 +29,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -36,3 +39,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -48,3 +51,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -69,2 +72,3 @@ } | ||
method: 'POST', | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -107,2 +111,3 @@ 200: true, | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -109,0 +114,0 @@ 200: true, |
@@ -18,6 +18,8 @@ var util = require('./util'); | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {function} callback | ||
*/ | ||
Service.prototype.inspect = function(callback) { | ||
Service.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -27,2 +29,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -35,3 +38,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -47,3 +50,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -56,6 +59,8 @@ } | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {function} callback | ||
*/ | ||
Service.prototype.remove = function(callback) { | ||
Service.prototype.remove = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -65,2 +70,3 @@ var optsf = { | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -74,3 +80,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -86,3 +92,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -116,2 +122,3 @@ } | ||
method: 'POST', | ||
abortSignal: opts && opts.abortSignal, | ||
statusCodes: { | ||
@@ -156,2 +163,3 @@ 200: true, | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: args.opts.follow || false, | ||
@@ -158,0 +166,0 @@ statusCodes: { |
@@ -22,6 +22,8 @@ var util = require('./util'); | ||
* | ||
* @param {Object} opts Options (optional) | ||
* @param {function} callback | ||
*/ | ||
Task.prototype.inspect = function(callback) { | ||
Task.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -31,2 +33,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -39,3 +42,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -51,3 +54,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -69,2 +72,3 @@ } | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
isStream: args.opts.follow || false, | ||
@@ -71,0 +75,0 @@ statusCodes: { |
@@ -17,7 +17,9 @@ var util = require('./util'); | ||
* Inspect | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback, if specified Docker will be queried. | ||
* @return {Object} Name only if callback isn't specified. | ||
*/ | ||
Volume.prototype.inspect = function(callback) { | ||
Volume.prototype.inspect = function(opts, callback) { | ||
var self = this; | ||
var args = util.processArgs(opts, callback); | ||
@@ -27,2 +29,3 @@ var optsf = { | ||
method: 'GET', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -35,3 +38,3 @@ 200: true, | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
@@ -47,3 +50,3 @@ self.modem.dial(optsf, function(err, data) { | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -65,2 +68,3 @@ } | ||
method: 'DELETE', | ||
abortSignal: args.opts.abortSignal, | ||
statusCodes: { | ||
@@ -67,0 +71,0 @@ 204: true, |
{ | ||
"name": "dockerode", | ||
"description": "Docker Remote API module.", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"author": "Pedro Dias <petermdias@gmail.com>", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
@@ -15,3 +15,7 @@ # dockerode [![Build Status](https://travis-ci.org/apocas/dockerode.svg?branch=master)](https://travis-ci.org/apocas/dockerode) | ||
## Ecosystem | ||
* docker-modem [https://github.com/apocas/docker-modem](https://github.com/apocas/docker-modem) - Docker's API network stack | ||
* dockerode-compose [https://github.com/apocas/dockerode-compose](https://github.com/apocas/dockerode-compose) - docker-compose in Node.js | ||
## Installation | ||
@@ -18,0 +22,0 @@ |
Sorry, the diff of this file is not supported yet
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
146944
4278
523