Repository navigation
Browser playground: paste a migration, see what leaks - #8
Merged
Merged
Conversation
…ines without it gen-supabase-env now also creates every extension the pinned image ships, reads each one's member objects back from the catalog, and writes src/core/supabase/extensions.generated.ts: the image's extension list, supautils.extensions_parameter_overrides, and for each extension a stub with the same schemas, types, tables, views and function signatures, and bodies that do nothing. Extensions defining operators, access methods, casts or base types (postgis, pgroonga, rum, ...) are listed as unstubbable instead. Stubs record the extensions whose types they use. environment.ts gains the API a standalone engine (the playground) needs: extensionStubFiles() resolves stubs against what the engine has natively, unavailableExtension() says why one can't be created, and standaloneBeforeChecksSql() drops temp objects (the CLI checks on a new connection) and applies supautils' schema overrides from the generated config. The CLI bundle doesn't include any of it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A static page (playground/, a pnpm workspace package built with Vite). Postgres runs as PGlite in a Web Worker; nothing leaves the browser, and the build's Content-Security-Policy only allows this site's own files. - The engine runs the CLI's environment (src/core/supabase), apply rules, P001 probe and lint normalization, plus the linter SQL Supabase CLI v2.118.0 runs. Output is the CLI's human report line for line; test/render.test.ts holds the two together. Empty tables show as unverified_no_rows. - Native extensions load on demand; Supabase-only ones use the generated stubs. Each run starts a fresh Postgres from a prepared data directory. - PGlite can't cancel a query, so a 20 s watchdog (and a stop link) replaces the worker. - PGlite's files are self-hosted and downloaded after the page loads, with progress: the beam over the findings fills as the engine arrives. - Four examples with seed rows: leaky table, fixed table, `using (true)` for anon, clean. - Set in Charter and Commit Mono, self-hosted; licenses in public/licenses with every other third-party notice. dependency-cruiser: the playground may import src/core only, and nothing imports the playground. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- On load, the leaky table example is filled in and checked as soon as Postgres is ready, so the first screen shows the P001 [proven] line with no clicks. - Check is visible without scrolling at 1280x720 and 1440x800: a tighter masthead, and the migration editor sizes to the window (8 to 18 lines), still resizable. - Example SQL lines stay under 60 characters, so none is cut off at desktop width. On phones, editors soft-wrap instead of scrolling sideways. - In one column, findings come first, and the findings beam carries the loading progress (the separate masthead loading line is gone). - A quiet text link to the repo on the wordmark row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ned linter SQL source - Built for amsozzer.com/lintel/ (PLAYGROUND_BASE overrides): dist/lintel/ plus dist/_headers with the same CSP as a header (adding frame-ancestors 'none') and immutable caching for hashed assets and PGlite files, which now live under pglite/<version>/. - The linter SQL is pinned to supabase/cli commit 70b42b8 (tag v2.118.0). Its license (MIT: apps/cli/package.json, the published `supabase` npm package, apps/cli-go/LICENSE) is recorded in the generated file, in public/licenses/README.txt with the license text, and in THIRD_PARTY_NOTICES.md. It is not taken from supabase/splinter, which has no LICENSE file, or from Studio's lint query, whose last SQL version has 13 of the 23 lints. - README: how to deploy to a Cloudflare Pages or static-assets site. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e examples fit Seed emails use the reserved example.com domain. Its longer lines fit the editor from 1180px, so the two-column layout starts there; narrower windows get one column, findings first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Sorry @Amsozzer1, your pull request is larger than the review limit of 150,000 diff characters |
amsozzer.com drops trailing slashes, so the page is served as /lintel and relative URLs would resolve against the site root. The worker's PGlite path and the licenses link now come from the build's base path, and _headers gets a rule for /lintel itself, which /lintel/* doesn't match. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Builds on #7 (merged): it uses the shared report wording and the pure lint module from there. Not deployed yet.
What it is
A static page in
playground/: paste Supabase migration SQL and seed rows, and see what Lintel would flag. Postgres runs as PGlite in a Web Worker. No backend, nothing leaves the browser: a Content-Security-Policy allows only this site's own files.Same code as the CLI:
src/core/supabase);test/render.test.tschecks that the page prints exactly whatlintel checkprints for the same report.Extensions: Supabase-only extensions are no-op stubs generated from the image's catalog (
src/core/supabase/extensions.generated.ts). Ones that can't be stubbed (PostGIS, pgroonga, rum) say so.First load: the leaky example runs automatically, so the first screen shows
P001 [proven].Safety and loading:
Assets: fonts (Charter, Commit Mono) and PGlite are self-hosted; licenses are in
public/licenses/.Deploy (not done)
pnpm playground:buildproducesdist/lintel/anddist/_headersfor amsozzer.com/lintel/. Seeplayground/README.md.Tests
pnpm test:playground: 15 tests (engine, examples, CLI-identical output).pnpm check:all: passes, with layering rules allowing the playground to importsrc/coreonly.🤖 Generated with Claude Code