feat: add native module realtime transport
CI / verify (pull_request) Successful in 37s
CI / infrastructure-smoke (pull_request) Successful in 13s
CI / migration-smoke (pull_request) Successful in 1m7s

This commit is contained in:
ekklesia
2026-08-23 18:47:18 -05:00
parent fcc531a39c
commit fc6c8045c4
53 changed files with 3959 additions and 108 deletions
+5
View File
@@ -51,6 +51,9 @@ async function registerAndCaptureRoutes(): Promise<{
},
},
moduleId: "example",
// The template deliberately declares no realtime channel, proving modules opt in rather than
// receiving a mandatory feature-specific scaffold.
realtime: { channel: () => undefined },
});
return { provided, routes };
}
@@ -138,6 +141,7 @@ describe("module template", () => {
moduleId: "example",
params: Object.freeze({}),
principal: ANONYMOUS_PRINCIPAL,
realtime: { publish: () => undefined },
services,
// The template declares no logical bucket, so it receives storage that refuses every one —
// present rather than `undefined`, so module code never branches on whether the host has it.
@@ -182,6 +186,7 @@ describe("module template", () => {
moduleId: "example",
params: Object.freeze({}),
principal: ANONYMOUS_PRINCIPAL,
realtime: { publish: () => undefined },
services: Object.freeze({ database: fakeModuleDatabase(fakeRows) }),
storage: EMPTY_MODULE_STORAGE,
});
+1
View File
@@ -51,6 +51,7 @@ function recordingHost(options: {
api,
principal: { kind: "anonymous" },
permissions: { has: () => options.canRead },
realtime: { subscribe: () => ({ close: () => undefined }) },
};
}