Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix(codegen): Update module codegen #414

Merged
merged 1 commit into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cli/commands/codegen-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,20 @@ async function generateModule(appId: string, importStatement: string, providers:
const appTitleCase = strings.titleCase(appId);

const generatedContent = dedent`
import { Module } from '@nestjs/common';

import { AbstractDynamicApp } from '~app/app.dynamic-module';
import { Register } from '~app-toolkit/decorators';
import { AbstractApp } from '~app/app.dynamic-module';

import { ${appTitleCase}ContractFactory } from './contracts';
import { ${appTitleCase}AppDefinition } from './${appId}.definition';
${importStatement}
@Module({
@Register.AppModule({
appId: '${appId}',
providers: [
${appTitleCase}AppDefinition,
${appTitleCase}ContractFactory,${providers}
],
})
export class ${appTitleCase}AppModule extends AbstractDynamicApp<${appTitleCase}AppModule>() {}
export class ${appTitleCase}AppModule extends AbstractApp<${appTitleCase}AppModule>() {}

`;

Expand Down