Skip to content

refactor(flags): remove maintenance-mode check (operator-native now)#48

Open
coopbri wants to merge 1 commit into
masterfrom
refactor/remove-maintenance-middleware
Open

refactor(flags): remove maintenance-mode check (operator-native now)#48
coopbri wants to merge 1 commit into
masterfrom
refactor/remove-maintenance-middleware

Conversation

@coopbri

@coopbri coopbri commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the dead Elysia maintenanceMiddleware and its Unleash-backed feature-flag plumbing. Unleash was decommissioned and maintenance mode is now operator-native, so this code path is dead.

Changes

  • Delete src/lib/middleware/maintenance.ts
  • Remove the middleware import and .use(maintenanceMiddleware) from src/server.ts
  • Drop the flags / createFlagProvider provider (plus FLAGS_API_HOST / FLAGS_CLIENT_KEY imports) from src/lib/providers/index.ts (other providers retained)
  • Remove FLAGS_API_HOST / FLAGS_CLIENT_KEY and the "FLAGS not set" startup warning from src/lib/config/env.config.ts
  • Remove FLAGS_* lines from .env.production, .env.local.template (and local .env.local)

@omnidotdev/providers is retained (still used by authz, billing, events, storage, and GraphQL plugins).

Verification

  • grep -rniE "maintenance|createFlagProvider|FLAGS_" src clean
  • bunx tsc --noEmit passes
  • bun run check (biome) passes (only pre-existing warnings)
  • bun run knip no new issues
  • bun run build passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant