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>
apps/api/src/fastify.d.ts
CHANGED
|
@@ -1,18 +1 @@
|
|
| 1 |
-
|
| 2 |
-
import { PrismaClient } from '@prisma/client';
|
| 3 |
-
|
| 4 |
-
declare module 'fastify' {
|
| 5 |
-
interface FastifyInstance {
|
| 6 |
-
prisma: PrismaClient;
|
| 7 |
-
}
|
| 8 |
-
interface FastifyRequest {
|
| 9 |
-
user?: {
|
| 10 |
-
id: string;
|
| 11 |
-
email: string;
|
| 12 |
-
role: 'SUPER_ADMIN' | 'ADMIN' | 'STUDENT';
|
| 13 |
-
organizationId: string;
|
| 14 |
-
};
|
| 15 |
-
organizationId?: string;
|
| 16 |
-
file: () => Promise<any>; // Support for @fastify/multipart
|
| 17 |
-
}
|
| 18 |
-
}
|
|
|
|
| 1 |
+
// Type augmentations are consolidated in src/types/fastify.d.ts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apps/api/src/types/fastify.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import { FastifyInstance, FastifyRequest } from 'fastify';
|
| 2 |
import { PrismaClient } from '@repo/database';
|
|
|
|
| 3 |
|
| 4 |
declare module 'fastify' {
|
| 5 |
interface FastifyInstance {
|
|
|
|
| 1 |
import { FastifyInstance, FastifyRequest } from 'fastify';
|
| 2 |
import { PrismaClient } from '@repo/database';
|
| 3 |
+
import '@fastify/multipart';
|
| 4 |
|
| 5 |
declare module 'fastify' {
|
| 6 |
interface FastifyInstance {
|
apps/whatsapp-worker/src/handlers/MessageHandler.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Job } from 'bullmq';
|
|
| 2 |
import Redis from 'ioredis';
|
| 3 |
import { JobHandler, JobData } from './types';
|
| 4 |
import { prisma } from '../services/prisma';
|
|
|
|
| 5 |
import { sendTextMessage, sendImageMessage, sendInteractiveButtonMessage, sendInteractiveListMessage } from '../whatsapp-cloud';
|
| 6 |
|
| 7 |
interface TenantConfig {
|
|
|
|
| 2 |
import Redis from 'ioredis';
|
| 3 |
import { JobHandler, JobData } from './types';
|
| 4 |
import { prisma } from '../services/prisma';
|
| 5 |
+
import { logger } from '../logger';
|
| 6 |
import { sendTextMessage, sendImageMessage, sendInteractiveButtonMessage, sendInteractiveListMessage } from '../whatsapp-cloud';
|
| 7 |
|
| 8 |
interface TenantConfig {
|
apps/whatsapp-worker/src/pedagogy.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import { prisma } from './services/prisma';
|
|
|
|
| 2 |
import { sendTextMessage, sendAudioMessage, sendInteractiveButtonMessage, sendImageMessage, sendVideoMessage } from './whatsapp-cloud';
|
| 3 |
import { isFeatureEnabled } from './config';
|
| 4 |
import { shortenForWhatsApp } from './normalizeWolof';
|
|
|
|
| 1 |
import { prisma } from './services/prisma';
|
| 2 |
+
import { logger } from './logger';
|
| 3 |
import { sendTextMessage, sendAudioMessage, sendInteractiveButtonMessage, sendImageMessage, sendVideoMessage } from './whatsapp-cloud';
|
| 4 |
import { isFeatureEnabled } from './config';
|
| 5 |
import { shortenForWhatsApp } from './normalizeWolof';
|