Flash-Engine 0.5.0
Feature release: the modern DX attribute family plus the highest-priority backlog items. Managed-only — the native core, the core contract (v12) and the FXServer artifact pin (31689) are unchanged; a 0.5.0 SDK runs on the 0.4.x payload.
Highlights
Attribute routing family — write resources declaratively:
[EventHandler("name")]+[FromSource]— typed event handlers with automatic argument deserialization (Events.RegisterAll(this)).[StateWatcher("key")]— reactive state-bag bindings with(newValue, oldValue)and the bag owner injected.[FlashExport("name")]— declarative C# exports (Exports.RegisterAll(this)).[AuthorizeFaction]/[AuthorizeAdmin]— declarative, fail-closed authorization enforced on commands and events (method- and class-level).
Lua autocomplete for C# exports — every resource build now emits <resource>.d.lua (EmmyLua) generated from your [FlashExport] methods, including hover docs from your C# /// comments. Lua scripts calling exports.<resource>:... get autocomplete + type checking in VS Code (sumneko Lua Language Server). Ships inside the Flash.Sdk NuGet — zero configuration.
More SDK
- Typed DB mapping:
Db.Query<T>/Db.QueryAsync<T>/Db.QuerySingleAsync<T>(Dapper-style, snake_case→PascalCase, numeric-safe). - Standard
HttpClientviaFlashHttpMessageHandler— continuations resume on the script thread; unlocks Refit/Discord.Net/System.Net.Http.Json. - Graceful async shutdown:
IAsyncStoppable.OnStopAsync(ct)with a bounded grace window (flash_stop_grace_ms) — flush your DB saves safely on stop/restart. - Anti-XSS input sanitization:
Flash.Security(HtmlEncode, allow-listIsMatch) +Args.StrRegex. StateBag.Get<T>now coerces wire-widened numerics (int/long/double/nullables).
All new code went through a verification pass before release — the bugs found (class-level authorization bypass, off-thread HttpClient/RPC crashes, DB NULL mapping, and more) are fixed in this release. Full details in the CHANGELOG.
Install
Download flash-payload-0.5.0.zip, unpack, then:
.\install-flash.ps1 -ServerDir "C:\FXServer\server" -PayloadDir .| Flash release | Flash.Sdk (NuGet) | Core contract | FXServer artifact (Windows) |
|---|---|---|---|
| 0.5.0 | 0.5.0 | v12 | 31689 (06d4d348c) |