This repo provides scaffolding for running internal scheduled tasks on a CRON-like schedule.
If you need to add an account to receive auto-top-up rate limit NFTs, see the worker readme
Packages in this repository are currently not published to NPM; it is expected to be deployed as a worker to Heroku.
To prepare for either production usage or local development, you must install dependencies and build the packages.
pnpm install && pnpm buildNote that local development uses dotenvx to load necessary environment vars from a .env file which must be located in the root directory of the repository to be loaded.
pnpm devNote that all environment variables for the worker process must be defined in the host environment. Production does not use dotenvx.
pnpm start| Package | Purpose |
|---|---|
| lit-task-client | Load and validate mongo credentials from env in a type-safe way, and produce a task client Agenda instance |
| lit-task-auto-top-up | Task to mint capacity credit NFTs for a list of recipient addresses defined in JSON at a configured URL |
The repository is a mono-repo leveraging pnpm as the package manager, using pnpm workspaces. It requires Node v18+, it is recommended that you use nvm to select the correct node version via the included .nvmrc file.
- Clone the repository
- Enable Corepack using
corepack enable - Install dependencies by executing
pnpm installin the root of the repo - Build all packages by executing
pnpm buildin the root of the repo - Currently, you must manually rebuild packages that are referenced locally using
workspace:*references after making changes, untilunbuild stubissues with Typescript have been resolved. Reference issue: unjs/unbuild#370