Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eersnington/sideffect/llms.txt
Use this file to discover all available pages before exploring further.
WorkflowEntrypoints.make() is the manual adapter that turns Sideffect WorkflowLayer objects into the native Cloudflare WorkflowEntrypoint subclasses that Wrangler expects to find exported from your Worker entry file. You use it directly when you are not using the Vite plugin — for example, in projects that rely on Wrangler alone or need full control over how entrypoints are registered. Under the hood, each generated class extends Cloudflare’s WorkflowEntrypoint, decodes the incoming event payload through the workflow’s schema, and delegates execution to the layer’s run function. NonRetryableError from cloudflare:workflows is imported and used at the entrypoint boundary to convert Sideffect’s portable non-retryable error into the native Cloudflare type that the Workers runtime recognises.
Import and basic usage
class_name declared in your wrangler.jsonc binding.
Parameter
WorkflowEntrypoints.make() accepts a single argument: a plain object (entries) where:
- Each key is the Cloudflare
class_namefor the workflow. It must be a valid JavaScript identifier — only strings that match/^[$A-Z_a-z][$\w]*$/are accepted. This is the name Wrangler uses to look up the exported class in your Worker bundle. - Each value is a
WorkflowLayerproduced by calling.toLayer(run)on aWorkflowDefinition. The layer carries both the workflow definition (including its name and payload schema) and therunimplementation.
Return value
WorkflowEntrypoints.make() returns a read-only object with the same keys as entries. Each value is a WorkflowEntrypoint subclass — a native Cloudflare class that can be exported directly from your Worker entry module. The return type preserves the keys from the input object, so TypeScript can verify that you are exporting exactly the classes you registered.
Validation
WorkflowEntrypoints.make() validates every entry at call time and throws a TypeError with a descriptive message for either of these two conditions:
-
Invalid
class_name— The key does not match/^[$A-Z_a-z][$\w]*$/. The error message explains that the name must be a valid JavaScript identifier and prompts you to update both the Wranglerclass_nameand the matching Worker export. -
Non-layer value — The value is not a Sideffect
WorkflowLayer(does not carry_tag: 'WorkflowLayer'). The error message instructs you to export a layer produced by.toLayer()under the matching name.
Multi-workflow example
Pass as many named layers as you need in a single call. Each key produces one exported entrypoint class.wrangler.jsonc: