Generate Prisma clients in profile builds

This commit is contained in:
2026-07-25 07:28:54 +00:00
parent dbd869f0ed
commit f9ca027aa3
3 changed files with 12 additions and 9 deletions
@@ -327,16 +327,18 @@ export const buildWorkspaceCommands = (
env,
});
}
for (const packageName of [
'@sammo-ts/common',
'@sammo-ts/infra',
'@sammo-ts/logic',
'@sammo-ts/game-api',
'@sammo-ts/game-engine',
]) {
const buildSteps: Array<[filter: string, script: string]> = [
['@sammo-ts/common', 'build'],
['@sammo-ts/infra', 'prisma:generate'],
['@sammo-ts/infra', 'build'],
['@sammo-ts/logic', 'build'],
['@sammo-ts/game-api', 'build'],
['@sammo-ts/game-engine', 'build'],
];
for (const [filter, script] of buildSteps) {
commands.push({
command: 'pnpm',
args: ['--filter', packageName, 'build'],
args: ['--filter', filter, script],
cwd: workspaceRoot,
env,
});
@@ -103,6 +103,7 @@ describe('buildWorkspaceCommands', () => {
expect(commands.map(({ args }) => args)).toEqual([
['install'],
['--filter', '@sammo-ts/common', 'build'],
['--filter', '@sammo-ts/infra', 'prisma:generate'],
['--filter', '@sammo-ts/infra', 'build'],
['--filter', '@sammo-ts/logic', 'build'],
['--filter', '@sammo-ts/game-api', 'build'],
+1 -1
View File
@@ -87,7 +87,7 @@ Gateway runs a lightweight cron loop (setInterval) that:
- Each workspace stores `lastUsedAt` in DB so cleanup can remove stale worktrees.
- Cleanup is invoked manually by admin API and removes worktrees unused for 6+ months.
- Build runs `pnpm install` when workspace is created, then executes
the common, infra, and logic dependency builds before
the common build, Prisma client generation, and infra/logic dependency builds before
`pnpm --filter @sammo-ts/game-api build` and
`pnpm --filter @sammo-ts/game-engine build`, then marks build success/failure.
- On success, status moves to `PREOPEN` for reserved builds or stays unchanged for manual builds.