Repository navigation
chore(cms): remove Strapi provider and rollback path - #114
Merged
Merged
Conversation
Both staging and production have run on CMS_PROVIDER=payload since the cutover, so the Strapi provider was dead code that still shipped in the Worker bundle and still had STRAPI_* secrets pushed on every deploy. Removes lib/strapi/, StrapiProvider, and the provider switch itself — getCMS() now constructs PayloadProvider unconditionally. The default CMS_PROVIDER in wrangler.jsonc was still "strapi", so a fresh checkout with no .env read Strapi in dev; that failure mode is gone with the var. Also drops the parity script (it compared the two providers) and fixes the stale default PAYLOAD_URL, which still pointed at the Strapi host. Comments mentioning legacyStrapiId are kept — that field exists in Payload and drives sort order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning XHawk review did not run: out of credits I stopped before reviewing this PR because your workspace has no credits left, so nothing was posted. Add credits at app.xhawk.ai/billing, then start the review again from XHawk and I will pick up the latest commit. |
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.
Both staging and production have run on
CMS_PROVIDER=payloadsince the cutover (#111, #112). The Strapi provider was dead code that still shipped in the Worker bundle and still hadSTRAPI_*secrets pushed on every deploy.What this removes
lib/strapi/{client,types}.tsandlib/cms/strapi-provider.tsgetCMS()now constructsPayloadProviderunconditionally.getCMSProviderName/CMSProviderName/ theCMS_PROVIDERvar are gone fromlib/cms/config.ts,wrangler.jsonc(all three blocks), both deploy workflows, and.env.example.scripts/cms-parity.tsand thecms:paritypackage script — it existed to diff the two providers.STRAPI_URL/STRAPI_API_TOKEN/STRAPI_PREVIEWfrom both workflows' build env and theirwrangler secret bulkpayloads, and fromcloudflare-env.d.ts.Bugs fixed along the way
The default
CMS_PROVIDERinwrangler.jsoncwas still"strapi", andgetCMSProviderName()fell back to'strapi'on any unknown value. A fresh checkout with no.envtherefore read Strapi in local dev. That failure mode is gone with the variable.The default
PAYLOAD_URLalso still pointed atcms.epyc.in— the old Strapi host. Nowepyc-payload-cms.epyc.workers.dev, matching what both named environments already override it to.Kept deliberately
Comments mentioning
legacyStrapiIdinpayload-provider.tsstay — that field exists in Payload and drives sort order for blogs, projects, and gallery. Removing the explanation would make thosesortstrings look arbitrary.Verification
pnpm exec tsc --noEmit— cleanpnpm test— 114/114 passpnpm exec eslint— 0 errors (6 pre-existing warnings, none in changed files)No runtime behaviour change: every environment already resolved to
PayloadProvider.Follow-ups after merge (not in this diff)
wrangler secret bulkupserts and never deletes, so the Strapi secrets still sit on both Workers:STAGING_STRAPI_*/PRODUCTION_STRAPI_*GitHub Actions secrets are now unreferenced — remove in repo settings.docs/payload-*.mdare left as historical migration records, including a rollback section that no longer applies.🤖 Generated with Claude Code