This commit is contained in:
velzie 2024-10-13 10:21:54 -04:00
commit b6bdb674fb
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
20 changed files with 61 additions and 197 deletions

View file

@ -1,6 +1,5 @@
import { FakeServiceWorker } from "./fakesw";
import { swfetch } from "./fetch";
import { ScramjetThreadpool } from "./threadpool";
import type BareClient from "@mercuryworkshop/bare-mux";
import { ScramjetConfig } from "../types";
import { $scramjet, loadCodecs } from "../scramjet";
@ -8,7 +7,6 @@ import { $scramjet, loadCodecs } from "../scramjet";
export class ScramjetServiceWorker extends EventTarget {
client: BareClient;
config: ScramjetConfig;
threadpool: ScramjetThreadpool;
syncPool: Record<number, (val?: any) => void> = {};
synctoken = 0;
@ -21,8 +19,6 @@ export class ScramjetServiceWorker extends EventTarget {
super();
this.client = new $scramjet.shared.util.BareClient();
this.threadpool = new ScramjetThreadpool();
addEventListener("message", ({ data }: { data: MessageC2W }) => {
if (!("scramjet$type" in data)) return;