Files
Dominik Ferber e22887a007 feat(flags): share bulk evaluate() and give SvelteKit evaluate()
Extracts the bulk-evaluation orchestration into shared/evaluate.ts
(`evaluateFlags` + the BULKABLE / BULK_IDENTIFY_REF markers), parameterized
by how standalone flags are invoked and which errors are framework control
flow. Next wraps it in its bulkStore ALS and invokes standalone flags via
`flagFn()`; behavior and public .d.ts are unchanged.

SvelteKit gains a real bulk `evaluate(flags, request, secret?)`
(src/sveltekit/evaluate.ts) exported from flags/sveltekit and used by its
`precompute`. SvelteKit's flag() now stamps `adapter`, `config`, and the bulk
markers so adapters implementing `bulkDecide` resolve a whole group in one
call. Adds 2 bulk-evaluate tests.

Documents the framework contract (context resolution, secret strategy,
isFrameworkError, invokeStandalone, output integration) in shared/README.md
so adding a new framework only means writing a thin adapter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:31:52 +03:00
..
2026-06-17 16:22:35 +03:00