{"_id":"@aws-blocks/bb-file-bucket","_rev":"8-d041d88a0db42b5cc1e5066e46551a38","name":"@aws-blocks/bb-file-bucket","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"1229172fc3b1ef6f0726822880a69fece914cf09","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.0.tgz","fileCount":87,"integrity":"sha512-jjctU7M4HhcNvJmHrZtC2JtlJu0eogwYxNRUXuGN9akURgWAnztGFP+s8YBT+qCIE/A+QklouVYQaVdzUTgEIg==","signatures":[{"sig":"MEUCIQC5UIqabimGJTP1pUuPle7MZw9zODtoEiOuWekySLG/MQIgZ8mwREIcjRC2fd7cMe5hyAEgmLSMAotozC1x9Sosd4c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":279384},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"639f6fad510d473abd72286351b3294a646d9895","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.0","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.0_1781566778622_0.7322625855383293","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.1","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.1","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"be65054e99e93698d44629a21fc7e4e0cc606be0","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.1.tgz","fileCount":87,"integrity":"sha512-/e9CLTxZlppeLV2DRskqYwrCO2Yfz5GQ5VFvS57ntzy9za4jdIzP8uMrh561F8R4AY+E0cBnjWvhPNttzYMgLw==","signatures":[{"sig":"MEQCIGhaQs2IDF2SP3NxLK7KaxOVlIMF8leZMKGOUji7urQ9AiB8ZaQucTGnGX7OA4ZW2vyv45HdytS0jgAhRGkmTXKVCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":279637},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"ed3e0ad5724d28c2a2fb0ea9207dfc9e941257f9","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.1","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.1_1781633783972_0.1312767434221047","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.2","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.2","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"f5d3c728eb980a746c97fab412def3e5ce9cbd55","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.2.tgz","fileCount":88,"integrity":"sha512-5WHyMPbNKPaPXSGkWDlE5MD7Ry6dZKJsoBeFRuF3gzrPw6RqbQTWEkof8PtSRlzalO4okQ8nLwjlp8xQ/8osrA==","signatures":[{"sig":"MEYCIQC9G1QPGQ+hxu3xVyhVjRzTqGrr6Usn6r2koYiMSDJaggIhAIbF0Fldm8u+ahN0oRWr8Ezf81ybl0X+Y+IaUlDYxzr9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292362},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"3328f36992d39dc20b0c0d760e4a38c866ddfbbd","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.2","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.2_1782192246552_0.1802521289339274","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.3","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.3","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"5fd003baa87837f5a8f3352442156c7dcc342d54","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.3.tgz","fileCount":88,"integrity":"sha512-BnvZ4/JkTS/GiLnRhh4kSsCEZO5BzzlYNHX169D8RMQXcYyhl+EOp3Fn6O/8veuETfCZnY5jgGbmenHMnYwU8Q==","signatures":[{"sig":"MEYCIQCievGux3XuMrF7qw3Hsv9yW3SkyX5svJSkp9zCkuFZpAIhAMKGqHDqI4sopyxDhe4tyVgKTlWGSsP3qpW2zBVeFQpg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-file-bucket@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":303056},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"f6b9cad7b543663cc9ea73a4476ca5511255d779","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@aws-blocks/core":"^0.1.17","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.3","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.3_1786135406807_0.38038721914769824","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.4","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.4","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"41aad69b5a2387d33823322e044c95ee5b1ad68c","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.4.tgz","fileCount":88,"integrity":"sha512-EkTUL/tjsmi3p8JAGLyP97NjC3SPakMre5Uvh1rvvlyN9aHiOLUXka+qqCAQZ7mYcLT0OWlAsj9E0AUpnMjC/g==","signatures":[{"sig":"MEUCIQCpzMsh1CMHnF6K9udJXpc7u5SvxHMbkufk7ELw8Fw5jwIgeS6piYCoxMcWAnYIZeOsF9EHtJ60EzDENLw7/JldO70=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-file-bucket@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":303055},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"164b106810e2b4f7801426158feae82a4ccbe3d4","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.2.0","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.4","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.4_1787230455494_0.7164285400835178","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aws-blocks/bb-file-bucket","version":"0.1.5","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.1.5","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"86e7fc9ad3d0375bd484e605fe858867262efde5","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.1.5.tgz","fileCount":88,"integrity":"sha512-zkAw8i0QkhPeT79wfnm7VFrw1K+JvHxruJ9TqKcSKksKApvmzVpGaG0nnTLm0ojdVzABHTzg62DmuRhuxbU37A==","signatures":[{"sig":"MEUCIQCljdGC7ETq07bNwTk/5HpixHteZrm5FRsEf7eUcU6dpAIgIiAjd/lViYGqAAKrboj+Mvn8pEMNWXfJnPzm9V0Z1xo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-file-bucket@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":303536},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"04d4b21b1cae9600c44a2fc63c0020ca21894316","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.3.0","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.5","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.1.5_1788264347453_0.4202063148402302","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aws-blocks/bb-file-bucket","version":"0.2.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-file-bucket@0.2.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"9e58dd752fc26acffcb95f251857276c80d43d22","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.2.0.tgz","fileCount":88,"integrity":"sha512-z5JDLGhbmRC6E+nP8yNTmL+eRmAoA+26pb+X7V9S8yJrIDEXyA+mCnLSNqYcsNV4N3LujTanSrG39YYP9uwX0g==","signatures":[{"sig":"MEQCIHE8fo499o76xCiEwSm658w1HIWknS3RZt6zCvf23qj2AiBF3Gt5J5rA1eLUaSMg8A+kW6PXFLcl0ceJxe26uhwXJw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-file-bucket@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":383552},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"ce01923c591828486e07d3d3f2b6b9d585e39057","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.4.0","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.1.6","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-file-bucket_0.2.0_1788867488478_0.5207051971531949","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@aws-blocks/bb-file-bucket@0.2.1","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"d00970bf625899415edc76b348361494d21a8ae7","tarball":"https://registry.npmjs.org/@aws-blocks/bb-file-bucket/-/bb-file-bucket-0.2.1.tgz","fileCount":88,"integrity":"sha512-qPxjkCUEhFlNtuDIepJ2//6N9qbPRkhRnbkNuqZTnp2g1jQzoppGgvWUDFPqosHUBh3yMzuLCHRRXszOTdvZaQ==","signatures":[{"sig":"MEUCIQCgbCosZzGRTvXVrBExwF3OAwXza/w1jNOcOJ2fIvZaiAIgZBlxQwCqZONoNVlL2XATLHJLKFvTz35lKp3SvQRIwNQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDpKtz65FJiJ1kxGbCJWwkCXYJ7RtPonp2zqiP9EON7SgIhAKlxHmPd7DP5D88RcB9RaTbayeL+pvSOXAMWm83DGfBW"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-file-bucket@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":383936},"name":"@aws-blocks/bb-file-bucket","type":"module","author":{"name":"Amazon Web Services"},"exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"},"./middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"},"./file-server":{"types":"./dist/file-server.d.ts","default":"./dist/file-server.js"},"./mock-middleware":{"types":"./dist/middleware.d.ts","default":"./dist/middleware.js"}},"gitHead":"51eeb265ab5efdbd853e989cf8bd6d30951c29c7","license":"Apache-2.0","scripts":{"test":"node --test dist/index.test.js dist/index.cdk.test.js dist/scan.test.js dist/file-server.test.js dist/url-encoding.test.js dist/path-containment.test.js dist/bucket-name.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs FileBucket"},"version":"0.2.1","_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","keywords":["aws-blocks","storage","s3","file-upload"],"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"_npmVersion":"10.9.8","description":"File storage backed by Amazon S3.","directories":{},"maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.5.0","@aws-sdk/client-s3":"^3.0.0","@aws-blocks/bb-logger":"^0.2.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.6.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bb-file-bucket_0.2.1_1789678847085_0.48348485843439026"}}},"time":{"created":"2026-06-15T23:39:38.459Z","modified":"2026-09-17T21:00:47.891Z","0.1.0":"2026-06-15T23:39:38.826Z","0.1.1":"2026-06-16T18:16:24.122Z","0.1.2":"2026-06-23T05:24:06.701Z","0.1.3":"2026-08-07T20:43:26.934Z","0.1.4":"2026-08-20T12:54:15.642Z","0.1.5":"2026-09-01T12:05:47.596Z","0.2.0":"2026-09-08T11:38:08.619Z","0.2.1":"2026-09-17T21:00:47.188Z"},"bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-file-bucket#readme","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-file-bucket"},"description":"File storage backed by Amazon S3.","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"readme":"# FileBucket\n\nFile storage backed by Amazon S3.\n\n**When to use:** You need to store, retrieve, or serve binary files — user uploads, generated reports, images, videos, or static assets.\n\n**When NOT to use:** If you need structured key-value data with conditional writes, use `KVStore`. If you need queryable records with indexes, use `DistributedTable`.\n\n> Design & mock parity details: [DESIGN.md](./DESIGN.md)\n\n## API\n\n```typescript\nconst bucket = new FileBucket(scope, id, options?)\n```\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `put(path, body, options?)` | `Promise<void>` | Upload a file. Overwrites any existing file at the path. |\n| `get(path, options?)` | `Promise<FileContent \\| null>` | Download a file. Returns `null` if absent. Pass `{ versionId }` on versioned buckets. |\n| `delete(path, options?)` | `Promise<void>` | Delete a file. No-op if absent. Pass `{ versionId }` on versioned buckets to permanently delete a version. |\n| `deleteBatch(paths)` | `Promise<void>` | Delete multiple files. Chunks internally at 1,000 keys. |\n| `getUrl(path, options?)` | `Promise<string>` | Generate a presigned download URL. Accepts `versionId` on versioned buckets. |\n| `putUrl(path, options?)` | `Promise<string>` | Generate a presigned upload URL. |\n| `getFileHandle(path, options?)` | `Promise<FileDownloadClient>` | Get a download handle for browser-side use. Accepts `versionId` on versioned buckets. |\n| `createUploadHandle(path, options?)` | `Promise<FileUploadClient>` | Get an upload handle for browser-side use. |\n| `scan(options?)` | `AsyncIterable<FileInfo>` | List files. Use `prefix` to scope. |\n| `listVersions(path)` | `Promise<FileVersionInfo[]>` | List all versions of a file (versioned buckets only). Newest first. |\n| `restoreVersion(path, versionId)` | `Promise<void>` | Restore a previous version as the current version. |\n| `FileBucket.fromExisting(bucketName)` | `ExternalBucketRef` | Wrap a pre-existing S3 bucket. |\n\n### Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `versioned` | `boolean` | Enable S3 object versioning. **Default: `true`.** Pass `versioned: false` to opt out. Note: the version-aware method typings (`versionId` on `get`/`delete`/`getUrl`/`getFileHandle`) are selected only by the literal `versioned: false`; a non-literal `boolean` or an absent value resolves to the versioned-aware typings. |\n| `noncurrentVersionExpirationDays` | `number` | Days after which **noncurrent** (superseded) object versions are permanently expired, bounding the storage cost that versioning would otherwise let grow unbounded. Only applies when versioning is enabled (the default). **Default: `90`.** Must be a positive integer — a non-positive or non-integer value throws at synth. There is no disable sentinel; to drop the rule entirely, disable versioning (`versioned: false`). Ignored by the mock and browser runtimes. |\n| `corsRules` | `CorsRule[]` | CORS rules for browser-based access. See [CorsRule](#corsrule) for the wildcard-origin synth guard. |\n| `lifecycleRules` | `LifecycleRule[]` | Lifecycle rules for automatic expiration or storage class transitions. |\n| `accessLogging` | `boolean` | Enable S3 server access logging. **Default: falls back to the stack posture (`BlocksDefaults.accessLogging`)** when omitted — so a production-postured stack can opt every FileBucket into logging without a per-block flag. When enabled, a dedicated, locked-down log bucket is provisioned (all public access blocked, S3-managed encryption, SSL enforced) and the main bucket delivers its access logs there under the `access-logs/` prefix. Access logs expire automatically after the stack posture's `logRetention` (`ONE_WEEK` in sandbox / `ONE_YEAR` in production; `RetentionDays.INFINITE` keeps them indefinitely). Ignored by the mock and browser runtimes. |\n| `bucket` | `ExternalBucketRef` | Wrap an existing S3 bucket instead of creating one. |\n| `logger` | `ChildLogger` | Optional logger for internal operations. When omitted, a default error-level logger is created. |\n| `removalPolicy` | `'destroy' \\| 'retain'` | CDK removal behavior for the underlying S3 bucket. When omitted, it falls back to the stack posture default (`BlocksDefaults.removalPolicy` — `DESTROY` in sandbox, `RETAIN` in production); pass `'destroy'` or `'retain'` to set it explicitly per-block. `'destroy'` also enables `autoDeleteObjects` so the bucket can be emptied on teardown. Ignored by the mock and browser runtimes. |\n\nAll FileBucket-provisioned buckets **enforce TLS unconditionally** (`enforceSSL: true`) — CDK attaches a bucket policy denying any request where `aws:SecureTransport` is `false`, closing the in-transit exposure gap. This is not configurable.\n\n### PutOptions\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `contentType` | `string` | MIME type (e.g., `image/png`). Default: `application/octet-stream`. |\n| `metadata` | `Record<string, string>` | Custom metadata key-value pairs. |\n| `cacheControl` | `string` | Cache-Control header value. |\n\n### CorsRule\n\nCORS configuration for browser-based access. Supplied via the `corsRules` option.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `allowedOrigins` | `string[]` | Origins permitted to make cross-origin requests (e.g., `['https://app.example.com']`). |\n| `allowedMethods` | `('GET' \\| 'PUT' \\| 'POST' \\| 'DELETE' \\| 'HEAD')[]` | HTTP methods permitted for cross-origin requests. |\n| `allowedHeaders` | `string[]` | Optional. Request headers permitted in the actual request. |\n| `exposedHeaders` | `string[]` | Optional. Response headers exposed to the browser. |\n| `maxAge` | `number` | Optional. Seconds the browser may cache the preflight response. |\n\n> **Wildcard origins and mutating methods:** a CORS rule that combines a wildcard origin (`'*'`) with a mutating method (`PUT`, `POST`, or `DELETE`) **throws at synth** — it would let any site issue state-changing cross-origin requests. Specify explicit origins (e.g. `['https://app.example.com']`) for mutating methods. A wildcard origin with only safe methods (`GET`/`HEAD`) is allowed.\n\n### LifecycleRule\n\nLifecycle configuration for automatic expiration or storage-class transitions. Supplied via the `lifecycleRules` option.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `prefix` | `string` | Optional. Prefix filter — the rule applies only to keys starting with this prefix. Omit to apply to all objects. |\n| `expirationDays` | `number` | Optional. Days after creation to expire (delete) objects. |\n| `transitionToIaDays` | `number` | Optional. Days after creation to transition objects to Infrequent Access storage. |\n\n### FileVersionInfo\n\nReturned by `listVersions()` — one entry per object version, newest first.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `versionId` | `string` | The version identifier. |\n| `lastModified` | `Date` | When this version was created. |\n| `size` | `number` | Size in bytes. |\n| `isCurrent` | `boolean` | Whether this is the current (latest) version. |\n\n### Error Handling\n\n`get()` returns `null` for a missing file — it does **not** throw `FileNotFound`. Check for null:\n\n```typescript\nconst file = await bucket.get('missing.txt');\nif (!file) {\n  // file does not exist\n}\n```\n\n`FileBucketErrors` are thrown by other operations and matched with `isBlocksError`:\n\n| Constant | `error.name` | Thrown when |\n|----------|--------------|-------------|\n| `FileBucketErrors.FileNotFound` | `NoSuchKey` | Surfaced by presigned-URL 404s etc. **Not** thrown by `get()`, which returns `null`. |\n| `FileBucketErrors.FileTooLarge` | `EntityTooLarge` | File exceeds size limits. |\n\n```typescript\nimport { isBlocksError } from '@aws-blocks/core';\nimport { FileBucketErrors } from '@aws-blocks/bb-file-bucket';\n\ntry {\n  await bucket.restoreVersion('report.pdf', 'non-existent-version');\n} catch (e: unknown) {\n  if (isBlocksError(e, FileBucketErrors.FileNotFound)) {\n    // source version does not exist\n  }\n  throw e;\n}\n```\n\n## Examples\n\n### Basic Put/Get\n\n```typescript\nconst bucket = new FileBucket(scope, 'uploads');\n\nexport const api = new ApiNamespace(scope, 'api', (context) => ({\n  async uploadFile(name: string, content: string) {\n    await bucket.put(name, content, { contentType: 'text/plain' });\n  },\n  async getFile(name: string) {\n    const file = await bucket.get(name);\n    if (!file) return null;\n    return { contentType: file.contentType, size: file.size };\n  },\n}));\n```\n\n### Presigned Upload URL\n\n```typescript\nconst bucket = new FileBucket(scope, 'media');\n\nexport const api = new ApiNamespace(scope, 'api', (context) => ({\n  async getUploadUrl(path: string) {\n    const url = await bucket.putUrl(path, {\n      expiresIn: 600,\n      contentType: 'image/jpeg',\n    });\n    return { uploadUrl: url };\n  },\n}));\n```\n\n### Listing Files with Scan\n\n```typescript\nconst bucket = new FileBucket(scope, 'reports');\n\nexport const api = new ApiNamespace(scope, 'api', (context) => ({\n  async listReports(yearMonth: string) {\n    const files: FileInfo[] = [];\n    for await (const file of bucket.scan({ prefix: `reports/${yearMonth}/` })) {\n      files.push(file);\n    }\n    return files;\n  },\n}));\n```\n\n### Batch Delete\n\n```typescript\nconst bucket = new FileBucket(scope, 'tmp');\n\nexport const api = new ApiNamespace(scope, 'api', (context) => ({\n  async cleanupTemp(paths: string[]) {\n    await bucket.deleteBatch(paths);\n  },\n}));\n```\n\n### Wrapping an Existing Bucket\n\n```typescript\nconst bucket = new FileBucket(scope, 'legacy', {\n  bucket: FileBucket.fromExisting('my-existing-bucket'),\n});\n```\n\n> **A wrapped bucket does not receive FileBucket's secure defaults.** When you supply `bucket`, FileBucket binds to the existing bucket as-is and returns early — none of the secure defaults it normally applies are applied: not `enforceSSL`, versioning / noncurrent-version expiration, server access logging, `blockPublicAccess`, encryption, nor the wildcard-CORS guard. You own that bucket's security posture; configure these on the bucket itself (or via its own CDK construct) before wrapping it.\n\n### Versioned Bucket\n\nVersioning is **on by default**, so the version-aware methods (`listVersions`, `restoreVersion`, and optional `versionId` on `get`/`delete`/`getUrl`/`getFileHandle`) are available without any option. Pass `versioned: false` to opt out (which also removes the `versionId` option typings). The example below passes `versioned: true` explicitly for clarity:\n\n```typescript\nconst bucket = new FileBucket(scope, 'docs', { versioned: true });\n\nexport const api = new ApiNamespace(scope, 'api', (context) => ({\n  async upload(name: string, content: string) {\n    await bucket.put(name, content);\n  },\n  async getVersion(name: string, versionId?: string) {\n    return await bucket.get(name, versionId ? { versionId } : undefined);\n  },\n  async listVersions(name: string) {\n    return await bucket.listVersions(name);\n  },\n  async restore(name: string, versionId: string) {\n    await bucket.restoreVersion(name, versionId);\n  },\n}));\n```\n\n### Access Logging\n\nOpt in to S3 server access logging. A dedicated, locked-down log bucket is provisioned and access logs expire automatically after the stack posture's `logRetention` (`ONE_WEEK` in sandbox, `ONE_YEAR` in production):\n\n```typescript\n// Logs delivered to a separate locked-down bucket.\n// Retention follows the stack posture's logRetention default — not a per-block option.\nconst bucket = new FileBucket(scope, 'uploads', {\n  accessLogging: true,\n});\n```\n\n## Best Practices\n\n- Use path prefixes to organize files (e.g., `uploads/{userId}/`, `reports/`). If a segment can contain URL-shaped or special characters (e.g. an OIDC `userId` of `${iss}:${sub}` like `https://issuer:sub`), wrap it in `encodeURIComponent()` first — the local mock normalizes `//` in keys via the filesystem, so an un-encoded `//` makes `scan({ prefix })` miss the file locally even though it works against S3.\n- Set `contentType` on `put()` to ensure correct MIME handling on download\n- Use presigned URLs (`getUrl` / `putUrl`) for direct browser upload/download\n- Prefer `scan({ prefix })` over unscoped `scan()` to limit enumeration cost\n- For browser uploads/downloads returned from API methods, prefer `createUploadHandle`/`getFileHandle` over raw presigned URLs — they encode the fetch protocol into typed methods so the client can't misuse them\n- Use `deleteBatch()` instead of looping `delete()` for bulk operations\n- Versioning is **on by default**; noncurrent (superseded) versions are automatically expired after **90 days** (`noncurrentVersionExpirationDays`, default `90`) so version history doesn't grow storage cost unbounded. Tune the window per-block, or disable versioning (`versioned: false`) to drop the expiration rule along with versioning.\n\n## Scaling & Cost (AWS)\n\n- **Billing:** Per-request plus storage — no provisioned throughput\n- **Latency:** First-byte latency typically 100–200 ms\n- **Throughput:** Scales automatically, 5,500 GET and 3,500 PUT requests/second per prefix\n- **Object size limit:** 5 TB per object\n- **Cost:** ~$0.005 per 1,000 PUT requests, ~$0.0004 per 1,000 GET requests, ~$0.023/GB/month storage\n- **Durability:** 99.999999999% (11 nines) across 3+ AZs\n\n## Local Development\n\nMock data persists to disk at `.bb-data/{fullId}/` across dev server restarts. Internal data is segregated into sibling roots so it never collides with your keys: file bodies live under `content/`, metadata under `meta/`, and version history under `versions/`. Wipe with `rm -rf .bb-data`. Presigned URLs are served by the dev server at `/.bb-file-bucket/{fullId}/{path}?token=...`. Versioning is fully supported locally. Lifecycle rules and CORS have no effect locally.\n\n\n\n","readmeFilename":"README.md","keywords":["aws-blocks","storage","s3","file-upload"]}