Conversation
ecktoteckto
approved these changes
Jun 1, 2025
|
🎉 This PR is included in version 0.36.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
tonyxiao
added a commit
to tonyxiao/sync-engine-fork
that referenced
this pull request
Apr 14, 2026
* Port PR stripe#142: schema visualizer + explorer scripts onto v2 Adds the Stripe schema visualizer (Next.js + PGlite) and explorer build pipeline from github.com/stripe/pull/142. - packages/visualizer: in-browser schema explorer powered by PGlite (WASM Postgres), with committed bootstrap.sql (106 tables, 2020-08-27 Stripe API schema with seed data) so the visualizer works immediately - scripts/explorer-{harness,migrate,seed,export,build}.ts: pipeline to regenerate bootstrap.sql for a new Stripe API version; note that explorer-migrate.ts requires the old monolith (not present in v2) - package.json: adds `visualizer` and `explorer:build` root scripts The accounts→_sync_accounts rename (also in PR stripe#142) is not ported since the old sync_accounts table does not exist in v2's architecture. Run: pnpm visualizer (starts at http://localhost:3000) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Rename visualizer package to @stripe/sync-visualizer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Fix consistency issues in visualizer + explorer scripts - Move packages/visualizer → apps/visualizer (consistent with other apps) - Fix explorer-seed.ts: import from packages/source-stripe/src/openapi instead of deleted packages/sync-engine - Fix explorer-export.ts: output path apps/visualizer/public/explorer-data - Fix EXPLORER_RUNBOOK.md + apps/visualizer/README.md: replace pnpm tsx with bun run, update packages/visualizer refs to apps/visualizer - Add visualizer:with-data root script (explorer:build + visualizer) - Add pg to root devDependencies so explorer scripts resolve it Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Replace Docker pipeline with OpenAPI-driven schema generator bootstrap.sql and manifest.json were generated files committed to the repo — requiring Docker + Postgres + stripe-mock to regenerate. Replace the entire pipeline (explorer-build/harness/migrate/seed/export) with a single script that generates CREATE TABLE DDL directly from the Stripe OpenAPI spec using the existing SpecParser + buildCreateTableWithSchema. - scripts/explorer-generate.ts: new 50-line script, runs in seconds - Remove explorer-build/harness/migrate/seed/export + EXPLORER_RUNBOOK - Gitignore public/explorer-data/bootstrap.sql and manifest.json - Simplify ExplorerManifest interface (drop seed/failedTables/verification) - Fix ExplorerClient.tsx to use manifest.tables[] instead of manifest.manifest{} - bootstrap.sql: 166 KB (was 1.1 MB with seeded data rows) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Generate Stripe schema in-browser from OpenAPI spec Remove all static files and build steps. pglite.ts now fetches the Stripe OpenAPI spec from GitHub at runtime, runs SpecParser to get table definitions, and builds CREATE TABLE DDL directly in the browser. The spec (~3 MB) is cached in sessionStorage after the first load. - Delete scripts/explorer-generate.ts (no longer needed) - Remove public/explorer-data/ entirely (no static assets) - Remove explorer:build and visualizer:with-data root scripts - pglite.ts: inline browser-compatible DDL builder (no node: deps) - Add @stripe/sync-source-stripe workspace dep to visualizer - Export SpecParser, OPENAPI_RESOURCE_TABLE_ALIASES, ParsedResourceTable from source-stripe's public index Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Fix pnpm-lock.yaml: restore v2 lockfile, add apps/visualizer dep entry Remove stale pg/@types/pg devDeps from root package.json (leftover from removed explorer scripts). Restore v2's exact lockfile to avoid CI failures from peer-dep resolution differences, adding only the apps/visualizer workspace:* entry for @stripe/sync-source-stripe. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Update pnpm-lock.yaml with apps/visualizer dependencies Add all apps/visualizer workspace deps (Next.js, PGlite, CodeMirror, etc.) and accept peer-dep string updates from jiti@2.6.1 transitive resolution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude * Add browser subpath export to source-stripe; fix Next.js webpack error source-stripe's main index.ts transitively imports specFetchHelper.ts which uses node:path — Next.js/webpack can't bundle node: URIs for client components. Add a ./browser subpath export pointing at a new browser.ts barrel that re-exports only SpecParser, OPENAPI_RESOURCE_TABLE_ALIASES, and ParsedResourceTable (all pure TS, no node: deps). Update pglite.ts to import from '@stripe/sync-source-stripe/browser'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Committed-By-Agent: claude --------- Co-authored-by: Tony Xiao <tonyx.ca@gmail.com> Co-authored-by: Claude Sonnet 4.6 <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.
No description provided.