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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user