PlugOS refactor and other tweaks (#631)

* Prep for in-process plug loading (e.g. for CF workers, Deno Deploy)
* Prototype of fixed in-process loading plugs
* Fix: buttons not to scroll with content
* Better positioning of modal especially on mobile
* Move query caching outside query
* Fix annoying mouse behavior when filter box appears
* Page navigator search tweaks
This commit is contained in:
Zef Hemel
2024-01-15 16:43:12 +01:00
committed by GitHub
parent a9eb252658
commit a2dbf7b3db
65 changed files with 591 additions and 617 deletions
+1 -6
View File
@@ -16,12 +16,7 @@ Deno.test("Run a plugos endpoint server", async () => {
tempDir,
);
await system.load(
new URL(`file://${workerPath}`),
"test",
0,
createSandbox,
);
await system.load("test", createSandbox(new URL(`file://${workerPath}`)));
const app = new Hono();
const port = 3123;
+1 -1
View File
@@ -70,7 +70,7 @@ export class EventHook implements Hook<EventHookT> {
}
} catch (e: any) {
console.error(
`Error dispatching event ${eventName} to plug ${plug.name}: ${e.message}`,
`Error dispatching event ${eventName} to ${plug.name}.${name}: ${e.message}`,
);
}
})());
+1 -2
View File
@@ -1,6 +1,5 @@
import { Hook, Manifest } from "../types.ts";
import { System } from "../system.ts";
import { fullQueueName } from "../lib/mq_util.ts";
import { MQMessage } from "$sb/types.ts";
import { MessageQueue } from "../lib/mq.ts";
import { throttle } from "$sb/lib/async.ts";
@@ -61,7 +60,7 @@ export class MQHook implements Hook<MQHookT> {
}
const subscriptions = functionDef.mqSubscriptions;
for (const subscriptionDef of subscriptions) {
const queue = fullQueueName(plug.name!, subscriptionDef.queue);
const queue = subscriptionDef.queue;
// console.log("Subscribing to queue", queue);
this.subscriptions.push(
this.mq.subscribe(