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

dockerode-compose

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerode-compose - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

23

compose.js
const yaml = require('js-yaml');
const fs = require('fs');
const stream = require('stream');

@@ -45,2 +46,3 @@ const secrets = require('./lib/secrets');

async pull(serviceN, options) {
options = options || {};
var streams = [];

@@ -51,11 +53,16 @@ var serviceNames = (serviceN === undefined || serviceN === null) ? tools.sortServices(this.recipe) : [serviceN];

try {
var stream = await this.docker.pull(service.image);
streams.push(stream);
if (options && options.verbose) {
stream.pipe(process.stdout);
} else {
stream.pipe(new require('stream').PassThrough());
var streami = await this.docker.pull(service.image);
streams.push(streami);
if (options.verbose === true) {
streami.pipe(process.stdout);
}
if (options === undefined || (options && options.streams !== true)) {
await new Promise(fulfill => stream.once('end', fulfill));
if (options.streams !== true) {
if (options.verbose === true) {
streami.pipe(process.stdout);
} else {
streami.pipe(stream.PassThrough());
}
await new Promise(fulfill => streami.once('end', fulfill));
}

@@ -62,0 +69,0 @@ } catch (e) {

{
"name": "dockerode-compose",
"version": "1.2.0",
"version": "1.2.1",
"description": "docker-compose in nodejs using dockerode",

@@ -5,0 +5,0 @@ "main": "./compose.js",

@@ -27,2 +27,11 @@ const expect = require('chai').expect,

});
it("should pull all needed images returning streams", function (done) {
this.timeout(600000);
(async () => {
var streams = await compose.pull(null, { 'streams': true });
expect(streams).to.be.ok;
done();
})();
});
});

@@ -29,0 +38,0 @@

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