cogsbox-shape 0.5.9 → 0.5.11
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/example/schema.d.ts +128 -128
- package/dist/example/user.d.ts +148 -148
- package/dist/schema.d.ts +138 -138
- package/dist/schema.js +3 -1
- package/package.json +1 -1
package/dist/schema.js
CHANGED
|
@@ -210,7 +210,9 @@ export const shape = {
|
|
|
210
210
|
baseJsonSchema: jsonSchema,
|
|
211
211
|
}),
|
|
212
212
|
db: (assert) => {
|
|
213
|
-
const serverType = assert
|
|
213
|
+
const serverType = isFunction(assert)
|
|
214
|
+
? assert({ zod: inferredDbType })
|
|
215
|
+
: assert;
|
|
214
216
|
return {
|
|
215
217
|
sql: sqlConfig,
|
|
216
218
|
dbType: serverType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"description": "A TypeScript library for creating type-safe database schemas with Zod validation, SQL type definitions, and automatic client/server transformations. Unifies client, server, and database types through a single schema definition, with built-in support for relationships and serialization.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|