@punks/backend-entity-manager 0.0.243 → 0.0.245

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
@@ -21252,7 +21252,7 @@ exports.ModulesContainerProvider = class ModulesContainerProvider {
21252
21252
  exports.ModulesContainerProvider = __decorate([
21253
21253
  common.Injectable()
21254
21254
  ], exports.ModulesContainerProvider);
21255
- let CustomDiscoveryService = class CustomDiscoveryService {
21255
+ exports.CustomDiscoveryService = class CustomDiscoveryService {
21256
21256
  constructor(modulesContainer, metadataScanner) {
21257
21257
  this.modulesContainer = modulesContainer;
21258
21258
  this.metadataScanner = metadataScanner;
@@ -21406,30 +21406,30 @@ let CustomDiscoveryService = class CustomDiscoveryService {
21406
21406
  return [...this.modulesContainer.getModules()];
21407
21407
  }
21408
21408
  };
21409
- CustomDiscoveryService = __decorate([
21409
+ exports.CustomDiscoveryService = __decorate([
21410
21410
  common.Injectable(),
21411
21411
  __metadata("design:paramtypes", [exports.ModulesContainerProvider,
21412
21412
  metadataScanner.MetadataScanner])
21413
- ], CustomDiscoveryService);
21413
+ ], exports.CustomDiscoveryService);
21414
21414
  /**
21415
21415
  * Exposes a query API over top of the NestJS Module container
21416
21416
  *
21417
21417
  * @export
21418
21418
  * @class DiscoveryModule
21419
21419
  */
21420
- let CustomDiscoveryModule = class CustomDiscoveryModule {
21420
+ exports.CustomDiscoveryModule = class CustomDiscoveryModule {
21421
21421
  };
21422
- CustomDiscoveryModule = __decorate([
21422
+ exports.CustomDiscoveryModule = __decorate([
21423
21423
  common.Global(),
21424
21424
  common.Module({
21425
21425
  providers: [
21426
- CustomDiscoveryService,
21426
+ exports.CustomDiscoveryService,
21427
21427
  metadataScanner.MetadataScanner,
21428
21428
  exports.ModulesContainerProvider,
21429
21429
  ],
21430
- exports: [CustomDiscoveryService],
21430
+ exports: [exports.CustomDiscoveryService],
21431
21431
  })
21432
- ], CustomDiscoveryModule);
21432
+ ], exports.CustomDiscoveryModule);
21433
21433
 
21434
21434
  exports.EntityManagerService = class EntityManagerService {
21435
21435
  constructor(registry) {
@@ -22960,7 +22960,7 @@ exports.EntityManagerInitializer = EntityManagerInitializer_1 = class EntityMana
22960
22960
  };
22961
22961
  exports.EntityManagerInitializer = EntityManagerInitializer_1 = __decorate([
22962
22962
  common.Injectable(),
22963
- __metadata("design:paramtypes", [CustomDiscoveryService,
22963
+ __metadata("design:paramtypes", [exports.CustomDiscoveryService,
22964
22964
  exports.EntityManagerRegistry,
22965
22965
  NestEventEmitter])
22966
22966
  ], exports.EntityManagerInitializer);
@@ -23102,7 +23102,7 @@ exports.EntityManagerModule = class EntityManagerModule {
23102
23102
  };
23103
23103
  exports.EntityManagerModule = __decorate([
23104
23104
  common.Module({
23105
- imports: [CustomDiscoveryModule, eventEmitter.EventEmitterModule],
23105
+ imports: [exports.CustomDiscoveryModule, eventEmitter.EventEmitterModule],
23106
23106
  providers: [
23107
23107
  ...IoC,
23108
23108
  ...Providers,
@@ -23207,7 +23207,7 @@ let AuthenticationInitializer = AuthenticationInitializer_1 = class Authenticati
23207
23207
  };
23208
23208
  AuthenticationInitializer = AuthenticationInitializer_1 = __decorate([
23209
23209
  WpAppInitializer(),
23210
- __metadata("design:paramtypes", [CustomDiscoveryService,
23210
+ __metadata("design:paramtypes", [exports.CustomDiscoveryService,
23211
23211
  AuthenticationServicesResolver])
23212
23212
  ], AuthenticationInitializer);
23213
23213
 
@@ -23763,6 +23763,34 @@ exports.AwsS3BucketProvider = class AwsS3BucketProvider {
23763
23763
  throw new AwsS3BucketError(`AwsS3Bucket | fileDelete | ${input.bucket} | ${input.filePath} | Error -> ${e.message}`);
23764
23764
  }
23765
23765
  }
23766
+ async fileCopy(input) {
23767
+ try {
23768
+ await this.client.send(new clientS3.CopyObjectCommand({
23769
+ CopySource: `${input.bucket}/${input.filePath}`,
23770
+ Bucket: input.targetBucket,
23771
+ Key: input.targetPath,
23772
+ }));
23773
+ }
23774
+ catch (e) {
23775
+ throw new AwsS3BucketError(`AwsS3Bucket | fileCopy | ${input.bucket} | ${input.filePath} | Error -> ${e.message}`);
23776
+ }
23777
+ }
23778
+ async fileMove(input) {
23779
+ try {
23780
+ await this.client.send(new clientS3.CopyObjectCommand({
23781
+ CopySource: `${input.bucket}/${input.filePath}`,
23782
+ Bucket: input.targetBucket,
23783
+ Key: input.targetPath,
23784
+ }));
23785
+ await this.client.send(new clientS3.DeleteObjectCommand({
23786
+ Bucket: input.bucket,
23787
+ Key: input.filePath,
23788
+ }));
23789
+ }
23790
+ catch (e) {
23791
+ throw new AwsS3BucketError(`AwsS3Bucket | fileMove | ${input.bucket} | ${input.filePath} | Error -> ${e.message}`);
23792
+ }
23793
+ }
23766
23794
  };
23767
23795
  exports.AwsS3BucketProvider = __decorate([
23768
23796
  WpBucketProvider("awsS3"),