@basthon/kernel-base 0.76.7 → 0.76.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/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.76.7";
1
+ export declare const VERSION = "0.76.9";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.76.7";
1
+ export const VERSION = "0.76.9";
@@ -20,6 +20,7 @@ declare class KernelWorkerBase {
20
20
  protected _options: any;
21
21
  protected readonly _legacy: boolean;
22
22
  private readonly _basthonRoot;
23
+ private readonly _ephemeralAPI;
23
24
  private _ready;
24
25
  protected __eval_data__: any;
25
26
  protected postMessage?: InstanceType<typeof MessagePort>["postMessage"];
@@ -10,6 +10,8 @@ class KernelWorkerBase {
10
10
  this._decrypt = (s) => s;
11
11
  this._options = options;
12
12
  this._legacy = options?.legacy === true;
13
+ this._ephemeralAPI =
14
+ options?.ephemeralAPI ?? "https://api.basthon.fr/ephemeral";
13
15
  this._basthonRoot = self._assetsURL + "/" + VERSION + "/" + this.language();
14
16
  /* we mock the fetch function to:
15
17
  * - redirect queries to local FS
@@ -380,7 +382,7 @@ class KernelWorkerBase {
380
382
  // polling loop
381
383
  while (Date.now() < tend) {
382
384
  const request = new XMLHttpRequest();
383
- request.open("POST", "https://api.basthon.fr/ephemeral", false); // synchronous request
385
+ request.open("POST", this._ephemeralAPI, false); // synchronous request
384
386
  request.setRequestHeader("X-API-Referer", this._basthonRoot ?? "null");
385
387
  request.send(JSON.stringify({ action: "get", key: this._fallbackKey }));
386
388
  if (request.status === 200)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/kernel-base",
3
- "version": "0.76.7",
3
+ "version": "0.76.9",
4
4
  "description": "Basthon - Base Kernel",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {