refactor(scenario): remove step type and simplify scheduler to exec-only

- remove StepType, type column, and type field from step entity and DTOs
- remove executeLoginStep, executeSignStep, executeExecStep from scheduler
- inline exec logic directly in executeStepRun; all steps run execCode
- remove AuthService, EnvironmentService, runEnvironments from scheduler
- remove type selector from CreateStepPage and EditStepPage
- remove type badge column from ScenarioDetailPage
- fix useEffect dependency arrays in RunDetailPage (FINAL, id, runId, polling)
- fix duplicate /snippets proxy key in vite.config.ts
- remove unused escapeHtml export from hljs.ts
This commit is contained in:
2026-04-10 16:14:17 +03:00
parent 1c13e068ad
commit 673aa0f458
36 changed files with 339 additions and 421 deletions
@@ -4,7 +4,7 @@ import { IsNotEmpty, IsString, IsUUID } from "class-validator";
export class AddScenarioCredentialDto {
@ApiProperty({ example: "uuid-here" })
@IsUUID()
credentialId: string
credentialId: string;
@ApiProperty({ example: "api_key" })
@IsString()
@IsNotEmpty()
@@ -1,13 +1,5 @@
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import {
IsIn,
IsInt,
IsNotEmpty,
IsOptional,
IsString,
Min,
} from "class-validator";
import { StepType } from "../scenario-step.entity";
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from "class-validator";
export class CreateScenarioStepDto {
@ApiPropertyOptional({ example: "Check login page title" })
@@ -20,12 +12,9 @@ export class CreateScenarioStepDto {
@Min(0)
order: number;
@ApiProperty({ enum: ["login", "exec", "sign"], example: "exec" })
@IsIn(["login", "exec", "sign"])
type: StepType;
@ApiPropertyOptional({
description: "Session name (deprecated — browser is created automatically per run).",
description:
"Session name (deprecated — browser is created automatically per run).",
example: "my-session",
})
@IsOptional()
@@ -2,7 +2,6 @@ import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { Type } from "class-transformer";
import {
IsArray,
IsIn,
IsInt,
IsNotEmpty,
IsOptional,
@@ -11,7 +10,6 @@ import {
Min,
ValidateNested,
} from "class-validator";
import { StepType } from "../scenario-step.entity";
export class ScenarioStepExportDto {
@ApiProperty()
@@ -19,10 +17,6 @@ export class ScenarioStepExportDto {
@Min(0)
order: number;
@ApiProperty({ enum: ["login", "exec", "sign"] })
@IsIn(["login", "exec", "sign"])
type: StepType;
@ApiPropertyOptional()
@IsOptional()
@IsString()
@@ -1,13 +1,5 @@
import { ApiPropertyOptional } from "@nestjs/swagger";
import {
IsIn,
IsInt,
IsNotEmpty,
IsOptional,
IsString,
Min,
} from "class-validator";
import { StepType } from "../scenario-step.entity";
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from "class-validator";
export class UpdateScenarioStepDto {
@ApiPropertyOptional({ example: "Check login page title" })
@@ -21,11 +13,6 @@ export class UpdateScenarioStepDto {
@Min(0)
order?: number;
@ApiPropertyOptional({ enum: ["login", "exec", "sign"] })
@IsOptional()
@IsIn(["login", "exec", "sign"])
type?: StepType;
@ApiPropertyOptional()
@IsOptional()
@IsString()