@basthon/kernel-javascript 0.50.8 → 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 +3 -3
- package/lib/kernel.js +4 -4
- package/package.json +3 -3
package/lib/kernel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KernelBase } from '@basthon/kernel-base';
|
|
2
2
|
export declare class KernelJavaScript extends KernelBase {
|
|
3
3
|
private _context;
|
|
4
|
-
constructor(
|
|
4
|
+
constructor(options: any);
|
|
5
5
|
language(): string;
|
|
6
6
|
languageName(): string;
|
|
7
7
|
moduleExts(): string[];
|
|
@@ -13,6 +13,6 @@ export declare class KernelJavaScript extends KernelBase {
|
|
|
13
13
|
restart(): void;
|
|
14
14
|
more(source: string): boolean;
|
|
15
15
|
complete(code: string): [string[], number] | [];
|
|
16
|
-
putFile(filename: string, content: ArrayBuffer): void
|
|
17
|
-
putModule(filename: string, content: ArrayBuffer): void
|
|
16
|
+
putFile(filename: string, content: ArrayBuffer): Promise<void>;
|
|
17
|
+
putModule(filename: string, content: ArrayBuffer): Promise<void>;
|
|
18
18
|
}
|
package/lib/kernel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KernelBase } from '@basthon/kernel-base';
|
|
2
2
|
export class KernelJavaScript extends KernelBase {
|
|
3
|
-
constructor(
|
|
4
|
-
super(
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
5
|
this._context = {
|
|
6
6
|
Basthon: undefined,
|
|
7
7
|
Jupyter: undefined,
|
|
@@ -66,11 +66,11 @@ export class KernelJavaScript extends KernelBase {
|
|
|
66
66
|
;
|
|
67
67
|
complete(code) { return []; }
|
|
68
68
|
;
|
|
69
|
-
putFile(filename, content) {
|
|
69
|
+
async putFile(filename, content) {
|
|
70
70
|
console.error(`Fichier ${filename} not added since putFile has no mean in the JS context.`);
|
|
71
71
|
}
|
|
72
72
|
;
|
|
73
|
-
putModule(filename, content) {
|
|
73
|
+
async putModule(filename, content) {
|
|
74
74
|
content = new Uint8Array(content);
|
|
75
75
|
const ext = filename.split('.').pop();
|
|
76
76
|
switch (ext) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/kernel-javascript",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.9",
|
|
4
4
|
"description": "Basthon - JavaScript Kernel",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"clean": "rm -rf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/kernel-base": "0.50.
|
|
28
|
+
"@basthon/kernel-base": "0.50.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"gulp": "^4.0.2",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "29ccac6dc1ef4b33c62770b0d2c6c3c12de13ccf"
|
|
39
39
|
}
|