vis-dev-utils 3.0.2 → 3.0.3
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.
- package/babel-register/index.js +7 -7
- package/babel-register/index.js.map +1 -1
- package/bin/ci-utils.js +7 -7
- package/bin/ci-utils.js.map +1 -1
- package/bin/generate-examples-index.js +155 -155
- package/bin/generate-examples-index.js.map +1 -1
- package/bin/test-e2e-interop.js +87 -87
- package/bin/test-e2e-interop.js.map +1 -1
- package/dist/vis-dev-utils.cjs.js +62 -62
- package/dist/vis-dev-utils.cjs.js.map +1 -1
- package/dist/vis-dev-utils.esm.js +2 -2
- package/dist/vis-dev-utils.esm.js.map +1 -1
- package/package.json +9 -9
package/bin/test-e2e-interop.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Development utilities for the Vis family projects.
|
|
8
8
|
*
|
|
9
|
-
* @version 3.0.
|
|
10
|
-
* @date 2022-03-
|
|
9
|
+
* @version 3.0.3
|
|
10
|
+
* @date 2022-03-10T13:40:06.338Z
|
|
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
|
|
@@ -108,7 +108,7 @@ var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallChec
|
|
|
108
108
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
109
109
|
var _padStartInstanceProperty__default = /*#__PURE__*/_interopDefaultLegacy(_padStartInstanceProperty);
|
|
110
110
|
|
|
111
|
-
var y = yargs__default[
|
|
111
|
+
var y = yargs__default["default"].strict(true).usage("test-e2e-interop [options]").hide("version").config().help().option("fail-command", {
|
|
112
112
|
demandOption: false,
|
|
113
113
|
describe: 'This command will be run in a shell (therefore commands like "$SHELL" will work) after failure to inspect the state.',
|
|
114
114
|
type: "string"
|
|
@@ -139,10 +139,10 @@ function parseArguments() {
|
|
|
139
139
|
}).parseSync();
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
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; }
|
|
143
143
|
|
|
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[
|
|
145
|
-
var ProjectState = /*#__PURE__*/_createClass__default[
|
|
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"](
|
|
146
146
|
/**
|
|
147
147
|
* This will be resolved or rejected once all the tasks associated with this
|
|
148
148
|
* project finish.
|
|
@@ -162,17 +162,17 @@ var ProjectState = /*#__PURE__*/_createClass__default['default'](
|
|
|
162
162
|
function ProjectState() {
|
|
163
163
|
var _this = this;
|
|
164
164
|
|
|
165
|
-
_classCallCheck__default[
|
|
165
|
+
_classCallCheck__default["default"](this, ProjectState);
|
|
166
166
|
|
|
167
|
-
_defineProperty__default[
|
|
167
|
+
_defineProperty__default["default"](this, "promise", void 0);
|
|
168
168
|
|
|
169
|
-
_defineProperty__default[
|
|
169
|
+
_defineProperty__default["default"](this, "resolve", void 0);
|
|
170
170
|
|
|
171
|
-
_defineProperty__default[
|
|
171
|
+
_defineProperty__default["default"](this, "reject", void 0);
|
|
172
172
|
|
|
173
|
-
_defineProperty__default[
|
|
173
|
+
_defineProperty__default["default"](this, "stage", "pending");
|
|
174
174
|
|
|
175
|
-
this.promise = new _Promise__default[
|
|
175
|
+
this.promise = new _Promise__default["default"](function (resolve, reject) {
|
|
176
176
|
_this.resolve = resolve;
|
|
177
177
|
_this.reject = reject;
|
|
178
178
|
});
|
|
@@ -186,7 +186,7 @@ function logError(title, details) {
|
|
|
186
186
|
var _context;
|
|
187
187
|
|
|
188
188
|
var wrappedDetails = details != null ? "\n".concat(details instanceof Error ? details.message : details) : "";
|
|
189
|
-
process.stderr.write(_concatInstanceProperty__default[
|
|
189
|
+
process.stderr.write(_concatInstanceProperty__default["default"](_context = "\n==> ".concat(title)).call(_context, wrappedDetails, "\n"));
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
* @param title
|
|
@@ -197,7 +197,7 @@ function logInfo(title, details) {
|
|
|
197
197
|
var _context2;
|
|
198
198
|
|
|
199
199
|
var wrappedDetails = details ? ":\n".concat(details) : "";
|
|
200
|
-
process.stdout.write(_concatInstanceProperty__default[
|
|
200
|
+
process.stdout.write(_concatInstanceProperty__default["default"](_context2 = "\n==> ".concat(title)).call(_context2, wrappedDetails, "\n"));
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* @param cwd
|
|
@@ -242,29 +242,29 @@ function createSpawner(logDir, getState) {
|
|
|
242
242
|
var getHeaderLines = function getHeaderLines() {
|
|
243
243
|
var _context3;
|
|
244
244
|
|
|
245
|
-
return _concatInstanceProperty__default[
|
|
246
|
-
return _JSON$stringify__default[
|
|
247
|
-
}).join(" "), "states:"]).call(_context3, _toConsumableArray__default[
|
|
245
|
+
return _concatInstanceProperty__default["default"](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
|
|
246
|
+
return _JSON$stringify__default["default"](word);
|
|
247
|
+
}).join(" "), "states:"]).call(_context3, _toConsumableArray__default["default"](getState()));
|
|
248
248
|
};
|
|
249
249
|
|
|
250
250
|
var getLogMessage = function getLogMessage() {
|
|
251
251
|
var _context4;
|
|
252
252
|
|
|
253
|
-
return _mapInstanceProperty__default[
|
|
253
|
+
return _mapInstanceProperty__default["default"](_context4 = getHeaderLines()).call(_context4, function (line) {
|
|
254
254
|
return " " + line;
|
|
255
255
|
}).join("\n");
|
|
256
256
|
};
|
|
257
257
|
|
|
258
258
|
logInfo("Start", getLogMessage());
|
|
259
|
-
return new _Promise__default[
|
|
259
|
+
return new _Promise__default["default"](function (resolve, reject) {
|
|
260
260
|
var _context5;
|
|
261
261
|
|
|
262
|
-
var commandLogPath = path.join(logDir, _padStartInstanceProperty__default[
|
|
262
|
+
var commandLogPath = path.join(logDir, _padStartInstanceProperty__default["default"](_context5 = "" + id).call(_context5, 3, "0") + ".log");
|
|
263
263
|
var logStream = fsExtra.createWriteStream(commandLogPath, {
|
|
264
264
|
flags: "a"
|
|
265
265
|
});
|
|
266
266
|
logStream.write(getHeaderLines().join("\n") + "\n\n");
|
|
267
|
-
var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default[
|
|
267
|
+
var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default["default"](cmd).call(cmd, 1), {
|
|
268
268
|
cwd: cwd,
|
|
269
269
|
env: _objectSpread(_objectSpread({}, process.env), {}, {
|
|
270
270
|
VIS_INTEROP: "1"
|
|
@@ -280,14 +280,14 @@ function createSpawner(logDir, getState) {
|
|
|
280
280
|
|
|
281
281
|
logError("Fail", getLogMessage());
|
|
282
282
|
|
|
283
|
-
var errorMessage = _concatInstanceProperty__default[
|
|
283
|
+
var errorMessage = _concatInstanceProperty__default["default"](_context6 = "".concat(_mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
|
|
284
284
|
return "\"".concat(word, "\"");
|
|
285
285
|
}).join(" "), ": exited with ")).call(_context6, code, ".");
|
|
286
286
|
|
|
287
287
|
logStream.end(function () {
|
|
288
|
-
_asyncToGenerator__default[
|
|
288
|
+
_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
|
|
289
289
|
var commandOutput;
|
|
290
|
-
return _regeneratorRuntime__default[
|
|
290
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context7) {
|
|
291
291
|
while (1) {
|
|
292
292
|
switch (_context7.prev = _context7.next) {
|
|
293
293
|
case 0:
|
|
@@ -334,9 +334,9 @@ function createSpawner(logDir, getState) {
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol__default[
|
|
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; } } }; }
|
|
338
338
|
|
|
339
|
-
function _unsupportedIterableToArray$1(o, minLen) { var _context33; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default[
|
|
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); }
|
|
340
340
|
|
|
341
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; }
|
|
342
342
|
|
|
@@ -354,8 +354,8 @@ function prepareTmpDir(_x) {
|
|
|
354
354
|
|
|
355
355
|
|
|
356
356
|
function _prepareTmpDir() {
|
|
357
|
-
_prepareTmpDir = _asyncToGenerator__default[
|
|
358
|
-
return _regeneratorRuntime__default[
|
|
357
|
+
_prepareTmpDir = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(tmpPath) {
|
|
358
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
359
359
|
while (1) {
|
|
360
360
|
switch (_context.prev = _context.next) {
|
|
361
361
|
case 0:
|
|
@@ -417,8 +417,8 @@ function copyTarball(_x2, _x3) {
|
|
|
417
417
|
|
|
418
418
|
|
|
419
419
|
function _copyTarball() {
|
|
420
|
-
_copyTarball = _asyncToGenerator__default[
|
|
421
|
-
return _regeneratorRuntime__default[
|
|
420
|
+
_copyTarball = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(data, projectName) {
|
|
421
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
422
422
|
while (1) {
|
|
423
423
|
switch (_context2.prev = _context2.next) {
|
|
424
424
|
case 0:
|
|
@@ -445,16 +445,16 @@ function getPackageDeps(_x4) {
|
|
|
445
445
|
|
|
446
446
|
|
|
447
447
|
function _getPackageDeps() {
|
|
448
|
-
_getPackageDeps = _asyncToGenerator__default[
|
|
448
|
+
_getPackageDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(cwd) {
|
|
449
449
|
var _context3;
|
|
450
450
|
|
|
451
451
|
var packageJSONPath, packageJSON;
|
|
452
|
-
return _regeneratorRuntime__default[
|
|
452
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
|
|
453
453
|
while (1) {
|
|
454
454
|
switch (_context4.prev = _context4.next) {
|
|
455
455
|
case 0:
|
|
456
456
|
_context4.next = 2;
|
|
457
|
-
return findUp__default[
|
|
457
|
+
return findUp__default["default"]("package.json", {
|
|
458
458
|
cwd: cwd
|
|
459
459
|
});
|
|
460
460
|
|
|
@@ -476,7 +476,7 @@ function _getPackageDeps() {
|
|
|
476
476
|
case 8:
|
|
477
477
|
_context4.t1 = _context4.sent;
|
|
478
478
|
packageJSON = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
479
|
-
return _context4.abrupt("return", _toConsumableArray__default[
|
|
479
|
+
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 || {}))))));
|
|
480
480
|
|
|
481
481
|
case 11:
|
|
482
482
|
case "end":
|
|
@@ -499,17 +499,17 @@ function getPackageLocalDeps(_x5, _x6) {
|
|
|
499
499
|
|
|
500
500
|
|
|
501
501
|
function _getPackageLocalDeps() {
|
|
502
|
-
_getPackageLocalDeps = _asyncToGenerator__default[
|
|
502
|
+
_getPackageLocalDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(data, projectName) {
|
|
503
503
|
var _context5;
|
|
504
504
|
|
|
505
505
|
var projectPaths, tmpReposResolve, cwd;
|
|
506
|
-
return _regeneratorRuntime__default[
|
|
506
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
|
|
507
507
|
while (1) {
|
|
508
508
|
switch (_context6.prev = _context6.next) {
|
|
509
509
|
case 0:
|
|
510
510
|
projectPaths = data.projectPaths, tmpReposResolve = data.tmpReposResolve;
|
|
511
511
|
cwd = tmpReposResolve(projectName);
|
|
512
|
-
_context6.t0 = _filterInstanceProperty__default[
|
|
512
|
+
_context6.t0 = _filterInstanceProperty__default["default"];
|
|
513
513
|
_context6.next = 5;
|
|
514
514
|
return getPackageDeps(cwd);
|
|
515
515
|
|
|
@@ -539,9 +539,9 @@ function clone(_x7, _x8, _x9) {
|
|
|
539
539
|
|
|
540
540
|
|
|
541
541
|
function _clone() {
|
|
542
|
-
_clone = _asyncToGenerator__default[
|
|
542
|
+
_clone = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(spawn, data, projectName) {
|
|
543
543
|
var failCommand, projectPaths, tmpReposResolve, cwd, projectPath;
|
|
544
|
-
return _regeneratorRuntime__default[
|
|
544
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context7) {
|
|
545
545
|
while (1) {
|
|
546
546
|
switch (_context7.prev = _context7.next) {
|
|
547
547
|
case 0:
|
|
@@ -594,16 +594,16 @@ function updatePackageDepVersions(_x10, _x11) {
|
|
|
594
594
|
|
|
595
595
|
|
|
596
596
|
function _updatePackageDepVersions() {
|
|
597
|
-
_updatePackageDepVersions = _asyncToGenerator__default[
|
|
597
|
+
_updatePackageDepVersions = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(cwd, deps) {
|
|
598
598
|
var _context8, _packageJSON$dependen, _context9, _packageJSON$devDepen, _context10, _packageJSON$peerDepe;
|
|
599
599
|
|
|
600
600
|
var packageJSONPath, packageJSON;
|
|
601
|
-
return _regeneratorRuntime__default[
|
|
601
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context11) {
|
|
602
602
|
while (1) {
|
|
603
603
|
switch (_context11.prev = _context11.next) {
|
|
604
604
|
case 0:
|
|
605
605
|
_context11.next = 2;
|
|
606
|
-
return findUp__default[
|
|
606
|
+
return findUp__default["default"]("package.json", {
|
|
607
607
|
cwd: cwd
|
|
608
608
|
});
|
|
609
609
|
|
|
@@ -626,26 +626,26 @@ function _updatePackageDepVersions() {
|
|
|
626
626
|
_context11.t1 = _context11.sent;
|
|
627
627
|
packageJSON = _context11.t0.parse.call(_context11.t0, _context11.t1);
|
|
628
628
|
|
|
629
|
-
_forEachInstanceProperty__default[
|
|
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
630
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
631
631
|
packageJSON.dependencies[key] = "file:" + deps[key];
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
634
|
|
|
635
|
-
_forEachInstanceProperty__default[
|
|
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
636
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
637
637
|
packageJSON.devDependencies[key] = "file:" + deps[key];
|
|
638
638
|
}
|
|
639
639
|
});
|
|
640
640
|
|
|
641
|
-
_forEachInstanceProperty__default[
|
|
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
642
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
643
643
|
packageJSON.peerDependencies[key] = "file:" + deps[key];
|
|
644
644
|
}
|
|
645
645
|
});
|
|
646
646
|
|
|
647
647
|
_context11.next = 15;
|
|
648
|
-
return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default[
|
|
648
|
+
return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default["default"](packageJSON, undefined, 4));
|
|
649
649
|
|
|
650
650
|
case 15:
|
|
651
651
|
case "end":
|
|
@@ -666,12 +666,12 @@ function buildTestPack(_x12, _x13, _x14) {
|
|
|
666
666
|
|
|
667
667
|
|
|
668
668
|
function _buildTestPack() {
|
|
669
|
-
_buildTestPack = _asyncToGenerator__default[
|
|
669
|
+
_buildTestPack = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(spawn, data, projectName) {
|
|
670
670
|
var _context12;
|
|
671
671
|
|
|
672
672
|
var failCommand, packageScripts, tmpReposResolve, cwd, packageLockPath, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
|
|
673
673
|
|
|
674
|
-
return _regeneratorRuntime__default[
|
|
674
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context13) {
|
|
675
675
|
while (1) {
|
|
676
676
|
switch (_context13.prev = _context13.next) {
|
|
677
677
|
case 0:
|
|
@@ -679,7 +679,7 @@ function _buildTestPack() {
|
|
|
679
679
|
cwd = tmpReposResolve(projectName);
|
|
680
680
|
_context13.t0 = updatePackageDepVersions;
|
|
681
681
|
_context13.t1 = cwd;
|
|
682
|
-
_context13.t2 = _reduceInstanceProperty__default[
|
|
682
|
+
_context13.t2 = _reduceInstanceProperty__default["default"];
|
|
683
683
|
_context13.next = 7;
|
|
684
684
|
return getPackageLocalDeps(data, projectName);
|
|
685
685
|
|
|
@@ -688,13 +688,13 @@ function _buildTestPack() {
|
|
|
688
688
|
_context13.t4 = (0, _context13.t2)(_context13.t3).call(_context12, function (acc, key) {
|
|
689
689
|
acc[key] = getTarballPath(data, key);
|
|
690
690
|
return acc;
|
|
691
|
-
}, _Object$create__default[
|
|
691
|
+
}, _Object$create__default["default"](null));
|
|
692
692
|
_context13.next = 11;
|
|
693
693
|
return (0, _context13.t0)(_context13.t1, _context13.t4);
|
|
694
694
|
|
|
695
695
|
case 11:
|
|
696
696
|
_context13.next = 13;
|
|
697
|
-
return findUp__default[
|
|
697
|
+
return findUp__default["default"]("package-lock.json", {
|
|
698
698
|
cwd: cwd
|
|
699
699
|
});
|
|
700
700
|
|
|
@@ -819,9 +819,9 @@ function checkTmpPath(_x15) {
|
|
|
819
819
|
|
|
820
820
|
|
|
821
821
|
function _checkTmpPath() {
|
|
822
|
-
_checkTmpPath = _asyncToGenerator__default[
|
|
822
|
+
_checkTmpPath = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(data) {
|
|
823
823
|
var tmpDir;
|
|
824
|
-
return _regeneratorRuntime__default[
|
|
824
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context14) {
|
|
825
825
|
while (1) {
|
|
826
826
|
switch (_context14.prev = _context14.next) {
|
|
827
827
|
case 0:
|
|
@@ -854,26 +854,26 @@ function test(_x16) {
|
|
|
854
854
|
}
|
|
855
855
|
|
|
856
856
|
function _test() {
|
|
857
|
-
_test = _asyncToGenerator__default[
|
|
857
|
+
_test = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(_ref2) {
|
|
858
858
|
var _context18;
|
|
859
859
|
|
|
860
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;
|
|
861
861
|
|
|
862
|
-
return _regeneratorRuntime__default[
|
|
862
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context32) {
|
|
863
863
|
while (1) {
|
|
864
864
|
switch (_context32.prev = _context32.next) {
|
|
865
865
|
case 0:
|
|
866
866
|
getStages = function _getStages() {
|
|
867
867
|
var _context19;
|
|
868
868
|
|
|
869
|
-
return _mapInstanceProperty__default[
|
|
869
|
+
return _mapInstanceProperty__default["default"](_context19 = _toConsumableArray__default["default"](projectStatuses)).call(_context19, function (_ref3) {
|
|
870
870
|
var _context20;
|
|
871
871
|
|
|
872
|
-
var _ref4 = _slicedToArray__default[
|
|
872
|
+
var _ref4 = _slicedToArray__default["default"](_ref3, 2),
|
|
873
873
|
key = _ref4[0],
|
|
874
874
|
stage = _ref4[1].stage;
|
|
875
875
|
|
|
876
|
-
return _concatInstanceProperty__default[
|
|
876
|
+
return _concatInstanceProperty__default["default"](_context20 = " ".concat(key, ": ")).call(_context20, stage);
|
|
877
877
|
});
|
|
878
878
|
};
|
|
879
879
|
|
|
@@ -889,7 +889,7 @@ function _test() {
|
|
|
889
889
|
return _context32.abrupt("return", true);
|
|
890
890
|
|
|
891
891
|
case 5:
|
|
892
|
-
_context32.t0 = _Object$freeze__default[
|
|
892
|
+
_context32.t0 = _Object$freeze__default["default"];
|
|
893
893
|
_context32.t1 = failCommand;
|
|
894
894
|
_context32.t2 = packageScripts;
|
|
895
895
|
_context32.t3 = projectPaths;
|
|
@@ -906,7 +906,7 @@ function _test() {
|
|
|
906
906
|
paths[_key] = arguments[_key];
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
909
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
|
|
910
910
|
};
|
|
911
911
|
|
|
912
912
|
_context32.t6 = function tmpReposResolve() {
|
|
@@ -916,7 +916,7 @@ function _test() {
|
|
|
916
916
|
paths[_key2] = arguments[_key2];
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
919
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
|
|
920
920
|
};
|
|
921
921
|
|
|
922
922
|
_context32.t7 = function tmpRootResolve() {
|
|
@@ -926,7 +926,7 @@ function _test() {
|
|
|
926
926
|
paths[_key3] = arguments[_key3];
|
|
927
927
|
}
|
|
928
928
|
|
|
929
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
929
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context17 = [data.tmpDir.name]).call(_context17, paths));
|
|
930
930
|
};
|
|
931
931
|
|
|
932
932
|
_context32.t8 = process.cwd();
|
|
@@ -941,7 +941,7 @@ function _test() {
|
|
|
941
941
|
visDevUtilsPath: _context32.t8
|
|
942
942
|
};
|
|
943
943
|
data = (0, _context32.t0)(_context32.t9);
|
|
944
|
-
projectStatuses = new _Map__default[
|
|
944
|
+
projectStatuses = new _Map__default["default"](_mapInstanceProperty__default["default"](_context18 = _Object$keys__default["default"](data.projectPaths)).call(_context18, function (project) {
|
|
945
945
|
return [project, new ProjectState()];
|
|
946
946
|
}));
|
|
947
947
|
/**
|
|
@@ -955,28 +955,28 @@ function _test() {
|
|
|
955
955
|
|
|
956
956
|
case 23:
|
|
957
957
|
_context32.next = 25;
|
|
958
|
-
return _Promise__default[
|
|
958
|
+
return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
|
|
959
959
|
return fsExtra.mkdir(path.resolve(data.tmpDir.name, dir));
|
|
960
960
|
}));
|
|
961
961
|
|
|
962
962
|
case 25:
|
|
963
963
|
logInfo("Begin", getStages().join("\n"));
|
|
964
964
|
_context32.next = 28;
|
|
965
|
-
return _Promise__default[
|
|
966
|
-
var _ref6 = _asyncToGenerator__default[
|
|
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
967
|
var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context24;
|
|
968
968
|
|
|
969
|
-
return _regeneratorRuntime__default[
|
|
969
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context25) {
|
|
970
970
|
while (1) {
|
|
971
971
|
switch (_context25.prev = _context25.next) {
|
|
972
972
|
case 0:
|
|
973
|
-
_ref7 = _slicedToArray__default[
|
|
973
|
+
_ref7 = _slicedToArray__default["default"](_ref5, 2), projectName = _ref7[0], state = _ref7[1];
|
|
974
974
|
_context25.prev = 1;
|
|
975
975
|
state.stage = "preparing";
|
|
976
976
|
projectPath = data.projectPaths[projectName];
|
|
977
977
|
_context25.next = 6;
|
|
978
|
-
return _asyncToGenerator__default[
|
|
979
|
-
return _regeneratorRuntime__default[
|
|
978
|
+
return _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
|
|
979
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context23) {
|
|
980
980
|
while (1) {
|
|
981
981
|
switch (_context23.prev = _context23.next) {
|
|
982
982
|
case 0:
|
|
@@ -1116,7 +1116,7 @@ function _test() {
|
|
|
1116
1116
|
case 60:
|
|
1117
1117
|
_context25.prev = 60;
|
|
1118
1118
|
_context25.t2 = _context25["catch"](1);
|
|
1119
|
-
logError(_concatInstanceProperty__default[
|
|
1119
|
+
logError(_concatInstanceProperty__default["default"](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
|
|
1120
1120
|
state.reject(_context25.t2);
|
|
1121
1121
|
|
|
1122
1122
|
case 64:
|
|
@@ -1133,9 +1133,9 @@ function _test() {
|
|
|
1133
1133
|
}()));
|
|
1134
1134
|
|
|
1135
1135
|
case 28:
|
|
1136
|
-
_context32.t10 = _everyInstanceProperty__default[
|
|
1136
|
+
_context32.t10 = _everyInstanceProperty__default["default"];
|
|
1137
1137
|
_context32.next = 31;
|
|
1138
|
-
return _Promise__default[
|
|
1138
|
+
return _Promise__default["default"].allSettled(_mapInstanceProperty__default["default"](_context27 = _toConsumableArray__default["default"](_valuesInstanceProperty__default["default"](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
|
|
1139
1139
|
return status.promise;
|
|
1140
1140
|
}));
|
|
1141
1141
|
|
|
@@ -1172,7 +1172,7 @@ function _test() {
|
|
|
1172
1172
|
break;
|
|
1173
1173
|
}
|
|
1174
1174
|
|
|
1175
|
-
_step3$value = _slicedToArray__default[
|
|
1175
|
+
_step3$value = _slicedToArray__default["default"](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
|
|
1176
1176
|
_context32.prev = 45;
|
|
1177
1177
|
_context32.next = 48;
|
|
1178
1178
|
return promise;
|
|
@@ -1211,11 +1211,11 @@ function _test() {
|
|
|
1211
1211
|
// Print the detailed logs for inspection (especially in CI).
|
|
1212
1212
|
logInfo("Outputs");
|
|
1213
1213
|
_context32.t14 = process.stdout;
|
|
1214
|
-
_context32.t15 = _concatInstanceProperty__default[
|
|
1214
|
+
_context32.t15 = _concatInstanceProperty__default["default"](_context28 = [""]);
|
|
1215
1215
|
_context32.t16 = _context28;
|
|
1216
|
-
_context32.t17 = _toConsumableArray__default[
|
|
1217
|
-
_context32.t18 = _Promise__default[
|
|
1218
|
-
_context32.t19 = _mapInstanceProperty__default[
|
|
1216
|
+
_context32.t17 = _toConsumableArray__default["default"];
|
|
1217
|
+
_context32.t18 = _Promise__default["default"];
|
|
1218
|
+
_context32.t19 = _mapInstanceProperty__default["default"];
|
|
1219
1219
|
_context32.next = 72;
|
|
1220
1220
|
return fsExtra.readdir(data.tmpLogsResolve());
|
|
1221
1221
|
|
|
@@ -1231,7 +1231,7 @@ function _test() {
|
|
|
1231
1231
|
_context32.t22 = _context32.sent;
|
|
1232
1232
|
_context32.t23 = (0, _context32.t17)(_context32.t22);
|
|
1233
1233
|
_context32.t24 = [""];
|
|
1234
|
-
_context32.t25 = _context32.t15.call.call(_context32.t15, _context32.t16, _context32.t23, _context32.t24).join("\n\n" + _repeatInstanceProperty__default[
|
|
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");
|
|
1235
1235
|
|
|
1236
1236
|
_context32.t14.write.call(_context32.t14, _context32.t25);
|
|
1237
1237
|
|
|
@@ -1250,16 +1250,16 @@ function _test() {
|
|
|
1250
1250
|
|
|
1251
1251
|
var _context, _context2;
|
|
1252
1252
|
|
|
1253
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol__default[
|
|
1253
|
+
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; } } }; }
|
|
1254
1254
|
|
|
1255
|
-
function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty__default[
|
|
1255
|
+
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); }
|
|
1256
1256
|
|
|
1257
1257
|
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; }
|
|
1258
1258
|
var argv = parseArguments();
|
|
1259
1259
|
|
|
1260
|
-
var projectPaths = _reduceInstanceProperty__default[
|
|
1260
|
+
var projectPaths = _reduceInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = argv["project"]).call(_context2, function (raw) {
|
|
1261
1261
|
var _raw$split = raw.split(" ", 2),
|
|
1262
|
-
_raw$split2 = _slicedToArray__default[
|
|
1262
|
+
_raw$split2 = _slicedToArray__default["default"](_raw$split, 2),
|
|
1263
1263
|
name = _raw$split2[0],
|
|
1264
1264
|
path$1 = _raw$split2[1];
|
|
1265
1265
|
|
|
@@ -1276,7 +1276,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
|
|
|
1276
1276
|
process.exit(1);
|
|
1277
1277
|
}
|
|
1278
1278
|
})).call(_context, function (acc, _ref) {
|
|
1279
|
-
var _ref2 = _slicedToArray__default[
|
|
1279
|
+
var _ref2 = _slicedToArray__default["default"](_ref, 2),
|
|
1280
1280
|
name = _ref2[0],
|
|
1281
1281
|
path = _ref2[1];
|
|
1282
1282
|
|
|
@@ -1286,7 +1286,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
|
|
|
1286
1286
|
|
|
1287
1287
|
var rawPackageScriptArg = argv["package-script"];
|
|
1288
1288
|
|
|
1289
|
-
var packageScripts = _flatMapInstanceProperty__default[
|
|
1289
|
+
var packageScripts = _flatMapInstanceProperty__default["default"](rawPackageScriptArg).call(rawPackageScriptArg, function (raw) {
|
|
1290
1290
|
var packageScripts = [];
|
|
1291
1291
|
var packageName = null;
|
|
1292
1292
|
|
|
@@ -1297,12 +1297,12 @@ var packageScripts = _flatMapInstanceProperty__default['default'](rawPackageScri
|
|
|
1297
1297
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1298
1298
|
var part = _step.value;
|
|
1299
1299
|
|
|
1300
|
-
var mode = _sliceInstanceProperty__default[
|
|
1300
|
+
var mode = _sliceInstanceProperty__default["default"](part).call(part, -1);
|
|
1301
1301
|
|
|
1302
1302
|
if (mode === "?" || mode === "!") {
|
|
1303
1303
|
packageScripts.push({
|
|
1304
1304
|
packageName: packageName,
|
|
1305
|
-
scriptName: _sliceInstanceProperty__default[
|
|
1305
|
+
scriptName: _sliceInstanceProperty__default["default"](part).call(part, 0, -1),
|
|
1306
1306
|
skipIfMissing: mode === "?"
|
|
1307
1307
|
});
|
|
1308
1308
|
} else {
|