@hazae41/bobine 0.0.2 → 0.0.3
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/mods/server/mod.js +1 -1
- package/out/mods/worker/bin.js +1 -1
- package/package.json +1 -1
package/out/mods/server/mod.js
CHANGED
|
@@ -96,7 +96,7 @@ export async function serve(databaseAsPath, scriptsAsPath, ed25519PrivateKeyAsHe
|
|
|
96
96
|
await database.close();
|
|
97
97
|
mkdirSync(scriptsAsPath, { recursive: true });
|
|
98
98
|
const setOfEffortsAsHex = new Set();
|
|
99
|
-
const worker = new Mutex(new Worker(import.meta.resolve(
|
|
99
|
+
const worker = new Mutex(new Worker(import.meta.resolve(`../worker/bin.ts?database=${databaseAsPath}&scripts=${scriptsAsPath}&ed25519PrivateKeyAsHex=${ed25519PrivateKeyAsHex}&ed25519PublicKeyAsHex=${ed25519PublicKeyAsHex}`), { name: "worker", type: "module" }));
|
|
100
100
|
const onHttpRequest = async (request) => {
|
|
101
101
|
let match;
|
|
102
102
|
if (match = new URLPattern("/api/create", request.url).exec(request.url)) {
|
package/out/mods/worker/bin.js
CHANGED
|
@@ -10,7 +10,7 @@ const params = new URL(import.meta.url).searchParams;
|
|
|
10
10
|
const scriptsAsPath = params.get("scripts");
|
|
11
11
|
const ed25519PrivkeyAsHex = params.get("ed25519PrivateKeyAsHex");
|
|
12
12
|
const ed25519PrivkeyAsBytes = Uint8Array.fromHex(ed25519PrivkeyAsHex);
|
|
13
|
-
const helper = new Worker(import.meta.resolve(
|
|
13
|
+
const helper = new Worker(import.meta.resolve(`../helper/bin.ts?${params.toString()}`), { type: "module" });
|
|
14
14
|
function run(module, method, params, mode, maxsparks) {
|
|
15
15
|
let sparks = 0n;
|
|
16
16
|
const exports = {};
|