{"_id":"@auriclabs/jobs-infra","_rev":"7-e734b8e87d5f887784de2541dd603d23","name":"@auriclabs/jobs-infra","dist-tags":{"latest":"3.0.0"},"versions":{"0.1.0":{"name":"@auriclabs/jobs-infra","version":"0.1.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@0.1.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"fd3db029e68784411c91c761fd906fdd6b57eb85","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-0.1.0.tgz","fileCount":15,"integrity":"sha512-mqsAWR5PTSTY6g3Wxoh6N9NEaJg3/ootbKt5lzvDUOe31Vt44Pu4ECs8o5A26Awp75f9ErgV5zwM3Wm0Ssr4Vw==","signatures":[{"sig":"MEYCIQDoxfGlyFr/WEbGe9MS9Zl6JSsNkDtqNJCKwx+25xsXmgIhAK2yJORGY7gW4ALa8W3w3ROn0aPyj120y9RAlWW1JiaE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20429},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-0.1.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/9324aab7eb93ea640ad303e08ae0de1b/auriclabs-jobs-infra-0.1.0.tgz","_integrity":"sha512-mqsAWR5PTSTY6g3Wxoh6N9NEaJg3/ootbKt5lzvDUOe31Vt44Pu4ECs8o5A26Awp75f9ErgV5zwM3Wm0Ssr4Vw==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.1","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.0.0"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_0.1.0_1774134513821_0.33094989481557957","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@auriclabs/jobs-infra","version":"0.2.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@0.2.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"0e668ae81cb0ad060fad011763bdeb259d8f78af","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-0.2.0.tgz","fileCount":17,"integrity":"sha512-Bsa7jiqLsmjdNOCs+rtDdE6zIIfNEIJSUMnNlZjvWsh/aWx8ihf4DsCbKMTSyrPoHJ/YjcfrL6bqnErFScG/KQ==","signatures":[{"sig":"MEQCIGnIQxctWlH/IGaRrWMcMMuT7hhHzMNJl0X6oYIC7r+WAiBragCK9QEYr5Hx0VlryZoFWpJFUqkUQf/dpP3wY2YViQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20796},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-0.2.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/ef7a88066361f10d7435095e386afad6/auriclabs-jobs-infra-0.2.0.tgz","_integrity":"sha512-Bsa7jiqLsmjdNOCs+rtDdE6zIIfNEIJSUMnNlZjvWsh/aWx8ihf4DsCbKMTSyrPoHJ/YjcfrL6bqnErFScG/KQ==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.1","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.0.1"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_0.2.0_1774290597628_0.16805490322762728","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@auriclabs/jobs-infra","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@1.0.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"a65c2db0e78c4ae1cc114b3e5eb2f0423744a0e0","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-1.0.0.tgz","fileCount":17,"integrity":"sha512-9NVcH+PSAKNks9ad/Cd1WT3PkfavGDcerXWO8nl6Fc3UkEPkqDpZf/HRPqQdMOg61krPhrsafFZGlYDkRrO2zQ==","signatures":[{"sig":"MEQCIBs1MRZRV1xBLvXKAYMqFmvryEWpY1LvDEEEF6klIfbAAiBYUZ3LY8EahcqBl+3HQQEDRC3veFffh+tRTpB9+FI0vA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20997},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-1.0.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/d8995bd0f660c0b4cb8024962779729c/auriclabs-jobs-infra-1.0.0.tgz","_integrity":"sha512-9NVcH+PSAKNks9ad/Cd1WT3PkfavGDcerXWO8nl6Fc3UkEPkqDpZf/HRPqQdMOg61krPhrsafFZGlYDkRrO2zQ==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.2","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.1.0"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_1.0.0_1776593164763_0.4105872435957978","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@auriclabs/jobs-infra","version":"2.0.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@2.0.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"98aabd742a824b8a45a0bb059877abb0ac384c1c","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-2.0.0.tgz","fileCount":17,"integrity":"sha512-6AQ34n3cQS5WZU6O+c5q0/IzPmhlQvDDLSmS2SYhlpmSdqsLXLgPMO+KnHWg3XUC5em22hxmtUohoxaxbOhoCw==","signatures":[{"sig":"MEUCIQCKtrlAr4P8to6q9RH50RDjtNuj8CowtrKA5UfLCSjAxAIge8j+4/2ROk7IYOOIOvXpjzjkxLepkoDZH3U6PnNW6/0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20987},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-2.0.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/5aa8205942f16311a9024e3ce5a65c93/auriclabs-jobs-infra-2.0.0.tgz","_integrity":"sha512-6AQ34n3cQS5WZU6O+c5q0/IzPmhlQvDDLSmS2SYhlpmSdqsLXLgPMO+KnHWg3XUC5em22hxmtUohoxaxbOhoCw==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.2","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.1.7"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_2.0.0_1776900551982_0.06140940539652395","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@auriclabs/jobs-infra","version":"2.1.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@2.1.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"907c814030c0cb5f29c76320ffbe5f50324f5f4d","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-2.1.0.tgz","fileCount":18,"integrity":"sha512-4kpwvhmdPMkV3ktoG5ceE6UZ6bAOTu4EUll6Bo0l9MAuSOekEZk5mZfRP7R3xvM38TH45Ye5//zlOXzLWExRWw==","signatures":[{"sig":"MEYCIQDDoCkVdEGqvGZWhnx2OmSBmx5yCWyNiPYD2WYr6xFUZQIhAP061yxIMVQFjOMcAjkDw8cTWP/VVmU5biqwXuEbh7z/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50738},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-2.1.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/c11683f994499b713b2b16254dddac3d/auriclabs-jobs-infra-2.1.0.tgz","_integrity":"sha512-4kpwvhmdPMkV3ktoG5ceE6UZ6bAOTu4EUll6Bo0l9MAuSOekEZk5mZfRP7R3xvM38TH45Ye5//zlOXzLWExRWw==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.2","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/jobs":"0.3.0","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.1.14"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/jobs":">=0.3.0","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.2.0"},"peerDependenciesMeta":{"@auriclabs/jobs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_2.1.0_1783269180397_0.5825482235443822","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@auriclabs/jobs-infra","version":"2.2.0","keywords":[],"author":"","license":"ISC","_id":"@auriclabs/jobs-infra@2.2.0","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"homepage":"https://github.com/auriclabs/packages#readme","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"dist":{"shasum":"86d030b85938192f742e56b751c4fcf5e8a0214d","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-2.2.0.tgz","fileCount":18,"integrity":"sha512-E+iHwUHqfepGAL7OxWgs5qkIQ7g9OzQWsXL9uhHDp/g9xAcMDA5CIn8lh3lVemxZoL3F57N5JtJ/5Yp71AZX/Q==","signatures":[{"sig":"MEQCIB6b2GOESKH2ymExJ/P7wofN9D1QVuNS8f5obnA8+VrQAiAu2mDXRyxFx7aXt5hH5YxZo1gGMrLxYNTsAcXZv47yAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60162},"main":"dist/index.cjs","type":"module","_from":"file:auriclabs-jobs-infra-2.2.0.tgz","types":"dist/index.d.mts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test:watch":"vitest"},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"prettier":"@auriclabs/prettier-config","_resolved":"/tmp/6a784c8482319e2a464138193bc9d792/auriclabs-jobs-infra-2.2.0.tgz","_integrity":"sha512-E+iHwUHqfepGAL7OxWgs5qkIQ7g9OzQWsXL9uhHDp/g9xAcMDA5CIn8lh3lVemxZoL3F57N5JtJ/5Yp71AZX/Q==","repository":{"url":"git+https://github.com/auriclabs/packages.git","type":"git","directory":"packages/jobs-infra"},"_npmVersion":"10.8.2","description":"SST infrastructure helpers for job queue tables and resources","directories":{},"_nodeVersion":"20.20.2","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"sst":"^4.3.7","@auriclabs/jobs":"0.3.0","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.1.14"},"peerDependencies":{"sst":"^4.3.7","@auriclabs/jobs":">=0.3.0","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.2.0"},"peerDependenciesMeta":{"@auriclabs/jobs":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/jobs-infra_2.2.0_1783275187851_0.3245710967339419","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@auriclabs/jobs-infra","version":"3.0.0","description":"SST infrastructure helpers for job queue tables and resources","prettier":"@auriclabs/prettier-config","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"keywords":[],"author":"","type":"module","license":"ISC","dependencies":{},"devDependencies":{"sst":"^4.3.7","@auriclabs/sst-types":"0.1.0","@auriclabs/sst-utils":"1.1.14","@auriclabs/jobs":"0.4.0"},"peerDependencies":{"@auriclabs/jobs":">=0.4.0","@auriclabs/sst-types":"^0.1.0","@auriclabs/sst-utils":"^1.2.0","sst":"^4.3.7"},"peerDependenciesMeta":{"@auriclabs/jobs":{"optional":true}},"publishConfig":{"registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/auriclabs/packages.git","directory":"packages/jobs-infra"},"scripts":{"build":"tsdown src/index.ts --format cjs,esm --dts --tsconfig tsconfig.build.json --no-hash","dev":"concurrently \"pnpm build --watch\" \"pnpm:y:watch\"","y:watch":"chokidar dist --initial --silent -c \"yalc publish --push\"","lint":"eslint .","lint:fix":"eslint . --fix","typecheck":"ts-config-typecheck","test":"vitest run --passWithNoTests","test:watch":"vitest"},"_id":"@auriclabs/jobs-infra@3.0.0","bugs":{"url":"https://github.com/auriclabs/packages/issues"},"homepage":"https://github.com/auriclabs/packages#readme","_integrity":"sha512-MhqmUKjNUl9/L3BxKhOw/ES4Q6g/m7YILhaTKmxB21yarU3zj2ctN/Vw6z/w2NWtCXxRVdj/LJBCoMt70ic8JA==","_resolved":"/tmp/d97345eff7002bdd08199639aac32007/auriclabs-jobs-infra-3.0.0.tgz","_from":"file:auriclabs-jobs-infra-3.0.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-MhqmUKjNUl9/L3BxKhOw/ES4Q6g/m7YILhaTKmxB21yarU3zj2ctN/Vw6z/w2NWtCXxRVdj/LJBCoMt70ic8JA==","shasum":"e4f2a63cb0aafe62634199a6d6fd7cb4949be208","tarball":"https://registry.npmjs.org/@auriclabs/jobs-infra/-/jobs-infra-3.0.0.tgz","fileCount":18,"unpackedSize":60251,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbn3U6DX/yHZDt7CT656duvzfwNWE5PWfSbzWp0i1lwAIgUp8sRisZu8rIfRewAHPDNbVqQiNzE2lF3EFELqEDagA="}]},"_npmUser":{"name":"kevupton","email":"kevin@upton.tech"},"directories":{},"maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jobs-infra_3.0.0_1783326564186_0.4674638661449195"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-21T23:08:33.713Z","modified":"2026-07-06T08:29:24.447Z","0.1.0":"2026-03-21T23:08:33.970Z","0.2.0":"2026-03-23T18:29:57.761Z","1.0.0":"2026-04-19T10:06:04.929Z","2.0.0":"2026-04-22T23:29:12.127Z","2.1.0":"2026-07-05T16:33:00.531Z","2.2.0":"2026-07-05T18:13:07.977Z","3.0.0":"2026-07-06T08:29:24.326Z"},"bugs":{"url":"https://github.com/auriclabs/packages/issues"},"license":"ISC","homepage":"https://github.com/auriclabs/packages#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/auriclabs/packages.git","directory":"packages/jobs-infra"},"description":"SST infrastructure helpers for job queue tables and resources","maintainers":[{"name":"kevupton","email":"kevin@upton.tech"}],"readme":"# @auriclabs/jobs-infra\n\nSST infrastructure helpers for provisioning DynamoDB job tables, SQS queues, and Lambda executor subscriptions.\n\n## Setup\n\n```bash\npnpm add @auriclabs/jobs-infra\n```\n\n### Peer dependencies\n\n```bash\npnpm add sst @auriclabs/sst-types @auriclabs/sst-utils\n```\n\n## API Reference\n\n### `createJobTable(name)`\n\nCreates a DynamoDB table with the standard job queue schema: primary index, number index, GSI1, and DynamoDB Streams enabled.\n\n```typescript\nimport { createJobTable } from '@auriclabs/jobs-infra';\n\nexport const table = createJobTable('JobTable');\n```\n\nReturns: `sst.aws.Dynamo`\n\nTable schema:\n| Field | Type | Index |\n|-------|------|-------|\n| `pk` | string | Primary hash key |\n| `sk` | string | Primary range key |\n| `numberIndexPk` | string | numberIndex hash key |\n| `numberIndexSk` | number | numberIndex range key |\n| `gsi1pk` | string | gsi1 hash key |\n| `gsi1sk` | string | gsi1 range key |\n\n### `registerJobResources(config)`\n\nRegisters job resources: subscribes the DynamoDB stream handler and sets up Lambda executor queue subscriptions.\n\n```typescript\nimport { registerJobResources } from '@auriclabs/jobs-infra';\n\nregisterJobResources({\n  table: jobTable,\n  resources: [\n    {\n      id: 'lambda',\n      executor: 'lambda',\n      queue: lambdaJobQueue,\n      fns: [workerFn1, workerFn2],\n    },\n    {\n      id: 'worker',\n      queue: workerQueue,\n      // No executor — custom processing\n    },\n  ],\n  handlerPaths: {\n    stream: 'services/job/handlers/job-table-stream.handler',\n    executor: 'services/job/handlers/lambda-executor.handler',\n  },\n});\n```\n\nConfig:\n\n```typescript\ninterface RegisterJobResourcesConfig {\n  table: sst.aws.Dynamo;\n  resources: JobResource[];\n  handlerPaths: {\n    stream: string;    // DynamoDB stream handler path\n    executor: string;  // Lambda executor handler path\n  };\n}\n```\n\n### Resource Types\n\n```typescript\n// Lambda-executed jobs: SQS → Lambda executor → target Lambda\ninterface LambdaJobResource {\n  id: string;\n  executor: 'lambda';\n  queue: sst.aws.Queue;\n  fns: FunctionWithName[];  // From @auriclabs/sst-utils\n}\n\n// In-process jobs: SQS → consumer runs registered handlers directly\ninterface InProcessJobResource {\n  id: string;\n  executor: 'in-process';\n  queue: sst.aws.Queue;\n  handler: string;          // wraps createRegistryExecutorHandler(...) from @auriclabs/jobs\n  link?: unknown[];         // extra linkables the handlers depend on\n  environment?: Record<string, string>;\n}\n\n// Worker jobs: SQS → custom processing (no executor subscription)\ninterface WorkerJobResource {\n  id: string;\n  executor?: never;\n  queue: sst.aws.Queue;\n}\n\ntype JobResource = LambdaJobResource | InProcessJobResource | WorkerJobResource;\n```\n\nExample `'in-process'` executor wiring:\n\n```typescript\nregisterJobResources({\n  table,\n  resources: [\n    {\n      id: 'worker',\n      executor: 'in-process',\n      queue: workerJobQueue,\n      handler: 'services/job/handlers/registry-executor.handler',\n      link: [bucket],\n    },\n  ],\n  handlerPaths: { ... },\n});\n```\n\n```typescript\n// services/job/handlers/registry-executor.ts\nimport { createRegistryExecutorHandler, initJobs } from '@auriclabs/jobs';\nimport { Resource } from 'sst';\n\ninitJobs({ tableName: Resource.JobTable.name });\nexport const handler = createRegistryExecutorHandler({\n  syncItems: async (payload) => { /* ... */ },\n});\n```\n\n### What `registerJobResources` sets up\n\n1. **DynamoDB stream subscription** on the job table\n   - Filters for `job-attempt` entity records only (ElectroDB `__edb_e__` field)\n   - Links the table and all queues\n   - Sets `QUEUE_URL_LIST` env var (maps queue IDs to URLs)\n\n2. **Lambda executor subscriptions** for each `LambdaJobResource`\n   - Subscribes queue to executor handler\n   - Links table, queue, and target Lambda functions\n   - Sets `LAMBDA_FUNCTION_LIST` env var (maps function names to ARNs)\n   - Batch config: 10 items, 3 second window, partial responses enabled\n\n3. **In-process executor subscriptions** for each `InProcessJobResource` (`executor: 'in-process'`)\n   - Subscribes queue to the consumer-provided handler\n   - Links table, queue, and any extra `link` entries\n   - Sets `QUEUE_URL_LIST` env var (needed for scheduledAt re-enqueue and continuations)\n   - Same batch config as the Lambda executor\n\n### `createJobsDashboard(options)`\n\nDeploys the jobs dashboard that ships inside `@auriclabs/jobs`: an\n`ApiGatewayV2` routing `$default` to your dashboard API handler, and a\n`StaticSite` serving the package's `ui/` bundle with the API URL injected\nat deploy time. Optional CloudFront basic-auth gates the static site\n(discovery prevention only — the API itself is unauthenticated, so deploy\non dev/demo stages only).\n\n```typescript\nimport { createJobsDashboard } from '@auriclabs/jobs-infra';\n\nif (['dev', 'demo'].includes($app.stage)) {\n  createJobsDashboard({\n    apiHandler: 'services/job/dashboard.handler', // wraps createJobsDashboardApiHandler\n    table,\n    basicAuth: { username: 'ops', password: secret.value },\n  });\n}\n```\n\nOptions: `apiHandler`, `table`, `link?` (extra linkables for the API fn),\n`domain?`, `uiPath?` (override the resolved @auriclabs/jobs ui dir),\n`basicAuth?` (`{ username, password, realm? }`). Returns `{ api, site }`.\n\n## Full Example\n\n```typescript\n// infra/job.ts\nimport { createJobTable, registerJobResources } from '@auriclabs/jobs-infra';\n\nexport const table = createJobTable('JobTable');\n\nexport const lambdaJobDeadLetterQueue = new sst.aws.Queue('LambdaJobDeadLetterQueue');\nexport const lambdaJobQueue = new sst.aws.Queue('LambdaJobQueue', {\n  delay: '0 seconds',\n  visibilityTimeout: '10 minutes',\n  dlq: {\n    retry: 3,\n    queue: lambdaJobDeadLetterQueue.arn,\n  },\n});\n\nregisterJobResources({\n  table,\n  resources: [\n    {\n      id: 'lambda',\n      executor: 'lambda',\n      queue: lambdaJobQueue,\n      fns: [crawlerWorker, indexerWorker],\n    },\n  ],\n  handlerPaths: {\n    stream: 'services/job/handlers/job-table-stream.handler',\n    executor: 'services/job/handlers/lambda-executor.handler',\n  },\n});\n```\n\nThe handlers should use factories from `@auriclabs/jobs`:\n\n```typescript\n// services/job/handlers/job-table-stream.ts\nimport { createJobTableStreamHandler, initJobs } from '@auriclabs/jobs';\nimport { Resource } from 'sst';\n\ninitJobs({ tableName: Resource.JobTable.name });\nexport const handler = createJobTableStreamHandler();\n\n// services/job/handlers/lambda-executor.ts\nimport { createLambdaExecutorHandler, initJobs } from '@auriclabs/jobs';\nimport { Resource } from 'sst';\n\ninitJobs({ tableName: Resource.JobTable.name });\nexport const handler = createLambdaExecutorHandler();\n```\n","readmeFilename":"README.md"}