@alevnyacow/nzmt 0.18.3 → 0.18.5
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 +4 -4
- package/bin/cli.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Everything is wired automatically via DI — no manual setup needed.
|
|
|
82
82
|
|
|
83
83
|
Then tweak a few files:
|
|
84
84
|
|
|
85
|
-
- `/
|
|
85
|
+
- `/domain/entities/user/user.entity.ts` → entity schema
|
|
86
86
|
- `/server/stores/users/user.store.ts` → store schemas (if default schemas do not fit your needs)
|
|
87
87
|
- `/server/stores/users/user.store.prisma.ts` → map `UserStore` contracts to Prisma client contracts
|
|
88
88
|
|
|
@@ -97,9 +97,9 @@ Schema: Client → React Query → API → Controller → Service → Store →
|
|
|
97
97
|
```tsx
|
|
98
98
|
'use client'
|
|
99
99
|
|
|
100
|
-
import { UserQueries } from "@/
|
|
100
|
+
import { UserQueries } from "@/ui/shared/queries/user";
|
|
101
101
|
|
|
102
|
-
export default function () {
|
|
102
|
+
export default function Page() {
|
|
103
103
|
const { mutate: addUser } = UserQueries.usePOST()
|
|
104
104
|
const { data, isFetching } = UserQueries.useGET({ query: {} })
|
|
105
105
|
|
|
@@ -132,7 +132,7 @@ Schema: Server Action → Service → Store → DB
|
|
|
132
132
|
import { fromDI } from "@/server/di"
|
|
133
133
|
import type { UserService } from "@/server/services/user"
|
|
134
134
|
|
|
135
|
-
export default async function() {
|
|
135
|
+
export default async function Page() {
|
|
136
136
|
/**
|
|
137
137
|
* FYI: `fromDI` argument is strongly typed and
|
|
138
138
|
* this type automatically updates after you scaffold
|
package/bin/cli.js
CHANGED
|
@@ -108,11 +108,11 @@ function createDefaultConfig() {
|
|
|
108
108
|
providers: '/server/providers',
|
|
109
109
|
controllers: '/server/controllers',
|
|
110
110
|
infrastructure: '/server/infrastructure',
|
|
111
|
-
entities: '/
|
|
112
|
-
valueObjects: '/
|
|
113
|
-
sharedErrors: '/
|
|
114
|
-
queries: '/
|
|
115
|
-
clientUtils: '/
|
|
111
|
+
entities: '/domain/entities',
|
|
112
|
+
valueObjects: '/domain/value-objects',
|
|
113
|
+
sharedErrors: '/domain/errors',
|
|
114
|
+
queries: '/ui/shared/queries',
|
|
115
|
+
clientUtils: '/ui/shared/utils'
|
|
116
116
|
},
|
|
117
117
|
store: {
|
|
118
118
|
prisma: {
|
|
@@ -128,11 +128,11 @@ function createDefaultConfig() {
|
|
|
128
128
|
providers: '/server/providers',
|
|
129
129
|
controllers: '/server/controllers',
|
|
130
130
|
infrastructure: '/server/infrastructure',
|
|
131
|
-
entities: '/
|
|
132
|
-
valueObjects: '/
|
|
133
|
-
sharedErrors: '/
|
|
134
|
-
queries: '/
|
|
135
|
-
clientUtils: '/
|
|
131
|
+
entities: '/domain/entities',
|
|
132
|
+
valueObjects: '/domain/value-objects',
|
|
133
|
+
sharedErrors: '/domain/errors',
|
|
134
|
+
queries: '/ui/shared/queries',
|
|
135
|
+
clientUtils: '/ui/shared/utils'
|
|
136
136
|
}
|
|
137
137
|
}, null, '\t'))
|
|
138
138
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5",
|
|
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": {
|