{"_id":"@castore/message-queue-adapter-sqs-s3","_rev":"5-594ddc762aa3abb5148f72597d798204","name":"@castore/message-queue-adapter-sqs-s3","dist-tags":{"latest":"2.4.2"},"versions":{"2.3.0":{"name":"@castore/message-queue-adapter-sqs-s3","version":"2.3.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-queue-adapter-sqs-s3@2.3.0","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-queue-adapter-sqs-s3/dist"]}}},"dist":{"shasum":"05d73176e4a978e626af9177d9ca2ffc07c18db5","tarball":"https://registry.npmjs.org/@castore/message-queue-adapter-sqs-s3/-/message-queue-adapter-sqs-s3-2.3.0.tgz","fileCount":37,"integrity":"sha512-dXyPUg8aeSaxjN+sTeJsy0nsuUeviJFsZjstjfvsIvQLwjStFwctcrYgLK8Wik6HuIB5daVZ+hg2nKZmXDmk2g==","signatures":[{"sig":"MEQCID7z/vw7/Qda9SogV6vPaP+E4LRVFXcmeffYz9OfaA0/AiAiOXkgARE4wQAs6rYaSbPl20zhl140TsCHHsAFmDMLIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258362},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"aa8c8f824db8f4e38afd58f7b9f389c7211acd26","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.2.4","description":"DRY Castore MessageQueue definition using AWS SQS and S3","directories":{},"sideEffects":false,"_nodeVersion":"18.19.1","dependencies":{"undici":"^5.23.0","ts-toolbelt":"^9.6.0","lodash.chunk":"^4.2.0","@types/aws-lambda":"^8.10.111","@castore/message-queue-adapter-sqs":"2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","@aws-sdk/client-s3":"^3.2.0","dependency-cruiser":"^11.7.0","@aws-sdk/client-sqs":"^3.2.0","@types/lodash.chunk":"^4.2.7","aws-sdk-client-mock":"^2.1.0","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@aws-sdk/s3-request-presigner":"^3.2.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-sqs":"^3.0.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-queue-adapter-sqs-s3_2.3.0_1710957152987_0.05335725088713028","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@castore/message-queue-adapter-sqs-s3","version":"2.3.1","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-queue-adapter-sqs-s3@2.3.1","maintainers":[{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"julietteff","email":"juliettef@theodo.fr"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-queue-adapter-sqs-s3/dist"]}}},"dist":{"shasum":"e3b031494107eff12c851bb3e75f545be6664c1d","tarball":"https://registry.npmjs.org/@castore/message-queue-adapter-sqs-s3/-/message-queue-adapter-sqs-s3-2.3.1.tgz","fileCount":37,"integrity":"sha512-Ow2T9zyYp1qcAiYXDCvB4N1wJNRBVA8LJiUyR/+NJdCfnRy7dTx63O+in/MOwXddyqxwCETEilKKxl9bS6pFEg==","signatures":[{"sig":"MEUCIQDh7cMF2zt1hx77uqo1mwPrZRTxlW6iGmEZYXUtiWQCvAIgc3M12a2kAKsfKoLltvv6u6VzIliuZ5HFZ6WuM9m4h5E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258661},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"ec117c540dcadb351b35e349f04dc9f4d7937a38","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.5.0","description":"DRY Castore MessageQueue definition using AWS SQS and S3","directories":{},"sideEffects":false,"_nodeVersion":"18.20.2","dependencies":{"undici":"^5.28.4","ts-toolbelt":"^9.6.0","lodash.chunk":"^4.2.0","@types/aws-lambda":"^8.10.111","@castore/message-queue-adapter-sqs":"2.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","@aws-sdk/client-s3":"^3.2.0","dependency-cruiser":"^11.7.0","@aws-sdk/client-sqs":"^3.2.0","@types/lodash.chunk":"^4.2.7","aws-sdk-client-mock":"^2.1.0","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@aws-sdk/s3-request-presigner":"^3.2.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-sqs":"^3.0.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-queue-adapter-sqs-s3_2.3.1_1714035456484_0.2527925583691579","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@castore/message-queue-adapter-sqs-s3","version":"2.4.0","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-queue-adapter-sqs-s3@2.4.0","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-queue-adapter-sqs-s3/dist"]}}},"dist":{"shasum":"86bc009ade396bfc1111c123bef27337c4f7bd13","tarball":"https://registry.npmjs.org/@castore/message-queue-adapter-sqs-s3/-/message-queue-adapter-sqs-s3-2.4.0.tgz","fileCount":37,"integrity":"sha512-q8gv/6vD/z10lENzGpUMGivYDWISj19meXKiaE25oSMsKI4KAHohaIMEnSq2WuaXY46RGL0rLHlJrv7Tpbu48g==","signatures":[{"sig":"MEUCIEzz8E+V9yrr5PyZI9UV+gZTLy2CP+C9UPb35eykjdWDAiEAws0UtBWrYPJIqHSq4zlE/gAX0R9jhKzJhivY0CufLAI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":258661},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"313e001988903763e7eb169751114c5f71cc3efe","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.8.2","description":"DRY Castore MessageQueue definition using AWS SQS and S3","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","dependencies":{"undici":"^5.28.4","ts-toolbelt":"^9.6.0","lodash.chunk":"^4.2.0","@types/aws-lambda":"^8.10.111","@castore/message-queue-adapter-sqs":"2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","@aws-sdk/client-s3":"^3.2.0","dependency-cruiser":"^11.7.0","@aws-sdk/client-sqs":"^3.2.0","@types/lodash.chunk":"^4.2.7","aws-sdk-client-mock":"^2.1.0","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@aws-sdk/s3-request-presigner":"^3.2.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-sqs":"^3.0.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-queue-adapter-sqs-s3_2.4.0_1739877962652_0.18290686554290203","host":"s3://npm-registry-packages-npm-production"}},"2.4.1":{"name":"@castore/message-queue-adapter-sqs-s3","version":"2.4.1","keywords":["event","source","store","typescript"],"license":"MIT","_id":"@castore/message-queue-adapter-sqs-s3@2.4.1","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"nx":{"targets":{"package":{"outputs":["packages/message-queue-adapter-sqs-s3/dist"]}}},"dist":{"shasum":"f272e3dead7b941527fe3236d1c35905ad82d58f","tarball":"https://registry.npmjs.org/@castore/message-queue-adapter-sqs-s3/-/message-queue-adapter-sqs-s3-2.4.1.tgz","fileCount":37,"integrity":"sha512-7uqJOKLut/AyolnOOnSeSp2S3PeLnwcwcLCtBy20EDmaKSTD9obNDmO6ZfdPaemSqef2Cd+3Jv2wVEj/DXtC3A==","signatures":[{"sig":"MEUCIQDkyPXsAgpY3+x2F6J8LmDr3GXcsssuHu79k5OAiaj8TQIgSaMjHj8a1iB91w3pF0trRqj8s2afwyJynkdpwTFxnBY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":258661},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"28c9f4e5c7c7527b6d3b5e5d9834789c2e64fd5e","scripts":{"test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","lint-fix":"yarn linter-base-config --fix","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","test-linter":"yarn linter-base-config .","lint-fix-all":"yarn lint-fix .","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test-circular":"yarn depcruise --validate dependency-cruiser.js .","linter-base-config":"eslint --ext=js,ts"},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"repository":{"url":"git+https://github.com/theodo/castore.git","type":"git"},"_npmVersion":"10.8.2","description":"DRY Castore MessageQueue definition using AWS SQS and S3","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","dependencies":{"undici":"^5.28.4","ts-toolbelt":"^9.6.0","lodash.chunk":"^4.2.0","@types/aws-lambda":"^8.10.111","@castore/message-queue-adapter-sqs":"2.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.14.0","vitest":"^0.26.2","ts-node":"^10.7.0","prettier":"^2.6.2","tsc-alias":"^1.8.7","@babel/cli":"^7.17.6","typescript":"^4.6.3","@babel/core":"^7.17.9","@types/node":"^17.0.29","concurrently":"^7.1.0","@castore/core":"workspace:","@babel/preset-env":"^7.16.11","@aws-sdk/client-s3":"^3.2.0","dependency-cruiser":"^11.7.0","@aws-sdk/client-sqs":"^3.2.0","@types/lodash.chunk":"^4.2.7","aws-sdk-client-mock":"^2.1.0","@babel/preset-typescript":"^7.16.7","babel-plugin-module-resolver":"^4.1.0","@aws-sdk/s3-request-presigner":"^3.2.0","@babel/plugin-transform-runtime":"^7.17.0"},"peerDependencies":{"@castore/core":"^2.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-sqs":"^3.0.0","@aws-sdk/s3-request-presigner":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/message-queue-adapter-sqs-s3_2.4.1_1740488567061_0.2264140792967566","host":"s3://npm-registry-packages-npm-production"}},"2.4.2":{"name":"@castore/message-queue-adapter-sqs-s3","description":"DRY Castore MessageQueue definition using AWS SQS and S3","license":"MIT","homepage":"https://github.com/theodo/castore#readme","bugs":{"url":"https://github.com/theodo/castore/issues"},"repository":{"type":"git","url":"git+https://github.com/theodo/castore.git"},"keywords":["event","source","store","typescript"],"publishConfig":{"access":"public"},"sideEffects":false,"main":"dist/cjs/index.js","module":"dist/esm/index.js","types":"dist/types/index.d.ts","scripts":{"lint-fix":"yarn linter-base-config --fix","lint-fix-all":"yarn lint-fix .","linter-base-config":"eslint --ext=js,ts","package":"rm -rf dist && yarn package-cjs && yarn package-esm && yarn package-types","package-cjs":"NODE_ENV=cjs yarn transpile --out-dir dist/cjs --source-maps","package-esm":"NODE_ENV=esm yarn transpile --out-dir dist/esm --source-maps","package-types":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json","test":"yarn test-type && yarn test-unit && yarn test-circular && yarn test-linter","test-circular":"yarn depcruise --validate dependency-cruiser.js .","test-linter":"yarn linter-base-config .","test-type":"tsc --noEmit --emitDeclarationOnly false","test-unit":"yarn vitest run --passWithNoTests","transpile":"babel src --extensions .ts --quiet","watch":"rm -rf dist && concurrently 'yarn:package-* --watch'"},"dependencies":{"@castore/message-queue-adapter-sqs":"2.4.2","@types/aws-lambda":"^8.10.111","lodash.chunk":"^4.2.0","ts-toolbelt":"^9.6.0","undici":"^5.28.4"},"devDependencies":{"@aws-sdk/client-s3":"^3.2.0","@aws-sdk/client-sqs":"^3.2.0","@aws-sdk/s3-request-presigner":"^3.2.0","@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@castore/core":"workspace:","@types/lodash.chunk":"^4.2.7","@types/node":"^17.0.29","aws-sdk-client-mock":"^2.1.0","babel-plugin-module-resolver":"^4.1.0","concurrently":"^7.1.0","dependency-cruiser":"^11.7.0","eslint":"^8.14.0","prettier":"^2.6.2","ts-node":"^10.7.0","tsc-alias":"^1.8.7","typescript":"^4.6.3","vitest":"^0.26.2"},"maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"nx":{"targets":{"package":{"outputs":["packages/message-queue-adapter-sqs-s3/dist"]}}},"peerDependencies":{"@aws-sdk/client-s3":"^3.0.0","@aws-sdk/client-sqs":"^3.0.0","@aws-sdk/s3-request-presigner":"^3.0.0","@castore/core":"^2.0.0"},"version":"2.4.2","_id":"@castore/message-queue-adapter-sqs-s3@2.4.2","gitHead":"fd79dfcc42ef28d216b08007edacd21208ba1876","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-guW36jUjGcCQTPSduAGzFekDJnILdoYxMFmBKZEx0NBXPWNNeEnTqHhr/XXHJ5vgIM5siRu3hgTSgjclsxBieA==","shasum":"15861a3ceec7a414a02841754ed8039caea45f74","tarball":"https://registry.npmjs.org/@castore/message-queue-adapter-sqs-s3/-/message-queue-adapter-sqs-s3-2.4.2.tgz","fileCount":37,"unpackedSize":258661,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA+9Z98UGFU3PZ7GtO0U7bHT+NxM/b/bJKPZAMj8dthWAiEA4vbu9YzqHge2OxuXRjVzvWX2bcolK3YMMGaWkNFaLrs="}]},"_npmUser":{"name":"thomasaribart","email":"thomas.aribart@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/message-queue-adapter-sqs-s3_2.4.2_1744991132132_0.15861343946884165"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-20T17:52:32.835Z","modified":"2025-04-18T15:45:32.502Z","2.3.0":"2024-03-20T17:52:33.205Z","2.3.1":"2024-04-25T08:57:36.665Z","2.4.0":"2025-02-18T11:26:02.874Z","2.4.1":"2025-02-25T13:02:47.265Z","2.4.2":"2025-04-18T15:45:32.295Z"},"bugs":{"url":"https://github.com/theodo/castore/issues"},"license":"MIT","homepage":"https://github.com/theodo/castore#readme","keywords":["event","source","store","typescript"],"repository":{"type":"git","url":"git+https://github.com/theodo/castore.git"},"description":"DRY Castore MessageQueue definition using AWS SQS and S3","maintainers":[{"name":"julietteff","email":"juliettef@theodo.fr"},{"name":"charlesgery","email":"charles.gery@gmail.com"},{"name":"valentinbeggi","email":"valentinbe@theodo.fr"},{"name":"thomasaribart","email":"thomas.aribart@gmail.com"}],"readme":"# SQS + S3 Message Bus Adapter\n\nDRY Castore [`MessageQueue`](https://castore-dev.github.io/castore/docs/reacting-to-events/message-queues/) definition using [AWS SQS](https://aws.amazon.com/sqs/) and [AWS S3](https://aws.amazon.com/s3/).\n\nThis adapter works like the [SQS Message Queue Adapter](https://www.npmjs.com/package/@castore/message-queue-adapter-sqs) (it actually uses it under the hood), excepts that entry sizes are checked before publishing messages to EventBridge. If they are over the [256KB limit](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html), they are written on a s3 bucket instead, and a message is sent containing a pre-signed URL, as [recommended by AWS](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html).\n\nDo not forget to set a [lifecycle configuration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) on your s3 bucket to delete the written objects after the presigned URL has expired to avoid high s3 bills! 🤑\n\n## 📥 Installation\n\n```bash\n# npm\nnpm install @castore/message-queue-adapter-sqs-s3\n\n# yarn\nyarn add @castore/message-queue-adapter-sqs-s3\n```\n\nThis package has `@castore/core`, `@aws-sdk/client-sqs` (above v3), `@aws-sdk/client-s3` (above v3) and `@aws-sdk/s3-request-presigner` (above v3) as peer dependencies, so you will have to install them as well:\n\n```bash\n# npm\nnpm install @castore/core @aws-sdk/client-sqs @aws-sdk/client-s3 @aws-sdk/s3-request-presigner\n\n# yarn\nyarn add @castore/core @aws-sdk/client-sqs @aws-sdk/client-s3 @aws-sdk/s3-request-presigner\n```\n\n## 👩‍💻 Usage\n\n```ts\nimport { SQSClient } from '@aws-sdk/client-sqs';\nimport { S3Client } from '@aws-sdk/client-s3';\n\nimport { SQSS3MessageBusAdapter } from '@castore/message-queue-adapter-sqs-s3';\n\nconst sqsClient = new SQSClient({});\nconst s3Client = new S3Client({});\n\nconst messageQueueAdapter = new SQSS3MessageQueueAdapter({\n  queueUrl: 'https://sqs.us-east-1.amazonaws.com/111122223333/my-super-queue',\n  sqsClient,\n  s3BucketName: 'my-bucket-name',\n  s3Client,\n  // 👇 Optional s3 prefix for temporary data\n  s3Prefix: 'temporary-storage/',\n  // 👇 Optional s3 presignature expiration in seconds (defaults to 900)\n  s3PreSignatureExpirationInSec: 3600\n});\n\n// 👇 Alternatively, provide a getter\nconst messageQueueAdapter = new SQSS3MessageQueueAdapter({\n  queueUrl: () => process.env.MY_QUEUE_URL,\n  s3BucketName: () => process.env.MY_BUCKET_NAME\n  ...\n});\n\nconst appMessageQueue = new NotificationMessageQueue({\n  ...\n  messageQueueAdapter\n})\n```\n\nThis will directly plug your MessageQueue to SQS and S3 🙌\n\n## 🤔 How it works\n\nYou can read the [SQS Message Queue Adapter documentation](https://www.npmjs.com/package/@castore/message-queue-adapter-sqs) for regular cases.\n\nWhen an entry is oversized, its `Detail` is saved as a JSON object in the provided s3 bucket. It's key is a concatenation of the constructor `s3Prefix` option, the `eventStoreId` and `aggregateId` of the event and the current timestamp:\n\n```ts\nconst key = 'temporary-storage/POKEMONS/pikachu1/2020-01-01T00:00:00.000Z';\n```\n\nIf the event is a notification or state-carrying event, the `version` is also added to the mix:\n\n```ts\n// 👇 Date is suffixed by the version\nconst key = 'temporary-storage/POKEMONS/pikachu1/2020-01-01T00:00:00.000Z#3';\n```\n\nOn the listeners side, you can use the `SQSS3MessageBusMessage` TS type to type your argument, and the `parseMessage` util to fetch the message if it has been uploaded to S3 (it passes it through otherwise):\n\nOn the worker side, you can use the `SQSS3MessageQueueMessage` TS type to type your argument, and the `parseBody` util to fetch the message if it has been uploaded to S3 (it passes it through otherwise):\n\n```ts\nimport {\n  SQSS3MessageQueueMessage,\n  parseBody,\n} from '@castore/message-queue-adapter-sqs-s3';\n\nconst appMessagesWorker = async ({ Records }: SQSS3MessageQueueMessage) => {\n  for (const { body } of Records) {\n    // 🙌 Correctly typed!\n    const recordBody = await parseBody<typeof appMessageQueue>(body);\n  }\n};\n```\n\nNote that `parseBody` uses `fetch` under the hood, so you will have to provide it if your version of node doesn't:\n\n```ts\nimport fetch from 'node-fetch';\n\nimport {\n  SQSS3MessageQueueMessage,\n  parseBody,\n} from '@castore/message-queue-adapter-sqs-s3';\n\nconst appMessagesWorker = async ({ Records }: SQSS3MessageQueueMessage) => {\n  for (const { body } of Records) {\n    // 🙌 Correctly typed!\n    const recordBody = await parseBody<typeof appMessageQueue>(body, { fetch });\n  }\n};\n```\n\n## 🔑 IAM\n\nThe `publishMessage` method requires the `sqs:SendMessage` IAM permission on the provided SQS queue, as well as the `s3:putObject` and `s3:getObject` IAM permissions on the provided s3 bucket at the desired keys (e.g. `my-bucket-name/temporary-storage/*`).\n\nThe `parseBody` util doesn't require any permission as the messageURL is pre-signed.\n","readmeFilename":"README.md"}