{"_id":"@aws-blocks/bb-async-job","_rev":"8-ec73bca184a44af68bff9af1ab653123","name":"@aws-blocks/bb-async-job","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@aws-blocks/bb-async-job","version":"0.1.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@0.1.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"8c3cc4d0229283e985da713ba2edc602209dd426","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.0.tgz","fileCount":35,"integrity":"sha512-sEfG36TyNWhEhNaja48wAzBCK2Mj63WL1lsXnB0blEXzKsUHZzU5dBpWeawzaRm59DK57xVJ+L/KPhSbikIw2A==","signatures":[{"sig":"MEUCIF4MWka+V9bmhF8tops801jUi2QcsCv5elJm6ofsjOcIAiEAgmEPEPqy5TP3iTH7MzTmiXPwR49fbocHlfGhoiskOlY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91461},"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"}},"gitHead":"639f6fad510d473abd72286351b3294a646d9895","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.0","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.0_1781566774290_0.6165680457224763","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aws-blocks/bb-async-job","version":"0.1.1","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@0.1.1","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"c21bbc0b84716c5325a5bddbd31a686a3e6a9e6e","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.1.tgz","fileCount":35,"integrity":"sha512-qo3lu1822zDqMgOaNr7Pgo+ObYxE7AcH1TKAzA5hQ+D+UO9QNtSen9DivNTNpyLeDvkqhYH/MtZsNwb1bm1Ajg==","signatures":[{"sig":"MEUCIQC7m1ZIkaur6cBRcJy5UUc6sLMj5SZHtpL/WTn3MYCkmwIgItCEIYwYfJy79FdHFUx6fr3PQjF/u+VTDh33P7ie5CQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91733},"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"}},"gitHead":"ed3e0ad5724d28c2a2fb0ea9207dfc9e941257f9","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.1_1781633779526_0.8350350999662335","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aws-blocks/bb-async-job","version":"0.1.2","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@0.1.2","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"8501e9bc987c9b1039cf0587b12d2f1c1531166d","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.2.tgz","fileCount":36,"integrity":"sha512-iPpDQkox8QINcPXolfafWEpF2//jDHYARYB4TxILwUNOvWMVFwxteTcVr35Y5QMAeRYWG4eUB3iAgagOi1ImNg==","signatures":[{"sig":"MEUCIQDB0BuCkA983wDPWd0sEdm1yyAcTUKDGtQZZoGVi2WYPAIgCi4SOFcgR2mRn5RbMI8vdN6S7Isoxq+9rbmw1/Q/uBo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102005},"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"}},"gitHead":"3328f36992d39dc20b0c0d760e4a38c866ddfbbd","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.2_1782192243830_0.639274228129417","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aws-blocks/bb-async-job","version":"0.1.3","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@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-async-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"601912877dded0a49893e52e058204adf163f34b","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.3.tgz","fileCount":44,"integrity":"sha512-Jl/LAa9zhHTc8l5JyNX+ov2DiTthLyR8HWO/nk0eQdeYlDlIJqntR56QGsVBoQ5E0Ljze2QVZgD7F7MM/ZyXaQ==","signatures":[{"sig":"MEQCICdN++YpQBTK+4i5BQlQyA86XogRwU/vUHCY9ovqI+tgAiBQx511vVJ3kXvS//w+Ly5g/fLBAF6cv+mPjqsNAYqGRg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-async-job@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":216332},"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"}},"gitHead":"f6b9cad7b543663cc9ea73a4476ca5511255d779","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_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-async-job"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@aws-blocks/core":"^0.1.17","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.3","@aws-blocks/bb-distributed-table":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.3_1786135407620_0.19418299519256843","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aws-blocks/bb-async-job","version":"0.1.4","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@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-async-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"575850e15295602373b9f080f6ec39313833f440","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.4.tgz","fileCount":44,"integrity":"sha512-Srv+b5mR15zJnjmiIAEDUo61EYhigs08Y6+h+WdXuFsfPihRUr1Df32h/f6FBmQNBHxV8oFH6krcB3G0p6O9zw==","signatures":[{"sig":"MEYCIQD57Afa7bVFEJ8vcL87DC/rmciHEmm/O1Dp+xQNv2botAIhAJH7p6prz2QW3tH+PVjWTKu+wOhEay0G3UD6IFn9vEK1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-async-job@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":216331},"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"}},"gitHead":"164b106810e2b4f7801426158feae82a4ccbe3d4","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_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-async-job"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.2.0","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.4","@aws-blocks/bb-distributed-table":"^0.1.5"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.4_1787230469495_0.9532235878888509","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aws-blocks/bb-async-job","version":"0.1.5","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@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-async-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"da34236a730e30c5758b96fd9f0174dfd4d67f90","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.1.5.tgz","fileCount":52,"integrity":"sha512-G5abhq6ZrFLHgSg/9hzJUWLLyhCHKRd3MC+FYib05VVtMQiK0MZ8mhiaq7fDCmaFb5wCtZP1eZfBBSy8ouOYcg==","signatures":[{"sig":"MEUCIQCx0uDdxiwgcarkT+HPpLfA8WIlgeIsS7T0vNKNYWGXQgIgKew2cpf+Li1a+G2D3Z8gV4tccUmKqZpNw2cwTFR9UFU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDwoQcyq3VKKPtUFQ0NbzwzWL8HCSdFHo4aJPkE77BJqQIhAPmOAvnDGzxWAtW61HjQyDrSwDKvxysA77U0tipuJ2nq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-async-job@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":298547},"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"}},"gitHead":"04d4b21b1cae9600c44a2fc63c0020ca21894316","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_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-async-job"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.3.0","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.5","@aws-blocks/bb-distributed-table":"^0.1.6"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.1.5_1788264428529_0.05086391077909824","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aws-blocks/bb-async-job","version":"0.2.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-async-job@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-async-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"47ffac31c22741dd822f6445690b1930f262218c","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.2.0.tgz","fileCount":52,"integrity":"sha512-h9K5XfpLtY2eSrwOvc/Aa0QTMipYlIJzYxtvyzSAly/cktf2UsU/XbIMgOyZp7QFKOr0u9HZwfUBW7eEPhnccg==","signatures":[{"sig":"MEYCIQDocFs6f19Ley3P97kJknnD/VRaRpq/+uuyRtiBgvt58gIhALabPSDFkNOL/5nQbdYkRUFB4zdqd7TTY12ScgDZtepS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHzpnPkZvhFUr8vGQ4+2wGrl+2J4/KE1vksYOBXCdJdvAiBzuzzBD6SuaIzstizWmHCpO0i22KUwjr0pzSx7bCsDMQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-async-job@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":312624},"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"}},"gitHead":"ce01923c591828486e07d3d3f2b6b9d585e39057","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"_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-async-job"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.4.0","@aws-sdk/client-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.1.6","@aws-blocks/bb-lambda-compute":"^0.4.0","@aws-blocks/bb-distributed-table":"^0.1.7"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-async-job_0.2.0_1788867687459_0.4021390207753459","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@aws-blocks/bb-async-job@0.2.1","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"24e1940fcbcf3a52b3b37f88a3d54af4f0252fb1","tarball":"https://registry.npmjs.org/@aws-blocks/bb-async-job/-/bb-async-job-0.2.1.tgz","fileCount":52,"integrity":"sha512-QwLBEcyHgzajxMYcFx+itY+qNgM4QUPWFfPaNf/2VLVuqzC1ISAWZPLiCr7OQGN7dwtphmZRrV/62J++JaqrKg==","signatures":[{"sig":"MEYCIQDmabP6lJ2/FW2PJyX9pfw0vQAYi1XMTs82LC4nooLzuAIhAI9pUIOuhvVWSr15QwpdblV6G6GZSAQ1MqiV3xXmbIM4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEtg7jYqPyOdqZ4531t7FSy2Gvlj7Xg1zODwJ0uBDY6SAiAXjKz3PlpvdnlMRG2DlaB2be66l5IduuOuUYmR7OzmYA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-async-job@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":313906},"name":"@aws-blocks/bb-async-job","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"}},"gitHead":"51eeb265ab5efdbd853e989cf8bd6d30951c29c7","license":"Apache-2.0","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs AsyncJob"},"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-async-job#readme","keywords":["aws-blocks","background-jobs","queue","sqs","lambda"],"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-async-job"},"_npmVersion":"10.9.8","description":"Background job processing backed by SQS and Lambda.","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-sqs":"^3.0.0","@aws-blocks/bb-logger":"^0.2.0","@aws-blocks/bb-lambda-compute":"^0.5.0","@aws-blocks/bb-distributed-table":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@standard-schema/spec":"^1.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bb-async-job_0.2.1_1789678749626_0.15168356140007555"}}},"time":{"created":"2026-06-15T23:39:34.125Z","modified":"2026-09-17T20:59:10.129Z","0.1.0":"2026-06-15T23:39:34.436Z","0.1.1":"2026-06-16T18:16:19.707Z","0.1.2":"2026-06-23T05:24:03.961Z","0.1.3":"2026-08-07T20:43:27.795Z","0.1.4":"2026-08-20T12:54:29.646Z","0.1.5":"2026-09-01T12:07:08.643Z","0.2.0":"2026-09-08T11:41:27.554Z","0.2.1":"2026-09-17T20:59:09.795Z"},"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-async-job#readme","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-async-job"},"description":"Background job processing backed by SQS and Lambda.","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"readme":"# @aws-blocks/bb-async-job\n\nBackground job processing backed by SQS and Lambda.\n\n> Design & mock parity details: [DESIGN.md](./DESIGN.md)\n\n## Quick Reference\n\n**Common Operations → Methods**\n\n| What you want | Use this method |\n|---------------|----------------|\n| Submit a job | `submit(payload)` |\n| Submit with delay | `submit(payload, { delaySeconds: 60 })` |\n| Submit multiple jobs | `submitBatch(payloads)` |\n| Get job ID back | `const { jobId } = await job.submit(payload)` |\n| Read a job's state | `getStatus(jobId)` (needs `trackStatus: true`) |\n| Wait for a job to finish | `waitUntilComplete(jobId)` (needs `trackStatus: true`) |\n\n**Keywords:** queue, job, background, async, worker, submit, batch, retry, status, transitions, SQS\n\n**Available Methods:**\n- **`submit(payload, options?)`** - Enqueue a single job (returns `{ jobId }`)\n- **`submitBatch(payloads, options?)`** - Enqueue up to 10,000 jobs in one call — batches larger than SQS's 10-entry / 256 KB per-request limits are split across multiple `SendMessageBatch` requests automatically and sent with bounded concurrency (over 10,000 throws `AsyncJobErrors.BatchTooLarge`; returns `{ jobIds, failed: [] }` on full success). Because a multi-chunk submit is not atomic, on partial failure it **throws** `AsyncJobErrors.BatchSubmitFailed` — the error has `.jobIds` (real MessageIds for the entries that made it onto the queue, `null` at failed indexes) and `.failed[]` (each entry's `index`, `code`, `message`; a transport-level `send()` rejection fails its whole chunk and short-circuits the rest). The mock runtime never partially fails; this is AWS-only.\n- **`getStatus(jobId)`** - Read a job's recorded state and full transition history (returns `AsyncJobStatus | null`). Requires `trackStatus: true`.\n- **`waitUntilComplete(jobId, options?)`** - Wait until the job reaches `complete` or `failed` (returns the final `AsyncJobStatus`). Requires `trackStatus: true`.\n\n## Quick Start\n\n```typescript\nimport { Scope } from '@aws-blocks/core';\nimport { AsyncJob } from '@aws-blocks/bb-async-job';\n\nconst scope = new Scope('my-app');\n\nconst emailJob = new AsyncJob(scope, 'welcome-email', {\n  handler: async (payload: { to: string; subject: string }, ctx) => {\n    console.log(`Processing job ${ctx.jobId}, attempt ${ctx.receiveCount}`);\n    await sendEmail(payload.to, payload.subject);\n  },\n});\n\n// Submit from your API — returns immediately\nconst { jobId } = await emailJob.submit({ to: 'alice@example.com', subject: 'Welcome' });\n```\n\n## When to Use\n\n- Sending emails or notifications\n- Processing file uploads\n- Generating reports\n- Any fire-and-forget task that shouldn't block the API response\n\n## Options\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `handler` | (required) | Async function that processes each job |\n| `schema` | — | StandardSchemaV1 (Zod, Valibot, etc.) for payload validation on submit |\n| `maxRetries` | 3 | Maximum attempts before sending to the dead-letter queue |\n| `batchSize` | 10 | Messages per Lambda invocation |\n| `maxBatchingWindowSeconds` | 5 | Seconds SQS waits to fill a batch before invoking the Lambda |\n| `trackStatus` | `false` | Record every job's state transitions so `getStatus()` / `waitUntilComplete()` can read them |\n| `logger` | — | Optional logger for internal operations; defaults to a Logger at error level |\n\n### Batching and handler requirements\n\nThe queue is a standard SQS queue, so delivery is at-least-once and a handler must\nalready be idempotent to be correct — a message can be delivered more than once\nregardless of `batchSize`. Batching widens the window in which that happens: with\n`batchSize: 10`, a Lambda that times out or runs out of memory partway through a\nbatch redelivers all ten messages, including the ones whose handler had already\nfinished. Per-record failures on their own are isolated (only the failed message is\nredelivered), so this is specifically the whole-invocation failure case.\n\nSet `batchSize: 1` for handlers that cannot tolerate being re-run, or for\nlatency-sensitive work — a batching window makes SQS wait up to\n`maxBatchingWindowSeconds` before invoking the Lambda at all, so a job submitted on\na user-facing path starts up to that many seconds late. `maxBatchingWindowSeconds: 0`\nopts out of the wait while keeping batching.\n\nThe queue's visibility timeout is set to the shared Lambda's timeout plus\n`maxBatchingWindowSeconds`, because a message's visibility clock starts when the\npoller receives it — before the batching window elapses and before the handler runs.\n\n## Handler Context\n\nThe handler receives a second argument, `ctx: AsyncJobContext`, carrying metadata about the current job:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `jobId` | `string` | Unique identifier for this job (SQS message ID in AWS, truncated UUID in the mock). |\n| `receiveCount` | `number` | Number of times this message has been received (`1` on first delivery; increments on each retry). |\n| `sentAt` | `string` | ISO 8601 timestamp of when the message was sent (enqueued). |\n\nIn AWS, `receiveCount` is the SQS `ApproximateReceiveCount` attribute, and the name is SQS's own warning: it is a best-effort counter, not an exact one. A delivery SQS records but never hands to a handler, or a redrive that re-counts, moves it without a matching attempt. Read it as roughly how many times the job has been tried. The `attempt` on each status transition and the `attempts` total both carry this same number, so the caveat travels with them. In local dev the queue is in-process and the count is exact, so a test that asserts on an exact attempt number can pass locally and still be wrong in AWS.\n\n## Error Constants\n\n```typescript\nimport { AsyncJobErrors } from '@aws-blocks/bb-async-job';\n\nAsyncJobErrors.PayloadTooLarge    // payload > 256 KB\nAsyncJobErrors.BatchEmpty         // submitBatch([]) called with no items\nAsyncJobErrors.BatchTooLarge      // submitBatch() over the 10,000-payload soft cap\nAsyncJobErrors.ValidationFailed   // schema validation failed\nAsyncJobErrors.BatchSubmitFailed  // one or more messages failed to enqueue\nAsyncJobErrors.Timeout            // waitUntilComplete() gave up before the job settled\nAsyncJobErrors.StatusNotTracked   // status method called without trackStatus: true\n```\n\n## Local Development\n\nIn local dev mode, AsyncJob uses an in-process queue. Jobs process via `setTimeout` in the same Node.js process. Retries, DLQ behavior, and payload limits are enforced identically to AWS.\n\n## AWS Deployment\n\nAutomatically provisions an SQS queue, dead-letter queue, and connects to the shared API Lambda. Failed jobs become visible for retry after 900 seconds (matching the Lambda timeout).\n\n## How Do I Know My Job Ran?\n\n`submit()` is fire-and-forget — it returns as soon as the payload is queued, and the handler runs later in a separate Lambda invocation. Pass `trackStatus: true` and AsyncJob records the job's state for you:\n\n```typescript\nconst job = new AsyncJob(scope, 'ingest', {\n  trackStatus: true,\n  handler: async (payload: { documentId: string }) => {\n    await ingest(payload.documentId);\n  },\n});\n\nconst { jobId } = await job.submit({ documentId: 'doc-1' });\n\n// Poll from a client, or await it server-side\nconst status = await job.waitUntilComplete(jobId);\nstatus.state;                              // 'complete'\nstatus.transitions.map((t) => t.state);    // ['queued', 'processing', 'complete']\n```\n\n### Every state stays observable\n\n`transitions` is append-only, so reading it is not a race. A handler that finishes in a millisecond still records that it passed through `processing`, and a caller that reads the status once — long after the job settled — sees the whole sequence. You never need to slow a handler down to make an intermediate state visible.\n\nA retry appends another `processing` entry rather than a second terminal state, so the history shows how many attempts it took:\n\n```typescript\nconst status = await job.getStatus(jobId);\nstatus.transitions.map((t) => `${t.state}#${t.attempt}`);\n// ['queued#0', 'processing#1', 'processing#2', 'failed#2']\nstatus.attempts;  // 2\nstatus.error;     // message from the last handler error\n```\n\n### Status shape\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `jobId` | `string` | Job identifier returned by `submit()`. |\n| `state` | `'queued' \\| 'processing' \\| 'complete' \\| 'failed'` | Most recent state. |\n| `transitions` | `AsyncJobTransition[]` | Every state entered, in order. Each entry has `state`, `at` (ISO 8601), and `attempt`. |\n| `attempts` | `number` | Times the job has been delivered to the handler. |\n| `submittedAt` | `string` | ISO 8601 timestamp of submission. |\n| `updatedAt` | `string` | ISO 8601 timestamp of the most recent transition. |\n| `error` | `string \\| undefined` | Message from the last handler error. Set when `state` is `failed`. |\n\n`getStatus()` returns `null` for a job id it has never seen. `waitUntilComplete()` resolves on **either** terminal state — check `state` to tell success from failure — and accepts `timeoutMs` (default `30000`), `pollIntervalMs` (default `250`, with ±20% jitter), and a `signal` (`AbortSignal`) that cancels the wait and rejects with the signal's abort reason.\n\n### Reading a Timeout\n\n`waitUntilComplete()` throws `AsyncJobErrors.Timeout` when the job has not reached a terminal state in time. Treat that as **status unknown**, not as a verdict on the job.\n\nAlmost always it means the job is still running, so waiting again is the right move and is safe. But status writes on the handler path are best-effort by design (see below), so there is a second, rarer reading: if the write that would have recorded `complete` or `failed` was itself dropped, the job has already finished and its record will never reach a terminal state, so waiting longer will never resolve. A `Timeout` therefore does not prove the job is still in flight, and it certainly does not mean the job failed. A third reading, below, is that the delivery was killed outright.\n\nIf you need a definitive answer, check the job's own effect rather than its status — the row it writes, the file it uploads, the message it sends. That is authoritative in a way bookkeeping cannot be. `status.updatedAt` is also a useful signal: a timestamp that stops advancing well past your handler's expected duration points at a dropped write rather than slow work.\n\n### Known limitation: a killed delivery records no failure\n\nThe `failed` transition is written from the handler's `catch`, so it exists only for errors the handler actually throws. A delivery that dies without unwinding — Lambda timeout, an out-of-memory kill, a hard crash — never reaches that `catch`, and nothing writes a terminal state on its behalf.\n\nThe record therefore stays at its last transition, normally `processing`, and stays there for good. `waitUntilComplete()` keeps polling until it gives up with `AsyncJobErrors.Timeout`, so a job that is definitively dead reads as status unknown rather than as a failure. The work itself is not lost track of: SQS redelivers on its own schedule and the message still reaches the dead-letter queue once it has burned through `maxRetries`. It is only the status record that stops telling you anything.\n\nAsyncJob does not detect this for you yet. Until it does, a `Timeout` on a job whose `updatedAt` stopped advancing is the signal to look outside the status record: the dead-letter queue, and the handler's own CloudWatch logs for a `Task timed out` or out-of-memory line. A handler that runs close to its limit can also catch the condition itself — check the remaining wall clock and throw before the Lambda deadline, so the `catch` does run and `failed` is recorded.\n\n### Cost of enabling it\n\n`trackStatus: true` provisions one DynamoDB table (on-demand billing) for the job's status records and adds a write on submit plus one per state change. Records expire 24 hours after their last transition. Leave the flag off for pure fire-and-forget work — nothing is provisioned and `submit()` stays a single SQS call. Calling `getStatus()` or `waitUntilComplete()` without the flag throws `AsyncJobErrors.StatusNotTracked`.\n\nStatus writes on the handler path never fail a job: if one errors it is logged and the job's own outcome is unaffected, so a bookkeeping blip can neither retry work that succeeded nor mask work that failed. That is a deliberate trade — the job's correctness outranks its record — and it is what makes the `Timeout` caveat above possible. Appends themselves are guarded by a compare-and-swap, so two overlapping deliveries of the same job cannot silently drop each other's transitions.\n\n### Other options\n\n**Use `ctx.jobId` for logging:**\n```typescript\nhandler: async (payload, ctx) => {\n  console.log(`[${ctx.jobId}] Starting work...`);\n  // Your logs will include the job ID for tracing\n}\n```\n\n**Check the dead-letter queue:** Jobs that fail after `maxRetries` attempts land in the DLQ. In AWS, check the `{scope}-{id}-dlq` queue in the SQS console. In local dev, failed jobs are logged to the console with their full payload.\n\n\n","readmeFilename":"README.md","keywords":["aws-blocks","background-jobs","queue","sqs","lambda"]}