diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..23c8be9 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,26 @@ +# Dependencies +node_modules/ +dist/ +pkg/ + +# Build outputs +*.js +*.d.ts +!eslint.config.js + +# Config files +vite.config.ts +tsconfig.json +tsconfig.build.json + +# Test files +**/*.test.ts +**/*.spec.ts + +# Generated files +coverage/ +.nyc_output/ + +# Logs +logs/ +*.log diff --git a/src/services/device-reader.service.ts b/src/services/device-reader.service.ts index a1b4eac..44829f2 100644 --- a/src/services/device-reader.service.ts +++ b/src/services/device-reader.service.ts @@ -4,6 +4,8 @@ */ import { DATABASE_CONFIG } from './database-config'; +import { SecureCredentialsService } from './secure-credentials.service'; +import { EncryptionService } from './encryption.service'; // Type simplifié pour éviter les problèmes d'import du SDK export interface Device { @@ -67,13 +69,11 @@ export class DeviceReaderService { console.log('🔐 DeviceReaderService: Device found in encrypted format, decrypting...'); // Get the PBKDF2 key based on security mode - const { SecureCredentialsService } = await import('./secure-credentials.service'); const secureCredentialsService = SecureCredentialsService.getInstance(); // Get all security modes to find which one works const allSecurityModes = ['none', 'otp', 'password', 'os', 'proton-pass']; let pbkdf2Key: string | null = null; - let workingMode: string | null = null; for (const mode of allSecurityModes) { try { @@ -82,7 +82,6 @@ export class DeviceReaderService { const key = await secureCredentialsService.retrievePBKDF2Key(mode as any); if (key) { pbkdf2Key = key; - workingMode = mode; console.log(`✅ DeviceReaderService: PBKDF2 key found for mode: ${mode}`); break; } @@ -99,7 +98,6 @@ export class DeviceReaderService { } // Decrypt the device - const { EncryptionService } = await import('./encryption.service'); const encryptionService = EncryptionService.getInstance(); const decryptedDeviceString = await encryptionService.decrypt( dbRes['encrypted_device'],