Skip to content

Wire the docs playground to the real 1.2.0 bundle#6

Merged
GravityHaxx merged 1 commit into
mainfrom
feat/playground-v1.2
Jul 24, 2026
Merged

Wire the docs playground to the real 1.2.0 bundle#6
GravityHaxx merged 1 commit into
mainfrom
feat/playground-v1.2

Conversation

@GravityHaxx

Copy link
Copy Markdown
Collaborator

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 (fpe mode, no transformSecret requirement) 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 new npm run build:playground script
  • Modes updated to mask / label / hash / pseudonym (with a demo transformSecret); deprecated fpe removed from the UI
  • Opt-in toggle now also enables phone; the sample text exercises the new anthropic_key and national-phone detectors
  • Status line shows the bundled version: v1.2.0 · runs entirely in your browser

Verified 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.

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.
@GravityHaxx
GravityHaxx requested a review from umudhasanli as a code owner July 24, 2026 07:47
@GravityHaxx
GravityHaxx merged commit 90be684 into main Jul 24, 2026
5 checks passed
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.

2 participants