cogsbox-shape 0.5.180 → 0.5.182
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/schema.d.ts +5 -1
- package/dist/schema.js +1 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -525,7 +525,11 @@ type DeriveSchemaByKey<T, Key extends "zodSqlSchema" | "zodClientInputSchema" |
|
|
|
525
525
|
type: "hasMany" | "manyToMany" | "hasOne" | "belongsTo";
|
|
526
526
|
};
|
|
527
527
|
};
|
|
528
|
-
} ? never :
|
|
528
|
+
} ? never : T[K] extends {
|
|
529
|
+
config: {
|
|
530
|
+
sql: null;
|
|
531
|
+
};
|
|
532
|
+
} ? Key extends "zodSqlSchema" ? never : K : Key extends "zodSqlSchema" ? GetDbKey<K, T[K]> : K : never]: T[K] extends Reference<infer TGetter> ? ReturnType<TGetter> extends {
|
|
529
533
|
config: {
|
|
530
534
|
[P in Key]: infer ZodSchema extends z.ZodTypeAny;
|
|
531
535
|
};
|
package/dist/schema.js
CHANGED
|
@@ -298,7 +298,7 @@ function createBuilder(config) {
|
|
|
298
298
|
const serverSchema = isFunction(assert)
|
|
299
299
|
? assert({
|
|
300
300
|
sql: config.sqlZod,
|
|
301
|
-
clientInput: config.clientZod,
|
|
301
|
+
clientInput: config.clientInputZod || config.clientZod,
|
|
302
302
|
client: config.clientZod,
|
|
303
303
|
})
|
|
304
304
|
: assert;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.182",
|
|
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",
|