Codex/configurable api base#13
Conversation
Introduce a new server.apiBase config (default `/__jsondb`) to scope built-in dev-tool routes (viewer, schema, batch, import, events, log, and fork routes) without changing root REST resources or the standalone GraphQL path. Propagate the setting through the client, server, REST handler, Vite integration, and mock logic: client restBatch and fork paths use apiBase, vite plugin resolves apiBase from plugin options then server config, mock behavior skips the configured apiBase, and REST batch handling uses an effective batch path helper. Add normalizeBasePath and batchPathForOptions helpers, update TypeScript types, sample config, docs, and many tests to cover the new behavior.
Introduce a viewer manifest feature and richer REST response format handling. Adds generation and rendering for /__jsondb/manifest(.json|.html|.md), a new CLI command (jsondb viewer manifest), and config options viewerManifestOutFile and server.viewerLinks. Implements a format registry and Accept negotiation (built-in json/html/md), manifest-aware format renderers, and utilities to emit committed viewer manifests during sync. Updates server/rest handlers, exports, and types, plus documentation and example config/tests to reflect the new viewer and formats.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (38)
📝 WalkthroughWalkthroughPR introduces viewer manifest generation for JSONDB: adds REST format registry with content negotiation for json/html/md, implements generateViewerManifest/renderViewerManifest for schema-derived metadata, wires manifest endpoints into server routing, integrates manifest fetching into web viewer, adds CLI viewer command, and supports configurable apiBase for scoped dev routes. ChangesViewer Manifest Implementation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Introduce a new server.apiBase config (default
/__jsondb) to scope built-in dev-tool routes (viewer, schema, batch, import, events, log, and fork routes) without changing root REST resources or the standalone GraphQL path. Propagate the setting through the client, server, REST handler, Vite integration, and mock logic: client restBatch and fork paths use apiBase, vite plugin resolves apiBase from plugin options then server config, mock behavior skips the configured apiBase, and REST batch handling uses an effective batch path helper. Add normalizeBasePath and batchPathForOptions helpers, update TypeScript types, sample config, docs, and many tests to cover the new behavior.Summary by CodeRabbit
server.apiBaseconfigurationserver.viewerLinksjsondb viewer manifestCLI command for generating and exporting viewer metadata