@riddledc/riddle-proof 0.7.126 → 0.7.128
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 +26 -2
- package/dist/{chunk-55KDZEB3.js → chunk-TO3FVF5S.js} +502 -4
- package/dist/cli.cjs +520 -5
- package/dist/cli.js +19 -2
- package/dist/index.cjs +502 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/profile.cjs +502 -4
- package/dist/profile.d.cts +32 -1
- package/dist/profile.d.ts +32 -1
- package/dist/profile.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -592,13 +592,37 @@ JSON, YAML, robots, sitemap, or other machine-readable endpoint:
|
|
|
592
592
|
}
|
|
593
593
|
```
|
|
594
594
|
|
|
595
|
+
For JSON responses, prefer `body_json_assertions` when the durable contract is
|
|
596
|
+
a field value rather than a raw substring:
|
|
597
|
+
|
|
598
|
+
```json
|
|
599
|
+
{
|
|
600
|
+
"type": "http_status",
|
|
601
|
+
"label": "proof artifact",
|
|
602
|
+
"url": "/proof/good-catches/artifacts/job_1234/proof.json.json",
|
|
603
|
+
"expected_status": 200,
|
|
604
|
+
"allowed_content_types": ["application/json"],
|
|
605
|
+
"body_json_assertions": [
|
|
606
|
+
{ "path": "status", "equals": "passed" },
|
|
607
|
+
{ "path": "checks[0].status", "equals": "passed" },
|
|
608
|
+
{ "path": "environment_blocker", "exists": false }
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
JSON paths support dot keys and array indexes such as `checks[0].status`, with
|
|
614
|
+
`$` as the root. Each assertion supports `exists`, `equals`, `not_equals`,
|
|
615
|
+
`contains`, and `type`. Scalar observations are recorded inline; arrays and
|
|
616
|
+
objects are summarized with length or key counts plus a small sample so large
|
|
617
|
+
proof artifacts do not get duplicated into the assertion evidence.
|
|
618
|
+
|
|
595
619
|
`body_contains`, `body_patterns`, `body_not_contains`, and
|
|
596
620
|
`body_not_patterns` match the raw HTTP response body, not rendered browser
|
|
597
621
|
text. Use `text_visible` or `selector_text_visible` when CSS transforms,
|
|
598
622
|
hydration, client rendering, hidden elements, or layout-specific copy should be
|
|
599
623
|
judged exactly as the browser exposes it to users.
|
|
600
|
-
Hosted `summary.md` includes `http_status` body assertion pass counts
|
|
601
|
-
reviewer can see raw
|
|
624
|
+
Hosted `summary.md` includes `http_status` body and JSON assertion pass counts
|
|
625
|
+
so a reviewer can see raw response proof coverage without opening `proof.json`.
|
|
602
626
|
|
|
603
627
|
When the profile target is a mounted Riddle static Preview such as
|
|
604
628
|
`https://preview.riddledc.com/s/ps_1234abcd/docs/`, root-relative
|