refactor: fix lint errors across server and client
- replace any types with explicit types in scenario file listing, import/export and mcp upload code - type test server addresses and list callbacks, drop unused vars - document why e2e export keeps the archiver import-require form - remove unused scenario files total state in the client - require clean lint in both packages in CLAUDE.md
This commit is contained in:
1 parent
1c5c906cbb
commit
cf56840df9
9 files changed
+41
-27
No files matched your search
@@ -25,7 +25,7 @@ import { CreateScenarioStepDto } from "./dto/create-scenario-step.dto";
|
||||
import { CreateScenarioDto } from "./dto/create-scenario.dto";
|
||||
import { ScenarioQueryDto } from "./dto/pagination-query.dto";
|
||||
import { RunsQueryDto } from "./dto/runs-query.dto";
|
||||
import { ExportEntity } from "./dto/scenario-export.dto";
|
||||
import { ExportEntity, ScenarioExportDto } from "./dto/scenario-export.dto";
|
||||
import { UpdateScenarioStepDto } from "./dto/update-scenario-step.dto";
|
||||
import { UpdateScenarioDto } from "./dto/update-scenario.dto";
|
||||
import { ScenarioService } from "./scenario.service";
|
||||
@@ -52,7 +52,9 @@ export class ScenarioController {
|
||||
@ApiOperation({ summary: "Import a scenario from an export payload (single object or array)" })
|
||||
@ApiResponse({ status: 201, description: "Scenario imported" })
|
||||
importScenario(@Body() payload: unknown) {
|
||||
return this.scenarioService.importScenario(payload as any);
|
||||
return this.scenarioService.importScenario(
|
||||
payload as ScenarioExportDto | ExportEntity[],
|
||||
);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@@ -157,7 +159,7 @@ export class ScenarioController {
|
||||
const parts = (entities as ExportEntity[]).map((entity) => {
|
||||
const label = kindLabels[entity.kind ?? ""] ?? entity.kind ?? "Entity";
|
||||
const comment = `# --- ${label}: ${
|
||||
(entity as any).name ?? (entity as any).id ?? ""
|
||||
entity.name ?? entity.id ?? ""
|
||||
} ---`;
|
||||
return `${comment}\n${yamlStringify(entity)}`;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user