Skip to content

API reference

Generated from the source by TypeDoc, so it always matches the published types. Each entry point is a separate import; its optional peer dependencies are listed in its description and on Entry points.

Import Exports Description
@xtandard/flags 67 The root entry point: the core contracts and types, the evaluator, the snapshot model, and the admin/server factories (createFlagsCore, createFetchHandler).
@xtandard/flags/core 15 Admin core — the operations layer the API and CLI sit on top of.
@xtandard/flags/schema 35 Core type definitions for @xtandard/flags.
@xtandard/flags/evaluator 10 The flag evaluator — the heart of the runtime.
@xtandard/flags/snapshot 4 Snapshot compilation, versioning, and storage operations.
@xtandard/flags/openfeature 5 The OpenFeature provider for @xtandard/flags — the single most important runtime component.
@xtandard/flags/testing 7 Test helpers for @xtandard/flags consumers and the package’s own suite.
@xtandard/flags/storage/memory 3 In-memory storage: createMemoryStorage, with change notifications and no dependencies.
@xtandard/flags/storage/file 3 File-system storage: createFileStorage keeps each key as a JSON file under a directory (node:fs, Bun and Node), with change notifications.
@xtandard/flags/storage/redis 4 Redis storage: createRedisStorage (JSON strings) and createRedisJSONStorage (RedisJSON documents), with push-based change notifications.
@xtandard/flags/storage/postgres 3 Postgres storage: createPostgresStorage, one key/jsonb table created on demand, over pg or any client with a query() method (PGlite included).
@xtandard/flags/storage/mongodb 3 MongoDB storage: createMongoStorage, one collection of { _id, value } documents.
@xtandard/flags/storage/sqlite 3 SQLite storage on bun:sqlite: createSqliteStorage, a file-backed (or in-memory) database for single-node persistence.
@xtandard/flags/storage/libsql 3 libSQL / Turso storage: createLibsqlStorage, SQLite’s dialect on a remote, replicated or embedded database, for multi-node and edge runtimes.
@xtandard/flags/storage/drizzle 2 Drizzle storage: createDrizzleStorage over a table in your own Drizzle schema and database (Postgres, MySQL or SQLite).
@xtandard/flags/drizzle/pg 2 Postgres table factory for the Drizzle storage adapter: pgFlagsTable puts the flags key/value table in your Drizzle schema and migrations.
@xtandard/flags/drizzle/mysql 2 MySQL table factory for the Drizzle storage adapter: mysqlFlagsTable puts the flags key/value table in your Drizzle schema and migrations.
@xtandard/flags/drizzle/sqlite 2 SQLite table factory for the Drizzle storage adapter: sqliteFlagsTable puts the flags key/value table in your Drizzle schema and migrations.
@xtandard/flags/hooks/log 2 Log hook: createLogHook logs every admin mutation (an after hook).
@xtandard/flags/hooks/webhook 2 Webhook hook: createWebhookHook POSTs admin mutation events to an HTTP endpoint, optionally HMAC-SHA256 signed, with retries and backoff.
@xtandard/flags/hooks/test-gate 4 Publish test gate: createTestGate re-evaluates each flag’s pinned test cases against the draft about to be published and denies a publish that breaks them; runFlagTests runs the cases directly.
@xtandard/flags/match/sift 2 The sift query matcher for the matches / notMatches condition operators (MongoDB-style query documents): siftMatcher, and registerSiftMatcher to register it by name.
@xtandard/flags/auth/basic 2 HTTP Basic authentication: basicAuth, with scrypt password hashes (hashPassword, verifyPassword) or your own password verifier.
@xtandard/flags/authorization/none 1 No authorization: noAuthorization allows every action.
@xtandard/flags/authorization/roles 6 Role-based authorization: rolesAuthorization maps roles to the actions they grant (DEFAULT_ROLE_POLICY: admin, editor, viewer), with a read-only switch.
@xtandard/flags/authorization/delegated 2 Delegated authorization: delegatedAuthorization turns your own policy function (ABAC, OPA, Cedar, per-project ownership) into an AuthorizationProvider.
@xtandard/flags/elysia 5 Elysia 1.x adapter: flagsPanel to .mount() the admin panel, and flagsElysia, a typed plugin for the Eden client.
@xtandard/flags/elysia2 2 Elysia 2 adapter: the same surface as @xtandard/flags/elysia (flagsPanel, flagsElysia), built against Elysia 2’s types and route order.
@xtandard/flags/hono 1 Hono adapter: flagsPanel returns a Hono app serving the admin panel, to mount with app.route().
@xtandard/flags/bun 1 Bun adapter: flagsPanel returns a fetch handler serving the admin panel, for Bun.serve or any web-standard server.
@xtandard/flags/express 2 Express adapter: flagsPanel returns a request handler serving the admin panel, to mount with app.use() before any body-parsing middleware.
@xtandard/flags/react 5 @xtandard/flags/react — embed the admin dashboard as a React component in your own app (advanced mode).