{"_id":"@absolutejs/audit-postgres","_rev":"11-b8f0fd1fc5f7494a93c8d8a2d49fd91b","name":"@absolutejs/audit-postgres","dist-tags":{"latest":"0.1.4"},"versions":{"0.0.1":{"name":"@absolutejs/audit-postgres","version":"0.0.1","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"97a6f48cfe850c8d3767f1303cf9514d3db41cf3","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.1.tgz","fileCount":6,"integrity":"sha512-FD/vtn33h9t+p/p7MpuC9Mpl4WMG5A8vt7tgLqFrLSRx5J2sYeI/pIWaiykNjNaS15soBuqc+fDQ2OEvddJdZg==","signatures":[{"sig":"MEUCIQCeXqbBoBAOIMoD6EGIKrtD/zPFZEVguR2yDTO8lqsiDQIgU0Z7uCRrgrBGMEPLGjtjXFYHxesPvXl/pKwztsQ6OFI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22787},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"97a6f48cfe850c8d3767f1303cf9514d3db41cf3","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-FD/vtn33h9t+p/p7MpuC9Mpl4WMG5A8vt7tgLqFrLSRx5J2sYeI/pIWaiykNjNaS15soBuqc+fDQ2OEvddJdZg==","repository":{"url":"https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.8.3","description":"Postgres-backed AuditSink for @absolutejs/audit. Accepts any postgres-js-compatible tag template (porsager/postgres OR @neondatabase/serverless). Lazy schema, jsonb metadata, indexed on (at DESC) / kind / actor.","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/audit":"^0.0.1"},"peerDependencies":{"postgres":"^3.0.0","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.1_1780164559901_0.04165133534847976","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@absolutejs/audit-postgres","version":"0.0.2","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.2","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"71bbc628bd61b4062a4c6ddeebb30f5c0cfb270d","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.2.tgz","fileCount":11,"integrity":"sha512-+srU0B+S9nl0aWjcqZApusG7jAMcslDQyKtlW0XmufgohwzE1b991i1++l62gF6EcCVvJ9ab4wtIuDGl3lpeZg==","signatures":[{"sig":"MEUCIC+2l3/AzoiXAmI3lvzwI1zQLLXmZ38kaTJEKBUW2wH3AiEAgW+bWgPOTUChkjzWJV95eo91/pYx4MLHrN1W4XIRX6s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1118261},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"71bbc628bd61b4062a4c6ddeebb30f5c0cfb270d","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-+srU0B+S9nl0aWjcqZApusG7jAMcslDQyKtlW0XmufgohwzE1b991i1++l62gF6EcCVvJ9ab4wtIuDGl3lpeZg==","absolutejs":{"manifestContract":1},"repository":{"url":"https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.8.3","description":"Postgres-backed AuditSink for @absolutejs/audit. Accepts any postgres-js-compatible tag template (porsager/postgres OR @neondatabase/serverless). Lazy schema, jsonb metadata, indexed on (at DESC) / kind / actor.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/audit":"^0.0.1"},"peerDependencies":{"postgres":"^3.0.0","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.2_1783965318833_0.964696091777467","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@absolutejs/audit-postgres","version":"0.0.3","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.3","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"543b10b0da36979d9e90309589a07365e1b986b8","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.3.tgz","fileCount":11,"integrity":"sha512-qND+hITH8CCaOEAFLG2Dp2Vfuqm9NIySq+b2Z6wJigGS/Ajy6uQO02o/bbIGz1LyYHtP8oAJqvUal6/mKjjsow==","signatures":[{"sig":"MEYCIQDKZ6CS/hTLL4AtNQenytDQ77UsyExktMP6NMuNQaY8AwIhAMSNnhXy+nEhE8GCidynMIkZvpY8ZxyXzc44gJ3wSkzJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1118375},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"3e8e465214c7cf1fc192888588c9178789811fbe","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":1},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit. Accepts any postgres-js-compatible tag template (porsager/postgres OR @neondatabase/serverless). Lazy schema, jsonb metadata, indexed on (at DESC) / kind / actor.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/audit":"^0.0.5"},"peerDependencies":{"postgres":"^3.0.0","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.3_1784009828399_0.7086183988898964","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@absolutejs/audit-postgres","version":"0.0.4","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.4","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"5c7d6220052ba4a45337ea5b5174c93ca715ce5d","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.4.tgz","fileCount":13,"integrity":"sha512-1020DOVV3fyIIxZ2uC11I4aTaa4cjY8b7NmqwyjqMeRaOCcqVP6H/2godtvfqzMhrf3bH76Ci94a3ag4iZ5y/Q==","signatures":[{"sig":"MEQCIEzOCywUCJ49wYBiUr9yRRfO40ZcJVqmm9pIHTsXyjhVAiBuKfJY3BiFmuZpXlfjXj8Sdc1tzWnXS7Hnbr3qgVWsmQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1140999},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"ca170846f5a9ac82da18ed594bfd7fb585ea83c9","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":1},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"drizzle-orm":"1.0.0-rc.4","@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/audit":"^0.0.5","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"postgres":"^3.0.0","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.4_1784788234353_0.6353826666467812","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@absolutejs/audit-postgres","version":"0.0.5","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.5","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"24f1eb16810199485008d5ceecf984c781193caf","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.5.tgz","fileCount":13,"integrity":"sha512-mHioNqcec5Z9Z+ws7EnWxILBb54N0npB0H0vy/GQioJVxbb1mUR3pPyH7d9g/vdXKdAC9oYJxs112UwpAP6x7w==","signatures":[{"sig":"MEYCIQCc6KbgAg+z879D3ao/X7HPbs3FF7qQ4gR9HrefE93ynQIhAOsaymKm6ltO8RHIfxGtzb499qDPTWbVJ26vMo0CgfTa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1141859},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"268e5a365ffd22eef62df0b349a981eaabd24523","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":1},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"drizzle-orm":"1.0.0-rc.4","@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/audit":"^0.0.5","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"postgres":"^3.0.0","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.5_1784788677843_0.038374102791806086","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@absolutejs/audit-postgres","version":"0.0.6","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.0.6","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"00c469724e2add1cc7cc6a716a41950b8172a16c","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.0.6.tgz","fileCount":13,"integrity":"sha512-BxjTL2bcdje5cxLR3IFcgE/RfskCAVyhVT1S7+vtYJU5TN4UN+QeJXPBUeiV0qpn4AgkvEAMsjKgo0p/EgctpQ==","signatures":[{"sig":"MEYCIQCWpYTYAJLCym46SvmUWhe31QIfajSV4rHssZQBmSSvHwIhAJMEAIXQoTy3KKqUmlfO22H+hhpYSTr1SOuyuKxmHEZM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1141897},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"268e5a365ffd22eef62df0b349a981eaabd24523","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":1},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"^3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@absolutejs/audit":"^0.0.5","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"postgres":"^3.0.0","drizzle-orm":">=1.0.0-rc.4 <2","@absolutejs/audit":">= 0.0.1","@neondatabase/serverless":">= 0.10.0"},"peerDependenciesMeta":{"postgres":{"optional":true},"@neondatabase/serverless":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.0.6_1784795935726_0.9298396220326017","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@absolutejs/audit-postgres","version":"0.1.0","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"d363e8f1e14d10bb8cd3f95278155d2b562f08eb","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.1.0.tgz","fileCount":13,"integrity":"sha512-6LS/wepZ4xWFH04otGxKTSN92SjdnhYAslCIXpkNMWbQCBjOUIw3a8mI4kRB+llwGwWyt+933DQ++4Ub+jWkxQ==","signatures":[{"sig":"MEYCIQDInRhWISt8j3ndmBmp1gv5tURz/amB2wmgR+yWEfD5vAIhANsEbLlU+D/E0P3f1bUUO2xoi0OTEwZGcLHU/70uLh9f","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":504723},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"d363e8f1e14d10bb8cd3f95278155d2b562f08eb","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-6LS/wepZ4xWFH04otGxKTSN92SjdnhYAslCIXpkNMWbQCBjOUIw3a8mI4kRB+llwGwWyt+933DQ++4Ub+jWkxQ==","absolutejs":{"runtimePeers":{"drizzle-orm":{"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4","buildExternals":["drizzle-orm"],"artifactImports":["drizzle-orm","drizzle-orm/pg-core"]},"@absolutejs/audit":{"range":">=0.2.1 <0.3.0","tested":"0.2.1","buildExternals":["@absolutejs/audit"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.8.3","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@absolutejs/audit":"0.2.1","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2","@absolutejs/audit":">=0.2.1 <0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.1.0_1784914976884_0.9320351562634148","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@absolutejs/audit-postgres","version":"0.1.1","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.1.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"d654c1dc3bf6b9ccdf2d47c31886b758dd492e22","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.1.1.tgz","fileCount":13,"integrity":"sha512-pjf0ipoz2qFEDCh6btnS7/9O9QC3Vx+fNBwR/T6DdQyAzCgaS6zNaONQLUpvdQNYR3+QXGCQsABZCPrEkSvVwg==","signatures":[{"sig":"MEUCIHXYnT8WkQv//dpLS+pBNXLgbrrsj2+f8RDdXLtm04x5AiEAgqjeYVe3qTgF7yyiS+eIKzeor1PiHxzJ6Ae7Q77XYSA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":505637},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"45ff7db566b6b521b02230e94bcebb830ef36258","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run verify-package && bun run build && bun run verify-package --artifacts && bun run test","verify-package":"absolute-manifest verify-package"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"drizzle-orm":{"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4","buildExternals":["drizzle-orm"],"artifactImports":["drizzle-orm","drizzle-orm/pg-core"]},"@absolutejs/audit":{"range":">=0.2.1 <0.3.0","tested":"0.2.2","buildExternals":["@absolutejs/audit"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@absolutejs/audit":"0.2.2","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2","@absolutejs/audit":">=0.2.1 <0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.1.1_1784962369362_0.6661464944379578","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@absolutejs/audit-postgres","version":"0.1.2","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.1.2","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"3ea8c6e6d8e02f7ff46e54c2dd7ec83518f8732f","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.1.2.tgz","fileCount":15,"integrity":"sha512-4HRtpR0xjxY5Yb8iNn3L/t2+CW2nnlhsQAG/fLwCjs1JI5+NFjDGwx7uyY5UcLPPPQG/YUoeIilMm/FLpVI+IQ==","signatures":[{"sig":"MEUCIQDNOW1bar4uITFZU3gdgeQ7RYLVMrdUels9rydGILvTDwIgeGDTPALTUNqYbACm4YJjDK9O8wK3COxr0jIeRYNbV8g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":510628},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"b2b152c4028d8311ce053758782a7b137e83a078","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run verify-package && bun run build && bun run verify-package --artifacts && bun run test","verify-package":"absolute-manifest verify-package"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"drizzle-orm":{"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4","buildExternals":["drizzle-orm"],"artifactImports":["drizzle-orm","drizzle-orm/pg-core"]},"@absolutejs/audit":{"range":">=0.2.1 <0.3.0","tested":"0.2.2","buildExternals":["@absolutejs/audit"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@absolutejs/audit":"0.2.2","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2","@absolutejs/audit":">=0.2.1 <0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.1.2_1785278935254_0.4720521993570912","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@absolutejs/audit-postgres","version":"0.1.3","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/audit-postgres@0.1.3","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"dist":{"shasum":"ba8d93735008a105426c34071264589d213e1721","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.1.3.tgz","fileCount":15,"integrity":"sha512-kwTl7DQFQiOoBLGTVLd0Oj14ivoau8cIx9RNQ99TxkCST7HNiY2z6SkpZsGgjQgKpMkKEUZaQSIS78n4Ck1NRg==","signatures":[{"sig":"MEYCIQCe2awGEoiad+CwmwbL/rOKNTOo+6XUW4R6wcobsSGYTAIhANzZFF/Q4FMx0XqACuj5fAjOeAJk5igBnlWTKdOrs6xJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":523198},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"fa453ce16049c39d4e431b1bbb8e318f3c168bf7","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run check:package && bun publish","typecheck":"tsc --noEmit","check:package":"bun run typecheck && bun run verify-package && bun run build && bun run verify-package --artifacts && bun run test","verify-package":"absolute-manifest verify-package"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"drizzle-orm":{"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4","buildExternals":["drizzle-orm"],"artifactImports":["drizzle-orm","drizzle-orm/pg-core"]},"@absolutejs/audit":{"range":">=0.2.1 <0.3.0","tested":"0.2.2","buildExternals":["@absolutejs/audit"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/audit-adapters.git","type":"git","directory":"postgres"},"_npmVersion":"10.9.2","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"postgres":"3.4.9","prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@absolutejs/audit":"0.2.2","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2","@absolutejs/audit":">=0.2.1 <0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/audit-postgres_0.1.3_1785279526102_0.284884881812151","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@absolutejs/audit-postgres","version":"0.1.4","description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","repository":{"type":"git","url":"git+https://github.com/absolutejs/audit-adapters.git","directory":"postgres"},"homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","license":"Apache-2.0","author":"Alex Kahn","absolutejs":{"manifestContract":2,"runtimePeers":{"@absolutejs/audit":{"artifactImports":[],"buildExternals":["@absolutejs/audit"],"range":">=0.2.1 <0.3.0","tested":"0.2.2"},"drizzle-orm":{"artifactImports":["drizzle-orm","drizzle-orm/pg-core"],"buildExternals":["drizzle-orm"],"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4"}}},"publishConfig":{"access":"public"},"keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"scripts":{"build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/audit --external drizzle-orm --external 'drizzle-orm/*' --external postgres --external @neondatabase/serverless && tsc --project tsconfig.build.json && absolute-manifest emit","test":"bun test","typecheck":"tsc --noEmit","format":"prettier --write \"./**/*.{ts,json,md}\"","verify-package":"absolute-manifest verify-package","check:package":"bun run typecheck && bun run verify-package && bun run build && bun run verify-package --artifacts && bun run test","release":"bun run format && bun run check:package && bun publish"},"peerDependencies":{"@absolutejs/audit":">=0.2.1 <0.3.0","drizzle-orm":">=1.0.0-rc.4 <2"},"devDependencies":{"@absolutejs/audit":"0.2.2","@electric-sql/pglite":"0.3.14","@types/bun":"1.3.14","postgres":"3.4.9","prettier":"3.5.3","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"dependencies":{"@absolutejs/manifest":"^0.7.2","@sinclair/typebox":"^0.34.0"},"_id":"@absolutejs/audit-postgres@0.1.4","_integrity":"sha512-e7hZ9ghkUzuadzyjARSDcXyCUFc4XR28vjgvqvCXyYXCGjffLJ+S27UmEFplYftDQGLqzC/2L1Oy3q3ZFTsMAg==","_nodeVersion":"24.3.0","_npmVersion":"10.8.3","shasum":"94aabaa1be716e30dc5ae559c52cf6f3bd800e0e","dist":{"integrity":"sha512-e7hZ9ghkUzuadzyjARSDcXyCUFc4XR28vjgvqvCXyYXCGjffLJ+S27UmEFplYftDQGLqzC/2L1Oy3q3ZFTsMAg==","shasum":"94aabaa1be716e30dc5ae559c52cf6f3bd800e0e","tarball":"https://registry.npmjs.org/@absolutejs/audit-postgres/-/audit-postgres-0.1.4.tgz","fileCount":15,"unpackedSize":530688,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDrdQtub1G3Vv9T8U9auLOxYz5wT5yMWO7WpwfAeqHmcgIhAKtdJwbFzQ229SYSsUxo/Imf5JZecUbWEBrCGphVoxuU"}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/audit-postgres_0.1.4_1785283904195_0.7739012122728388"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-30T18:09:19.693Z","modified":"2026-07-29T00:11:44.493Z","0.0.1":"2026-05-30T18:09:20.037Z","0.0.2":"2026-07-13T17:55:18.981Z","0.0.3":"2026-07-14T06:17:08.561Z","0.0.4":"2026-07-23T06:30:34.533Z","0.0.5":"2026-07-23T06:37:58.001Z","0.0.6":"2026-07-23T08:38:55.876Z","0.1.0":"2026-07-24T17:42:57.015Z","0.1.1":"2026-07-25T06:52:49.511Z","0.1.2":"2026-07-28T22:48:55.395Z","0.1.3":"2026-07-28T22:58:46.240Z","0.1.4":"2026-07-29T00:11:44.334Z"},"bugs":{"url":"https://github.com/absolutejs/audit-adapters/issues"},"author":"Alex Kahn","license":"Apache-2.0","homepage":"https://github.com/absolutejs/audit-adapters/tree/main/postgres","keywords":["audit","postgres","neon","absolutejs","audit-log","compliance","siem"],"repository":{"type":"git","url":"git+https://github.com/absolutejs/audit-adapters.git","directory":"postgres"},"description":"Postgres-backed AuditSink for @absolutejs/audit with first-class Drizzle and tagged-template adapters, native JSONB metadata, and indexed history.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/audit-postgres\n\nPostgres-backed `AuditSink` for [@absolutejs/audit](https://github.com/absolutejs/audit)\nwith first-class Drizzle and tagged-template adapters.\n\nDurable, queryable, and uses the same `metadata.__integrity` field for\ntamper-evidence as the in-memory sink — jsonb preserves the chain through\nthe round-trip.\n\n## Install\n\n```sh\nbun add @absolutejs/audit @absolutejs/audit-postgres\nbun add postgres        # OR\nbun add @neondatabase/serverless\n```\n\n`postgres` and `@neondatabase/serverless` are **optional peer deps** — bring\nwhichever one you already have. Both implement the tagged-template SQL shape\nthe adapter accepts.\n\n## Usage\n\n### Drizzle\n\nRe-export the package-owned table from your application schema so your normal\nDrizzle migration workflow owns its lifecycle:\n\n```ts\nexport { auditEvents } from \"@absolutejs/audit-postgres\";\n```\n\nThen pass any Drizzle Postgres database:\n\n```ts\nimport { createAudit, withIntegrity } from \"@absolutejs/audit\";\nimport { createDrizzleAuditSink } from \"@absolutejs/audit-postgres\";\n\nconst audit = createAudit({\n  sinks: [\n    withIntegrity(createDrizzleAuditSink({ db }), {\n      secret: process.env.AUDIT_SECRET,\n      writerId: \"shard-A\",\n    }),\n  ],\n});\n```\n\nWhen the Drizzle database uses Bun SQL, opt into the Bun-native JSONB mapping\nand sink so object and array parameters are not pre-stringified:\n\n```ts\nexport { auditEventsBunSql as auditEvents } from \"@absolutejs/audit-postgres\";\n\nimport { createBunSqlDrizzleAuditSink } from \"@absolutejs/audit-postgres\";\n\nconst sink = createBunSqlDrizzleAuditSink({ db });\n```\n\n`auditBunSqlDrizzleSchema` provides the same mapping as a schema object. The\ndefault `auditEvents`, `auditDrizzleSchema`, and `createDrizzleAuditSink`\nexports retain their existing postgres.js-compatible codec. Select the mapping\nfrom the configured database driver rather than the JavaScript runtime:\npostgres.js can itself run under Bun.\n\nThe Drizzle adapter deliberately never runs DDL at application runtime. It\nexports `auditEvents` and `auditDrizzleSchema`, uses native typed JSONB, and\nimplements the same recent-window, actor, kind, time-range, and prune behavior\nas the tagged-template adapter.\n\nIf your application intentionally keeps package-owned tables out of its\nDrizzle schema, apply this adapter's migration through your existing\nPostgreSQL client instead:\n\n```ts\nimport { runAuditPostgresMigrations } from \"@absolutejs/audit-postgres\";\n\nawait runAuditPostgresMigrations({\n  client: {\n    query: (text) => sql.unsafe(text),\n  },\n});\n```\n\nThe runner uses an atomic, digest-checked `0001_init` migration for each\nvalidated table name and records it in `audit_postgres_migrations`. Concurrent\nrunners serialize with a transaction-scoped advisory lock. Existing tables\ncreated through the lazy adapter are safely adopted by the first runner.\nChanging an applied migration's SQL fails closed. The runner never creates or\ncloses the injected client. `getAuditPostgresSchemaSql({ table? })` exposes the\nsame deterministic, validated SQL for migration systems that apply SQL\nthemselves, while `auditPostgresMigrationPlan({ table? })` exposes the numbered\nID, SQL, and SHA-256 digest.\n\n### postgres.js\n\n```ts\nimport postgres from \"postgres\";\nimport { createAudit, withIntegrity } from \"@absolutejs/audit\";\nimport { createPostgresAuditSink } from \"@absolutejs/audit-postgres\";\n\nconst sql = postgres(process.env.DATABASE_URL!);\n\nconst audit = createAudit({\n  sinks: [\n    withIntegrity(createPostgresAuditSink({ sql }), {\n      secret: process.env.AUDIT_SECRET,\n      writerId: \"shard-A\",\n    }),\n  ],\n});\n\nawait audit.append({\n  kind: \"billing.invoice.created\",\n  actor: \"system\",\n  target: invoice.id,\n  metadata: { amountCents: invoice.amountCents },\n});\n```\n\n### Neon serverless (Lambda / Workers)\n\n```ts\nimport { neon } from \"@neondatabase/serverless\";\nimport { createPostgresAuditSink } from \"@absolutejs/audit-postgres\";\n\nconst sql = neon(process.env.NEON_URL!);\nconst sink = createPostgresAuditSink({ sql });\n```\n\nSame adapter; the only difference is the SQL tag template.\n\n## Schema\n\nThe adapter creates this lazily on first `append` / `list` / `prune`:\n\n```sql\nCREATE TABLE IF NOT EXISTS audit_events (\n  id        bigserial PRIMARY KEY,\n  at        bigint    NOT NULL,\n  kind      text      NOT NULL,\n  actor     text,\n  target    text,\n  metadata  jsonb\n);\nCREATE INDEX IF NOT EXISTS audit_events_at_idx       ON audit_events (at DESC);\nCREATE INDEX IF NOT EXISTS audit_events_kind_idx     ON audit_events (kind);\nCREATE INDEX IF NOT EXISTS audit_events_actor_idx    ON audit_events (actor) WHERE actor IS NOT NULL;\n```\n\n- `metadata` is `jsonb` — the `__integrity` chain field rides here untouched\n  by the round-trip.\n- All three indexes are partial-or-full to cover the common filter paths\n  (recent-first lists; per-kind filters; per-actor lookups).\n- The table name is customizable via the `table` option (strictly validated\n  against `/^[a-zA-Z_][a-zA-Z0-9_]*$/` and limited to 53 characters to defend\n  against injection and PostgreSQL index-name truncation — the identifier has\n  to be interpolated into the DDL, not parameterized).\n- Pass `ensureSchema: false` if you manage migrations yourself.\n\n## API\n\n```ts\nconst auditEvents: PgTable;\nconst auditEventsBunSql: PgTable;\nconst auditDrizzleSchema: { auditEvents: typeof auditEvents };\nconst auditBunSqlDrizzleSchema: {\n  auditEvents: typeof auditEventsBunSql;\n};\nconst createDrizzleAuditSink: ({ db }) => AuditSink;\nconst createBunSqlDrizzleAuditSink: ({ db }) => AuditSink;\nconst getAuditPostgresSchemaSql: ({ table? }) => string;\nconst auditPostgresMigrationPlan: ({ table? }) => Array<{\n  id: string;\n  sql: string;\n  digest: string;\n}>;\nconst runAuditPostgresMigrations: ({ client, table? }) => Promise<void>;\n\ntype CreatePostgresAuditSinkOptions = {\n  sql: PostgresTag; // postgres-js or @neondatabase/serverless\n  table?: string; // default 'audit_events'\n  ensureSchema?: boolean; // default true\n};\n\nconst createPostgresAuditSink: (options) => AuditSink;\n```\n\nReturns a standard `AuditSink` implementing `append`, `list` (with `kind` /\n`actor` / `since` / `until` / `limit` filters), and `prune(before)`.\n\n## Behavior notes\n\n- **Lazy schema.** First call to any method runs the DDL once; subsequent\n  calls skip.\n- **Portable row counts.** `prune` uses `RETURNING id` and counts the returned\n  array, so it works the same on postgres-js (which exposes `.count`) and\n  Neon serverless (which doesn't expose row count the same way).\n- **`bigint` `at` column.** Wall-clock `Date.now()` won't exceed\n  `Number.MAX_SAFE_INTEGER` for centuries; the row is normalized back to a\n  JS `number` on read regardless of driver configuration.\n- **`metadata` jsonb-as-string fallback.** Some driver setups return jsonb as\n  a string; the sink parses on read so callers never see a `string`.\n\n## Test setup\n\nThe Drizzle adapter's PGlite suite is self-contained:\n\n```sh\nbun test tests/drizzleAuditSink.test.ts\n```\n\nThe tagged-template compatibility suite uses a real Postgres service:\n\n```sh\ndocker run -d --name pg -p 54330:5432 -e POSTGRES_PASSWORD=postgres postgres:16\ndocker exec pg psql -U postgres -c 'CREATE DATABASE audit_postgres_tests'\nbun test\n```\n\nOverride the DSN via `AUDIT_PG_TEST_URL` to point at your own Postgres.\n\n## License\n\n[Apache 2.0](../LICENSE). Substrate-adjacent: this adapter only has value\nriding `@absolutejs/audit` (which is BSL Tier A). Per the AbsoluteJS\nlicensing policy, adapters that only ride a Tier A host stay\npermissive — see [the policy](https://github.com/absolutejs/...) for the\nfull reasoning.\n","readmeFilename":"README.md"}