@difizen/libro-kernel 0.1.9 → 0.1.11

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.
@@ -126,36 +126,43 @@ export function createMessage(options) {
126
126
  // ////////////////////////////////////////////////
127
127
  // IOPub Messages
128
128
  // ///////////////////////////////////////////////
129
+
129
130
  /**
130
131
  * A `'stream'` message on the `'iopub'` channel.
131
132
  *
132
133
  * See [Streams](https://jupyter-client.readthedocs.io/en/latest/messaging.html#streams-stdout-stderr-etc).
133
134
  */
135
+
134
136
  /**
135
137
  * A `'display_data'` message on the `'iopub'` channel.
136
138
  *
137
139
  * See [Display data](https://jupyter-client.readthedocs.io/en/latest/messaging.html#display-data).
138
140
  */
141
+
139
142
  /**
140
143
  * An `'update_display_data'` message on the `'iopub'` channel.
141
144
  *
142
145
  * See [Update Display data](https://jupyter-client.readthedocs.io/en/latest/messaging.html#update-display-data).
143
146
  */
147
+
144
148
  /**
145
149
  * An `'execute_input'` message on the `'iopub'` channel.
146
150
  *
147
151
  * See [Code inputs](https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-inputs).
148
152
  */
153
+
149
154
  /**
150
155
  * An `'execute_result'` message on the `'iopub'` channel.
151
156
  *
152
157
  * See [Execution results](https://jupyter-client.readthedocs.io/en/latest/messaging.html#id4).
153
158
  */
159
+
154
160
  /**
155
161
  * A `'error'` message on the `'iopub'` channel.
156
162
  *
157
163
  * See [Execution errors](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execution-errors).
158
164
  */
165
+
159
166
  /**
160
167
  * The valid Kernel status states.
161
168
  *
@@ -175,16 +182,19 @@ export function createMessage(options) {
175
182
  * * `dead`: The kernel is dead and will not be restarted. This state is set
176
183
  * by the Jupyter server and is a final state.
177
184
  */
185
+
178
186
  /**
179
187
  * A `'status'` message on the `'iopub'` channel.
180
188
  *
181
189
  * See [Kernel status](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-status).
182
190
  */
191
+
183
192
  /**
184
193
  * A `'clear_output'` message on the `'iopub'` channel.
185
194
  *
186
195
  * See [Clear output](https://jupyter-client.readthedocs.io/en/latest/messaging.html#clear-output).
187
196
  */
197
+
188
198
  /**
189
199
  * An experimental `'debug_event'` message on the `'iopub'` channel
190
200
  *
@@ -195,67 +205,81 @@ export function createMessage(options) {
195
205
  * kernel message specification. As such, this is *NOT* considered
196
206
  * part of the public API, and may change without notice.
197
207
  */
208
+
198
209
  // ////////////////////////////////////////////////
199
210
  // Comm Messages
200
211
  // ///////////////////////////////////////////////
212
+
201
213
  /**
202
214
  * A `'comm_open'` message on the `'iopub'` channel.
203
215
  *
204
216
  * See [Comm open](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm).
205
217
  */
218
+
206
219
  /**
207
220
  * A `'comm_close'` message on the `'iopub'` channel.
208
221
  *
209
222
  * See [Comm close](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm).
210
223
  */
224
+
211
225
  /**
212
226
  * A `'comm_msg'` message on the `'iopub'` channel.
213
227
  *
214
228
  * See [Comm msg](https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm).
215
229
  */
230
+
216
231
  // ////////////////////////////////////////////////
217
232
  // Shell Messages
218
233
  // ///////////////////////////////////////////////
234
+
219
235
  /**
220
236
  * Reply content indicating a successful request.
221
237
  */
238
+
222
239
  /**
223
240
  * Reply content indicating an error.
224
241
  *
225
242
  * See the [Message spec](https://jupyter-client.readthedocs.io/en/latest/messaging.html#request-reply) for details.
226
243
  */
244
+
227
245
  /**
228
246
  * Reply content indicating an aborted request.
229
247
  *
230
248
  * This is [deprecated](https://jupyter-client.readthedocs.io/en/latest/messaging.html#request-reply)
231
249
  * in message spec 5.1. Kernels should send an 'error' reply instead.
232
250
  */
251
+
233
252
  /**
234
253
  * A convenience type for reply content.
235
254
  *
236
255
  * This automatically unions the necessary error and abort replies required in
237
256
  * the [message spec](https://jupyter-client.readthedocs.io/en/latest/messaging.html#request-reply).
238
257
  */
258
+
239
259
  /**
240
260
  * A `'kernel_info_request'` message on the `'shell'` channel.
241
261
  *
242
262
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).
243
263
  */
264
+
244
265
  /**
245
266
  * A `'kernel_info_reply'` message content.
246
267
  *
247
268
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).
248
269
  */
270
+
249
271
  /**
250
272
  * The kernel language information specification.
251
273
  *
252
274
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).
253
275
  */
276
+
254
277
  /**
255
278
  * A `'kernel_info_reply'` message on the `'shell'` channel.
256
279
  *
257
280
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-info).
258
281
  */
282
+
259
283
  /**
260
284
  * A `'complete_request'` message.
261
285
  *
@@ -263,6 +287,7 @@ export function createMessage(options) {
263
287
  *
264
288
  * **See also:** [[ICompleteReplyMsg]], [[IKernel.complete]]
265
289
  */
290
+
266
291
  /**
267
292
  * A `'complete_reply'` message content.
268
293
  *
@@ -270,6 +295,7 @@ export function createMessage(options) {
270
295
  *
271
296
  * **See also:** [[ICompleteRequest]], [[IKernel.complete]]
272
297
  */
298
+
273
299
  /**
274
300
  * A `'complete_reply'` message on the `'shell'` channel.
275
301
  *
@@ -277,6 +303,7 @@ export function createMessage(options) {
277
303
  *
278
304
  * **See also:** [[ICompleteRequest]], [[IKernel.complete]]
279
305
  */
306
+
280
307
  /**
281
308
  * An `'inspect_request'` message.
282
309
  *
@@ -284,6 +311,7 @@ export function createMessage(options) {
284
311
  *
285
312
  * **See also:** [[IInspectReplyMsg]], [[[IKernel.inspect]]]
286
313
  */
314
+
287
315
  /**
288
316
  * A `'inspect_reply'` message content.
289
317
  *
@@ -291,6 +319,7 @@ export function createMessage(options) {
291
319
  *
292
320
  * **See also:** [[IInspectRequest]], [[IKernel.inspect]]
293
321
  */
322
+
294
323
  /**
295
324
  * A `'inspect_reply'` message on the `'shell'` channel.
296
325
  *
@@ -298,6 +327,7 @@ export function createMessage(options) {
298
327
  *
299
328
  * **See also:** [[IInspectRequest]], [[IKernel.inspect]]
300
329
  */
330
+
301
331
  /**
302
332
  * A `'history_request'` message.
303
333
  *
@@ -305,6 +335,7 @@ export function createMessage(options) {
305
335
  *
306
336
  * **See also:** [[IHistoryReplyMsg]], [[[IKernel.history]]]
307
337
  */
338
+
308
339
  /**
309
340
  * The content of a `'history_request'` range message.
310
341
  *
@@ -312,6 +343,7 @@ export function createMessage(options) {
312
343
  *
313
344
  * **See also:** [[IHistoryReply]], [[[IKernel.history]]]
314
345
  */
346
+
315
347
  /**
316
348
  * The content of a `'history_request'` search message.
317
349
  *
@@ -319,6 +351,7 @@ export function createMessage(options) {
319
351
  *
320
352
  * **See also:** [[IHistoryReply]], [[[IKernel.history]]]
321
353
  */
354
+
322
355
  /**
323
356
  * The content of a `'history_request'` tail message.
324
357
  *
@@ -326,6 +359,7 @@ export function createMessage(options) {
326
359
  *
327
360
  * **See also:** [[IHistoryReply]], [[[IKernel.history]]]
328
361
  */
362
+
329
363
  /**
330
364
  * A `'history_reply'` message content.
331
365
  *
@@ -333,6 +367,7 @@ export function createMessage(options) {
333
367
  *
334
368
  * **See also:** [[IHistoryRequest]], [[IKernel.history]]
335
369
  */
370
+
336
371
  /**
337
372
  * A `'history_reply'` message on the `'shell'` channel.
338
373
  *
@@ -340,6 +375,7 @@ export function createMessage(options) {
340
375
  *
341
376
  * **See also:** [[IHistoryRequest]], [[IKernel.history]]
342
377
  */
378
+
343
379
  /**
344
380
  * An `'is_complete_request'` message.
345
381
  *
@@ -347,6 +383,7 @@ export function createMessage(options) {
347
383
  *
348
384
  * **See also:** [[IIsCompleteReplyMsg]], [[IKernel.isComplete]]
349
385
  */
386
+
350
387
  /**
351
388
  * An `'is_complete_reply'` message on the `'stream'` channel.
352
389
  *
@@ -354,28 +391,35 @@ export function createMessage(options) {
354
391
  *
355
392
  * **See also:** [[IIsCompleteRequest]], [[IKernel.isComplete]]
356
393
  */
394
+
357
395
  /**
358
396
  * An 'incomplete' completion reply
359
397
  */
398
+
360
399
  /**
361
400
  * A completion reply for completion or invalid states.
362
401
  */
402
+
363
403
  /**
364
404
  * An `execute_request` message on the `'shell'` channel.
365
405
  */
406
+
366
407
  /**
367
408
  * The content of an `execute-reply` message.
368
409
  *
369
410
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execution-results).
370
411
  */
412
+
371
413
  /**
372
414
  * A convenience type for a base for an execute reply content.
373
415
  */
416
+
374
417
  /**
375
418
  * The `'execute_reply'` contents for an `'ok'` status.
376
419
  *
377
420
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#execution-results).
378
421
  */
422
+
379
423
  /**
380
424
  * An `'execute_reply'` message on the `'stream'` channel.
381
425
  *
@@ -383,6 +427,7 @@ export function createMessage(options) {
383
427
  *
384
428
  * **See also:** [[IExecuteRequest]], [[IKernel.execute]]
385
429
  */
430
+
386
431
  /**
387
432
  * A `'comm_info_request'` message on the `'shell'` channel.
388
433
  *
@@ -390,6 +435,7 @@ export function createMessage(options) {
390
435
  *
391
436
  * **See also:** [[ICommInfoReplyMsg]], [[IKernel.commInfo]]
392
437
  */
438
+
393
439
  /**
394
440
  * A `'comm_info_reply'` message content.
395
441
  *
@@ -397,6 +443,7 @@ export function createMessage(options) {
397
443
  *
398
444
  * **See also:** [[ICommInfoRequest]], [[IKernel.commInfo]]
399
445
  */
446
+
400
447
  /**
401
448
  * A `'comm_info_reply'` message on the `'shell'` channel.
402
449
  *
@@ -404,9 +451,11 @@ export function createMessage(options) {
404
451
  *
405
452
  * **See also:** [[ICommInfoRequestMsg]], [[IKernel.commInfo]]
406
453
  */
454
+
407
455
  // ///////////////////////////////////////////////
408
456
  // Control Messages
409
457
  // ///////////////////////////////////////////////
458
+
410
459
  /**
411
460
  * An experimental `'debug_request'` message on the `'control'` channel.
412
461
  *
@@ -417,6 +466,7 @@ export function createMessage(options) {
417
466
  * kernel message specification. As such, this function is *NOT* considered
418
467
  * part of the public API, and may change without notice.
419
468
  */
469
+
420
470
  /**
421
471
  * An experimental `'debug_reply'` message on the `'control'` channel.
422
472
  *
@@ -427,27 +477,33 @@ export function createMessage(options) {
427
477
  * kernel message specification. As such, this is *NOT* considered
428
478
  * part of the public API, and may change without notice.
429
479
  */
480
+
430
481
  // ////////////////////////////////////////////////
431
482
  // Stdin Messages
432
483
  // ///////////////////////////////////////////////
484
+
433
485
  /**
434
486
  * An `'input_request'` message on the `'stdin'` channel.
435
487
  *
436
488
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets).
437
489
  */
490
+
438
491
  /**
439
492
  * An `'input_reply'` message content.
440
493
  *
441
494
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets).
442
495
  */
496
+
443
497
  /**
444
498
  * An `'input_reply'` message on the `'stdin'` channel.
445
499
  *
446
500
  * See [Messaging in Jupyter](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets).
447
501
  */
502
+
448
503
  // ///////////////////////////////////////////////
449
504
  // Message (de)serialization
450
505
  // ///////////////////////////////////////////////
506
+
451
507
  /**
452
508
  * The list of supported kernel wire protocols over websocket.
453
509
  */
@@ -10,8 +10,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
10
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
11
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
16
16
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
17
17
  import { URL } from '@difizen/libro-common';
@@ -26,7 +26,7 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
26
26
  }
