make it work with Node 6.x

Tests still require Node.js 8 for async/await
This commit is contained in:
Alexander Zeitler 2017-08-24 16:48:16 +02:00
parent 4fae99d8e4
commit cd9df6ca19
3 changed files with 591 additions and 99 deletions

View file

@ -1,16 +1,20 @@
'use strict'; 'use strict';
const { promisify } = require('util'); const promisify = require('es6-promisify');
const exec = promisify(require('child_process').exec); const exec = promisify(require('child_process').exec, { multiArgs: true });
const logger = require('./lib/log'); const logger = require('./lib/log');
const logStandards = function (standards) { const logStandards = function (standards) {
if (standards.stdout.length > 0) { const stdout = standards.stdout || standards[0];
logger.info(standards.stdout);
if (stdout && stdout.length > 0) {
logger.info(stdout);
} }
if (standards.stderr) { const stderr = standards.stderr || standards[1];
logger.warn(standards.stderr);
if (stderr) {
logger.warn(stderr);
} }
}; };

671
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "docker-compose", "name": "docker-compose",
"version": "0.2.0", "version": "0.3.0",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "./node_modules/tape/bin/tape test", "test": "./node_modules/tape/bin/tape test",
@ -14,6 +14,7 @@
"license": "MIT", "license": "MIT",
"description": "Manage docker-compose from Node.js", "description": "Manage docker-compose from Node.js",
"dependencies": { "dependencies": {
"es6-promisify": "^5.0.0",
"winston": "^2.3.1" "winston": "^2.3.1"
}, },
"devDependencies": { "devDependencies": {