-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathindex.ts
53 lines (45 loc) · 1.34 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) Thorsten Beier
// Copyright (c) JupyterLite Contributors
// Distributed under the terms of the Modified BSD License.
import {
JupyterLiteServer,
JupyterLiteServerPlugin
} from '@jupyterlite/server';
import { IKernel, IKernelSpecs } from '@jupyterlite/kernel';
import { XeusServerKernel } from './xeus_server_kernel';
import logo32 from '../style/logos/sqlite-logo-32x32.png';
import logo64 from '../style/logos/sqlite-logo-64x64.png';
const server_kernel: JupyterLiteServerPlugin<void> = {
id: '@jupyterlite/xeus-sqlite-kernel-extension:kernel',
autoStart: true,
requires: [IKernelSpecs],
activate: (app: JupyterLiteServer, kernelspecs: IKernelSpecs) => {
kernelspecs.register({
spec: {
name: 'SQLite',
display_name: 'SQLite',
language: 'sql',
argv: [],
spec: {
argv: [],
env: {},
display_name: 'SQLite',
language: 'sql',
interrupt_mode: 'message',
metadata: {}
},
resources: {
'logo-32x32': logo32,
'logo-64x64': logo64
}
},
create: async (options: IKernel.IOptions): Promise<IKernel> => {
return new XeusServerKernel({
...options
});
}
});
}
};
const plugins: JupyterLiteServerPlugin<any>[] = [server_kernel];
export default plugins;