You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
prepareDeployArtifact omits worker.vars that the CLI managed deploy includes #529
void/deploy's prepareDeployArtifact() builds the manifest with assembleVoidManifest(...) but never passes vars. The CLI managed deploy paths do pass them (deploy-managed-full.ts and deploy-managed-framework.ts: vars: voidConfig.worker?.vars).
As a result, an artifact prepared through the programmatic API has no manifest.vars, even when:
void.config.ts sets worker: { vars: { ... } }, and
the build output (dist/ssr/wrangler.json) contains those vars.
The platform emits plain-text bindings only from manifest.vars, so these vars never reach the deployed Worker on that path.
Repro
Create a project whose void.config.ts has worker: { vars: { FOO: "bar" } }.
Run vp build. dist/ssr/wrangler.json now has vars.FOO.
Call prepareDeployArtifact(root). The result has artifact.manifest.vars === undefined.
Expected:prepareDeployArtifact produces the same vars as the CLI managed deploy.
We work around it by copying wrangler.jsonvars into the manifest.
A related note that may belong in the docs: keys declared in env.ts are refused as worker.vars ("Server env keys cannot be Worker plaintext vars"). Plain config therefore has to live only in worker.vars.
Activity