cogsbox-shape 0.5.133 → 0.5.134
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 +2 -9
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -288,15 +288,8 @@ type _DeriveViewShape<TTableName extends keyof TRegistry, TSelection, TRegistry
|
|
|
288
288
|
1
|
|
289
289
|
]>>> : never : never : never;
|
|
290
290
|
}> : OmitRelationFields<BaseShape, TRegistry[TTableName]["rawSchema"]> : never;
|
|
291
|
-
type
|
|
292
|
-
|
|
293
|
-
[K in keyof TRegistry[TTableName]["rawSchema"] as K extends "_tableName" ? never : K]: TRegistry[TTableName]["rawSchema"][K] extends {
|
|
294
|
-
config: {
|
|
295
|
-
sql: infer TSql extends SQLType;
|
|
296
|
-
};
|
|
297
|
-
} ? TSql["nullable"] extends true ? SQLTypeToTS<TSql> | null : SQLTypeToTS<TSql> : never;
|
|
298
|
-
} & (TSelection extends Record<string, any> ? {
|
|
299
|
-
[K in keyof TSelection & keyof TRegistry[TTableName]["rawSchema"]]?: TRegistry[TTableName]["rawSchema"][K] extends {
|
|
291
|
+
type DeriveViewDefaults<TTableName extends keyof TRegistry, TSelection, TRegistry extends RegistryShape, Depth extends any[] = []> = Prettify<TRegistry[TTableName]["zodSchemas"]["defaultValues"] & (TSelection extends Record<string, any> ? {
|
|
292
|
+
-readonly [K in keyof TSelection & keyof TRegistry[TTableName]["rawSchema"]]?: TRegistry[TTableName]["rawSchema"][K] extends {
|
|
300
293
|
config: {
|
|
301
294
|
sql: {
|
|
302
295
|
type: infer RelType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.134",
|
|
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",
|