@hazae41/bobine 0.0.21 → 0.0.22
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/out/libs/metering/mod.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
// deno-lint-ignore-file prefer-const
|
|
2
1
|
import * as Wasm from "@hazae41/wasm";
|
|
3
2
|
export function meter(module, from, name) {
|
|
4
3
|
let wtype = module.body.sections.find(section => section.kind === Wasm.TypeSection.kind);
|
|
5
4
|
let wimport = module.body.sections.find(section => section.kind === Wasm.ImportSection.kind);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const wexport = module.body.sections.find(section => section.kind === Wasm.ExportSection.kind);
|
|
6
|
+
const wcode = module.body.sections.find(section => section.kind === Wasm.CodeSection.kind);
|
|
7
|
+
const welem = module.body.sections.find(section => section.kind === Wasm.ElementSection.kind);
|
|
8
|
+
const wstart = module.body.sections.find(section => section.kind === Wasm.StartSection.kind);
|
|
10
9
|
if (wtype == null) {
|
|
11
10
|
wtype = new Wasm.TypeSection([]);
|
|
12
11
|
module.body.sections.unshift(wtype);
|
package/out/libs/packed/mod.js
CHANGED
package/out/mods/server/bin.js
CHANGED
|
@@ -58,8 +58,10 @@ export async function main(args) {
|
|
|
58
58
|
response.headers.set("Access-Control-Allow-Headers", "*");
|
|
59
59
|
return response;
|
|
60
60
|
}
|
|
61
|
-
catch (
|
|
62
|
-
console.error(
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error(error);
|
|
63
|
+
if (error instanceof Error)
|
|
64
|
+
return new Response(error.message, { status: 500 });
|
|
63
65
|
return new Response(null, { status: 500 });
|
|
64
66
|
}
|
|
65
67
|
};
|
package/out/mods/server/mod.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// deno-lint-ignore-file no-cond-assign no-unused-vars require-await
|
|
2
1
|
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
3
2
|
if (value !== null && value !== void 0) {
|
|
4
3
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
package/out/mods/worker/bin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// deno-lint-ignore-file no-explicit-any no-unused-vars ban-unused-ignore
|
|
2
1
|
/// <reference lib="webworker" />
|
|
3
2
|
import { meter } from "../../libs/metering/mod.js";
|
|
4
3
|
import { Packed } from "../../libs/packed/mod.js";
|
|
@@ -91,8 +90,7 @@ function run(module, method, params, mode, maxsparks) {
|
|
|
91
90
|
imports["console"] = {
|
|
92
91
|
log: (text) => {
|
|
93
92
|
logs.push(text);
|
|
94
|
-
|
|
95
|
-
console.log(text);
|
|
93
|
+
console.log(text);
|
|
96
94
|
return;
|
|
97
95
|
}
|
|
98
96
|
};
|