@stryke/prisma-trpc-generator 0.10.5 → 0.10.6

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.
@@ -10779,7 +10779,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10779
10779
  const arr = inputType.isList ? ".array()" : "";
10780
10780
  const opt = !field.isRequired ? ".optional()" : "";
10781
10781
  const nullable = field.inputTypes.length > 1 && field.inputTypes[1]?.type === "Null" ? ".nullable()" : "";
10782
- return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${schema})${arr}${opt}${nullable}` : `z.lazy(() => ${schema})${arr}${opt}${nullable}`;
10782
+ return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}`;
10783
10783
  }
10784
10784
  generateFieldValidators(zodStringWithMainType, field) {
10785
10785
  const { isRequired, isNullable } = field;
@@ -10812,8 +10812,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10812
10812
  if (isAggregateInputType(name)) {
10813
10813
  name = `${name}Type`;
10814
10814
  }
10815
- const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = Schema`;
10816
- return `const Schema: z.ZodType<Prisma.${name}> = ${schema};
10815
+ const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = schema`;
10816
+ return `const schema: z.ZodType<Prisma.${name}> = ${schema};
10817
10817
 
10818
10818
  ${end}`;
10819
10819
  }
package/dist/generator.js CHANGED
@@ -10784,7 +10784,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10784
10784
  const arr = inputType.isList ? ".array()" : "";
10785
10785
  const opt = !field.isRequired ? ".optional()" : "";
10786
10786
  const nullable = field.inputTypes.length > 1 && field.inputTypes[1]?.type === "Null" ? ".nullable()" : "";
10787
- return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${schema})${arr}${opt}${nullable}` : `z.lazy(() => ${schema})${arr}${opt}${nullable}`;
10787
+ return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}`;
10788
10788
  }
10789
10789
  generateFieldValidators(zodStringWithMainType, field) {
10790
10790
  const { isRequired, isNullable } = field;
@@ -10817,8 +10817,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10817
10817
  if (isAggregateInputType(name)) {
10818
10818
  name = `${name}Type`;
10819
10819
  }
10820
- const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = Schema`;
10821
- return `const Schema: z.ZodType<Prisma.${name}> = ${schema};
10820
+ const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = schema`;
10821
+ return `const schema: z.ZodType<Prisma.${name}> = ${schema};
10822
10822
 
10823
10823
  ${end}`;
10824
10824
  }
package/dist/index.cjs CHANGED
@@ -10775,7 +10775,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10775
10775
  const arr = inputType.isList ? ".array()" : "";
10776
10776
  const opt = !field.isRequired ? ".optional()" : "";
10777
10777
  const nullable = field.inputTypes.length > 1 && field.inputTypes[1]?.type === "Null" ? ".nullable()" : "";
10778
- return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${schema})${arr}${opt}${nullable}` : `z.lazy(() => ${schema})${arr}${opt}${nullable}`;
10778
+ return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}`;
10779
10779
  }
10780
10780
  generateFieldValidators(zodStringWithMainType, field) {
10781
10781
  const { isRequired, isNullable } = field;
@@ -10808,8 +10808,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10808
10808
  if (isAggregateInputType(name)) {
10809
10809
  name = `${name}Type`;
10810
10810
  }
10811
- const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = Schema`;
10812
- return `const Schema: z.ZodType<Prisma.${name}> = ${schema};
10811
+ const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = schema`;
10812
+ return `const schema: z.ZodType<Prisma.${name}> = ${schema};
10813
10813
 
10814
10814
  ${end}`;
10815
10815
  }
package/dist/index.js CHANGED
@@ -10780,7 +10780,7 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10780
10780
  const arr = inputType.isList ? ".array()" : "";
10781
10781
  const opt = !field.isRequired ? ".optional()" : "";
10782
10782
  const nullable = field.inputTypes.length > 1 && field.inputTypes[1]?.type === "Null" ? ".nullable()" : "";
10783
- return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${schema})${arr}${opt}${nullable}` : `z.lazy(() => ${schema})${arr}${opt}${nullable}`;
10783
+ return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}${nullable}`;
10784
10784
  }
10785
10785
  generateFieldValidators(zodStringWithMainType, field) {
10786
10786
  const { isRequired, isNullable } = field;
@@ -10813,8 +10813,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
10813
10813
  if (isAggregateInputType(name)) {
10814
10814
  name = `${name}Type`;
10815
10815
  }
10816
- const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = Schema`;
10817
- return `const Schema: z.ZodType<Prisma.${name}> = ${schema};
10816
+ const end = `export const ${lowerCaseFirst(exportName)}ObjectSchema = schema`;
10817
+ return `const schema: z.ZodType<Prisma.${name}> = ${schema};
10818
10818
 
10819
10819
  ${end}`;
10820
10820
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/prisma-trpc-generator",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "type": "module",
5
5
  "description": "A fork of the prisma-trpc-generator code to work in ESM with Prisma v6.",
6
6
  "repository": {