@suss/contract-prisma 0.5.11 → 0.6.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/dist/index.cjs +6 -3
- package/dist/index.js +7 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -143,11 +143,11 @@ function buildModelSummary(opts) {
|
|
|
143
143
|
identity: {
|
|
144
144
|
name: opts.model.name,
|
|
145
145
|
exportPath: null,
|
|
146
|
-
boundaryBinding: (0, import_behavioral_ir.
|
|
146
|
+
boundaryBinding: (0, import_behavioral_ir.storageBinding)({
|
|
147
147
|
recognition: "prisma",
|
|
148
148
|
storageSystem: opts.storageSystem,
|
|
149
149
|
scope: opts.scope,
|
|
150
|
-
|
|
150
|
+
container: opts.model.name
|
|
151
151
|
})
|
|
152
152
|
},
|
|
153
153
|
inputs: [],
|
|
@@ -156,7 +156,10 @@ function buildModelSummary(opts) {
|
|
|
156
156
|
confidence: { source: "declared", level: "high" },
|
|
157
157
|
metadata: {
|
|
158
158
|
storageContract: {
|
|
159
|
-
|
|
159
|
+
// A Prisma model declares every column its table has, so a
|
|
160
|
+
// column the code touches and this list leaves out is unknown.
|
|
161
|
+
fieldSet: "exhaustive",
|
|
162
|
+
fields: columns,
|
|
160
163
|
indexes,
|
|
161
164
|
...physicalTable !== null && physicalTable !== opts.model.name ? { physicalTable } : {}
|
|
162
165
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { getSchema } from "@mrleebo/prisma-ast";
|
|
5
|
-
import {
|
|
5
|
+
import { storageBinding } from "@suss/behavioral-ir";
|
|
6
6
|
var PRISMA_SCALARS = /* @__PURE__ */ new Set([
|
|
7
7
|
"Int",
|
|
8
8
|
"BigInt",
|
|
@@ -108,11 +108,11 @@ function buildModelSummary(opts) {
|
|
|
108
108
|
identity: {
|
|
109
109
|
name: opts.model.name,
|
|
110
110
|
exportPath: null,
|
|
111
|
-
boundaryBinding:
|
|
111
|
+
boundaryBinding: storageBinding({
|
|
112
112
|
recognition: "prisma",
|
|
113
113
|
storageSystem: opts.storageSystem,
|
|
114
114
|
scope: opts.scope,
|
|
115
|
-
|
|
115
|
+
container: opts.model.name
|
|
116
116
|
})
|
|
117
117
|
},
|
|
118
118
|
inputs: [],
|
|
@@ -121,7 +121,10 @@ function buildModelSummary(opts) {
|
|
|
121
121
|
confidence: { source: "declared", level: "high" },
|
|
122
122
|
metadata: {
|
|
123
123
|
storageContract: {
|
|
124
|
-
|
|
124
|
+
// A Prisma model declares every column its table has, so a
|
|
125
|
+
// column the code touches and this list leaves out is unknown.
|
|
126
|
+
fieldSet: "exhaustive",
|
|
127
|
+
fields: columns,
|
|
125
128
|
indexes,
|
|
126
129
|
...physicalTable !== null && physicalTable !== opts.model.name ? { physicalTable } : {}
|
|
127
130
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/contract-prisma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Generate suss behavioral summaries from Prisma schema declarations.",
|
|
6
6
|
"keywords": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@mrleebo/prisma-ast": "^0.15.0",
|
|
50
|
-
"@suss/behavioral-ir": "0.
|
|
50
|
+
"@suss/behavioral-ir": "0.6.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"tsup": "*",
|