@prisma/orm-toolchain 8.0.0-rc.18-dev.44 → 8.0.0-rc.18-dev.46
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/cli.mjs +9 -12
- package/dist/cli.mjs.map +1 -1
- package/package.json +12 -12
package/dist/cli.mjs
CHANGED
|
@@ -11611,7 +11611,7 @@ function validatePurity(value, entryPath) {
|
|
|
11611
11611
|
} });
|
|
11612
11612
|
path.add(value);
|
|
11613
11613
|
try {
|
|
11614
|
-
for (const key
|
|
11614
|
+
for (const key of Object.keys(value)) {
|
|
11615
11615
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
11616
11616
|
if (descriptor && (descriptor.get || descriptor.set)) throw contractSourceError("CONTRACT.EXPORT_INVALID", `Contract export contains getter/setter at key "${key}"`, { meta: {
|
|
11617
11617
|
path: entryPath,
|
|
@@ -11629,20 +11629,17 @@ function validatePurity(value, entryPath) {
|
|
|
11629
11629
|
path.delete(value);
|
|
11630
11630
|
}
|
|
11631
11631
|
}
|
|
11632
|
+
check(value);
|
|
11632
11633
|
try {
|
|
11633
|
-
check(value);
|
|
11634
11634
|
JSON.stringify(value);
|
|
11635
11635
|
} catch (error) {
|
|
11636
|
-
if (error instanceof Error) {
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
cause: error
|
|
11644
|
-
});
|
|
11645
|
-
}
|
|
11636
|
+
if (error instanceof Error) throw contractSourceError("CONTRACT.EXPORT_INVALID", `Contract export is not JSON-serializable: ${error.message}`, {
|
|
11637
|
+
meta: {
|
|
11638
|
+
path: entryPath,
|
|
11639
|
+
reason: "not-json-serializable"
|
|
11640
|
+
},
|
|
11641
|
+
cause: error
|
|
11642
|
+
});
|
|
11646
11643
|
throw contractSourceError("CONTRACT.EXPORT_INVALID", "Contract export is not JSON-serializable", { meta: {
|
|
11647
11644
|
path: entryPath,
|
|
11648
11645
|
reason: "not-json-serializable"
|