Skip to content

feat(schema): generate app JSON Schemas from src/apps - #257

Merged
guitavano merged 1 commit into
mainfrom
feat/generate-app-schemas
Jun 18, 2026
Merged

feat(schema): generate app JSON Schemas from src/apps#257
guitavano merged 1 commit into
mainfrom
feat/generate-app-schemas

Conversation

@guitavano

@guitavano guitavano commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extend generate-schema.ts to scan src/apps/ (third pass after loaders and sections)
  • Populate manifest.blocks.apps and schema.root.apps so the CMS can edit installed apps
  • Skip helper files under site/apps/**/_* and support --skip-apps / --apps CLI flags

Test plan

  • Run npx tsx scripts/generate-schema.ts on a site with src/apps/deco/vtex.ts bridge
  • Verify meta.gen.json includes manifest.blocks.apps with VTEX entry
  • Confirm existing section + loader generation unchanged

Made with Cursor


Summary by cubic

Generate JSON Schemas for app bridges in src/apps/ and expose them in manifest.blocks.apps and schema.root.apps. This lets the CMS edit installed apps (e.g., VTEX) without manual wiring.

  • New Features

    • Adds a third pass to scripts/generate-schema.ts that scans src/apps/ and builds JSON Schema 7 for each app Props.
    • Populates manifest.blocks.apps and schema.root.apps.anyOf with refs to each app schema.
    • Skips helper files under /_*; adds --apps <dir> and --skip-apps flags.
    • Keeps section and loader generation unchanged; prints app counts in the summary.
  • Migration

    • Run npx tsx scripts/generate-schema.ts to generate app entries.
    • Ensure app bridges export Props (interface/type or via default export) under src/apps/.
    • Verify meta.gen.json shows entries under manifest.blocks.apps.

Written for commit 113ac5a. Summary will update on new commits.

Review in cubic

Extend generate-schema.ts to scan installed app bridges under src/apps/
and populate manifest.blocks.apps so the CMS can edit VTEX, blog, and
custom apps without per-site merge scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@guitavano
guitavano merged commit 39825f7 into main Jun 18, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants