import type { BetterstartIntegrationDefinition } from '@cli-types/integration-engine/integrations.js' export const r2Integration: BetterstartIntegrationDefinition = { id: 'r2', title: 'Cloudflare R2', description: 'Remote media storage for hosted deployments', kind: 'storage', version: '1.0.0', dependencies: [], conflicts: ['vercel-blob', 'railway-bucket'], files: [ { outputPath: 'lib/actions/storage/sanitize-filename.ts', templatePath: '../_shared/actions/sanitize-filename.ts' }, { outputPath: 'lib/actions/storage/object-key.ts', templatePath: '../_shared/actions/object-key.ts' }, { outputPath: 'lib/actions/r2/get-config.ts', templatePath: 'actions/get-config.ts' }, { outputPath: 'lib/actions/r2/get-client.ts', templatePath: 'actions/get-client.ts' }, { outputPath: 'lib/actions/r2/provider.ts', templatePath: 'actions/provider.ts' } ], packageDependencies: ['@aws-sdk/client-s3'], devDependencies: [], capabilities: { storageProvider: { provider: 'r2', importPath: '@admin/actions/r2/provider', exportName: 'r2StorageProvider' } }, envSections: [ { header: 'Storage (Cloudflare R2)', vars: [ { key: 'BETTERSTART_R2_ACCOUNT_ID', value: '' }, { key: 'BETTERSTART_R2_ACCESS_KEY_ID', value: '' }, { key: 'BETTERSTART_R2_SECRET_ACCESS_KEY', value: '' }, { key: 'BETTERSTART_R2_BUCKET_NAME', value: '' }, { key: 'BETTERSTART_R2_PUBLIC_URL', value: '' } ] } ], configure: 'r2' }