rwadurian/backend/mpc-system/services
hailin 761e03ebb0 fix(service-party-app): 修复sql.js在打包后找不到模块的问题
## 问题
打包后的应用运行时报错 "Cannot find module 'sql.js'"

## 解决方案

### 1. electron-builder 配置
- 添加 `asarUnpack` 配置,将 sql.js 解压到 asar.unpacked 目录
- 将 `node_modules/sql.js/**/*` 添加到 files 列表

### 2. database.ts 修改
- 添加 `getSqlJsWasmPath()` 函数,根据环境返回正确的 WASM 路径
- 开发环境: node_modules/sql.js/dist/sql-wasm.wasm
- 生产环境: app.asar.unpacked/node_modules/sql.js/dist/sql-wasm.wasm
- 使用 locateFile 配置指定 WASM 文件位置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:41:01 -08:00
..
account feat(co-managed-wallet): 添加分布式共管钱包 API 和 gRPC 代理 2025-12-28 18:11:57 -08:00
message-router debug: add more logging to message broker for broadcast diagnostics 2025-12-06 09:57:34 -08:00
server-party fix: add wait time before TSS protocol to prevent race condition 2025-12-06 10:04:10 -08:00
server-party-api fix(context): use parent context instead of Background() to allow proper cancellation 2025-12-06 06:36:34 -08:00
service-party-app fix(service-party-app): 修复sql.js在打包后找不到模块的问题 2025-12-28 20:41:01 -08:00
session-coordinator fix(co-managed-wallet): 修复向后兼容性问题并完善protobuf定义 2025-12-27 23:33:40 -08:00