postgresdk 0.18.21 → 0.18.22

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/cli.js CHANGED
@@ -3073,10 +3073,10 @@ function emitZod(table, opts, enums) {
3073
3073
  return `z.boolean()`;
3074
3074
  if (t === "int2" || t === "int4" || t === "int8") {
3075
3075
  if (opts.numericMode === "number")
3076
- return `z.number()`;
3076
+ return `z.number().int()`;
3077
3077
  if (opts.numericMode === "string")
3078
3078
  return `z.string()`;
3079
- return t === "int2" || t === "int4" ? `z.number()` : `z.string()`;
3079
+ return t === "int2" || t === "int4" ? `z.number().int()` : `z.string()`;
3080
3080
  }
3081
3081
  if (t === "numeric" || t === "float4" || t === "float8") {
3082
3082
  if (opts.numericMode === "number")
package/dist/index.js CHANGED
@@ -2112,10 +2112,10 @@ function emitZod(table, opts, enums) {
2112
2112
  return `z.boolean()`;
2113
2113
  if (t === "int2" || t === "int4" || t === "int8") {
2114
2114
  if (opts.numericMode === "number")
2115
- return `z.number()`;
2115
+ return `z.number().int()`;
2116
2116
  if (opts.numericMode === "string")
2117
2117
  return `z.string()`;
2118
- return t === "int2" || t === "int4" ? `z.number()` : `z.string()`;
2118
+ return t === "int2" || t === "int4" ? `z.number().int()` : `z.string()`;
2119
2119
  }
2120
2120
  if (t === "numeric" || t === "float4" || t === "float8") {
2121
2121
  if (opts.numericMode === "number")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postgresdk",
3
- "version": "0.18.21",
3
+ "version": "0.18.22",
4
4
  "description": "Generate a typed server/client SDK from a Postgres schema (includes, Zod, Hono).",
5
5
  "type": "module",
6
6
  "bin": {