- add timeoutSeconds field to scenario and step entities - add timeoutSeconds to create/update DTOs for scenario and step - enforce timeout via scheduler: abort run if step exceeds limit - expose timeoutSeconds in MCP create/update scenario and step tools - add client-side type, API, i18n, and form support for timeoutSeconds - add integration tests for timeout persistence via REST and MCP
22 lines
565 B
TypeScript
22 lines
565 B
TypeScript
import { ApiPropertyOptional } from "@nestjs/swagger";
|
|
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from "class-validator";
|
|
|
|
export class CreateScenarioStepDto {
|
|
@ApiPropertyOptional({ example: "Check login page title" })
|
|
@IsOptional()
|
|
@IsString()
|
|
title?: string;
|
|
|
|
@ApiPropertyOptional({ example: "return await page.title();" })
|
|
@IsOptional()
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
execCode?: string;
|
|
|
|
@ApiPropertyOptional({ description: "Step timeout in seconds (default: 60)" })
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(1)
|
|
timeoutSeconds?: number;
|
|
}
|