@difizen/libro-kernel 0.3.3 → 1.0.0
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/es/basemanager.d.ts +2 -2
- package/es/basemanager.d.ts.map +1 -1
- package/es/basemanager.js +2 -2
- package/es/contents/contents-drive.d.ts +2 -2
- package/es/contents/contents-drive.d.ts.map +1 -1
- package/es/contents/contents-drive.js +2 -2
- package/es/contents/contents-manager.d.ts +2 -2
- package/es/contents/contents-manager.d.ts.map +1 -1
- package/es/contents/contents-manager.js +2 -2
- package/es/contents/contents-module.d.ts +1 -1
- package/es/contents/contents-module.d.ts.map +1 -1
- package/es/contents/contents-module.js +1 -1
- package/es/contents/contents-protocol.d.ts +1 -1
- package/es/contents/contents-protocol.d.ts.map +1 -1
- package/es/kernel/future.d.ts +2 -2
- package/es/kernel/future.d.ts.map +1 -1
- package/es/kernel/future.js +2 -2
- package/es/kernel/kernel-connection.d.ts +3 -3
- package/es/kernel/kernel-connection.d.ts.map +1 -1
- package/es/kernel/kernel-connection.js +4 -4
- package/es/kernel/kernel-module.d.ts +1 -1
- package/es/kernel/kernel-module.d.ts.map +1 -1
- package/es/kernel/kernel-module.js +1 -1
- package/es/kernel/libro-kernel-manager.d.ts +2 -2
- package/es/kernel/libro-kernel-manager.d.ts.map +1 -1
- package/es/kernel/libro-kernel-manager.js +3 -3
- package/es/kernel/libro-kernel-protocol.d.ts +1 -1
- package/es/kernel/libro-kernel-protocol.d.ts.map +1 -1
- package/es/kernel/libro-kernel.js +2 -2
- package/es/kernel/restapi.js +1 -1
- package/es/kernelspec/kernelspec-module.d.ts +1 -1
- package/es/kernelspec/kernelspec-module.d.ts.map +1 -1
- package/es/kernelspec/kernelspec-module.js +1 -1
- package/es/kernelspec/kernelspec.d.ts +1 -1
- package/es/kernelspec/kernelspec.d.ts.map +1 -1
- package/es/kernelspec/manager.d.ts +2 -2
- package/es/kernelspec/manager.d.ts.map +1 -1
- package/es/kernelspec/manager.js +4 -4
- package/es/kernelspec/restapi.js +1 -1
- package/es/libro-kernel-connection-manager.js +2 -2
- package/es/module.d.ts +1 -1
- package/es/module.d.ts.map +1 -1
- package/es/module.js +1 -1
- package/es/page-config.js +1 -1
- package/es/server/connection-error.d.ts +3 -3
- package/es/server/connection-error.d.ts.map +1 -1
- package/es/server/connection-error.js +9 -9
- package/es/server/server-connection.js +1 -1
- package/es/server/server-manager.d.ts +1 -1
- package/es/server/server-manager.d.ts.map +1 -1
- package/es/server/server-manager.js +3 -3
- package/es/server/server-module.d.ts +1 -1
- package/es/server/server-module.d.ts.map +1 -1
- package/es/server/server-module.js +1 -1
- package/es/session/libro-session-manager.d.ts +3 -3
- package/es/session/libro-session-manager.d.ts.map +1 -1
- package/es/session/libro-session-manager.js +4 -4
- package/es/session/libro-session.js +1 -1
- package/es/session/restapi.js +1 -1
- package/es/session/session-module.d.ts +1 -1
- package/es/session/session-module.d.ts.map +1 -1
- package/es/session/session-module.js +1 -1
- package/package.json +3 -4
- package/src/basemanager.ts +3 -3
- package/src/contents/contents-drive.ts +3 -3
- package/src/contents/contents-manager.ts +3 -3
- package/src/contents/contents-module.ts +1 -1
- package/src/contents/contents-protocol.ts +1 -1
- package/src/kernel/future.ts +2 -2
- package/src/kernel/kernel-connection.ts +5 -5
- package/src/kernel/kernel-module.ts +1 -1
- package/src/kernel/libro-kernel-manager.ts +4 -4
- package/src/kernel/libro-kernel-protocol.ts +1 -1
- package/src/kernel/libro-kernel.ts +2 -2
- package/src/kernel/restapi.ts +1 -1
- package/src/kernelspec/kernelspec-module.ts +1 -1
- package/src/kernelspec/kernelspec.ts +1 -1
- package/src/kernelspec/manager.ts +5 -5
- package/src/kernelspec/restapi.ts +1 -1
- package/src/libro-kernel-connection-manager.ts +2 -2
- package/src/module.ts +1 -1
- package/src/page-config.ts +1 -1
- package/src/server/connection-error.ts +4 -4
- package/src/server/server-connection.ts +1 -1
- package/src/server/server-manager.ts +3 -3
- package/src/server/server-module.ts +1 -1
- package/src/session/libro-session-manager.ts +5 -5
- package/src/session/libro-session.ts +1 -1
- package/src/session/restapi.ts +1 -1
- package/src/session/session-module.ts +1 -1
|
@@ -20,9 +20,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
20
20
|
/**
|
|
21
21
|
* A wrapped error for a fetch response.
|
|
22
22
|
*/
|
|
23
|
-
export var
|
|
24
|
-
_inherits(
|
|
25
|
-
var _super = _createSuper(
|
|
23
|
+
export var JupyterResponseError = /*#__PURE__*/function (_Error) {
|
|
24
|
+
_inherits(JupyterResponseError, _Error);
|
|
25
|
+
var _super = _createSuper(JupyterResponseError);
|
|
26
26
|
/**
|
|
27
27
|
* The response associated with the error.
|
|
28
28
|
*/
|
|
@@ -34,17 +34,17 @@ export var ResponseError = /*#__PURE__*/function (_Error) {
|
|
|
34
34
|
/**
|
|
35
35
|
* Create a new response error.
|
|
36
36
|
*/
|
|
37
|
-
function
|
|
37
|
+
function JupyterResponseError(response) {
|
|
38
38
|
var _this;
|
|
39
39
|
var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "The response is invalid: ".concat(response.status, " ").concat(response.statusText);
|
|
40
40
|
var traceback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
41
|
-
_classCallCheck(this,
|
|
41
|
+
_classCallCheck(this, JupyterResponseError);
|
|
42
42
|
_this = _super.call(this, message);
|
|
43
43
|
_this.response = response;
|
|
44
44
|
_this.traceback = traceback;
|
|
45
45
|
return _this;
|
|
46
46
|
}
|
|
47
|
-
return _createClass(
|
|
47
|
+
return _createClass(JupyterResponseError);
|
|
48
48
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -72,7 +72,7 @@ export var NetworkError = /*#__PURE__*/function (_TypeError) {
|
|
|
72
72
|
*
|
|
73
73
|
* @param response The response object.
|
|
74
74
|
*
|
|
75
|
-
* @returns A promise that resolves with a `
|
|
75
|
+
* @returns A promise that resolves with a `JupyterResponseError` object.
|
|
76
76
|
*/
|
|
77
77
|
export var createResponseError = /*#__PURE__*/function () {
|
|
78
78
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
|
|
@@ -89,9 +89,9 @@ export var createResponseError = /*#__PURE__*/function () {
|
|
|
89
89
|
_context.next = 6;
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
92
|
-
return _context.abrupt("return", new
|
|
92
|
+
return _context.abrupt("return", new JupyterResponseError(response, data.message));
|
|
93
93
|
case 6:
|
|
94
|
-
return _context.abrupt("return", new
|
|
94
|
+
return _context.abrupt("return", new JupyterJupyterResponseError(response));
|
|
95
95
|
case 9:
|
|
96
96
|
_context.prev = 9;
|
|
97
97
|
_context.t0 = _context["catch"](0);
|
|
@@ -12,7 +12,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
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';
|
|
15
|
-
import { isNative, isWeb, prop, singleton } from '@difizen/
|
|
15
|
+
import { isNative, isWeb, prop, singleton } from '@difizen/libro-common/app';
|
|
16
16
|
import { PageConfig } from "../page-config.js";
|
|
17
17
|
import { NetworkError } from "./connection-error.js";
|
|
18
18
|
var FETCH;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-manager.d.ts","sourceRoot":"","sources":["../../src/server/server-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server-manager.d.ts","sourceRoot":"","sources":["../../src/server/server-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qBACa,aAAa;IACxB;;OAEG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAQ;IAE3B;;OAEG;IAEH,MAAM,CAAC,EAAE,OAAO,CAAS;IAGzB,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,CAA+B;IAErE,IAAI,KAAK,yBAER;IAED,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;gBAER,iBAAiB,EAAE,iBAAiB;IAI3E,OAAO,UAAS;IAEV,MAAM;cA2BI,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;cAYhC,iBAAiB,IAAI,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;CAYtE"}
|
|
@@ -11,9 +11,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
11
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
|
-
import { prop } from '@difizen/
|
|
15
|
-
import { inject, singleton } from '@difizen/
|
|
16
|
-
import { timeout, Deferred } from '@difizen/
|
|
14
|
+
import { prop } from '@difizen/libro-common/app';
|
|
15
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
16
|
+
import { timeout, Deferred } from '@difizen/libro-common/app';
|
|
17
17
|
import { KernelSpecRestAPI } from "../kernelspec/restapi.js";
|
|
18
18
|
export var ServerManager = (_dec = singleton(), _dec2 = prop(), _dec3 = prop(), _dec4 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
19
19
|
function ServerManager(kernelSpecRestAPI) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-module.d.ts","sourceRoot":"","sources":["../../src/server/server-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server-module.d.ts","sourceRoot":"","sources":["../../src/server/server-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAKvD,eAAO,MAAM,iBAAiB,YAG7B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManaModule } from '@difizen/
|
|
1
|
+
import { ManaModule } from '@difizen/libro-common/app';
|
|
2
2
|
import { ServerConnection } from "./server-connection.js";
|
|
3
3
|
import { ServerManager } from "./server-manager.js";
|
|
4
4
|
export var LibroServerModule = ManaModule.create().register(ServerConnection, ServerManager);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Poll } from '@difizen/libro-common';
|
|
2
|
-
import type { Event } from '@difizen/
|
|
3
|
-
import { Emitter } from '@difizen/
|
|
4
|
-
import { StorageService } from '@difizen/
|
|
2
|
+
import type { Event } from '@difizen/libro-common/app';
|
|
3
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
4
|
+
import { StorageService } from '@difizen/libro-common/app';
|
|
5
5
|
import type { IContentsModel } from '../contents/index.js';
|
|
6
6
|
import { LibroKernelManager } from '../kernel/libro-kernel-manager.js';
|
|
7
7
|
import { LibroKernelFactory } from '../kernel/libro-kernel-protocol.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-session-manager.d.ts","sourceRoot":"","sources":["../../src/session/libro-session-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"libro-session-manager.d.ts","sourceRoot":"","sources":["../../src/session/libro-session-manager.ts"],"names":[],"mappings":"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"}
|
|
@@ -22,10 +22,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
22
22
|
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; }
|
|
23
23
|
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.'); }
|
|
24
24
|
import { Poll } from '@difizen/libro-common';
|
|
25
|
-
import { inject, singleton } from '@difizen/
|
|
26
|
-
import { prop, getOrigin } from '@difizen/
|
|
27
|
-
import { Emitter } from '@difizen/
|
|
28
|
-
import { StorageService } from '@difizen/
|
|
25
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
26
|
+
import { prop, getOrigin } from '@difizen/libro-common/app';
|
|
27
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
28
|
+
import { StorageService } from '@difizen/libro-common/app';
|
|
29
29
|
import { LibroKernelManager } from "../kernel/libro-kernel-manager.js";
|
|
30
30
|
import { LibroKernelFactory } from "../kernel/libro-kernel-protocol.js";
|
|
31
31
|
import { NetworkError } from "../server/index.js";
|
|
@@ -5,7 +5,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
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
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
import { transient, inject } from '@difizen/
|
|
8
|
+
import { transient, inject } from '@difizen/libro-common/app';
|
|
9
9
|
import { SessionMetaOption } from "./libro-session-protocol.js";
|
|
10
10
|
export var LibroSession = (_dec = transient(), _dec(_class = /*#__PURE__*/_createClass(function LibroSession(meta) {
|
|
11
11
|
_classCallCheck(this, LibroSession);
|
package/es/session/restapi.js
CHANGED
|
@@ -16,7 +16,7 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
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 { default as axios } from 'axios';
|
|
18
18
|
import { URL } from '@difizen/libro-common';
|
|
19
|
-
import { inject, singleton } from '@difizen/
|
|
19
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
20
20
|
import { createResponseError } from "../server/index.js";
|
|
21
21
|
import { ServerConnection } from "../server/server-connection.js";
|
|
22
22
|
import { updateLegacySessionModel, validateModel } from "./validate.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-module.d.ts","sourceRoot":"","sources":["../../src/session/session-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"session-module.d.ts","sourceRoot":"","sources":["../../src/session/session-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,eAAO,MAAM,kBAAkB,YAiB9B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManaModule } from '@difizen/
|
|
1
|
+
import { ManaModule } from '@difizen/libro-common/app';
|
|
2
2
|
import { LibroSessionManager } from "./libro-session-manager.js";
|
|
3
3
|
import { LibroSessionFactory, SessionMetaOption } from "./libro-session-protocol.js";
|
|
4
4
|
import { LibroSession } from "./libro-session.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-infra",
|
|
@@ -32,9 +32,8 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@difizen/libro-common": "^0.
|
|
36
|
-
"@difizen/libro-core": "^0.
|
|
37
|
-
"@difizen/mana-app": "latest",
|
|
35
|
+
"@difizen/libro-common": "^1.0.0",
|
|
36
|
+
"@difizen/libro-core": "^1.0.0",
|
|
38
37
|
"minimist": "^1.2.8",
|
|
39
38
|
"query-string": "^8.1.0",
|
|
40
39
|
"uuid": "^9.0.0"
|
package/src/basemanager.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Disposable, Event as ManaEvent } from '@difizen/
|
|
2
|
-
import { Emitter } from '@difizen/
|
|
3
|
-
import { singleton } from '@difizen/
|
|
1
|
+
import type { Disposable, Event as ManaEvent } from '@difizen/libro-common/app';
|
|
2
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
3
|
+
import { singleton } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import type { ISettings, NetworkError } from './server/index.js';
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PartialJSONObject } from '@difizen/libro-common';
|
|
2
2
|
import { URL as URLUtil } from '@difizen/libro-common';
|
|
3
|
-
import type { Event as ManaEvent } from '@difizen/
|
|
4
|
-
import { inject, singleton } from '@difizen/
|
|
5
|
-
import { Emitter } from '@difizen/
|
|
3
|
+
import type { Event as ManaEvent } from '@difizen/libro-common/app';
|
|
4
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
5
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
6
6
|
import qs from 'query-string';
|
|
7
7
|
|
|
8
8
|
import type { ISettings } from '../server/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PathExt } from '@difizen/libro-common';
|
|
2
|
-
import type { Event as ManaEvent } from '@difizen/
|
|
3
|
-
import { inject, singleton } from '@difizen/
|
|
4
|
-
import { Emitter } from '@difizen/
|
|
2
|
+
import type { Event as ManaEvent } from '@difizen/libro-common/app';
|
|
3
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
4
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
5
5
|
|
|
6
6
|
import { Drive } from './contents-drive.js';
|
|
7
7
|
import type { IContentsDrive } from './contents-protocol.js';
|
package/src/kernel/future.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { JSONObject } from '@difizen/libro-common';
|
|
2
2
|
import { deepCopy, URL } from '@difizen/libro-common';
|
|
3
|
-
import type { Event as ManaEvent } from '@difizen/
|
|
4
|
-
import { Disposable } from '@difizen/
|
|
5
|
-
import { prop } from '@difizen/
|
|
6
|
-
import { Deferred, Emitter } from '@difizen/
|
|
7
|
-
import { inject, transient } from '@difizen/
|
|
3
|
+
import type { Event as ManaEvent } from '@difizen/libro-common/app';
|
|
4
|
+
import { Disposable } from '@difizen/libro-common/app';
|
|
5
|
+
import { prop } from '@difizen/libro-common/app';
|
|
6
|
+
import { Deferred, Emitter } from '@difizen/libro-common/app';
|
|
7
|
+
import { inject, transient } from '@difizen/libro-common/app';
|
|
8
8
|
import { v4 } from 'uuid';
|
|
9
9
|
|
|
10
10
|
import type { ISpecModel } from '../kernelspec/index.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Poll } from '@difizen/libro-common';
|
|
2
|
-
import type { Event as ManaEvent } from '@difizen/
|
|
3
|
-
import { inject, singleton } from '@difizen/
|
|
4
|
-
import { prop, getOrigin } from '@difizen/
|
|
5
|
-
import { Emitter } from '@difizen/
|
|
2
|
+
import type { Event as ManaEvent } from '@difizen/libro-common/app';
|
|
3
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
4
|
+
import { prop, getOrigin } from '@difizen/libro-common/app';
|
|
5
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
6
6
|
|
|
7
7
|
import { NetworkError, ServerManager } from '../server/index.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
2
|
import type { JSONObject } from '@difizen/libro-common';
|
|
3
|
-
import type { Event, Disposable } from '@difizen/
|
|
3
|
+
import type { Event, Disposable } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import type { ISpecModel } from '../kernelspec/index.js';
|
|
6
6
|
import type { ISettings } from '../server/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { prop } from '@difizen/
|
|
2
|
-
import { transient, inject } from '@difizen/
|
|
1
|
+
import { prop } from '@difizen/libro-common/app';
|
|
2
|
+
import { transient, inject } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import type { KernelConnection } from '../kernel/kernel-connection.js';
|
|
5
5
|
import type { SessionId } from '../session/libro-session-protocol.js';
|
package/src/kernel/restapi.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { URL } from '@difizen/libro-common';
|
|
2
|
-
import { inject, singleton } from '@difizen/
|
|
2
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import type { ISettings } from '../server/index.js';
|
|
5
5
|
import { createResponseError, ServerConnection } from '../server/index.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { deepEqual, Poll } from '@difizen/libro-common';
|
|
2
|
-
import type { Event as ManaEvent } from '@difizen/
|
|
3
|
-
import { getOrigin } from '@difizen/
|
|
4
|
-
import { Emitter, Deferred } from '@difizen/
|
|
5
|
-
import { inject, singleton } from '@difizen/
|
|
6
|
-
import { prop } from '@difizen/
|
|
2
|
+
import type { Event as ManaEvent } from '@difizen/libro-common/app';
|
|
3
|
+
import { getOrigin } from '@difizen/libro-common/app';
|
|
4
|
+
import { Emitter, Deferred } from '@difizen/libro-common/app';
|
|
5
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
6
|
+
import { prop } from '@difizen/libro-common/app';
|
|
7
7
|
|
|
8
8
|
import { BaseManager } from '../basemanager.js';
|
|
9
9
|
import { ServerManager } from '../server/server-manager.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import { URL } from '@difizen/libro-common';
|
|
2
2
|
import type { PartialJSONObject } from '@difizen/libro-common';
|
|
3
|
-
import { inject, singleton } from '@difizen/
|
|
3
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import { createResponseError } from '../server/connection-error.js';
|
|
6
6
|
import type { ISettings } from '../server/server-connection-protocol.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { inject, singleton } from '@difizen/
|
|
2
|
-
import { prop } from '@difizen/
|
|
1
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
2
|
+
import { prop } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import type { IContentsModel } from './contents/index.js';
|
|
5
5
|
import { LibroKernelManager } from './kernel/libro-kernel-manager.js';
|
package/src/module.ts
CHANGED
package/src/page-config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A wrapped error for a fetch response.
|
|
3
3
|
*/
|
|
4
|
-
export class
|
|
4
|
+
export class JupyterResponseError extends Error {
|
|
5
5
|
/**
|
|
6
6
|
* The response associated with the error.
|
|
7
7
|
*/
|
|
@@ -44,15 +44,15 @@ export class NetworkError extends TypeError {
|
|
|
44
44
|
*
|
|
45
45
|
* @param response The response object.
|
|
46
46
|
*
|
|
47
|
-
* @returns A promise that resolves with a `
|
|
47
|
+
* @returns A promise that resolves with a `JupyterResponseError` object.
|
|
48
48
|
*/
|
|
49
49
|
export const createResponseError = async (response: Response) => {
|
|
50
50
|
try {
|
|
51
51
|
const data = await response.json();
|
|
52
52
|
if (data.message) {
|
|
53
|
-
return new
|
|
53
|
+
return new JupyterResponseError(response, data.message);
|
|
54
54
|
}
|
|
55
|
-
return new
|
|
55
|
+
return new JupyterJupyterResponseError(response);
|
|
56
56
|
} catch (e) {
|
|
57
57
|
console.warn(e);
|
|
58
58
|
return new ResponseError(response);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { prop } from '@difizen/
|
|
2
|
-
import { inject, singleton } from '@difizen/
|
|
3
|
-
import { timeout, Deferred } from '@difizen/
|
|
1
|
+
import { prop } from '@difizen/libro-common/app';
|
|
2
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
3
|
+
import { timeout, Deferred } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import type { ISpecModels } from '../kernelspec/restapi.js';
|
|
6
6
|
import { KernelSpecRestAPI } from '../kernelspec/restapi.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Poll } from '@difizen/libro-common';
|
|
2
|
-
import type { Event } from '@difizen/
|
|
3
|
-
import { inject, singleton } from '@difizen/
|
|
4
|
-
import { prop, getOrigin } from '@difizen/
|
|
5
|
-
import { Emitter } from '@difizen/
|
|
6
|
-
import { StorageService } from '@difizen/
|
|
2
|
+
import type { Event } from '@difizen/libro-common/app';
|
|
3
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
4
|
+
import { prop, getOrigin } from '@difizen/libro-common/app';
|
|
5
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
6
|
+
import { StorageService } from '@difizen/libro-common/app';
|
|
7
7
|
|
|
8
8
|
import type { IContentsModel } from '../contents/index.js';
|
|
9
9
|
import { LibroKernelManager } from '../kernel/libro-kernel-manager.js';
|
package/src/session/restapi.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import { default as axios } from 'axios';
|
|
2
2
|
import { URL } from '@difizen/libro-common';
|
|
3
|
-
import { inject, singleton } from '@difizen/
|
|
3
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import type { ISettings } from '../server/index.js';
|
|
6
6
|
import { createResponseError } from '../server/index.js';
|