@jbrowse/core 1.6.4 → 1.6.7

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.
Files changed (56) hide show
  1. package/BaseFeatureWidget/BaseFeatureDetail.js +1 -3
  2. package/BaseFeatureWidget/index.d.ts +1 -1
  3. package/PluginLoader.d.ts +1 -1
  4. package/PluginManager.d.ts +2 -0
  5. package/ReExports/modules.d.ts +2 -0
  6. package/TextSearch/TextSearchManager.d.ts +2 -2
  7. package/assemblyManager/assemblyConfigSchema.d.ts +1 -1
  8. package/assemblyManager/assemblyManager.d.ts +1 -1
  9. package/configuration/index.d.ts +1 -1
  10. package/data_adapters/BaseAdapter.d.ts +2 -1
  11. package/data_adapters/BaseAdapter.js +29 -3
  12. package/data_adapters/CytobandAdapter.d.ts +1 -1
  13. package/package.json +4 -4
  14. package/pluggableElementTypes/RpcMethodType.js +1 -1
  15. package/pluggableElementTypes/models/InternetAccountModel.d.ts +103 -7
  16. package/pluggableElementTypes/models/InternetAccountModel.js +296 -10
  17. package/pluggableElementTypes/models/baseConnectionConfig.d.ts +1 -1
  18. package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +1 -1
  19. package/pluggableElementTypes/models/baseInternetAccountConfig.js +16 -1
  20. package/pluggableElementTypes/models/baseTrackConfig.d.ts +1 -1
  21. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +1 -0
  22. package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +46 -22
  23. package/rpc/BaseRpcDriver.d.ts +4 -4
  24. package/rpc/BaseRpcDriver.js +152 -79
  25. package/rpc/BaseRpcDriver.test.js +64 -43
  26. package/rpc/MainThreadRpcDriver.d.ts +1 -1
  27. package/rpc/MainThreadRpcDriver.js +25 -16
  28. package/rpc/RpcManager.d.ts +1 -1
  29. package/rpc/WebWorkerRpcDriver.d.ts +1 -1
  30. package/rpc/WebWorkerRpcDriver.js +43 -11
  31. package/rpc/configSchema.d.ts +1 -1
  32. package/ui/ErrorMessage.js +23 -8
  33. package/ui/FileSelector/FileSelector.js +1 -1
  34. package/ui/ReturnToImportFormDialog.d.ts +9 -0
  35. package/ui/ReturnToImportFormDialog.js +63 -0
  36. package/ui/Tooltip.d.ts +1 -1
  37. package/ui/Tooltip.js +2 -2
  38. package/ui/index.d.ts +2 -0
  39. package/ui/index.js +18 -0
  40. package/ui/theme.d.ts +8 -0
  41. package/ui/theme.js +9 -0
  42. package/ui/theme.test.js +2 -2
  43. package/util/Base1DViewModel.d.ts +2 -0
  44. package/util/Base1DViewModel.js +9 -0
  45. package/util/index.d.ts +12 -1
  46. package/util/index.js +52 -17
  47. package/util/index.test.js +35 -14
  48. package/util/io/index.d.ts +2 -1
  49. package/util/io/index.js +95 -96
  50. package/util/offscreenCanvasPonyfill.d.ts +1 -0
  51. package/util/offscreenCanvasPonyfill.js +70 -58
  52. package/util/simpleFeature.d.ts +3 -0
  53. package/util/types/index.d.ts +2 -2
  54. package/util/types/index.js +3 -3
  55. package/babel.config.d.ts +0 -15
  56. package/babel.config.js +0 -19
@@ -53,27 +53,20 @@ function watchWorker(_x, _x2, _x3) {
53
53
  }
54
54
 
