5 Commits
Author SHA1 Message Date
Christ 1ac6912c7b feat: 拆分 macOS 架构安装包并内置浏览器运行时
将 macOS 安装包拆分为 arm64 与 amd64 两个独立产物,每个安装包只携带对应架构的服务、托盘程序、Playwright driver 和 Chromium。

调整桌面端 CI,在构建阶段预下载并组装 Playwright runtime;服务启动时按当前进程架构解析 runtime 根目录,避免安装后联网下载 Chromium。

移除 Windows/macOS 安装阶段的 browser-install 调用和托盘中的安装/修复 Chromium 菜单,保留 Linux 安装脚本的既有流程。

升级 Playwright Go 依赖到 v0.6100.0,并迁移导入路径;仅按本次授权修改 CAPTCHA 相关文件的 import 行,不改变 CAPTCHA 行为。

验证:go test ./...、go vet ./...、macOS 安装脚本语法、Workflow YAML 语法、Windows amd64 交叉编译及两个 macOS pkg 的本地组装。
2026-08-12 01:09:59 +08:00
Christ a99ea5c20d feat: 增加桌面端安装包与分支专用 CI/CD
拆分后台服务、浏览器安装器和桌面托盘控制器,支持 Windows Service、macOS LaunchAgent 以及 Linux systemd 部署。

新增 Windows Inno Setup 安装器、macOS Intel/Apple Silicon 通用 pkg、Linux 多架构安装脚本,并在安装过程中自动准备 Playwright Chromium。

新增仅 codex/desktop-packaging 分支触发的桌面端 CI/CD,覆盖 Go 测试、交叉编译和 Windows/macOS/Linux 安装包构建;保持现有 Docker 工作流不变。

补充数据密钥持久化、托盘图标、安装文档及相关测试。
2026-08-11 19:52:34 +08:00
ChristandClaude Opus 4.8 0fa5d6617c refactor(db): 阶段A - driver 抽象 + SQLite 保持工作
- db.Open 改为接受 URL(sqlite:// mysql:// postgres://),返回 (db, dialect, err)
- 向后兼容:不含 scheme 的路径仍按 SQLite 文件处理
- migration 移到 migrations/sqlite/ 子目录,embed 包含三个方言目录
- Migrate 按方言选择子目录 + goose dialect
- Store 加 Dialect 字段,NewStore(db, dialect)
- cmd/server 加 -db-url 和 DATABASE_URL 环境变量(优先级:env > -db-url > -db)
- cmd/init-admin 同步支持 URL
- 新增依赖 pgx/v5、go-sql-driver/mysql
- mysql/postgres migration 目录暂为 SQLite 副本占位,阶段B/C 替换
- 所有测试调用方更新为新签名

验证:现有测试全过(SQLite 回归),SQLite 行为不变

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 12:35:01 +08:00
ChristandClaude Opus 4.8 980de41b53 chore: 重构配套改动 + 包文档 + 构建产物清理
automation 重构期间的配套修改:
- browser:订单抓取/密码登录/二维码刷新/stealth 等适配新流程,删 search.go
- db:cookies/orders_ext/extras/sessions/users/password/repository 等调整
- xianyu:mtop client、protocol(sign/decrypt/msgpack/cookies)、qrlogin、ws、ua
- server:admin/analytics/auth/cookie/helpers/item/item_publish_batch handlers
- frontend:App/Dashboard/ItemList/Rules/Sidebar/api/types,删 Keywords/TestPage
- auth、notify、webui、go.mod 等

本次会话补充:
- cmd/server、cmd/init-admin 改为 // Package main 开头的标准包文档
- .gitignore 加 internal/webui/static/assets/(hash 化构建产物不入库)
- internal/webui/static/index.html 重新构建

全量 go build/vet/test + race + 前端 test/build 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:41:03 +08:00
Christ 074554a6de Initial xianyu-go repository 2026-06-28 11:54:39 +08:00