From fbb194067db4bfb722ab8672c8e3e41b8d259d8c Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 15 Feb 2026 23:52:27 +0100 Subject: [PATCH] Fix seed: inline defaultRoundConfig to eliminate src/ dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Docker production image only has compiled .next/ output — src/ TypeScript files don't exist. The seed was importing from ../src/types/competition-configs which fails in Docker regardless of file extension. Inlined the default config map directly in the seed so it has zero external dependencies. Co-Authored-By: Claude Opus 4.6 --- prisma/seed.ts | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/prisma/seed.ts b/prisma/seed.ts index d66611b..ce1d287 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -18,7 +18,49 @@ import { AdvancementRuleType, } from '@prisma/client' import bcrypt from 'bcryptjs' -import { defaultRoundConfig } from '../src/types/competition-configs' +// Inline default configs so seed has ZERO dependency on src/ (not available in Docker prod image) +function defaultRoundConfig(roundType: RoundType): Record { + const defaults: Record Record> = { + INTAKE: () => ({ + allowDrafts: true, draftExpiryDays: 30, + acceptedCategories: ['STARTUP', 'BUSINESS_CONCEPT'], + maxFileSizeMB: 50, maxFilesPerSlot: 1, allowedMimeTypes: ['application/pdf'], + lateSubmissionNotification: true, publicFormEnabled: false, customFields: [], + }), + FILTERING: () => ({ + rules: [], aiScreeningEnabled: true, manualReviewEnabled: true, + aiConfidenceThresholds: { high: 0.85, medium: 0.6, low: 0.4 }, + autoAdvanceEligible: false, duplicateDetectionEnabled: true, batchSize: 20, + }), + EVALUATION: () => ({ + requiredReviewsPerProject: 3, scoringMode: 'criteria', requireFeedback: true, + feedbackMinLength: 0, requireAllCriteriaScored: true, coiRequired: true, + peerReviewEnabled: false, anonymizationLevel: 'fully_anonymous', + aiSummaryEnabled: false, generateAiShortlist: false, advancementMode: 'admin_selection', + }), + SUBMISSION: () => ({ + eligibleStatuses: ['PASSED'], notifyEligibleTeams: true, lockPreviousWindows: true, + }), + MENTORING: () => ({ + eligibility: 'requested_only', chatEnabled: true, fileUploadEnabled: true, + fileCommentsEnabled: true, filePromotionEnabled: true, autoAssignMentors: false, + }), + LIVE_FINAL: () => ({ + juryVotingEnabled: true, votingMode: 'simple', audienceVotingEnabled: false, + audienceVoteWeight: 0, audienceVotingMode: 'per_project', audienceMaxFavorites: 3, + audienceRequireIdentification: false, audienceRevealTiming: 'at_deliberation', + deliberationEnabled: false, deliberationDurationMinutes: 30, showAudienceVotesToJury: false, + presentationOrderMode: 'manual', presentationDurationMinutes: 15, qaDurationMinutes: 5, + revealPolicy: 'ceremony', + }), + DELIBERATION: () => ({ + juryGroupId: 'PLACEHOLDER', mode: 'SINGLE_WINNER_VOTE', + showCollectiveRankings: false, showPriorJuryData: false, + tieBreakMethod: 'ADMIN_DECIDES', votingDuration: 60, topN: 3, allowAdminOverride: true, + }), + } + return defaults[roundType]() +} import { readFileSync } from 'fs' import { parse } from 'csv-parse/sync' import { join, dirname } from 'path'