cogsbox-shape 0.5.168 → 0.5.169

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.
Files changed (2) hide show
  1. package/dist/schema.js +7 -1
  2. package/package.json +1 -1
package/dist/schema.js CHANGED
@@ -502,7 +502,13 @@ export function createSchema(schema, relations) {
502
502
  }
503
503
  if (definition && definition.config) {
504
504
  const config = definition.config;
505
- // ... pk collection logic ...
505
+ // PK collection logic
506
+ if (config.sql?.pk && !config.sql?.isForeignKey) {
507
+ pkKeys.push(key);
508
+ }
509
+ if (config.sql?.isClientPk) {
510
+ clientPkKeys.push(key);
511
+ }
506
512
  const sqlConfig = config.sql;
507
513
  if (sqlConfig &&
508
514
  typeof sqlConfig === "object" &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-shape",
3
- "version": "0.5.168",
3
+ "version": "0.5.169",
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",