Support settings export in new config#14724
Conversation
🦋 Changeset detectedLatest commit: 3b5ac0f The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
UnknownError: ProviderInitError |
|
@jamesopstad Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
✅ All changesets look good |
@cloudflare/autoconfig
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
a3ab1f2 to
793788c
Compare
793788c to
3b5ac0f
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers |
| * Specify the compliance region mode of the Worker. | ||
| * | ||
| * Although if the user does not specify a compliance region, the default is `public`, | ||
| * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable. |
There was a problem hiding this comment.
What is this comment saying? Surely not present and undefined are the same?
There was a problem hiding this comment.
Never mind, I see it's copied from somewhere
| * Authored as a named `settings` export. | ||
| */ | ||
| export function defineSettings(config: ConfigInput<SettingsConfigInput>) { | ||
| return { [DEFINITION]: { config, type: "settings" } }; |
There was a problem hiding this comment.
nit: why does this need to be so complicated? Surely it can just be:
return { type: "settings", ...config };
There was a problem hiding this comment.
It's because config can be a function or promise etc. so type can't be merged onto it until it's resolved. We're also jumping through a few hoops to support authoring config both with the define* helpers and without. Might be worth revisiting at some point if we definitely need to do that.
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
A picture of a cute animal (not mandatory, but encouraged)