@flags-sdk/hypertune
The @flags-sdk/hypertune
package provides
- an adapter for loading feature flags from this provider (coming soon)
- a
getProviderData
function for use with the Flags Explorer (available today)
Learn more about Adapters
getProviderData
A provider function to load flag metadata from Statsig for use with the Flags Explorer. Accepts an options
object with the following keys.
Options key | Type | Description |
---|---|---|
token | string | The HYPERTUNE_ADMIN_TOKEN |
app/.well-known/vercel/flags/route.ts
import { verifyAccess, type ApiData } from '@vercel/flags';import { getProviderData } from '@flags-sdk/hypertune';import { NextResponse, type NextRequest } from 'next/server'; export async function GET(request: NextRequest) { const access = await verifyAccess(request.headers.get('Authorization')); if (!access) return NextResponse.json(null, { status: 401 }); const hypertuneData = await getProviderData({ token: process.env.HYPERTUNE_ADMIN_TOKEN, }); return NextResponse.json<ApiData>(hypertuneData);}
Learn more about the Flags Explorer