chore: apply code formatting and linting
- format long import statements with consistent line wrapping - apply consistent indentation across client and server modules - remove generated tsconfig.tsbuildinfo file
This commit is contained in:
1 parent
a71be39076
commit
e66e53c817
57 files changed
+851
-478
No files matched your search
@@ -10,7 +10,10 @@ import { CodeExecutorService } from "../code-executor/code-executor.service";
|
||||
import { ExecContextBuilder } from "../code-executor/exec-context.builder";
|
||||
import { traceStorage } from "../common/trace-context";
|
||||
import { TraceLogger } from "../common/trace-logger";
|
||||
import { EnvironmentData, EnvironmentEntity } from "../environment/environment.entity";
|
||||
import {
|
||||
EnvironmentData,
|
||||
EnvironmentEntity,
|
||||
} from "../environment/environment.entity";
|
||||
import { SessionContextService } from "../session/session-context.service";
|
||||
import { SessionService } from "../session/session.service";
|
||||
import { SnippetService } from "../snippet/snippet.service";
|
||||
@@ -115,7 +118,7 @@ export class ScenarioSchedulerService {
|
||||
const environmentData = await this.environmentRepo
|
||||
.findOneBy({ id: run.environmentId })
|
||||
.then((env) => env?.data ?? {})
|
||||
.catch(() => ({} as EnvironmentData));
|
||||
.catch(() => ({}) as EnvironmentData);
|
||||
this.runEnvironments.set(run.id, environmentData);
|
||||
const traceId = crypto.randomUUID();
|
||||
void traceStorage.run({ traceId }, () =>
|
||||
@@ -187,7 +190,12 @@ export class ScenarioSchedulerService {
|
||||
cookies.find((c) => c.name === "token")?.value ??
|
||||
"";
|
||||
|
||||
const session = await this.sessionService.upsert(sessionName, token, cookies, localStorage);
|
||||
const session = await this.sessionService.upsert(
|
||||
sessionName,
|
||||
token,
|
||||
cookies,
|
||||
localStorage,
|
||||
);
|
||||
await this.runRepo.update(runId, { sessionId: session.id });
|
||||
this.sessionContextService.register(
|
||||
sessionName,
|
||||
|
||||
@@ -214,7 +214,11 @@ export class ScenarioController {
|
||||
@Param("id", ParseUUIDPipe) id: string,
|
||||
@Body() dto: CreateScenarioRunDto,
|
||||
) {
|
||||
return this.scenarioService.createRun(id, dto.environmentId, dto.saveSession);
|
||||
return this.scenarioService.createRun(
|
||||
id,
|
||||
dto.environmentId,
|
||||
dto.saveSession,
|
||||
);
|
||||
}
|
||||
|
||||
@Get(":id/run/:runId")
|
||||
|
||||
@@ -322,7 +322,12 @@ export class ScenarioService {
|
||||
await this.findOne(scenarioId); // 404 guard
|
||||
const run = await this.runRepo.findOne({
|
||||
where: { id: runId, scenarioId },
|
||||
relations: ["stepRuns", "stepRuns.scenarioStep", "environment", "session"],
|
||||
relations: [
|
||||
"stepRuns",
|
||||
"stepRuns.scenarioStep",
|
||||
"environment",
|
||||
"session",
|
||||
],
|
||||
order: { stepRuns: { order: "ASC" } },
|
||||
});
|
||||
if (!run)
|
||||
@@ -370,7 +375,12 @@ export class ScenarioService {
|
||||
}
|
||||
|
||||
const run = await this.runRepo.save(
|
||||
this.runRepo.create({ scenarioId, environmentId, status: "pending", saveSession }),
|
||||
this.runRepo.create({
|
||||
scenarioId,
|
||||
environmentId,
|
||||
status: "pending",
|
||||
saveSession,
|
||||
}),
|
||||
);
|
||||
|
||||
const stepRuns = scenario.steps.map((step, index) =>
|
||||
|
||||
Reference in new issue
Block a user