@quatrain/storage-supabase 1.2.11 → 1.2.12

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.
@@ -96,11 +96,13 @@ export declare class SupabaseStorageAdapter extends AbstractStorageAdapter {
96
96
  */
97
97
  getReadable(file: FileType): Promise<Readable>;
98
98
  /**
99
- * Fetches and pipes the file content into the given response stream.
99
+ * Fetches and streams the file content into the given response stream or HTTP response object.
100
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
101
+ * as a defensive fallback for non-stream response objects.
100
102
  *
101
- * @param file - File to stream.
102
- * @param res - Writable stream or HTTP response object.
103
- * @returns The piped stream instance.
103
+ * @param file - File footprint to stream.
104
+ * @param res - Writable stream or HTTP response object (supports .pipe(), .send(), or .write()/.end()).
105
+ * @returns The piped stream instance or response completion.
104
106
  */
105
107
  stream(file: FileType, res: any): Promise<any>;
106
108
  /**
@@ -275,11 +275,13 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
275
275
  });
276
276
  }
277
277
  /**
278
- * Fetches and pipes the file content into the given response stream.
278
+ * Fetches and streams the file content into the given response stream or HTTP response object.
279
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
280
+ * as a defensive fallback for non-stream response objects.
279
281
  *
280
- * @param file - File to stream.
281
- * @param res - Writable stream or HTTP response object.
282
- * @returns The piped stream instance.
282
+ * @param file - File footprint to stream.
283
+ * @param res - Writable stream or HTTP response object (supports .pipe(), .send(), or .write()/.end()).
284
+ * @returns The piped stream instance or response completion.
283
285
  */
284
286
  stream(file, res) {
285
287
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/storage-supabase",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "Storage adapter for Supabase Storage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,8 +31,8 @@
31
31
  "typescript": "^5.1.5"
32
32
  },
33
33
  "dependencies": {
34
- "@quatrain/core": "^1.2.18",
35
- "@quatrain/storage": "^1.2.14",
34
+ "@quatrain/core": "^1.2.20",
35
+ "@quatrain/storage": "^1.2.15",
36
36
  "@supabase/storage-js": "^2.7.2",
37
37
  "@supabase/supabase-js": "^2.108.2"
38
38
  },
@@ -289,11 +289,13 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
289
289
  }
290
290
 
291
291
  /**
292
- * Fetches and pipes the file content into the given response stream.
292
+ * Fetches and streams the file content into the given response stream or HTTP response object.
293
+ * Piped directly if `res` is a Writable stream (implements `.on()`), or dispatches via `.send()` / `.write()`
294
+ * as a defensive fallback for non-stream response objects.
293
295
  *
294
- * @param file - File to stream.
295
- * @param res - Writable stream or HTTP response object.
296
- * @returns The piped stream instance.
296
+ * @param file - File footprint to stream.
297
+ * @param res - Writable stream or HTTP response object (supports .pipe(), .send(), or .write()/.end()).
298
+ * @returns The piped stream instance or response completion.
297
299
  */
298
300
  async stream(file: FileType, res: any) {
299
301
  Storage.debug(`GET Stream : ${file.ref}`)