功能(文档与桌面):完善文件预览下载与客户端构建基线
- 保存文档版本原始文件名,规范下载响应并持久化上传目录\n- 增加 PDF.js 预览、桌面保存打开流程及统一错误反馈\n- 统一 Node.js 22.13 构建基线并收紧临时文件权限门禁\n- 补充迁移、单元测试、发布检查与运维文档
This commit is contained in:
@@ -15,7 +15,7 @@ services:
|
||||
service: backend-init
|
||||
|
||||
frontend-dev:
|
||||
image: node:20-alpine
|
||||
image: node:22.13-alpine
|
||||
container_name: ctms_frontend_dev
|
||||
restart: always
|
||||
working_dir: /app
|
||||
@@ -25,16 +25,17 @@ services:
|
||||
- |
|
||||
set -e
|
||||
lock_hash="$$(sha256sum package-lock.json | awk '{print $$1}')"
|
||||
dependency_hash="$$lock_hash:$$(node --version)"
|
||||
marker="node_modules/.ctms-package-lock.sha256"
|
||||
missing_runtime_deps=0
|
||||
for dep in @tauri-apps/api @tauri-apps/plugin-dialog @tauri-apps/plugin-fs @tauri-apps/plugin-opener; do
|
||||
for dep in @tauri-apps/api @tauri-apps/plugin-dialog @tauri-apps/plugin-fs @tauri-apps/plugin-opener pdfjs-dist; do
|
||||
if [ ! -d "node_modules/$$dep" ]; then
|
||||
missing_runtime_deps=1
|
||||
fi
|
||||
done
|
||||
if [ ! -f "$$marker" ] || [ "$$(cat "$$marker")" != "$$lock_hash" ] || [ "$$missing_runtime_deps" = "1" ]; then
|
||||
if [ ! -f "$$marker" ] || [ "$$(cat "$$marker")" != "$$dependency_hash" ] || [ "$$missing_runtime_deps" = "1" ]; then
|
||||
npm ci
|
||||
printf '%s' "$$lock_hash" > "$$marker"
|
||||
printf '%s' "$$dependency_hash" > "$$marker"
|
||||
fi
|
||||
npm run dev -- --host 0.0.0.0
|
||||
environment:
|
||||
@@ -50,7 +51,7 @@ services:
|
||||
start_period: 5s
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- frontend_node_modules:/app/node_modules
|
||||
- frontend_node_modules_node22:/app/node_modules
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
@@ -75,7 +76,7 @@ services:
|
||||
- ctms_net
|
||||
|
||||
volumes:
|
||||
frontend_node_modules:
|
||||
frontend_node_modules_node22:
|
||||
|
||||
networks:
|
||||
ctms_net:
|
||||
|
||||
Reference in New Issue
Block a user