feat(cloudflare/dev): pass workflow classNames to the vite dev-server - #1
Open
bensenescu wants to merge 1 commit into
Open
feat(cloudflare/dev): pass workflow classNames to the vite dev-server#1bensenescu wants to merge 1 commit into
bensenescu wants to merge 1 commit into
Conversation
alchemy-run#707 added async workflow bindings, but they only work for `deploy`. `alchemy dev` fails at startup because the vite dev module-runner never exports the hosted WorkflowEntrypoint classes: Worker "workflows:X"'s binding "USER_WORKFLOW" refers to service "user-worker" with a named entrypoint "X", but "user-worker" has no such named entrypoint. Collect the same-script workflow classNames in the local worker provider and pass them as `worker.workflows` to the cloudflare vite plugin, which generates a `createWorkflowEntrypointWrapper(className)` export for each. Pairs with the cloudflare-tools change that adds `RuntimeWorker.workflows` + the dev wrapper generation.
Owner
Author
Merge-review verification
|
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.
Moving a worker that has a Workflow from wrangler to alchemy,
alchemy devwon't start:alchemy-run#707 added async Workflow bindings, but they only cover deploy. In dev, the vite module-runner needs the hosted workflow classNames so it can export a
WorkflowEntrypointwrapper for each. This collects the same-script workflow classNames inLocalWorkerProviderand passes them asworker.workflows, next todurableObjectNamespaces. Deploy is untouched.Blocked by: bensenescu/cloudflare-tools#1 (adds
RuntimeWorker.workflows).