Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

prepareDeployArtifact omits worker.vars that the CLI managed deploy includes

未關閉 適合新手
#529 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@dvkam 已經在處理了。

開始於 2026年10月24日。

  • #574 來自 @dvkam —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
typescript
領域
devtools

研究方向

找出 prepareDeployArtifact(),並比較它對 assembleVoidManifest(...) 的呼叫與 deploy-managed-full.ts 和 deploy-managed-framework.ts 中的呼叫;issue 指出了這些進入點,但沒有提供檔案路徑。先追蹤在這些 CLI 路徑中 worker.vars 如何進入 manifest。當程式化產生的 artifact 包含已設定的 vars,並與 CLI managed deploy 相符時,即告完成。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
580
分支
56
平均合併
8 小時 36 分鐘
30 天內合併 PR
110

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

voidzero-dev/void 的其他 Issue

查看 voidzero-dev/void 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。