{"_id":"@byoc/s3-compatible","_rev":"4-c9678a53f3dcc53ceaea1138198a198c","name":"@byoc/s3-compatible","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"@byoc/s3-compatible","version":"0.2.0","keywords":["byoc","s3","cloudflare-r2","minio","wasabi","aws-s3","cloud-storage"],"author":{"name":"BYOC Team"},"license":"Apache-2.0","_id":"@byoc/s3-compatible@0.2.0","maintainers":[{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"}],"homepage":"https://github.com/Ajayvarmaramineni/BYOC#readme","bugs":{"url":"https://github.com/Ajayvarmaramineni/BYOC/issues"},"dist":{"shasum":"0b9d956273224bab89247679a107d8f8ea48a48e","tarball":"https://registry.npmjs.org/@byoc/s3-compatible/-/s3-compatible-0.2.0.tgz","fileCount":19,"integrity":"sha512-tQ+993KDJ+IEPd2qSZBYWgLCB0eqL+6ro25v3cSQuPIuqOINF7Hc3L1/1p7dqZ/17MmpFIow9IQfsFCWrgQrsQ==","signatures":[{"sig":"MEQCIEHdixv5hAAIHvK84kjseLcWGLoZAr9+x86JoVXn0uwQAiBZUS/riyMNFvTvrIAee5MHk/Kdwp6IffpP5wHZx07ekA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79745},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"3bb0599bc8e926588b1d052d5dbd82ac1c598772","scripts":{"build":"tsc -b","clean":"rm -rf dist tsconfig.tsbuildinfo"},"_npmUser":{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"},"repository":{"url":"git+https://github.com/Ajayvarmaramineni/BYOC.git","type":"git","directory":"packages/s3-compatible"},"_npmVersion":"11.11.0","description":"Universal S3-compatible storage adapter for Cloudflare R2, AWS S3, MinIO, and Wasabi","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@byoc/core":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/s3-compatible_0.2.0_1787717980249_0.4646708032776323","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@byoc/s3-compatible","version":"0.2.1","keywords":["byoc","s3","cloudflare-r2","minio","wasabi","aws-s3","cloud-storage"],"author":{"name":"Ajay Ramineni"},"license":"Apache-2.0","_id":"@byoc/s3-compatible@0.2.1","maintainers":[{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"}],"homepage":"https://github.com/Ajayvarmaramineni/BYOC/tree/main/packages/s3-compatible#readme","bugs":{"url":"https://github.com/Ajayvarmaramineni/BYOC/issues"},"dist":{"shasum":"49ffd787a39fa5dfe7759944a76b6c877cf6f58c","tarball":"https://registry.npmjs.org/@byoc/s3-compatible/-/s3-compatible-0.2.1.tgz","fileCount":19,"integrity":"sha512-GkMWpOv6p11u8mH3Pq57ap/U1/0KCibrOzQVxpCOP5s4ImY9UBWXZbvAuunLlBwgkRJr48TLdE0Lkw61t+5U2w==","signatures":[{"sig":"MEQCIB1+kfmigcm6HWBU8xtm0FJ7kzWqp7bvup5oybTpEZlsAiBo5jLZ3c878YnZN98nlfU2MkMdyAio8sHf9FqsZ5PbZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79994},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"ed39479c5c352a8dd388011f0b968f3c8dca9d9c","scripts":{"build":"tsc -b","clean":"rm -rf dist tsconfig.tsbuildinfo"},"_npmUser":{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"},"repository":{"url":"git+https://github.com/Ajayvarmaramineni/BYOC.git","type":"git","directory":"packages/s3-compatible"},"_npmVersion":"11.11.0","description":"Universal S3-compatible storage adapter for Cloudflare R2, AWS S3, MinIO, and Wasabi","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","dependencies":{"@byoc/core":"^0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/s3-compatible_0.2.1_1787800930854_0.002384038830010038","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@byoc/s3-compatible","version":"0.3.0","keywords":["byoc","s3","cloudflare-r2","minio","wasabi","aws-s3","cloud-storage"],"author":{"name":"Ajay Ramineni"},"license":"Apache-2.0","_id":"@byoc/s3-compatible@0.3.0","maintainers":[{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"}],"homepage":"https://github.com/Ajayvarmaramineni/BYOC/tree/main/packages/s3-compatible#readme","bugs":{"url":"https://github.com/Ajayvarmaramineni/BYOC/issues"},"dist":{"shasum":"13e37146b418bb1f541676e5cf9f6d970b4812be","tarball":"https://registry.npmjs.org/@byoc/s3-compatible/-/s3-compatible-0.3.0.tgz","fileCount":19,"integrity":"sha512-K5pqy0g0aB0zph7cZC1xfYqzd3VxIY3uJhjxE4JTIKl8HLaVj8Ab4S9LUoa5G389g+y0GDmeWzEEjlv8poyZgQ==","signatures":[{"sig":"MEYCIQD7e6UC6gHyOHiO2v8FvZqLREPjX/UjeqlJg3Xhx8+lQgIhAJwAYcVDDw0amdsEbbupvS1I5cuudtJv23ktlCG/Br1R","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80577},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"08cd88be6fa4b7a9c3cbf29275c8eee04c88bcf6","scripts":{"build":"tsc -b","clean":"rm -rf dist tsconfig.tsbuildinfo"},"_npmUser":{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"},"repository":{"url":"git+https://github.com/Ajayvarmaramineni/BYOC.git","type":"git","directory":"packages/s3-compatible"},"_npmVersion":"11.11.0","description":"Universal S3-compatible storage adapter for Cloudflare R2, AWS S3, MinIO, and Wasabi","directories":{},"sideEffects":false,"_nodeVersion":"25.8.1","dependencies":{"@byoc/core":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/s3-compatible_0.3.0_1788102934964_0.35672227073121165","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@byoc/s3-compatible","version":"0.4.0","description":"Universal S3-compatible storage adapter for Cloudflare R2, AWS S3, MinIO, and Wasabi","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsc -b","clean":"rm -rf dist tsconfig.tsbuildinfo"},"dependencies":{"@byoc/core":"^0.4.0"},"keywords":["byoc","s3","cloudflare-r2","minio","wasabi","aws-s3","cloud-storage"],"author":{"name":"Ajay Ramineni"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Ajayvarmaramineni/BYOC.git","directory":"packages/s3-compatible"},"publishConfig":{"access":"public"},"homepage":"https://github.com/Ajayvarmaramineni/BYOC/tree/main/packages/s3-compatible#readme","bugs":{"url":"https://github.com/Ajayvarmaramineni/BYOC/issues"},"engines":{"node":">=20"},"sideEffects":false,"gitHead":"4b2a714094177d387691f4a1bc7fb04d89a74081","_id":"@byoc/s3-compatible@0.4.0","_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-TKewc5vyCowPJf+nkNtO2M1w47iWr4x1+Q38nz5ciujHexnzQe14I+WAsNSezF+S6lMTukgH67ATgdMO6jPKqw==","shasum":"6bc27b19162f441eceff3cd9c0db3704b850b474","tarball":"https://registry.npmjs.org/@byoc/s3-compatible/-/s3-compatible-0.4.0.tgz","fileCount":19,"unpackedSize":95434,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDJDYHf/SjACwbGOdUVGEyFPcx0e+JW7PeB8BekFO7FgQIhAP5xJ43b1Gt4KXituxZj/zf+3wMrVWidCAquD0XjrmX4"}]},"_npmUser":{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"},"directories":{},"maintainers":[{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/s3-compatible_0.4.0_1788653101692_0.92056336568403"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T04:19:40.115Z","modified":"2026-09-06T00:05:02.034Z","0.2.0":"2026-08-26T04:19:40.387Z","0.2.1":"2026-08-27T03:22:11.005Z","0.3.0":"2026-08-30T15:15:35.099Z","0.4.0":"2026-09-06T00:05:01.836Z"},"bugs":{"url":"https://github.com/Ajayvarmaramineni/BYOC/issues"},"author":{"name":"Ajay Ramineni"},"license":"Apache-2.0","homepage":"https://github.com/Ajayvarmaramineni/BYOC/tree/main/packages/s3-compatible#readme","keywords":["byoc","s3","cloudflare-r2","minio","wasabi","aws-s3","cloud-storage"],"repository":{"type":"git","url":"git+https://github.com/Ajayvarmaramineni/BYOC.git","directory":"packages/s3-compatible"},"description":"Universal S3-compatible storage adapter for Cloudflare R2, AWS S3, MinIO, and Wasabi","maintainers":[{"name":"ajayvarmaramineni","email":"ajayvarmawork11@gmail.com"}],"readme":"# @byoc/s3-compatible\n\nS3-compatible provider adapter for **BYOC (Bring Your Own Cloud)**: Cloudflare R2, AWS S3, MinIO, Wasabi, and any other S3 API-compatible endpoint.\n\n> Part of the [BYOC monorepo](https://github.com/Ajayvarmaramineni/BYOC). Requires `@byoc/core`.\n>\n> **Status: v0.2.0.** Unit tested, and validated against a live MinIO server in CI.\n\n## Install\n\n```bash\nnpm install @byoc/core @byoc/s3-compatible\n```\n\n## Usage\n\n```ts\nimport { BYOC } from \"@byoc/core\";\nimport { S3CompatibleProvider } from \"@byoc/s3-compatible\";\n\nconst storage = new BYOC({\n  provider: new S3CompatibleProvider({\n    endpoint: \"https://<account_id>.r2.cloudflarestorage.com\",\n    bucket: \"user-assets\",\n    region: \"auto\",\n    accessKeyId: process.env.R2_ACCESS_KEY_ID!,\n    secretAccessKey: process.env.R2_SECRET_ACCESS_KEY!,\n    rootPrefix: \"production/data\"\n  })\n});\n\nawait storage.connect();\nawait storage.writeBuffer(\"images/banner.png\", imageBuffer);\n```\n\nFor MinIO and other path-style endpoints, set `forcePathStyle: true`.\n\n## Presigned URLs\n\nHand a browser a time-limited URL without proxying bytes through your server:\n\n```ts\nimport { createPresignedS3Url } from \"@byoc/s3-compatible\";\n\nconst url = createPresignedS3Url(config, objectUrl, {\n  method: \"GET\",\n  expiresInSeconds: 3600\n});\n```\n\n## What this adapter handles\n\n- **AWS Signature Version 4**: canonical request construction verified against AWS reference vectors, with RFC 3986 query canonicalization and case-insensitive header normalization.\n- **Object key encoding**: keys containing `#`, `?`, spaces, or unicode are percent-encoded per segment, so they round-trip intact.\n- **Paginated listing**: `list()` follows `IsTruncated` / `NextContinuationToken` past the 1000-key response cap.\n- **Server-side copy**: `x-amz-copy-source` for same-bucket moves without transferring bytes.\n\n## Capabilities\n\nS3 has no native folder or quota concept, so `folders` and `quota` are reported `false`. `createFolder()` and `getQuota()` throw `CAPABILITY_UNSUPPORTED` rather than silently no-op'ing.\n\n## License\n\n[Apache-2.0](./LICENSE)\n","readmeFilename":"README.md"}