@alevnyacow/nzmt 0.0.36 → 0.0.38
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 -3
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -388,10 +388,10 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
388
388
|
// Service body
|
|
389
389
|
|
|
390
390
|
if (withCrud) {
|
|
391
|
-
const [
|
|
391
|
+
const [lowerCaseService, upperCaseService] = camelizeVariants(serviceName)
|
|
392
392
|
fs.writeFileSync(path.resolve(folder, `${serviceName}.service.ts`), [
|
|
393
393
|
config?.dependencyInjection?.inversifyjs ? "import { injectable, inject } from 'inversify'" : undefined,
|
|
394
|
-
config?.dependencyInjection?.storeTokensPrefix ?? undefined,
|
|
394
|
+
config?.dependencyInjection?.inversifyjs?.storeTokensPrefix ?? undefined,
|
|
395
395
|
`import type { ${upperCase}Store } from '${config?.paths?.stores?.replace('./src', '@')}/${entityName}'`,
|
|
396
396
|
`import { ${lowerCaseService}ServiceMetadata } from './${serviceName}.service.metadata'`,
|
|
397
397
|
"import { Module } from '@alevnyacow/nzmt'",
|
|
@@ -402,7 +402,7 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
402
402
|
`\t\tprivate readonly ${lowerCase}s: ${upperCase}Store`,
|
|
403
403
|
'\t) { }',
|
|
404
404
|
'\t',
|
|
405
|
-
`\tprivate method = Module.methods(${
|
|
405
|
+
`\tprivate method = Module.methods(${lowerCaseService}ServiceMetadata)`,
|
|
406
406
|
'\t',
|
|
407
407
|
`\tcreate = this.method('create', this.${lowerCase}s.create);`,
|
|
408
408
|
'\t',
|