@basthon/kernel-base 0.50.10 → 0.50.11

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 CHANGED
@@ -6,7 +6,8 @@ export declare class KernelBase {
6
6
  private _rootPath;
7
7
  private _ready;
8
8
  private readonly _loaded;
9
- _execution_count: number;
9
+ protected _execution_count: number;
10
+ protected _pendingInput: boolean;
10
11
  constructor(options: any);
11
12
  /**
12
13
  * Kernel version number (string).
@@ -100,6 +101,10 @@ export declare class KernelBase {
100
101
  * Detection is based on extension.
101
102
  */
102
103
  putRessource(filename: string, content: ArrayBuffer): Promise<void>;
104
+ /**
105
+ * Is an input pending?
106
+ */
107
+ pendingInput(): boolean;
103
108
  /**
104
109
  * Internal. Code evaluation after an eval.request event.
105
110
  */
package/lib/kernel.js CHANGED
@@ -27,6 +27,7 @@ export class KernelBase {
27
27
  this._ready = false;
28
28
  this._loaded = new PromiseDelegate();
29
29
  this._execution_count = 0;
30
+ this._pendingInput = false;
30
31
  // root path where kernel is installed
31
32
  this._rootPath = options.rootPath;
32
33
  }
@@ -194,8 +195,11 @@ export class KernelBase {
194
195
  data.resolve = resolve;
195
196
  data.reject = reject;
196
197
  });
198
+ this._pendingInput = true;
197
199
  this.dispatchEvent("eval.input", data);
198
- return await promise;
200
+ const res = await promise;
201
+ this._pendingInput = false;
202
+ return res;
199
203
  }
200
204
  /**
201
205
  * Simple clone via JSON copy.
@@ -220,6 +224,12 @@ export class KernelBase {
220
224
  }
221
225
  }
222
226
  ;
227
+ /**
228
+ * Is an input pending?
229
+ */
230
+ pendingInput() {
231
+ return this._pendingInput;
232
+ }
223
233
  /**
224
234
  * Internal. Code evaluation after an eval.request event.
225
235
  */
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.50.10";
1
+ export declare const VERSION = "0.50.11";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.50.10";
1
+ export const VERSION = "0.50.11";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/kernel-base",
3
- "version": "0.50.10",
3
+ "version": "0.50.11",
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": "d576d7a05f231b083d81eb3ee63445e77ed09f2f"
39
+ "gitHead": "a5a3a9c6f02acd2967e5808d39950f5958410f0d"
40
40
  }