@absolutejs/vulnerabilities-postgres 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -4
- package/dist/coreDrizzle.d.ts +3230 -0
- package/dist/drizzle.d.ts +1561 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1303 -145
- package/dist/manifest.js +40 -0
- package/dist/manifest.json +42 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -15,14 +15,35 @@ const alertPolicies = persistence.alertPolicies;
|
|
|
15
15
|
const alertIncidents = persistence.alertIncidents;
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
Applications already using Drizzle can keep the complete vulnerability
|
|
19
|
+
lifecycle schema-derived:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
createDrizzleVulnerabilityStore,
|
|
24
|
+
vulnerabilityCoreDrizzleSchema,
|
|
25
|
+
} from "@absolutejs/vulnerabilities-postgres";
|
|
26
|
+
import { drizzle } from "drizzle-orm/bun-sql";
|
|
27
|
+
|
|
28
|
+
export const schema = {
|
|
29
|
+
...vulnerabilityCoreDrizzleSchema,
|
|
30
|
+
// ...the rest of your application's tables
|
|
31
|
+
};
|
|
32
|
+
const db = drizzle({ client: sql });
|
|
33
|
+
const persistence = createDrizzleVulnerabilityStore(db);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The Drizzle store targets the standard `vulnerability_*` tables. Custom table
|
|
37
|
+
prefixes and runtime schema bootstrap remain available through
|
|
38
|
+
`createPostgresVulnerabilityStore`.
|
|
39
|
+
|
|
18
40
|
The package stores complete provider snapshots and records, appendable sync
|
|
19
41
|
history, tenant-scoped managed findings, correlation observations, VEX decisions
|
|
20
42
|
and applications, remediation plans and evidence, risk assessments, immutable
|
|
21
43
|
alert-policy versions, incident timelines, and leased notification deliveries.
|
|
22
|
-
Snapshot replacement is
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
own the tables.
|
|
44
|
+
Snapshot replacement is one transaction, so readers never see a half-replaced
|
|
45
|
+
record set. Schema creation is lazy and idempotent for the tagged-template
|
|
46
|
+
adapter; Drizzle applications import the package tables and manage migrations.
|
|
26
47
|
|
|
27
48
|
The SQL surface is compatible with postgres.js and Neon-style tagged-template
|
|
28
49
|
clients. Table prefixes are strictly validated before identifiers are included
|