datagrok-tools 4.13.68 → 4.13.72

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,11 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
+ ## 4.13.70 (2025-04-14)
4
+
5
+ ### Features
6
+
7
+ * Added error output
8
+
3
9
  ## 4.13.67 (2025-03-26)
4
10
 
5
11
  ### Features
@@ -288,16 +288,17 @@ function _runTesting() {
288
288
  organized = testsLeft;
289
289
  browserId++;
290
290
  if (!(r.verboseFailed === 'Tests execution failed')) {
291
- _context2.next = 42;
291
+ _context2.next = 43;
292
292
  break;
293
293
  }
294
- return _context2.abrupt("break", 43);
295
- case 42:
294
+ if (r.error) console.log(r.error);
295
+ return _context2.abrupt("break", 44);
296
+ case 43:
296
297
  if (r.failed) {
297
298
  _context2.next = 0;
298
299
  break;
299
300
  }
300
- case 43:
301
+ case 44:
301
302
  case "end":
302
303
  return _context2.stop();
303
304
  }
@@ -152,6 +152,9 @@ function _getBrowserPage() {
152
152
  key,
153
153
  token,
154
154
  browser,
155
+ targets,
156
+ devtoolsTarget,
157
+ client,
155
158
  page,
156
159
  _args4 = arguments;
157
160
  return _regenerator["default"].wrap(function _callee4$(_context4) {
@@ -175,58 +178,85 @@ function _getBrowserPage() {
175
178
  return puppeteer.launch(params);
176
179
  case 14:
177
180
  browser = _context4.sent;
178
- _context4.next = 17;
181
+ if (!params.debug) {
182
+ _context4.next = 28;
183
+ break;
184
+ }
185
+ _context4.next = 18;
186
+ return browser.targets();
187
+ case 18:
188
+ targets = _context4.sent;
189
+ devtoolsTarget = targets.find(function (t) {
190
+ return t.type() === 'other' && t.url().startsWith('devtools://');
191
+ });
192
+ if (!devtoolsTarget) {
193
+ _context4.next = 28;
194
+ break;
195
+ }
196
+ _context4.next = 23;
197
+ return devtoolsTarget.createCDPSession();
198
+ case 23:
199
+ client = _context4.sent;
200
+ _context4.next = 26;
201
+ return client.send('Runtime.enable');
202
+ case 26:
203
+ _context4.next = 28;
204
+ return client.send('Runtime.evaluate', {
205
+ expression: "\n window.UI.viewManager.showView('network');\n window.UI.dockController.setDockSide('bottom')\n "
206
+ });
207
+ case 28:
208
+ _context4.next = 30;
179
209
  return browser.newPage();
180
- case 17:
210
+ case 30:
181
211
  page = _context4.sent;
182
- _context4.next = 20;
212
+ _context4.next = 33;
183
213
  return page.setViewport({
184
214
  width: 1920,
185
215
  height: 1080
186
216
  });
187
- case 20:
217
+ case 33:
188
218
  page.setDefaultNavigationTimeout(0);
189
- _context4.next = 23;
219
+ _context4.next = 36;
190
220
  return page["goto"]("".concat(url, "/oauth/"));
191
- case 23:
192
- _context4.next = 25;
221
+ case 36:
222
+ _context4.next = 38;
193
223
  return page.setCookie({
194
224
  name: 'auth',
195
225
  value: token
196
226
  });
197
- case 25:
198
- _context4.next = 27;
227
+ case 38:
228
+ _context4.next = 40;
199
229
  return page.evaluate(function (token) {
200
230
  window.localStorage.setItem('auth', token);
201
231
  }, token);
202
- case 27:
203
- _context4.next = 29;
232
+ case 40:
233
+ _context4.next = 42;
204
234
  return page["goto"](url);
205
- case 29:
206
- _context4.prev = 29;
207
- _context4.next = 32;
235
+ case 42:
236
+ _context4.prev = 42;
237
+ _context4.next = 45;
208
238
  return page.waitForFunction(function () {
209
239
  return document.querySelector('.grok-preloader') == null;
210
240
  }, {
211
241
  timeout: 3600000
212
242
  });
213
- case 32:
214
- _context4.next = 37;
243
+ case 45:
244
+ _context4.next = 50;
215
245
  break;
216
- case 34:
217
- _context4.prev = 34;
218
- _context4.t0 = _context4["catch"](29);
246
+ case 47:
247
+ _context4.prev = 47;
248
+ _context4.t0 = _context4["catch"](42);
219
249
  throw _context4.t0;
220
- case 37:
250
+ case 50:
221
251
  return _context4.abrupt("return", {
222
252
  browser: browser,
223
253
  page: page
224
254
  });
225
- case 38:
255
+ case 51:
226
256
  case "end":
227
257
  return _context4.stop();
228
258
  }
229
- }, _callee4, null, [[29, 34]]);
259
+ }, _callee4, null, [[42, 47]]);
230
260
  }));
231
261
  return _getBrowserPage.apply(this, arguments);
232
262
  }
@@ -679,6 +709,7 @@ function _runBrowser() {
679
709
  verbosePassed: "",
680
710
  verboseSkipped: "",
681
711
  verboseFailed: "Tests execution failed",
712
+ error: JSON.stringify(e),
682
713
  passedAmount: 0,
683
714
  skippedAmount: 0,
684
715
  failedAmount: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.13.68",
3
+ "version": "4.13.72",
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": {