feat(06-02): create Go→TypeScript event constant codegen tool

- Add backend/events/cmd/genevents/main.go using go/ast for deterministic output
- Add //go:generate directive to backend/events/events.go
- Generate frontend/src/events.ts with all 21 constants including LibraryConfigChanged
- Atomic file writes via temp file + rename
- Comment groups preserved with trailing period stripping
This commit is contained in:
2026-03-04 19:22:11 -05:00
parent 9c7e5a9634
commit 3e9edd05e8
3 changed files with 174 additions and 7 deletions
+2
View File
@@ -3,6 +3,8 @@
// the corresponding event names in the TypeScript frontend.
package events
//go:generate go run ./cmd/genevents -source events.go -output ../../frontend/src/events.ts
// Playback events (backend → frontend push).
const (
PlaybackStateChanged = "PlaybackStateChanged"