Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set useCdn: false automatically when perspective: 'previewDrafts' #299

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Aug 16, 2023

No description provided.

src/data/dataMethods.ts Outdated Show resolved Hide resolved
@stipsan stipsan requested a review from rexxars August 17, 2023 00:05
@stipsan stipsan marked this pull request as ready for review August 17, 2023 00:05
@stipsan stipsan force-pushed the set-use-cdn-to-false-on-preview-drafts branch from 87eea6e to 0dca907 Compare August 18, 2023 00:31
Comment on lines +16 to +17
`The Sanity client is configured with the \`perspective\` set to \`previewDrafts\`, which doesn't support the API-CDN.`,
`The Live API will be used instead. Set \`useCdn: false\` in your configuration to hide this warning.`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rexxars does this look ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message looks okay to me - suggested a typo fix.

@stipsan stipsan force-pushed the set-use-cdn-to-false-on-preview-drafts branch from 0dca907 to d9d60df Compare August 18, 2023 00:33
src/warnings.ts Outdated
@@ -12,6 +12,11 @@ export const printCdnWarning = createWarningPrinter([
`\`useCdn: false\` to use the Live API. Note: You may incur higher costs using the live API.`,
])

export const printCdnPrevieDraftsWarning = createWarningPrinter([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const printCdnPrevieDraftsWarning = createWarningPrinter([
export const printCdnPreviewDraftsWarning = createWarningPrinter([

src/data/dataMethods.ts Outdated Show resolved Hide resolved
Comment on lines +16 to +17
`The Sanity client is configured with the \`perspective\` set to \`previewDrafts\`, which doesn't support the API-CDN.`,
`The Live API will be used instead. Set \`useCdn: false\` in your configuration to hide this warning.`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message looks okay to me - suggested a typo fix.

@stipsan stipsan force-pushed the set-use-cdn-to-false-on-preview-drafts branch from d9d60df to 4093b44 Compare August 18, 2023 18:00
@stipsan stipsan force-pushed the set-use-cdn-to-false-on-preview-drafts branch from 4093b44 to bbcbe96 Compare August 18, 2023 18:05
@stipsan stipsan merged commit 0cb98cf into main Aug 18, 2023
13 checks passed
@stipsan stipsan deleted the set-use-cdn-to-false-on-preview-drafts branch August 18, 2023 18:16
@github-actions
Copy link
Contributor

🎉 This PR is included in version 6.4.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants