datagrok-tools 4.13.61 → 4.13.63

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
+ ## 4.13.63 (2025-02-27)
4
+
5
+ ### Features
6
+
7
+ * Grok Link minor fixes
8
+
9
+ ## 4.13.62 (2025-02-27)
10
+
11
+ ### Features
12
+
13
+ * No Sandbox mode for puppeteer removed
14
+ * Added debug mode for test and testAll
15
+
3
16
  ## 4.13.61 (2025-01-27)
4
17
 
5
18
  ### Features
@@ -12,8 +12,8 @@ var HELP_CONFIG = "\nUsage: grok config\n\nCreate or update a configuration file
12
12
  var HELP_CREATE = "\nUsage: grok create [name]\n\nCreate a package:\n\ngrok create Create a package in the current working directory\ngrok create <name> Create a package in a folder with the specified name\n\nPlease note that the package name may only include letters, numbers, underscores, or hyphens\n\nOptions:\n[--eslint] [--ide] [--js | --ts] [--test]\n\n--eslint Add a configuration for eslint\n--ide Add an IDE-specific configuration for debugging (vscode)\n--js Create a JavaScript package\n--ts Create a TypeScript package (default)\n--test Add tests support (TypeScript packages only)\n";
13
13
  var HELP_PUBLISH = "\nUsage: grok publish [host]\n\nUpload a package\n\nOptions:\n[--build|--rebuild] [--debug|--release] [-k | --key] [--suffix] [--all] [--refresh] [--link]\n\n--all Publish all available packages \n--refresh Publish all available already loaded packages \n--link \t Link the package to local utils\n\nRunning `grok publish` is the same as running `grok publish defaultHost --build --debug`\n";
14
14
  var HELP_CHECK = "\nUsage: grok check\n\nOptions:\n[-r | --recursive]\n\n--recursive Check all packages in the current directory\n\nCheck package content (function signatures, import statements of external modules, etc.)\n";
15
- var HELP_TEST = "\nUsage: grok test\n\nOptions:\n[--package] [--category] [--test] [--host] [--csv] [--gui] [--skip-build] [--skip-publish] [--link] [--catchUnhandled] [--report] [--record] [--verbose] [--platform] [--benchmark] [--stress-test]\n\n--package Specify a package name to run tests for\n--category Specify a category name to run tests for\n--test Specify a test name to run \n--host Host alias as in the config file\n--csv Save the test report in a CSV file\n--gui Launch graphical interface (non-headless mode)\n--catchUnhandled Catch unhandled exceptions during test execution (default=true)\n--report Report failed tests to audit, notifies package author (default=false)\n--skip-build Skip the package build step\n--skip-publish Skip the package publication step\n--link \t Link the package to local utils\n--record Records the test execution process in mp4 format\n--verbose Prints detailed information about passed and skipped tests in the console\n--platform Runs only platform tests (applicable for ApiTests package only)\n--core Runs package & auto tests & core tests (core tests run only from DevTools package)\n--benchmark \t Runs tests in benchmark mode\n--stress-test Runs shuffled stress-test only\n \nRun package tests\n\nSee instructions:\nhttps://datagrok.ai/help/develop/how-to/test-packages#local-testing\n";
16
- var HELP_TESTALL = "\nUsage: grok testall\n\nOptions:\n[--packages] [--host] [--csv] [--gui] [--skip-build] [--skip-publish] [--link-package] [--catchUnhandled] [--report] [--record] [--verbose] [--benchmark] [--stress-test] [--order] [--tags] [--testRepeat] [--browsers-count]\n\n--packages Specify a packages names to run tests for\n--host Host alias as in the config file\n--csv Save the test report in a CSV file\n--gui Launch graphical interface (non-headless mode)\n--catchUnhandled Catch unhandled exceptions during test execution (default=true)\n--report Report failed tests to audit, notifies packages author (default=false)\n--skip-build Skip the packages build step\n--skip-publish Skip the packages publication step\n--link-package \t Link the packages to local utils\n--record Records the test execution process in mp4 format\n--verbose Prints detailed information about passed and skipped tests in the console\n--core Runs packages & core tests (applicable for DevTools packages only)\n--benchmark \t Runs tests in benchmark mode\n--stress-test Runs shuffled stress-test only\n--order Specify order for tests invocation\n--tags Filter tests by tag name for run\n--testRepeat Set amount of tests repeats\n--browsers-count Set amount of browsers for tests run\n\nRun tests of all or specified packages \n\nSee instructions:\nhttps://datagrok.ai/help/develop/how-to/test-packages#local-testing\n";
15
+ var HELP_TEST = "\nUsage: grok test\n\nOptions:\n[--package] [--category] [--test] [--host] [--csv] [--gui] [--skip-build] [--skip-publish] [--link] [--catchUnhandled] [--report] [--record] [--verbose] [--platform] [--benchmark] [--stress-test] --[debug]\n\n--package Specify a package name to run tests for\n--category Specify a category name to run tests for\n--test Specify a test name to run \n--host Host alias as in the config file\n--csv Save the test report in a CSV file\n--gui Launch graphical interface (non-headless mode)\n--debug Enables debug point on tests run (useless without gui mode(you also have to open Inspector)) \n--catchUnhandled Catch unhandled exceptions during test execution (default=true)\n--report Report failed tests to audit, notifies package author (default=false)\n--skip-build Skip the package build step\n--skip-publish Skip the package publication step\n--link \t Link the package to local utils\n--record Records the test execution process in mp4 format\n--verbose Prints detailed information about passed and skipped tests in the console\n--platform Runs only platform tests (applicable for ApiTests package only)\n--core Runs package & auto tests & core tests (core tests run only from DevTools package)\n--benchmark \t Runs tests in benchmark mode\n--stress-test Runs shuffled stress-test only\n \nRun package tests\n\nSee instructions:\nhttps://datagrok.ai/help/develop/how-to/test-packages#local-testing\n";
16
+ var HELP_TESTALL = "\nUsage: grok testall\n\nOptions:\n[--packages] [--host] [--csv] [--gui] [--skip-build] [--skip-publish] [--link-package] [--catchUnhandled] [--report] [--record] [--verbose] [--benchmark] [--stress-test] [--order] [--tags] [--testRepeat] [--browsers-count] [--debug]\n\n--packages Specify a packages names to run tests for\n--host Host alias as in the config file\n--csv Save the test report in a CSV file\n--gui Launch graphical interface (non-headless mode)\n--debug Enables debug point on tests run (useless without gui mode(you also have to open Inspector)) \n--catchUnhandled Catch unhandled exceptions during test execution (default=true)\n--report Report failed tests to audit, notifies packages author (default=false)\n--skip-build Skip the packages build step\n--skip-publish Skip the packages publication step\n--link-package \t Link the packages to local utils\n--record Records the test execution process in mp4 format\n--verbose Prints detailed information about passed and skipped tests in the console\n--core Runs packages & core tests (applicable for DevTools packages only)\n--benchmark \t Runs tests in benchmark mode\n--stress-test Runs shuffled stress-test only\n--order Specify order for tests invocation\n--tags Filter tests by tag name for run\n--testRepeat Set amount of tests repeats\n--browsers-count Set amount of browsers for tests run\n\nRun tests of all or specified packages \n\nSee instructions:\nhttps://datagrok.ai/help/develop/how-to/test-packages#local-testing\n";
17
17
  var HELP_LINK = "\nUsage: grok link\n\nLink `datagrok-api` and libraries for local development\n";
18
18
 
19
19
  // const HELP_MIGRATE = `