55
55
  function _watchWorker() {
56
- _watchWorker = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(worker, pingTime, rpcDriverClassName) {
57
- return _regenerator.default.wrap(function _callee3$(_context3) {
56
+ _watchWorker = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(worker, pingTime, rpcDriverClassName) {
57
+ return _regenerator.default.wrap(function _callee6$(_context6) {
58
58
  while (1) {
59
- switch (_context3.prev = _context3.next) {
59
+ switch (_context6.prev = _context6.next) {
60
60
  case 0:
61
- _context3.next = 2;
62
- return worker.call('ping', [], {
63
- timeout: 100000000,
64
- rpcDriverClassName: rpcDriverClassName
65
- });
66
-
67
- case 2:
68
- return _context3.abrupt("return", new Promise(function (_resolve, reject) {
61
+ return _context6.abrupt("return", new Promise(function (_resolve, reject) {
69
62
  function delay() {
70
- setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
71
- return _regenerator.default.wrap(function _callee2$(_context2) {
63
+ setTimeout( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
64
+ return _regenerator.default.wrap(function _callee5$(_context5) {
72
65
  while (1) {
73
- switch (_context2.prev = _context2.next) {
66
+ switch (_context5.prev = _context5.next) {
74
67
  case 0:
75
- _context2.prev = 0;
76
- _context2.next = 3;
68
+ _context5.prev = 0;
69
+ _context5.next = 3;
77
70
  return worker.call('ping', [], {
78
71
  timeout: pingTime * 2,
79
72
  rpcDriverClassName: rpcDriverClassName
@@ -81,32 +74,32 @@ function _watchWorker() {
81
74
 
82
75
  case 3:
83
76
  delay();
84
- _context2.next = 9;
77
+ _context5.next = 9;
85
78
  break;
86
79
 
87
80
  case 6:
88
- _context2.prev = 6;
89
- _context2.t0 = _context2["catch"](0);
90
- reject(_context2.t0);
81
+ _context5.prev = 6;
82
+ _context5.t0 = _context5["catch"](0);
83
+ reject(_context5.t0);
91
84
 
92
85
  case 9:
93
86
  case "end":
94
- return _context2.stop();
87
+ return _context5.stop();
95
88
  }
96
89
  }
97
- }, _callee2, null, [[0, 6]]);
90
+ }, _callee5, null, [[0, 6]]);
98
91
  })), pingTime);
99
92
  }
100
93
 
101
94
  delay();
102
95
  }));
103
96
 
104
- case 3:
97
+ case 1:
105
98
  case "end":
106
- return _context3.stop();
99
+ return _context6.stop();
107
100
  }
108
101
  }
109
- }, _callee3);
102
+ }, _callee6);
110
103
  }));
111
104
  return _watchWorker.apply(this, arguments);
112
105
  }
@@ -131,28 +124,56 @@ var LazyWorker = /*#__PURE__*/function () {
131
124
 
132
125
  (0, _createClass2.default)(LazyWorker, [{
133
126
  key: "getWorker",
134
- value: function getWorker(pluginManager, rpcDriverClassName) {
135
- var _this = this;
127
+ value: function () {
128
+ var _getWorker = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(pluginManager, rpcDriverClassName) {
129
+ var _this = this;
130
+
131
+ var worker;
132
+ return _regenerator.default.wrap(function _callee$(_context) {
133
+ while (1) {
134
+ switch (_context.prev = _context.next) {
135
+ case 0:
136
+ if (this.worker) {
137
+ _context.next = 6;
138
+ break;
139
+ }
140
+
141
+ _context.next = 3;
142
+ return this.driver.makeWorker(pluginManager);
143
+
144
+ case 3:
145
+ worker = _context.sent;
146
+ watchWorker(worker, this.driver.maxPingTime, rpcDriverClassName).catch(function (error) {
147
+ if (_this.worker) {
148
+ console.error('worker did not respond, killing and generating new one');
149
+ console.error(error);
136
150
 
137
- if (!this.worker) {
138
- var worker = this.driver.makeWorker(pluginManager);
139
- watchWorker(worker, this.driver.maxPingTime, rpcDriverClassName).catch(function (error) {
140
- if (_this.worker) {
141
- console.error('worker did not respond, killing and generating new one');
142
- console.error(error);
151
+ _this.worker.destroy();
143
152
 
144
- _this.worker.destroy();
153
+ _this.worker.status = 'killed';
154
+ _this.worker.error = error;
155
+ _this.worker = undefined;
156
+ }
157
+ });
158
+ this.worker = worker;
145
159
 
146
- _this.worker.status = 'killed';
147
- _this.worker.error = error;
148
- _this.worker = undefined;
160
+ case 6:
161
+ return _context.abrupt("return", this.worker);
162
+
163
+ case 7:
164
+ case "end":
165
+ return _context.stop();
166
+ }
149
167
  }
150
- });
151
- this.worker = worker;
168
+ }, _callee, this);
169
+ }));
170
+
171
+ function getWorker(_x4, _x5) {
172
+ return _getWorker.apply(this, arguments);
152
173
  }
153
174
 
154
- return this.worker;
155
- }
175
+ return getWorker;
176
+ }()
156
177
  }]);
157
178
  return LazyWorker;
158
179
  }();
@@ -214,15 +235,39 @@ var BaseRpcDriver = /*#__PURE__*/function () {
214
235
  }
215
236
  }, {
216
237
  key: "remoteAbort",
217
- value: function remoteAbort(pluginManager, sessionId, functionName, signalId) {
218
- var worker = this.getWorker(sessionId, pluginManager);
219
- worker.call(functionName, {
220
- signalId: signalId
221
- }, {
222
- timeout: 1000000,
223
- rpcDriverClassName: this.name
224
- });
225
- }
238
+ value: function () {
239
+ var _remoteAbort = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(pluginManager, sessionId, functionName, signalId) {
240
+ var worker;
241
+ return _regenerator.default.wrap(function _callee2$(_context2) {
242
+ while (1) {
243
+ switch (_context2.prev = _context2.next) {
244
+ case 0:
245
+ _context2.next = 2;
246
+ return this.getWorker(sessionId, pluginManager);
247
+
248
+ case 2:
249
+ worker = _context2.sent;
250
+ worker.call(functionName, {
251
+ signalId: signalId
252
+ }, {
253
+ timeout: 1000000,
254
+ rpcDriverClassName: this.name
255
+ });
256
+
257
+ case 4:
258
+ case "end":
259
+ return _context2.stop();
260
+ }
261
+ }
262
+ }, _callee2, this);
263
+ }));
264
+
265
+ function remoteAbort(_x6, _x7, _x8, _x9) {
266
+ return _remoteAbort.apply(this, arguments);
267
+ }
268
+
269
+ return remoteAbort;
270
+ }()
226
271
  }, {
227
272
  key: "createWorkerPool",
228
273
  value: function createWorkerPool() {
@@ -247,30 +292,54 @@ var BaseRpcDriver = /*#__PURE__*/function () {
247
292
  }
248
293
  }, {
249
294
  key: "getWorker",
250
- value: function getWorker(sessionId, pluginManager) {
251
- var workers = this.getWorkerPool();
252
- var workerNumber = this.workerAssignments.get(sessionId);
295
+ value: function () {
296
+ var _getWorker2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(sessionId, pluginManager) {
297
+ var workers, workerNumber, workerAssignment, worker;
298
+ return _regenerator.default.wrap(function _callee3$(_context3) {
299
+ while (1) {
300
+ switch (_context3.prev = _context3.next) {
301
+ case 0:
302
+ workers = this.getWorkerPool();
303
+ workerNumber = this.workerAssignments.get(sessionId);
304
+
305
+ if (workerNumber === undefined) {
306
+ workerAssignment = (this.lastWorkerAssignment + 1) % workers.length;
307
+ this.workerAssignments.set(sessionId, workerAssignment);
308
+ this.lastWorkerAssignment = workerAssignment;
309
+ workerNumber = workerAssignment;
310
+ } // console.log(`${sessionId} -> worker ${workerNumber}`)
311
+
312
+
313
+ worker = workers[workerNumber].getWorker(pluginManager, this.name);
253
314
 
254
- if (workerNumber === undefined) {
255
- var workerAssignment = (this.lastWorkerAssignment + 1) % workers.length;
256
- this.workerAssignments.set(sessionId, workerAssignment);
257
- this.lastWorkerAssignment = workerAssignment;
258
- workerNumber = workerAssignment;
259
- } // console.log(`${sessionId} -> worker ${workerNumber}`)
315
+ if (worker) {
316
+ _context3.next = 6;
317
+ break;
318
+ }
260
319
 
320
+ throw new Error('no web workers registered for RPC');
261
321
 
262
- var worker = workers[workerNumber].getWorker(pluginManager, this.name);
322
+ case 6:
323
+ return _context3.abrupt("return", worker);
324
+
325
+ case 7:
326
+ case "end":
327
+ return _context3.stop();
328
+ }
329
+ }
330
+ }, _callee3, this);
331
+ }));
263
332
 
264
- if (!worker) {
265
- throw new Error('no web workers registered for RPC');
333
+ function getWorker(_x10, _x11) {
334
+ return _getWorker2.apply(this, arguments);
266
335
  }
267
336
 
268
- return worker;
269
- }
337
+ return getWorker;
338
+ }()
270
339
  }, {
271
340
  key: "call",
272
341
  value: function () {
273
- var _call = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(pluginManager, sessionId, functionName, args) {
342
+ var _call = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(pluginManager, sessionId, functionName, args) {
274
343
  var _this4 = this;
275
344
 
276
345
  var options,
@@ -283,15 +352,15 @@ var BaseRpcDriver = /*#__PURE__*/function () {
283
352
  killedCheckInterval,
284
353
  killedP,
285
354
  resultP,
286
- _args = arguments;
287
- return _regenerator.default.wrap(function _callee$(_context) {
355
+ _args4 = arguments;
356
+ return _regenerator.default.wrap(function _callee4$(_context4) {
288
357
  while (1) {
289
- switch (_context.prev = _context.next) {
358
+ switch (_context4.prev = _context4.next) {
290
359
  case 0:
291
- options = _args.length > 4 && _args[4] !== undefined ? _args[4] : {};
360
+ options = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : {};
292
361
 
293
362
  if (sessionId) {
294
- _context.next = 3;
363
+ _context4.next = 3;
295
364
  break;
296
365
  }
297
366
 
@@ -299,13 +368,17 @@ var BaseRpcDriver = /*#__PURE__*/function () {
299
368
 
300
369
  case 3:
301
370
  done = false;
302
- worker = this.getWorker(sessionId, pluginManager);
371
+ _context4.next = 6;
372
+ return this.getWorker(sessionId, pluginManager);
373
+
374
+ case 6:
375
+ worker = _context4.sent;
303
376
  rpcMethod = pluginManager.getRpcMethodType(functionName);
304
- _context.next = 8;
377
+ _context4.next = 10;
305
378
  return rpcMethod.serializeArguments(args, this.name);
306
379
 
307
- case 8:
308
- serializedArgs = _context.sent;
380
+ case 10:
381
+ serializedArgs = _context4.sent;
309
382
  filteredAndSerializedArgs = this.filterArgs(serializedArgs, pluginManager, sessionId); // now actually call the worker
310
383
 
311
384
  callP = worker.call(functionName, filteredAndSerializedArgs, _objectSpread({
@@ -334,17 +407,17 @@ var BaseRpcDriver = /*#__PURE__*/function () {
334
407
  // killed before the call could return
335
408
 
336
409
  resultP = Promise.race([callP, killedP]);
337
- return _context.abrupt("return", rpcMethod.deserializeReturn(resultP, args, this.name));
410
+ return _context4.abrupt("return", rpcMethod.deserializeReturn(resultP, args, this.name));
338
411
 
339
- case 14:
412
+ case 16:
340
413
  case "end":
341
- return _context.stop();
414
+ return _context4.stop();
342
415
  }
343
416
  }
344
- }, _callee, this);
417
+ }, _callee4, this);
345
418
  }));
346
419
 
347
- function call(_x4, _x5, _x6, _x7) {
420
+ function call(_x12, _x13, _x14, _x15) {
348
421
  return _call.apply(this, arguments);
349
422
  }
350
423
 
@@ -333,9 +333,28 @@ var MockRpcDriver = /*#__PURE__*/function (_BaseRpcDriver) {
333
333
 
334
334
  (0, _createClass2.default)(MockRpcDriver, [{
335
335
  key: "makeWorker",
336
- value: function makeWorker(_pluginManager) {
337
- return new MockWorkerHandle();
338
- }
336
+ value: function () {
337
+ var _makeWorker = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_pluginManager) {
338
+ return _regenerator.default.wrap(function _callee5$(_context5) {
339
+ while (1) {
340
+ switch (_context5.prev = _context5.next) {
341
+ case 0:
342
+ return _context5.abrupt("return", new MockWorkerHandle());
343
+
344
+ case 1:
345
+ case "end":
346
+ return _context5.stop();
347
+ }
348
+ }
349
+ }, _callee5);
350
+ }));
351
+
352
+ function makeWorker(_x2) {
353
+ return _makeWorker.apply(this, arguments);
354
+ }
355
+
356
+ return makeWorker;
357
+ }()
339
358
  }]);
340
359
  return MockRpcDriver;
341
360
  }(_BaseRpcDriver2.default);
@@ -362,16 +381,16 @@ var MockRendererTimeout = /*#__PURE__*/function (_RpcMethodType) {
362
381
  (0, _createClass2.default)(MockRendererTimeout, [{
363
382
  key: "execute",
364
383
  value: function () {
365
- var _execute = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
366
- return _regenerator.default.wrap(function _callee5$(_context5) {
384
+ var _execute = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
385
+ return _regenerator.default.wrap(function _callee6$(_context6) {
367
386
  while (1) {
368
- switch (_context5.prev = _context5.next) {
387
+ switch (_context6.prev = _context6.next) {
369
388
  case 0:
370
389
  case "end":
371
- return _context5.stop();
390
+ return _context6.stop();
372
391
  }
373
392
  }
374
- }, _callee5);
393
+ }, _callee6);
375
394
  }));
376
395
 
377
396
  function execute() {
@@ -408,16 +427,16 @@ var MockRendererShort = /*#__PURE__*/function (_RpcMethodType2) {
408
427
  (0, _createClass2.default)(MockRendererShort, [{
409
428
  key: "execute",
410
429
  value: function () {
411
- var _execute2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
412
- return _regenerator.default.wrap(function _callee6$(_context6) {
430
+ var _execute2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
431
+ return _regenerator.default.wrap(function _callee7$(_context7) {
413
432
  while (1) {
414
- switch (_context6.prev = _context6.next) {
433
+ switch (_context7.prev = _context7.next) {
415
434
  case 0:
416
435
  case "end":
417
- return _context6.stop();
436
+ return _context7.stop();
418
437
  }
419
438
  }
420
- }, _callee6);
439
+ }, _callee7);
421
440
  }));
422
441
 
423
442
  function execute() {
@@ -431,13 +450,14 @@ var MockRendererShort = /*#__PURE__*/function (_RpcMethodType2) {
431
450
  }(_RpcMethodType3.default);
432
451
 
433
452
  exports.MockRendererShort = MockRendererShort;
434
- test('test RPC driver operation timeout and worker replace', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
453
+ test('test RPC driver operation timeout and worker replace', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
435
454
  var config, driver, pluginManager;
436
- return _regenerator.default.wrap(function _callee7$(_context7) {
455
+ return _regenerator.default.wrap(function _callee8$(_context8) {
437
456
  while (1) {
438
- switch (_context7.prev = _context7.next) {
457
+ switch (_context8.prev = _context8.next) {
439
458
  case 0:
440
459
  console.error = jest.fn();
460
+ console.warn = jest.fn();
441
461
  expect.assertions(1);
442
462
  config = (0, _configuration.ConfigurationSchema)('Mock', {}).create();
443
463
  driver = new MockRpcDriver({
@@ -451,37 +471,38 @@ test('test RPC driver operation timeout and worker replace', /*#__PURE__*/(0, _a
451
471
  return new MockRendererShort(pluginManager);
452
472
  });
453
473
  pluginManager.createPluggableElements();
454
- _context7.prev = 8;
455
- _context7.next = 11;
474
+ _context8.prev = 9;
475
+ _context8.next = 12;
456
476
  return driver.call(pluginManager, 'sessionId', 'MockRenderTimeout', {}, {});
457
477
 
458
- case 11:
459
- _context7.next = 16;
478
+ case 12:
479
+ _context8.next = 17;
460
480
  break;
461
481
 
462
- case 13:
463
- _context7.prev = 13;
464
- _context7.t0 = _context7["catch"](8);
465
- expect("".concat(_context7.t0)).toMatch(/operation timed out/);
482
+ case 14:
483
+ _context8.prev = 14;
484
+ _context8.t0 = _context8["catch"](9);
485
+ expect("".concat(_context8.t0)).toMatch(/operation timed out/);
466
486
 
467
- case 16:
468
- _context7.next = 18;
487
+ case 17:
488
+ _context8.next = 19;
469
489
  return driver.call(pluginManager, 'sessionId', 'MockRenderShort', {}, {});
470
490
 
471
- case 18:
491
+ case 19:
472
492
  case "end":
473
- return _context7.stop();
493
+ return _context8.stop();
474
494
  }
475
495
  }
476
- }, _callee7, null, [[8, 13]]);
496
+ }, _callee8, null, [[9, 14]]);
477
497
  })));
478
- test('remote abort', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
498
+ test('remote abort', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
479
499
  var config, driver, pluginManager, controller, resP;
480
- return _regenerator.default.wrap(function _callee8$(_context8) {
500
+ return _regenerator.default.wrap(function _callee9$(_context9) {
481
501
  while (1) {
482
- switch (_context8.prev = _context8.next) {
502
+ switch (_context9.prev = _context9.next) {
483
503
  case 0:
484
504
  console.error = jest.fn();
505
+ console.warn = jest.fn();
485
506
  expect.assertions(1);
486
507
  config = (0, _configuration.ConfigurationSchema)('Mock', {}).create();
487
508
  driver = new MockRpcDriver({
@@ -492,28 +513,28 @@ test('remote abort', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/
492
513
  return new MockRendererShort(pluginManager);
493
514
  });
494
515
  pluginManager.createPluggableElements();
495
- _context8.prev = 7;
516
+ _context9.prev = 8;
496
517
  controller = new AbortController();
497
518
  resP = driver.call(pluginManager, 'sessionId', 'MockRenderShort', {}, {
498
519
  signal: controller.signal
499
520
  });
500
521
  controller.abort();
501
- _context8.next = 13;
522
+ _context9.next = 14;
502
523
  return resP;
503
524
 
504
- case 13:
505
- _context8.next = 18;
525
+ case 14:
526
+ _context9.next = 19;
506
527
  break;
507
528
 
508
- case 15:
509
- _context8.prev = 15;
510
- _context8.t0 = _context8["catch"](7);
511
- expect("".concat(_context8.t0)).toMatch(/abort/);
529
+ case 16:
530
+ _context9.prev = 16;
531
+ _context9.t0 = _context9["catch"](8);
532
+ expect("".concat(_context9.t0)).toMatch(/abort/);
512
533
 
513
- case 18:
534
+ case 19:
514
535
  case "end":
515
- return _context8.stop();
536
+ return _context9.stop();
516
537
  }
517
538
  }
518
- }, _callee8, null, [[7, 15]]);
539
+ }, _callee9, null, [[8, 16]]);
519
540
  })));
@@ -11,7 +11,7 @@ declare class DummyHandle {
11
11
  */
12
12
  export default class MainThreadRpcDriver extends BaseRpcDriver {
13
13
  name: string;
14
- makeWorker: () => DummyHandle;
14
+ makeWorker: () => Promise<DummyHandle>;
15
15
  constructor(args: RpcDriverConstructorArgs);
16
16
  call(pluginManager: PluginManager, sessionId: string, functionName: string, args: {}): Promise<unknown>;
17
17
  }
@@ -89,25 +89,34 @@ var MainThreadRpcDriver = /*#__PURE__*/function (_BaseRpcDriver) {
89
89
  _this = _super.call(this, args);
90
90
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", 'MainThreadRpcDriver');
91
91
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "makeWorker", void 0);
92
-
93
- _this.makeWorker = function () {
94
- return new DummyHandle();
95
- };
96
-
92
+ _this.makeWorker = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
93
+ return _regenerator.default.wrap(function _callee2$(_context2) {
94
+ while (1) {
95
+ switch (_context2.prev = _context2.next) {
96
+ case 0:
97
+ return _context2.abrupt("return", new DummyHandle());
98
+
99
+ case 1:
100
+ case "end":
101
+ return _context2.stop();
102
+ }
103
+ }
104
+ }, _callee2);
105
+ }));
97
106
  return _this;
98
107
  }
99
108
 
100
109
  (0, _createClass2.default)(MainThreadRpcDriver, [{
101
110
  key: "call",
102
111
  value: function () {
103
- var _call2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(pluginManager, sessionId, functionName, args) {
112
+ var _call2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(pluginManager, sessionId, functionName, args) {
104
113
  var rpcMethod, serializedArgs, result;
105
- return _regenerator.default.wrap(function _callee2$(_context2) {
114
+ return _regenerator.default.wrap(function _callee3$(_context3) {
106
115
  while (1) {
107
- switch (_context2.prev = _context2.next) {
116
+ switch (_context3.prev = _context3.next) {
108
117
  case 0:
109
118
  if (sessionId) {
110
- _context2.next = 2;
119
+ _context3.next = 2;
111
120
  break;
112
121
  }
113
122
 
@@ -115,24 +124,24 @@ var MainThreadRpcDriver = /*#__PURE__*/function (_BaseRpcDriver) {
115
124
 
116
125
  case 2:
117
126
  rpcMethod = pluginManager.getRpcMethodType(functionName);
118
- _context2.next = 5;
127
+ _context3.next = 5;
119
128
  return rpcMethod.serializeArguments(args, this.name);
120
129
 
121
130
  case 5:
122
- serializedArgs = _context2.sent;
123
- _context2.next = 8;
131
+ serializedArgs = _context3.sent;
132
+ _context3.next = 8;
124
133
  return rpcMethod.execute(serializedArgs, this.name);
125
134
 
126
135
  case 8:
127
- result = _context2.sent;
128
- return _context2.abrupt("return", rpcMethod.deserializeReturn(result, args, this.name));
136
+ result = _context3.sent;
137
+ return _context3.abrupt("return", rpcMethod.deserializeReturn(result, args, this.name));
129
138
 
130
139
  case 10:
131
140
  case "end":
132
- return _context2.stop();
141
+ return _context3.stop();
133
142
  }
134
143
  }
135
- }, _callee2, this);
144
+ }, _callee3, this);
136
145
  }));
137
146
 
138
147
  function call(_x3, _x4, _x5, _x6) {
@@ -15,7 +15,7 @@ export default class RpcManager {
15
15
  pluginManager: PluginManager;
16
16
  mainConfiguration: AnyConfigurationModel;
17
17
  backendConfigurations: BackendConfigurations;
18
- static configSchema: import("../configuration/configurationSchema").AnyConfigurationSchemaType;
18
+ static configSchema: import("../configuration").AnyConfigurationSchemaType;
19
19
  driverObjects: Map<string, DriverClass>;
20
20
  constructor(pluginManager: PluginManager, mainConfiguration: AnyConfigurationModel, backendConfigurations: BackendConfigurations);
21
21
  getDriver(backendName: keyof typeof DriverClasses): DriverClass;
@@ -24,6 +24,6 @@ export default class WebWorkerRpcDriver extends BaseRpcDriver {
24
24
  constructor(args: WebWorkerRpcDriverConstructorArgs, workerBootConfiguration: {
25
25
  plugins: PluginDefinition[];
26
26
  });
27
- makeWorker(): WebWorkerHandle;
27
+ makeWorker(): Promise<WebWorkerHandle>;
28
28
  }
29
29
  export {};