Skip to content

feat(create-ideal-cms): gate premium plugins behind a private-registry token - #132

Merged
dogfrogfog merged 1 commit into
mainfrom
feat/create-ideal-cms-premium-plugin-gate
Sep 7, 2026
Merged

dogfrogfog merged 1 commit into
mainfrom
feat/create-ideal-cms-premium-plugin-gate

Conversation

@dogfrogfog

Copy link
Copy Markdown
Member

Summary

  • apps/cms depends on @fr-private/payload-plugin-visual-editing, a FocusReactive-only premium plugin. Anyone scaffolding via npx create-ideal-cms without private-registry access hit a 404 on bun install for that scope.
  • Added an optional prompt: "Do you have a FocusReactive private-plugin registry token?"
    • No token → the scaffolder strips the plugin's dependency and all 5 of its wiring points (lib/plugins/index.ts registration, the layout.tsx <VisualEditing.Provider> wrapper — LivePreviewListener stays for draft-mode live preview, RichText/prepareMediaProps helper calls, and the admin importMap.js entry) so the scaffolded project installs and type-checks clean with no private-scope dependency at all.
    • Token given → writes a .npmrc referencing ${NPM_TOKEN} (never the literal secret, so git init && git add . in the scaffold can't commit it into the new project's history) and installs with NPM_TOKEN set only as an env var for that install run. apps/cms in this monorepo is untouched either way — the demo project keeps the plugin.
  • Docs: documented the new prompt and premium-plugin behavior in packages/create-ideal-cms/README.md.

Test plan

  • Verified the strip path against a real copy of apps/cms: dependency + all 5 touch points removed, zero leftover @fr-private references, tsgo --noEmit passes with 0 errors
  • Verified the token path: .npmrc written with ${NPM_TOKEN} interpolation (no literal secret on disk), apps/cms left fully intact
  • bun run build, bunx ultracite check, and a manual tsgo --noEmit on packages/create-ideal-cms all pass
  • Repo-wide bunx turbo run check-types passes (5/5 tasks)

…y token

apps/cms ships @fr-private/payload-plugin-visual-editing, which 404s for
anyone scaffolding without FocusReactive's private-registry access. Add
an optional prompt for a private-plugin token: without one, strip the
plugin's dependency and its 5 wiring points from the scaffold output;
with one, write a .npmrc that reads NPM_TOKEN from the environment
(never persisted to disk, so initGit can't commit the secret) and keep
the plugin wired.
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ideal-cms Ready Ready Preview Sep 7, 2026 10:12am UTC

Request Review

@dogfrogfog
dogfrogfog merged commit 487c4ee into main Sep 7, 2026
2 checks passed
@dogfrogfog
dogfrogfog deleted the feat/create-ideal-cms-premium-plugin-gate branch September 7, 2026 10:14
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.11.4 🎉

The release is available on npm package (@latest dist-tag)

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.

1 participant