Conversation
🦋 Changeset detectedLatest commit: 2f00b48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 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 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
petebacondarwin
left a comment
There was a problem hiding this comment.
Nice idea. Looks good. I made a suggestion.
Also won't we need to add this to the turbo.json?
| if (process.env.MINIFLARE_WORKERD_CONFIG_DEBUG === "true") { | ||
| writeFileSync("workerd-config.json", JSON.stringify(config, null, 2)); | ||
| } |
There was a problem hiding this comment.
Can I propose that instead of a boolean you can provide a path to the output file. E.g.
| if (process.env.MINIFLARE_WORKERD_CONFIG_DEBUG === "true") { | |
| writeFileSync("workerd-config.json", JSON.stringify(config, null, 2)); | |
| } | |
| if (process.env.MINIFLARE_WORKERD_CONFIG_DEBUG_PATH) { | |
| writeFileSync(process.env.MINIFLARE_WORKERD_CONFIG_DEBUG_PATH, JSON.stringify(config, null, 2)); | |
| } |
ab6a02b to
c1ba681
Compare
c1ba681 to
d4fbdf8
Compare
| export function serializeConfig(config: Config): Buffer { | ||
| const debugPath = process.env.MINIFLARE_WORKERD_CONFIG_DEBUG; | ||
| if (debugPath) { | ||
| writeFileSync(debugPath, JSON.stringify(config, null, 2)); |
There was a problem hiding this comment.
Just to be clear, if the file path is relative then it will be local to the current working directory.
Is that OK?
There was a problem hiding this comment.
would you expect it to be relative to the wrangler config?
as its just for debugging, and i'm not sure we have the wrangler config path here in miniflare, i'm inclined to just let it be 😅
There was a problem hiding this comment.
yeah its fine. just wanted to make sure this was expected
…seba/containers_scope_debug * 'main' of ssh://github.com/cloudflare/workers-sdk: Version Packages (cloudflare#9697) add remote bindings support to `getPlatformProxy` (cloudflare#9688) feat(containers): add support for handling images that link to the CF registry (cloudflare#9596) CC-5418: Set instance_type in wrangler (cloudflare#9633) remove warnings during config validations on `experimental_remote` fields (cloudflare#9678) add debug logs for workerd (cloudflare#9640) `wrangler containers apply` uses `observability` configuration (cloudflare#9558) Version Packages (cloudflare#9658) Temporarily skip Openapi C3 e2e tests (cloudflare#9691) Skip authed fixture on forks (cloudflare#9681)
…seba/containers_scope * 'main' of ssh://github.com/cloudflare/workers-sdk: Add CLAUDE.md for Claude Code guidance (cloudflare#9563) Version Packages (cloudflare#9697) add remote bindings support to `getPlatformProxy` (cloudflare#9688) feat(containers): add support for handling images that link to the CF registry (cloudflare#9596) CC-5418: Set instance_type in wrangler (cloudflare#9633) remove warnings during config validations on `experimental_remote` fields (cloudflare#9678) add debug logs for workerd (cloudflare#9640) `wrangler containers apply` uses `observability` configuration (cloudflare#9558) Version Packages (cloudflare#9658) Temporarily skip Openapi C3 e2e tests (cloudflare#9691) Skip authed fixture on forks (cloudflare#9681)
Might be useful again, just dumps the workerd config into a file for debugging. Does overwrite the file each time we restart workerd, so when the worker or wrangler config changes, but i think that's probably fine.
@danlapid does this help? any requests while i'm here?