feat(rust): scaffold Rust workspace and fix TypeScript build errors
- Add @git.zone/tsrust with linux_amd64/linux_arm64 cross-compilation - Scaffold Rust workspace with 5 crates: mailer-core, mailer-smtp, mailer-security, mailer-napi, mailer-bin - Fix all TypeScript compilation errors for upgraded dependencies (smartfile v13, mailauth v4.13, smartproxy v23) - Replace smartfile.fs/memory with @push.rocks/smartfs throughout codebase - Fix .ts import extensions to .js for NodeNext module resolution - Update DKIMSignOptions usage to match mailauth v4.13 API - Add MTA error classes with permissive signatures for legacy SMTP client - Replace removed DcRouter/StorageManager/deliverability imports with local interfaces
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import * as paths from '../paths.ts';
|
||||
import { logger } from '../logger.ts';
|
||||
import { Email } from '../mail/core/classes.email.ts';
|
||||
import type { IAttachment } from '../mail/core/classes.email.ts';
|
||||
import { SecurityLogger, SecurityLogLevel, SecurityEventType } from './classes.securitylogger.ts';
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as paths from '../paths.js';
|
||||
import { logger } from '../logger.js';
|
||||
import { Email } from '../mail/core/classes.email.js';
|
||||
import type { IAttachment } from '../mail/core/classes.email.js';
|
||||
import { SecurityLogger, SecurityLogLevel, SecurityEventType } from './classes.securitylogger.js';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import * as paths from '../paths.ts';
|
||||
import { logger } from '../logger.ts';
|
||||
import { SecurityLogger, SecurityLogLevel, SecurityEventType } from './classes.securitylogger.ts';
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as paths from '../paths.js';
|
||||
import { logger } from '../logger.js';
|
||||
import { SecurityLogger, SecurityLogLevel, SecurityEventType } from './classes.securitylogger.js';
|
||||
import { LRUCache } from 'lru-cache';
|
||||
|
||||
/**
|
||||
@@ -472,10 +472,10 @@ export class IPReputationChecker {
|
||||
} else {
|
||||
// Fall back to filesystem
|
||||
const cacheDir = plugins.path.join(paths.dataDir, 'security');
|
||||
plugins.smartfile.fs.ensureDirSync(cacheDir);
|
||||
|
||||
await plugins.smartfs.directory(cacheDir).recursive().create();
|
||||
|
||||
const cacheFile = plugins.path.join(cacheDir, 'ip_reputation_cache.json');
|
||||
plugins.smartfile.memory.toFsSync(cacheData, cacheFile);
|
||||
await plugins.smartfs.file(cacheFile).write(cacheData);
|
||||
|
||||
logger.log('info', `Saved ${entries.length} IP reputation cache entries to disk`);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import { logger } from '../logger.ts';
|
||||
import * as plugins from '../plugins.js';
|
||||
import { logger } from '../logger.js';
|
||||
|
||||
/**
|
||||
* Log level for security events
|
||||
|
||||
@@ -3,7 +3,7 @@ export {
|
||||
SecurityLogLevel,
|
||||
SecurityEventType,
|
||||
type ISecurityEvent
|
||||
} from './classes.securitylogger.ts';
|
||||
} from './classes.securitylogger.js';
|
||||
|
||||
export {
|
||||
IPReputationChecker,
|
||||
@@ -11,11 +11,11 @@ export {
|
||||
IPType,
|
||||
type IReputationResult,
|
||||
type IIPReputationOptions
|
||||
} from './classes.ipreputationchecker.ts';
|
||||
} from './classes.ipreputationchecker.js';
|
||||
|
||||
export {
|
||||
ContentScanner,
|
||||
ThreatCategory,
|
||||
type IScanResult,
|
||||
type IContentScannerOptions
|
||||
} from './classes.contentscanner.ts';
|
||||
} from './classes.contentscanner.js';
|
||||
Reference in New Issue
Block a user