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:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user