6 Commits
Author SHA1 Message Date
gouki 3b67d893b6 fix(ci): npm install 加 --legacy-peer-deps,规避 arborist 在 vitest peer 上的 edgesOut 崩溃
Build and Publish Commercial Web / build (push) Successful in 5m3s
2026-10-21 09:20:46 +00:00
gouki df63a06aea fix(ci): 前端构建改用 npm——core 为独立包无需 pnpm 工作区,绕开 runner 安装 pnpm 失败
Build and Publish Commercial Web / build (push) Failing after 3m10s
2026-10-21 09:04:51 +00:00
gouki a024d5dcf6 fix(ci): pnpm 改用 linuxstatic 单文件二进制,绕开 npm registry 安装
Build and Publish Commercial Web / build (push) Failing after 20s
2026-10-21 08:55:01 +00:00
gouki 98d6a67a5a fix(ci): pnpm 版本对齐 11——pnpm 9 不识别 allowBuilds,esbuild 构建脚本被跳过
Build and Publish Commercial Web / build (push) Failing after 58s
2026-10-21 08:43:17 +00:00
goukiandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> 7c7880bbd8 fix(ci): GOPROXY 与 npm 镜像源修复两条流水线的依赖下载失败
Build and Publish Commercial Web / build (push) Failing after 3m18s
Build and Publish Server / build (push) Successful in 9m33s
server-deploy 在 Install dependencies 失败、web-deploy 在 Install pnpm
失败——亚洲 runner 直连 proxy.golang.org / registry.npmjs.org 不稳定。
Go 侧加 goproxy.cn 优先回落官方源;pnpm 安装与前端依赖安装走
registry.npmmirror.com。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-21 08:34:04 +00:00
gouki 69b8907711 docs: 新增根 CHANGELOG 记录部署拆分与演示版改造 2026-10-18 21:28:22 +00:00
3 changed files with 49 additions and 16 deletions
+2
View File
@@ -60,6 +60,8 @@ jobs:
working-directory: server
run: |
export HOME="$RUNNER_WORKSPACE"
# 国内 runner 优先 goproxy.cn,海外 runner 自动回落官方源
export GOPROXY="https://goproxy.cn,https://proxy.golang.org,direct"
"$LUNAR_GO" mod download
- name: Run tests
+14 -16
View File
@@ -105,20 +105,12 @@ jobs:
fi
echo "PATH=$TOOLDIR/node/bin:$PATH" >> "$GITEA_ENV"
- name: Install pnpm
run: |
# pnpm 随工具链缓存,避免每次重复下载
TOOLDIR="$RUNNER_WORKSPACE/.lunar-toolchain"
if [ ! -x "$TOOLDIR/pnpm/bin/pnpm" ]; then
npm install -g --prefix "$TOOLDIR/pnpm" pnpm@9
fi
echo "PATH=$TOOLDIR/pnpm/bin:$PATH" >> "$GITEA_ENV"
pnpm --version
- name: Run Go tests
working-directory: server
run: |
export HOME="$RUNNER_WORKSPACE"
# 国内 runner 优先 goproxy.cn,海外 runner 自动回落官方源
export GOPROXY="https://goproxy.cn,https://proxy.golang.org,direct"
"$LUNAR_GO" mod download
"$LUNAR_GO" test ./...
@@ -127,12 +119,18 @@ jobs:
CI: "true"
run: |
export HOME="$RUNNER_WORKSPACE"
# web/ 工作区:装依赖并构建 @lunar/core(web-commercial 的 file: 依赖)
cd web
pnpm install --frozen-lockfile
pnpm --filter @lunar/core build
cd ../web-commercial
pnpm install --frozen-lockfile
# 依赖下载走 npmmirror;npm/pnpm 全局限定在部分 runner 不稳定,
# 故不使用 pnpm 工作区——core 是独立包,npm install 即可构建
npm config set registry https://registry.npmmirror.com || true
# @lunar/core:web-commercial 的 file: 依赖与 vite/tsconfig 别名目标
# --legacy-peer-deps:npm10 的 arborist 在 vitest 可选 peer 上会
# edgesOut 崩溃,跳过 peer 解析即可(构建不需要)
cd web/packages/core
npm install --legacy-peer-deps
npx tsup
test -f dist/index.js
cd ../../../web-commercial
npm install --legacy-peer-deps
npx tsc -b
npx vite build
test -f dist/index.html
+33
View File
@@ -0,0 +1,33 @@
# 变更日志
## [1.1.88+] 2026-10-18 — 部署形态拆分与小程序演示版
### 后端拆分(双入口)
- 后端拆为两个部署入口:`cmd/mini`(小程序接口,lunar.neatcn.com)与 `cmd/web`(商业版,kepo.net)。
- `cmd/mini` 仅保留微信登录、生辰档案、许愿树、百科;不再暴露邮箱登录、commerce、`/admin` 后台与支付 Webhook。
- `cmd/web` 仅保留邮箱验证码登录、commerce、订单/报告权益、`/admin` 后台、商业前端静态托管与 SPA 回退;不再暴露微信登录与许愿树接口。
- 共用代码收敛到 `internal/app`(启动/路由注册)与 `internal/assets`(内嵌图片)。
### CI/CD
- `server-deploy.yml` 改构建 `cmd/mini`,部署包不再携带后台静态资源。
- 新增 `web-deploy.yml`:构建 `cmd/web` + web-commercial 前端,发布 `web-v*` Release。
- `deploy-watch.sh` 支持 `TAG_PREFIX`/`ASSET_NAME` 环境变量;新增 `deploy-web.sh`(systemd 版,含健康检查与自动回滚)。
- 新增 kepo 一次性配置文档:`.gitea/docs/PULL_DEPLOY_WEB.md`。
### 安全加固
- 生产环境 `JWT_SECRET` 未设置、为默认值或短于 32 位时拒绝启动。
- 许愿发布前接入微信 `msgSecCheck` v2 内容安全检测(access_token 内存缓存)。
- 修复许愿字数按字节计算的问题(中文原只能写约 6 字),改为按字符计算。
### 小程序(演示版)
- 许愿树移除付费许愿、商品选择与微信支付调用,全部走免费许愿。
- 「占卜」页更名「民俗趣算」,「称骨算命」改为「称骨测算」;占卜页与每日运势页新增文化声明,明确"传统文化知识、仅供娱乐参考"。
### 分支整理
- SMTP2GO 未提交改动备份至 `smtp2go-backup` 分支,`main` 保留已验证可用的 QQ SMTP。
- 合并 `privacy-chart-consent`:`web/` 排盘核心纳入仓库(修复 web-commercial 干净构建),排盘保存需用户显式同意并限流。