fix(deploy): zone 路由对象补 zone_name——wrangler schema 必填,部署脚本 API 探测注入 - #66
Merged
Conversation
真机首次部署被 wrangler schema 拦下:routes[] 元素形态是
{ pattern, custom_domain, zone_id | zone_name, ... },zone 路由无
zone_id/zone_name 直接拒收(#61 的测试断言了不合法形态——T5 假
Wrangler 类盲区实证)。修法:
- assemble.ts:core/module 两个配置生成器接受 zoneName,routes 对象
带 zone_name(wrangler 按 zone 名解析,无需 zone_id)
- steps.ts:部署前经 API 逐级上溯探测 zone(resolveZone 注入口),
探测失败硬报错(zone 路由必需);zone 结果复用给 DNS 自愈步骤,
避免二次 API 调用
- 测试:assemble/三方一致性断言同步 zone_name 形态;steps 测试全面
改用 configOverride(隔离部署者本地 domain 状态——此前 domain 填充
导致非 domain 用例误走 zone 探测路径,一并修掉)
Signed-off-by: huangyinghui <18666119673@163.com>
HandyWote
force-pushed
the
fix/core-zone-route
branch
from
September 8, 2026 12:31
81f40bb to
e481da3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
真机首次部署暴露(wrangler schema 拒收)
routes: [{ pattern: "unself.demo.handywote.top/*" }]被 wrangler 配置校验拦下:zone 路由对象必须带 zone_id 或 zone_name——#61 的测试断言的是非法形态(T5 假 Wrangler 盲区实证:假 wrangler 来者不拒,真 schema 拒收)。
修法
zoneName,routes 对象带zone_nameresolveZone注入口,默认 findZone 读 CLOUDFLARE_API_TOKEN);探测失败硬报错(zone 路由必需 zone 标识);zone 结果复用给 DNS 自愈步骤验证
Ref #59