Skip to content

Commit c352731

Browse files
authored
Merge pull request #2635 from evolution-foundation/fix/EVO-2097-build-develop
fix(build): develop não compila — Express 5 quebra rotas EvoHub e tsup.config.ts com erro de sintaxe
2 parents dd552c7 + 00f8f13 commit c352731

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/check_code_quality.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ jobs:
3737

3838
- name: Generate Prisma client
3939
run: npm run db:generate
40+
env:
41+
# prisma.config.ts resolves datasource.url from this variable when the Prisma CLI
42+
# loads, and there is no .env on the runner. `prisma generate` never opens a
43+
# connection, so any syntactically valid URI works.
44+
DATABASE_PROVIDER: postgresql
45+
DATABASE_CONNECTION_URI: postgresql://user:pass@localhost:5432/evolution?schema=public
4046

4147
- name: Check build
4248
run: npm run build

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/integrations/channel/evohub/evohub.controlplane.router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker {
3737
});
3838

3939
this.router.get('/evohub/channels/:id', guard, async (req, res) => {
40-
res.json(await evoHubClient.getChannel(req.params.id));
40+
res.json(await evoHubClient.getChannel(req.params.id as string));
4141
});
4242

4343
this.router.get('/evohub/available-channels', guard, async (_req, res) => {
@@ -114,7 +114,7 @@ export class EvoHubControlPlaneRouter extends RouterBroker {
114114
});
115115

116116
this.router.post('/evohub/channels/:id/meta-connect', guard, async (req, res) => {
117-
res.json(await evoHubClient.connectToMeta(req.params.id, req.body));
117+
res.json(await evoHubClient.connectToMeta(req.params.id as string, req.body));
118118
});
119119
}
120120
}

tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default defineConfig({
3333
...(options.alias ?? {}),
3434
'@prisma/client': path.resolve(process.cwd(), 'prisma/generated/client/client.ts'),
3535
};
36+
},
3637
define: {
3738
__LICENSE_ENDPOINT_ENCODED__: licenseEndpointEncoded,
3839
__LICENSE_ENDPOINT_XOR_KEY__: licenseEndpointXorKey,

0 commit comments

Comments
 (0)