@basthon/kernel-base 0.76.4 → 0.76.5
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/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.76.
|
|
1
|
+
export declare const VERSION = "0.76.5";
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.76.
|
|
1
|
+
export const VERSION = "0.76.5";
|
|
@@ -10,6 +10,7 @@ export declare class KernelMainBase<Type extends KernelWorkerBase> extends Kerne
|
|
|
10
10
|
private _channelSyncer;
|
|
11
11
|
private _fallbackKey?;
|
|
12
12
|
private _encrypt;
|
|
13
|
+
private _validationLogs;
|
|
13
14
|
constructor(options: any);
|
|
14
15
|
/**
|
|
15
16
|
* Is this a legacy worker? i.e. not runing in a worker.
|
|
@@ -12,6 +12,7 @@ export class KernelMainBase extends KernelBase {
|
|
|
12
12
|
// synchronise comlink and communication channels
|
|
13
13
|
this._channelSyncer = new PromiseDelegate();
|
|
14
14
|
this._encrypt = (s) => s;
|
|
15
|
+
this._validationLogs = [];
|
|
15
16
|
this._legacy = options?.legacy === true;
|
|
16
17
|
// synchronous wait on SAB cannot be used in a legacy context
|
|
17
18
|
// (atomic wait will block the main thread)
|
|
@@ -207,6 +208,9 @@ export class KernelMainBase extends KernelBase {
|
|
|
207
208
|
throw new Error(`Basthon's network API error: ${response.status}`);
|
|
208
209
|
}
|
|
209
210
|
break;
|
|
211
|
+
case "log-validation":
|
|
212
|
+
this._validationLogs.push(msg.content);
|
|
213
|
+
break;
|
|
210
214
|
case "breakpoint-move-on":
|
|
211
215
|
//@ts-ignore
|
|
212
216
|
const notebook = Jupyter?.notebook;
|
|
@@ -183,6 +183,10 @@ declare class KernelWorkerBase {
|
|
|
183
183
|
* then return it.
|
|
184
184
|
*/
|
|
185
185
|
toplevelInput(prompt: string | null | undefined, password?: boolean, data?: any): Promise<string>;
|
|
186
|
+
/**
|
|
187
|
+
* Post a message to log a validation event.
|
|
188
|
+
*/
|
|
189
|
+
logValidation(data: any): void;
|
|
186
190
|
/**
|
|
187
191
|
* Ask main thread to go to the next breakpoint.
|
|
188
192
|
*/
|
|
@@ -415,6 +415,16 @@ class KernelWorkerBase {
|
|
|
415
415
|
this._toplevelInputPromise = undefined;
|
|
416
416
|
return res;
|
|
417
417
|
}
|
|
418
|
+
/**
|
|
419
|
+
* Post a message to log a validation event.
|
|
420
|
+
*/
|
|
421
|
+
logValidation(data) {
|
|
422
|
+
const evalData = this.clone(this.__eval_data__);
|
|
423
|
+
this.postMessage?.({
|
|
424
|
+
type: "log-validation",
|
|
425
|
+
content: { "eval-data": evalData, ...data },
|
|
426
|
+
});
|
|
427
|
+
}
|
|
418
428
|
/**
|
|
419
429
|
* Ask main thread to go to the next breakpoint.
|
|
420
430
|
*/
|