Skip to content

@xtandard/flags/elysia2

Elysia 2 adapter: the same surface as @xtandard/flags/elysia (flagsPanel, flagsElysia), built against Elysia 2’s types and route order. Optional peer dependency: elysia 2.

Entry point for the @xtandard/flags/elysia2 subpath export.

import { … } from "@xtandard/flags/elysia2";
Name Summary
flagsElysia Typed Elysia plugin exposing the admin API so the Eden client can call it with full path/method/param typing (edenClient.flags.api.projects.get()). Routes are declared for the typed surface; every handler delegates to the shared fetch pipeline (auth, authorization, validation, error mapping reused). A catch-all also serves the bundled UI.
Name Summary
FlagsElysiaPlugin What flagsElysia returns: an Elysia 2.x plugin (new Elysia({ prefix, name: "xtandard-flags" })) that declares every admin route — method, path, params and body schemas — under prefix, plus a catch-all for the bundled UI. .use() it on your app and treaty<typeof app>() sees the routes. Named so the reference doesn’t spell out the inferred Elysia generics; it is exactly the inferred plugin type, so Eden typing is unchanged.
Name Documented on
ElysiaFlagsHandler @xtandard/flags/elysia
FlagsElysiaOptions @xtandard/flags/elysia
flagsPanel @xtandard/flags/elysia
FlagsPanelOptions @xtandard/flags