@alevnyacow/nzmt 0.0.35 → 0.0.37
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,17 +388,17 @@ 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'",
|
|
398
398
|
config?.dependencyInjection?.inversifyjs ? "@injectable()" : undefined,
|
|
399
399
|
`export class ${upperCaseService}Service {`,
|
|
400
400
|
`\tconstructor(`,
|
|
401
|
-
config?.dependencyInjection?.inversifyjs?.storeTokensPrefix ? `\t\t@inject(${getImportName(config?.dependencyInjection?.storeTokensPrefix)}.${lowerCase}s)` : undefined,
|
|
401
|
+
config?.dependencyInjection?.inversifyjs?.storeTokensPrefix ? `\t\t@inject(${getImportName(config?.dependencyInjection?.inversifyjs?.storeTokensPrefix)}.${lowerCase}s)` : undefined,
|
|
402
402
|
`\t\tprivate readonly ${lowerCase}s: ${upperCase}Store`,
|
|
403
403
|
'\t) { }',
|
|
404
404
|
'\t',
|