@quatrain/storage-supabase 1.1.6 → 1.1.11
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.
|
@@ -8,6 +8,7 @@ export declare class SupabaseStorageAdapter extends AbstractStorageAdapter {
|
|
|
8
8
|
protected _client: SupabaseClient;
|
|
9
9
|
constructor(params: StorageParameters);
|
|
10
10
|
getDriver(): SupabaseClient<any, "public", any>;
|
|
11
|
+
getMetaData(file: FileType): Promise<FileType>;
|
|
11
12
|
streamToBuffer(stream: Stream): Promise<Buffer>;
|
|
12
13
|
create(file: FileType, stream: Readable): Promise<FileType>;
|
|
13
14
|
copy(file: FileType, destFile: FileType): Promise<void>;
|
|
@@ -24,6 +24,9 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
24
24
|
getDriver() {
|
|
25
25
|
return this._client;
|
|
26
26
|
}
|
|
27
|
+
getMetaData(file) {
|
|
28
|
+
return new Promise(() => file);
|
|
29
|
+
}
|
|
27
30
|
streamToBuffer(stream) {
|
|
28
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
32
|
return new Promise((resolve, reject) => {
|
|
@@ -146,8 +149,8 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
|
|
|
146
149
|
throw new Error(`Unable to get signed upload url: ${error}`);
|
|
147
150
|
}
|
|
148
151
|
return {
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
url: data === null || data === void 0 ? void 0 : data.signedUrl,
|
|
153
|
+
method: 'PUT',
|
|
151
154
|
accept: file.contentType || 'application/octet-stream',
|
|
152
155
|
expiresIn: 7200, // fixed value in Supabase
|
|
153
156
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/storage-supabase",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Storage adapter for Supabase Storage",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"typescript": "^5.1.5"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@quatrain/core": "^1.1.
|
|
26
|
-
"@quatrain/storage": "^1.1.
|
|
25
|
+
"@quatrain/core": "^1.1.15",
|
|
26
|
+
"@quatrain/storage": "^1.1.13",
|
|
27
27
|
"@supabase/supabase-js": "^2.45.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|