fix: correct orphan references after TR-069 typing refactor

- tests/device.spec.ts: fix 6× organizeParameters() calls passing wrapped
  response object instead of flat ParameterInfoStruct[] (runtime break)
- tests/device.spec.ts: fix setTmpParamValues([{x:1}]) with valid shape
- immediate_command_state_machine.ts: type handleResponse message param as
  CWMPTaskResultData (was any, gap in typing contract)
- configuration_evaluation_state.ts: replace fragile ../../../app/ dynamic
  import paths with proper static imports from ../../protocol/tr069_types.js
- main_state_machine.ts: replace all inline dynamic import() type casts with
  static imports (GetParameterNamesResponse, GetParameterValuesResponse,
  ParameterValueStruct, SetParameterAttribute, DownloadParameter, etc.)
This commit is contained in:
Kevin L'Hereec committed 2026-07-20 16:27:38 +02:00
1 parent f3eb8e1650
commit b643077e8d
4 files changed
+35 -36

No files matched your search

@@ -2,6 +2,7 @@ import { Device } from '../../domain/device/device.js'
import { CWMPTaskQueue } from './task_queue.js'
import { DeviceActionExecutor } from './device_action_executor.js'
import { ExecutingCommandsState, DeviceContext, DeviceStateResult } from './main_state_machine.js'
import type { CWMPTaskResultData } from '../../protocol/tr069_types.js'
import logger from '@adonisjs/core/services/logger'
/**
@@ -30,7 +31,7 @@ export class ImmediateCommandStateMachine {
return this.execute()
}
async handleResponse(success: boolean, message: any): Promise<string> {
async handleResponse(success: boolean, message: CWMPTaskResultData): Promise<string> {
this.context.message = { success, data: message }
return this.execute()
}