@quatrain/storage-supabase 1.1.25 → 1.1.26

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.
Files changed (2) hide show
  1. package/README.md +19 -10
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,28 +1,37 @@
1
1
  # @quatrain/storage-supabase
2
2
 
3
- A storage adapter for Supabase Storage. This package allows Quatrain to use Supabase for S3-compatible object storage.
3
+ The Supabase Storage adapter for `@quatrain/storage`.
4
4
 
5
- ## Features
5
+ ## Introduction
6
6
 
7
- - Implements the `@quatrain/storage` abstract adapter.
8
- - Works with both Supabase SaaS and self-hosted instances.
9
- - Integrates with Supabase's policies for fine-grained file access control.
10
- - Uses the `@supabase/supabase-js` library.
7
+ This adapter enables file uploads and retrievals directly into Supabase Storage buckets, bridging Quatrain's API with the Supabase client.
11
8
 
12
9
  ## Installation
13
10
 
14
11
  ```bash
15
12
  npm install @quatrain/storage-supabase @supabase/supabase-js
13
+ # or
14
+ yarn add @quatrain/storage-supabase @supabase/supabase-js
16
15
  ```
17
16
 
18
- ## Usage
17
+ ## Configuration
18
+
19
+ Initialize the adapter using your Supabase project URL and service role key.
19
20
 
20
21
  ```typescript
21
22
  import { Storage } from '@quatrain/storage'
22
23
  import { SupabaseStorageAdapter } from '@quatrain/storage-supabase'
23
24
 
24
- const adapter = new SupabaseStorageAdapter({
25
- config: { url: '...', anonKey: '...' },
25
+ const supabaseAdapter = new SupabaseStorageAdapter({
26
+ config: {
27
+ url: process.env.SUPABASE_URL,
28
+ key: process.env.SUPABASE_SERVICE_ROLE_KEY
29
+ }
26
30
  })
27
- Storage.addAdapter(adapter, 'default', true)
31
+
32
+ Storage.addAdapter('supabase', supabaseAdapter, true)
28
33
  ```
34
+
35
+ ## License
36
+
37
+ AGPL-3.0-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/storage-supabase",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "Storage adapter for Supabase Storage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,8 +25,8 @@
25
25
  "typescript": "^5.1.5"
26
26
  },
27
27
  "dependencies": {
28
- "@quatrain/core": "^1.1.48",
29
- "@quatrain/storage": "^1.1.30",
28
+ "@quatrain/core": "^1.1.49",
29
+ "@quatrain/storage": "^1.1.31",
30
30
  "@supabase/storage-js": "^2.7.2",
31
31
  "@supabase/supabase-js": "^2.87.3"
32
32
  },