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, env,
}); });
} }
for (const packageName of [ const buildSteps: Array<[filter: string, script: string]> = [
'@sammo-ts/common', ['@sammo-ts/common', 'build'],
'@sammo-ts/infra', ['@sammo-ts/infra', 'prisma:generate'],
'@sammo-ts/logic', ['@sammo-ts/infra', 'build'],
'@sammo-ts/game-api', ['@sammo-ts/logic', 'build'],
'@sammo-ts/game-engine', ['@sammo-ts/game-api', 'build'],
]) { ['@sammo-ts/game-engine', 'build'],
];
for (const [filter, script] of buildSteps) {
commands.push({ commands.push({
command: 'pnpm', command: 'pnpm',
args: ['--filter', packageName, 'build'], args: ['--filter', filter, script],
cwd: workspaceRoot, cwd: workspaceRoot,
env, env,
}); });
@@ -103,6 +103,7 @@ describe('buildWorkspaceCommands', () => {
expect(commands.map(({ args }) => args)).toEqual([ expect(commands.map(({ args }) => args)).toEqual([
['install'], ['install'],
['--filter', '@sammo-ts/common', 'build'], ['--filter', '@sammo-ts/common', 'build'],
['--filter', '@sammo-ts/infra', 'prisma:generate'],
['--filter', '@sammo-ts/infra', 'build'], ['--filter', '@sammo-ts/infra', 'build'],
['--filter', '@sammo-ts/logic', 'build'], ['--filter', '@sammo-ts/logic', 'build'],
['--filter', '@sammo-ts/game-api', '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. - 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. - Cleanup is invoked manually by admin API and removes worktrees unused for 6+ months.
- Build runs `pnpm install` when workspace is created, then executes - 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-api build` and
`pnpm --filter @sammo-ts/game-engine build`, then marks build success/failure. `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. - On success, status moves to `PREOPEN` for reserved builds or stays unchanged for manual builds.