refactor(workspace): restore yaml exports and align docker builds

- return scenario export payloads as yaml to match existing workflows

- harden step reordering flow for drag-and-drop and one-based ui labels

- switch server container to workspace-lockfile installs and root ignore rules
This commit is contained in:
ars9 committed 2026-04-10 18:19:38 +03:00
1 parent 259dac806e
commit de0cbeef7c
18 files changed
+361 -11385

No files matched your search

+11 -3
View File
@@ -9,8 +9,11 @@ import {
Patch,
Post,
Query,
Res,
} from "@nestjs/common";
import { ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger";
import { Response } from "express";
import { stringify as yamlStringify } from "yaml";
import { ScenarioService } from "./scenario.service";
import { CreateScenarioDto } from "./dto/create-scenario.dto";
import { UpdateScenarioDto } from "./dto/update-scenario.dto";
@@ -88,11 +91,16 @@ export class ScenarioController {
}
@Get(":id/export")
@ApiOperation({ summary: "Export a scenario as a portable JSON payload" })
@ApiOperation({ summary: "Export a scenario as portable YAML" })
@ApiResponse({ status: 200 })
@ApiResponse({ status: 404, description: "Scenario not found" })
exportScenario(@Param("id", ParseUUIDPipe) id: string) {
return this.scenarioService.exportScenario(id);
async exportScenario(
@Param("id", ParseUUIDPipe) id: string,
@Res({ passthrough: true }) res: Response,
) {
const payload = await this.scenarioService.exportScenario(id);
res.setHeader("Content-Type", "application/yaml; charset=utf-8");
return yamlStringify(payload);
}
// ── Steps ─────────────────────────────────────────────────────────────────