@hdriel/aws-utils 1.0.3 → 1.0.4

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/index.cjs CHANGED
@@ -706,6 +706,7 @@ var S3BucketUtil = class _S3BucketUtil {
706
706
  return content.Key !== normalizedPath && !((_a2 = content.Key) == null ? void 0 : _a2.endsWith("/"));
707
707
  }).map((content) => __spreadProps(__spreadValues({}, content), {
708
708
  Name: content.Key.replace(normalizedPath, "") || content.Key,
709
+ Location: `${this.link}${content.Key}`,
709
710
  LastModified: new Date(content.LastModified)
710
711
  }));
711
712
  return { directories, files };
@@ -744,6 +745,7 @@ var S3BucketUtil = class _S3BucketUtil {
744
745
  return content.Key !== normalizedPath && !((_a2 = content.Key) == null ? void 0 : _a2.endsWith("/"));
745
746
  }).map((content) => __spreadProps(__spreadValues({}, content), {
746
747
  Name: content.Key.replace(normalizedPath, "") || content.Key,
748
+ Location: `${this.link}${content.Key}`,
747
749
  LastModified: new Date(content.LastModified)
748
750
  }));
749
751
  }
@@ -790,6 +792,7 @@ var S3BucketUtil = class _S3BucketUtil {
790
792
  allFiles.push(__spreadProps(__spreadValues({}, content), {
791
793
  Name: filename,
792
794
  Path: fullPath,
795
+ Location: `${this.link}${content.Key}`,
793
796
  LastModified: new Date(content.LastModified)
794
797
  }));
795
798
  }
