feat: harden plugin api for separate repos, signed updates and generic external login

This commit is contained in:
LukeGus committed 2026-09-29 18:11:59 -05:00
1 parent fb9c168b6b
commit 80944301dd
310 files changed
+6577 -4927

No files matched your search

+8 -1
View File
@@ -190,10 +190,17 @@ describe("ctx.db capability", () => {
});
});
it("hands back read-only refs to the core tables a plugin may join", async () => {
it("refuses core refs with only db:own", async () => {
grants.set("demo", ["db:own"]);
const { ctx } = contextFor("demo", ["db:own"]);
await expect(ctx.db.refs()).rejects.toThrow(/db:core-refs/);
});
it("hands back refs to the core tables a plugin may join", async () => {
grants.set("demo", ["db:core-refs"]);
const { ctx } = contextFor("demo", ["db:core-refs"]);
const refs = (await ctx.db.refs()) as Record<string, unknown>;
expect(Object.keys(refs).sort()).toEqual([