clhq-s3-module 1.1.0-alpha.119 → 1.1.0-alpha.121

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.
@@ -83,7 +83,7 @@ let TimelineStorageService = class TimelineStorageService {
83
83
  ContentType: 'application/json',
84
84
  ContentEncoding: 'gzip',
85
85
  Metadata: {
86
- 'version': version.toString(),
86
+ version: version.toString(),
87
87
  'compressed-size': compressed.length.toString(),
88
88
  'saved-at': new Date().toISOString(),
89
89
  },
@@ -94,7 +94,7 @@ let TimelineStorageService = class TimelineStorageService {
94
94
  async listVersions(projectId) {
95
95
  const prefix = `client/projects/${projectId}/versions/`;
96
96
  const objects = await this.s3Service.listObjects({ Prefix: prefix });
97
- return objects.Contents?.map(obj => obj.Key) || [];
97
+ return objects.Contents?.map((obj) => obj.Key) || [];
98
98
  }
99
99
  async getTimelineVersion(projectId, version) {
100
100
  const key = `client/projects/${projectId}/versions/v${version}.json.gz`;
@@ -25,7 +25,7 @@ class CompressionUtil {
25
25
  const k = 1024;
26
26
  const sizes = ['Bytes', 'KB', 'MB', 'GB'];
27
27
  const i = Math.floor(Math.log(bytes) / Math.log(k));
28
- return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i];
28
+ return Math.round((bytes / Math.pow(k, i)) * 100) / 100 + ' ' + sizes[i];
29
29
  }
30
30
  static async testCompression(sampleData) {
31
31
  console.log('\n🧪 Testing Compression...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clhq-s3-module",
3
- "version": "1.1.0-alpha.119",
3
+ "version": "1.1.0-alpha.121",
4
4
  "description": "Reusable S3 service module for NestJS.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",