mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-19 12:37:53 +08:00
feat: 完成 TraceMemo v2.2.0 品牌身份与数据迁移升级
- 将 WechatExplorer 产品身份升级为 TraceMemo - 更新 appId、Runtime Identity、Reader Skill 和 API 环境变量 - 增加旧用户数据、Knowledge、Token 与 AI Provider 安全迁移 - 保留 Windows WeFlow 和旧版配置兼容 - 完善首次启动迁移测试及 v2.2.0 发布文档 - 移除 macOS Intel x64 构建与发布支持
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import fs from 'fs-extra'
|
||||
import crypto from 'crypto'
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
@@ -114,6 +115,28 @@ describe('WCDB message shard pagination', () => {
|
||||
|
||||
expect(first).toBe(second)
|
||||
expect(first).not.toContain('微信聊天记录')
|
||||
expect(first).toContain(path.join('TraceMemo', 'path-bridges'))
|
||||
expect(fs.realpathSync(first)).toBe(fs.realpathSync(accountRoot))
|
||||
})
|
||||
|
||||
it('reuses an existing legacy Windows path bridge without creating a new one', () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'wxe-legacy-path-bridge-'))
|
||||
temporaryDirectories.push(root)
|
||||
const publicRoot = path.join(root, 'Public')
|
||||
const accountRoot = path.join(root, '微信聊天记录', 'wxid_legacy')
|
||||
fs.ensureDirSync(path.join(accountRoot, 'db_storage'))
|
||||
const bridgeId = crypto
|
||||
.createHash('sha256')
|
||||
.update(path.resolve(accountRoot).toLowerCase())
|
||||
.digest('hex')
|
||||
.slice(0, 24)
|
||||
const legacyBridge = path.join(publicRoot, 'WechatExplorer', 'path-bridges', bridgeId)
|
||||
fs.ensureDirSync(path.dirname(legacyBridge))
|
||||
fs.symlinkSync(accountRoot, legacyBridge, 'junction')
|
||||
|
||||
expect(resolveWindowsNativeAccountRoot(accountRoot, { platform: 'win32', publicRoot })).toBe(
|
||||
legacyBridge
|
||||
)
|
||||
expect(fs.existsSync(path.join(publicRoot, 'TraceMemo'))).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user