S3 storage adapter for OC (OpenComponents), enabling S3-compatible storage backends for OC registries. Current stable version 2.2.2 integrates with OC v1.x registries. Provides an adapter class implementing the OC storage interface to store and retrieve components and templates from AWS S3 or compatible services (e.g., MinIO). Key differentiator: minimal configuration, built-in retry and error handling, and supports modern S3 features like server-side encryption. Release cadence is ad-hoc, typically with bug fixes and compatibility updates. TypeScript definitions included.
npm install oc-s3-storage-adapterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes S3StorageAdapter with an S3 client and bucket, then uses it as storage for an OC registry.
Create an S3 client via `new AWS.S3({...})` and pass it as `s3Client` option.Install aws-sdk v2 and ensure no v3 client is passed. Migrate to v3 only after adapter is updated.
Always append a trailing slash to keyPrefix, e.g., 'components/'.
Update constructor call: `new S3StorageAdapter({ s3Client: new AWS.S3({...}), bucket: '...' })`.Ensure you pass an instance of AWS.S3 from aws-sdk v2, e.g., `new AWS.S3({apiVersion: '2006-03-01'})`.Upgrade to adapter v2+ and pass `s3Client` as a top-level option directly: `new S3StorageAdapter({ s3Client, bucket })`.Verify IAM policy: must allow s3:ListBucket, s3:GetObject, and s3:PutObject on the bucket and prefix.