diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8561d2c..950c59e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,8 @@ jobs: node-version: 18 - name: build run: | + apt update + apt-get install -y zip pack install contrib make cd playground diff --git a/playground/src/worker.ts b/playground/src/worker.ts index 53f6609..ada92a3 100644 --- a/playground/src/worker.ts +++ b/playground/src/worker.ts @@ -2,7 +2,7 @@ import { shim } from "./emul"; import { archive, preload } from "./preload"; import { CompileReq, CompileRes } from "./types"; -const handleMessage = async function (ev: {data: CompileReq}) { +const handleMessage = async function (ev: { data: CompileReq }) { console.log("message", ev.data); await preload; shim.archive = archive; @@ -27,13 +27,13 @@ const handleMessage = async function (ev: {data: CompileReq}) { shim.stdout += "\n" + String(e); } let duration = +new Date() - start; - console.log(`shim.process ${fn} in ${duration} ms`); + console.log(`process ${fn} in ${duration} ms`); let javascript = new TextDecoder().decode(shim.files[outfile]); let output = shim.stdout; sendResponse({ javascript, output, duration }); }; // hooks for worker.html to override -let sendResponse : (_: CompileRes) => void = postMessage; +let sendResponse: (_: CompileRes) => void = postMessage; onmessage = handleMessage; importScripts("newt.js");