fix(core): Use relative imports for dynamic imports in SecurityAuditService (#8086)

`tsc-alias` doesn't seem to replace imports when using template strings

## Related tickets and issues
#8085

## Review / Merge checklist
- [x] PR title and summary are descriptive.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-12-19 12:41:15 +01:00 committed by GitHub
parent d44602913f
commit 785bf9974e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ export class SecurityAuditService {
const className = category.charAt(0).toUpperCase() + category.slice(1) + 'RiskReporter'; const className = category.charAt(0).toUpperCase() + category.slice(1) + 'RiskReporter';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const RiskReporterModule = await import(`@/security-audit/risk-reporters/${className}`); const RiskReporterModule = await import(`./risk-reporters/${className}`);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const RiskReporterClass = RiskReporterModule[className] as { new (): RiskReporter }; const RiskReporterClass = RiskReporterModule[className] as { new (): RiskReporter };