@suss/contract-prisma 0.23.0 → 0.24.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 +8 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @suss/contract-prisma
|
|
2
2
|
|
|
3
|
+
Part of [suss](https://github.com/nimbuscloud-ai/suss), which reads both sides of every call in a repository and says where the two disagree.
|
|
4
|
+
|
|
3
5
|
Generate suss `BehavioralSummary[]` from a [Prisma](https://www.prisma.io/) schema. A `schema.prisma` file declares every table an application has and every column on it, which is the contract the code reads and writes against. This reader turns that declaration into storage boundaries, so a query touching a column nobody declared becomes a finding.
|
|
4
6
|
|
|
5
7
|
## What this package reads
|
|
@@ -78,6 +80,12 @@ const summaries = prismaSchemaFileToSummaries("prisma/schema.prisma", {
|
|
|
78
80
|
|
|
79
81
|
Depends only on `@suss/behavioral-ir` (for the IR types it produces) and `@mrleebo/prisma-ast` (for parsing). It does not extract from source code and is independent of the language adapters. The Prisma pattern pack is what finds the query call sites this contract pairs against.
|
|
80
82
|
|
|
83
|
+
## More
|
|
84
|
+
|
|
85
|
+
- [Documentation](https://nimbuscloud-ai.github.io/suss/)
|
|
86
|
+
- [Every package and pack suss ships](https://nimbuscloud-ai.github.io/suss/reference/packages)
|
|
87
|
+
- [Source and issues](https://github.com/nimbuscloud-ai/suss)
|
|
88
|
+
|
|
81
89
|
## Coverage
|
|
82
90
|
|
|
83
91
|

|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/contract-prisma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Turn a Prisma schema into a suss contract and check it against the queries your code runs on those tables.",
|
|
6
6
|
"keywords": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@mrleebo/prisma-ast": "^0.15.0",
|
|
51
|
-
"@suss/behavioral-ir": "0.
|
|
51
|
+
"@suss/behavioral-ir": "0.24.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"tsup": "*",
|