@basthon/kernel-base 0.76.6 → 0.76.7
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.7";
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.76.
|
|
1
|
+
export const VERSION = "0.76.7";
|
|
@@ -10,7 +10,6 @@ export declare class KernelMainBase<Type extends KernelWorkerBase> extends Kerne
|
|
|
10
10
|
private _channelSyncer;
|
|
11
11
|
private _fallbackKey?;
|
|
12
12
|
private _encrypt;
|
|
13
|
-
private _validationLogs;
|
|
14
13
|
constructor(options: any);
|
|
15
14
|
/**
|
|
16
15
|
* Is this a legacy worker? i.e. not runing in a worker.
|
|
@@ -12,7 +12,6 @@ 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 = [];
|
|
16
15
|
this._legacy = options?.legacy === true;
|
|
17
16
|
// synchronous wait on SAB cannot be used in a legacy context
|
|
18
17
|
// (atomic wait will block the main thread)
|
|
@@ -209,7 +208,7 @@ export class KernelMainBase extends KernelBase {
|
|
|
209
208
|
}
|
|
210
209
|
break;
|
|
211
210
|
case "log-validation":
|
|
212
|
-
this.
|
|
211
|
+
this.dispatchEvent("validation.log", msg.content);
|
|
213
212
|
break;
|
|
214
213
|
case "breakpoint-move-on":
|
|
215
214
|
//@ts-ignore
|
|
@@ -419,10 +419,21 @@ class KernelWorkerBase {
|
|
|
419
419
|
* Post a message to log a validation event.
|
|
420
420
|
*/
|
|
421
421
|
logValidation(data) {
|
|
422
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Convert a date to a string with format YYYY-MM-DDThh:mm:ss±hh:mm
|
|
424
|
+
* where the part after the first ss indicates the timezone shift.
|
|
425
|
+
*/
|
|
426
|
+
const toLocalISOString = (date) => new Date()
|
|
427
|
+
.toLocaleString("sv-SE", { timeZoneName: "longOffset" })
|
|
428
|
+
.replace(" GMT", "")
|
|
429
|
+
.replace(" ", "T");
|
|
430
|
+
const content = { "eval-data": this.__eval_data__, ...data };
|
|
431
|
+
// add current date if not present
|
|
432
|
+
if (content.date == null)
|
|
433
|
+
content.date = toLocalISOString(new Date());
|
|
423
434
|
this.postMessage?.({
|
|
424
435
|
type: "log-validation",
|
|
425
|
-
content
|
|
436
|
+
content,
|
|
426
437
|
});
|
|
427
438
|
}
|
|
428
439
|
/**
|