Skip to content

Commit

Permalink
[Fix] Plugins Builds (#7695)
Browse files Browse the repository at this point in the history
* fix: missing mikro base repository build

* fix: missing mikro base repository build

* fix: missing mikro base repository build
  • Loading branch information
rahul-rocket authored Mar 22, 2024
1 parent c823a81 commit db8d0dd
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 23 deletions.
1 change: 1 addition & 0 deletions packages/core/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './core.module';
export * from './utils';
export * from './context';
export * from './entities';
export * from './repository';
export * from './entities/internal';
export * from './entities/subscribers';
export * from './decorators';
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/core/repository/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './mikro-orm-base-entity.repository';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { Changelog } from '../changelog.entity';

export class MikroOrmChangelogRepository extends MikroOrmBaseEntityRepository<Changelog> { }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { Wakatime } from '../wakatime.entity';

export class MikroOrmWakatimeRepository extends MikroOrmBaseEntityRepository<Wakatime> { }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Repository } from 'typeorm';
import { Wakatime } from '../wakatime.entity';

export class TypeOrmWakatimeRepository extends Repository<Wakatime> {

constructor(
@InjectRepository(Wakatime) readonly repository: Repository<Wakatime>
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { HelpCenterArticle } from './help-center-article.entity';
import { HelpCenterArticleService } from './help-center-article.service';
import { HelpCenterArticleController } from './help-center-article.controller';
import { CommandHandlers } from './commands/handlers';
import { TypeOrmHelpCenterArticleRepository } from './repository';

@Module({
imports: [
Expand All @@ -17,9 +18,9 @@ import { CommandHandlers } from './commands/handlers';
RolePermissionModule,
CqrsModule
],
providers: [HelpCenterArticleService, ...CommandHandlers],
providers: [HelpCenterArticleService, TypeOrmHelpCenterArticleRepository, ...CommandHandlers],
controllers: [HelpCenterArticleController],
exports: [HelpCenterArticleService]
exports: [HelpCenterArticleService, TypeOrmHelpCenterArticleRepository]
})
export class HelpCenterArticleModule implements OnModuleInit {
constructor() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { TenantAwareCrudService } from '@gauzy/core';
import { isNotEmpty } from '@gauzy/common';
import { IHelpCenterArticleUpdate } from '@gauzy/contracts';
import { HelpCenterArticle } from './help-center-article.entity';
import { TypeOrmHelpCenterArticleRepository } from './repository/type-orm-help-center-article.repository';
import { MikroOrmHelpCenterArticleRepository } from './repository/mikro-orm-help-center-article.repository';
import { MikroOrmHelpCenterArticleRepository, TypeOrmHelpCenterArticleRepository } from './repository';

@Injectable()
export class HelpCenterArticleService extends TenantAwareCrudService<HelpCenterArticle> {
constructor(
@InjectRepository(HelpCenterArticle)
typeOrmHelpCenterArticleRepository: TypeOrmHelpCenterArticleRepository,

mikroOrmHelpCenterArticleRepository: MikroOrmHelpCenterArticleRepository
readonly typeOrmHelpCenterArticleRepository: TypeOrmHelpCenterArticleRepository,
readonly mikroOrmHelpCenterArticleRepository: MikroOrmHelpCenterArticleRepository
) {
super(typeOrmHelpCenterArticleRepository, mikroOrmHelpCenterArticleRepository);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './mikro-orm-help-center-article.repository';
export * from './type-orm-help-center-article.repository';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { HelpCenterArticle } from '../help-center-article.entity';

export class MikroOrmHelpCenterArticleRepository extends MikroOrmBaseEntityRepository<HelpCenterArticle> { }
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { HelpCenterArticle } from '../help-center-article.entity';

export class TypeOrmHelpCenterArticleRepository extends Repository<HelpCenterArticle> { }
export class TypeOrmHelpCenterArticleRepository extends Repository<HelpCenterArticle> {
constructor(
@InjectRepository(HelpCenterArticle) readonly repository: Repository<HelpCenterArticle>
) {
super(repository.target, repository.manager, repository.queryRunner);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { HelpCenterAuthorService } from './help-center-author.service';
import { HelpCenterAuthorController } from './help-center-author.controller';
import { HelpCenterAuthor } from './help-center-author.entity';
import { CommandHandlers } from './commands/handlers';
import { TypeOrmHelpCenterAuthorRepository } from './repository';

@Module({
imports: [
Expand All @@ -17,9 +18,9 @@ import { CommandHandlers } from './commands/handlers';
RolePermissionModule,
CqrsModule
],
providers: [HelpCenterAuthorService, ...CommandHandlers],
controllers: [HelpCenterAuthorController],
exports: [HelpCenterAuthorService]
providers: [HelpCenterAuthorService, TypeOrmHelpCenterAuthorRepository, ...CommandHandlers],
exports: [HelpCenterAuthorService, TypeOrmHelpCenterAuthorRepository]
})
export class HelpCenterAuthorModule implements OnModuleInit {
constructor() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './mikro-orm-help-center-author.repository';
export * from './type-orm-help-center-author.repository';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { HelpCenterAuthor } from '../help-center-author.entity';

export class MikroOrmHelpCenterAuthorRepository extends MikroOrmBaseEntityRepository<HelpCenterAuthor> { }
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { HelpCenterAuthor } from '../help-center-author.entity';

export class TypeOrmHelpCenterAuthorRepository extends Repository<HelpCenterAuthor> { }
export class TypeOrmHelpCenterAuthorRepository extends Repository<HelpCenterAuthor> {
constructor(
@InjectRepository(HelpCenterAuthor) readonly repository: Repository<HelpCenterAuthor>
) {
super(repository.target, repository.manager, repository.queryRunner);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { HelpCenterController } from './help-center.controller';
import { HelpCenter } from './help-center.entity';
import { HelpCenterService } from './help-center.service';
import { CommandHandlers } from './commands/handlers';
import { TypeOrmHelpCenterRepository } from './repository';

@Module({
imports: [
Expand All @@ -17,9 +18,9 @@ import { CommandHandlers } from './commands/handlers';
RolePermissionModule,
CqrsModule
],
providers: [HelpCenterService, ...CommandHandlers],
controllers: [HelpCenterController],
exports: [HelpCenterService]
providers: [HelpCenterService, TypeOrmHelpCenterRepository, ...CommandHandlers],
exports: [HelpCenterService, TypeOrmHelpCenterRepository]
})
export class HelpCenterModule implements OnModuleInit {
constructor() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './mikro-orm-help-center.repository';
export * from './type-orm-help-center.repository';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { HelpCenter } from '../help-center.entity';

export class MikroOrmHelpCenterRepository extends MikroOrmBaseEntityRepository<HelpCenter> { }
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { HelpCenter } from '../help-center.entity';

export class TypeOrmHelpCenterRepository extends Repository<HelpCenter> { }
export class TypeOrmHelpCenterRepository extends Repository<HelpCenter> {
constructor(
@InjectRepository(HelpCenter) readonly repository: Repository<HelpCenter>
) {
super(repository.target, repository.manager, repository.queryRunner);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroOrmBaseEntityRepository } from '../../core/repository/mikro-orm-base-entity.repository';
import { MikroOrmBaseEntityRepository } from '@gauzy/core';
import { ProductReview } from '../product-review.entity';

export class MikroOrmProductReviewRepository extends MikroOrmBaseEntityRepository<ProductReview> { }

0 comments on commit db8d0dd

Please sign in to comment.