mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-10-06 05:27:48 +08:00
feat: 修复定时日报错误通知微信机器人功能
增加定时日报debug 修复定时日报历史头像显示并区分定时日报标题
This commit is contained in:
@@ -8,6 +8,9 @@ const nodeRequire = createRequire(import.meta.url)
|
||||
const asar = nodeRequire('@electron/asar') as {
|
||||
createPackage: (source: string, destination: string) => Promise<void>
|
||||
}
|
||||
const { hasWindowsSherpaRuntime } = nodeRequire('../../scripts/prepare-win-runtime.cjs') as {
|
||||
hasWindowsSherpaRuntime: (runtimeRoot: string) => boolean
|
||||
}
|
||||
const {
|
||||
validateAsarRuntimeDependencies,
|
||||
validateFfmpegRuntime,
|
||||
@@ -68,6 +71,30 @@ describe('production runtime packaging', () => {
|
||||
expect(config).not.toContain('macos/')
|
||||
})
|
||||
|
||||
it('installs cross-platform optional dependencies before Windows packaging', () => {
|
||||
const packageJson = JSON.parse(
|
||||
readFileSync(resolve(__dirname, '../../package.json'), 'utf8')
|
||||
) as { scripts: Record<string, string> }
|
||||
|
||||
expect(packageJson.scripts['prepare:win-runtime']).toBe(
|
||||
'node scripts/prepare-win-runtime.cjs && npm run prepare:ffmpeg:win'
|
||||
)
|
||||
expect(packageJson.scripts['build:win']).toContain('npm run prepare:win-runtime')
|
||||
expect(packageJson.scripts['release:win']).toContain('npm run prepare:win-runtime')
|
||||
})
|
||||
|
||||
it('detects an incomplete Windows sherpa runtime before invoking pnpm', () => {
|
||||
const runtimeRoot = join(root, 'win-sherpa-runtime')
|
||||
mkdirSync(runtimeRoot, { recursive: true })
|
||||
expect(hasWindowsSherpaRuntime(runtimeRoot)).toBe(false)
|
||||
|
||||
writeFileSync(join(runtimeRoot, 'package.json'), '{}')
|
||||
expect(hasWindowsSherpaRuntime(runtimeRoot)).toBe(false)
|
||||
|
||||
writeFileSync(join(runtimeRoot, 'sherpa-onnx.node'), 'fixture')
|
||||
expect(hasWindowsSherpaRuntime(runtimeRoot)).toBe(true)
|
||||
})
|
||||
|
||||
it('rejects an app archive with missing runtime dependencies', async () => {
|
||||
const resources = join(root, 'asar-resources')
|
||||
const source = join(root, 'asar-source')
|
||||
|
||||
Reference in New Issue
Block a user