cogsbox-shape 0.5.84 → 0.5.85

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 CHANGED
@@ -152,7 +152,7 @@ export type EnrichFields<T extends ShapeSchema> = {
152
152
  export declare const SchemaWrapperBrand: unique symbol;
153
153
  export declare function schema<T extends ShapeSchema>(schema: T): EnrichFields<T> & {
154
154
  _tableName: T["_tableName"];
155
- } & Record<typeof SchemaWrapperBrand, true>;
155
+ };
156
156
  export type RelationType = "hasMany" | "hasOne" | "manyToMany";
157
157
  type BaseSchemaField<T extends SQLType = SQLType> = {
158
158
  type: "field";
package/dist/schema.js CHANGED
@@ -273,7 +273,6 @@ export const SchemaWrapperBrand = Symbol("SchemaWrapper");
273
273
  export function schema(schema) {
274
274
  const enrichedSchema = {
275
275
  _tableName: schema._tableName,
276
- [SchemaWrapperBrand]: true, // Add the symbol property
277
276
  };
278
277
  for (const key in schema) {
279
278
  if (key !== "_tableName" &&
@@ -288,6 +287,7 @@ export function schema(schema) {
288
287
  };
289
288
  }
290
289
  }
290
+ enrichedSchema[SchemaWrapperBrand] = true;
291
291
  return enrichedSchema;
292
292
  }
293
293
  function inferDefaultFromZod(zodType, sqlConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogsbox-shape",
3
- "version": "0.5.84",
3
+ "version": "0.5.85",
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",