@basthon/kernel-xcas 0.71.2 → 0.71.4
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/worker.js +10 -0
- package/lib/xcas-wrap.js +1 -1
- package/package.json +4 -4
package/lib/worker.js
CHANGED
|
@@ -13,9 +13,19 @@ export class XCASKernelWorker extends KernelWorkerBase {
|
|
|
13
13
|
* Initialize the kernel.
|
|
14
14
|
*/
|
|
15
15
|
async _init() {
|
|
16
|
+
window.alert = (msg) => console.error(msg);
|
|
17
|
+
console.info = (...args) => console.log(...args);
|
|
18
|
+
console.warn = (...args) => console.error(...args);
|
|
19
|
+
globalThis.addEventListener("error", (e) => console.error(e.toString()));
|
|
16
20
|
await this._xcas.init();
|
|
17
21
|
}
|
|
18
22
|
async _eval(data, code) {
|
|
23
|
+
console.log = (...args) => {
|
|
24
|
+
this.sendStdoutStream(data, args.join(" ") + "\n");
|
|
25
|
+
};
|
|
26
|
+
console.error = (...args) => {
|
|
27
|
+
this.sendStderrStream(data, args.join(" ") + "\n");
|
|
28
|
+
};
|
|
19
29
|
const res = this._xcas.caseval(code);
|
|
20
30
|
if (res == null)
|
|
21
31
|
return undefined;
|
package/lib/xcas-wrap.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/kernel-xcas",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.4",
|
|
4
4
|
"description": "Basthon - XCAS Kernel",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"clean": "rm -rf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/kernel-base": "0.71.
|
|
29
|
-
"@basthon/xcas-wasm": "^0.0.
|
|
28
|
+
"@basthon/kernel-base": "0.71.4",
|
|
29
|
+
"@basthon/xcas-wasm": "^0.0.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"typescript": "~5.4.5"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "36867b0590c1f581d69474f333983d2154577a26"
|
|
38
38
|
}
|