Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

prepareDeployArtifact omits worker.vars that the CLI managed deploy includes

Đang mở Phù hợp với người mới
#529 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
devtools

Hướng nghiên cứu

Tìm prepareDeployArtifact() và so sánh lời gọi assembleVoidManifest(...) của nó với các lời gọi trong deploy-managed-full.ts và deploy-managed-framework.ts; issue nêu các điểm vào này nhưng không nêu đường dẫn tệp. Trước tiên, hãy lần theo cách worker.vars đi vào manifest trong các luồng CLI đó. Hoàn thành khi artifact được tạo bằng chương trình có các vars đã cấu hình, khớp với managed deploy của CLI.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
402
Fork
32
Merge trung bình
10 giờ 51 phút
Pull request đã merge (30 ngày)
100

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của voidzero-dev/void

Tất cả issue của voidzero-dev/void

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.