@alevnyacow/nzmt 0.17.1 → 0.17.3

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.
Files changed (2) hide show
  1. package/bin/cli.js +3 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -462,7 +462,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
462
462
  "\t},",
463
463
  "",
464
464
  "\tsearchPayload: {",
465
- withEntity ? `\t\tlist: ${upperCase}.schema.omit({ id: true }),` : "\t\tlist: z.object({ }),",
465
+ withEntity ? `\t\tlist: ${upperCase}.schema.omit({ id: true }).partial(),` : "\t\tlist: z.object({ }),",
466
466
  withEntity ? `\t\tspecific: ${upperCase}.schema.pick({ id: true }),` : "\t\tspecific: z.object({ }),",
467
467
  "\t},",
468
468
  "",
@@ -522,7 +522,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
522
522
  "\t\t\t",
523
523
  "\t\t};",
524
524
  "\t},",
525
- `\ttoDetails: (source: Prisma.${upperCase}GetPayload<{ include: { } }>): Types['details'] => {`,
525
+ `\ttoDetails: (source: Prisma.${upperCase}GetPayload<{}>): Types['details'] => {`,
526
526
  "\t\treturn {",
527
527
  "\t\t\t",
528
528
  "\t\t};",
@@ -557,8 +557,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
557
557
  "",
558
558
  "\tdetails = this.method('details', async ({ filter }) => {",
559
559
  `\t\tconst details = await this.prismaClient.${lowerCase}.findUnique({`,
560
- "\t\t\twhere: mappers.toFindOnePayload(filter),",
561
- "\t\t\tinclude: {}",
560
+ "\t\t\twhere: mappers.toFindOnePayload(filter)",
562
561
  "\t\t})",
563
562
  "",
564
563
  "\t\tif (!details) {",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alevnyacow/nzmt",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Next Zod Modules Toolkit",
5
5
  "keywords": ["next", "full-stack", "server", "backend", "cli", "scaffolder", "zod", "rest", "contract programming", "react-query", "ddd", "domain-driven"],
6
6
  "repository": {