fix(build): modernize project tooling and package metadata

This commit is contained in:
2026-05-01 15:48:19 +00:00
parent 2302632f11
commit 73a8389ec5
12 changed files with 3366 additions and 5868 deletions
+8 -4
View File
@@ -110,8 +110,11 @@ export class ClamAVManager extends EventEmitter {
}
} catch (error) {
// Check if the error is due to freshclam already running
if (error.stderr?.includes('ERROR: Problem with internal logger') ||
error.stdout?.includes('Resource temporarily unavailable')) {
const execError = error as { stderr?: string; stdout?: string };
if (
execError.stderr?.includes('ERROR: Problem with internal logger') ||
execError.stdout?.includes('Resource temporarily unavailable')
) {
console.log('Freshclam is already running, skipping manual update');
return;
}
@@ -153,7 +156,7 @@ export class ClamAVManager extends EventEmitter {
logProcess.stdout.on('data', (data) => {
const lines = data.toString().split('\n');
lines.forEach(line => {
lines.forEach((line: string) => {
if (!line.trim()) return;
const event: ClamAVLogEvent = {
@@ -255,7 +258,8 @@ export class ClamAVManager extends EventEmitter {
// Service not ready yet, will retry
if (checkCount >= maxChecks) {
cleanup();
reject(new Error(`ClamAV initialization timed out after ${maxChecks} seconds. Last error: ${error.message}`));
const errorMessage = error instanceof Error ? error.message : String(error);
reject(new Error(`ClamAV initialization timed out after ${maxChecks} seconds. Last error: ${errorMessage}`));
return;
}
checkCount++;