@punks/backend-entity-manager 0.0.269 → 0.0.271

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/dist/cjs/index.js CHANGED
@@ -21977,17 +21977,10 @@ exports.OperationLockService = OperationLockService_1 = class OperationLockServi
21977
21977
  this.isLockExpired = (item, refDate, timeoutMinutes) => {
21978
21978
  return differenceInMinutes(refDate, item.createdOn) > timeoutMinutes;
21979
21979
  };
21980
- if (!operations) {
21981
- this.logger.warn(`Cannot resolve locks repository: ${getEntityManagerProviderToken("OperationsLockRepository")}`);
21982
- }
21983
- else {
21984
- this.logger.info(`Resolved locks repository: ${getEntityManagerProviderToken("OperationsLockRepository")}`);
21985
- }
21986
21980
  }
21987
21981
  };
21988
21982
  exports.OperationLockService = OperationLockService_1 = __decorate([
21989
21983
  common.Injectable(),
21990
- __param(0, common.Optional()),
21991
21984
  __param(0, common.Inject(getEntityManagerProviderToken("OperationsLockRepository"))),
21992
21985
  __metadata("design:paramtypes", [Object])
21993
21986
  ], exports.OperationLockService);
@@ -23635,6 +23628,7 @@ const getIoCContext = () => {
23635
23628
  return _context;
23636
23629
  };
23637
23630
 
23631
+ var EntityManagerModule_1;
23638
23632
  const ModuleData$9 = {
23639
23633
  imports: [exports.CustomDiscoveryModule, eventEmitter.EventEmitterModule],
23640
23634
  providers: [
@@ -23646,7 +23640,7 @@ const ModuleData$9 = {
23646
23640
  ],
23647
23641
  exports: [exports.EntityManagerRegistry, ...Services$1],
23648
23642
  };
23649
- exports.EntityManagerModule = class EntityManagerModule {
23643
+ exports.EntityManagerModule = EntityManagerModule_1 = class EntityManagerModule {
23650
23644
  constructor(registry) {
23651
23645
  this.registry = registry;
23652
23646
  }
@@ -23655,8 +23649,21 @@ exports.EntityManagerModule = class EntityManagerModule {
23655
23649
  registry: this.registry,
23656
23650
  });
23657
23651
  }
23652
+ static forRoot(providers) {
23653
+ return {
23654
+ module: EntityManagerModule_1,
23655
+ ...ModuleData$9,
23656
+ providers: [
23657
+ ...ModuleData$9.providers,
23658
+ {
23659
+ provide: getEntityManagerProviderToken("OperationsLockRepository"),
23660
+ useClass: providers.operationsLockRepository,
23661
+ },
23662
+ ],
23663
+ };
23664
+ }
23658
23665
  };
23659
- exports.EntityManagerModule = __decorate([
23666
+ exports.EntityManagerModule = EntityManagerModule_1 = __decorate([
23660
23667
  common.Module({
23661
23668
  imports: ModuleData$9.imports,
23662
23669
  providers: ModuleData$9.providers,
@@ -34081,7 +34088,7 @@ exports.JobsModule = JobsModule_1 = class JobsModule {
34081
34088
  this.jobsScheduler.register();
34082
34089
  await this.jobsProviderFactory.initialize();
34083
34090
  }
34084
- static forRoot(input) {
34091
+ static forRoot(input, providers) {
34085
34092
  return {
34086
34093
  module: JobsModule_1,
34087
34094
  ...ModuleData$7,
@@ -34091,6 +34098,14 @@ exports.JobsModule = JobsModule_1 = class JobsModule {
34091
34098
  provide: getEntityManagerProviderToken("JobsModuleSettings"),
34092
34099
  useValue: input,
34093
34100
  },
34101
+ {
34102
+ provide: getEntityManagerProviderToken("JobInstancesRepository"),
34103
+ useClass: providers.jobInstancesRepository,
34104
+ },
34105
+ {
34106
+ provide: getEntityManagerProviderToken("JobDefinitionsRepository"),
34107
+ useClass: providers.jobDefinitionsRepository,
34108
+ },
34094
34109
  ],
34095
34110
  };
34096
34111
  }