@punks/backend-entity-manager 0.0.396 → 0.0.398

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.
Files changed (28) hide show
  1. package/dist/cjs/index.js +81 -30
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/platforms/nest/extensions/authentication/module.d.ts +4 -0
  4. package/dist/cjs/types/platforms/nest/extensions/jobs/module.d.ts +4 -0
  5. package/dist/cjs/types/platforms/nest/extensions/tasks/module.d.ts +2 -2
  6. package/dist/cjs/types/platforms/nest/plugins/buckets/aws-s3/module.d.ts +4 -0
  7. package/dist/cjs/types/platforms/nest/plugins/collections/aws-dynamodb/module.d.ts +4 -0
  8. package/dist/cjs/types/platforms/nest/plugins/email/aws-ses/module.d.ts +4 -0
  9. package/dist/cjs/types/platforms/nest/plugins/email/sendgrid/module.d.ts +4 -0
  10. package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/module.d.ts +4 -0
  11. package/dist/cjs/types/platforms/nest/plugins/media/aws-s3/module.d.ts +4 -0
  12. package/dist/cjs/types/platforms/nest/plugins/media/sanity/module.d.ts +4 -0
  13. package/dist/cjs/types/platforms/nest/plugins/secrets/aws-secrets-manager/module.d.ts +4 -0
  14. package/dist/esm/index.js +81 -30
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/types/platforms/nest/extensions/authentication/module.d.ts +4 -0
  17. package/dist/esm/types/platforms/nest/extensions/jobs/module.d.ts +4 -0
  18. package/dist/esm/types/platforms/nest/extensions/tasks/module.d.ts +2 -2
  19. package/dist/esm/types/platforms/nest/plugins/buckets/aws-s3/module.d.ts +4 -0
  20. package/dist/esm/types/platforms/nest/plugins/collections/aws-dynamodb/module.d.ts +4 -0
  21. package/dist/esm/types/platforms/nest/plugins/email/aws-ses/module.d.ts +4 -0
  22. package/dist/esm/types/platforms/nest/plugins/email/sendgrid/module.d.ts +4 -0
  23. package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/module.d.ts +4 -0
  24. package/dist/esm/types/platforms/nest/plugins/media/aws-s3/module.d.ts +4 -0
  25. package/dist/esm/types/platforms/nest/plugins/media/sanity/module.d.ts +4 -0
  26. package/dist/esm/types/platforms/nest/plugins/secrets/aws-secrets-manager/module.d.ts +4 -0
  27. package/dist/index.d.ts +41 -1
  28. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -2999,22 +2999,28 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
2999
2999
  };
3000
3000
 
3001
3001
  var AwsDynamoDbModule_1;
