diff --git a/libs/plugin/core/src/generators/domain/generator.ts b/libs/plugin/core/src/generators/domain/generator.ts index 87ccb64..9a3aa9e 100644 --- a/libs/plugin/core/src/generators/domain/generator.ts +++ b/libs/plugin/core/src/generators/domain/generator.ts @@ -1,5 +1,5 @@ +import { normalizeOptions, addFiles, nxCleanCoreVersion, rxjsVersion } from '../../utils'; import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-serial'; -import { normalizeOptions, addFiles, nxCleanCoreVersion } from '../../utils'; import { libraryGenerator } from '@nrwl/workspace/generators'; import { DomainGeneratorSchema } from '../../interfaces'; import { @@ -41,8 +41,9 @@ export default async function (host: Tree, options: DomainGeneratorSchema) { } function updateDependencies(host: Tree) { - const corePackage = { + const packages = { '@nx-clean/core': nxCleanCoreVersion, + 'rxjs': rxjsVersion }; - return addDependenciesToPackageJson(host, corePackage, {}); + return addDependenciesToPackageJson(host, packages, {}); } diff --git a/libs/plugin/core/src/generators/presentation/files/src/lib/presenter/__model__-default.presenter.ts__template__ b/libs/plugin/core/src/generators/presentation/files/src/lib/presenter/__model__-default.presenter.ts__template__ index 80d90f7..8c10dcf 100644 --- a/libs/plugin/core/src/generators/presentation/files/src/lib/presenter/__model__-default.presenter.ts__template__ +++ b/libs/plugin/core/src/generators/presentation/files/src/lib/presenter/__model__-default.presenter.ts__template__ @@ -63,7 +63,7 @@ export class <%= entity.className %>DefaultPresenter implements <%= entity.class add<%= entity.className %>({ name }: Pick<<%= entity.className %>VM, 'name'>): Observable<<%= entity.className %>VM> { const add$ = this.add<%= entity.className %>UC - .execute({ name, id: null }) + .execute({ name, id: '' }) .pipe(map(this.mapper.mapFrom)); const <%= entity.propertyName %>s$ = this.getAll<%= entity.className %>sUC @@ -90,7 +90,7 @@ export class <%= entity.className %>DefaultPresenter implements <%= entity.class .execute() .pipe(map((<%= entity.propertyName %>s) => <%= entity.propertyName %>s.map(this.mapper.mapFrom))); - forkJoin([remove$, <%= entity.propertyName %>s$]).subscribe(([<%= entity.propertyName %>s]) => { + forkJoin([remove$, <%= entity.propertyName %>s$]).subscribe(([,<%= entity.propertyName %>s]) => { this.dispatch.next( (this.state = { ...this.state, diff --git a/libs/plugin/core/src/utils/versions.ts b/libs/plugin/core/src/utils/versions.ts index 1130f23..4e6a38a 100644 --- a/libs/plugin/core/src/utils/versions.ts +++ b/libs/plugin/core/src/utils/versions.ts @@ -1 +1,2 @@ -export const nxCleanCoreVersion = '1.0.0'; \ No newline at end of file +export const nxCleanCoreVersion = '1.0.0'; +export const rxjsVersion = '^7.3.1'; \ No newline at end of file