@basthon/kernel-base 0.77.6 → 0.78.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/kernel.d.ts CHANGED
@@ -91,7 +91,7 @@ export declare class KernelBase {
91
91
  * Restart the kernel (stop and start).
92
92
  * Use await this.ready() to ensure kernel is started
93
93
  */
94
- restart(): void;
94
+ restart(): Promise<void>;
95
95
  /**
96
96
  * Is the kernel ready?
97
97
  */
package/lib/kernel.js CHANGED
@@ -149,8 +149,10 @@ export class KernelBase {
149
149
  this._ready.reject(error);
150
150
  throw error;
151
151
  }
152
- this._files.forEach((v, k) => this.putFile(k, v));
153
- this._modules.forEach((v, k) => this.putModule(k, v));
152
+ await Promise.all([
153
+ Promise.all(Array.from(this._files, ([k, v]) => this.putFile(k, v))),
154
+ Promise.all(Array.from(this._modules, ([k, v]) => this.putModule(k, v))),
155
+ ]);
154
156
  this._isReady = true;
155
157
  this._ready.resolve();
156
158
  }
@@ -170,9 +172,9 @@ export class KernelBase {
170
172
  * Restart the kernel (stop and start).
171
173
  * Use await this.ready() to ensure kernel is started
172
174
  */
173
- restart() {
174
- this.stop(); // sync
175
- this.start(); // async
175
+ async restart() {
176
+ await this.stop(); // sync
177
+ await this.start(); // async
176
178
  }
177
179
  /**
178
180
  * Is the kernel ready?
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.77.6";
1
+ export declare const VERSION = "0.78.0";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.77.6";
1
+ export const VERSION = "0.78.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/kernel-base",
3
- "version": "0.77.6",
3
+ "version": "0.78.0",
4
4
  "description": "Basthon - Base Kernel",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {