feat: implement macOS notarization and ad-hoc signing in afterSign script

feat: add run-server script to manage server execution and compatibility checks

feat: create main application logic for desktop with window management, server handling, and auto-updater

test: add unit tests for desktop runtime helpers

feat: implement desktop server environment configuration and health check

test: add tests for server configuration and desktop routes

feat: add native module guard for better-sqlite3 compatibility

test: add tests for native module guard functionality

test: add comprehensive tests for account verification feedback handling

feat: implement account verification feedback helpers

chore: add TypeScript configuration for desktop builds
This commit is contained in:
cita
2026-03-06 16:24:41 +08:00
parent acdc846b13
commit 2a810facb8
45 changed files with 6712 additions and 405 deletions
+37
View File
@@ -0,0 +1,37 @@
type RebuildCommandInput = {
npmExecPath?: string;
};
type RebuildCommand = {
command: string;
args: string[];
};
export function isNodeModuleVersionMismatch(error: unknown): boolean {
if (!error || typeof error !== 'object') return false;
const code = 'code' in error ? String((error as { code?: unknown }).code || '') : '';
const message = 'message' in error ? String((error as { message?: unknown }).message || '') : '';
return code === 'ERR_DLOPEN_FAILED' && message.includes('NODE_MODULE_VERSION');
}
export function buildBetterSqliteRebuildCommand(input: RebuildCommandInput = {}): RebuildCommand {
const npmExecPath = input.npmExecPath || process.env.npm_execpath;
if (npmExecPath && npmExecPath.length > 0) {
return {
command: process.execPath,
args: [
npmExecPath,
'rebuild',
'better-sqlite3',
'--no-audit',
'--fund=false',
],
};
}
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
return {
command: npmCommand,
args: ['rebuild', 'better-sqlite3', '--no-audit', '--fund=false'],
};
}