@quatrain/storage-s3 1.2.9 → 1.2.10

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.
@@ -88,11 +88,13 @@ export declare class S3StorageAdapter extends AbstractStorageAdapter {
88
88
  */
89
89
  getMetaData(file: FileType): Promise<FileType>;
90
90
  /**
91
- * Directly pipes an S3 object to an external HTTP response or stream.
91
+ * Fetches and streams an S3 object into an external HTTP response or writable stream.
92
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
93
+ * as a defensive fallback for non-stream response objects.
92
94
  *
93
- * @param file - Target file.
94
- * @param res - The response or writable stream.
95
- * @returns The piped stream instance.
95
+ * @param file - Target file footprint.
96
+ * @param res - The response or writable stream (supports .pipe(), .send(), or .write()/.end()).
97
+ * @returns The piped stream instance or response completion.
96
98
  */
97
99
  stream(file: FileType, res: any): Promise<any>;
98
100
  /**
@@ -242,11 +242,13 @@ class S3StorageAdapter extends storage_1.AbstractStorageAdapter {
242
242
  });
243
243
  }
244
244
  /**
245
- * Directly pipes an S3 object to an external HTTP response or stream.
245
+ * Fetches and streams an S3 object into an external HTTP response or writable stream.
246
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
247
+ * as a defensive fallback for non-stream response objects.
246
248
  *
247
- * @param file - Target file.
248
- * @param res - The response or writable stream.
249
- * @returns The piped stream instance.
249
+ * @param file - Target file footprint.
250
+ * @param res - The response or writable stream (supports .pipe(), .send(), or .write()/.end()).
251
+ * @returns The piped stream instance or response completion.
250
252
  */
251
253
  stream(file, res) {
252
254
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/storage-s3",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "description": "Storage adapter for S3 compatible services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@aws-sdk/client-s3": "^3.337.0",
35
35
  "@aws-sdk/s3-request-presigner": "^3.342.0",
36
- "@quatrain/storage": "^1.2.14",
36
+ "@quatrain/storage": "^1.2.15",
37
37
  "fs-extra": "^11.2.0"
38
38
  },
39
39
  "scripts": {
@@ -278,11 +278,13 @@ export class S3StorageAdapter extends AbstractStorageAdapter {
278
278
  }
279
279
 
280
280
  /**
281
- * Directly pipes an S3 object to an external HTTP response or stream.
281
+ * Fetches and streams an S3 object into an external HTTP response or writable stream.
282
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
283
+ * as a defensive fallback for non-stream response objects.
282
284
  *
283
- * @param file - Target file.
284
- * @param res - The response or writable stream.
285
- * @returns The piped stream instance.
285
+ * @param file - Target file footprint.
286
+ * @param res - The response or writable stream (supports .pipe(), .send(), or .write()/.end()).
287
+ * @returns The piped stream instance or response completion.
286
288
  */
287
289
  async stream(file: FileType, res: any) {
288
290
  const command = new GetObjectCommand({