Wire the docs playground to the real 1.2.0 bundle#6
Merged
Conversation
The live playground was importing flare-redact@0.7.0 from esm.sh — a pre-1.0 API (fpe mode, no transformSecret requirement) loaded from a third-party CDN. Now it imports a local esbuild bundle of the same dist that ships to npm, so the page runs fully offline and always matches the released API. - docs/playground/flare-redact.min.js: bundled ESM (69 kB), rebuilt via the new npm run build:playground script. - Modes updated to mask/label/hash/pseudonym with a demo transformSecret; fpe removed. - Opt-in toggle now also enables phone; sample text exercises the anthropic_key and national phone detectors. - Status line shows the bundled version and that nothing leaves the page.
umudhasanli
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The live playground at https://flare-collection.github.io/flare-redact/ was importing flare-redact@0.7.0 from esm.sh — a pre-1.0 API (
fpemode, notransformSecretrequirement) loaded from a third-party CDN, which also undercut the "nothing leaves this page" promise.Now it imports a local esbuild bundle of the exact dist that ships to npm:
docs/playground/flare-redact.min.js— 69 kB ESM bundle, reproducible via the newnpm run build:playgroundscriptmask / label / hash / pseudonym(with a demotransformSecret); deprecatedfperemoved from the UIphone; the sample text exercises the newanthropic_keyand national-phone detectorsVerified locally in Chrome: all four modes render, 10 findings correctly labeled, no leaks in any mode (also asserted in Node against the bundle for every mode).
This gives the Show HN post a strong "try it in your browser" link with zero external requests.