vis-dev-utils 2.9.82 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * Development utilities for the Vis family projects.
8
8
  *
9
- * @version 2.9.82
10
- * @date 2021-08-16T19:13:30.626Z
9
+ * @version 3.0.1
10
+ * @date 2022-03-07T20:39:45.311Z
11
11
  *
12
12
  * @copyright (c) 2011-2017 Almende B.V, http://almende.com
13
13
  * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
@@ -45,10 +45,13 @@ var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
45
45
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
46
46
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
47
47
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
48
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
48
+ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
49
+ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
50
+ var _Object$create = require('@babel/runtime-corejs3/core-js-stable/object/create');
49
51
  var _Object$freeze = require('@babel/runtime-corejs3/core-js-stable/object/freeze');
50
52
  var _Map = require('@babel/runtime-corejs3/core-js-stable/map');
51
53
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
54
+ var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
52
55
  var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
53
56
  var _repeatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/repeat');
54
57
  var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
@@ -57,13 +60,12 @@ var findUp = require('find-up');
57
60
  var fsExtra = require('fs-extra');
58
61
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
59
62
  var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
60
- var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
61
63
  var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
62
64
  var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
63
65
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
66
+ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
64
67
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
65
68
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
66
- var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
67
69
  var _padStartInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/pad-start');
68
70
  var child_process = require('child_process');
69
71
 
@@ -85,23 +87,25 @@ var _Set__default = /*#__PURE__*/_interopDefaultLegacy(_Set);
85
87
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_concatInstanceProperty);
86
88
  var _Object$keys__default = /*#__PURE__*/_interopDefaultLegacy(_Object$keys);
87
89
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_filterInstanceProperty);
88
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_bindInstanceProperty);
90
+ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_forEachInstanceProperty);
91
+ var _JSON$stringify__default = /*#__PURE__*/_interopDefaultLegacy(_JSON$stringify);
92
+ var _Object$create__default = /*#__PURE__*/_interopDefaultLegacy(_Object$create);
89
93
  var _Object$freeze__default = /*#__PURE__*/_interopDefaultLegacy(_Object$freeze);
90
94
  var _Map__default = /*#__PURE__*/_interopDefaultLegacy(_Map);
91
95
  var _Promise__default = /*#__PURE__*/_interopDefaultLegacy(_Promise);
96
+ var _everyInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_everyInstanceProperty);
92
97
  var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_valuesInstanceProperty);
93
98
  var _repeatInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_repeatInstanceProperty);
94
99
  var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
95
100
  var findUp__default = /*#__PURE__*/_interopDefaultLegacy(findUp);
96
101
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefaultLegacy(_Object$getOwnPropertySymbols);
97
102
  var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefaultLegacy(_Object$getOwnPropertyDescriptor);
98
- var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_forEachInstanceProperty);
99
103
  var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefaultLegacy(_Object$getOwnPropertyDescriptors);
100
104
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefaultLegacy(_Object$defineProperties);
101
105
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_Object$defineProperty);
106
+ var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
102
107
  var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
103
108
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
104
- var _JSON$stringify__default = /*#__PURE__*/_interopDefaultLegacy(_JSON$stringify);
105
109
  var _padStartInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_padStartInstanceProperty);
106
110
 
