Comparing version 2.5.4 to 2.5.5
@@ -992,3 +992,3 @@ var extend = require('./util').extend, | ||
method: 'GET', | ||
isStream: true, | ||
isStream: args.opts.follow || false, | ||
statusCodes: { | ||
@@ -995,0 +995,0 @@ 200: true, |
@@ -250,4 +250,4 @@ var EventEmitter = require('events').EventEmitter, | ||
var self = this; | ||
var pack = tar.pack(); | ||
var content; | ||
var pack; | ||
@@ -302,9 +302,5 @@ if (!callback && typeof opts === 'function') { | ||
if (file && file.context) { | ||
file.src.forEach(function(filePath) { | ||
content = fs.readFileSync(path.join(file.context, filePath)); | ||
pack.entry({ | ||
name: filePath | ||
}, content); | ||
pack = tar.pack(file.context, { | ||
entries: file.src | ||
}); | ||
pack.finalize(); | ||
return build(pack.pipe(zlib.createGzip())); | ||
@@ -311,0 +307,0 @@ } else { |
@@ -55,6 +55,7 @@ var util = require('./util'); | ||
*/ | ||
Image.prototype.distribution = function(callback) { | ||
Image.prototype.distribution = function(opts, callback) { | ||
var args = util.processArgs(opts, callback); | ||
var self = this; | ||
var opts = { | ||
var fopts = { | ||
path: '/distribution/' + this.name + '/json', | ||
@@ -66,8 +67,9 @@ method: 'GET', | ||
500: 'server error' | ||
} | ||
}, | ||
authconfig: (args.opts) ? args.opts.authconfig : undefined | ||
}; | ||
if(callback === undefined) { | ||
if(args.callback === undefined) { | ||
return new this.modem.Promise(function(resolve, reject) { | ||
self.modem.dial(opts, function(err, data) { | ||
self.modem.dial(fopts, function(err, data) { | ||
if (err) { | ||
@@ -80,5 +82,5 @@ return reject(err); | ||
} else { | ||
this.modem.dial(opts, function(err, data) { | ||
if (err) return callback(err, data); | ||
callback(err, data); | ||
this.modem.dial(fopts, function(err, data) { | ||
if (err) return args.callback(err, data); | ||
args.callback(err, data); | ||
}); | ||
@@ -85,0 +87,0 @@ } |
@@ -146,3 +146,3 @@ var util = require('./util'); | ||
method: 'GET', | ||
isStream: true, | ||
isStream: args.opts.follow || false, | ||
statusCodes: { | ||
@@ -149,0 +149,0 @@ 200: true, |
{ | ||
"name": "dockerode", | ||
"description": "Docker Remote API module.", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"author": "Pedro Dias <petermdias@gmail.com>", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
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
129290
4085