CognxSafeTrack Claude Sonnet 4.6 commited on
Commit ·
1fa2a07
1
Parent(s): cfbb685
fix: resolve turbo build failures blocking Railway deployment
Browse files- Add missing logger imports in MessageHandler.ts and pedagogy.ts
- Remove conflicting fastify.d.ts (prisma: PrismaClient vs prisma: any)
- Consolidate all Fastify type augmentations in types/fastify.d.ts
- Import @fastify/multipart types to restore req.file() signature
All 7 packages now pass pnpm turbo run build (matches Dockerfile builder step).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Files changed (4)
123456789101112131415161718import 'fastify';import { PrismaClient } from '@prisma/client';declare module 'fastify' {interface FastifyInstance {prisma: PrismaClient;}interface FastifyRequest {user?: {id: string;email: string;role: 'SUPER_ADMIN' | 'ADMIN' | 'STUDENT';organizationId: string;};organizationId?: string;file: () => Promise<any>; // Support for @fastify/multipart}}1// Type augmentations are consolidated in src/types/fastify.d.ts
12345import { FastifyInstance, FastifyRequest } from 'fastify';import { PrismaClient } from '@repo/database';declare module 'fastify' {interface FastifyInstance {123456import { FastifyInstance, FastifyRequest } from 'fastify';import { PrismaClient } from '@repo/database';import '@fastify/multipart';declare module 'fastify' {interface FastifyInstance {
1 unmodified line2345671 unmodified lineimport Redis from 'ioredis';import { JobHandler, JobData } from './types';import { prisma } from '../services/prisma';import { sendTextMessage, sendImageMessage, sendInteractiveButtonMessage, sendInteractiveListMessage } from '../whatsapp-cloud';interface TenantConfig {1 unmodified line23456781 unmodified lineimport Redis from 'ioredis';import { JobHandler, JobData } from './types';import { prisma } from '../services/prisma';import { logger } from '../logger';import { sendTextMessage, sendImageMessage, sendInteractiveButtonMessage, sendInteractiveListMessage } from '../whatsapp-cloud';interface TenantConfig {
1234import { prisma } from './services/prisma';import { sendTextMessage, sendAudioMessage, sendInteractiveButtonMessage, sendImageMessage, sendVideoMessage } from './whatsapp-cloud';import { isFeatureEnabled } from './config';import { shortenForWhatsApp } from './normalizeWolof';12345import { prisma } from './services/prisma';import { logger } from './logger';import { sendTextMessage, sendAudioMessage, sendInteractiveButtonMessage, sendImageMessage, sendVideoMessage } from './whatsapp-cloud';import { isFeatureEnabled } from './config';import { shortenForWhatsApp } from './normalizeWolof';
apps/api/src/fastify.d.ts+1-18
apps/api/src/types/fastify.d.ts+1
apps/whatsapp-worker/src/handlers/MessageHandler.ts+1
apps/whatsapp-worker/src/pedagogy.ts+1