feat: add direct PostgreSQL and ACK deployment support

This commit is contained in:
2026-08-12 19:12:00 +08:00
parent d0192081c7
commit c44274f098
55 changed files with 3317 additions and 1064 deletions

View File

@@ -0,0 +1,14 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
describe("PostgreSQL application-role privilege contract", () => {
it("uses explicit current-object grants and no blanket future-object grants", async () => {
const source = await readFile(new URL("../scripts/migrate-postgres.mjs", import.meta.url), "utf8");
expect(source).toContain('["billing_wallets", "SELECT, INSERT, UPDATE"]');
expect(source).toContain('["billing_ledger", "SELECT, INSERT"]');
expect(source).toContain("applicationRoleTablePrivileges().map");
expect(source).toContain("REVOKE ALL ON TABLE");
expect(source).not.toContain("ALTER DEFAULT PRIVILEGES");
expect(source).not.toContain("ALL FUNCTIONS IN SCHEMA");
});
});