datagrok-tools 4.13.41 → 4.13.44
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/CHANGELOG.md +13 -1
- package/bin/commands/publish.js +20 -21
- package/bin/commands/test.js +7 -5
- package/bin/utils/test-utils.js +4 -3
- package/bin/utils/utils.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
# Datagrok-tools changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
## 4.13.
|
|
4
|
+
## 4.13.44 (2024-12-06)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Test fixed infinite testing
|
|
9
|
+
|
|
10
|
+
## 4.13.43 (2024-12-02)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* Publish visual updates
|
|
15
|
+
|
|
16
|
+
## 4.13.42 (2024-11-29)
|
|
5
17
|
|
|
6
18
|
### Features
|
|
7
19
|
|
package/bin/commands/publish.js
CHANGED
|
@@ -310,7 +310,7 @@ function _publish() {
|
|
|
310
310
|
encoding: 'utf-8'
|
|
311
311
|
}));
|
|
312
312
|
if (!(args.refresh || args.all)) {
|
|
313
|
-
_context3.next =
|
|
313
|
+
_context3.next = 27;
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
316
|
if (_path["default"].basename(curDir) !== 'packages') curDir = _path["default"].dirname(curDir);
|
|
@@ -328,49 +328,48 @@ function _publish() {
|
|
|
328
328
|
token = _context3.sent;
|
|
329
329
|
url = "".concat(baseUrl, "/packages/published/current");
|
|
330
330
|
packagesToLoad = ['all'];
|
|
331
|
-
console.log(url);
|
|
332
331
|
if (!args.refresh) {
|
|
333
|
-
_context3.next =
|
|
332
|
+
_context3.next = 22;
|
|
334
333
|
break;
|
|
335
334
|
}
|
|
336
|
-
_context3.next =
|
|
335
|
+
_context3.next = 19;
|
|
337
336
|
return (0, _nodeFetch["default"])(url, {
|
|
338
337
|
method: 'GET',
|
|
339
338
|
headers: {
|
|
340
339
|
'Authorization': token // Attach cookies here
|
|
341
340
|
}
|
|
342
341
|
});
|
|
343
|
-
case
|
|
344
|
-
_context3.next =
|
|
342
|
+
case 19:
|
|
343
|
+
_context3.next = 21;
|
|
345
344
|
return _context3.sent.json();
|
|
346
|
-
case
|
|
345
|
+
case 21:
|
|
347
346
|
packagesToLoad = _context3.sent.map(function (item) {
|
|
348
347
|
return item.name;
|
|
349
348
|
});
|
|
350
|
-
case
|
|
349
|
+
case 22:
|
|
351
350
|
console.log('Loading packages:');
|
|
352
|
-
_context3.next =
|
|
351
|
+
_context3.next = 25;
|
|
353
352
|
return (0, _testUtils.loadPackages)(curDir, packagesToLoad.join(' '), host, false, false, args.link, args.release);
|
|
354
|
-
case
|
|
355
|
-
_context3.next =
|
|
353
|
+
case 25:
|
|
354
|
+
_context3.next = 36;
|
|
356
355
|
break;
|
|
357
|
-
case
|
|
356
|
+
case 27:
|
|
358
357
|
if (!args.link) {
|
|
359
|
-
_context3.next =
|
|
358
|
+
_context3.next = 34;
|
|
360
359
|
break;
|
|
361
360
|
}
|
|
362
|
-
_context3.next =
|
|
361
|
+
_context3.next = 30;
|
|
363
362
|
return utils.runScript("npm install", curDir);
|
|
364
|
-
case
|
|
365
|
-
_context3.next =
|
|
363
|
+
case 30:
|
|
364
|
+
_context3.next = 32;
|
|
366
365
|
return utils.runScript("grok link", curDir);
|
|
367
|
-
case
|
|
368
|
-
_context3.next =
|
|
366
|
+
case 32:
|
|
367
|
+
_context3.next = 34;
|
|
369
368
|
return utils.runScript("npm run build", curDir);
|
|
370
|
-
case
|
|
371
|
-
_context3.next =
|
|
369
|
+
case 34:
|
|
370
|
+
_context3.next = 36;
|
|
372
371
|
return publishPackage(args);
|
|
373
|
-
case
|
|
372
|
+
case 36:
|
|
374
373
|
case "end":
|
|
375
374
|
return _context3.stop();
|
|
376
375
|
}
|
package/bin/commands/test.js
CHANGED
|
@@ -24,7 +24,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
24
24
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
25
|
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; } /* eslint-disable max-len */
|
|
26
26
|
var testInvocationTimeout = 3600000;
|
|
27
|
-
var availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag'];
|
|
27
|
+
var availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag', 'ci-cd'];
|
|
28
28
|
var curDir = process.cwd();
|
|
29
29
|
var grokDir = _path["default"].join(_os["default"].homedir(), '.grok');
|
|
30
30
|
var confPath = _path["default"].join(grokDir, 'config.yaml');
|
|
@@ -137,7 +137,7 @@ function _runTesting() {
|
|
|
137
137
|
workerId = 1;
|
|
138
138
|
_context3.next = 14;
|
|
139
139
|
return (0, _testUtils.timeout)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
140
|
-
var _args$benchmark, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, testsLeft, testsToReproduce, _iterator2, _step2, testData, reproduced, _iterator3, _step3, _test2, _reproducedTest2;
|
|
140
|
+
var _args$benchmark, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, _args$ciCd, testsLeft, testsToReproduce, _iterator2, _step2, testData, reproduced, _iterator3, _step3, _test2, _reproducedTest2;
|
|
141
141
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
142
142
|
while (1) switch (_context2.prev = _context2.next) {
|
|
143
143
|
case 0:
|
|
@@ -149,6 +149,7 @@ function _runTesting() {
|
|
|
149
149
|
record: (_args$record = args.record) !== null && _args$record !== void 0 ? _args$record : false,
|
|
150
150
|
report: (_args$report = args.report) !== null && _args$report !== void 0 ? _args$report : false,
|
|
151
151
|
verbose: (_args$verbose = args.verbose) !== null && _args$verbose !== void 0 ? _args$verbose : false,
|
|
152
|
+
ciCd: (_args$ciCd = args['ci-cd']) !== null && _args$ciCd !== void 0 ? _args$ciCd : false,
|
|
152
153
|
stopOnTimeout: true
|
|
153
154
|
}, workerId, testInvocationTimeout);
|
|
154
155
|
case 2:
|
|
@@ -159,7 +160,7 @@ function _runTesting() {
|
|
|
159
160
|
try {
|
|
160
161
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
161
162
|
testData = _step2.value;
|
|
162
|
-
if (!r.
|
|
163
|
+
if (!r.verbosePassed.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !r.verboseSkipped.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !r.verboseFailed.includes("".concat(testData.params.category, ": ").concat(testData.params.test)) && !new RegExp("".concat(testData.params.category.trim(), "[^\\n]*: (before|after)")).test(r.verboseFailed)) testsLeft.push(testData);
|
|
163
164
|
if (r.verboseFailed.includes("".concat(testData.params.category, ": ").concat(testData.params.test, " : Error:"))) {
|
|
164
165
|
testsToReproduce.push(testData);
|
|
165
166
|
}
|
|
@@ -242,7 +243,7 @@ function reproducedTest(_x3, _x4) {
|
|
|
242
243
|
}
|
|
243
244
|
function _reproducedTest() {
|
|
244
245
|
_reproducedTest = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(args, testsToReproduce) {
|
|
245
|
-
var res, _iterator4, _step4, _args$benchmark2, _test3, r;
|
|
246
|
+
var res, _iterator4, _step4, _args$benchmark2, _args$ciCd2, _test3, r;
|
|
246
247
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
247
248
|
while (1) switch (_context4.prev = _context4.next) {
|
|
248
249
|
case 0:
|
|
@@ -265,7 +266,8 @@ function _reproducedTest() {
|
|
|
265
266
|
report: false,
|
|
266
267
|
verbose: false,
|
|
267
268
|
stopOnTimeout: true,
|
|
268
|
-
reproduce: true
|
|
269
|
+
reproduce: true,
|
|
270
|
+
ciCd: (_args$ciCd2 = args['ci-cd']) !== null && _args$ciCd2 !== void 0 ? _args$ciCd2 : false
|
|
269
271
|
}, 0, testInvocationTimeout);
|
|
270
272
|
case 8:
|
|
271
273
|
r = _context4.sent;
|
package/bin/utils/test-utils.js
CHANGED
|
@@ -368,7 +368,7 @@ function _loadPackages() {
|
|
|
368
368
|
break;
|
|
369
369
|
}
|
|
370
370
|
_context6.prev = 14;
|
|
371
|
-
|
|
371
|
+
process.stdout.write("Building and publishing ".concat(dirName, "..."));
|
|
372
372
|
if (!(skipPublish != true)) {
|
|
373
373
|
_context6.next = 27;
|
|
374
374
|
break;
|
|
@@ -394,13 +394,13 @@ function _loadPackages() {
|
|
|
394
394
|
return utils.runScript("grok publish ".concat(hostString).concat(release ? ' --release' : ''), packageDir);
|
|
395
395
|
case 27:
|
|
396
396
|
packagesToRun.set(dirName, true);
|
|
397
|
-
|
|
397
|
+
process.stdout.write(" success!\n");
|
|
398
398
|
_context6.next = 34;
|
|
399
399
|
break;
|
|
400
400
|
case 31:
|
|
401
401
|
_context6.prev = 31;
|
|
402
402
|
_context6.t0 = _context6["catch"](14);
|
|
403
|
-
|
|
403
|
+
process.stdout.write(" fail!\n");
|
|
404
404
|
case 34:
|
|
405
405
|
_context6.next = 39;
|
|
406
406
|
break;
|
|
@@ -664,6 +664,7 @@ function _runWorker() {
|
|
|
664
664
|
return page.evaluate(function (testData, options) {
|
|
665
665
|
if (options.benchmark) window.DG.Test.isInBenchmark = true;
|
|
666
666
|
if (options.reproduce) window.DG.Test.isReproducing = true;
|
|
667
|
+
if (options.ciCd) window.DG.Test.isCiCd = true;
|
|
667
668
|
return new Promise(function (resolve, reject) {
|
|
668
669
|
window.DG.Utils.executeTests(testData, options.stopOnTimeout).then(function (results) {
|
|
669
670
|
resolve(results);
|
package/bin/utils/utils.js
CHANGED
|
@@ -334,7 +334,7 @@ function _runScript() {
|
|
|
334
334
|
_context2.prev = 11;
|
|
335
335
|
_context2.t0 = _context2["catch"](1);
|
|
336
336
|
console.error("Execution failed: ".concat(_context2.t0.message));
|
|
337
|
-
throw new Error("Cant run script");
|
|
337
|
+
throw new Error("Cant run script ".concat(script));
|
|
338
338
|
case 15:
|
|
339
339
|
case "end":
|
|
340
340
|
return _context2.stop();
|
package/package.json
CHANGED