cogsbox-shape 0.5.12 → 0.5.13
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 +4 -3
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -1426,9 +1426,10 @@ export declare function createSchema<T extends Schema<any>>(schema: T): {
|
|
|
1426
1426
|
__schemaId: string;
|
|
1427
1427
|
};
|
|
1428
1428
|
};
|
|
1429
|
-
type
|
|
1430
|
-
[K in keyof (
|
|
1431
|
-
};
|
|
1429
|
+
type DeepConversionType<ClientType, DbType> = ClientType extends Array<infer ClientItem> ? DbType extends Array<infer DbItem> ? Array<DeepConversionType<ClientItem, DbItem>> : ClientType | DbType : ClientType extends object ? DbType extends object ? {
|
|
1430
|
+
[K in keyof (ClientType & DbType)]: DeepConversionType<K extends keyof ClientType ? ClientType[K] : never, K extends keyof DbType ? DbType[K] : never>;
|
|
1431
|
+
} : ClientType | DbType : ClientType | DbType;
|
|
1432
|
+
type ConversionType<T extends Schema<any>> = DeepConversionType<SchemaTypes<T>["client"], SchemaTypes<T>["db"]>;
|
|
1432
1433
|
type OmitNever<T> = {
|
|
1433
1434
|
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
|
1434
1435
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
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",
|