@epicdm/gateway-routes
v0.1.7
Published
Canonical gateway route table, logical service bindings, and environment emitters for FlowState
Readme
@epicdm/gateway-routes
Canonical gateway route table, smoke test specifications, and gateway config emitters for Epic FlowState.
What's in this package
ROUTES— single source of truth for all gateway routes (path, upstream, scope, auth, CORS, rate limit, transport)SMOKE_SPECS— canonical smoke test specifications for local and cloud gateway parityCLOUD_BINDINGS/LOCAL_BINDINGS— logical service → binding mapsUPSTREAM_TO_LOGICAL— upstream service ID →LogicalServiceunion mappingemitCfRoutes(routes)— emits the Cloudflare Worker gateway route table (excludeslocal-onlyscope)emitKong(routes, opts)— emits the Kongkong.ymldeclarative config (excludescloud-onlyscope)
Canonical source
⚠️ This package is vendored. The canonical source lives in the
flowstate-platformmonorepo atpackages/gateway-routes. This copy exists so theepic-flowstate-communitymonorepo can consume it viaworkspace:*without a cross-repo registry dependency.
Sync policy
Per the P0 decisions document §9 (lives in the canonical flowstate-platform
repo at docs/plans/2026-04-10-gateway-routes-decisions.md, not in this
community repo):
- The canonical package in
flowstate-platformis frozen — no behavioural changes without a coordinated cross-repo task. - When the upstream package changes, a follow-up task must bump this vendored copy byte-for-byte from
flowstate-platform@<sha>and update the "Last synced from" line below. - The vendored copy must remain byte-identical to upstream except for this
README.md. - The P3.7
lint:kongCI check guards against drift in generated Kong YAML.
Last synced from
- Upstream commit:
flowstate-platform@030b4da0(dev) - Sync date: 2026-04-11
- Synced as part of:
task_rN6GL9aFBa(P3.1 — add@epicdm/gateway-routesdep to flowstate-cli)
Usage
import {
ROUTES,
SMOKE_SPECS,
emitCfRoutes,
emitKong,
type GatewayRoute,
type SmokeSpec,
} from '@epicdm/gateway-routes'
// Emit Kong declarative config for local dev
const kongYaml = emitKong(ROUTES, {
gatewayPort: 7080,
jwtIssuer: 'http://localhost:7080',
jwtConsumer: 'flowstate-auth',
})
// Emit Cloudflare Worker route list for cloud gateway
const cfRoutes = emitCfRoutes(ROUTES, { includeDevOnly: false })
// Run smoke tests against a gateway
for (const spec of SMOKE_SPECS) {
// GET/POST ${spec.path}, expect spec.expect status
}License
Apache-2.0. Epic FlowState is a trademark of Epic Digital Interactive Media LLC.
