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