@airnauts/comments-storage-vercel-blob 0.2.0 → 0.4.0

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 +6 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -12,11 +12,15 @@ pnpm add @airnauts/comments-storage-vercel-blob
12
12
  ## Usage
13
13
 
14
14
  ```ts
15
- import { VercelBlobStorage } from '@airnauts/comments-storage-vercel-blob'
15
+ import { vercelBlobStorage } from '@airnauts/comments-storage-vercel-blob'
16
16
 
17
- const storage = new VercelBlobStorage() // reads BLOB_READ_WRITE_TOKEN
17
+ const storage = vercelBlobStorage({ token: process.env.BLOB_READ_WRITE_TOKEN! })
18
18
  ```
19
19
 
20
+ The token is passed explicitly — the adapter never reads `process.env` itself. Pass
21
+ an optional `prefix` (e.g. `'staging/'`) to namespace keys. The `VercelBlobStorage`
22
+ class is also exported if you prefer `new VercelBlobStorage(opts)`.
23
+
20
24
  Pass `storage` to `createCommentsServer` from `@airnauts/comments-server`.
21
25
 
22
26
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airnauts/comments-storage-vercel-blob",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Vercel Blob attachment-storage adapter for the Airnauts commenting tool server.",
5
5
  "keywords": [
6
6
  "comments",
@@ -41,8 +41,8 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@vercel/blob": "^1.1.1",
44
- "@airnauts/comments-core": "^0.1.0",
45
- "@airnauts/comments-server": "^0.1.0"
44
+ "@airnauts/comments-core": "^0.4.0",
45
+ "@airnauts/comments-server": "^0.4.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@airnauts/comments-test-support": "0.0.0"