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:
1 parent
1c13e068ad
commit
673aa0f458
36 files changed
+339
-421
No files matched your search
@@ -7,12 +7,16 @@ export class CreateSnippetDto {
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
|
||||
@ApiPropertyOptional({ example: "Clicks the login button and waits for navigation" })
|
||||
@ApiPropertyOptional({
|
||||
example: "Clicks the login button and waits for navigation",
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@ApiProperty({ example: "await page.click('#login-btn');\nawait page.waitForNavigation();" })
|
||||
@ApiProperty({
|
||||
example: "await page.click('#login-btn');\nawait page.waitForNavigation();",
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
code: string;
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsIn, IsNotEmpty, IsOptional, IsString, IsUUID } from "class-validator";
|
||||
import {
|
||||
IsIn,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
} from "class-validator";
|
||||
|
||||
export class SnippetExportDto {
|
||||
@ApiPropertyOptional()
|
||||
|
||||
@@ -58,7 +58,8 @@ export class SnippetService {
|
||||
const snippet = await this.findOne(id);
|
||||
if (dto.name && dto.name !== snippet.name) {
|
||||
const conflict = await this.repo.findOneBy({ name: dto.name });
|
||||
if (conflict) throw new ConflictException(`Snippet "${dto.name}" already exists`);
|
||||
if (conflict)
|
||||
throw new ConflictException(`Snippet "${dto.name}" already exists`);
|
||||
}
|
||||
Object.assign(snippet, dto);
|
||||
return this.repo.save(snippet);
|
||||
|
||||
Reference in new issue
Block a user