@alevnyacow/nzmt 0.21.0 → 0.21.2
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 +1 -1
- package/bin/cli.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ The behavior of all server modules in NZMT is governed by Zod schemas. Function
|
|
|
136
136
|
|
|
137
137
|
## Can I tweak scaffolded files?
|
|
138
138
|
|
|
139
|
-
Yes — everything is fully editable, including configuration. Think of NZMT as a shadcn-style approach for full-stack: scaffold first, then fully own the code. Moreover, your changes are preserved on subsequent generations. For example, if you modify a generated query and regenerate later, your edits stay intact.
|
|
139
|
+
Yes — everything is fully editable, including configuration. Think of NZMT as a shadcn-style approach for full-stack: scaffold first, then fully own the code. Moreover, in most of the cases your changes are preserved on subsequent generations. For example, if you modify a generated query and regenerate later, your edits stay intact.
|
|
140
140
|
|
|
141
141
|
## Do I really need to understand DI and other fancy concepts to use NZMT?
|
|
142
142
|
|
package/bin/cli.js
CHANGED
|
@@ -1133,6 +1133,10 @@ function generateAPIRoutes(lowerCase, upperCase, entity) {
|
|
|
1133
1133
|
|
|
1134
1134
|
const controllerHandlersRootPath = path.resolve(projectRoot, config.coreFolder, 'app', 'api', `${requiredEntity}-controller`)
|
|
1135
1135
|
|
|
1136
|
+
if (fs.existsSync(controllerHandlersRootPath)) {
|
|
1137
|
+
fs.rmdirSync(controllerHandlersRootPath)
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1136
1140
|
fs.mkdirSync(controllerHandlersRootPath, { recursive: true })
|
|
1137
1141
|
|
|
1138
1142
|
if (rootMethods.length) {
|
|
@@ -1273,7 +1277,7 @@ function generateQueries(lowerCase, upperCase, entity) {
|
|
|
1273
1277
|
}
|
|
1274
1278
|
|
|
1275
1279
|
const allQueryFiles = fs.readdirSync(controllerQueriesPath, { withFileTypes: true }).filter(x => x.isFile())
|
|
1276
|
-
const deprecatedQueries = allQueryFiles.filter(x => scaffoldedMethods.every(scaffolded => !x.name.startsWith(scaffolded)))
|
|
1280
|
+
const deprecatedQueries = allQueryFiles.filter(x => scaffoldedMethods.every(scaffolded => !x.name.startsWith(scaffolded))).map(x => x.name)
|
|
1277
1281
|
|
|
1278
1282
|
for (const deprecated of deprecatedQueries) {
|
|
1279
1283
|
fs.rmSync(path.resolve(controllerQueriesPath, deprecated))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
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": {
|