27
27
  _createClass(KernelRestAPI, [{
28
28
  key: "getKernelModel",
29
- value:
29
+ value: (
30
30
  /**
31
31
  * Get a full kernel model from the server by kernel id string.
32
32
  *
@@ -92,9 +92,10 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
92
92
  *
93
93
  * The promise is fulfilled on a valid response and rejected otherwise.
94
94
  */
95
+ )
95
96
  }, {
96
97
  key: "startNew",
97
- value: function () {
98
+ value: (function () {
98
99
  var _startNew = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
99
100
  var options,
100
101
  serverSettings,
@@ -159,9 +160,10 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
159
160
  *
160
161
  * The promise is fulfilled on a valid response and rejected otherwise.
161
162
  */
163
+ )
162
164
  }, {
163
165
  key: "listRunning",
164
- value: function () {
166
+ value: (function () {
165
167
  var _listRunning = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(serverSettings) {
166
168
  var settings, url, response, err, data;
167
169
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
@@ -215,9 +217,10 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
215
217
  *
216
218
  * The promise is fulfilled on a valid response and rejected otherwise.
217
219
  */
220
+ )
218
221
  }, {
219
222
  key: "shutdownKernel",
220
- value: function () {
223
+ value: (function () {
221
224
  var _shutdownKernel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(id, serverSettings) {
222
225
  var settings, url, init, response, msg, err;
223
226
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -269,9 +272,10 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
269
272
  *
270
273
  * The promise is fulfilled on a valid response (and thus after a restart) and rejected otherwise.
271
274
  */
275
+ )
272
276
  }, {
273
277
  key: "restartKernel",
274
- value: function () {
278
+ value: (function () {
275
279
  var _restartKernel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(id, serverSettings) {
276
280
  var settings, url, init, response, err, data;
277
281
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -320,9 +324,10 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
320
324
  *
321
325
  * The promise is fulfilled on a valid response and rejected otherwise.
322
326
  */
327
+ )
323
328
  }, {
324
329
  key: "interruptKernel",
325
- value: function () {
330
+ value: (function () {
326
331
  var _interruptKernel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(id, serverSettings) {
327
332
  var settings, url, init, response, err;
328
333
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
@@ -356,7 +361,7 @@ export var KernelRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnection)
356
361
  return _interruptKernel.apply(this, arguments);
357
362
  }
358
363
  return interruptKernel;
359
- }()
364
+ }())
360
365
  }]);
361
366
  return KernelRestAPI;
362
367
  }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "serverConnection", [_dec2], {
@@ -13,7 +13,6 @@ var Private;
13
13
  // so offsets cannot index up to 2**64 bytes
14
14
  offsets.push(Number(data.getBigUint64(8 * (i + 1), true /* littleEndian */)));
15
15
  }
16
-
17
16
  var decoder = new TextDecoder('utf8');
18
17
  var channel = decoder.decode(binMsg.slice(offsets[0], offsets[1]));
19
18
  var header = JSON.parse(decoder.decode(binMsg.slice(offsets[1], offsets[2])));
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
7
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
13
13
  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
14
14
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
@@ -82,7 +82,6 @@ export var KernelSpecManager = (_dec = singleton(), _dec2 = inject(ServerManager
82
82
  standby: 'when-hidden'
83
83
  // standby: options.standby ?? 'when-hidden',
84
84
  });
85
-
86
85
  void _this.ready.then(function () {
87
86
  void _this._pollSpecs.start();
88
87
  return;
@@ -162,7 +161,7 @@ export var KernelSpecManager = (_dec = singleton(), _dec2 = inject(ServerManager
162
161
  */
163
162
  }, {
164
163
  key: "refreshSpecs",
165
- value: function () {
164
+ value: (function () {
166
165
  var _refreshSpecs = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
167
166
  return _regeneratorRuntime().wrap(function _callee$(_context) {
168
167
  while (1) switch (_context.prev = _context.next) {
@@ -186,9 +185,10 @@ export var KernelSpecManager = (_dec = singleton(), _dec2 = inject(ServerManager
186
185
  /**
187
186
  * Execute a request to the server to poll specs and update state.
188
187
  */
188
+ )
189
189
  }, {
190
190
  key: "requestSpecs",
191
- value: function () {
191
+ value: (function () {
192
192
  var _requestSpecs = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
193
193
  var specs;
194
194
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -221,7 +221,7 @@ export var KernelSpecManager = (_dec = singleton(), _dec2 = inject(ServerManager
221
221
  return _requestSpecs.apply(this, arguments);
222
222
  }
223
223
  return requestSpecs;
224
- }()
224
+ }())
225
225
  }]);
226
226
  return KernelSpecManager;
227
227
  }(BaseManager), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "serverManager", [_dec2], {
@@ -10,8 +10,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
10
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
11
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
16
16
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
17
17
  // import { URL } from '@difizen/libro-common';
@@ -32,7 +32,7 @@ export var KernelSpecRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnect
32
32
  }
33
33
  _createClass(KernelSpecRestAPI, [{
34
34
  key: "getSpecs",
35
- value:
35
+ value: (
36
36
  /**
37
37
  * Fetch all of the kernel specs.
38
38
  *
@@ -82,7 +82,7 @@ export var KernelSpecRestAPI = (_dec = singleton(), _dec2 = inject(ServerConnect
82
82
  return _getSpecs.apply(this, arguments);
83
83
  }
84
84
  return getSpecs;
85
- }()
85
+ }())
86
86
  }]);
87
87
  return KernelSpecRestAPI;
88
88
  }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "serverConnection", [_dec2], {
@@ -2,7 +2,8 @@
2
2
  import { validateProperty } from "../validate-property.js";
3
3
  /**
4
4
  * Validate a server kernelspec model to a client side model.
5
- */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
6
7
  export function validateSpecModel(data) {
7
8
  var spec = data.spec;
8
9
  if (!spec) {
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
7
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
13
13
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
14
14
  import { inject, singleton } from '@difizen/mana-app';
package/es/page-config.js CHANGED
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
3
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
4
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { isObject, URL } from '@difizen/libro-common';
8
8
  import { isWeb } from '@difizen/mana-app';
9
9
 
@@ -4,8 +4,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
6
6
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
10
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
7
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
13
13
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
14
14
  import { URL } from '@difizen/libro-common';
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
7
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
9
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
13
13
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
14
14
  import { prop } from '@difizen/mana-app';