From 7db484e3b6c20cbf680ef8acf6034b3e76c9a37e Mon Sep 17 00:00:00 2001 From: Matheus Pastorini Date: Mon, 13 Jul 2026 12:00:56 -0300 Subject: [PATCH 1/2] =?UTF-8?q?fix(build):=20corrige=20compila=C3=A7=C3=A3?= =?UTF-8?q?o=20do=20develop=20quebrada=20pelo=20upgrade=20de=20depend?= =?UTF-8?q?=C3=AAncias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tsup.config.ts: fecha esbuildOptions antes do bloco define (erro de sintaxe derrubava o parse do config e abortava o tsup) - evohub.controlplane.router.ts: normaliza req.params.id com String() — no Express 5 req.params é tipado string | string[] e o tsc falhava (TS2345) - package-lock.json: sincroniza version com o package.json (2.4.0) Refs EVO-2097 --- package-lock.json | 4 ++-- .../integrations/channel/evohub/evohub.controlplane.router.ts | 4 ++-- tsup.config.ts | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25d5270818..55bf83fe04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "evolution-api", - "version": "2.3.7", + "version": "2.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "evolution-api", - "version": "2.3.7", + "version": "2.4.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/src/api/integrations/channel/evohub/evohub.controlplane.router.ts b/src/api/integrations/channel/evohub/evohub.controlplane.router.ts index f87b335259..6b4a61c353 100644 --- a/src/api/integrations/channel/evohub/evohub.controlplane.router.ts +++ b/src/api/integrations/channel/evohub/evohub.controlplane.router.ts @@ -37,7 +37,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker { }); this.router.get('/evohub/channels/:id', guard, async (req, res) => { - res.json(await evoHubClient.getChannel(req.params.id)); + res.json(await evoHubClient.getChannel(String(req.params.id))); }); this.router.get('/evohub/available-channels', guard, async (_req, res) => { @@ -114,7 +114,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker { }); this.router.post('/evohub/channels/:id/meta-connect', guard, async (req, res) => { - res.json(await evoHubClient.connectToMeta(req.params.id, req.body)); + res.json(await evoHubClient.connectToMeta(String(req.params.id), req.body)); }); } } diff --git a/tsup.config.ts b/tsup.config.ts index 23e9208362..655d8f2fbf 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -33,6 +33,7 @@ export default defineConfig({ ...(options.alias ?? {}), '@prisma/client': path.resolve(process.cwd(), 'prisma/generated/client/client.ts'), }; + }, define: { __LICENSE_ENDPOINT_ENCODED__: licenseEndpointEncoded, __LICENSE_ENDPOINT_XOR_KEY__: licenseEndpointXorKey, From 00f8f134fbe8f499cbed1f7aa4d155952de5d3a1 Mon Sep 17 00:00:00 2001 From: Guilherme Gomes Date: Mon, 13 Jul 2026 17:38:32 -0300 Subject: [PATCH 2/2] ci(quality): set DATABASE_CONNECTION_URI so the build gate actually runs The Check Code Quality job has been red since dd552c77 and never reached its "Check build" step: Prisma 7's prisma.config.ts resolves datasource.url via env("DATABASE_CONNECTION_URI"), which throws PrismaConfigEnvError when the variable is absent, and the runner has no .env (the Dockerfile copies .env.example, which is why image builds got past this point). prisma generate never opens a connection, so a syntactically valid URI is enough. Without this the build gate stays dead and the next dependency bump breaks develop unnoticed, exactly as this one did. Also aligns the EvoHub req.params.id cast with the convention used by the other 30 call sites in src (as string), instead of String(). --- .github/workflows/check_code_quality.yml | 6 ++++++ .../channel/evohub/evohub.controlplane.router.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_code_quality.yml b/.github/workflows/check_code_quality.yml index df156f2117..424e304135 100644 --- a/.github/workflows/check_code_quality.yml +++ b/.github/workflows/check_code_quality.yml @@ -37,6 +37,12 @@ jobs: - name: Generate Prisma client run: npm run db:generate + env: + # prisma.config.ts resolves datasource.url from this variable when the Prisma CLI + # loads, and there is no .env on the runner. `prisma generate` never opens a + # connection, so any syntactically valid URI works. + DATABASE_PROVIDER: postgresql + DATABASE_CONNECTION_URI: postgresql://user:pass@localhost:5432/evolution?schema=public - name: Check build run: npm run build \ No newline at end of file diff --git a/src/api/integrations/channel/evohub/evohub.controlplane.router.ts b/src/api/integrations/channel/evohub/evohub.controlplane.router.ts index 6b4a61c353..022a821a6a 100644 --- a/src/api/integrations/channel/evohub/evohub.controlplane.router.ts +++ b/src/api/integrations/channel/evohub/evohub.controlplane.router.ts @@ -37,7 +37,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker { }); this.router.get('/evohub/channels/:id', guard, async (req, res) => { - res.json(await evoHubClient.getChannel(String(req.params.id))); + res.json(await evoHubClient.getChannel(req.params.id as string)); }); this.router.get('/evohub/available-channels', guard, async (_req, res) => { @@ -114,7 +114,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker { }); this.router.post('/evohub/channels/:id/meta-connect', guard, async (req, res) => { - res.json(await evoHubClient.connectToMeta(String(req.params.id), req.body)); + res.json(await evoHubClient.connectToMeta(req.params.id as string, req.body)); }); } }