@sapphirecode/dcm
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -132,28 +132,36 @@ "use strict"; | ||
// eslint-disable-next-line no-async-promise-executor | ||
threads.push(new Promise(function (res) { return __awaiter(_this, void 0, void 0, function () { | ||
var service, waiting_for; | ||
threads.push(new Promise(function (res, reject) { return __awaiter(_this, void 0, void 0, function () { | ||
var service, waiting_for, e_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
if (!(queue.length > 0)) return [3 /*break*/, 6]; | ||
_a.trys.push([0, 8, , 9]); | ||
_a.label = 1; | ||
case 1: | ||
if (!(queue.length > 0)) return [3 /*break*/, 7]; | ||
service = queue.shift(); | ||
(0, assert_1.default)(typeof service !== 'undefined'); | ||
waiting_for = 0; | ||
_a.label = 1; | ||
case 1: | ||
_a.label = 2; | ||
case 2: | ||
waiting_for = service.depends_on.filter(function (dep) { return started.indexOf(dep) < 0; }).length; | ||
return [4 /*yield*/, (0, util_1.delay)(100)]; | ||
case 2: | ||
case 3: | ||
_a.sent(); | ||
_a.label = 3; | ||
case 3: | ||
if (waiting_for > 0) return [3 /*break*/, 1]; | ||
_a.label = 4; | ||
case 4: return [4 /*yield*/, (service === null || service === void 0 ? void 0 : service.up())]; | ||
case 5: | ||
case 4: | ||
if (waiting_for > 0) return [3 /*break*/, 2]; | ||
_a.label = 5; | ||
case 5: return [4 /*yield*/, (service === null || service === void 0 ? void 0 : service.up())]; | ||
case 6: | ||
_a.sent(); | ||
return [3 /*break*/, 0]; | ||
case 6: | ||
return [3 /*break*/, 1]; | ||
case 7: | ||
res(); | ||
return [2 /*return*/]; | ||
return [3 /*break*/, 9]; | ||
case 8: | ||
e_1 = _a.sent(); | ||
reject(e_1); | ||
return [3 /*break*/, 9]; | ||
case 9: return [2 /*return*/]; | ||
} | ||
@@ -160,0 +168,0 @@ }); |
@@ -56,16 +56,21 @@ import path from 'path'; | ||
// eslint-disable-next-line no-async-promise-executor | ||
threads.push (new Promise<void> (async (res) => { | ||
while (queue.length > 0) { | ||
const service = queue.shift (); | ||
assert (typeof service !== 'undefined'); | ||
let waiting_for = 0; | ||
do { | ||
waiting_for = service.depends_on.filter ( | ||
(dep) => started.indexOf (dep) < 0 | ||
).length; | ||
await delay (100); | ||
} while (waiting_for > 0); | ||
await service?.up (); | ||
threads.push (new Promise<void> (async (res, reject) => { | ||
try { | ||
while (queue.length > 0) { | ||
const service = queue.shift (); | ||
assert (typeof service !== 'undefined'); | ||
let waiting_for = 0; | ||
do { | ||
waiting_for = service.depends_on.filter ( | ||
(dep) => started.indexOf (dep) < 0 | ||
).length; | ||
await delay (100); | ||
} while (waiting_for > 0); | ||
await service?.up (); | ||
} | ||
res (); | ||
} | ||
res (); | ||
catch (e) { | ||
reject (e); | ||
} | ||
})); | ||
@@ -72,0 +77,0 @@ } |
{ | ||
"name": "@sapphirecode/dcm", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "description": "Managing docker compose configurations, volumes and networks", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
88147
1945
1