@jupyterlite/server 0.1.2 → 0.2.0-alpha.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/lib/app.js +32 -5
- package/lib/app.js.map +1 -1
- package/lib/tokens.js +1 -1
- package/lib/tokens.js.map +1 -1
- package/package.json +21 -20
package/lib/app.js
CHANGED
|
@@ -2,8 +2,33 @@
|
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
import { ServerConnection, ServiceManager } from '@jupyterlab/services';
|
|
4
4
|
import { Application } from '@lumino/application';
|
|
5
|
+
import { Stream } from '@lumino/signaling';
|
|
5
6
|
import { WebSocket } from 'mock-socket';
|
|
6
7
|
import { Router } from './router';
|
|
8
|
+
/**
|
|
9
|
+
* Mock the Event Manager for now
|
|
10
|
+
*/
|
|
11
|
+
class MockEventManager {
|
|
12
|
+
constructor(options) {
|
|
13
|
+
this._stream = new Stream(this);
|
|
14
|
+
this._serverSettings = options.serverSettings;
|
|
15
|
+
}
|
|
16
|
+
async emit(event) {
|
|
17
|
+
// no-op
|
|
18
|
+
}
|
|
19
|
+
dispose() {
|
|
20
|
+
// no-op
|
|
21
|
+
}
|
|
22
|
+
get isDisposed() {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
get stream() {
|
|
26
|
+
return this._stream;
|
|
27
|
+
}
|
|
28
|
+
get serverSettings() {
|
|
29
|
+
return this._serverSettings;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
7
32
|
/**
|
|
8
33
|
* Server is the main application class. It is instantiated once and shared.
|
|
9
34
|
*/
|
|
@@ -29,13 +54,15 @@ export class JupyterLiteServer extends Application {
|
|
|
29
54
|
*/
|
|
30
55
|
this.version = 'unknown';
|
|
31
56
|
this._router = new Router();
|
|
57
|
+
const serverSettings = {
|
|
58
|
+
...ServerConnection.makeSettings(),
|
|
59
|
+
WebSocket,
|
|
60
|
+
fetch: (_a = this.fetch.bind(this)) !== null && _a !== void 0 ? _a : undefined,
|
|
61
|
+
};
|
|
32
62
|
this._serviceManager = new ServiceManager({
|
|
33
63
|
standby: 'never',
|
|
34
|
-
serverSettings
|
|
35
|
-
|
|
36
|
-
WebSocket,
|
|
37
|
-
fetch: (_a = this.fetch.bind(this)) !== null && _a !== void 0 ? _a : undefined,
|
|
38
|
-
},
|
|
64
|
+
serverSettings,
|
|
65
|
+
events: new MockEventManager({ serverSettings }),
|
|
39
66
|
});
|
|
40
67
|
}
|
|
41
68
|
/**
|
package/lib/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAS,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAE,WAAW,EAAW,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;GAEG;AACH,MAAM,gBAAgB;IACpB,YAAY,OAAuD;QACjE,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAoB;QAC7B,QAAQ;IACV,CAAC;IAED,OAAO;QACL,QAAQ;IACV,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED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AY;QAC9B,QAAQ;IACV,CAAC;IAED;;;;OAIG;IACH,oBAAoB,CAAC,GAAoC;QACvD,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,2BAA2B;QAC3B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE;YAC5D,IAAI,GAAG,GAAU,CAAC;SACnB;QACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACxB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;SACf;QACD,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI;gBACF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;aAC3B;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,qBAAqB,CAAC,IAAuC;QAC3D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;CAIF"}
|
package/lib/tokens.js
CHANGED
package/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,OAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,KAAK,CAC5C,qDAAqD,CACtD,CAAC;AAyBF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlite/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha.0",
|
|
4
4
|
"description": "JupyterLite - Server",
|
|
5
5
|
"homepage": "https://github.com/jupyterlite/jupyterlite",
|
|
6
6
|
"bugs": {
|
|
@@ -42,31 +42,32 @@
|
|
|
42
42
|
"watch": "tsc -b --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@jupyterlab/coreutils": "
|
|
46
|
-
"@jupyterlab/nbformat": "
|
|
47
|
-
"@jupyterlab/observables": "
|
|
48
|
-
"@jupyterlab/services": "
|
|
49
|
-
"@jupyterlab/settingregistry": "
|
|
50
|
-
"@jupyterlab/statedb": "
|
|
51
|
-
"@jupyterlite/contents": "^0.
|
|
52
|
-
"@jupyterlite/kernel": "^0.
|
|
53
|
-
"@jupyterlite/session": "^0.
|
|
54
|
-
"@jupyterlite/settings": "^0.
|
|
55
|
-
"@jupyterlite/translation": "^0.
|
|
56
|
-
"@lumino/application": "^
|
|
57
|
-
"@lumino/coreutils": "^1.
|
|
45
|
+
"@jupyterlab/coreutils": "^6.0.5",
|
|
46
|
+
"@jupyterlab/nbformat": "^4.0.5",
|
|
47
|
+
"@jupyterlab/observables": "^5.0.5",
|
|
48
|
+
"@jupyterlab/services": "^7.0.5",
|
|
49
|
+
"@jupyterlab/settingregistry": "^4.0.5",
|
|
50
|
+
"@jupyterlab/statedb": "^4.0.5",
|
|
51
|
+
"@jupyterlite/contents": "^0.2.0-alpha.0",
|
|
52
|
+
"@jupyterlite/kernel": "^0.2.0-alpha.0",
|
|
53
|
+
"@jupyterlite/session": "^0.2.0-alpha.0",
|
|
54
|
+
"@jupyterlite/settings": "^0.2.0-alpha.0",
|
|
55
|
+
"@jupyterlite/translation": "^0.2.0-alpha.0",
|
|
56
|
+
"@lumino/application": "^2.2.1",
|
|
57
|
+
"@lumino/coreutils": "^2.1.2",
|
|
58
|
+
"@lumino/signaling": "^2.1.2",
|
|
58
59
|
"mock-socket": "^9.1.0"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@babel/core": "^7.11.6",
|
|
62
63
|
"@babel/preset-env": "^7.12.1",
|
|
63
|
-
"@jupyterlab/testutils": "~
|
|
64
|
-
"@types/jest": "^
|
|
64
|
+
"@jupyterlab/testutils": "~4.0.5",
|
|
65
|
+
"@types/jest": "^29.5.3",
|
|
65
66
|
"@types/serviceworker": "^0.0.56",
|
|
66
|
-
"jest": "^
|
|
67
|
-
"rimraf": "~
|
|
68
|
-
"ts-jest": "^
|
|
69
|
-
"typescript": "~
|
|
67
|
+
"jest": "^29.6.2",
|
|
68
|
+
"rimraf": "~5.0.1",
|
|
69
|
+
"ts-jest": "^29.1.1",
|
|
70
|
+
"typescript": "~5.0.4"
|
|
70
71
|
},
|
|
71
72
|
"publishConfig": {
|
|
72
73
|
"access": "public"
|