chore: upgrade Node.js runtime to v24 across codebase #419

Merged
jason.woltje merged 438 commits from fix/auth-frontend-remediation into main 2026-02-17 01:04:47 +00:00
4 changed files with 20 additions and 2 deletions
Showing only changes of commit 701df76df1 - Show all commits

View File

@@ -135,7 +135,7 @@ export class FederationAuthController {
*/ */
@Post("validate") @Post("validate")
@Throttle({ short: { limit: 3, ttl: 1000 } }) @Throttle({ short: { limit: 3, ttl: 1000 } })
validateToken(@Body() dto: ValidateFederatedTokenDto): FederatedTokenValidation { async validateToken(@Body() dto: ValidateFederatedTokenDto): Promise<FederatedTokenValidation> {
this.logger.debug(`Validating federated token from ${dto.instanceId}`); this.logger.debug(`Validating federated token from ${dto.instanceId}`);
return this.oidcService.validateToken(dto.token, dto.instanceId); return this.oidcService.validateToken(dto.token, dto.instanceId);

View File

@@ -2,6 +2,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
import { AgentsController } from "./agents.controller"; import { AgentsController } from "./agents.controller";
import { QueueService } from "../../queue/queue.service"; import { QueueService } from "../../queue/queue.service";
import { AgentSpawnerService } from "../../spawner/agent-spawner.service"; import { AgentSpawnerService } from "../../spawner/agent-spawner.service";
import { AgentLifecycleService } from "../../spawner/agent-lifecycle.service";
import { KillswitchService } from "../../killswitch/killswitch.service"; import { KillswitchService } from "../../killswitch/killswitch.service";
import type { KillAllResult } from "../../killswitch/killswitch.service"; import type { KillAllResult } from "../../killswitch/killswitch.service";
@@ -17,6 +18,9 @@ describe("AgentsController - Killswitch Endpoints", () => {
let mockSpawnerService: { let mockSpawnerService: {
spawnAgent: ReturnType<typeof vi.fn>; spawnAgent: ReturnType<typeof vi.fn>;
}; };
let mockLifecycleService: {
getAgentLifecycleState: ReturnType<typeof vi.fn>;
};
beforeEach(() => { beforeEach(() => {
mockKillswitchService = { mockKillswitchService = {
@@ -32,9 +36,14 @@ describe("AgentsController - Killswitch Endpoints", () => {
spawnAgent: vi.fn(), spawnAgent: vi.fn(),
}; };
mockLifecycleService = {
getAgentLifecycleState: vi.fn(),
};
controller = new AgentsController( controller = new AgentsController(
mockQueueService as unknown as QueueService, mockQueueService as unknown as QueueService,
mockSpawnerService as unknown as AgentSpawnerService, mockSpawnerService as unknown as AgentSpawnerService,
mockLifecycleService as unknown as AgentLifecycleService,
mockKillswitchService as unknown as KillswitchService mockKillswitchService as unknown as KillswitchService
); );
}); });

View File

@@ -1,6 +1,7 @@
import { AgentsController } from "./agents.controller"; import { AgentsController } from "./agents.controller";
import { QueueService } from "../../queue/queue.service"; import { QueueService } from "../../queue/queue.service";
import { AgentSpawnerService } from "../../spawner/agent-spawner.service"; import { AgentSpawnerService } from "../../spawner/agent-spawner.service";
import { AgentLifecycleService } from "../../spawner/agent-lifecycle.service";
import { KillswitchService } from "../../killswitch/killswitch.service"; import { KillswitchService } from "../../killswitch/killswitch.service";
import { BadRequestException } from "@nestjs/common"; import { BadRequestException } from "@nestjs/common";
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest"; import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
@@ -13,6 +14,9 @@ describe("AgentsController", () => {
let spawnerService: { let spawnerService: {
spawnAgent: ReturnType<typeof vi.fn>; spawnAgent: ReturnType<typeof vi.fn>;
}; };
let lifecycleService: {
getAgentLifecycleState: ReturnType<typeof vi.fn>;
};
let killswitchService: { let killswitchService: {
killAgent: ReturnType<typeof vi.fn>; killAgent: ReturnType<typeof vi.fn>;
killAllAgents: ReturnType<typeof vi.fn>; killAllAgents: ReturnType<typeof vi.fn>;
@@ -28,6 +32,10 @@ describe("AgentsController", () => {
spawnAgent: vi.fn(), spawnAgent: vi.fn(),
}; };
lifecycleService = {
getAgentLifecycleState: vi.fn(),
};
killswitchService = { killswitchService = {
killAgent: vi.fn(), killAgent: vi.fn(),
killAllAgents: vi.fn(), killAllAgents: vi.fn(),
@@ -37,6 +45,7 @@ describe("AgentsController", () => {
controller = new AgentsController( controller = new AgentsController(
queueService as unknown as QueueService, queueService as unknown as QueueService,
spawnerService as unknown as AgentSpawnerService, spawnerService as unknown as AgentSpawnerService,
lifecycleService as unknown as AgentLifecycleService,
killswitchService as unknown as KillswitchService killswitchService as unknown as KillswitchService
); );
}); });