@alevnyacow/nzmt 0.32.1 → 0.33.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 +3 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -930,6 +930,7 @@ function toKebabFromPascal(str) {
|
|
|
930
930
|
|
|
931
931
|
function generateService(lowerCase, upperCase, store) {
|
|
932
932
|
const folder = config?.paths?.services ? path.resolve(process.cwd(), `${config.coreFolder}${config?.paths?.services}`, entityName) : path.resolve(process.cwd(), entityName);
|
|
933
|
+
const defaultInjections = config?.services?.defaultInjections
|
|
933
934
|
|
|
934
935
|
const proxiedStore = store || options.find(x => x.startsWith('p:'))?.split(':')?.at(-1)
|
|
935
936
|
if (proxiedStore && !proxiedStore.endsWith('Store')) {
|
|
@@ -941,6 +942,8 @@ function generateService(lowerCase, upperCase, store) {
|
|
|
941
942
|
injections = injections.concat(proxiedStore)
|
|
942
943
|
}
|
|
943
944
|
|
|
945
|
+
injections = [...defaultInjections, ...injections.filter(x => !defaultInjections.includes(x))]
|
|
946
|
+
|
|
944
947
|
const importInjections = injections.map((i) => {
|
|
945
948
|
if (i.endsWith('Service') || i.endsWith('Controller')) {
|
|
946
949
|
throw 'Only stores and infrastructure can be injected in services'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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": {
|