107
111
  var y = yargs__default['default'].strict(true).usage("test-e2e-interop [options]").hide("version").config().help().option("fail-command", {
@@ -132,13 +136,13 @@ var y = yargs__default['default'].strict(true).usage("test-e2e-interop [options]
132
136
  function parseArguments() {
133
137
  return y.parserConfiguration({
134
138
  "camel-case-expansion": false
135
- }).parse();
139
+ }).parseSync();
136
140
  }
137
141
 
138
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
142
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); enumerableOnly && (symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
139
143
 
140
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default['default'](_context7 = ownKeys(Object(source), true)).call(_context7, function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default['default']) { _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)); } else { var _context8; _forEachInstanceProperty__default['default'](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } } return target; }
141
- var ProjectState =
144
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default['default'](_context8 = ownKeys(Object(source), !0)).call(_context8, function (key) { _defineProperty__default['default'](target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default['default'] ? _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)) : _forEachInstanceProperty__default['default'](_context9 = ownKeys(Object(source))).call(_context9, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } return target; }
145
+ var ProjectState = /*#__PURE__*/_createClass__default['default'](
142
146
  /**
143
147
  * This will be resolved or rejected once all the tasks associated with this
144
148
  * project finish.
@@ -172,7 +176,7 @@ function ProjectState() {
172
176
  _this.resolve = resolve;
173
177
  _this.reject = reject;
174
178
  });
175
- };
179
+ });
176
180
  /**
177
181
  * @param title
178
182
  * @param details
@@ -198,18 +202,28 @@ function logInfo(title, details) {
198
202
  /**
199
203
  * @param cwd
200
204
  * @param failCommand
205
+ * @param error
201
206
  */
202
207
 
203
- function execFail(cwd, failCommand) {
208
+ function execFail(cwd, failCommand, error) {
204
209
  if (failCommand) {
205
- child_process.execSync(failCommand, {
206
- cwd: cwd,
207
- encoding: "utf8",
208
- env: _objectSpread(_objectSpread({}, process.env), {}, {
209
- VIS_INTEROP: "1"
210
- }),
211
- stdio: "inherit"
212
- });
210
+ console.error("\n\nReason for debugging:");
211
+ console.error(error);
212
+ console.error("\n\nDebuging:");
213
+
214
+ try {
215
+ child_process.execSync(failCommand, {
216
+ cwd: cwd,
217
+ encoding: "utf8",
218
+ env: _objectSpread(_objectSpread({}, process.env), {}, {
219
+ VIS_INTEROP: "1"
220
+ }),
221
+ stdio: "inherit"
222
+ });
223
+ } catch (error) {
224
+ console.error(error);
225
+ console.error("The error above is the fail command exitting with non-zero status, not an actual failure in the interop test.");
226
+ }
213
227
  }
214
228
  }
215
229
  /**
@@ -228,7 +242,7 @@ function createSpawner(logDir, getState) {
228
242
  var getHeaderLines = function getHeaderLines() {
229
243
  var _context3;
230
244
 
231
- return _concatInstanceProperty__default['default'](_context3 = ["time: " + new Date().toISOString(), "id: " + id + " ", "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
245
+ return _concatInstanceProperty__default['default'](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
232
246
  return _JSON$stringify__default['default'](word);
233
247
  }).join(" "), "states:"]).call(_context3, _toConsumableArray__default['default'](getState()));
234
248
  };
@@ -245,8 +259,8 @@ function createSpawner(logDir, getState) {
245
259
  return new _Promise__default['default'](function (resolve, reject) {
246
260
  var _context5;
247
261
 
248
- var failed = false;
249
- var logStream = fsExtra.createWriteStream(path.join(logDir, _padStartInstanceProperty__default['default'](_context5 = "" + id).call(_context5, 3, "0") + ".log"), {
262
+ var commandLogPath = path.join(logDir, _padStartInstanceProperty__default['default'](_context5 = "" + id).call(_context5, 3, "0") + ".log");
263
+ var logStream = fsExtra.createWriteStream(commandLogPath, {
250
264
  flags: "a"
251
265
  });
252
266
  logStream.write(getHeaderLines().join("\n") + "\n\n");
@@ -259,24 +273,61 @@ function createSpawner(logDir, getState) {
259
273
  });
260
274
  child.stdout.pipe(logStream);
261
275
  child.stderr.pipe(logStream);
276
+ var failed = false;
262
277
  child.on("close", function (code) {
263
- if (failed || code !== 0) {
278
+ if (failed) ; else if (code !== 0) {
264
279
  var _context6;
265
280
 
266
281
  logError("Fail", getLogMessage());
267
- execFail(cwd, failCommand);
268
- reject(new Error(_concatInstanceProperty__default['default'](_context6 = "".concat(_mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
282
+
283
+ var errorMessage = _concatInstanceProperty__default['default'](_context6 = "".concat(_mapInstanceProperty__default['default'](cmd).call(cmd, function (word) {
269
284
  return "\"".concat(word, "\"");
270
- }).join(" "), ": exited with ")).call(_context6, code, ".")));
285
+ }).join(" "), ": exited with ")).call(_context6, code, ".");
286
+
287
+ logStream.end(function () {
288
+ _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
289
+ var commandOutput;
290
+ return _regeneratorRuntime__default['default'].wrap(function _callee$(_context7) {
291
+ while (1) {
292
+ switch (_context7.prev = _context7.next) {
293
+ case 0:
294
+ commandOutput = "";
295
+ _context7.prev = 1;
296
+ _context7.t0 = commandOutput;
297
+ _context7.next = 5;
298
+ return fsExtra.readFile(commandLogPath, "utf-8");
299
+
300
+ case 5:
301
+ commandOutput = _context7.t0 += _context7.sent;
302
+ _context7.next = 11;
303
+ break;
304
+
305
+ case 8:
306
+ _context7.prev = 8;
307
+ _context7.t1 = _context7["catch"](1);
308
+ commandOutput += "Failed to log command output.";
309
+
310
+ case 11:
311
+ execFail(cwd, failCommand, commandOutput + "\n\n" + errorMessage);
312
+
313
+ case 12:
314
+ case "end":
315
+ return _context7.stop();
316
+ }
317
+ }
318
+ }, _callee, null, [[1, 8]]);
319
+ }))();
320
+ });
321
+ reject(new Error(errorMessage));
271
322
  } else {
272
323
  logInfo("Okay", getLogMessage());
273
324
  resolve();
274
325
  }
275
326
  });
276
327
  child.on("error", function (error) {
277
- logError("Fail", getLogMessage());
278
328
  failed = true;
279
- execFail(cwd, failCommand);
329
+ logError("Fail", getLogMessage());
330
+ execFail(cwd, failCommand, error);
280
331
  reject(error);
281
332
  });
282
333
  });
@@ -285,7 +336,7 @@ function createSpawner(logDir, getState) {
285
336
 
286
337
  function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol__default['default'] !== "undefined" && _getIteratorMethod__default['default'](o) || o["@@iterator"]; if (!it) { if (_Array$isArray__default['default'](o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
287
338
 
288
- function _unsupportedIterableToArray$1(o, minLen) { var _context29; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default['default'](_context29 = Object.prototype.toString.call(o)).call(_context29, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default['default'](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
339
+ function _unsupportedIterableToArray$1(o, minLen) { var _context33; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default['default'](_context33 = Object.prototype.toString.call(o)).call(_context33, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from__default['default'](o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
289
340
 
290
341
  function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
291
342
 
@@ -482,9 +533,8 @@ function clone(_x7, _x8, _x9) {
482
533
  return _clone.apply(this, arguments);
483
534
  }
484
535
  /**
485
- * @param spawn
486
- * @param data
487
- * @param projectName
536
+ * @param cwd
537
+ * @param deps
488
538
  */
489
539
 
490
540
 
@@ -533,7 +583,81 @@ function _clone() {
533
583
  return _clone.apply(this, arguments);
534
584
  }
535
585
 
536
- function buildTestPack(_x10, _x11, _x12) {
586
+ function updatePackageDepVersions(_x10, _x11) {
587
+ return _updatePackageDepVersions.apply(this, arguments);
588
+ }
589
+ /**
590
+ * @param spawn
591
+ * @param data
592
+ * @param projectName
593
+ */
594
+
595
+
596
+ function _updatePackageDepVersions() {
597
+ _updatePackageDepVersions = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(cwd, deps) {
598
+ var _context8, _packageJSON$dependen, _context9, _packageJSON$devDepen, _context10, _packageJSON$peerDepe;
599
+
600
+ var packageJSONPath, packageJSON;
601
+ return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context11) {
602
+ while (1) {
603
+ switch (_context11.prev = _context11.next) {
604
+ case 0:
605
+ _context11.next = 2;
606
+ return findUp__default['default']("package.json", {
607
+ cwd: cwd
608
+ });
609
+
610
+ case 2:
611
+ packageJSONPath = _context11.sent;
612
+
613
+ if (!(packageJSONPath == null)) {
614
+ _context11.next = 5;
615
+ break;
616
+ }
617
+
618
+ throw new Error("Project's package.json file not found.");
619
+
620
+ case 5:
621
+ _context11.t0 = JSON;
622
+ _context11.next = 8;
623
+ return fsExtra.readFile(packageJSONPath, "utf8");
624
+
625
+ case 8:
626
+ _context11.t1 = _context11.sent;
627
+ packageJSON = _context11.t0.parse.call(_context11.t0, _context11.t1);
628
+
629
+ _forEachInstanceProperty__default['default'](_context8 = _Object$keys__default['default']((_packageJSON$dependen = packageJSON.dependencies) !== null && _packageJSON$dependen !== void 0 ? _packageJSON$dependen : {})).call(_context8, function (key) {
630
+ if (Object.prototype.hasOwnProperty.call(deps, key)) {
631
+ packageJSON.dependencies[key] = "file:" + deps[key];
632
+ }
633
+ });
634
+
635
+ _forEachInstanceProperty__default['default'](_context9 = _Object$keys__default['default']((_packageJSON$devDepen = packageJSON.devDependencies) !== null && _packageJSON$devDepen !== void 0 ? _packageJSON$devDepen : {})).call(_context9, function (key) {
636
+ if (Object.prototype.hasOwnProperty.call(deps, key)) {
637
+ packageJSON.devDependencies[key] = "file:" + deps[key];
638
+ }
639
+ });
640
+
641
+ _forEachInstanceProperty__default['default'](_context10 = _Object$keys__default['default']((_packageJSON$peerDepe = packageJSON.peerDependencies) !== null && _packageJSON$peerDepe !== void 0 ? _packageJSON$peerDepe : {})).call(_context10, function (key) {
642
+ if (Object.prototype.hasOwnProperty.call(deps, key)) {
643
+ packageJSON.peerDependencies[key] = "file:" + deps[key];
644
+ }
645
+ });
646
+
647
+ _context11.next = 15;
648
+ return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default['default'](packageJSON, undefined, 4));
649
+
650
+ case 15:
651
+ case "end":
652
+ return _context11.stop();
653
+ }
654
+ }
655
+ }, _callee6);
656
+ }));
657
+ return _updatePackageDepVersions.apply(this, arguments);
658
+ }
659
+
660
+ function buildTestPack(_x12, _x13, _x14) {
537
661
  return _buildTestPack.apply(this, arguments);
538
662
  }
