@alevnyacow/nzmt 0.0.40 → 0.0.42
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/README.md +24 -1
- package/bin/cli.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
# NZMT - Next Zod Modules Toolkit
|
|
1
|
+
# NZMT - Next Zod Modules Toolkit
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
- Module
|
|
6
|
+
- `methods` function
|
|
7
|
+
- `Metadata` type
|
|
8
|
+
- `DTOs` type
|
|
9
|
+
- `Methods` type
|
|
10
|
+
- `Config` type
|
|
11
|
+
- Controller
|
|
12
|
+
- `endpoints` function
|
|
13
|
+
- `DefaultErrorCodes` enum
|
|
14
|
+
- `Guard` type
|
|
15
|
+
- `OnErrorHandler` type
|
|
16
|
+
- `SharedConfig` type
|
|
17
|
+
- `Metadata` type
|
|
18
|
+
- `Contract` type
|
|
19
|
+
- Store
|
|
20
|
+
- `methods` function
|
|
21
|
+
- `InRAM` class generator
|
|
22
|
+
- `Types` type
|
|
23
|
+
- `Metadata` type
|
|
24
|
+
- `Contract` type
|
package/bin/cli.js
CHANGED
|
@@ -331,7 +331,7 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
331
331
|
"import z from 'zod'",
|
|
332
332
|
`import { ${lowerCase}StoreMetadata } from '${config?.paths?.stores?.replace('./src', '@')}/${entityName}'`,
|
|
333
333
|
"",
|
|
334
|
-
`export const ${
|
|
334
|
+
`export const ${lowerCaseService}ServiceMetadata = {`,
|
|
335
335
|
`\tname: '${upperCase}sService',`,
|
|
336
336
|
"\tschemas: {",
|
|
337
337
|
"\t\tgetSpecific: {",
|
|
@@ -375,7 +375,7 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
375
375
|
"\t}",
|
|
376
376
|
"} satisfies Module.Metadata",
|
|
377
377
|
"",
|
|
378
|
-
`export type ${upperCaseService}ServiceDTOs = Module.DTOs<typeof ${lowerCaseService}
|
|
378
|
+
`export type ${upperCaseService}ServiceDTOs = Module.DTOs<typeof ${lowerCaseService}ServiceMetadata>`
|
|
379
379
|
].filter(x => typeof x === 'string').join('\n'))
|
|
380
380
|
} else {
|
|
381
381
|
fs.writeFileSync(path.resolve(folder, `${serviceName}.service.metadata.ts`), [
|