mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-27 16:22:11 +08:00
Adds a zero-dependency `frontend-contract` bin that serializes the real NoticeStatus variants and FrontendEvent payloads, scripts/gen-contract.mjs which emits the committed src/services/contract.ts, and a CI job that regenerates it and fails on a non-empty diff. events.ts now derives its event map from the generated contract instead of hand-typed shapes.
9 lines
334 B
Rust
9 lines
334 B
Rust
//! Prints the frontend wire contract as JSON to stdout. Zero new dependencies:
|
|
//! the payload is derived from the same serializers the app uses at runtime.
|
|
//! Consumed by scripts/gen-contract.mjs; CI regenerates and diffs the committed
|
|
//! TypeScript artifact.
|
|
|
|
fn main() {
|
|
println!("{}", app_lib::frontend_wire_contract());
|
|
}
|