539
663
  /**
@@ -542,138 +666,147 @@ function buildTestPack(_x10, _x11, _x12) {
542
666
 
543
667
 
544
668
  function _buildTestPack() {
545
- _buildTestPack = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(spawn, data, projectName) {
546
- var _context8, _context9;
669
+ _buildTestPack = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(spawn, data, projectName) {
670
+ var _context12;
547
671
 
548
- var failCommand, packageScripts, tmpReposResolve, cwd, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
672
+ var failCommand, packageScripts, tmpReposResolve, cwd, packageLockPath, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
549
673
 
550
- return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context10) {
674
+ return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context13) {
551
675
  while (1) {
552
- switch (_context10.prev = _context10.next) {
676
+ switch (_context13.prev = _context13.next) {
553
677
  case 0:
554
678
  failCommand = data.failCommand, packageScripts = data.packageScripts, tmpReposResolve = data.tmpReposResolve;
555
679
  cwd = tmpReposResolve(projectName);
556
- _context10.next = 4;
680
+ _context13.t0 = updatePackageDepVersions;
681
+ _context13.t1 = cwd;
682
+ _context13.t2 = _reduceInstanceProperty__default['default'];
683
+ _context13.next = 7;
684
+ return getPackageLocalDeps(data, projectName);
685
+
686
+ case 7:
687
+ _context13.t3 = _context12 = _context13.sent;
688
+ _context13.t4 = (0, _context13.t2)(_context13.t3).call(_context12, function (acc, key) {
689
+ acc[key] = getTarballPath(data, key);
690
+ return acc;
691
+ }, _Object$create__default['default'](null));
692
+ _context13.next = 11;
693
+ return (0, _context13.t0)(_context13.t1, _context13.t4);
694
+
695
+ case 11:
696
+ _context13.next = 13;
697
+ return findUp__default['default']("package-lock.json", {
698
+ cwd: cwd
699
+ });
700
+
701
+ case 13:
702
+ packageLockPath = _context13.sent;
703
+
704
+ if (!(packageLockPath != null)) {
705
+ _context13.next = 17;
706
+ break;
707
+ }
708
+
709
+ _context13.next = 17;
710
+ return fsExtra.unlink(packageLockPath);
711
+
712
+ case 17:
713
+ _context13.next = 19;
557
714
  return spawn({
558
- cmd: ["npm", "ci"],
715
+ cmd: ["npm", "install"],
559
716
  cwd: cwd,
560
717
  failCommand: failCommand
561
718
  });
562
719
 
563
- case 4:
564
- _context10.t0 = spawn;
565
- _context10.t1 = _concatInstanceProperty__default['default'](_context8 = ["npm", "install"]);
566
- _context10.t2 = _context8;
567
- _context10.t3 = _toConsumableArray__default['default'];
568
- _context10.t4 = _mapInstanceProperty__default['default'];
569
- _context10.next = 11;
570
- return getPackageLocalDeps(data, projectName);
571
-
572
- case 11:
573
- _context10.t5 = _context9 = _context10.sent;
574
- _context10.t6 = (0, _context10.t4)(_context10.t5).call(_context9, _bindInstanceProperty__default['default'](getTarballPath).call(getTarballPath, null, data));
575
- _context10.t7 = (0, _context10.t3)(_context10.t6);
576
- _context10.t8 = _context10.t1.call.call(_context10.t1, _context10.t2, _context10.t7);
577
- _context10.t9 = cwd;
578
- _context10.t10 = failCommand;
579
- _context10.t11 = {
580
- cmd: _context10.t8,
581
- cwd: _context10.t9,
582
- failCommand: _context10.t10
583
- };
584
- _context10.next = 20;
585
- return (0, _context10.t0)(_context10.t11);
586
-
587
- case 20:
720
+ case 19:
588
721
  _iterator = _createForOfIteratorHelper$1(packageScripts);
589
- _context10.prev = 21;
722
+ _context13.prev = 20;
590
723
 
591
724
  _iterator.s();
592
725
 
593
- case 23:
726
+ case 22:
594
727
  if ((_step = _iterator.n()).done) {
595
- _context10.next = 38;
728
+ _context13.next = 37;
596
729
  break;
597
730
  }
598
731
 
599
732
  _step$value = _step.value, packageName = _step$value.packageName, scriptName = _step$value.scriptName, skipIfMissing = _step$value.skipIfMissing;
600
733
 
601
734
  if (!(packageName != null && packageName !== projectName)) {
602
- _context10.next = 29;
735
+ _context13.next = 28;
603
736
  break;
604
737
  }
605
738
 
606
- return _context10.abrupt("continue", 36);
739
+ return _context13.abrupt("continue", 35);
607
740
 
608
- case 29:
741
+ case 28:
609
742
  if (!skipIfMissing) {
610
- _context10.next = 34;
743
+ _context13.next = 33;
611
744
  break;
612
745
  }
613
746
 
614
- _context10.next = 32;
747
+ _context13.next = 31;
615
748
  return spawn({
616
749
  cmd: ["npm", "run", scriptName, "--if-present"],
617
750
  cwd: cwd,
618
751
  failCommand: failCommand
619
752
  });
620
753
 
621
- case 32:
622
- _context10.next = 36;
754
+ case 31:
755
+ _context13.next = 35;
623
756
  break;
624
757
 
625
- case 34:
626
- _context10.next = 36;
758
+ case 33:
759
+ _context13.next = 35;
627
760
  return spawn({
628
761
  cmd: ["npm", "run", scriptName],
629
762
  cwd: cwd,
630
763
  failCommand: failCommand
631
764
  });
632
765
 
633
- case 36:
634
- _context10.next = 23;
766
+ case 35:
767
+ _context13.next = 22;
635
768
  break;
636
769
 
637
- case 38:
638
- _context10.next = 43;
770
+ case 37:
771
+ _context13.next = 42;
639
772
  break;
640
773
 
641
- case 40:
642
- _context10.prev = 40;
643
- _context10.t12 = _context10["catch"](21);
774
+ case 39:
775
+ _context13.prev = 39;
776
+ _context13.t5 = _context13["catch"](20);
644
777
 
645
- _iterator.e(_context10.t12);
778
+ _iterator.e(_context13.t5);
646
779
 
647
- case 43:
648
- _context10.prev = 43;
780
+ case 42:
781
+ _context13.prev = 42;
649
782
 
650
783
  _iterator.f();
651
784
 
652
- return _context10.finish(43);
785
+ return _context13.finish(42);
653
786
 
654
- case 46:
655
- _context10.next = 48;
787
+ case 45:
788
+ _context13.next = 47;
656
789
  return spawn({
657
790
  cmd: ["npm", "pack"],
658
791
  cwd: cwd,
659
792
  failCommand: failCommand
660
793
  });
661
794
 
662
- case 48:
663
- _context10.next = 50;
795
+ case 47:
796
+ _context13.next = 49;
664
797
  return copyTarball(data, projectName);
665
798
 
666
- case 50:
799
+ case 49:
667
800
  case "end":
668
- return _context10.stop();
801
+ return _context13.stop();
669
802
  }
670
803
  }
671
- }, _callee6, null, [[21, 40, 43, 46]]);
804
+ }, _callee7, null, [[20, 39, 42, 45]]);
672
805
  }));
673
806
  return _buildTestPack.apply(this, arguments);
674
807
  }
675
808
 
676
- function checkTmpPath(_x13) {
809
+ function checkTmpPath(_x15) {
677
810
  return _checkTmpPath.apply(this, arguments);
678
811
  }
679
812
  /**
@@ -686,21 +819,21 @@ function checkTmpPath(_x13) {
686
819
 
687
820
 
688
821
  function _checkTmpPath() {
689
- _checkTmpPath = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(data) {
822
+ _checkTmpPath = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee8(data) {
690
823
  var tmpDir;
691
- return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context11) {
824
+ return _regeneratorRuntime__default['default'].wrap(function _callee8$(_context14) {
692
825
  while (1) {
693
- switch (_context11.prev = _context11.next) {
826
+ switch (_context14.prev = _context14.next) {
694
827
  case 0:
695
828
  tmpDir = data.tmpRootResolve();
696
- _context11.next = 3;
829
+ _context14.next = 3;
697
830
  return fsExtra.readdir(tmpDir);
698
831
 
699
832
  case 3:
700
- _context11.t0 = _context11.sent.length;
833
+ _context14.t0 = _context14.sent.length;
701
834
 
702
- if (!(_context11.t0 !== 0)) {
703
- _context11.next = 6;
835
+ if (!(_context14.t0 !== 0)) {
836
+ _context14.next = 6;
704
837
  break;
705
838
  }
706
839
 
@@ -708,207 +841,207 @@ function _checkTmpPath() {
708
841
 
709
842
  case 6:
710
843
  case "end":
711
- return _context11.stop();
844
+ return _context14.stop();
712
845
  }
713
846
  }
714
- }, _callee7);
847
+ }, _callee8);
715
848
  }));
716
849
  return _checkTmpPath.apply(this, arguments);
717
850
  }
718
851
 
719
- function test(_x14) {
852
+ function test(_x16) {
720
853
  return _test.apply(this, arguments);
721
854
  }
722
855
 
723
856
  function _test() {
724
- _test = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee10(_ref2) {
725
- var _context15;
857
+ _test = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee11(_ref2) {
858
+ var _context18;
726
859
 
727
- var failCommand, packageScripts, projectPaths, tmpPath, data, projectStatuses, getStages, _context18, _context19, spawn, _context23, _context24, _context25, _context26, _context27, _iterator3, _step3, _step3$value, projectName, promise;
860
+ var failCommand, packageScripts, projectPaths, tmpPath, data, projectStatuses, getStages, _context21, _context22, _context26, _context27, spawn, allSucceeded, _context28, _context29, _context30, _context31, _iterator3, _step3, _step3$value, projectName, promise;
728
861
 
729
- return _regeneratorRuntime__default['default'].wrap(function _callee10$(_context28) {
862
+ return _regeneratorRuntime__default['default'].wrap(function _callee11$(_context32) {
730
863
  while (1) {
731
- switch (_context28.prev = _context28.next) {
864
+ switch (_context32.prev = _context32.next) {
732
865
  case 0:
733
866
  getStages = function _getStages() {
734
- var _context16;
867
+ var _context19;
735
868
 
736
- return _mapInstanceProperty__default['default'](_context16 = _toConsumableArray__default['default'](projectStatuses)).call(_context16, function (_ref3) {
737
- var _context17;
869
+ return _mapInstanceProperty__default['default'](_context19 = _toConsumableArray__default['default'](projectStatuses)).call(_context19, function (_ref3) {
870
+ var _context20;
738
871
 
739
872
  var _ref4 = _slicedToArray__default['default'](_ref3, 2),
740
873
  key = _ref4[0],
741
874
  stage = _ref4[1].stage;
742
875
 
743
- return _concatInstanceProperty__default['default'](_context17 = " ".concat(key, ": ")).call(_context17, stage);
876
+ return _concatInstanceProperty__default['default'](_context20 = " ".concat(key, ": ")).call(_context20, stage);
744
877
  });
745
878
  };
746
879
 
747
880
  failCommand = _ref2.failCommand, packageScripts = _ref2.packageScripts, projectPaths = _ref2.projectPaths, tmpPath = _ref2.tmpPath;
748
881
 
749
882
  if (!(process.env.VIS_INTEROP === "1")) {
750
- _context28.next = 5;
883
+ _context32.next = 5;
751
884
  break;
752
885
  }
753
886
 
754
887
  // This would result in infinite loop otherwise.
755
888
  logInfo("Skipping interop test.");
756
- return _context28.abrupt("return");
889
+ return _context32.abrupt("return", true);
757
890
 
758
891
  case 5:
759
- _context28.t0 = _Object$freeze__default['default'];
760
- _context28.t1 = failCommand;
761
- _context28.t2 = packageScripts;
762
- _context28.t3 = projectPaths;
763
- _context28.next = 11;
892
+ _context32.t0 = _Object$freeze__default['default'];
893
+ _context32.t1 = failCommand;
894
+ _context32.t2 = packageScripts;
895
+ _context32.t3 = projectPaths;
896
+ _context32.next = 11;
764
897
  return prepareTmpDir(tmpPath ? path.resolve(tmpPath, "repos") : undefined);
765
898
 
766
899
  case 11:
767
- _context28.t4 = _context28.sent;
900
+ _context32.t4 = _context32.sent;
768
901
 
769
- _context28.t5 = function tmpLogsResolve() {
770
- var _context12;
902
+ _context32.t5 = function tmpLogsResolve() {
903
+ var _context15;
771
904
 
772
905
  for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {
773
906
  paths[_key] = arguments[_key];
774
907
  }
775
908
 
776
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context12 = [data.tmpDir.name, "logs"]).call(_context12, paths));
909
+ return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
777
910
  };
778
911
 
779
- _context28.t6 = function tmpReposResolve() {
780
- var _context13;
912
+ _context32.t6 = function tmpReposResolve() {
913
+ var _context16;
781
914
 
782
915
  for (var _len2 = arguments.length, paths = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
783
916
  paths[_key2] = arguments[_key2];
784
917
  }
785
918
 
786
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context13 = [data.tmpDir.name, "repos"]).call(_context13, paths));
919
+ return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
787
920
  };
788
921
 
789
- _context28.t7 = function tmpRootResolve() {
790
- var _context14;
922
+ _context32.t7 = function tmpRootResolve() {
923
+ var _context17;
791
924
 
792
925
  for (var _len3 = arguments.length, paths = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
793
926
  paths[_key3] = arguments[_key3];
794
927
  }
795
928
 
796
- return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context14 = [data.tmpDir.name]).call(_context14, paths));
929
+ return path.resolve.apply(void 0, _concatInstanceProperty__default['default'](_context17 = [data.tmpDir.name]).call(_context17, paths));
797
930
  };
798
931
 
799
- _context28.t8 = process.cwd();
800
- _context28.t9 = {
801
- failCommand: _context28.t1,
802
- packageScripts: _context28.t2,
803
- projectPaths: _context28.t3,
804
- tmpDir: _context28.t4,
805
- tmpLogsResolve: _context28.t5,
806
- tmpReposResolve: _context28.t6,
807
- tmpRootResolve: _context28.t7,
808
- visDevUtilsPath: _context28.t8
932
+ _context32.t8 = process.cwd();
933
+ _context32.t9 = {
934
+ failCommand: _context32.t1,
935
+ packageScripts: _context32.t2,
936
+ projectPaths: _context32.t3,
937
+ tmpDir: _context32.t4,
938
+ tmpLogsResolve: _context32.t5,
939
+ tmpReposResolve: _context32.t6,
940
+ tmpRootResolve: _context32.t7,
941
+ visDevUtilsPath: _context32.t8
809
942
  };
810
- data = (0, _context28.t0)(_context28.t9);
811
- projectStatuses = new _Map__default['default'](_mapInstanceProperty__default['default'](_context15 = _Object$keys__default['default'](data.projectPaths)).call(_context15, function (project) {
943
+ data = (0, _context32.t0)(_context32.t9);
944
+ projectStatuses = new _Map__default['default'](_mapInstanceProperty__default['default'](_context18 = _Object$keys__default['default'](data.projectPaths)).call(_context18, function (project) {
812
945
  return [project, new ProjectState()];
813
946
  }));
814
947
  /**
815
948
  *
816
949
  */
817
950
 
818
- _context28.prev = 19;
951
+ _context32.prev = 19;
819
952
  spawn = createSpawner(data.tmpLogsResolve(), getStages);
820
- _context28.next = 23;
953
+ _context32.next = 23;
821
954
  return checkTmpPath(data);
822
955
 
823
956
  case 23:
824
- _context28.next = 25;
825
- return _Promise__default['default'].all(_mapInstanceProperty__default['default'](_context18 = ["repos", "logs"]).call(_context18, function (dir) {
957
+ _context32.next = 25;
958
+ return _Promise__default['default'].all(_mapInstanceProperty__default['default'](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
826
959
  return fsExtra.mkdir(path.resolve(data.tmpDir.name, dir));
827
960
  }));
828
961
 
829
962
  case 25:
830
963
  logInfo("Begin", getStages().join("\n"));
831
- _context28.next = 28;
832
- return _Promise__default['default'].allSettled(_mapInstanceProperty__default['default'](_context19 = _toConsumableArray__default['default'](projectStatuses)).call(_context19, /*#__PURE__*/function () {
833
- var _ref6 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee9(_ref5) {
834
- var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context21;
964
+ _context32.next = 28;
965
+ return _Promise__default['default'].all(_mapInstanceProperty__default['default'](_context22 = _toConsumableArray__default['default'](projectStatuses)).call(_context22, /*#__PURE__*/function () {
966
+ var _ref6 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee10(_ref5) {
967
+ var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context24;
835
968
 
836
- return _regeneratorRuntime__default['default'].wrap(function _callee9$(_context22) {
969
+ return _regeneratorRuntime__default['default'].wrap(function _callee10$(_context25) {
837
970
  while (1) {
838
- switch (_context22.prev = _context22.next) {
971
+ switch (_context25.prev = _context25.next) {
839
972
  case 0:
840
973
  _ref7 = _slicedToArray__default['default'](_ref5, 2), projectName = _ref7[0], state = _ref7[1];
841
- _context22.prev = 1;
974
+ _context25.prev = 1;
842
975
  state.stage = "preparing";
843
976
  projectPath = data.projectPaths[projectName];
844
- _context22.next = 6;
845
- return _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee8() {
846
- return _regeneratorRuntime__default['default'].wrap(function _callee8$(_context20) {
977
+ _context25.next = 6;
978
+ return _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee9() {
979
+ return _regeneratorRuntime__default['default'].wrap(function _callee9$(_context23) {
847
980
  while (1) {
848
- switch (_context20.prev = _context20.next) {
981
+ switch (_context23.prev = _context23.next) {
849
982
  case 0:
850
- _context20.prev = 0;
851
- _context20.next = 3;
983
+ _context23.prev = 0;
984
+ _context23.next = 3;
852
985
  return fsExtra.lstat(projectPath);
853
986
 
854
987
  case 3:
855
- return _context20.abrupt("return", _context20.sent);
988
+ return _context23.abrupt("return", _context23.sent);
856
989
 
857
990
  case 6:
858
- _context20.prev = 6;
859
- _context20.t0 = _context20["catch"](0);
860
- return _context20.abrupt("return", null);
991
+ _context23.prev = 6;
992
+ _context23.t0 = _context23["catch"](0);
993
+ return _context23.abrupt("return", null);
861
994
 
862
995
  case 9:
863
996
  case "end":
864
- return _context20.stop();
997
+ return _context23.stop();
865
998
  }
866
999
  }
867
- }, _callee8, null, [[0, 6]]);
1000
+ }, _callee9, null, [[0, 6]]);
868
1001
  }))();
869
1002
 
870
1003
  case 6:
871
- stats = _context22.sent;
1004
+ stats = _context25.sent;
872
1005
 
873
1006
  if (!(stats !== null && stats !== void 0 && stats.isFile())) {
874
- _context22.next = 14;
1007
+ _context25.next = 14;
875
1008
  break;
876
1009
  }
877
1010
 
878
1011
  // The path points to a ready to install tarball.
879
1012
  state.stage = "copying tarball";
880
- _context22.next = 11;
1013
+ _context25.next = 11;
881
1014
  return fsExtra.copyFile(projectPath, getTarballPath(data, projectName));
882
1015
 
883
1016
  case 11:
884
1017
  state.stage = "tarball copied";
885
- _context22.next = 56;
1018
+ _context25.next = 56;
886
1019
  break;
887
1020
 
888
1021
  case 14:
889
1022
  // The path points to a repo (maybe remote) that has to be built,
890
1023
  // tested and packed first.
891
1024
  state.stage = "cloning";
892
- _context22.next = 17;
1025
+ _context25.next = 17;
893
1026
  return clone(spawn, data, projectName);
894
1027
 
895
1028
  case 17:
896
1029
  state.stage = "gathering dependencies";
897
1030
  failedDeps = [];
898
- _context22.next = 21;
1031
+ _context25.next = 21;
899
1032
  return getPackageLocalDeps(data, projectName);
900
1033
 
901
1034
  case 21:
902
- localDeps = _context22.sent;
1035
+ localDeps = _context25.sent;
903
1036
  state.stage = "waiting for dependencies (".concat(localDeps.join(", "), ")");
904
1037
  _iterator2 = _createForOfIteratorHelper$1(localDeps);
905
- _context22.prev = 24;
1038
+ _context25.prev = 24;
906
1039
 
907
1040
  _iterator2.s();
908
1041
 
909
1042
  case 26:
910
1043
  if ((_step2 = _iterator2.n()).done) {
911
- _context22.next = 41;
1044
+ _context25.next = 41;
912
1045
  break;
913
1046
  }
914
1047
 
@@ -916,50 +1049,50 @@ function _test() {
916
1049
  depStatus = projectStatuses.get(localDep);
917
1050
 
918
1051
  if (!(depStatus == null)) {
919
- _context22.next = 31;
1052
+ _context25.next = 31;
920
1053
  break;
921
1054
  }
922
1055
 
923
1056
  throw new Error("Dependency ".concat(localDep, " not found."));
924
1057
 
925
1058
  case 31:
926
- _context22.prev = 31;
927
- _context22.next = 34;
1059
+ _context25.prev = 31;
1060
+ _context25.next = 34;
928
1061
  return depStatus.promise;
929
1062
 
930
1063
  case 34:
931
- _context22.next = 39;
1064
+ _context25.next = 39;
932
1065
  break;
933
1066
 
934
1067
  case 36:
935
- _context22.prev = 36;
936
- _context22.t0 = _context22["catch"](31);
1068
+ _context25.prev = 36;
1069
+ _context25.t0 = _context25["catch"](31);
937
1070
  failedDeps.push(localDep);
938
1071
 
939
1072
  case 39:
940
- _context22.next = 26;
1073
+ _context25.next = 26;
941
1074
  break;
942
1075
 
943
1076
  case 41:
944
- _context22.next = 46;
1077
+ _context25.next = 46;
945
1078
  break;
946
1079
 
947
1080
  case 43:
948
- _context22.prev = 43;
949
- _context22.t1 = _context22["catch"](24);
1081
+ _context25.prev = 43;
1082
+ _context25.t1 = _context25["catch"](24);
950
1083
 
951
- _iterator2.e(_context22.t1);
1084
+ _iterator2.e(_context25.t1);
952
1085
 
953
1086
  case 46:
954
- _context22.prev = 46;
1087
+ _context25.prev = 46;
955
1088
 
956
1089
  _iterator2.f();
957
1090
 
958
- return _context22.finish(46);
1091
+ return _context25.finish(46);
959
1092
 
960
1093
  case 49:
961
1094
  if (!(failedDeps.length > 0)) {
962
- _context22.next = 52;
1095
+ _context25.next = 52;
963
1096
  break;
964
1097
  }
965
1098
 
@@ -968,7 +1101,7 @@ function _test() {
968
1101
 
969
1102
  case 52:
970
1103
  state.stage = "running CI tasks";
971
- _context22.next = 55;
1104
+ _context25.next = 55;
972
1105
  return buildTestPack(spawn, data, projectName);
973
1106
 
974
1107
  case 55:
@@ -977,122 +1110,140 @@ function _test() {
977
1110
  case 56:
978
1111
  logInfo("Okay ".concat(projectName), getStages().join("\n"));
979
1112
  state.resolve();
980
- _context22.next = 64;
1113
+ _context25.next = 64;
981
1114
  break;
982
1115
 
983
1116
  case 60:
984
- _context22.prev = 60;
985
- _context22.t2 = _context22["catch"](1);
986
- logError(_concatInstanceProperty__default['default'](_context21 = "Fail ".concat(projectName, " (")).call(_context21, state.stage, ")"), getStages().join("\n"));
987
- state.reject(_context22.t2);
1117
+ _context25.prev = 60;
1118
+ _context25.t2 = _context25["catch"](1);
1119
+ logError(_concatInstanceProperty__default['default'](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
1120
+ state.reject(_context25.t2);
988
1121
 
989
1122
  case 64:
990
1123
  case "end":
991
- return _context22.stop();
1124
+ return _context25.stop();
992
1125
  }
993
1126
  }
994
- }, _callee9, null, [[1, 60], [24, 43, 46, 49], [31, 36]]);
1127
+ }, _callee10, null, [[1, 60], [24, 43, 46, 49], [31, 36]]);
995
1128
  }));
996
1129
 
997
- return function (_x15) {
1130
+ return function (_x17) {
998
1131
  return _ref6.apply(this, arguments);
999
1132
  };
1000
1133
  }()));
1001
1134
 
1002
1135
  case 28:
1003
- _context28.prev = 28;
1004
- _context28.next = 31;
1005
- return _Promise__default['default'].allSettled(_mapInstanceProperty__default['default'](_context23 = _toConsumableArray__default['default'](_valuesInstanceProperty__default['default'](projectStatuses).call(projectStatuses))).call(_context23, function (state) {
1006
- return state.promise;
1136
+ _context32.t10 = _everyInstanceProperty__default['default'];
1137
+ _context32.next = 31;
1138
+ return _Promise__default['default'].allSettled(_mapInstanceProperty__default['default'](_context27 = _toConsumableArray__default['default'](_valuesInstanceProperty__default['default'](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
1139
+ return status.promise;
1007
1140
  }));
1008
1141
 
1009
1142
  case 31:
1010
- // Log the state summary and any errors encountered.
1143
+ _context32.t11 = _context26 = _context32.sent;
1144
+ allSucceeded = (0, _context32.t10)(_context32.t11).call(_context26, function (_ref9) {
1145
+ var status = _ref9.status;
1146
+ return status === "fulfilled";
1147
+ });
1148
+
1149
+ if (!allSucceeded) {
1150
+ _context32.next = 37;
1151
+ break;
1152
+ }
1153
+
1154
+ return _context32.abrupt("return", true);
1155
+
1156
+ case 37:
1157
+ return _context32.abrupt("return", false);
1158
+
1159
+ case 38:
1160
+ _context32.prev = 38;
1161
+ // Wait for all the projects to finish and log the state summary and any
1162
+ // errors encountered.
1011
1163
  logInfo("End", getStages().join("\n"));
1012
1164
  _iterator3 = _createForOfIteratorHelper$1(projectStatuses);
1013
- _context28.prev = 33;
1165
+ _context32.prev = 41;
1014
1166
 
1015
1167
  _iterator3.s();
1016
1168
 
1017
- case 35:
1169
+ case 43:
1018
1170
  if ((_step3 = _iterator3.n()).done) {
1019
- _context28.next = 47;
1171
+ _context32.next = 55;
1020
1172
  break;
1021
1173
  }
1022
1174
 
1023
1175
  _step3$value = _slicedToArray__default['default'](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
1024
- _context28.prev = 37;
1025
- _context28.next = 40;
1176
+ _context32.prev = 45;
1177
+ _context32.next = 48;
1026
1178
  return promise;
1027
1179
 
1028
- case 40:
1029
- _context28.next = 45;
1180
+ case 48:
1181
+ _context32.next = 53;
1030
1182
  break;
1031
1183
 
1032
- case 42:
1033
- _context28.prev = 42;
1034
- _context28.t10 = _context28["catch"](37);
1035
- logError("".concat(projectName, " failed with"), _context28.t10);
1184
+ case 50:
1185
+ _context32.prev = 50;
1186
+ _context32.t12 = _context32["catch"](45);
1187
+ logError("".concat(projectName, " failed with"), _context32.t12);
1036
1188
 
1037
- case 45:
1038
- _context28.next = 35;
1189
+ case 53:
1190
+ _context32.next = 43;
1039
1191
  break;
1040
1192
 
1041
- case 47:
1042
- _context28.next = 52;
1193
+ case 55:
1194
+ _context32.next = 60;
1043
1195
  break;
1044
1196
 
1045
- case 49:
1046
- _context28.prev = 49;
1047
- _context28.t11 = _context28["catch"](33);
1197
+ case 57:
1198
+ _context32.prev = 57;
1199
+ _context32.t13 = _context32["catch"](41);
1048
1200
 
1049
- _iterator3.e(_context28.t11);
1201
+ _iterator3.e(_context32.t13);
1050
1202
 
1051
- case 52:
1052
- _context28.prev = 52;
1203
+ case 60:
1204
+ _context32.prev = 60;
1053
1205
 
1054
1206
  _iterator3.f();
1055
1207
 
1056
- return _context28.finish(52);
1057
-
1058
- case 55:
1059
- // Allow the state to be inspected in debug mode before the data is lost.
1060
- execFail(data.tmpDir.name, failCommand); // Print the detailed logs for inspection (especially in CI).
1208
+ return _context32.finish(60);
1061
1209
 
1210
+ case 63:
1211
+ // Print the detailed logs for inspection (especially in CI).
1062
1212
  logInfo("Outputs");
1063
- _context28.t12 = process.stdout;
1064
- _context28.t13 = _concatInstanceProperty__default['default'](_context24 = [""]);
1065
- _context28.t14 = _context24;
1066
- _context28.t15 = _toConsumableArray__default['default'];
1067
- _context28.t16 = _Promise__default['default'];
1068
- _context28.t17 = _mapInstanceProperty__default['default'];
1069
- _context28.next = 65;
1213
+ _context32.t14 = process.stdout;
1214
+ _context32.t15 = _concatInstanceProperty__default['default'](_context28 = [""]);
1215
+ _context32.t16 = _context28;
1216
+ _context32.t17 = _toConsumableArray__default['default'];
1217
+ _context32.t18 = _Promise__default['default'];
1218
+ _context32.t19 = _mapInstanceProperty__default['default'];
1219
+ _context32.next = 72;
1070
1220
  return fsExtra.readdir(data.tmpLogsResolve());
1071
1221
 
1072
- case 65:
1073
- _context28.t18 = _context25 = _context28.sent;
1074
- _context28.t19 = (0, _context28.t17)(_context28.t18).call(_context25, function (filename) {
1222
+ case 72:
1223
+ _context32.t20 = _context29 = _context32.sent;
1224
+ _context32.t21 = (0, _context32.t19)(_context32.t20).call(_context29, function (filename) {
1075
1225
  return fsExtra.readFile(data.tmpLogsResolve(filename), "UTF-8");
1076
1226
  });
1077
- _context28.next = 69;
1078
- return _context28.t16.all.call(_context28.t16, _context28.t19);
1227
+ _context32.next = 76;
1228
+ return _context32.t18.all.call(_context32.t18, _context32.t21);
1079
1229
 
1080
- case 69:
1081
- _context28.t20 = _context28.sent;
1082
- _context28.t21 = (0, _context28.t15)(_context28.t20);
1083
- _context28.t22 = [""];
1084
- _context28.t23 = _context28.t13.call.call(_context28.t13, _context28.t14, _context28.t21, _context28.t22).join("\n\n" + _repeatInstanceProperty__default['default'](_context26 = _repeatInstanceProperty__default['default'](_context27 = "-").call(_context27, 80) + "\n").call(_context26, 2) + "\n");
1230
+ case 76:
1231
+ _context32.t22 = _context32.sent;
1232
+ _context32.t23 = (0, _context32.t17)(_context32.t22);
1233
+ _context32.t24 = [""];
1234
+ _context32.t25 = _context32.t15.call.call(_context32.t15, _context32.t16, _context32.t23, _context32.t24).join("\n\n" + _repeatInstanceProperty__default['default'](_context30 = _repeatInstanceProperty__default['default'](_context31 = "-").call(_context31, 80) + "\n").call(_context30, 2) + "\n");
1085
1235
 
1086
- _context28.t12.write.call(_context28.t12, _context28.t23);
1236
+ _context32.t14.write.call(_context32.t14, _context32.t25);
1087
1237
 
1088
- return _context28.finish(28);
1238
+ execFail(data.tmpDir.name, failCommand, "Allow the state to be inspected in debug mode before the data is lost.");
1239
+ return _context32.finish(38);
1089
1240
 
1090
- case 75:
1241
+ case 83:
1091
1242
  case "end":
1092
- return _context28.stop();
1243
+ return _context32.stop();
1093
1244
  }
1094
1245
  }
1095
- }, _callee10, null, [[19,, 28, 75], [33, 49, 52, 55], [37, 42]]);
1246
+ }, _callee11, null, [[19,, 38, 83], [41, 57, 60, 63], [45, 50]]);
1096
1247
  }));
1097
1248
  return _test.apply(this, arguments);
1098
1249
  }
@@ -1174,11 +1325,12 @@ test({
1174
1325
  packageScripts: packageScripts,
1175
1326
  projectPaths: projectPaths,
1176
1327
  tmpPath: tmpPath
1177
- }).catch(function (reason) {
1178
- console.error(reason);
1179
-
1180
- if (process.exitCode === 0) {
1328
+ }).then(function (allSucceeded) {
1329
+ if (!allSucceeded) {
1181
1330
  process.exitCode = 1;
1182
1331
  }
1332
+ }).catch(function (reason) {
1333
+ console.error(reason);
1334
+ process.exitCode = 2;
1183
1335
  });
1184
1336
  //# sourceMappingURL=test-e2e-interop.js.map