@punks/backend-entity-manager 0.0.242 → 0.0.244

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
@@ -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"),
@@ -23829,6 +23857,7 @@ AwsS3FileProvider = __decorate([
23829
23857
  var AwsBucketModule_1;
23830
23858
  const ModuleData$5 = {
23831
23859
  providers: [exports.AwsS3BucketProvider, AwsS3FileProvider],
23860
+ exports: [exports.AwsS3BucketProvider, AwsS3FileProvider],
23832
23861
  };
23833
23862
  exports.AwsBucketModule = AwsBucketModule_1 = class AwsBucketModule {
23834
23863
  static forRoot(input) {