feat: release OpsXShell 2.1.0 native Tauri edition

This commit is contained in:
Logan.Li committed 2026-07-30 23:32:51 +08:00
1 parent e9a0d21758
commit a3dba0c6ed
311 files changed
+31748 -14897

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import assert from 'node:assert/strict'
import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import test from 'node:test'
import { assertWithinSize, missingSigningVariables, readPeMachine, REQUIRED_SIGNING_ENV } from './release-tools.mjs'
test('signing preflight reports every missing secret', () => {
assert.deepEqual(missingSigningVariables('windows', {}), REQUIRED_SIGNING_ENV.windows)
const env = Object.fromEntries(REQUIRED_SIGNING_ENV.macos.map(key => [key, 'configured']))
assert.deepEqual(missingSigningVariables('macos', env), [])
})
test('PE reader accepts x86_64 and rejects malformed files', () => {
const dir = mkdtempSync(join(tmpdir(), 'opsxshell-release-'))
const pe = Buffer.alloc(128)
pe.writeUInt16LE(0x5a4d, 0)
pe.writeUInt32LE(64, 0x3c)
pe.write('PE\0\0', 64, 'ascii')
pe.writeUInt16LE(0x8664, 68)
const path = join(dir, 'app.exe')
writeFileSync(path, pe)
assert.equal(readPeMachine(path), 0x8664)
assert.throws(() => assertWithinSize(path, 64), /limit is/)
})