@alevnyacow/nzmt 0.39.4 → 0.40.0
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 +6 -2
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -990,8 +990,10 @@ function generateService(lowerCase, upperCase, store) {
|
|
|
990
990
|
"import { Module } from '@alevnyacow/nzmt'",
|
|
991
991
|
...importInjections,
|
|
992
992
|
"",
|
|
993
|
+
`type Methods = Module.Methods<typeof ${lowerCase}ServiceMetadata>`,
|
|
994
|
+
"",
|
|
993
995
|
"@injectable()",
|
|
994
|
-
`export class ${upperCase}Service implements
|
|
996
|
+
`export class ${upperCase}Service implements Methods {`,
|
|
995
997
|
`\tprivate methods = Module.methods(${lowerCase}ServiceMetadata)`,
|
|
996
998
|
``,
|
|
997
999
|
`\tconstructor(`,
|
|
@@ -1125,8 +1127,10 @@ function generateController(upperCase, lowerCase, crudService) {
|
|
|
1125
1127
|
`import { ${lowerCase}ControllerMetadata } from './${entityName}.controller.metadata'`,
|
|
1126
1128
|
...importInjections,
|
|
1127
1129
|
``,
|
|
1130
|
+
`type Endpoints = Controller.EndpointList<typeof ${lowerCase}ControllerMetadata>`,
|
|
1131
|
+
``,
|
|
1128
1132
|
`@injectable()`,
|
|
1129
|
-
`export class ${upperCase}Controller implements
|
|
1133
|
+
`export class ${upperCase}Controller implements Endpoints {`,
|
|
1130
1134
|
`\tconstructor(`,
|
|
1131
1135
|
...injections.map(x => `\t\t@inject('${x}' satisfies DITokens) private readonly ${x.charAt(0).toLowerCase() + x.slice(1)}: ${x},`),
|
|
1132
1136
|
`\t) {}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Next Zod Modules Toolkit",
|
|
5
5
|
"keywords": ["next", "full-stack", "server", "backend", "cli", "scaffolding", "zod", "rest", "contract programming", "contract-first", "react-query", "ddd", "domain-driven"],
|
|
6
6
|
"repository": {
|