Remove SQLite and Turso static data path - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebe8c26b14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ebe8c26 to
ace7c43
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the SQLite/Turso-backed static GTFS storage path (including schema/CLI helpers) and shifts the library toward (1) hosted API usage when apiKey is provided and (2) optional in-memory staticData seeding for lightweight local metadata/stop lookup.
Changes:
- Removed database/Turso/libSQL support, schema push utilities, and the
mta-jsCLI entrypoint. - Reworked
GTFSCachefrom a SQLite-backed store to an in-memory Map-based cache. - Updated docs/examples/tests to emphasize the hosted API and in-memory static data seeding.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Removes database-related options and import options fields tied to the old DB path. |
| src/static-gtfs.ts | Replaces SQLite implementation with in-memory Maps and updates import/query logic. |
| src/schema.ts | Deletes the SQLite schema statements/utilities. |
| src/errors.ts | Updates static-data-missing guidance to reflect hosted API / staticData. |
| src/database-url.ts | Deletes remote/local SQLite URL hydration and libSQL helpers. |
| src/cli.ts | Deletes the CLI for DB push/import. |
| README.md | Rewrites docs to center the hosted API + optional in-memory static data. |
| package.json | Removes bin + DB scripts and drops @libsql/client dependency; updates description. |
| index.ts | Removes MTA.database and hydration logic; wires staticData into in-memory cache. |
| index.test.ts | Removes Turso/DB/CLI tests; adds hosted auth header test and in-memory static tests. |
| examples/vercel-route.ts | Updates example to use hosted API (apiKey) instead of Turso/SQLite. |
| CLAUDE.md | Removes SQLite guidance. |
| AGENTS.md | Removes SQLite guidance. |
| bun.lock | Removes libSQL-related packages from the lockfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ace7c43 to
a807324
Compare
Summary
Breaking changes
Verification