@supawatch/verify 0.1.2 → 0.1.3
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 +38 -0
- package/package.json +18 -6
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @supawatch/verify
|
|
2
|
+
|
|
3
|
+
The verification harness of
|
|
4
|
+
[supawatch](https://github.com/omar-dulaimi/supawatch). Runs every
|
|
5
|
+
registered target against a real embedded Postgres (PGlite) and compares
|
|
6
|
+
verdicts, not source text.
|
|
7
|
+
|
|
8
|
+
Primarily used by supawatch's own test suite; useful directly when building
|
|
9
|
+
a custom target.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --save-dev @supawatch/verify
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { runHarness } from "@supawatch/verify";
|
|
17
|
+
import { ZodTarget } from "@supawatch/target-zod";
|
|
18
|
+
|
|
19
|
+
const result = await runHarness({
|
|
20
|
+
targets: [{ target: new ZodTarget(), options: { strict: true } }],
|
|
21
|
+
workDir: "/tmp/harness",
|
|
22
|
+
});
|
|
23
|
+
if (result.problems.length > 0) throw new Error(result.problems.join("\n"));
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
What a run checks:
|
|
27
|
+
|
|
28
|
+
- Ground truth: every real row from the fixture must be accepted by every
|
|
29
|
+
target's emitted schema.
|
|
30
|
+
- Negatives: per-column wrong values (wrong kind, null in not-null, extra
|
|
31
|
+
key, wrong array element) must be rejected.
|
|
32
|
+
- Parity: all targets must return the same verdict for every case.
|
|
33
|
+
- The ALLOWED ledger: a named divergence must keep firing; an entry that
|
|
34
|
+
stops firing fails the run, so a fixed gap reports itself.
|
|
35
|
+
- Completeness: every row of core's runtime-type map must be exercised by
|
|
36
|
+
the fixture, enforced, so an unverified mapping cannot ship.
|
|
37
|
+
|
|
38
|
+
MIT.
|
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supawatch/verify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "The supawatch verification harness: ground truth against real rows, cross-target parity, and a must-fire divergence ledger.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"supabase",
|
|
7
|
+
"postgres",
|
|
8
|
+
"postgresql",
|
|
9
|
+
"codegen",
|
|
10
|
+
"schema",
|
|
11
|
+
"typescript",
|
|
12
|
+
"pglite",
|
|
13
|
+
"testing",
|
|
14
|
+
"verification"
|
|
15
|
+
],
|
|
4
16
|
"license": "MIT",
|
|
5
17
|
"author": "Omar Dulaimi",
|
|
6
18
|
"repository": {
|
|
@@ -22,7 +34,7 @@
|
|
|
22
34
|
],
|
|
23
35
|
"dependencies": {
|
|
24
36
|
"@electric-sql/pglite": "^0.3.0",
|
|
25
|
-
"@supawatch/core": "0.1.
|
|
37
|
+
"@supawatch/core": "0.1.3"
|
|
26
38
|
},
|
|
27
39
|
"devDependencies": {
|
|
28
40
|
"@sinclair/typebox": "^0.34.52",
|
|
@@ -31,10 +43,10 @@
|
|
|
31
43
|
"typescript": "^5.9.0",
|
|
32
44
|
"valibot": "^1.1.0",
|
|
33
45
|
"zod": "^4.0.0",
|
|
34
|
-
"@supawatch/target-arktype": "0.1.
|
|
35
|
-
"@supawatch/target-typebox": "0.1.
|
|
36
|
-
"@supawatch/target-valibot": "0.1.
|
|
37
|
-
"@supawatch/target-zod": "0.1.
|
|
46
|
+
"@supawatch/target-arktype": "0.1.3",
|
|
47
|
+
"@supawatch/target-typebox": "0.1.3",
|
|
48
|
+
"@supawatch/target-valibot": "0.1.3",
|
|
49
|
+
"@supawatch/target-zod": "0.1.3"
|
|
38
50
|
},
|
|
39
51
|
"scripts": {
|
|
40
52
|
"build": "tsc -p tsconfig.json"
|