This is an automated script that notifies me via email about a new release of Vercel's Geist, in relation to the package I maintain, non.geist. As my package depends on Vercel's Geist font files
It uses node-mailer
to send me configured emails 4 times each day (12 AM, 6 AM, 12 PM, and 6 PM) with appropriate information depending whether a new release exists, and accordingly downloads the assets if available.
The script is initialiased by a cron using node-cron
and runs indefinitely, restarts automatically on system reboot using pm2
, essentially making it a startup service (on a Linux machine).
Any error and/or info (timestamped) are saved to individual files to keep track of updates.
Folks use my package, I want them to have the latest version of the font files I depend on.
PS: Feedback, from an issue, might have prompted me to do this.
Bun file operations' APIs are so declarative & pro good DX.
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.8. Bun is a fast all-in-one JavaScript runtime.