Implement a centralized logging system with typed events (webhook, PR, comment, review, Discord relay, errors, etc.) that feeds a pub/sub pattern. Events are logged to console (with ANSI colors: green=normal, yellow=skipped, red=errors, cyan=PR#) and persisted to JSONL files organized by git commit SHA. Restructure server code into src/server/ directory with separate route handlers. Add a new /logs endpoint with an HTML viewer that displays events in a searchable table with type/repo filtering and browser timezone conversion. Remove the old /errors endpoint. Improvements: - All webhook handlers, Discord events, and errors now use log() instead of console.* calls - Error objects are properly serialized to JSONL (message + stack extracted) - Path traversal vulnerability fixed in readLogFile() - Failed API calls and caught errors are now always logged - Graceful error handling with fallbacks where appropriate (e.g., missing Discord users) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| .vscode | ||
| packages | ||
| .bun-version | ||
| .example.env | ||
| .gitattributes | ||
| .gitignore | ||
| bun.lock | ||
| ci.ts | ||
| main.ts | ||
| package.json | ||
| README.md | ||
Workshop Monorepo
We are making a bunch of smaller projects that occasionally rely on each other. So a monorepo makes a lot of sense! It lets us share code, and share dependencies with minimal fuss.
Ok, I want to add a new project.
bun init packages/WHATEVER_YOU_WANT- Edit the
package.jsonand change the name to@workshop/WHATEVER_YOU_WANT
To add one of the existing packages as a dependency, edit the package.json and add it to the dependencies or devDependencies section. For example, if you want to add @workshop/WHATEVER_YOU_WANT, you would do:
{
"dependencies": {
"@workshop/WHATEVER_YOU_WANT": "workspace:*"
}
}
Then run bun install and import it in your code like so:
import { something } from "@workshop/WHATEVER_YOU_WANT"
What does corey not love about this?
- I put near-zero effort into naming things.
- I'd prefer the namespace to be shorter,
@workshopis a bit long. - There are lots things I don't love about nano-remix, but it works well enough for now.
- The bun tailwind plugin doesn't work with nano-remix yet, but it looks like in a future bun release it will.
How do I run the tests?
😂😂😂😂😂