refactor: migrate all internal imports to package.json subpath aliases
- Add #domain, #protocol, #utils aliases to package.json imports map - Replace all relative imports (./, ../, ../..) in app/ and database/mongo_migrations/ with the corresponding #alias imports, eliminating relative path traversal across the codebase - Remove dead code: ConfigurationVersionModel.findByConfigurationIdentifier (unused, superseded by paginateVersions) and unused exception classes (NotFoundException, UnprocessableEntityException, DatabaseException) from app/exceptions/index.ts, keeping only BadRequestException - Fix pre-existing syntax error in configuration_version.ts (mismatched parenthesis) that broke tsc - Fix eqeqeq violation in configuration_service.ts and isNaN -> Number.isNaN in configuration_engine.ts / cwmp-1-0.ts / exchange_controller.ts - Fix no-shadow violation in cwmp-1-0.ts EventStruct constructor - Prettier formatting pass on touched files Validated: tsc --noEmit clean, eslint app/ clean, full test suite green.
This commit is contained in:
1 parent
4177f1adbd
commit
f9e56c78b1
74 files changed
+1243
-863
No files matched your search
@@ -247,7 +247,10 @@ export default class ExchangeController {
|
||||
|
||||
// Track SSE stream setup time
|
||||
const setupDurationMs = performance.now() - startTime
|
||||
ExchangeMetricsService.getInstance().recordApiResponseTime('GET /exchanges/stream', setupDurationMs)
|
||||
ExchangeMetricsService.getInstance().recordApiResponseTime(
|
||||
'GET /exchanges/stream',
|
||||
setupDurationMs
|
||||
)
|
||||
|
||||
const listener = (exchange: any) => {
|
||||
if (closed) return
|
||||
@@ -333,10 +336,7 @@ export default class ExchangeController {
|
||||
*
|
||||
* Requirement 6.9: Event id equals the exchange's sequenceNumber
|
||||
*/
|
||||
private sendSSEEvent(
|
||||
res: import('node:http').ServerResponse,
|
||||
exchange: any
|
||||
): void {
|
||||
private sendSSEEvent(res: import('node:http').ServerResponse, exchange: any): void {
|
||||
const data = JSON.stringify(exchange)
|
||||
res.write(`id: ${exchange.sequenceNumber}\ndata: ${data}\n\n`)
|
||||
}
|
||||
@@ -347,7 +347,7 @@ export default class ExchangeController {
|
||||
*/
|
||||
private isValidIso8601(value: string): boolean {
|
||||
const date = new Date(value)
|
||||
if (isNaN(date.getTime())) {
|
||||
if (Number.isNaN(date.getTime())) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user