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
@@ -37,7 +37,10 @@ describe('probeQqLoginInfo — bounded execution', () => {
|
||||
callback(null, { stdout: '', stderr: '' });
|
||||
})
|
||||
.mockImplementationOnce((_command, _options, callback) => {
|
||||
callback(null, { stdout: '1\n', stderr: '' });
|
||||
callback(null, {
|
||||
stdout: process.platform === 'win32' ? 'QQ.exe 4242 Console 1 1234 K\n' : '1\n',
|
||||
stderr: '',
|
||||
});
|
||||
});
|
||||
|
||||
await expect(probeQqLoginInfo(4242)).resolves.toEqual({
|
||||
@@ -51,12 +54,21 @@ describe('probeQqLoginInfo — bounded execution', () => {
|
||||
execMock
|
||||
.mockImplementationOnce((_command, _options, callback) => {
|
||||
callback(null, {
|
||||
stdout: 'LISTEN 0 128 127.0.0.1:9218 0.0.0.0:* users:(("qq",pid=4242,fd=12))\n',
|
||||
stdout:
|
||||
process.platform === 'win32'
|
||||
? 'TCP 127.0.0.1:9218 0.0.0.0:0 LISTENING 4242\n'
|
||||
: 'LISTEN 0 128 127.0.0.1:9218 0.0.0.0:* users:(("qq",pid=4242,fd=12))\n',
|
||||
stderr: '',
|
||||
});
|
||||
})
|
||||
.mockImplementationOnce((_command, _options, callback) => {
|
||||
callback(null, { stdout: '8\n', stderr: '' });
|
||||
callback(null, {
|
||||
stdout:
|
||||
process.platform === 'win32'
|
||||
? 'QQ.exe 4242 Console 1 1234 K\n'.repeat(8)
|
||||
: '8\n',
|
||||
stderr: '',
|
||||
});
|
||||
});
|
||||
|
||||
await expect(probeQqLoginInfo(4242)).resolves.toBeNull();
|
||||
|
||||
Reference in new issue
Block a user