vis-dev-utils 3.0.1 → 3.0.4
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/bin/ci-utils.js +7 -7
- package/bin/generate-examples-index.js +156 -158
- package/bin/generate-examples-index.js.map +1 -1
- package/bin/test-e2e-interop.js +89 -110
- package/bin/test-e2e-interop.js.map +1 -1
- package/dist/vis-dev-utils.cjs.js +62 -62
- package/dist/vis-dev-utils.esm.js +2 -2
- package/package.json +21 -22
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.4
|
|
10
|
+
* @date 2022-03-10T21:24:40.299Z
|
|
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,9 +63,9 @@ 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 _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
66
67
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
67
68
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
68
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
69
69
|
var _padStartInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/pad-start');
|
|
70
70
|
var child_process = require('child_process');
|
|
71
71
|
|
|
@@ -103,12 +103,12 @@ var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefaultLega
|
|
|
103
103
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefaultLegacy(_Object$getOwnPropertyDescriptors);
|
|
104
104
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefaultLegacy(_Object$defineProperties);
|
|
105
105
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_Object$defineProperty);
|
|
106
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
106
107
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
107
108
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
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,40 +139,19 @@ function parseArguments() {
|
|
|
139
139
|
}).parseSync();
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
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['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
|
-
/**
|
|
147
|
-
* This will be resolved or rejected once all the tasks associated with this
|
|
148
|
-
* project finish.
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Run this to mark the project as successfully finished.
|
|
153
|
-
*/
|
|
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; }
|
|
154
143
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*/
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Provide information about current state of the project.
|
|
161
|
-
*/
|
|
162
|
-
function 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"](function ProjectState() {
|
|
163
146
|
var _this = this;
|
|
164
147
|
|
|
165
|
-
_classCallCheck__default[
|
|
166
|
-
|
|
167
|
-
_defineProperty__default['default'](this, "promise", void 0);
|
|
168
|
-
|
|
169
|
-
_defineProperty__default['default'](this, "resolve", void 0);
|
|
170
|
-
|
|
171
|
-
_defineProperty__default['default'](this, "reject", void 0);
|
|
172
|
-
|
|
173
|
-
_defineProperty__default['default'](this, "stage", "pending");
|
|
148
|
+
_classCallCheck__default["default"](this, ProjectState);
|
|
174
149
|
|
|
175
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Provide information about current state of the project.
|
|
152
|
+
*/
|
|
153
|
+
this.stage = "pending";
|
|
154
|
+
this.promise = new _Promise__default["default"](function (resolve, reject) {
|
|
176
155
|
_this.resolve = resolve;
|
|
177
156
|
_this.reject = reject;
|
|
178
157
|
});
|
|
@@ -186,7 +165,7 @@ function logError(title, details) {
|
|
|
186
165
|
var _context;
|
|
187
166
|
|
|
188
167
|
var wrappedDetails = details != null ? "\n".concat(details instanceof Error ? details.message : details) : "";
|
|
189
|
-
process.stderr.write(_concatInstanceProperty__default[
|
|
168
|
+
process.stderr.write(_concatInstanceProperty__default["default"](_context = "\n==> ".concat(title)).call(_context, wrappedDetails, "\n"));
|
|
190
169
|
}
|
|
191
170
|
/**
|
|
192
171
|
* @param title
|
|
@@ -197,7 +176,7 @@ function logInfo(title, details) {
|
|
|
197
176
|
var _context2;
|
|
198
177
|
|
|
199
178
|
var wrappedDetails = details ? ":\n".concat(details) : "";
|
|
200
|
-
process.stdout.write(_concatInstanceProperty__default[
|
|
179
|
+
process.stdout.write(_concatInstanceProperty__default["default"](_context2 = "\n==> ".concat(title)).call(_context2, wrappedDetails, "\n"));
|
|
201
180
|
}
|
|
202
181
|
/**
|
|
203
182
|
* @param cwd
|
|
@@ -242,29 +221,29 @@ function createSpawner(logDir, getState) {
|
|
|
242
221
|
var getHeaderLines = function getHeaderLines() {
|
|
243
222
|
var _context3;
|
|
244
223
|
|
|
245
|
-
return _concatInstanceProperty__default[
|
|
246
|
-
return _JSON$stringify__default[
|
|
247
|
-
}).join(" "), "states:"]).call(_context3, _toConsumableArray__default[
|
|
224
|
+
return _concatInstanceProperty__default["default"](_context3 = ["time: " + new Date().toISOString(), "id: " + id, "cwd: " + cwd, "cmd: " + _mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
|
|
225
|
+
return _JSON$stringify__default["default"](word);
|
|
226
|
+
}).join(" "), "states:"]).call(_context3, _toConsumableArray__default["default"](getState()));
|
|
248
227
|
};
|
|
249
228
|
|
|
250
229
|
var getLogMessage = function getLogMessage() {
|
|
251
230
|
var _context4;
|
|
252
231
|
|
|
253
|
-
return _mapInstanceProperty__default[
|
|
232
|
+
return _mapInstanceProperty__default["default"](_context4 = getHeaderLines()).call(_context4, function (line) {
|
|
254
233
|
return " " + line;
|
|
255
234
|
}).join("\n");
|
|
256
235
|
};
|
|
257
236
|
|
|
258
237
|
logInfo("Start", getLogMessage());
|
|
259
|
-
return new _Promise__default[
|
|
238
|
+
return new _Promise__default["default"](function (resolve, reject) {
|
|
260
239
|
var _context5;
|
|
261
240
|
|
|
262
|
-
var commandLogPath = path.join(logDir, _padStartInstanceProperty__default[
|
|
241
|
+
var commandLogPath = path.join(logDir, _padStartInstanceProperty__default["default"](_context5 = "" + id).call(_context5, 3, "0") + ".log");
|
|
263
242
|
var logStream = fsExtra.createWriteStream(commandLogPath, {
|
|
264
243
|
flags: "a"
|
|
265
244
|
});
|
|
266
245
|
logStream.write(getHeaderLines().join("\n") + "\n\n");
|
|
267
|
-
var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default[
|
|
246
|
+
var child = child_process.spawn(cmd[0], _sliceInstanceProperty__default["default"](cmd).call(cmd, 1), {
|
|
268
247
|
cwd: cwd,
|
|
269
248
|
env: _objectSpread(_objectSpread({}, process.env), {}, {
|
|
270
249
|
VIS_INTEROP: "1"
|
|
@@ -280,14 +259,14 @@ function createSpawner(logDir, getState) {
|
|
|
280
259
|
|
|
281
260
|
logError("Fail", getLogMessage());
|
|
282
261
|
|
|
283
|
-
var errorMessage = _concatInstanceProperty__default[
|
|
262
|
+
var errorMessage = _concatInstanceProperty__default["default"](_context6 = "".concat(_mapInstanceProperty__default["default"](cmd).call(cmd, function (word) {
|
|
284
263
|
return "\"".concat(word, "\"");
|
|
285
264
|
}).join(" "), ": exited with ")).call(_context6, code, ".");
|
|
286
265
|
|
|
287
266
|
logStream.end(function () {
|
|
288
|
-
_asyncToGenerator__default[
|
|
267
|
+
_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
|
|
289
268
|
var commandOutput;
|
|
290
|
-
return _regeneratorRuntime__default[
|
|
269
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context7) {
|
|
291
270
|
while (1) {
|
|
292
271
|
switch (_context7.prev = _context7.next) {
|
|
293
272
|
case 0:
|
|
@@ -334,9 +313,9 @@ function createSpawner(logDir, getState) {
|
|
|
334
313
|
};
|
|
335
314
|
}
|
|
336
315
|
|
|
337
|
-
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol__default[
|
|
316
|
+
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
317
|
|
|
339
|
-
function _unsupportedIterableToArray$1(o, minLen) { var _context33; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty__default[
|
|
318
|
+
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
319
|
|
|
341
320
|
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
321
|
|
|
@@ -354,8 +333,8 @@ function prepareTmpDir(_x) {
|
|
|
354
333
|
|
|
355
334
|
|
|
356
335
|
function _prepareTmpDir() {
|
|
357
|
-
_prepareTmpDir = _asyncToGenerator__default[
|
|
358
|
-
return _regeneratorRuntime__default[
|
|
336
|
+
_prepareTmpDir = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(tmpPath) {
|
|
337
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
359
338
|
while (1) {
|
|
360
339
|
switch (_context.prev = _context.next) {
|
|
361
340
|
case 0:
|
|
@@ -417,8 +396,8 @@ function copyTarball(_x2, _x3) {
|
|
|
417
396
|
|
|
418
397
|
|
|
419
398
|
function _copyTarball() {
|
|
420
|
-
_copyTarball = _asyncToGenerator__default[
|
|
421
|
-
return _regeneratorRuntime__default[
|
|
399
|
+
_copyTarball = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(data, projectName) {
|
|
400
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
422
401
|
while (1) {
|
|
423
402
|
switch (_context2.prev = _context2.next) {
|
|
424
403
|
case 0:
|
|
@@ -445,16 +424,16 @@ function getPackageDeps(_x4) {
|
|
|
445
424
|
|
|
446
425
|
|
|
447
426
|
function _getPackageDeps() {
|
|
448
|
-
_getPackageDeps = _asyncToGenerator__default[
|
|
427
|
+
_getPackageDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(cwd) {
|
|
449
428
|
var _context3;
|
|
450
429
|
|
|
451
430
|
var packageJSONPath, packageJSON;
|
|
452
|
-
return _regeneratorRuntime__default[
|
|
431
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context4) {
|
|
453
432
|
while (1) {
|
|
454
433
|
switch (_context4.prev = _context4.next) {
|
|
455
434
|
case 0:
|
|
456
435
|
_context4.next = 2;
|
|
457
|
-
return findUp__default[
|
|
436
|
+
return findUp__default["default"]("package.json", {
|
|
458
437
|
cwd: cwd
|
|
459
438
|
});
|
|
460
439
|
|
|
@@ -476,7 +455,7 @@ function _getPackageDeps() {
|
|
|
476
455
|
case 8:
|
|
477
456
|
_context4.t1 = _context4.sent;
|
|
478
457
|
packageJSON = _context4.t0.parse.call(_context4.t0, _context4.t1);
|
|
479
|
-
return _context4.abrupt("return", _toConsumableArray__default[
|
|
458
|
+
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
459
|
|
|
481
460
|
case 11:
|
|
482
461
|
case "end":
|
|
@@ -499,17 +478,17 @@ function getPackageLocalDeps(_x5, _x6) {
|
|
|
499
478
|
|
|
500
479
|
|
|
501
480
|
function _getPackageLocalDeps() {
|
|
502
|
-
_getPackageLocalDeps = _asyncToGenerator__default[
|
|
481
|
+
_getPackageLocalDeps = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(data, projectName) {
|
|
503
482
|
var _context5;
|
|
504
483
|
|
|
505
484
|
var projectPaths, tmpReposResolve, cwd;
|
|
506
|
-
return _regeneratorRuntime__default[
|
|
485
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context6) {
|
|
507
486
|
while (1) {
|
|
508
487
|
switch (_context6.prev = _context6.next) {
|
|
509
488
|
case 0:
|
|
510
489
|
projectPaths = data.projectPaths, tmpReposResolve = data.tmpReposResolve;
|
|
511
490
|
cwd = tmpReposResolve(projectName);
|
|
512
|
-
_context6.t0 = _filterInstanceProperty__default[
|
|
491
|
+
_context6.t0 = _filterInstanceProperty__default["default"];
|
|
513
492
|
_context6.next = 5;
|
|
514
493
|
return getPackageDeps(cwd);
|
|
515
494
|
|
|
@@ -539,9 +518,9 @@ function clone(_x7, _x8, _x9) {
|
|
|
539
518
|
|
|
540
519
|
|
|
541
520
|
function _clone() {
|
|
542
|
-
_clone = _asyncToGenerator__default[
|
|
521
|
+
_clone = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee5(spawn, data, projectName) {
|
|
543
522
|
var failCommand, projectPaths, tmpReposResolve, cwd, projectPath;
|
|
544
|
-
return _regeneratorRuntime__default[
|
|
523
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context7) {
|
|
545
524
|
while (1) {
|
|
546
525
|
switch (_context7.prev = _context7.next) {
|
|
547
526
|
case 0:
|
|
@@ -594,16 +573,16 @@ function updatePackageDepVersions(_x10, _x11) {
|
|
|
594
573
|
|
|
595
574
|
|
|
596
575
|
function _updatePackageDepVersions() {
|
|
597
|
-
_updatePackageDepVersions = _asyncToGenerator__default[
|
|
576
|
+
_updatePackageDepVersions = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(cwd, deps) {
|
|
598
577
|
var _context8, _packageJSON$dependen, _context9, _packageJSON$devDepen, _context10, _packageJSON$peerDepe;
|
|
599
578
|
|
|
600
579
|
var packageJSONPath, packageJSON;
|
|
601
|
-
return _regeneratorRuntime__default[
|
|
580
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context11) {
|
|
602
581
|
while (1) {
|
|
603
582
|
switch (_context11.prev = _context11.next) {
|
|
604
583
|
case 0:
|
|
605
584
|
_context11.next = 2;
|
|
606
|
-
return findUp__default[
|
|
585
|
+
return findUp__default["default"]("package.json", {
|
|
607
586
|
cwd: cwd
|
|
608
587
|
});
|
|
609
588
|
|
|
@@ -626,26 +605,26 @@ function _updatePackageDepVersions() {
|
|
|
626
605
|
_context11.t1 = _context11.sent;
|
|
627
606
|
packageJSON = _context11.t0.parse.call(_context11.t0, _context11.t1);
|
|
628
607
|
|
|
629
|
-
_forEachInstanceProperty__default[
|
|
608
|
+
_forEachInstanceProperty__default["default"](_context8 = _Object$keys__default["default"]((_packageJSON$dependen = packageJSON.dependencies) !== null && _packageJSON$dependen !== void 0 ? _packageJSON$dependen : {})).call(_context8, function (key) {
|
|
630
609
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
631
610
|
packageJSON.dependencies[key] = "file:" + deps[key];
|
|
632
611
|
}
|
|
633
612
|
});
|
|
634
613
|
|
|
635
|
-
_forEachInstanceProperty__default[
|
|
614
|
+
_forEachInstanceProperty__default["default"](_context9 = _Object$keys__default["default"]((_packageJSON$devDepen = packageJSON.devDependencies) !== null && _packageJSON$devDepen !== void 0 ? _packageJSON$devDepen : {})).call(_context9, function (key) {
|
|
636
615
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
637
616
|
packageJSON.devDependencies[key] = "file:" + deps[key];
|
|
638
617
|
}
|
|
639
618
|
});
|
|
640
619
|
|
|
641
|
-
_forEachInstanceProperty__default[
|
|
620
|
+
_forEachInstanceProperty__default["default"](_context10 = _Object$keys__default["default"]((_packageJSON$peerDepe = packageJSON.peerDependencies) !== null && _packageJSON$peerDepe !== void 0 ? _packageJSON$peerDepe : {})).call(_context10, function (key) {
|
|
642
621
|
if (Object.prototype.hasOwnProperty.call(deps, key)) {
|
|
643
622
|
packageJSON.peerDependencies[key] = "file:" + deps[key];
|
|
644
623
|
}
|
|
645
624
|
});
|
|
646
625
|
|
|
647
626
|
_context11.next = 15;
|
|
648
|
-
return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default[
|
|
627
|
+
return fsExtra.writeFile(packageJSONPath, _JSON$stringify__default["default"](packageJSON, undefined, 4));
|
|
649
628
|
|
|
650
629
|
case 15:
|
|
651
630
|
case "end":
|
|
@@ -666,12 +645,12 @@ function buildTestPack(_x12, _x13, _x14) {
|
|
|
666
645
|
|
|
667
646
|
|
|
668
647
|
function _buildTestPack() {
|
|
669
|
-
_buildTestPack = _asyncToGenerator__default[
|
|
648
|
+
_buildTestPack = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(spawn, data, projectName) {
|
|
670
649
|
var _context12;
|
|
671
650
|
|
|
672
651
|
var failCommand, packageScripts, tmpReposResolve, cwd, packageLockPath, _iterator, _step, _step$value, packageName, scriptName, skipIfMissing;
|
|
673
652
|
|
|
674
|
-
return _regeneratorRuntime__default[
|
|
653
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context13) {
|
|
675
654
|
while (1) {
|
|
676
655
|
switch (_context13.prev = _context13.next) {
|
|
677
656
|
case 0:
|
|
@@ -679,7 +658,7 @@ function _buildTestPack() {
|
|
|
679
658
|
cwd = tmpReposResolve(projectName);
|
|
680
659
|
_context13.t0 = updatePackageDepVersions;
|
|
681
660
|
_context13.t1 = cwd;
|
|
682
|
-
_context13.t2 = _reduceInstanceProperty__default[
|
|
661
|
+
_context13.t2 = _reduceInstanceProperty__default["default"];
|
|
683
662
|
_context13.next = 7;
|
|
684
663
|
return getPackageLocalDeps(data, projectName);
|
|
685
664
|
|
|
@@ -688,13 +667,13 @@ function _buildTestPack() {
|
|
|
688
667
|
_context13.t4 = (0, _context13.t2)(_context13.t3).call(_context12, function (acc, key) {
|
|
689
668
|
acc[key] = getTarballPath(data, key);
|
|
690
669
|
return acc;
|
|
691
|
-
}, _Object$create__default[
|
|
670
|
+
}, _Object$create__default["default"](null));
|
|
692
671
|
_context13.next = 11;
|
|
693
672
|
return (0, _context13.t0)(_context13.t1, _context13.t4);
|
|
694
673
|
|
|
695
674
|
case 11:
|
|
696
675
|
_context13.next = 13;
|
|
697
|
-
return findUp__default[
|
|
676
|
+
return findUp__default["default"]("package-lock.json", {
|
|
698
677
|
cwd: cwd
|
|
699
678
|
});
|
|
700
679
|
|
|
@@ -819,9 +798,9 @@ function checkTmpPath(_x15) {
|
|
|
819
798
|
|
|
820
799
|
|
|
821
800
|
function _checkTmpPath() {
|
|
822
|
-
_checkTmpPath = _asyncToGenerator__default[
|
|
801
|
+
_checkTmpPath = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(data) {
|
|
823
802
|
var tmpDir;
|
|
824
|
-
return _regeneratorRuntime__default[
|
|
803
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context14) {
|
|
825
804
|
while (1) {
|
|
826
805
|
switch (_context14.prev = _context14.next) {
|
|
827
806
|
case 0:
|
|
@@ -854,26 +833,26 @@ function test(_x16) {
|
|
|
854
833
|
}
|
|
855
834
|
|
|
856
835
|
function _test() {
|
|
857
|
-
_test = _asyncToGenerator__default[
|
|
836
|
+
_test = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(_ref2) {
|
|
858
837
|
var _context18;
|
|
859
838
|
|
|
860
839
|
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
840
|
|
|
862
|
-
return _regeneratorRuntime__default[
|
|
841
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context32) {
|
|
863
842
|
while (1) {
|
|
864
843
|
switch (_context32.prev = _context32.next) {
|
|
865
844
|
case 0:
|
|
866
845
|
getStages = function _getStages() {
|
|
867
846
|
var _context19;
|
|
868
847
|
|
|
869
|
-
return _mapInstanceProperty__default[
|
|
848
|
+
return _mapInstanceProperty__default["default"](_context19 = _toConsumableArray__default["default"](projectStatuses)).call(_context19, function (_ref3) {
|
|
870
849
|
var _context20;
|
|
871
850
|
|
|
872
|
-
var _ref4 = _slicedToArray__default[
|
|
851
|
+
var _ref4 = _slicedToArray__default["default"](_ref3, 2),
|
|
873
852
|
key = _ref4[0],
|
|
874
853
|
stage = _ref4[1].stage;
|
|
875
854
|
|
|
876
|
-
return _concatInstanceProperty__default[
|
|
855
|
+
return _concatInstanceProperty__default["default"](_context20 = " ".concat(key, ": ")).call(_context20, stage);
|
|
877
856
|
});
|
|
878
857
|
};
|
|
879
858
|
|
|
@@ -889,7 +868,7 @@ function _test() {
|
|
|
889
868
|
return _context32.abrupt("return", true);
|
|
890
869
|
|
|
891
870
|
case 5:
|
|
892
|
-
_context32.t0 = _Object$freeze__default[
|
|
871
|
+
_context32.t0 = _Object$freeze__default["default"];
|
|
893
872
|
_context32.t1 = failCommand;
|
|
894
873
|
_context32.t2 = packageScripts;
|
|
895
874
|
_context32.t3 = projectPaths;
|
|
@@ -906,7 +885,7 @@ function _test() {
|
|
|
906
885
|
paths[_key] = arguments[_key];
|
|
907
886
|
}
|
|
908
887
|
|
|
909
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
888
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context15 = [data.tmpDir.name, "logs"]).call(_context15, paths));
|
|
910
889
|
};
|
|
911
890
|
|
|
912
891
|
_context32.t6 = function tmpReposResolve() {
|
|
@@ -916,7 +895,7 @@ function _test() {
|
|
|
916
895
|
paths[_key2] = arguments[_key2];
|
|
917
896
|
}
|
|
918
897
|
|
|
919
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
898
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context16 = [data.tmpDir.name, "repos"]).call(_context16, paths));
|
|
920
899
|
};
|
|
921
900
|
|
|
922
901
|
_context32.t7 = function tmpRootResolve() {
|
|
@@ -926,7 +905,7 @@ function _test() {
|
|
|
926
905
|
paths[_key3] = arguments[_key3];
|
|
927
906
|
}
|
|
928
907
|
|
|
929
|
-
return path.resolve.apply(void 0, _concatInstanceProperty__default[
|
|
908
|
+
return path.resolve.apply(void 0, _concatInstanceProperty__default["default"](_context17 = [data.tmpDir.name]).call(_context17, paths));
|
|
930
909
|
};
|
|
931
910
|
|
|
932
911
|
_context32.t8 = process.cwd();
|
|
@@ -941,7 +920,7 @@ function _test() {
|
|
|
941
920
|
visDevUtilsPath: _context32.t8
|
|
942
921
|
};
|
|
943
922
|
data = (0, _context32.t0)(_context32.t9);
|
|
944
|
-
projectStatuses = new _Map__default[
|
|
923
|
+
projectStatuses = new _Map__default["default"](_mapInstanceProperty__default["default"](_context18 = _Object$keys__default["default"](data.projectPaths)).call(_context18, function (project) {
|
|
945
924
|
return [project, new ProjectState()];
|
|
946
925
|
}));
|
|
947
926
|
/**
|
|
@@ -955,28 +934,28 @@ function _test() {
|
|
|
955
934
|
|
|
956
935
|
case 23:
|
|
957
936
|
_context32.next = 25;
|
|
958
|
-
return _Promise__default[
|
|
937
|
+
return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context21 = ["repos", "logs"]).call(_context21, function (dir) {
|
|
959
938
|
return fsExtra.mkdir(path.resolve(data.tmpDir.name, dir));
|
|
960
939
|
}));
|
|
961
940
|
|
|
962
941
|
case 25:
|
|
963
942
|
logInfo("Begin", getStages().join("\n"));
|
|
964
943
|
_context32.next = 28;
|
|
965
|
-
return _Promise__default[
|
|
966
|
-
var _ref6 = _asyncToGenerator__default[
|
|
944
|
+
return _Promise__default["default"].all(_mapInstanceProperty__default["default"](_context22 = _toConsumableArray__default["default"](projectStatuses)).call(_context22, /*#__PURE__*/function () {
|
|
945
|
+
var _ref6 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(_ref5) {
|
|
967
946
|
var _ref7, projectName, state, projectPath, stats, failedDeps, localDeps, _iterator2, _step2, localDep, depStatus, _context24;
|
|
968
947
|
|
|
969
|
-
return _regeneratorRuntime__default[
|
|
948
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context25) {
|
|
970
949
|
while (1) {
|
|
971
950
|
switch (_context25.prev = _context25.next) {
|
|
972
951
|
case 0:
|
|
973
|
-
_ref7 = _slicedToArray__default[
|
|
952
|
+
_ref7 = _slicedToArray__default["default"](_ref5, 2), projectName = _ref7[0], state = _ref7[1];
|
|
974
953
|
_context25.prev = 1;
|
|
975
954
|
state.stage = "preparing";
|
|
976
955
|
projectPath = data.projectPaths[projectName];
|
|
977
956
|
_context25.next = 6;
|
|
978
|
-
return _asyncToGenerator__default[
|
|
979
|
-
return _regeneratorRuntime__default[
|
|
957
|
+
return _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
|
|
958
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context23) {
|
|
980
959
|
while (1) {
|
|
981
960
|
switch (_context23.prev = _context23.next) {
|
|
982
961
|
case 0:
|
|
@@ -1116,7 +1095,7 @@ function _test() {
|
|
|
1116
1095
|
case 60:
|
|
1117
1096
|
_context25.prev = 60;
|
|
1118
1097
|
_context25.t2 = _context25["catch"](1);
|
|
1119
|
-
logError(_concatInstanceProperty__default[
|
|
1098
|
+
logError(_concatInstanceProperty__default["default"](_context24 = "Fail ".concat(projectName, " (")).call(_context24, state.stage, "):"), getStages().join("\n"));
|
|
1120
1099
|
state.reject(_context25.t2);
|
|
1121
1100
|
|
|
1122
1101
|
case 64:
|
|
@@ -1133,9 +1112,9 @@ function _test() {
|
|
|
1133
1112
|
}()));
|
|
1134
1113
|
|
|
1135
1114
|
case 28:
|
|
1136
|
-
_context32.t10 = _everyInstanceProperty__default[
|
|
1115
|
+
_context32.t10 = _everyInstanceProperty__default["default"];
|
|
1137
1116
|
_context32.next = 31;
|
|
1138
|
-
return _Promise__default[
|
|
1117
|
+
return _Promise__default["default"].allSettled(_mapInstanceProperty__default["default"](_context27 = _toConsumableArray__default["default"](_valuesInstanceProperty__default["default"](projectStatuses).call(projectStatuses))).call(_context27, function (status) {
|
|
1139
1118
|
return status.promise;
|
|
1140
1119
|
}));
|
|
1141
1120
|
|
|
@@ -1172,7 +1151,7 @@ function _test() {
|
|
|
1172
1151
|
break;
|
|
1173
1152
|
}
|
|
1174
1153
|
|
|
1175
|
-
_step3$value = _slicedToArray__default[
|
|
1154
|
+
_step3$value = _slicedToArray__default["default"](_step3.value, 2), projectName = _step3$value[0], promise = _step3$value[1].promise;
|
|
1176
1155
|
_context32.prev = 45;
|
|
1177
1156
|
_context32.next = 48;
|
|
1178
1157
|
return promise;
|
|
@@ -1211,11 +1190,11 @@ function _test() {
|
|
|
1211
1190
|
// Print the detailed logs for inspection (especially in CI).
|
|
1212
1191
|
logInfo("Outputs");
|
|
1213
1192
|
_context32.t14 = process.stdout;
|
|
1214
|
-
_context32.t15 = _concatInstanceProperty__default[
|
|
1193
|
+
_context32.t15 = _concatInstanceProperty__default["default"](_context28 = [""]);
|
|
1215
1194
|
_context32.t16 = _context28;
|
|
1216
|
-
_context32.t17 = _toConsumableArray__default[
|
|
1217
|
-
_context32.t18 = _Promise__default[
|
|
1218
|
-
_context32.t19 = _mapInstanceProperty__default[
|
|
1195
|
+
_context32.t17 = _toConsumableArray__default["default"];
|
|
1196
|
+
_context32.t18 = _Promise__default["default"];
|
|
1197
|
+
_context32.t19 = _mapInstanceProperty__default["default"];
|
|
1219
1198
|
_context32.next = 72;
|
|
1220
1199
|
return fsExtra.readdir(data.tmpLogsResolve());
|
|
1221
1200
|
|
|
@@ -1231,7 +1210,7 @@ function _test() {
|
|
|
1231
1210
|
_context32.t22 = _context32.sent;
|
|
1232
1211
|
_context32.t23 = (0, _context32.t17)(_context32.t22);
|
|
1233
1212
|
_context32.t24 = [""];
|
|
1234
|
-
_context32.t25 = _context32.t15.call.call(_context32.t15, _context32.t16, _context32.t23, _context32.t24).join("\n\n" + _repeatInstanceProperty__default[
|
|
1213
|
+
_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
1214
|
|
|
1236
1215
|
_context32.t14.write.call(_context32.t14, _context32.t25);
|
|
1237
1216
|
|
|
@@ -1250,16 +1229,16 @@ function _test() {
|
|
|
1250
1229
|
|
|
1251
1230
|
var _context, _context2;
|
|
1252
1231
|
|
|
1253
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol__default[
|
|
1232
|
+
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
1233
|
|
|
1255
|
-
function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty__default[
|
|
1234
|
+
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
1235
|
|
|
1257
1236
|
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
1237
|
var argv = parseArguments();
|
|
1259
1238
|
|
|
1260
|
-
var projectPaths = _reduceInstanceProperty__default[
|
|
1239
|
+
var projectPaths = _reduceInstanceProperty__default["default"](_context = _mapInstanceProperty__default["default"](_context2 = argv["project"]).call(_context2, function (raw) {
|
|
1261
1240
|
var _raw$split = raw.split(" ", 2),
|
|
1262
|
-
_raw$split2 = _slicedToArray__default[
|
|
1241
|
+
_raw$split2 = _slicedToArray__default["default"](_raw$split, 2),
|
|
1263
1242
|
name = _raw$split2[0],
|
|
1264
1243
|
path$1 = _raw$split2[1];
|
|
1265
1244
|
|
|
@@ -1276,7 +1255,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
|
|
|
1276
1255
|
process.exit(1);
|
|
1277
1256
|
}
|
|
1278
1257
|
})).call(_context, function (acc, _ref) {
|
|
1279
|
-
var _ref2 = _slicedToArray__default[
|
|
1258
|
+
var _ref2 = _slicedToArray__default["default"](_ref, 2),
|
|
1280
1259
|
name = _ref2[0],
|
|
1281
1260
|
path = _ref2[1];
|
|
1282
1261
|
|
|
@@ -1286,7 +1265,7 @@ var projectPaths = _reduceInstanceProperty__default['default'](_context = _mapIn
|
|
|
1286
1265
|
|
|
1287
1266
|
var rawPackageScriptArg = argv["package-script"];
|
|
1288
1267
|
|
|
1289
|
-
var packageScripts = _flatMapInstanceProperty__default[
|
|
1268
|
+
var packageScripts = _flatMapInstanceProperty__default["default"](rawPackageScriptArg).call(rawPackageScriptArg, function (raw) {
|
|
1290
1269
|
var packageScripts = [];
|
|
1291
1270
|
var packageName = null;
|
|
1292
1271
|
|
|
@@ -1297,12 +1276,12 @@ var packageScripts = _flatMapInstanceProperty__default['default'](rawPackageScri
|
|
|
1297
1276
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1298
1277
|
var part = _step.value;
|
|
1299
1278
|
|
|
1300
|
-
var mode = _sliceInstanceProperty__default[
|
|
1279
|
+
var mode = _sliceInstanceProperty__default["default"](part).call(part, -1);
|
|
1301
1280
|
|
|
1302
1281
|
if (mode === "?" || mode === "!") {
|
|
1303
1282
|
packageScripts.push({
|
|
1304
1283
|
packageName: packageName,
|
|
1305
|
-
scriptName: _sliceInstanceProperty__default[
|
|
1284
|
+
scriptName: _sliceInstanceProperty__default["default"](part).call(part, 0, -1),
|
|
1306
1285
|
skipIfMissing: mode === "?"
|
|
1307
1286
|
});
|
|
1308
1287
|
} else {
|