Skip to content

prepareDeployArtifact omits worker.vars that the CLI managed deploy includes #529

Open

Description

@iPLAYCAFE-dev

Version: 1.1.12

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

  1. Create a project whose void.config.ts has worker: { vars: { FOO: "bar" } }.
  2. Run vp build. dist/ssr/wrangler.json now has vars.FOO.
  3. 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.json vars 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions