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:
@@ -1,5 +1,4 @@
|
||||
// Centralized event name constants for Wails frontend/backend communication.
|
||||
// These names must match the corresponding event names in the Go backend.
|
||||
// Code generated by genevents from backend/events/events.go. DO NOT EDIT.
|
||||
|
||||
export const Events = {
|
||||
// Playback events (backend → frontend push)
|
||||
@@ -15,6 +14,12 @@ export const Events = {
|
||||
QueueModeChanged: "QueueModeChanged",
|
||||
QueueTracksModified: "QueueTracksModified",
|
||||
|
||||
// Config events
|
||||
LibraryConfigChanged: "LibraryConfigChanged",
|
||||
ThemeConfigChanged: "ThemeConfigChanged",
|
||||
TrackListConfigChanged: "TrackListConfigChanged",
|
||||
FavoritesConfigChanged: "FavoritesConfigChanged",
|
||||
|
||||
// Playlist events
|
||||
PlaylistCreated: "PlaylistCreated",
|
||||
PlaylistDeleted: "PlaylistDeleted",
|
||||
@@ -23,11 +28,6 @@ export const Events = {
|
||||
PlaylistsRestored: "PlaylistsRestored",
|
||||
DefaultPlaylistChanged: "DefaultPlaylistChanged",
|
||||
|
||||
// Config events
|
||||
ThemeConfigChanged: "ThemeConfigChanged",
|
||||
TrackListConfigChanged: "TrackListConfigChanged",
|
||||
FavoritesConfigChanged: "FavoritesConfigChanged",
|
||||
|
||||
// Library events
|
||||
LibraryScanStarted: "LibraryScanStarted",
|
||||
LibraryScanComplete: "LibraryScanComplete",
|
||||
|
||||
Reference in New Issue
Block a user