@mirascript/wasm 0.1.79 → 0.1.82
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/wasm.js +8 -4
- package/lib/wasm_bg.wasm +0 -0
- package/package.json +2 -3
package/lib/wasm.js
CHANGED
|
@@ -264,7 +264,7 @@ export class MonacoCompiler {
|
|
|
264
264
|
const ret = wasm.monacocompiler_format(this.__wbg_ptr);
|
|
265
265
|
let v1;
|
|
266
266
|
if (ret[0] !== 0) {
|
|
267
|
-
v1 = getStringFromWasm0(ret[0], ret[1])
|
|
267
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
268
268
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
269
269
|
}
|
|
270
270
|
return v1;
|
|
@@ -324,10 +324,10 @@ export function main() {
|
|
|
324
324
|
function __wbg_get_imports() {
|
|
325
325
|
const import0 = {
|
|
326
326
|
__proto__: null,
|
|
327
|
-
|
|
327
|
+
__wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
|
|
328
328
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
329
329
|
},
|
|
330
|
-
|
|
330
|
+
__wbg_error_757e9472f8410341: function(arg0, arg1) {
|
|
331
331
|
let deferred0_0;
|
|
332
332
|
let deferred0_1;
|
|
333
333
|
try {
|
|
@@ -506,11 +506,15 @@ function __wbg_finalize_init(instance, module) {
|
|
|
506
506
|
|
|
507
507
|
async function __wbg_load(module, imports) {
|
|
508
508
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
509
|
+
if (!module.ok) {
|
|
510
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
511
|
+
}
|
|
512
|
+
|
|
509
513
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
510
514
|
try {
|
|
511
515
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
512
516
|
} catch (e) {
|
|
513
|
-
const validResponse =
|
|
517
|
+
const validResponse = expectedResponseType(module.type);
|
|
514
518
|
|
|
515
519
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
516
520
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
package/lib/wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirascript/wasm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.82",
|
|
4
4
|
"author": "CloudPSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "MiraScript compiler for WebAssembly",
|
|
@@ -30,9 +30,8 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@types/node": "^26.1.2",
|
|
34
33
|
"nodemon": "^3.1.14",
|
|
35
|
-
"@mirascript/constants": "~0.1.
|
|
34
|
+
"@mirascript/constants": "~0.1.82"
|
|
36
35
|
},
|
|
37
36
|
"scripts": {
|
|
38
37
|
"wasm": "wasm-pack build --target web --out-dir ../../packages/wasm/lib --no-pack ../../crates/wasm",
|