@@ -60,6 +60,7 @@ function _link() {
60
60
  function collectPackagesData() {
61
61
  var packagePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : curDir;
62
62
  var packageJsonPath = _path["default"].join(packagePath, 'package.json');
63
+ if (!_fs["default"].existsSync(packageJsonPath)) return [];
63
64
  var json = JSON.parse(_fs["default"].readFileSync(packageJsonPath, 'utf-8'));
64
65
  var result = [];
65
66
  result = result.concat(collectPacakgeDataFromJsonObject(json.dependencies));
@@ -65,7 +65,7 @@ function testAll(_x) {
65
65
  }
66
66
  function _testAll() {
67
67
  _testAll = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(args) {
68
- var _args$tags, _args$order, _args$benchmark, _args$stressTest, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose;
68
+ var _args$tags, _args$order, _args$benchmark, _args$stressTest, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, _args$debug;
69
69
  var config, packagesToRun, testsObj, filteredTests, browsersOrder, testsResults, i, _iterator, _step, result;
70
70
  return _regenerator["default"].wrap(function _callee$(_context) {
71
71
  while (1) switch (_context.prev = _context.next) {
@@ -98,7 +98,8 @@ function _testAll() {
98
98
  gui: (_args$gui = args.gui) !== null && _args$gui !== void 0 ? _args$gui : false,
99
99
  record: (_args$record = args.record) !== null && _args$record !== void 0 ? _args$record : false,
100
100
  report: (_args$report = args.report) !== null && _args$report !== void 0 ? _args$report : false,
101
- verbose: (_args$verbose = args.verbose) !== null && _args$verbose !== void 0 ? _args$verbose : false
101
+ verbose: (_args$verbose = args.verbose) !== null && _args$verbose !== void 0 ? _args$verbose : false,
102
+ debug: (_args$debug = args['debug']) !== null && _args$debug !== void 0 ? _args$debug : false
102
103
  });
103
104
  case 16:
104
105
  testsResults = _context.sent;
@@ -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', 'ci-cd'];
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', 'debug'];
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');
@@ -192,15 +192,15 @@ function _runTesting() {
192
192
  organized = filtered;
193
193
  }
194
194
  if (args.verbose) {
195
- console.log(filtered);
196
- console.log("Tests total: ".concat(filtered.length));
195
+ console.log(organized);
196
+ console.log("Tests total: ".concat(organized.length));
197
197
  }
198
198
  color.info('Starting tests...');
199
199
  testsResults = [];
200
200
  browserId = 1;
201
201
  _context3.next = 40;
202
202
  return (0, _testUtils.timeout)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
203
- var _args$benchmark, _args$stressTest, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, _args$ciCd, _args$stressTest2, _args$benchmark2, testsLeft, testsToReproduce, _iterator3, _step3, testData, reproduced, _iterator4, _step4, _test2, _reproducedTest2;
203
+ var _args$benchmark, _args$stressTest, _args$catchUnhandled, _args$gui, _args$record, _args$report, _args$verbose, _args$ciCd, _args$debug, _args$stressTest2, _args$benchmark2, testsLeft, testsToReproduce, _iterator3, _step3, testData, reproduced, _iterator4, _step4, _test2, _reproducedTest2;
204
204
  return _regenerator["default"].wrap(function _callee2$(_context2) {
205
205
  while (1) switch (_context2.prev = _context2.next) {
206
206
  case 0:
@@ -214,7 +214,8 @@ function _runTesting() {
214
214
  report: (_args$report = args.report) !== null && _args$report !== void 0 ? _args$report : false,
215
215
  verbose: (_args$verbose = args.verbose) !== null && _args$verbose !== void 0 ? _args$verbose : false,
216
216
  ciCd: (_args$ciCd = args['ci-cd']) !== null && _args$ciCd !== void 0 ? _args$ciCd : false,
217
- stopOnTimeout: true
217
+ stopOnTimeout: true,
218
+ debug: (_args$debug = args['debug']) !== null && _args$debug !== void 0 ? _args$debug : false
218
219
  }, browserId, testInvocationTimeout);
219
220
  case 2:
220
221
  r = _context2.sent;
@@ -50,7 +50,7 @@ var grokDir = _path["default"].join(_os["default"].homedir(), '.grok');
50
50
  var confPath = _path["default"].join(grokDir, 'config.yaml');
51
51
  var testCollectionTimeout = 100000;
52
52
  var defaultLaunchParameters = exports.defaultLaunchParameters = {
53
- args: ['--disable-dev-shm-usage', '--disable-features=site-per-process', '--window-size=1920,1080', '--no-sandbox', '--disable-setuid-sandbox'],
53
+ args: ['--disable-dev-shm-usage', '--disable-features=site-per-process', '--window-size=1920,1080'],
54
54
  ignoreHTTPSErrors: true,
55
55
  headless: 'new',
56
56
  protocolTimeout: 0
@@ -667,6 +667,7 @@ function _runBrowser() {
667
667
  if (options.benchmark) window.DG.Test.isInBenchmark = true;
668
668
  if (options.reproduce) window.DG.Test.isReproducing = true;
669
669
  if (options.ciCd) window.DG.Test.isCiCd = true;
670
+ if (options.debug) window.DG.Test.isInDebug = true;
670
671
  return new Promise(function (resolve, reject) {
671
672
  window.DG.Utils.executeTests(testData, options.stopOnTimeout).then(function (results) {
672
673
  resolve(results);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.13.61",
3
+ "version": "4.13.63",
4
4
  "description": "Utility to upload and publish packages to Datagrok",
5
5
  "homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
6
6
  "dependencies": {