3002
- const ModuleData$b = {
3002
+ const ModuleData$a = {
3003
3003
  providers: [],
3004
3004
  exports: [],
3005
3005
  };
3006
3006
  exports.AwsDynamoDbModule = AwsDynamoDbModule_1 = class AwsDynamoDbModule {
3007
+ /**
3008
+ * @deprecated use initialize instead
3009
+ */
3007
3010
  static forRoot(input) {
3008
3011
  awsDynamoDbSettings.initialize(input);
3009
3012
  return {
3010
3013
  module: AwsDynamoDbModule_1,
3011
- ...ModuleData$b,
3014
+ ...ModuleData$a,
3012
3015
  };
3013
3016
  }
3017
+ static initialize(input) {
3018
+ awsDynamoDbSettings.initialize(input);
3019
+ }
3014
3020
  };
3015
3021
  exports.AwsDynamoDbModule = AwsDynamoDbModule_1 = __decorate([
3016
3022
  common.Module({
3017
- ...ModuleData$b,
3023
+ ...ModuleData$a,
3018
3024
  })
3019
3025
  ], exports.AwsDynamoDbModule);
3020
3026
 
@@ -21986,10 +21992,9 @@ exports.CustomDiscoveryService = class CustomDiscoveryService {
21986
21992
  */
21987
21993
  async providers(filter) {
21988
21994
  if (!this.discoveredProviders) {
21989
- const allProviders = await this.discover("providers");
21990
- this.discoveredProviders = allProviders;
21995
+ this.discoveredProviders = await this.discover("providers");
21991
21996
  }
21992
- return lodash.exports.uniqBy(this.discoveredProviders.filter((x) => filter(x)), (x) => x.instance);
21997
+ return this.discoveredProviders.filter((x) => filter(x));
21993
21998
  }
21994
21999
  /**
21995
22000
  * Discovers all controller methods that either directly have a certain meta key attached to them
@@ -24346,7 +24351,7 @@ const getIoCContext = () => {
24346
24351
  return _context;
24347
24352
  };
24348
24353
 
24349
- const ModuleData$a = {
24354
+ const ModuleData$9 = {
24350
24355
  imports: [exports.CustomDiscoveryModule, eventEmitter.EventEmitterModule],
24351
24356
  providers: [
24352
24357
  ...IoC,
@@ -24369,9 +24374,9 @@ exports.EntityManagerModule = class EntityManagerModule {
24369
24374
  };
24370
24375
  exports.EntityManagerModule = __decorate([
24371
24376
  common.Module({
24372
- imports: ModuleData$a.imports,
24373
- providers: ModuleData$a.providers,
24374
- exports: ModuleData$a.exports,
24377
+ imports: ModuleData$9.imports,
24378
+ providers: ModuleData$9.providers,
24379
+ exports: ModuleData$9.exports,
24375
24380
  }),
24376
24381
  __metadata("design:paramtypes", [exports.EntityManagerRegistry])
24377
24382
  ], exports.EntityManagerModule);
@@ -24602,7 +24607,7 @@ AuthenticationMiddleware = __decorate([
24602
24607
  ], AuthenticationMiddleware);
24603
24608
 
24604
24609
  var AuthenticationModule_1;
24605
- const ModuleData$9 = {
24610
+ const ModuleData$8 = {
24606
24611
  imports: [exports.EntityManagerModule, jwt.JwtModule],
24607
24612
  providers: [
24608
24613
  AuthenticationServicesResolver,
@@ -24615,13 +24620,19 @@ const ModuleData$9 = {
24615
24620
  exports: [...Services$2],
24616
24621
  };
24617
24622
  exports.AuthenticationModule = AuthenticationModule_1 = class AuthenticationModule {
24623
+ /**
24624
+ * @deprecated use initialize instead
24625
+ */
24618
24626
  static forRoot(input) {
24619
24627
  authSettings.initialize(input);
24620
24628
  return {
24621
24629
  module: AuthenticationModule_1,
24622
- ...ModuleData$9,
24630
+ ...ModuleData$8,
24623
24631
  };
24624
24632
  }
24633
+ static initialize(input) {
24634
+ authSettings.initialize(input);
24635
+ }
24625
24636
  configure(consumer) {
24626
24637
  consumer
24627
24638
  .apply(appSessionMiddleware)
@@ -24632,7 +24643,7 @@ exports.AuthenticationModule = AuthenticationModule_1 = class AuthenticationModu
24632
24643
  };
24633
24644
  exports.AuthenticationModule = AuthenticationModule_1 = __decorate([
24634
24645
  common.Module({
24635
- ...ModuleData$9,
24646
+ ...ModuleData$8,
24636
24647
  })
24637
24648
  ], exports.AuthenticationModule);
24638
24649
 
@@ -34834,7 +34845,7 @@ const JobResolverProviders = [JobsProviderFactory];
34834
34845
  const JobTasks = [JobsMonitorTask, JobsSchedulerTask];
34835
34846
 
34836
34847
  var JobsModule_1;
34837
- const ModuleData$8 = {
34848
+ const ModuleData$7 = {
34838
34849
  providers: [
34839
34850
  ...JobsProviders,
34840
34851
  ...JobTasks,
@@ -34854,17 +34865,23 @@ exports.JobsModule = JobsModule_1 = class JobsModule {
34854
34865
  this.jobsScheduler.register();
34855
34866
  await this.jobsProviderFactory.initialize();
34856
34867
  }
34868
+ /**
34869
+ * @deprecated use initialize instead
34870
+ */
34857
34871
  static forRoot(input) {
34858
34872
  jobsSettings.initialize(input);
34859
34873
  return {
34860
34874
  module: JobsModule_1,
34861
- ...ModuleData$8,
34875
+ ...ModuleData$7,
34862
34876
  };
34863
34877
  }
34878
+ static initialize(input) {
34879
+ jobsSettings.initialize(input);
34880
+ }
34864
34881
  };
34865
34882
  exports.JobsModule = JobsModule_1 = __decorate([
34866
34883
  common.Module({
34867
- ...ModuleData$8,
34884
+ ...ModuleData$7,
34868
34885
  }),
34869
34886
  __metadata("design:paramtypes", [JobsScheduler,
34870
34887
  JobsProviderFactory])
@@ -35087,30 +35104,22 @@ exports.TasksService = TasksService_1 = __decorate([
35087
35104
 
35088
35105
  const TaskModuleServices = [exports.TasksService];
35089
35106
 
35090
- var TasksModule_1;
35091
- const ModuleData$7 = {
35092
- imports: [exports.EntityManagerModule],
35093
- providers: [TasksInitializer, ...TasksModuleProviders, ...TaskModuleServices],
35094
- exports: [...TaskModuleServices],
35095
- };
35096
- exports.TasksModule = TasksModule_1 = class TasksModule {
35107
+ exports.TasksModule = class TasksModule {
35097
35108
  constructor(scheduler) {
35098
35109
  this.scheduler = scheduler;
35099
35110
  }
35100
- static forRoot(input) {
35111
+ static initialize(input) {
35101
35112
  tasksSettings.initialize(input);
35102
- return {
35103
- module: TasksModule_1,
35104
- ...ModuleData$7,
35105
- };
35106
35113
  }
35107
35114
  onModuleDestroy() {
35108
35115
  this.scheduler.stopAllTasks();
35109
35116
  }
35110
35117
  };
35111
- exports.TasksModule = TasksModule_1 = __decorate([
35118
+ exports.TasksModule = __decorate([
35112
35119
  common.Module({
35113
- ...ModuleData$7,
35120
+ imports: [exports.EntityManagerModule],
35121
+ providers: [TasksInitializer, ...TasksModuleProviders, ...TaskModuleServices],
35122
+ exports: [...TaskModuleServices],
35114
35123
  }),
35115
35124
  __metadata("design:paramtypes", [TaskScheduler])
35116
35125
  ], exports.TasksModule);
@@ -35660,6 +35669,9 @@ const ModuleData$6 = {
35660
35669
  exports: [exports.AwsS3BucketProvider, AwsS3FileProvider],
35661
35670
  };
35662
35671
  exports.AwsBucketModule = AwsBucketModule_1 = class AwsBucketModule {
35672
+ /**
35673
+ * @deprecated use initialize instead
35674
+ */
35663
35675
  static forRoot(input) {
35664
35676
  awsBucketSettings.initialize(input);
35665
35677
  return {
@@ -35667,6 +35679,9 @@ exports.AwsBucketModule = AwsBucketModule_1 = class AwsBucketModule {
35667
35679
  ...ModuleData$6,
35668
35680
  };
35669
35681
  }
35682
+ static initialize(input) {
35683
+ awsBucketSettings.initialize(input);
35684
+ }
35670
35685
  };
35671
35686
  exports.AwsBucketModule = AwsBucketModule_1 = __decorate([
35672
35687
  common.Module({
@@ -40929,6 +40944,9 @@ const ModuleData$5 = {
40929
40944
  providers: [AwsSesEmailProvider],
40930
40945
  };
40931
40946
  exports.AwsEmailModule = AwsEmailModule_1 = class AwsEmailModule {
40947
+ /**
40948
+ * @deprecated use initialize instead
40949
+ */
40932
40950
  static forRoot(input) {
40933
40951
  awsSesSettings.initialize(input);
40934
40952
  return {
@@ -40936,6 +40954,9 @@ exports.AwsEmailModule = AwsEmailModule_1 = class AwsEmailModule {
40936
40954
  ...ModuleData$5,
40937
40955
  };
40938
40956
  }
40957
+ static initialize(input) {
40958
+ awsSesSettings.initialize(input);
40959
+ }
40939
40960
  };
40940
40961
  exports.AwsEmailModule = AwsEmailModule_1 = __decorate([
40941
40962
  common.Module({
@@ -41110,6 +41131,9 @@ const ModuleData$4 = {
41110
41131
  providers: [SendgridEmailProvider],
41111
41132
  };
41112
41133
  exports.SendgridEmailModule = SendgridEmailModule_1 = class SendgridEmailModule {
41134
+ /**
41135
+ * @deprecated use initialize instead
41136
+ */
41113
41137
  static forRoot(input) {
41114
41138
  sendgridSettings.initialize(input);
41115
41139
  return {
@@ -41117,6 +41141,9 @@ exports.SendgridEmailModule = SendgridEmailModule_1 = class SendgridEmailModule
41117
41141
  ...ModuleData$4,
41118
41142
  };
41119
41143
  }
41144
+ static initialize(input) {
41145
+ sendgridSettings.initialize(input);
41146
+ }
41120
41147
  };
41121
41148
  exports.SendgridEmailModule = SendgridEmailModule_1 = __decorate([
41122
41149
  common.Module({
@@ -41468,6 +41495,9 @@ const ModuleData$3 = {
41468
41495
  exports: [AwsJobsProvider],
41469
41496
  };
41470
41497
  exports.AwsJobsModule = AwsJobsModule_1 = class AwsJobsModule {
41498
+ /**
41499
+ * @deprecated use initialize instead
41500
+ */
41471
41501
  static forRoot(input) {
41472
41502
  awsBatchSettings.initialize(input);
41473
41503
  return {
@@ -41475,6 +41505,9 @@ exports.AwsJobsModule = AwsJobsModule_1 = class AwsJobsModule {
41475
41505
  ...ModuleData$3,
41476
41506
  };
41477
41507
  }
41508
+ static initialize(input) {
41509
+ awsBatchSettings.initialize(input);
41510
+ }
41478
41511
  };
41479
41512
  exports.AwsJobsModule = AwsJobsModule_1 = __decorate([
41480
41513
  common.Module({
@@ -41586,6 +41619,9 @@ const ModuleData$2 = {
41586
41619
  providers: [exports.AwsS3MediaProvider],
41587
41620
  };
41588
41621
  exports.AwsS3MediaModule = AwsS3MediaModule_1 = class AwsS3MediaModule {
41622
+ /**
41623
+ * @deprecated use initialize instead
41624
+ */
41589
41625
  static forRoot(input) {
41590
41626
  awsMediaSettings.initialize(input);
41591
41627
  return {
@@ -41593,6 +41629,9 @@ exports.AwsS3MediaModule = AwsS3MediaModule_1 = class AwsS3MediaModule {
41593
41629
  ...ModuleData$2,
41594
41630
  };
41595
41631
  }
41632
+ static initialize(input) {
41633
+ awsMediaSettings.initialize(input);
41634
+ }
41596
41635
  };
41597
41636
  exports.AwsS3MediaModule = AwsS3MediaModule_1 = __decorate([
41598
41637
  common.Module({
@@ -44554,6 +44593,9 @@ const ModuleData$1 = {
44554
44593
  providers: [exports.SanityMediaProvider],
44555
44594
  };
44556
44595
  exports.SanityMediaModule = SanityMediaModule_1 = class SanityMediaModule {
44596
+ /**
44597
+ * @deprecated use initialize instead
44598
+ */
44557
44599
  static forRoot(input) {
44558
44600
  sanityMediaSettings.initialize(input);
44559
44601
  return {
@@ -44561,6 +44603,9 @@ exports.SanityMediaModule = SanityMediaModule_1 = class SanityMediaModule {
44561
44603
  ...ModuleData$1,
44562
44604
  };
44563
44605
  }
44606
+ static initialize(input) {
44607
+ sanityMediaSettings.initialize(input);
44608
+ }
44564
44609
  };
44565
44610
  exports.SanityMediaModule = SanityMediaModule_1 = __decorate([
44566
44611
  common.Module({
@@ -44789,6 +44834,9 @@ const ModuleData = {
44789
44834
  providers: [exports.AwsSecretsProvider],
44790
44835
  };
44791
44836
  exports.AwsSecretsModule = AwsSecretsModule_1 = class AwsSecretsModule {
44837
+ /**
44838
+ * @deprecated use initialize instead
44839
+ */
44792
44840
  static forRoot(input) {
44793
44841
  awsSecretsSettings.initialize(input);
44794
44842
  return {
@@ -44796,6 +44844,9 @@ exports.AwsSecretsModule = AwsSecretsModule_1 = class AwsSecretsModule {
44796
44844
  ...ModuleData,
44797
44845
  };
44798
44846
  }
44847
+ static initialize(input) {
44848
+ awsSecretsSettings.initialize(input);
44849
+ }
44799
44850
  };
44800
44851
  exports.AwsSecretsModule = AwsSecretsModule_1 = __decorate([
44801
44852
  common.Module({