@alevnyacow/nzmt 0.23.0 → 0.24.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/bin/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -142,6 +142,7 @@ export default async function Page() {
142
142
  | `npx nzmt e <name>` | **e**ntity ||
143
143
  | `npx nzmt vo <name>` | **v**alue **o**bject ||
144
144
  | `npx nzmt cs <name>` | **c**ustom **s**tore (all schemas are `z.object({})`) ||
145
+ | `npx nzmt p <name>` | **p**rovider | `pt:Console` will generate Console provider. Default value is `pt:API` |
145
146
  | `npx nzmt s <name>` | **s**ervice |`i:UserStore,Logger` will automatically inject `UserStore` and `Logger`. E.g. `npx nzmt s shop i:UserStore,ProductStore` will create `ShopService` with already injected `UserStore` and `ProductStore`|
146
147
  | `npx nzmt c <name>` | **c**ontroller |`i:UserService` will automatically inject `UserService`. `Logger` and `Guards` are injected by default regardless of `i:` option|
147
148
 
@@ -161,6 +162,8 @@ They:
161
162
  - can be reused across layers (no separate DTOs needed)
162
163
  - automatically infer types (no manual TypeScript work)
163
164
 
165
+ Service method description example:
166
+
164
167
  ```ts
165
168
  orderDetails: {
166
169
  payload: Order.schema.pick({ name: true, createdDate: true }),
package/bin/cli.js CHANGED
@@ -832,7 +832,7 @@ function generateProvider(lowerCase, upperCase) {
832
832
  insertBeforeLineInFile(
833
833
  diEntriesPath,
834
834
  'type DIEntries =',
835
- `import { ${upperCase}MockProvider, ${upperCase}${providerType}Provider } from '@${config?.paths?.providers}/${entityName}}'`
835
+ `import { ${upperCase}MockProvider, ${upperCase}${providerType}Provider } from '@${config?.paths?.providers}/${entityName}'`
836
836
  )
837
837
 
838
838
  insertAfterLineInFile(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alevnyacow/nzmt",
3
- "version": "0.23.0",
3
+ "version": "0.24.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": {