@alevnyacow/nzmt 0.17.0 → 0.17.1
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/bin/cli.js +2 -2
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -648,13 +648,13 @@ function generateEntity(upperCase) {
|
|
|
648
648
|
|
|
649
649
|
const body = [
|
|
650
650
|
"import z from 'zod'",
|
|
651
|
-
`import {
|
|
651
|
+
`import { Identifier } from '@${config?.paths?.valueObjects}/identifier'`,
|
|
652
652
|
"",
|
|
653
653
|
`export type ${upperCase}Model = z.infer<typeof ${upperCase}.schema>`,
|
|
654
654
|
"",
|
|
655
655
|
`export class ${upperCase} {`,
|
|
656
656
|
"\tstatic schema = z.object({",
|
|
657
|
-
"\t\tid:
|
|
657
|
+
"\t\tid: Identifier.schema,",
|
|
658
658
|
fields.length ?
|
|
659
659
|
fields.map(([fieldName, description]) => {
|
|
660
660
|
return `\t\t${fieldName}: z.${description.split('.').join('().')}(),`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
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": {
|