@frogbotai/storage-r2 0.28.0 → 0.29.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.
package/README.md CHANGED
@@ -15,14 +15,13 @@ import { buildConfig } from 'frogbot';
15
15
  import { r2Storage } from '@frogbotai/storage-r2';
16
16
 
17
17
  export default buildConfig({
18
- storage: [
18
+ plugins: [
19
19
  r2Storage({
20
20
  bucket: env.R2_BUCKET,
21
- collections: {
22
- media: true,
23
- },
24
21
  }),
25
22
  ],
26
23
  // ...rest of config
27
24
  });
28
25
  ```
26
+
27
+ The adapter stores files for FrogBot's files collection and chat assets automatically. List your own upload collections in `collections`, for example `collections: { media: true }`. See [Storage Adapters](https://docs.frogbot.ai/upload/storage-adapters) for every option.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { r2Storage as _r2Storage } from '@payloadcms/storage-r2';
2
2
  import type { Plugin } from 'frogbot';
3
- export type { R2StorageOptions } from '@payloadcms/storage-r2';
4
- type R2StorageOptions = Parameters<typeof _r2Storage>[0];
3
+ import type { StorageAdapterOptions } from 'frogbot/internal';
4
+ type PayloadR2StorageOptions = Parameters<typeof _r2Storage>[0];
5
+ export type R2StorageOptions = StorageAdapterOptions<PayloadR2StorageOptions>;
5
6
  export declare const r2Storage: (options: R2StorageOptions) => Plugin;
7
+ export {};
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,MACZ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG9D,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,SAAS,YAAa,gBAAgB,KAAG,MACoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  import { r2Storage as _r2Storage } from '@payloadcms/storage-r2';
2
- export const r2Storage = (options) => _r2Storage(options);
2
+ import { storageAdapter } from 'frogbot/internal';
3
+ export const r2Storage = (options) => storageAdapter({ options, plugin: _r2Storage });
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAOjE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAyB,EAAU,EAAE,CAC7D,UAAU,CAAC,OAAO,CAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAyB,EAAU,EAAE,CAC7D,cAAc,CAA0B,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frogbotai/storage-r2",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Cloudflare R2 storage adapter for FrogBot.",
5
5
  "license": "MIT",
6
6
  "author": "Colby Gilbert",
@@ -33,11 +33,11 @@
33
33
  "@payloadcms/storage-r2": "3.90.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "frogbot": "0.28.0"
36
+ "frogbot": "0.29.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "5.6.2",
40
- "frogbot": "0.28.0"
40
+ "frogbot": "0.29.0"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"