@@ -846,6 +849,7 @@ var S3BucketUtil = class _S3BucketUtil {
846
849
  treeNode.children.push({
847
850
  path: "/" + file.Key,
848
851
  name: file.Name,
852
+ location: `${this.link}${file.Key}`,
849
853
  type: "file",
850
854
  size: file.Size,
851
855
  lastModified: file.LastModified
@@ -888,6 +892,7 @@ var S3BucketUtil = class _S3BucketUtil {
888
892
  var _a3, _b2;
889
893
  return __spreadProps(__spreadValues({}, content), {
890
894
  Name: (_b2 = (_a3 = content.Key) == null ? void 0 : _a3.replace(prefix, "")) != null ? _b2 : content.Key,
895
+ Location: `${this.link}${content.Key}`,
891
896
  LastModified: content.LastModified ? new Date(content.LastModified) : null
892
897
  });
893
898
  }
@@ -927,6 +932,7 @@ var S3BucketUtil = class _S3BucketUtil {
927
932
  var _a3, _b2;
928
933
  return __spreadProps(__spreadValues({}, content), {
929
934
  Name: (_b2 = (_a3 = content.Key) == null ? void 0 : _a3.replace(prefix, "")) != null ? _b2 : content.Key,
935
+ Location: `${this.link}${content.Key}`,
930
936
  LastModified: content.LastModified ? new Date(content.LastModified) : null
931
937
  });
932
938
  }
package/dist/index.d.cts CHANGED
@@ -228,14 +228,18 @@ declare class S3BucketUtil {
228
228
  */
229
229
  directoryTree(directoryPath?: string): Promise<TreeDirectoryItem>;
230
230
  fileInfo(filePath: string): Promise<HeadObjectCommandOutput>;
231
- fileListInfo(directoryPath?: string, fileNamePrefix?: string): Promise<ContentFile[]>;
231
+ fileListInfo(directoryPath?: string, fileNamePrefix?: string): Promise<(ContentFile & {
232
+ Location: string;
233
+ })[]>;
232
234
  fileListInfoPaginated(directoryPath?: string, { fileNamePrefix, pageNumber, // 0-based: page 0 = items 0-99, page 1 = items 100-199, page 2 = items 200-299
233
235
  pageSize, }?: {
234
236
  fileNamePrefix?: string;
235
237
  pageSize?: number;
236
238
  pageNumber?: number;
237
239
  }): Promise<{
238
- files: ContentFile[];
240
+ files: (ContentFile & {
241
+ Location: string;
242
+ })[];
239
243
  totalFetched: number;
240
244
  }>;
241
245
  taggingFile(filePath: string, tagVersion?: string): Promise<boolean>;
package/dist/index.d.ts CHANGED
@@ -228,14 +228,18 @@ declare class S3BucketUtil {
228
228
  */
229
229
  directoryTree(directoryPath?: string): Promise<TreeDirectoryItem>;
230
230
  fileInfo(filePath: string): Promise<HeadObjectCommandOutput>;
231
- fileListInfo(directoryPath?: string, fileNamePrefix?: string): Promise<ContentFile[]>;
231
+ fileListInfo(directoryPath?: string, fileNamePrefix?: string): Promise<(ContentFile & {
232
+ Location: string;
233
+ })[]>;
232
234
  fileListInfoPaginated(directoryPath?: string, { fileNamePrefix, pageNumber, // 0-based: page 0 = items 0-99, page 1 = items 100-199, page 2 = items 200-299
233
235
  pageSize, }?: {
234
236
  fileNamePrefix?: string;
235
237
  pageSize?: number;
236
238
  pageNumber?: number;
237
239
  }): Promise<{
238
- files: ContentFile[];
240
+ files: (ContentFile & {
241
+ Location: string;
242
+ })[];
239
243
  totalFetched: number;
240
244
  }>;
241
245
  taggingFile(filePath: string, tagVersion?: string): Promise<boolean>;
package/dist/index.js CHANGED
@@ -690,6 +690,7 @@ var S3BucketUtil = class _S3BucketUtil {
690
690
  return content.Key !== normalizedPath && !((_a2 = content.Key) == null ? void 0 : _a2.endsWith("/"));
691
691
  }).map((content) => __spreadProps(__spreadValues({}, content), {
692
692
  Name: content.Key.replace(normalizedPath, "") || content.Key,
693
+ Location: `${this.link}${content.Key}`,
693
694
  LastModified: new Date(content.LastModified)
694
695
  }));
695
696
  return { directories, files };
@@ -728,6 +729,7 @@ var S3BucketUtil = class _S3BucketUtil {
728
729
  return content.Key !== normalizedPath && !((_a2 = content.Key) == null ? void 0 : _a2.endsWith("/"));
729
730
  }).map((content) => __spreadProps(__spreadValues({}, content), {
730
731
  Name: content.Key.replace(normalizedPath, "") || content.Key,
732
+ Location: `${this.link}${content.Key}`,
731
733
  LastModified: new Date(content.LastModified)
732
734
  }));
733
735
  }
@@ -774,6 +776,7 @@ var S3BucketUtil = class _S3BucketUtil {
774
776
  allFiles.push(__spreadProps(__spreadValues({}, content), {
775
777
  Name: filename,
776
778
  Path: fullPath,
779
+ Location: `${this.link}${content.Key}`,
777
780
  LastModified: new Date(content.LastModified)
778
781
  }));
779
782
  }
@@ -830,6 +833,7 @@ var S3BucketUtil = class _S3BucketUtil {
830
833
  treeNode.children.push({
831
834
  path: "/" + file.Key,
832
835
  name: file.Name,
836
+ location: `${this.link}${file.Key}`,
833
837
  type: "file",
834
838
  size: file.Size,
835
839
  lastModified: file.LastModified
@@ -872,6 +876,7 @@ var S3BucketUtil = class _S3BucketUtil {
872
876
  var _a3, _b2;
873
877
  return __spreadProps(__spreadValues({}, content), {
874
878
  Name: (_b2 = (_a3 = content.Key) == null ? void 0 : _a3.replace(prefix, "")) != null ? _b2 : content.Key,
879
+ Location: `${this.link}${content.Key}`,
875
880
  LastModified: content.LastModified ? new Date(content.LastModified) : null
876
881
  });
877
882
  }
@@ -911,6 +916,7 @@ var S3BucketUtil = class _S3BucketUtil {
911
916
  var _a3, _b2;
912
917
  return __spreadProps(__spreadValues({}, content), {
913
918
  Name: (_b2 = (_a3 = content.Key) == null ? void 0 : _a3.replace(prefix, "")) != null ? _b2 : content.Key,
919
+ Location: `${this.link}${content.Key}`,
914
920
  LastModified: content.LastModified ? new Date(content.LastModified) : null
915
921
  });
916
922
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hdriel/aws-utils",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Simplified AWS SDK (v3) utilities for S3 (upload, download, streaming) with TypeScript support",
5
5
  "author": "Hadriel Benjo (https://github.com/hdriel)",
6
6
  "type": "module",