@basthon/kernel-base 0.50.7 → 0.50.9
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/kernel.d.ts +4 -4
- package/lib/kernel.js +7 -7
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/lib/kernel.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class KernelBase {
|
|
|
7
7
|
private _ready;
|
|
8
8
|
private readonly _loaded;
|
|
9
9
|
_execution_count: number;
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(options: any);
|
|
11
11
|
/**
|
|
12
12
|
* Kernel version number (string).
|
|
13
13
|
*/
|
|
@@ -39,8 +39,8 @@ export declare class KernelBase {
|
|
|
39
39
|
*/
|
|
40
40
|
evalAsync(code: string, outCallback: (_: string) => void, errCallback: (_: string) => void, data?: any): Promise<any>;
|
|
41
41
|
restart(): void;
|
|
42
|
-
putFile(filename: string, content: ArrayBuffer): void
|
|
43
|
-
putModule(filename: string, content: ArrayBuffer): void
|
|
42
|
+
putFile(filename: string, content: ArrayBuffer): Promise<void>;
|
|
43
|
+
putModule(filename: string, content: ArrayBuffer): Promise<void>;
|
|
44
44
|
userModules(): string[];
|
|
45
45
|
getFile(path: string): void;
|
|
46
46
|
getUserModuleFile(filename: string): void;
|
|
@@ -99,7 +99,7 @@ export declare class KernelBase {
|
|
|
99
99
|
* Put a ressource (file or module).
|
|
100
100
|
* Detection is based on extension.
|
|
101
101
|
*/
|
|
102
|
-
putRessource(filename: string, content: ArrayBuffer): void
|
|
102
|
+
putRessource(filename: string, content: ArrayBuffer): Promise<void>;
|
|
103
103
|
/**
|
|
104
104
|
* Internal. Code evaluation after an eval.request event.
|
|
105
105
|
*/
|
package/lib/kernel.js
CHANGED
|
@@ -23,12 +23,12 @@ class BasthonEvent extends Event {
|
|
|
23
23
|
* in console/notebook.
|
|
24
24
|
*/
|
|
25
25
|
export class KernelBase {
|
|
26
|
-
constructor(
|
|
26
|
+
constructor(options) {
|
|
27
27
|
this._ready = false;
|
|
28
28
|
this._loaded = new PromiseDelegate();
|
|
29
29
|
this._execution_count = 0;
|
|
30
30
|
// root path where kernel is installed
|
|
31
|
-
this._rootPath = rootPath;
|
|
31
|
+
this._rootPath = options.rootPath;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Kernel version number (string).
|
|
@@ -72,11 +72,11 @@ export class KernelBase {
|
|
|
72
72
|
;
|
|
73
73
|
restart() { throw new NotImplementedError("restart"); }
|
|
74
74
|
;
|
|
75
|
-
putFile(filename, content) {
|
|
75
|
+
async putFile(filename, content) {
|
|
76
76
|
throw new NotImplementedError("putFile");
|
|
77
77
|
}
|
|
78
78
|
;
|
|
79
|
-
putModule(filename, content) {
|
|
79
|
+
async putModule(filename, content) {
|
|
80
80
|
throw new NotImplementedError("putModule");
|
|
81
81
|
}
|
|
82
82
|
;
|
|
@@ -209,14 +209,14 @@ export class KernelBase {
|
|
|
209
209
|
* Put a ressource (file or module).
|
|
210
210
|
* Detection is based on extension.
|
|
211
211
|
*/
|
|
212
|
-
putRessource(filename, content) {
|
|
212
|
+
async putRessource(filename, content) {
|
|
213
213
|
var _a;
|
|
214
214
|
const ext = (_a = filename.split('.').pop()) !== null && _a !== void 0 ? _a : "";
|
|
215
215
|
if (this.moduleExts().includes(ext)) {
|
|
216
|
-
return this.putModule(filename, content);
|
|
216
|
+
return await this.putModule(filename, content);
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
219
|
-
return this.putFile(filename, content);
|
|
219
|
+
return await this.putFile(filename, content);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
;
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.50.
|
|
1
|
+
export declare const VERSION = "0.50.9";
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.50.
|
|
1
|
+
export const VERSION = "0.50.9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/kernel-base",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.9",
|
|
4
4
|
"description": "Basthon - Base Kernel",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "29ccac6dc1ef4b33c62770b0d2c6c3c12de13ccf"
|
|
40
40
|
}
|