Skip to content

feat(cms): add CMS fetch client with draft mode support - #102

Open
jlorion wants to merge 5 commits into
stagingfrom
15-cms-migrate-setup-cms-api-client-type-sync-draft-mode
Open

feat(cms): add CMS fetch client with draft mode support#102
jlorion wants to merge 5 commits into
stagingfrom
15-cms-migrate-setup-cms-api-client-type-sync-draft-mode

Conversation

@jlorion

@jlorion jlorion commented Jul 27, 2026

Copy link
Copy Markdown
Member
  • Add cmsFetch() axios wrapper in lib/cms/client.ts with draft-mode auth header, no-store caching, and descriptive error handling
  • Add NEXT_PUBLIC_CMS_URL and CMS_DRAFT_SECRET_TOKEN to .env.example
  • Allow CMS/CloudFront image hosts in next.config.mjs remotePatterns
  • Add scripts/sync-types.sh to pull generated Payload types into /types
  • Set up Jest (ts-jest) with unit tests for cmsFetch
  • Add sync:types and test npm scripts; ignore /types and .env

- Add cmsFetch() axios wrapper in lib/cms/client.ts with draft-mode
  auth header, no-store caching, and descriptive error handling
- Add NEXT_PUBLIC_CMS_URL and CMS_DRAFT_SECRET_TOKEN to .env.example
- Allow CMS/CloudFront image hosts in next.config.mjs remotePatterns
- Add scripts/sync-types.sh to pull generated Payload types into /types
- Set up Jest (ts-jest) with unit tests for cmsFetch
- Add sync:types and test npm scripts; ignore /types and .env
@jlorion
jlorion requested review from ASPactores and seangaaab July 27, 2026 06:22
@jlorion jlorion self-assigned this Jul 27, 2026
@jlorion
jlorion marked this pull request as ready for review July 27, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant