cogsbox-shape 0.5.154 → 0.5.155
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.js +4 -1
- package/package.json +1 -1
package/dist/schema.js
CHANGED
|
@@ -171,7 +171,10 @@ function createBuilder(config) {
|
|
|
171
171
|
const newCompletedStages = new Set(completedStages);
|
|
172
172
|
newCompletedStages.add("new");
|
|
173
173
|
// Create union of the SQL type and the new client type
|
|
174
|
-
const
|
|
174
|
+
const hasProvidedSchema = !!schemaOrModifier;
|
|
175
|
+
const clientAndServerSchema = hasProvidedSchema
|
|
176
|
+
? finalSchema
|
|
177
|
+
: z.union([config.sqlZod, finalSchema]);
|
|
175
178
|
const newConfig = { ...config.sqlConfig };
|
|
176
179
|
if (clientPk) {
|
|
177
180
|
// Add our metadata flag to the config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.155",
|
|
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",
|