cogsbox-shape 0.5.121 → 0.5.122
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 +8 -4
- package/package.json +1 -1
package/dist/schema.js
CHANGED
|
@@ -174,10 +174,14 @@ function createBuilder(config) {
|
|
|
174
174
|
}
|
|
175
175
|
else {
|
|
176
176
|
// No schema provided, create from value type
|
|
177
|
-
if (typeof actualValue === "string"
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
if (typeof actualValue === "string") {
|
|
178
|
+
baseSchema = z.string();
|
|
179
|
+
}
|
|
180
|
+
else if (typeof actualValue === "number") {
|
|
181
|
+
baseSchema = z.number();
|
|
182
|
+
}
|
|
183
|
+
else if (typeof actualValue === "boolean") {
|
|
184
|
+
baseSchema = z.boolean();
|
|
181
185
|
}
|
|
182
186
|
else if (actualValue instanceof Date) {
|
|
183
187
|
baseSchema = z.date();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cogsbox-shape",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.122",
|
|
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",
|