@moonbit/moonpad-monaco 0.1.202412300 → 0.1.202501020
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/dist/moonpad-monaco.d.ts
CHANGED
|
@@ -49,9 +49,9 @@ declare type Position = {
|
|
|
49
49
|
col: number;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
declare function run(js: Uint8Array):
|
|
52
|
+
declare function run(js: Uint8Array): ReadableStream<string>;
|
|
53
53
|
|
|
54
|
-
declare function test(js: Uint8Array):
|
|
54
|
+
declare function test(js: Uint8Array): ReadableStream<TestOutput>;
|
|
55
55
|
|
|
56
56
|
declare type TestOutput = {
|
|
57
57
|
kind: "stdout";
|
package/dist/moonpad-monaco.js
CHANGED
|
@@ -10265,7 +10265,7 @@ async function qQ(I) {
|
|
|
10265
10265
|
capabilities: {}
|
|
10266
10266
|
}), await B.sendNotification(II.InitializedNotification.type, {}), PQ(B);
|
|
10267
10267
|
}
|
|
10268
|
-
const Ai = `(function(){"use strict";self.onmessage=async s=>{
|
|
10268
|
+
const Ai = `(function(){"use strict";self.onmessage=async s=>{l(s.data)};async function l(s){const o=URL.createObjectURL(new Blob([s],{type:"application/javascript"})),t=globalThis.console.log;globalThis.console.log=e=>{self.postMessage(e)};try{await import(o)}catch(e){self.postMessage(e);return}finally{URL.revokeObjectURL(o),globalThis.console.log=t}self.postMessage(null)}})();
|
|
10269
10269
|
`, kl = typeof self < "u" && self.Blob && new Blob([Ai], { type: "text/javascript;charset=utf-8" });
|
|
10270
10270
|
function _Q(I) {
|
|
10271
10271
|
let C;
|
|
@@ -10582,21 +10582,18 @@ function ld() {
|
|
|
10582
10582
|
}
|
|
10583
10583
|
});
|
|
10584
10584
|
}
|
|
10585
|
-
|
|
10585
|
+
function li(I) {
|
|
10586
10586
|
const C = new _Q();
|
|
10587
|
-
return C.postMessage(I),
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
C.
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
}
|
|
10594
|
-
});
|
|
10595
|
-
i(B);
|
|
10587
|
+
return C.postMessage(I), new ReadableStream({
|
|
10588
|
+
start(i) {
|
|
10589
|
+
C.onmessage = (B) => {
|
|
10590
|
+
B.data instanceof Error ? (C.terminate(), i.error(B.data)) : B.data ? i.enqueue(B.data) : (C.terminate(), i.close());
|
|
10591
|
+
};
|
|
10592
|
+
}
|
|
10596
10593
|
});
|
|
10597
10594
|
}
|
|
10598
|
-
|
|
10599
|
-
return
|
|
10595
|
+
function id(I) {
|
|
10596
|
+
return li(I).pipeThrough(ld());
|
|
10600
10597
|
}
|
|
10601
10598
|
function ii(I) {
|
|
10602
10599
|
gC === void 0 && (gC = I);
|