vis-dev-utils 3.0.118 → 3.0.119

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 3.0.118
10
- * @date 2023-02-14T20:12:46.682Z
9
+ * @version 3.0.119
10
+ * @date 2023-02-15T13:55:48.580Z
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
@@ -137,7 +137,6 @@ var y = yargs__default["default"].strict(true).usage("test-e2e-interop [options]
137
137
  /**
138
138
  *
139
139
  */
140
-
141
140
  function parseArguments() {
142
141
  return y.parserConfiguration({
143
142
  "camel-case-expansion": false
@@ -145,7 +144,6 @@ function parseArguments() {
145
144
  }
146
145
 
147
146
  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; }
148
-
149
147
  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; }
150
148
  var ProjectState = /*#__PURE__*/_createClass__default["default"](
151
149
  /**
@@ -164,19 +162,14 @@ var ProjectState = /*#__PURE__*/_createClass__default["default"](
164
162
  /**
165
163
  * Provide information about current state of the project.
166
164
  */
165
+
167
166
  function ProjectState() {
168
167
  var _this = this;
169
-
170
168
  _classCallCheck__default["default"](this, ProjectState);
171
-
172
169
  _defineProperty__default["default"](this, "promise", void 0);
173
-
174
170
  _defineProperty__default["default"](this, "resolve", void 0);
175
-
176
171
  _defineProperty__default["default"](this, "reject", void 0);
177
-
178
172
  _defineProperty__default["default"](this, "stage", "pending");
179
-
180
173
  this.promise = new _Promise__default["default"](function (resolve, reject) {
181
174
  _this.resolve = resolve;
182
175
  _this.reject = reject;
@@ -188,10 +181,8 @@ function ProjectState() {
188
181
  * @param title - Some explanatory text as to what's going on.
189
182
  * @param details - The error or some other message as to what went wrong.
190
183
  */
191
-
192
184
  function logError(title, details) {
193
185
  var _context;
194
-
195
186
  var wrappedDetails = details != null ? "\n".concat(details instanceof Error ? details.message : details) : "";
196
187
  process.stderr.write(_concatInstanceProperty__default["default"](_context = "\n==> ".concat(title)).call(_context, wrappedDetails, "\n"));
197
188
  }
@@ -199,10 +190,8 @@ function logError(title, details) {
199
190
  * @param title
200
191
  * @param details
201
192
  */
202
-
203
193
  function logInfo(title, details) {
204
194
  var _context2;
205
-
206
195
  var wrappedDetails = details ? ":\n".concat(details) : "";
207
196
  process.stdout.write(_concatInstanceProperty__default["default"](_context2 = "\n==> ".concat(title)).call(_context2, wrappedDetails, "\n"));
208
197
  }
@@ -211,13 +200,11 @@ function logInfo(title, details) {
211
200
  * @param failCommand
212
201
  * @param error
213
202
  */
214
-
215
203
  function execFail(cwd, failCommand, error) {
216
204
  if (failCommand) {
217
205
  console.error("\n\nReason for debugging:");
218
206
  console.error(error);
219
207
  console.error("\n\nDebuging:");
220
-
221
208
  try {
222
209
  child_process.execSync(failCommand, {
223
210
  cwd: cwd,
@@ -237,35 +224,28 @@ function execFail(cwd, failCommand, error) {
237
224
  * @param logDir
238
225
  * @param getState
239
226
  */
240
-
241
227
  function createSpawner(logDir, getState) {
242
228
  var nextId = 1;
243
229
  return function spawnThrow(_ref) {
244
230
  var cmd = _ref.cmd,
245
- cwd = _ref.cwd,
246
- failCommand = _ref.failCommand;
231
+ cwd = _ref.cwd,
232
+ failCommand = _ref.failCommand;
247
233
  var id = nextId++;
248
-
249
234
  var getHeaderLines = function getHeaderLines() {
250
235
  var _context3;
251
-
252
236
  return _concatInstanceProperty__default["default"](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
253
237
  return _JSON$stringify__default["default"](word);
254
238
  }).join(" "), "states:"]).call(_context3, _toConsumableArray__default["default"](getState()));
255
239
  };
256
-
257
240
  var getLogMessage = function getLogMessage() {
258
241
  var _context4;
259
-
260
242
  return _mapInstanceProperty__default["default"](_context4 = getHeaderLines()).call(_context4, function (line) {
261
243
  return " " + line;
262
244
  }).join("\n");
263
245
  };
264
-
265
246
  logInfo("Start", getLogMessage());
266
247
  return new _Promise__default["default"](function (resolve, reject) {
267
248
  var _context5;
268
-
269
249
  var commandLogPath = path.join(logDir, [path.basename(cwd).replace(/[^a-zA-Z0-9]+/g, "-"), cmd.join("-").replace(/[^a-zA-Z0-9]+/g, "-"), "id-" + _padStartInstanceProperty__default["default"](_context5 = "" + id).call(_context5, 3, "0"), "log"].join("."));
270
250
  var logStream = fsExtra.createWriteStream(commandLogPath, {
271
251
  flags: "a"
@@ -286,25 +266,20 @@ function createSpawner(logDir, getState) {
286
266
  *
287
267
  * @param code - The code or other kind of status to append.
288
268
  */
289
-
290
269
  function addStatusCodeToFilename(code) {
291
270
  var newPath = _sliceInstanceProperty__default["default"](commandLogPath).call(commandLogPath, 0, -4) + ".status-" + code + ".log";
292
271
  fsExtra.rename(commandLogPath, newPath).catch(function (error) {
293
272
  console.error("Failed to rename log file to ".concat(newPath, "."), error);
294
273
  });
295
274
  }
296
-
297
275
  var failed = false;
298
276
  child.on("close", function (code) {
299
277
  if (failed) ; else if (code !== 0) {
300
278
  var _context6;
301
-
302
279
  logError("Fail", getLogMessage());
303
-
304
280
  var errorMessage = _concatInstanceProperty__default["default"](_context6 = "".concat(_mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
305
281
  return "\"".concat(word, "\"");
306
282
  }).join(" "), ": exited with ")).call(_context6, code, ".");
307
-
308
283
  logStream.end(function () {
309
284
  _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
310
285
  var commandOutput;
@@ -317,20 +292,16 @@ function createSpawner(logDir, getState) {
317
292
  _context7.t0 = commandOutput;
318
293
  _context7.next = 5;
319
294
  return fsExtra.readFile(commandLogPath, "utf-8");
320
-
321
295
  case 5:
322
296
  commandOutput = _context7.t0 += _context7.sent;
323
297
  _context7.next = 11;
324
298
  break;
325
-
326
299
  case 8:
327
300
  _context7.prev = 8;
328
301
  _context7.t1 = _context7["catch"](1);
329
302
  commandOutput += "Failed to log command output.";
330
-
331
303
  case 11:
332
304
  execFail(cwd, failCommand, commandOutput + "\n\n" + errorMessage);
333
-
334
305
  case 12:
335
306
  case "end":
336
307
  return _context7.stop();
@@ -359,24 +330,19 @@ function createSpawner(logDir, getState) {
359
330
  }
360
331
 
361
332
  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; } } }; }
362
-
363
333
  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); }
364
-
365
334
  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; }
366
-
335
+ // Remove all temporary files on process exit.
367
336
  tmp.setGracefulCleanup();
368
337
  /**
369
338
  * @param tmpPath
370
339
  */
371
-
372
340
  function prepareTmpDir(_x) {
373
341
  return _prepareTmpDir.apply(this, arguments);
374
342
  }
375
343
  /**
376
344
  * @param projectName
377
345
  */
378
-
379
-
380
346
  function _prepareTmpDir() {
381
347
  _prepareTmpDir = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(tmpPath) {
382
348
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
@@ -387,21 +353,17 @@ function _prepareTmpDir() {
387
353
  _context.next = 6;
388
354
  break;
389
355
  }
390
-
391
356
  _context.next = 3;
392
357
  return fsExtra.mkdirp(tmpPath);
393
-
394
358
  case 3:
395
359
  return _context.abrupt("return", {
396
360
  name: tmpPath,
397
361
  removeCallback: function removeCallback() {}
398
362
  });
399
-
400
363
  case 6:
401
364
  return _context.abrupt("return", tmp.dirSync({
402
365
  unsafeCleanup: true
403
366
  }));
404
-
405
367
  case 7:
406
368
  case "end":
407
369
  return _context.stop();
@@ -411,7 +373,6 @@ function _prepareTmpDir() {
411
373
  }));
412
374
  return _prepareTmpDir.apply(this, arguments);
413
375
  }
414
-
415
376
  function getTarballName(projectName) {
416
377
  return "".concat(projectName, "-0.0.0-no-version.tgz");
417
378
  }
@@ -420,8 +381,6 @@ function getTarballName(projectName) {
420
381
  * @param root0.tmpRootResolve
421
382
  * @param projectName
422
383
  */
423
-
424
-
425
384
  function getTarballPath(_ref, projectName) {
426
385
  var tmpRootResolve = _ref.tmpRootResolve;
427
386
  return tmpRootResolve("".concat(projectName, ".tgz"));
@@ -430,16 +389,12 @@ function getTarballPath(_ref, projectName) {
430
389
  * @param data
431
390
  * @param projectName
432
391
  */
433
-
434
-
435
392
  function copyTarball(_x2, _x3) {
436
393
  return _copyTarball.apply(this, arguments);
437
394
  }
438
395
  /**
439
396
  * @param cwd
440
397
  */
441
-
442
-
443
398
  function _copyTarball() {
444
399
  _copyTarball = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(data, projectName) {
445
400
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
@@ -448,7 +403,6 @@ function _copyTarball() {
448
403
  case 0:
449
404
  _context2.next = 2;
450
405
  return fsExtra.copyFile(data.tmpReposResolve(projectName, getTarballName(projectName)), getTarballPath(data, projectName));
451
-
452
406
  case 2:
453
407
  case "end":
454
408
  return _context2.stop();
@@ -458,7 +412,6 @@ function _copyTarball() {
458
412
  }));
459
413
  return _copyTarball.apply(this, arguments);
460
414
  }
461
-
462
415
  function getPackageDeps(_x4) {
463
416
  return _getPackageDeps.apply(this, arguments);
464
417
  }
@@ -466,12 +419,9 @@ function getPackageDeps(_x4) {
466
419
  * @param data
467
420
  * @param projectName
468
421
  */
469
-
470
-
471
422
  function _getPackageDeps() {
472
423
  _getPackageDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(cwd) {
473
424
  var _context3;
474
-
475
425
  var packageJSONPath, packageJSON;
476
426
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
477
427
  while (1) {
@@ -481,27 +431,21 @@ function _getPackageDeps() {
481
431
  return findUp__default["default"]("package.json", {
482
432
  cwd: cwd
483
433
  });
484
-
485
434
  case 2:
486
435
  packageJSONPath = _context4.sent;
487
-
488
436
  if (!(packageJSONPath == null)) {
489
437
  _context4.next = 5;
490
438
  break;
491
439
  }
492
-
493
440
  throw new Error("Project's package.json file not found.");
494
-
495
441
  case 5:
496
442
  _context4.t0 = JSON;
497
443
  _context4.next = 8;
498
444
  return fsExtra.readFile(packageJSONPath, "utf8");
499
-
500
445
  case 8:
501
446
  _context4.t1 = _context4.sent;
502
447
  packageJSON = _context4.t0.parse.call(_context4.t0, _context4.t1);
503
448
  return _context4.abrupt("return", _toConsumableArray__default["default"](new _Set__default["default"](_concatInstanceProperty__default["default"](_context3 = []).call(_context3, _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.dependencies || {})), _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.devDependencies || {})), _toConsumableArray__default["default"](_Object$keys__default["default"](packageJSON.peerDependencies || {}))))));
504
-
505
449
  case 11:
506
450
  case "end":
507
451
  return _context4.stop();
@@ -511,7 +455,6 @@ function _getPackageDeps() {
511
455
  }));
512
456
  return _getPackageDeps.apply(this, arguments);
513
457
  }
514
-
515
458
  function getPackageLocalDeps(_x5, _x6) {
516
459
  return _getPackageLocalDeps.apply(this, arguments);
517
460
  }
@@ -520,12 +463,9 @@ function getPackageLocalDeps(_x5, _x6) {
520
463
  * @param data
521
464
  * @param projectName
522
465
  */
523
-
524
-
525
466
  function _getPackageLocalDeps() {
526
467
  _getPackageLocalDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(data, projectName) {
527
468
  var _context5;
528
-
529
469
  var projectPaths, tmpReposResolve, cwd;
530
470
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
531
471
  while (1) {
@@ -536,13 +476,11 @@ function _getPackageLocalDeps() {
536
476
  _context6.t0 = _filterInstanceProperty__default["default"];
537
477
  _context6.next = 5;
538
478
  return getPackageDeps(cwd);
539
-
540
479
  case 5:
541
480
  _context6.t1 = _context5 = _context6.sent;
542
481
  return _context6.abrupt("return", (0, _context6.t0)(_context6.t1).call(_context5, function (depName) {
543
482
  return projectPaths[depName] != null;
544
483
  }));
545
-
546
484
  case 7:
547
485
  case "end":
548
486
  return _context6.stop();
@@ -552,7 +490,6 @@ function _getPackageLocalDeps() {
552
490
  }));
553
491
  return _getPackageLocalDeps.apply(this, arguments);
554
492
  }
555
-
556
493
  function clone(_x7, _x8, _x9) {
557
494
  return _clone.apply(this, arguments);
558
495
  }
@@ -560,8 +497,6 @@ function clone(_x7, _x8, _x9) {
560
497
  * @param cwd
561
498
  * @param deps
562
499
  */
563
-
564
-
565
500
  function _clone() {
566
501
  _clone = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(spawn, data, projectName) {
567
502
  var failCommand, projectPaths, tmpReposResolve, cwd, projectPath;
@@ -572,23 +507,19 @@ function _clone() {
572
507
  failCommand = data.failCommand, projectPaths = data.projectPaths, tmpReposResolve = data.tmpReposResolve;
573
508
  cwd = tmpReposResolve();
574
509
  projectPath = projectPaths[projectName];
575
-
576
510
  if (!/\.git$/.test(projectPath)) {
577
511
  _context7.next = 8;
578
512
  break;
579
513
  }
580
-
581
514
  _context7.next = 6;
582
515
  return spawn({
583
516
  cmd: ["git", "clone", projectPath, "--single-branch", "--branch", "master", "--depth", "1"],
584
517
  cwd: cwd,
585
518
  failCommand: failCommand
586
519
  });
587
-
588
520
  case 6:
589
521
  _context7.next = 10;
590
522
  break;
591
-
592
523
  case 8:
593
524
  _context7.next = 10;
594
525
  return fsExtra.copy(projectPath, tmpReposResolve(projectName), {
@@ -596,7 +527,6 @@ function _clone() {
596
527
  return !/[\\/].git[\\/]/.test(dest) && !/[\\/]node_modules[\\/]/.test(dest);
597
528
  }
598
529
  });
599
-
600
530
  case 10:
601
531
  case "end":
602
532
  return _context7.stop();
@@ -606,7 +536,6 @@ function _clone() {
606
536
  }));
607
537
  return _clone.apply(this, arguments);
608
538
  }
609
-
610
539
  function updatePackageDepVersions(_x10, _x11) {
611
540
  return _updatePackageDepVersions.apply(this, arguments);
612
541
  }
@@ -615,12 +544,9 @@ function updatePackageDepVersions(_x10, _x11) {
615
544
  * @param data
616
545
  * @param projectName
617
546
  */
618
-
619
-
620
547
  function _updatePackageDepVersions() {
621
548
  _updatePackageDepVersions = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(cwd, deps) {
622
549
  var _context8, _packageJSON$dependen, _context9, _packageJSON$devDepen, _context10, _packageJSON$peerDepe;
623
-
624
550
  var packageJSONPath, packageJSON;
625
551
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context11) {
626
552
  while (1) {
@@ -630,47 +556,37 @@ function _updatePackageDepVersions() {
630
556
  return findUp__default["default"]("package.json", {
631
557
  cwd: cwd
632
558
  });
633
-
634
559
  case 2:
635
560
  packageJSONPath = _context11.sent;
636
-
637
561
  if (!(packageJSONPath == null)) {
638
562
  _context11.next = 5;
639
563
  break;
640
564
  }
641
-
642
565
  throw new Error("Project's package.json file not found.");
643
-
644
566
  case 5:
645
567
  _context11.t0 = JSON;
646
568
  _context11.next = 8;
647
569
  return fsExtra.readFile(packageJSONPath, "utf8");
648
-
649
570
  case 8:
650
571
  _context11.t1 = _context11.sent;
651
572
  packageJSON = _context11.t0.parse.call(_context11.t0, _context11.t1);
652
-
653
573
  _forEachInstanceProperty__default["default"](_context8 = _Object$keys__default["default"]((_packageJSON$dependen = packageJSON.dependencies) !== null && _packageJSON$dependen !== void 0 ? _packageJSON$dependen : {})).call(_context8, function (key) {
654
574
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
655
575
  packageJSON.dependencies[key] = "file:" + deps[key];
656
576
  }
657
577
  });
658
-
659
578
  _forEachInstanceProperty__default["default"](_context9 = _Object$keys__default["default"]((_packageJSON$devDepen = packageJSON.devDependencies) !== null && _packageJSON$devDepen !== void 0 ? _packageJSON$devDepen : {})).call(_context9, function (key) {
660
579
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
661
580
  packageJSON.devDependencies[key] = "file:" + deps[key];
662
581
  }
663
582
  });
664
-
665
583
  _forEachInstanceProperty__default["default"](_context10 = _Object$keys__default["default"]((_packageJSON$peerDepe = packageJSON.peerDependencies) !== null && _packageJSON$peerDepe !== void 0 ? _packageJSON$peerDepe : {})).call(_context10, function (key) {
666
584
  if (Object.prototype.hasOwnProperty.call(deps, key)) {
667
585
  packageJSON.peerDependencies[key] = "file:" + deps[key];
668
586
  }
669
587
  });
670
-
671
588
  _context11.next = 15;
672
589
  return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default["default"](packageJSON, undefined, 4));
673
-
674
590
  case 15:
675
591
  case "end":
676
592
  return _context11.stop();
@@ -680,21 +596,16 @@ function _updatePackageDepVersions() {
680
596
  }));
681
597
  return _updatePackageDepVersions.apply(this, arguments);
682
598
  }
683
-
684
599
  function buildTestPack(_x12, _x13, _x14) {
685
600
  return _buildTestPack.apply(this, arguments);
686
601
  }
687
602
  /**
688
603
  * @param data
689
604
  */
690
-
691
-
692
605
  function _buildTestPack() {
693
606
  _buildTestPack = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(spawn, data, projectName) {
694
607
  var _context12;
695
-
696
608
  var failCommand, packageScripts, tmpReposResolve, cwd, packageLockPath, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
697
-
698
609
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context13) {
699
610
  while (1) {
700
611
  switch (_context13.prev = _context13.next) {
@@ -706,7 +617,6 @@ function _buildTestPack() {
706
617
  _context13.t2 = _reduceInstanceProperty__default["default"];
707
618
  _context13.next = 7;
708
619
  return getPackageLocalDeps(data, projectName);
709
-
710
620
  case 7:
711
621
  _context13.t3 = _context12 = _context13.sent;
712
622
  _context13.t4 = (0, _context13.t2)(_context13.t3).call(_context12, function (acc, key) {
@@ -715,24 +625,19 @@ function _buildTestPack() {
715
625
  }, _Object$create__default["default"](null));
716
626
  _context13.next = 11;
717
627
  return (0, _context13.t0)(_context13.t1, _context13.t4);
718
-
719
628
  case 11:
720
629
  _context13.next = 13;
721
630
  return findUp__default["default"]("package-lock.json", {
722
631
  cwd: cwd
723
632
  });
724
-
725
633
  case 13:
726
634
  packageLockPath = _context13.sent;
727
-
728
635
  if (!(packageLockPath != null)) {
729
636
  _context13.next = 17;
730
637
  break;
731
638
  }
732
-
733
639
  _context13.next = 17;
734
640
  return fsExtra.unlink(packageLockPath);
735
-
736
641
  case 17:
737
642
  _context13.next = 19;
738
643
  return spawn({
@@ -740,45 +645,35 @@ function _buildTestPack() {
740
645
  cwd: cwd,
741
646
  failCommand: failCommand
742
647
  });
743
-
744
648
  case 19:
745
649
  _iterator = _createForOfIteratorHelper$1(packageScripts);
746
650
  _context13.prev = 20;
747
-
748
651
  _iterator.s();
749
-
750
652
  case 22:
751
653
  if ((_step = _iterator.n()).done) {
752
654
  _context13.next = 37;
753
655
  break;
754
656
  }
755
-
756
657
  _step$value = _step.value, packageName = _step$value.packageName, scriptName = _step$value.scriptName, skipIfMissing = _step$value.skipIfMissing;
757
-
758
658
  if (!(packageName != null && packageName !== projectName)) {
759
659
  _context13.next = 28;
760
660
  break;
761
661
  }
762
-
763
662
  return _context13.abrupt("continue", 35);
764
-
765
663
  case 28:
766
664
  if (!skipIfMissing) {
767
665
  _context13.next = 33;
768
666
  break;
769
667
  }
770
-
771
668
  _context13.next = 31;
772
669
  return spawn({
773
670
  cmd: ["npm", "run", scriptName, "--if-present"],
774
671
  cwd: cwd,
775
672
  failCommand: failCommand
776
673
  });
777
-
778
674
  case 31:
779
675
  _context13.next = 35;
780
676
  break;
781
-
782
677
  case 33:
783
678
  _context13.next = 35;
784
679
  return spawn({
@@ -786,28 +681,20 @@ function _buildTestPack() {
786
681
  cwd: cwd,
787
682
  failCommand: failCommand
788
683
  });
789
-
790
684
  case 35:
791
685
  _context13.next = 22;
792
686
  break;
793
-
794
687
  case 37:
795
688
  _context13.next = 42;
796
689
  break;
797
-
798
690
  case 39:
799
691
  _context13.prev = 39;
800
692
  _context13.t5 = _context13["catch"](20);
801
-
802
693
  _iterator.e(_context13.t5);
803
-
804
694
  case 42:
805
695
  _context13.prev = 42;
806
-
807
696
  _iterator.f();
808
-
809
697
  return _context13.finish(42);
810
-
811
698
  case 45:
812
699
  _context13.next = 47;
813
700
  return spawn({
@@ -815,11 +702,9 @@ function _buildTestPack() {
815
702
  cwd: cwd,
816
703
  failCommand: failCommand
817
704
  });
818
-
819
705
  case 47:
820
706
  _context13.next = 49;
821
707
  return copyTarball(data, projectName);
822
-
823
708
  case 49:
824
709
  case "end":
825
710
  return _context13.stop();
@@ -829,7 +714,6 @@ function _buildTestPack() {
829
714
  }));
830
715
  return _buildTestPack.apply(this, arguments);
831
716
  }
832
-
833
717
  function checkTmpPath(_x15) {
834
718
  return _checkTmpPath.apply(this, arguments);
835
719
  }
@@ -841,8 +725,6 @@ function checkTmpPath(_x15) {
841
725
  * @param root0.projectPaths
842
726
  * @param root0.tmpPath
843
727
  */
844
-
845
-
846
728
  function _checkTmpPath() {
847
729
  _checkTmpPath = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(data) {
848
730
  var tmpDir;
@@ -853,17 +735,13 @@ function _checkTmpPath() {
853
735
  tmpDir = data.tmpRootResolve();
854
736
  _context14.next = 3;
855
737
  return fsExtra.readdir(tmpDir);
856
-
857
738
  case 3:
858
739
  _context14.t0 = _context14.sent.length;
859
-
860
740
  if (!(_context14.t0 !== 0)) {
861
741
  _context14.next = 6;
862
742
  break;
863
743
  }
864
-
865
744
  throw new Error("The tmp dir (\"".concat(tmpDir, "\") is not empty."));
866
-
867
745
  case 6:
868
746
  case "end":
869
747
  return _context14.stop();
@@ -873,46 +751,35 @@ function _checkTmpPath() {
873
751
  }));
874
752
  return _checkTmpPath.apply(this, arguments);
875
753
  }
876
-
877
754
  function test(_x16) {
878
755
  return _test.apply(this, arguments);
879
756
  }
880
-
881
757
  function _test() {
882
758
  _test = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(_ref2) {
883
759
  var _context18;
884
-
885
760
  var failCommand, logsToStdout, packageScripts, projectPaths, tmpPath, data, projectStatuses, getStages, _context21, _context22, _context26, _context27, spawn, allSucceeded, _iterator3, _step3, _step3$value, projectName, promise, _context28, _context29, _context30, _context31;
886
-
887
761
  return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context32) {
888
762
  while (1) {
889
763
  switch (_context32.prev = _context32.next) {
890
764
  case 0:
891
765
  getStages = function _getStages() {
892
766
  var _context19;
893
-
894
767
  return _mapInstanceProperty__default["default"](_context19 = _toConsumableArray__default["default"](projectStatuses)).call(_context19, function (_ref3) {
895
768
  var _context20;
896
-
897
769
  var _ref4 = _slicedToArray__default["default"](_ref3, 2),
898
- key = _ref4[0],
899
- stage = _ref4[1].stage;
900
-
770
+ key = _ref4[0],
771
+ stage = _ref4[1].stage;
901
772
  return _concatInstanceProperty__default["default"](_context20 = " ".concat(key, ": ")).call(_context20, stage);
902
773
  });
903
774
  };
904
-
905
775
  failCommand = _ref2.failCommand, logsToStdout = _ref2.logsToStdout, packageScripts = _ref2.packageScripts, projectPaths = _ref2.projectPaths, tmpPath = _ref2.tmpPath;
906
-
907
776
  if (!(process.env.VIS_INTEROP === "1")) {
908
777
  _context32.next = 5;
909
778
  break;
910
779
  }
911
-
912
780
  // This would result in infinite loop otherwise.
913
781
  logInfo("Skipping interop test.");
914
782
  return _context32.abrupt("return", true);
915
-
916
783
  case 5:
917
784
  _context32.t0 = _Object$freeze__default["default"];
918
785
  _context32.t1 = failCommand;
@@ -920,40 +787,29 @@ function _test() {
920
787
  _context32.t3 = projectPaths;
921
788
  _context32.next = 11;
922
789
  return prepareTmpDir(tmpPath ? path.resolve(tmpPath, "repos") : undefined);
923
-
924
790
  case 11:
925
791
  _context32.t4 = _context32.sent;
926
-
927
792
  _context32.t5 = function tmpLogsResolve() {
928
793
  var _context15;
929
-
930
794
  for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {
931
795
  paths[_key] = arguments[_key];
932
796
  }
933
-
934
797
  return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
935
798
  };
936
-
937
799
  _context32.t6 = function tmpReposResolve() {
938
800
  var _context16;
939
-
940
801
  for (var _len2 = arguments.length, paths = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
941
802
  paths[_key2] = arguments[_key2];
942
803
  }
943
-
944
804
  return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
945
805
  };
946
-
947
806
  _context32.t7 = function tmpRootResolve() {
948
807
  var _context17;
949
-
950
808
  for (var _len3 = arguments.length, paths = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
951
809
  paths[_key3] = arguments[_key3];
952
810
  }
953
-
954
811
  return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context17 = [data.tmpDir.name]).call(_context17, paths));
955
812
  };
956
-
957
813
  _context32.t8 = process.cwd();
958
814
  _context32.t9 = {
959
815
  failCommand: _context32.t1,
@@ -972,25 +828,21 @@ function _test() {
972
828
  /**
973
829
  *
974
830
  */
975
-
976
831
  _context32.prev = 19;
977
832
  spawn = createSpawner(data.tmpLogsResolve(), getStages);
978
833
  _context32.next = 23;
979
834
  return checkTmpPath(data);
980
-
981
835
  case 23:
982
836
  _context32.next = 25;
983
837
  return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
984
838
  return fsExtra.mkdir(path.resolve(data.tmpDir.name, dir));
985
839
  }));
986
-
987
840
  case 25:
988
841
  logInfo("Begin", getStages().join("\n"));
989
842
  _context32.next = 28;
990
843
  return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context22 = _toConsumableArray__default["default"](projectStatuses)).call(_context22, /*#__PURE__*/function () {
991
844
  var _ref6 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(_ref5) {
992
845
  var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context24;
993
-
994
846
  return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context25) {
995
847
  while (1) {
996
848
  switch (_context25.prev = _context25.next) {
@@ -1008,15 +860,12 @@ function _test() {
1008
860
  _context23.prev = 0;
1009
861
  _context23.next = 3;
1010
862
  return fsExtra.lstat(projectPath);
1011
-
1012
863
  case 3:
1013
864
  return _context23.abrupt("return", _context23.sent);
1014
-
1015
865
  case 6:
1016
866
  _context23.prev = 6;
1017
867
  _context23.t0 = _context23["catch"](0);
1018
868
  return _context23.abrupt("return", null);
1019
-
1020
869
  case 9:
1021
870
  case "end":
1022
871
  return _context23.stop();
@@ -1024,126 +873,97 @@ function _test() {
1024
873
  }
1025
874
  }, _callee9, null, [[0, 6]]);
1026
875
  }))();
1027
-
1028
876
  case 6:
1029
877
  stats = _context25.sent;
1030
-
1031
878
  if (!(stats !== null && stats !== void 0 && stats.isFile())) {
1032
879
  _context25.next = 14;
1033
880
  break;
1034
881
  }
1035
-
1036
882
  // The path points to a ready to install tarball.
1037
883
  state.stage = "copying tarball";
1038
884
  _context25.next = 11;
1039
885
  return fsExtra.copyFile(projectPath, getTarballPath(data, projectName));
1040
-
1041
886
  case 11:
1042
887
  state.stage = "tarball copied";
1043
888
  _context25.next = 56;
1044
889
  break;
1045
-
1046
890
  case 14:
1047
891
  // The path points to a repo (maybe remote) that has to be built,
1048
892
  // tested and packed first.
1049
893
  state.stage = "cloning";
1050
894
  _context25.next = 17;
1051
895
  return clone(spawn, data, projectName);
1052
-
1053
896
  case 17:
1054
897
  state.stage = "gathering dependencies";
1055
898
  failedDeps = [];
1056
899
  _context25.next = 21;
1057
900
  return getPackageLocalDeps(data, projectName);
1058
-
1059
901
  case 21:
1060
902
  localDeps = _context25.sent;
1061
903
  state.stage = "waiting for dependencies (".concat(localDeps.join(", "), ")");
1062
904
  _iterator2 = _createForOfIteratorHelper$1(localDeps);
1063
905
  _context25.prev = 24;
1064
-
1065
906
  _iterator2.s();
1066
-
1067
907
  case 26:
1068
908
  if ((_step2 = _iterator2.n()).done) {
1069
909
  _context25.next = 41;
1070
910
  break;
1071
911
  }
1072
-
1073
912
  localDep = _step2.value;
1074
913
  depStatus = projectStatuses.get(localDep);
1075
-
1076
914
  if (!(depStatus == null)) {
1077
915
  _context25.next = 31;
1078
916
  break;
1079
917
  }
1080
-
1081
918
  throw new Error("Dependency ".concat(localDep, " not found."));
1082
-
1083
919
  case 31:
1084
920
  _context25.prev = 31;
1085
921
  _context25.next = 34;
1086
922
  return depStatus.promise;
1087
-
1088
923
  case 34:
1089
924
  _context25.next = 39;
1090
925
  break;
1091
-
1092
926
  case 36:
1093
927
  _context25.prev = 36;
1094
928
  _context25.t0 = _context25["catch"](31);
1095
929
  failedDeps.push(localDep);
1096
-
1097
930
  case 39:
1098
931
  _context25.next = 26;
1099
932
  break;
1100
-
1101
933
  case 41:
1102
934
  _context25.next = 46;
1103
935
  break;
1104
-
1105
936
  case 43:
1106
937
  _context25.prev = 43;
1107
938
  _context25.t1 = _context25["catch"](24);
1108
-
1109
939
  _iterator2.e(_context25.t1);
1110
-
1111
940
  case 46:
1112
941
  _context25.prev = 46;
1113
-
1114
942
  _iterator2.f();
1115
-
1116
943
  return _context25.finish(46);
1117
-
1118
944
  case 49:
1119
945
  if (!(failedDeps.length > 0)) {
1120
946
  _context25.next = 52;
1121
947
  break;
1122
948
  }
1123
-
1124
949
  state.stage = "dependencies failed: ".concat(failedDeps.join(", "));
1125
950
  throw new Error(state.stage);
1126
-
1127
951
  case 52:
1128
952
  state.stage = "running CI tasks";
1129
953
  _context25.next = 55;
1130
954
  return buildTestPack(spawn, data, projectName);
1131
-
1132
955
  case 55:
1133
956
  state.stage = "cloned, built, tested and packed";
1134
-
1135
957
  case 56:
1136
958
  logInfo("Okay ".concat(projectName), getStages().join("\n"));
1137
959
  state.resolve();
1138
960
  _context25.next = 64;
1139
961
  break;
1140
-
1141
962
  case 60:
1142
963
  _context25.prev = 60;
1143
964
  _context25.t2 = _context25["catch"](1);
1144
965
  logError(_concatInstanceProperty__default["default"](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
1145
966
  state.reject(_context25.t2 instanceof Error ? _context25.t2 : new Error("" + _context25.t2));
1146
-
1147
967
  case 64:
1148
968
  case "end":
1149
969
  return _context25.stop();
@@ -1151,36 +971,29 @@ function _test() {
1151
971
  }
1152
972
  }, _callee10, null, [[1, 60], [24, 43, 46, 49], [31, 36]]);
1153
973
  }));
1154
-
1155
974
  return function (_x17) {
1156
975
  return _ref6.apply(this, arguments);
1157
976
  };
1158
977
  }()));
1159
-
1160
978
  case 28:
1161
979
  _context32.t10 = _everyInstanceProperty__default["default"];
1162
980
  _context32.next = 31;
1163
981
  return _Promise__default["default"].allSettled(_mapInstanceProperty__default["default"](_context27 = _toConsumableArray__default["default"](_valuesInstanceProperty__default["default"](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
1164
982
  return status.promise;
1165
983
  }));
1166
-
1167
984
  case 31:
1168
985
  _context32.t11 = _context26 = _context32.sent;
1169
986
  allSucceeded = (0, _context32.t10)(_context32.t11).call(_context26, function (_ref9) {
1170
987
  var status = _ref9.status;
1171
988
  return status === "fulfilled";
1172
989
  });
1173
-
1174
990
  if (!allSucceeded) {
1175
991
  _context32.next = 37;
1176
992
  break;
1177
993
  }
1178
-
1179
994
  return _context32.abrupt("return", true);
1180
-
1181
995
  case 37:
1182
996
  return _context32.abrupt("return", false);
1183
-
1184
997
  case 38:
1185
998
  _context32.prev = 38;
1186
999
  // Wait for all the projects to finish and log the state summary and any
@@ -1188,56 +1001,42 @@ function _test() {
1188
1001
  logInfo("End", getStages().join("\n"));
1189
1002
  _iterator3 = _createForOfIteratorHelper$1(projectStatuses);
1190
1003
  _context32.prev = 41;
1191
-
1192
1004
  _iterator3.s();
1193
-
1194
1005
  case 43:
1195
1006
  if ((_step3 = _iterator3.n()).done) {
1196
1007
  _context32.next = 55;
1197
1008
  break;
1198
1009
  }
1199
-
1200
1010
  _step3$value = _slicedToArray__default["default"](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
1201
1011
  _context32.prev = 45;
1202
1012
  _context32.next = 48;
1203
1013
  return promise;
1204
-
1205
1014
  case 48:
1206
1015
  _context32.next = 53;
1207
1016
  break;
1208
-
1209
1017
  case 50:
1210
1018
  _context32.prev = 50;
1211
1019
  _context32.t12 = _context32["catch"](45);
1212
1020
  logError("".concat(projectName, " failed with"), _context32.t12);
1213
-
1214
1021
  case 53:
1215
1022
  _context32.next = 43;
1216
1023
  break;
1217
-
1218
1024
  case 55:
1219
1025
  _context32.next = 60;
1220
1026
  break;
1221
-
1222
1027
  case 57:
1223
1028
  _context32.prev = 57;
1224
1029
  _context32.t13 = _context32["catch"](41);
1225
-
1226
1030
  _iterator3.e(_context32.t13);
1227
-
1228
1031
  case 60:
1229
1032
  _context32.prev = 60;
1230
-
1231
1033
  _iterator3.f();
1232
-
1233
1034
  return _context32.finish(60);
1234
-
1235
1035
  case 63:
1236
1036
  if (!logsToStdout) {
1237
1037
  _context32.next = 82;
1238
1038
  break;
1239
1039
  }
1240
-
1241
1040
  logInfo("Outputs");
1242
1041
  _context32.t14 = process.stdout;
1243
1042
  _context32.t15 = _concatInstanceProperty__default["default"](_context28 = [""]);
@@ -1247,7 +1046,6 @@ function _test() {
1247
1046
  _context32.t19 = _mapInstanceProperty__default["default"];
1248
1047
  _context32.next = 73;
1249
1048
  return fsExtra.readdir(data.tmpLogsResolve());
1250
-
1251
1049
  case 73:
1252
1050
  _context32.t20 = _context29 = _context32.sent;
1253
1051
  _context32.t21 = (0, _context32.t19)(_context32.t20).call(_context29, function (filename) {
@@ -1255,19 +1053,15 @@ function _test() {
1255
1053
  });
1256
1054
  _context32.next = 77;
1257
1055
  return _context32.t18.all.call(_context32.t18, _context32.t21);
1258
-
1259
1056
  case 77:
1260
1057
  _context32.t22 = _context32.sent;
1261
1058
  _context32.t23 = (0, _context32.t17)(_context32.t22);
1262
1059
  _context32.t24 = [""];
1263
1060
  _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");
1264
-
1265
1061
  _context32.t14.write.call(_context32.t14, _context32.t25);
1266
-
1267
1062
  case 82:
1268
1063
  execFail(data.tmpDir.name, failCommand, "Allow the state to be inspected in debug mode before the data is lost.");
1269
1064
  return _context32.finish(38);
1270
-
1271
1065
  case 84:
1272
1066
  case "end":
1273
1067
  return _context32.stop();
@@ -1279,20 +1073,15 @@ function _test() {
1279
1073
  }
1280
1074
 
1281
1075
  var _context, _context2;
1282
-
1283
1076
  function _createForOfIteratorHelper(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(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; } } }; }
1284
-
1285
1077
  function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty__default["default"](_context3 = Object.prototype.toString.call(o)).call(_context3, 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(o, minLen); }
1286
-
1287
1078
  function _arrayLikeToArray(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; }
1288
1079
  var argv = parseArguments();
1289
-
1290
1080
  var projectPaths = _reduceInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = argv["project"]).call(_context2, function (raw) {
1291
1081
  var _raw$split = raw.split(" ", 2),
1292
- _raw$split2 = _slicedToArray__default["default"](_raw$split, 2),
1293
- name = _raw$split2[0],
1294
- path$1 = _raw$split2[1];
1295
-
1082
+ _raw$split2 = _slicedToArray__default["default"](_raw$split, 2),
1083
+ name = _raw$split2[0],
1084
+ path$1 = _raw$split2[1];
1296
1085
  if (typeof name === "string" && typeof path$1 === "string") {
1297
1086
  if (/^[a-zA-Z0-9]+:\/\//.test(path$1)) {
1298
1087
  // Remote URL, use as is.
@@ -1307,28 +1096,21 @@ var projectPaths = _reduceInstanceProperty__default["default"](_context = _mapIn
1307
1096
  }
1308
1097
  })).call(_context, function (acc, _ref) {
1309
1098
  var _ref2 = _slicedToArray__default["default"](_ref, 2),
1310
- name = _ref2[0],
1311
- path = _ref2[1];
1312
-
1099
+ name = _ref2[0],
1100
+ path = _ref2[1];
1313
1101
  acc[name] = path;
1314
1102
  return acc;
1315
1103
  }, {});
1316
-
1317
1104
  var rawPackageScriptArg = argv["package-script"];
1318
-
1319
1105
  var packageScripts = _flatMapInstanceProperty__default["default"](rawPackageScriptArg).call(rawPackageScriptArg, function (raw) {
1320
1106
  var packageScripts = [];
1321
1107
  var packageName = null;
1322
-
1323
1108
  var _iterator = _createForOfIteratorHelper(raw.split(" ")),
1324
- _step;
1325
-
1109
+ _step;
1326
1110
  try {
1327
1111
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
1328
1112
  var part = _step.value;
1329
-
1330
1113
  var mode = _sliceInstanceProperty__default["default"](part).call(part, -1);
1331
-
1332
1114
  if (mode === "?" || mode === "!") {
1333
1115
  packageScripts.push({
1334
1116
  packageName: packageName,
@@ -1344,10 +1126,8 @@ var packageScripts = _flatMapInstanceProperty__default["default"](rawPackageScri
1344
1126
  } finally {
1345
1127
  _iterator.f();
1346
1128
  }
1347
-
1348
1129
  return packageScripts;
1349
1130
  });
1350
-
1351
1131
  var tmpPath = argv["tmp-dir"] ? path.resolve(argv["tmp-dir"]) : undefined;
1352
1132
  var failCommand = argv["fail-command"];
1353
1133
  var logsToStdout = argv["logs-to-stdout"];