feat: move snippets backend and tables into a plugin (B2)

This commit is contained in:
LukeGus committed 2026-09-23 08:58:53 -05:00
1 parent fdedca39fd
commit e07221eaf3
51 files changed
+28426 -3553

No files matched your search

+8 -1
View File
@@ -60,6 +60,8 @@ vi.mock("../../utils/database-save-trigger.js", () => ({
vi.mock("../../database/db/schema.js", () => ({
users: { marker: "users" },
hosts: { marker: "hosts" },
roles: { marker: "roles" },
userRoles: { marker: "userRoles" },
}));
import { createPluginContext, createPluginHandle } from "../../plugins/ctx.js";
@@ -195,7 +197,12 @@ describe("ctx.db capability", () => {
const refs = (await ctx.db.refs()) as Record<string, unknown>;
expect(Object.keys(refs).sort()).toEqual(["hosts", "users"]);
expect(Object.keys(refs).sort()).toEqual([
"hosts",
"roles",
"userRoles",
"users",
]);
});
});