Repository navigation
合入 DevBox SDK、CLI 与文档更新 - #7
Open
lizhicheng00 wants to merge 102 commits into
Open
lizhicheng00 wants to merge 102 commits into
lizhicheng00 wants to merge 102 commits into
Conversation
严重: - S1/S2: client 各方法判空 JSON200/JSON201,空响应体返回错误而非 panic/nil - S3: exec 退出码经 ExitCodeError 传递,main 统一退出,不再 os.Exit 跳过 defer - S4: 登录回调 fail-closed 校验 Origin 头,伪造 origin/缺失 origin 一律 403 - S5: sandbox list -f json 复用 SandboxJSON 脱敏,不再泄漏 connectToken 中等: - M1: config 原子写(临时文件+rename);M2: 沙箱域名端口按最后一个 - 解析 - M3: loggingTransport 防重复包装;M4: 超 1MiB 的 body 不再全量缓冲进日志 - M9: kill 部分失败退出码非 0(对齐 e2b);M11: stdin 转发错误输出 stderr 轻微: - L1/L2: 登录超时与回调响应体接入 i18n - L3: 新建 internal/mask 统一 maskAPIKey 双实现 - L4-L10/L13/L16-L24: SandboxJSON 测试守护、死代码清理、JoinList、 printTable 行列校验、空 Data 帧不误标输出、overrideAPIKey 原子化、 api.Pause 常量、list 校验前置、defer Close 前置等 其他: - 撤销 create/connect/exec 的 -u/--user 支持 - 清理代码中的 devbridge 引用(保留门户登录路由字符串) - 新增 helpers/mask/auth 回调单测
- sandbox create 新增 --network.allow-public-traffic(显式传入才随请求提交,格式与 SDK 对齐) - 精简 newClient(移除从未生效的 timeout 逻辑);errors.As 改用 errors.AsType - 删除无调用的 Client.BaseURL;ExecForeground 补 stream.Close - 移除类型别名冗余转换 x5;打印错误统一显式丢弃 x9 - 提取 MissingDomainError 消除重复;注释开头对齐标识符;统一美式拼写
- install.sh/install.ps1 默认 DEFAULT_ARTIFACT_URL 改为 OBS,保留 __*__ 占位符运行时回退 - bake-install.sh 新增第 3 参数 obs_release_url,产出 dist-extra/obs/ 烤制脚本 - goreleaser prod/test 的 bake hook 传入 OBS 地址,Release 附带 OBS 烤制脚本 - .gitignore 补 dist/、dist-extra/ 构建产物
shl6688
reviewed
Nov 13, 2026
| // Package api provides primitives to interact with the openapi HTTP API. | ||
| // | ||
| // Typed client for the DevBox Manager API (originally generated from openapi.yaml by oapi-codegen, now hand-maintained). | ||
| package api |
|
|
||
| package process; | ||
|
|
||
| option go_package = "github.com/huaweicloud/devspace-devbox/cli/internal/api/processgen/process"; |
|
|
||
| // newVerifyServer mocks the API key check endpoint on the bridge domain. | ||
| // Only requests carrying validKey succeed with 204; everything else gets 401. | ||
| func newVerifyServer(t *testing.T, validKey string) *httptest.Server { |
| @@ -0,0 +1,14 @@ | |||
| # Build artifacts | |||
| bin/ | |||
| /distbox | |||
| import "os" | ||
|
|
||
| // enableVT is a no-op on Unix terminals, which process ANSI escapes by default. | ||
| func enableVT(f *os.File) error { return nil } |
|
|
||
| // enableVT enables ANSI escape sequence processing on a Windows console | ||
| // output handle so remote PTY output renders correctly. | ||
| func enableVT(f *os.File) error { |
| // Package term wires the local terminal to a sandbox PTY: it puts the local | ||
| // terminal into raw mode, forwards keystrokes to the remote process and | ||
| // renders remote output locally, like an SSH session. | ||
| package term |
| } | ||
|
|
||
| // ParseMetadata parses the --metadata argument; empty returns nil. | ||
| func ParseMetadata(pairs []string) (*map[string]string, error) { |
| type TransportProvider = () => Promise<Transport>; | ||
| export type OutputHandler = (value: string) => void | Promise<void>; | ||
|
|
||
| export interface RunOptions { |
lizhicheng00
temporarily deployed
to
github-pages
November 13, 2026 03:17 — with
GitHub Actions
Inactive
- -u 经 Authorization Basic 头传递给 envd(用户不存在时显式报 invalid_argument),移除无效的 ProcessConfig.user 通路 - 数据面新增 -v 调试日志(envdLoggingTransport:记录 Basic 用户、relay token 长度与错误体;流式响应不缓冲避免卡死),并切换 JSON codec 对齐 processes API 文档 - 检视意见修复:proto 拍平(proto/process.proto 与 processgen 同层)、term 包更名 terminal 并合并 vt 平台文件、parse 包并入 helpers、auth 单测按业务文件拆分(verify/login/apikey_test)、.gitignore 增加 AI 忽略 - 帮助输出隐藏 Aliases 段:Use 管道写法已展示缩写,避免 Name 派生项造成的重复展示
This branch was successfully deployed
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.

变更内容
验证说明