feat: add async SQLite on Node 24 and improve messaging diagnostics (#520)
Move database work off the main thread on Node.js 24 and improve message handling and runtime diagnostics. Preserve migration, restart, and concurrency coverage with the async SQLite driver.
This commit is contained in:
1 parent
20f48d11ec
commit
c7428363cb
170 files changed
+7748
-3913
No files matched your search
@@ -56,10 +56,6 @@ export function findDatalineDeviceByTerType(terType: number): DatalineDeviceCont
|
||||
return BY_TER.get(terType);
|
||||
}
|
||||
|
||||
export function isDatalineDeviceUin(uin: number): boolean {
|
||||
return BY_UIN.has(uin);
|
||||
}
|
||||
|
||||
export function datalineFriendListEntries(): DatalineFriendEntry[] {
|
||||
return DATALINE_DEVICES.map((device) => ({
|
||||
user_id: device.uin,
|
||||
@@ -68,14 +64,6 @@ export function datalineFriendListEntries(): DatalineFriendEntry[] {
|
||||
}));
|
||||
}
|
||||
|
||||
export function appendDatalineFriendEntries<T extends { user_id: number }>(
|
||||
friends: readonly T[],
|
||||
): Array<T | DatalineFriendEntry> {
|
||||
const occupied = new Set(friends.map((friend) => friend.user_id));
|
||||
const extras = datalineFriendListEntries().filter((entry) => !occupied.has(entry.user_id));
|
||||
return extras.length === 0 ? [...friends] : [...friends, ...extras];
|
||||
}
|
||||
|
||||
export function appIdForTerType(terType: number): number {
|
||||
return terType === DATALINE_TER_PC ? 1 : 1001;
|
||||
}
|
||||
Reference in new issue
Block a user