Add schema manifest output and CLI#4
Merged
Conversation
Introduce committed JSON schema manifest generation for model-driven admin/CMS UIs. Adds a new generator (src/schema-manifest.js) and exports generateSchemaManifest/renderSchemaManifest from the public API and CLI. New config options schemaOutFile and schemaManifest (customizeField hook) are supported, and schemaOutFile is resolved in loadConfig. The sync flow writes the manifest when configured, and a new CLI subcommand jsondb schema manifest [--out <file>] is implemented. Type definitions, Vite plugin options, README, SPEC, and example config are updated, and comprehensive tests were added to verify UI inference, nested/array/relation handling, customizeField overrides/omissions, serialization diagnostics, and CLI output.
|
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 (11)
📝 WalkthroughWalkthroughThis PR introduces a schema manifest feature that generates a JSON metadata file describing the jsondb schema structure, inferred UI components for form generation, and support for customizing per-field output via config hooks. ChangesSchema Manifest Feature
Sequence DiagramsequenceDiagram
participant User as User/CLI
participant sync as syncJsonFixtureDb
participant generateSchemaManifest
participant renderSchemaManifest
participant renderFieldManifest
participant customizeField as customizeField Hook
User->>sync: jsondb sync or schema manifest --out
sync->>generateSchemaManifest: config + options
generateSchemaManifest->>renderSchemaManifest: load resources
renderSchemaManifest->>renderFieldManifest: each field in resource
renderFieldManifest->>customizeField: field context + default manifest
customizeField-->>renderFieldManifest: customized manifest or null
renderFieldManifest-->>renderSchemaManifest: field metadata
renderSchemaManifest-->>generateSchemaManifest: versioned manifest
generateSchemaManifest->>generateSchemaManifest: serialize + write JSON
generateSchemaManifest-->>sync: manifest + output paths
sync-->>User: logged file paths / stdout content
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
This was referenced May 12, 2026
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.
Introduce committed JSON schema manifest generation for model-driven admin/CMS UIs. Adds a new generator (src/schema-manifest.js) and exports generateSchemaManifest/renderSchemaManifest from the public API and CLI. New config options schemaOutFile and schemaManifest (customizeField hook) are supported, and schemaOutFile is resolved in loadConfig. The sync flow writes the manifest when configured, and a new CLI subcommand jsondb schema manifest [--out ] is implemented. Type definitions, Vite plugin options, README, SPEC, and example config are updated, and comprehensive tests were added to verify UI inference, nested/array/relation handling, customizeField overrides/omissions, serialization diagnostics, and CLI output.
Summary by CodeRabbit
Release Notes
New Features
jsondb schema manifest --out <file>to generate manifestsDocumentation
Tests