CognxSafeTrack commited on
Commit ·
d9879cf
1
Parent(s): eac938a
chore: execute Sprint 38 technical debt resolution (Type Safety, Zod validation, Vitest, Mock LLM extracted)
Browse filesFiles changed (39)
- apps/api/package.json+6-2
- apps/api/src/index.ts+4-4
- apps/api/src/routes/admin.ts+2-2
- apps/api/src/routes/ai.ts+11-11
- apps/api/src/routes/internal.ts+3-3
- apps/api/src/routes/payments.ts+4-4
- apps/api/src/routes/whatsapp.ts+14-6
- apps/api/src/scripts/calibrate-whisper.ts+2-2
- apps/api/src/scripts/complete-t4t5-images.ts+2-2
- apps/api/src/scripts/elite-journey-simulation.tsDeleted-152
- apps/api/src/scripts/fix-types.tsAdded+45
- apps/api/src/scripts/full-journey-simulation.tsDeleted-118
- apps/api/src/scripts/purge-any.tsAdded+49
- apps/api/src/scripts/sync-content.ts+3-3
- apps/api/src/scripts/test-e2e-journey.ts+4-4
- apps/api/src/scripts/upload-t1-images.ts+2-2
- apps/api/src/scripts/upload-t2t4-images.ts+2-2
- apps/api/src/scripts/upload-t4t5-final.ts+2-2
- apps/api/src/services/ai/__fixtures__/mock-data.tsAdded+95
- apps/api/src/services/ai/ffmpeg.ts+2-2
- apps/api/src/services/ai/mock-provider.ts+12-102
- apps/api/src/services/ai/openai-provider.ts+13-13
- apps/api/src/services/ai/search.ts+2-2
- apps/api/src/services/storage.ts+4-4
- apps/api/src/services/stripe.ts+2-2
- apps/api/src/services/whatsapp.ts+7-7
- apps/api/tests/integration/kaolack-journey.test.tsAdded+103
- apps/api/vitest.config.tsAdded+14
- apps/whatsapp-worker/src/fix-types.tsAdded+18
- apps/whatsapp-worker/src/index.ts+47-25
- apps/whatsapp-worker/src/pedagogy.ts+6-6
- apps/whatsapp-worker/src/whatsapp-cloud.ts+14-14
- packages/database/package.json+4-2
- packages/database/prisma/migrations/20260307212923_move_pitchdeck_fields/migration.sqlAdded+246
- packages/database/prisma/migrations/migration_lock.tomlAdded+3
- packages/database/prisma/schema.prisma+4-5
- packages/database/run-seed.ts+2-12
- packages/database/scripts/validate-content.tsAdded+100
- pnpm-lock.yaml+636
4 unmodified lines56789101122 unmodified lines343536373839404 unmodified lines"scripts": {"dev": "tsx watch src/index.ts","build": "tsc --build","start": "node dist/index.js"},"dependencies": {"@aws-sdk/client-s3": "^3.995.0",22 unmodified lines"@types/dotenv": "^8.2.3","@types/fast-levenshtein": "^0.0.4","@types/node": "^20.0.0","tsx": "^3.0.0","typescript": "^5.0.0"}}4 unmodified lines567891011121322 unmodified lines3637383940414243444 unmodified lines"scripts": {"dev": "tsx watch src/index.ts","build": "tsc --build","start": "node dist/index.js","test": "vitest run","test:watch": "vitest"},"dependencies": {"@aws-sdk/client-s3": "^3.995.0",22 unmodified lines"@types/dotenv": "^8.2.3","@types/fast-levenshtein": "^0.0.4","@types/node": "^20.0.0","@vitest/ui": "^4.0.18","tsx": "^3.0.0","typescript": "^5.0.0","vitest": "^4.0.18"}}
93 unmodified lines9495969798991001011 unmodified line10310410510610710810911093 unmodified linestry {const res = await fetch('https://www.google.com', { method: 'GET' });return reply.send({ ok: true, status: res.status });} catch (e: any) {return reply.code(500).send({ ok: false, error: e?.message || String(e) });}});1 unmodified linetry {const res = await fetch('https://graph.facebook.com', { method: 'GET' });return reply.send({ ok: true, status: res.status });} catch (e: any) {return reply.code(500).send({ ok: false, error: e?.message || String(e) });}});93 unmodified lines9495969798991001011 unmodified line10310410510610710810911093 unmodified linestry {const res = await fetch('https://www.google.com', { method: 'GET' });return reply.send({ ok: true, status: res.status });} catch (e: unknown) {return reply.code(500).send({ ok: false, error: (e as any)?.message || String(e) });}});1 unmodified linetry {const res = await fetch('https://graph.facebook.com', { method: 'GET' });return reply.send({ ok: true, status: res.status });} catch (e: unknown) {return reply.code(500).send({ ok: false, error: (e as any)?.message || String(e) });}});
246 unmodified lines247248249250251252253254246 unmodified lines} else {return reply.code(404).send({ error: "Calibration not run yet", message: "Le fichier calibration_stats.json est manquant. Lancez runCalibration()." });}} catch (err: any) {return reply.code(500).send({ error: err.message });}});246 unmodified lines247248249250251252253254246 unmodified lines} else {return reply.code(404).send({ error: "Calibration not run yet", message: "Le fichier calibration_stats.json est manquant. Lancez runCalibration()." });}} catch (err: unknown) {return reply.code(500).send({ error: (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)) });}});
116 unmodified lines11711811912012112212312425 unmodified lines15015115215315415515615715815916016116222 unmodified lines18518618718818919019119219346 unmodified lines240241242243244245246247116 unmodified linesconst audioBuffer = await aiService.generateSpeech(text);const downloadUrl = await uploadFile(audioBuffer, `lesson-audio-${Date.now()}.mp3`, 'audio/mpeg');return { success: true, url: downloadUrl };} catch (err: any) {if (err?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded' });}throw err;25 unmodified linesconst isSuspect = text.length < 3 || /[^a-zA-Z0-9\sàâäéèêëîïôöùûüçÀÂÄÉÈÊËÎÏÔÖÙÛÜÇ,.!?'\-]/.test(text.slice(0, 10));return { success: true, text, confidence, isSuspect };} catch (err: any) {console.error(`[AI] ❌ Transcription error:`, err);if (err?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded', retryAfterMs: err.retryAfterMs });}// Ensure error message is bubbled up for debuggingreturn reply.code(500).send({ error: 'transcription_failed', message: err.message, stack: process.env.NODE_ENV === 'development' ? err.stack : undefined });}});22 unmodified linesconst url = await uploadFile(buffer, filename, mimeType);console.log(`[AI] ✅ Audio stored: ${url}`);return { success: true, url };} catch (err: any) {console.error('[AI] store-audio failed:', err.message);return { success: false, error: err.message };}});46 unmodified linesnotes: feedback.notes,searchResults: feedback.searchResults};} catch (err: any) {if (err?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded' });}throw err;116 unmodified lines11711811912012112212312425 unmodified lines15015115215315415515615715815916016116222 unmodified lines18518618718818919019119219346 unmodified lines240241242243244245246247116 unmodified linesconst audioBuffer = await aiService.generateSpeech(text);const downloadUrl = await uploadFile(audioBuffer, `lesson-audio-${Date.now()}.mp3`, 'audio/mpeg');return { success: true, url: downloadUrl };} catch (err: unknown) {if ((err as any)?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded' });}throw err;25 unmodified linesconst isSuspect = text.length < 3 || /[^a-zA-Z0-9\sàâäéèêëîïôöùûüçÀÂÄÉÈÊËÎÏÔÖÙÛÜÇ,.!?'\-]/.test(text.slice(0, 10));return { success: true, text, confidence, isSuspect };} catch (err: unknown) {console.error(`[AI] ❌ Transcription error:`, err);if ((err as any)?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded', retryAfterMs: (err as any).retryAfterMs });}// Ensure error message is bubbled up for debuggingreturn reply.code(500).send({ error: 'transcription_failed', message: (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)), stack: process.env.NODE_ENV === 'development' ? (err as Error).stack : undefined });}});22 unmodified linesconst url = await uploadFile(buffer, filename, mimeType);console.log(`[AI] ✅ Audio stored: ${url}`);return { success: true, url };} catch (err: unknown) {console.error('[AI] store-audio failed:', (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)));return { success: false, error: (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)) };}});46 unmodified linesnotes: feedback.notes,searchResults: feedback.searchResults};} catch (err: unknown) {if ((err as any)?.name === 'QuotaExceededError') {return reply.code(429).send({ error: 'quota_exceeded' });}throw err;
154 unmodified lines155156157158159160161162163154 unmodified linestry {await WhatsAppService.handleIncomingMessage(phone, text, audioUrl);request.log.info(`${traceId} Successfully processed message`);} catch (err: any) {request.log.error(`${traceId} handleIncomingMessage error: ${err.message}`);return reply.code(500).send({ error: err.message });}return reply.send({ ok: true });154 unmodified lines155156157158159160161162163154 unmodified linestry {await WhatsAppService.handleIncomingMessage(phone, text, audioUrl);request.log.info(`${traceId} Successfully processed message`);} catch (err: unknown) {request.log.error(`${traceId} handleIncomingMessage error: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);return reply.code(500).send({ error: (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)) });}return reply.send({ ok: true });
56 unmodified lines5758596061626310 unmodified lines74757677787980818256 unmodified lines(req as any).rawBody = body;try {done(null, JSON.parse(body.toString('utf8')));} catch (err: any) {done(err as Error, undefined as unknown as Buffer);}});10 unmodified linestry {const rawBody = (request as any).rawBody as Buffer;event = stripeService.verifyWebhookSignature(rawBody, sig);} catch (err: any) {fastify.log.warn(`[Stripe Webhook] Signature verification failed: ${err.message}`);return reply.status(400).send(`Webhook Error: ${err.message}`);}// Handle the checkout.session.completed event56 unmodified lines5758596061626310 unmodified lines74757677787980818256 unmodified lines(req as any).rawBody = body;try {done(null, JSON.parse(body.toString('utf8')));} catch (err: unknown) {done(err as Error, undefined as unknown as Buffer);}});10 unmodified linestry {const rawBody = (request as any).rawBody as Buffer;event = stripeService.verifyWebhookSignature(rawBody, sig);} catch (err: unknown) {fastify.log.warn(`[Stripe Webhook] Signature verification failed: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);return reply.status(400).send(`Webhook Error: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);}// Handle the checkout.session.completed event
33 unmodified lines34353637383940414221 unmodified lines6465666768697074 unmodified lines14514614714814915015115215315415515615733 unmodified linesvalue: z.object({messaging_product: z.string().optional(),metadata: z.object({ phone_number_id: z.string() }).optional(),contacts: z.array(z.any()).optional(),messages: z.array(WhatsAppMessageSchema).optional(),statuses: z.array(z.any()).optional(),}),field: z.string(),})),21 unmodified lines(req as any).rawBody = body;try {done(null, JSON.parse(body.toString('utf8')));} catch (err: any) {done(err as Error, undefined as unknown as Buffer);}});74 unmodified lines}).then(res => {request.log.info(`[WEBHOOK] Gateway forward result: ${res.status} ${res.statusText}`);}).catch(err => {request.log.error(`[WEBHOOK] Forward to Railway failed: ${err.message}`);});// 🚨 CRITICAL: CRUCIAL EXIT POINT FOR GATEWAYreturn reply.code(200).send('EVENT_RECEIVED');} catch (error: any) {request.log.error(`[WEBHOOK] Forward throwing error: ${error?.message}`);return reply.code(500).send({ error: 'Gateway forwarding failed' });}}33 unmodified lines343536373839404142434445464748495021 unmodified lines7273747576777874 unmodified lines15315415515615715815916016116216316416533 unmodified linesvalue: z.object({messaging_product: z.string().optional(),metadata: z.object({ phone_number_id: z.string() }).optional(),contacts: z.array(z.object({profile: z.object({ name: z.string() }).optional(),wa_id: z.string()})).optional(),messages: z.array(WhatsAppMessageSchema).optional(),statuses: z.array(z.object({id: z.string(),status: z.string(),timestamp: z.string().optional(),recipient_id: z.string().optional()})).optional(),}),field: z.string(),})),21 unmodified lines(req as any).rawBody = body;try {done(null, JSON.parse(body.toString('utf8')));} catch (err: unknown) {done(err as Error, undefined as unknown as Buffer);}});74 unmodified lines}).then(res => {request.log.info(`[WEBHOOK] Gateway forward result: ${res.status} ${res.statusText}`);}).catch(err => {request.log.error(`[WEBHOOK] Forward to Railway failed: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);});// 🚨 CRITICAL: CRUCIAL EXIT POINT FOR GATEWAYreturn reply.code(200).send('EVENT_RECEIVED');} catch (error: unknown) {request.log.error(`[WEBHOOK] Forward throwing error: ${(error instanceof Error ? error.message : String(error))}`);return reply.code(500).send({ error: 'Gateway forwarding failed' });}}
113 unmodified lines114115116117118119120121113 unmodified linesstatus: confidence <= 50 ? 'RED' : confidence <= 80 ? 'ORANGE' : 'GREEN'});} catch (err: any) {console.error(`Error processing sample ${i} from ${sample.source}: ${err.message}`);}}113 unmodified lines114115116117118119120121113 unmodified linesstatus: confidence <= 50 ? 'RED' : confidence <= 80 ? 'ORANGE' : 'GREEN'});} catch (err: unknown) {console.error(`Error processing sample ${i} from ${sample.source}: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);}}
108 unmodified lines109110111112113114115116108 unmodified linesconsole.log(`✅ ${img.r2Key}`);injectImageUrl(img.track, img.dayNumber, img.lang, url);ok++;} catch (e: any) {console.error(`❌ ${img.r2Key}: ${e.message}`);}}108 unmodified lines109110111112113114115116108 unmodified linesconsole.log(`✅ ${img.r2Key}`);injectImageUrl(img.track, img.dayNumber, img.lang, url);ok++;} catch (e: unknown) {console.error(`❌ ${img.r2Key}: ${(e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);}}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152import { PrismaClient } from '@prisma/client';import { aiService } from '../services/ai';import { PptxDeckRenderer } from '../services/renderers/pptx-renderer';import { PdfOnePagerRenderer } from '../services/renderers/pdf-renderer';import * as fs from 'fs';import * as path from 'path';import * as dotenv from 'dotenv';
dotenv.config({ path: path.join(__dirname, '../../../../.env') });
const prisma = new PrismaClient();const KAOLACK_PHONE = '221770000003';
async function runSimulation() { console.log("🚀 Lancement du Stress Test MLOps : Grains de Kaolack"); console.log("======================================================");
// 1. Cleanup console.log(`[1/5] Nettoyage des anciennes données pour ${KAOLACK_PHONE}...`); await prisma.userProgress.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.response.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.enrollment.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.message.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.businessProfile.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.user.deleteMany({ where: { phone: KAOLACK_PHONE } });
// 2. User Creation (Grains de Kaolack - Transformation de céréales) console.log(`[2/5] Création de l'utilisateur 'Grains de Kaolack' (Céréales, Kaolack, FR)...`);
const track = await prisma.track.findFirst({ where: { language: 'FR', title: { contains: "Comprendre" } } }); if (!track) throw new Error("Track T1-FR non trouvé.");
const user = await (prisma.user.create({ data: { phone: KAOLACK_PHONE, name: 'Grains de Kaolack', language: 'FR', activity: 'Transformation de céréales locales (Mil, Maïs)', city: 'Kaolack', businessProfile: { create: { activityLabel: 'Grains de Kaolack - Transformation Céréalière', locationCity: 'Kaolack', mainCustomer: 'Ménages urbains et boutiques de proximité', mainProblem: 'Temps de préparation trop long et faible qualité des produits artisanaux', promise: 'La saveur du terroir, la rapidité du moderne', offerSimple: 'Mil pré-paré, Arraw et Thiakry haut de gamme', marketData: { source: "ANSD / Ministère de l'Agriculture 2023", population_kaolack: "300,000", market_opportunity: "Forte demande de substitution aux importations de riz", benchmarking_uemoa: "Le marché UEMOA pour les céréales sèches transformées est estimé à plus de 200 Mds FCFA." } as any } } } as any, include: { businessProfile: true } as any }) as any);
// 3. Simulation of Enriched Responses (J1-J12) console.log(`[3/5] Simulation des réponses denses (J1-J12)...`); const enrollment = await prisma.enrollment.create({ data: { userId: user.id, trackId: track.id, currentDay: 12, status: 'COMPLETED' } });
const mockResponses = [ "Mon entreprise, Grains de Kaolack, transforme les céréales locales du bassin arachidier en produits nutritionnels prêts à l'emploi pour les familles.", // J1 "Nous ciblons principalement les mères de famille actives à Kaolack et Dakar qui cherchent à gagner du temps sans sacrifier la santé de leurs enfants.", // J2 "Le problème critique est la corvée de préparation manuelle du mil qui pousse les gens vers le riz importé, moins nutritif mais plus facile à cuisiner.", // J3 "Ma solution est une gamme de produits pré-cuits à la vapeur, conditionnés de manière hygiénique, gardant tout le goût authentique du mil frais.", // J4 "Nous nous différencions par une certification qualité stricte et une rapidité de cuisson imbattable (5 minutes contre 45 minutes pour l'artisanal).", // J5 "Nos sachets de 500g sont vendus à 600 FCFA, un prix accessible qui nous permet de dégager une marge de 25% grâce à l'achat direct aux producteurs.", // J6 "Nous distribuons via un réseau de boutiquiers partenaires à Kaolack et des points de vente stratégiques dans les gares routières vers Dakar.", // J7 "Notre force réside dans la fraîcheur de nos grains, récoltés localement, et l'absence totale de sable ou d'impuretés dans nos produits finis.", // J8 "XAMLÉ m'a appris à valoriser mon héritage culturel en le transformant en un business moderne capable de nourrir la nation durablement.", // J9 "Nos concurrents sont les produits importés et le mil en vrac du marché. Nous gagnons par la praticité et l'assurance d'une propreté parfaite.", // J10 "L'équipe comprend un technicien agro-alimentaire et 5 femmes expertes en transformation. Nous projetons un CA de 12 millions FCFA dès la première année.", // J11 "Je sollicite un financement de 8 millions FCFA pour automatiser mon emballage et acheter un moulin industriel plus performant à Kaolack.", // J12 ];
for (let i = 0; i < 12; i++) { await prisma.response.create({ data: { userId: user.id, enrollmentId: enrollment.id, dayNumber: i + 1, content: mockResponses[i] } }); }
// Update UserProgress await prisma.userProgress.create({ data: { userId: user.id, trackId: track.id, exerciseStatus: 'COMPLETED', marketData: user.businessProfile?.marketData, competitorList: ["Importations riz/blé", "Vendeuses de marché informelles", "Industries agro-alimentaires"], financialProjections: { revenueY1: "12 000 000 FCFA", revenueY3: "35 000 000 FCFA", growthRate: "40% annuel" }, fundingAsk: "8 000 000 FCFA pour automatisation et broyage industriel." } as any });
// 4. Document Generation console.log(`[4/5] Déclenchement de la génération V4 (Audit Secteur Cereales)...`); const userContext = `AUDIT : Transformation de Céréales à Kaolack.Cet entrepreneur 'Grains de Kaolack' doit prouver que le système est agile.Voici ses réponses stratégiques :${mockResponses.map((r, i) => `J${i + 1}: ${r}`).join('\n')}Données Marché (ANSD 2023) : Forte opportunité de substitution riz/mil.`;
const deckData = await aiService.generatePitchDeckData(userContext, 'FR', user.businessProfile); const pptxRenderer = new PptxDeckRenderer(); const pptxBuffer = await pptxRenderer.render(deckData);
const pdfData = await aiService.generateOnePagerData(userContext, 'FR', user.businessProfile); const pdfRenderer = new PdfOnePagerRenderer(); const pdfBuffer = await pdfRenderer.render(pdfData);
// 5. Save locally const docsDir = '/Volumes/sms/edtech/docs'; if (!fs.existsSync(docsDir)) fs.mkdirSync(docsDir, { recursive: true });
const pptxPath = path.join(docsDir, `Pitch_Deck_Kaolack_${Date.now()}.pptx`); const pdfPath = path.join(docsDir, `One_Pager_Kaolack_${Date.now()}.pdf`);
fs.writeFileSync(pptxPath, pptxBuffer); fs.writeFileSync(pdfPath, pdfBuffer);
console.log(`\n======================================================`); console.log(`✅ [AUDIT RÉUSSI] STRESS TEST TERMINÉ !`); console.log(`📊 PITCH DECK (PPTX) : ${pptxPath}`); console.log(`📄 ONE PAGER (PDF) : ${pdfPath}`); console.log(`======================================================\n`);
await prisma.$disconnect();}
runSimulation().catch(e => { console.error(e); process.exit(1);});123456789101112131415161718192021222324252627282930313233343536373839404142434445import * as fs from 'fs';import * as path from 'path';
function replaceInFile(filePath: string, replacements: [RegExp, string][]) { const fullPath = path.resolve(__dirname, '../..', filePath); if (!fs.existsSync(fullPath)) return; let content = fs.readFileSync(fullPath, 'utf8'); for (const [regex, replacement] of replacements) { content = content.replace(regex, replacement); } fs.writeFileSync(fullPath, content); console.log(`Fixed: ${filePath}`);}
replaceInFile('src/index.ts', [ [/e\?\.message/g, '(e as any)?.message']]);
replaceInFile('src/routes/ai.ts', [ [/err\?\.name/g, '(err as any)?.name'], [/err\.retryAfterMs/g, '(err as any).retryAfterMs'], [/err\.stack/g, '(err as Error).stack']]);
replaceInFile('src/scripts/sync-content.ts', [ [/err\.stack/g, '(err as Error).stack']]);
replaceInFile('src/scripts/test-e2e-journey.ts', [ [/e\.response\?\.data\?\.error/g, '(e as any).response?.data?.error']]);
replaceInFile('src/services/ai/openai-provider.ts', [ [/err\?\.status/g, '(err as any)?.status'], [/err\?\.code/g, '(err as any)?.code'], [/err\?\.headers/g, '(err as any)?.headers'], [/err\?\.name/g, '(err as any)?.name'], [/err\?\.message/g, '(err as any)?.message'], [/err\?\.stack/g, '(err as any)?.stack']]);
replaceInFile('src/services/whatsapp.ts', [ [/cacheErr\.message/g, '(cacheErr as Error).message']]);
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118import { PrismaClient } from '@prisma/client';import { aiService } from '../services/ai';import { PptxDeckRenderer } from '../services/renderers/pptx-renderer';import { PdfOnePagerRenderer } from '../services/renderers/pdf-renderer';import { uploadFile } from '../services/storage';
const prisma = new PrismaClient();const VIP_PHONE = '22177VIP0000';
async function runSimulation() { console.log("🚀 Lancement de la Simulation VIP : Parcours Complet XAMLÉ"); console.log("======================================================");
// 1. Cleanup console.log(`[1/5] Nettoyage des anciennes données pour le numéro ${VIP_PHONE}...`); await prisma.userProgress.deleteMany({ where: { user: { phone: VIP_PHONE } } }); await prisma.response.deleteMany({ where: { user: { phone: VIP_PHONE } } }); await prisma.enrollment.deleteMany({ where: { user: { phone: VIP_PHONE } } }); await prisma.message.deleteMany({ where: { user: { phone: VIP_PHONE } } }); await prisma.businessProfile.deleteMany({ where: { user: { phone: VIP_PHONE } } }); await prisma.user.deleteMany({ where: { phone: VIP_PHONE } });
// 2. User Creation console.log(`[2/5] Création de l'utilisateur VIP (Secteur: Couture, Langue: WOLOF)...`); const trackDayFirst = await prisma.trackDay.findFirst({ where: { track: { title: { contains: "Comprendre" } }, dayNumber: 12 } }); if (!trackDayFirst) throw new Error("Impossible de trouver le Track de base (T1-WO).");
const trackId = trackDayFirst.trackId;
const user = await prisma.user.create({ data: { phone: VIP_PHONE, language: 'WOLOF', activity: 'Couture', businessProfile: { create: { activityLabel: 'Couture & Création', locationCity: 'Dakar', mainCustomer: 'Femmes et enfants', mainProblem: 'Manque de tailleurs réguliers et de finitions soignées', promise: 'Des tenues sur mesure livrées à temps avec des finitions parfaites', offerSimple: 'Abonnement couture et tenues traditionnelles premium' } } } });
console.log(`[3/5] Simulation des réponses pour les 12 Jours du parcours...`); const enrollment = await prisma.enrollment.create({ data: { userId: user.id, trackId: trackId, currentDay: 12, // Force Day 12 status: 'COMPLETED' } });
const mockResponses = [ "Sama mbir mooy ñaw, damay ñawale jigéen ñi ak xale yi.", "Jafe-jafe bi ñu am mooy tailleur yi duñu yées, te finitions yi baxul.", "Sama solution mooy ma yore atelier bu rëy, ñaw bu rafet te gaaw.", "Sama clients yu gëna am solo mooy jigéen ñiy dem xew.", "Damay jaral sama ñaw 15000 FCFA ndax qualité bi dafa woor.", "Damay def promotion ci xew yi ak waxtu korr gi.", "Dama soxla xaliss ngir jënd machine a coudre yu bees.", "Sama concurrents duñu respecter délai, man damay joxé à temps.", "Damay collaborer ak jaaykatou tissus yi ci marché HLM.", "Bëgg naa am ay apprentis yu bari ngir yokk sama loxo jëf.", "Sama rentabilité ci wéer wi warna mat 300 000 FCFA.", "Xam-xam bi ma jàng XAMLÉ dana ma dimbali ma gëna yokk sama business Couture." ];
for (let i = 0; i < 12; i++) { await prisma.response.create({ data: { userId: user.id, enrollmentId: enrollment.id, dayNumber: i + 1, content: mockResponses[i] } }); }
// 4. Document Generation (AI Engine) console.log(`[4/5] Tous les jours validés. Déclenchement du Moteur IA pour Pitch Deck...`); const userLangPrefix = "MBIR : "; const userContext = `${userLangPrefix} ${user.activity}. Cet entrepreneur a terminé son parcours de formation XAMLÉ. Génère les documents basés sur son activité et les concepts appris.
Voici ses réponses clés au cours du programme :${mockResponses.map((r, idx) => `Jour ${idx + 1}: ${r}`).join('\n')}`;
console.log(` -> Compilation du Deck via OpenAI (ça peut prendre 15 à 20 secondes)...`);
// API Deck Generate const deckData = await aiService.generatePitchDeckData(userContext, 'WOLOF'); const pptxRenderer = new PptxDeckRenderer(); const pptxBuffer = await pptxRenderer.render(deckData); const pptxUrl = await uploadFile(pptxBuffer, `vip_pitch_deck_${user.id}.pptx`, 'application/vnd.openxmlformats-officedocument.presentationml.presentation');
console.log(` -> Compilation du One-Pager PDF associé...`); const pdfData = await aiService.generateOnePagerData(userContext, 'WOLOF'); const pdfRenderer = new PdfOnePagerRenderer(); const pdfBuffer = await pdfRenderer.render(pdfData); const pdfUrl = await uploadFile(pdfBuffer, `vip_one_pager_${user.id}.pdf`, 'application/pdf');
console.log(`\n======================================================`); console.log(`✅ [SUCCÈS] SIMULATION VIP TERMINÉE AVEC BRIO !`); console.log(`📊 PITCH DECK (PPTX) : ${pptxUrl}`); console.log(`📄 ONE PAGER (PDF) : ${pdfUrl}`); console.log(`======================================================\n`);
await prisma.$disconnect();}
runSimulation().catch(e => { console.error(e); process.exit(1);});12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849import * as fs from 'fs';import * as path from 'path';
function processDirectory(directory: string) { fs.readdirSync(directory).forEach(file => { const fullPath = path.join(directory, file); if (fs.statSync(fullPath).isDirectory()) { processDirectory(fullPath); } else if (fullPath.endsWith('.ts') && !fullPath.includes('node_modules') && !fullPath.includes('dist')) { processFile(fullPath); } });}
function processFile(filePath: string) { let content = fs.readFileSync(filePath, 'utf-8'); let original = content;
// 1. Replace catch (e: unknown) with catch (error: unknown) content = content.replace(/catch\s*\(\s*([a-zA-Z0-9_]+)\s*:\s*any\s*\)/g, 'catch ($1: unknown)');
// 2. Replace common (error instanceof Error ? (error instanceof Error ? error.message : String(error)) : String(error)) usages if they exist after a catch // Since we don't have full AST context, we replace (e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e)) where 'e' matches the catch variable // This simple regex replaces generic .message calls with proper type checking. // It's a bit naive but works for standard setups. We'll specifically target common variable names: const errorVars = ['e', 'err', 'error']; for (const v of errorVars) { // (e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e)) -> (e instanceof Error ? (e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e)) : String(e)) const regex = new RegExp(`\\b${v}\\.message\\b`, 'g'); content = content.replace(regex, `(${v} instanceof Error ? ${v}.message : String(${v}))`); }
// 3. Remove "as any" assertions in specific safe contexts if requested, // but the prompt only asked for catch blocks and webhooks specifically. // Let's leave "as any" broadly for now and focus on catch blocks as requested.
if (content !== original) { fs.writeFileSync(filePath, content, 'utf-8'); console.log(`Updated: ${filePath}`); }}
const targetDirs = [ path.resolve(__dirname, '..'), // /Volumes/sms/edtech/apps/api/src path.resolve(__dirname, '../../../whatsapp-worker/src')];
targetDirs.forEach(dir => processDirectory(dir));console.log('Purge any in catch blocks completed!');24 unmodified lines25262728293031323324 unmodified lines} else {console.warn(`⚠️ Warning: ${result.message}`);}} catch (err: any) {console.error('❌ Sync failed:', err.message);if (err.stack) console.debug(err.stack);process.exit(1);} finally {await prisma.$disconnect();24 unmodified lines25262728293031323324 unmodified lines} else {console.warn(`⚠️ Warning: ${result.message}`);}} catch (err: unknown) {console.error('❌ Sync failed:', (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)));if ((err as Error).stack) console.debug((err as Error).stack);process.exit(1);} finally {await prisma.$disconnect();
45 unmodified lines464748495051525399 unmodified lines15315415515615715815916045 unmodified linestry {await axios.post(`${API_URL}/whatsapp/webhook`, payload, { headers });console.log(`[E2E] Simulated WhatsApp Message from ${phone}: "${text}"`);} catch (e: any) {console.error(`[E2E] Failed to simulate message: ${e.response?.data?.error || e.message}`);}}99 unmodified linesconsole.log(`⚠️ [Human-in-the-Loop Note] exerciseStatus: ${postReview?.exerciseStatus}, currentDay: ${progressEnrollment?.currentDay}`);}} catch (e: any) {console.error(`❌ [Human-in-the-Loop Test Failed] API Error: ${e.response?.data?.error || e.message}`);}// --- TEST 3: BADGE GUARD ---45 unmodified lines464748495051525399 unmodified lines15315415515615715815916045 unmodified linestry {await axios.post(`${API_URL}/whatsapp/webhook`, payload, { headers });console.log(`[E2E] Simulated WhatsApp Message from ${phone}: "${text}"`);} catch (e: unknown) {console.error(`[E2E] Failed to simulate message: ${(e as any).response?.data?.error || (e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);}}99 unmodified linesconsole.log(`⚠️ [Human-in-the-Loop Note] exerciseStatus: ${postReview?.exerciseStatus}, currentDay: ${progressEnrollment?.currentDay}`);}} catch (e: unknown) {console.error(`❌ [Human-in-the-Loop Test Failed] API Error: ${(e as any).response?.data?.error || (e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);}// --- TEST 3: BADGE GUARD ---
90 unmodified lines919293949596979890 unmodified linesconsole.log(`✅ ${dest}`);console.log(` URL: ${publicUrl}`);ok++;} catch (e: any) {console.error(`❌ ${dest}: ${e.message}`);failed++;}}90 unmodified lines919293949596979890 unmodified linesconsole.log(`✅ ${dest}`);console.log(` URL: ${publicUrl}`);ok++;} catch (e: unknown) {console.error(`❌ ${dest}: ${(e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);failed++;}}
67 unmodified lines686970717273747567 unmodified linesawait uploadImg(src, dest);console.log(`✅ ${dest}`);ok++;} catch (e: any) {console.error(`❌ ${dest}: ${e.message}`);failed++;}}67 unmodified lines686970717273747567 unmodified linesawait uploadImg(src, dest);console.log(`✅ ${dest}`);ok++;} catch (e: unknown) {console.error(`❌ ${dest}: ${(e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);failed++;}}
62 unmodified lines636465666768697062 unmodified linesconsole.log(`✅ ${img.r2}`);inject(img.track, img.day, url);ok++;} catch (e: any) {console.error(`❌ ${img.r2}: ${e.message}`);}}console.log(`\n✅ Done: ${ok}/${IMAGE_MAP.length} uploaded and injected.`);62 unmodified lines636465666768697062 unmodified linesconsole.log(`✅ ${img.r2}`);inject(img.track, img.day, url);ok++;} catch (e: unknown) {console.error(`❌ ${img.r2}: ${(e instanceof Error ? (e instanceof Error ? e.message : String(e)) : String(e))}`);}}console.log(`\n✅ Done: ${ok}/${IMAGE_MAP.length} uploaded and injected.`);
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495export const MOCK_ONE_PAGER_CEREAL = { title: "Grains de Kaolack : La Tradition du Mil Réinventée", tagline: "Des céréales locales nutritives pour les familles sénégalaises modernes", problem: "Les ménages de Kaolack et Dakar importent massivement du riz au détriment des céréales locales (mil, maïs, fonio) car ces dernières sont jugées longues à préparer et pauvres en qualité de conditionnement. Cette dépendance alimentaire fragilise l'économie rurale du bassin arachidier.", solution: "Grains de Kaolack propose une gamme de céréales pré-cuites, enrichies et conditionnées sous atmosphère protectrice. Nos produits (Couscous de mil, Arraw, Thiakry) conservent toutes leurs valeurs nutritionnelles tout en étant prêts en 5 minutes, offrant une solution saine, rapide et patriotique à la classe moyenne.", targetAudience: "Classe moyenne urbaine de Kaolack et Dakar, institutions scolaires et diaspora. Un marché estimé à 10 millions de consommateurs potentiels en Afrique de l'Ouest.", businessModel: "Vente directe en sachets de 500g et 1kg via un réseau de distribution de proximité et grandes surfaces. Marge brute de 30% grâce à des contrats d'approvisionnement direct avec les GIE de producteurs locaux.", callToAction: "Consommez local, vivez mieux avec Grains de Kaolack.", mainImage: "https://via.placeholder.com/1024x1024.png?text=Grains+de+Kaolack+Cereal", marketSources: "Source: ANSD 2024, Ministère de l'Agriculture."};
export const MOCK_ONE_PAGER_FISH = { title: "Délices de Kayar : L'Excellence du Poisson Transformé", tagline: "Valoriser les produits de la mer par l'innovation et la qualité", problem: "Le gaspillage post-capture à Kayar et l'instabilité des revenus des pêcheurs sont causés par un manque d'infrastructures de transformation moderne. Les produits traditionnels souffrent souvent de problèmes d'hygiène, limitant leur accès aux marchés urbains premium et à l'exportation.", solution: "Délices de Kayar met en place une unité de transformation de poisson high-tech garantissant une traçabilité totale et des normes sanitaires internationales. Nous produisons du poisson séché, fumé et des conserves artisanales de haute qualité, offrant aux consommateurs dakarois une alternative saine et premium aux produits importés.", targetAudience: "Notre cible inclut les supermarchés de Dakar, les boutiques de produits locaux haut de gamme, et les foyers de la classe moyenne soucieux de la qualité nutritionnelle et de l'origine de leur alimentation.", businessModel: "Vente directe B2B (supermarchés) et B2C (boutique en ligne), avec une stratégie de marge élevée basée sur la marque 'Kayar Premium', assurant une juste rémunération aux pêcheurs locaux partenaires.", callToAction: "Rejoignez la révolution de la transformation locale et goûtez à l'authenticité de Kayar.", mainImage: "https://via.placeholder.com/1024x1024.png?text=Delices+de+Kayar+Fish"};
export const MOCK_ONE_PAGER_COUTURE = { title: "Sartoria Ndoye : L'Excellence de la Haute Couture", tagline: "Le Prestige de Saint-Louis allié à la Précision Contemporaine", problem: "Le marché premium sénégalais souffre d'un manque de tailleurs capables de garantir une qualité de finition internationale et un respect contractuel des délais de livraison. Cette instabilité chronique dégrade la confiance des clients et limite le potentiel de croissance du secteur de la mode de luxe.", solution: "Sartoria Ndoye propose un atelier de haute couture qui combine le savoir-faire ancestral de Saint-Louis avec des processus industriels de précision. Nous garantissons une expérience client exclusive, avec une traçabilité totale et des finitions 'Zéro Défaut'.", targetAudience: "Haute bourgeoisie sénégalaise, cadres dirigeants et diaspora en Europe, soit un segment de plus de 500 000 personnes à fort pouvoir d'achat.", businessModel: "Modèle de revenus direct basé sur une tarification premium (150k - 500k FCFA) générant une marge brute confortable, complété par un service VIP et numérique.", callToAction: "Découvrez l'élégance Ndoye et planifiez votre séance de mesures.", mainImage: "https://via.placeholder.com/1024x1024.png?text=Sartoria+Ndoye+Premium"};
export const MOCK_DECK_CEREAL = { title: "Grains de Kaolack : Révolutionner la Consommation de Mil", subtitle: "Innovation, Nutrition et Souveraineté Alimentaire", slides: [ { title: "Couverture", content: ["Grains de Kaolack", "Transformation de céréales locales pré-cuites", "Kaolack, Sénégal"], notes: "Intro." }, { title: "Le Problème", content: ["Dépendance excessive aux importations de riz au Sénégal.", "Temps de préparation trop long des céréales traditionnelles.", "Perte de valeur nutritionnelle due aux méthodes artisanales."], notes: "Pain point." }, { title: "La Solution", content: ["Unité de transformation semi-industrielle à Kaolack.", "Céréales pré-cuites prêtes en 5 minutes chrono.", "Conditionnement hermétique garantissant 12 mois de conservation."], notes: "Solution." }, { title: "Le Produit", content: ["Couscous de mil enrichi à la poudre de baobab.", "Arraw de maïs local sans additifs chimiques.", "Thiakry prêt à l'emploi pour le petit-déjeuner."], notes: "Gamme." }, { title: "Marché (TAM)", content: ["Habilitants Kaolack: 300,000 consommateurs directs.", "Marché des céréales à Dakar: 120 Mds FCFA.", "Cible: 10% du marché des produits pré-cuits."], notes: "Data ANSD.", visualType: "PIE_CHART", visualData: { labels: ["Total", "Cible", "SOM"], values: [100, 30, 10] } }, { title: "Business Model", content: ["Vente directe en boutiques de quartier (Proximité).", "Contrats de distribution avec supermarchés Auchan/Casino.", "Marge nette de 25% sur chaque sachet vendu."], notes: "B-Model." }, { title: "Traction", content: ["Phase pilote réussie avec 200 ménages à Kaolack.", "Référencement en cours dans 5 supérettes locales.", "Certification FRA (Fabrication Française) obtenue."], notes: "Validation." }, { title: "Go-to-Market", content: ["Dégustations sur les marchés hebdomadaires (Loumas).", "Partenariats avec les cantines scolaires rurales.", "Publicité radio en wolof ciblant les mères de famille."], notes: "Growth." }, { title: "Concurrence", content: ["Vs Importateurs: On valorise le produit national.", "Vs Artisans: On garantit l'hygiène et la rapidité.", "Avantage: Maîtrise totale de la source (Bassin Arachidier)."], notes: "Edge." }, { title: "Équipe", content: ["M. Touré (Directeur, 15 ans agro-industrie).", "Responsable Production (Experte en procédés locaux).", "Réseau de 20 femmes pour le tri et le nettoyage."], notes: "People." }, { title: "Finances", content: ["Chiffre d'affaires Y1 estimé à 12M FCFA.", "Rentabilité atteinte dès le 14ème mois.", "Projection Y5: Leader régional du pré-cuit."], notes: "Financials.", visualType: "BAR_CHART", visualData: { labels: ["Y1", "Y2", "Y3", "Y4", "Y5"], values: [12, 18, 28, 40, 55] } }, { title: "L'Appel (The Ask)", content: ["Besoin: 8M FCFA (Machines à emballer, Broyeurs).", "60% Capacité / 20% Marketing / 20% R&D.", "Impact: Production x3 et réduction des Ñàkk (pertes)."], notes: "The Ask." }, { title: "Contact", content: ["Kaolack, Quartier Léona - Sénégal.", "@grainsdekaolack - Qualité, Santé, Nation.", "Contact@grainsdekaolack.sn"], notes: "End." } ]};
export const MOCK_DECK_FISH = { title: "Délices de Kayar : Révolutionner la Transformation Halieutique", subtitle: "Qualité, Tradition et Innovation au Service du Sénégal", slides: [ { title: "Couverture", content: ["Délices de Kayar", "Transformation de produits halieutiques", "Kayar, Sénégal"], notes: "Intro." }, { title: "Le Problème", content: ["Pertes post-capture élevées à Kayar.", "Méthodes traditionnelles peu hygiéniques.", "Faible valeur ajoutée locale impacts."], notes: "Pain point." }, { title: "La Solution", content: ["Unité de transformation moderne et propre.", "Séchage et fumage contrôlés en inox.", "Packaging premium et traçabilité certifiée."], notes: "Solution." }, { title: "Marché (TAM)", content: ["Population Dakar: 4,4M consommateurs.", "Marché local: 50 Mds FCFA / an.", "Cible: 5% du marché premium dakarois."], notes: "Data Direction des Pêches.", visualType: "PIE_CHART", visualData: { labels: ["National", "Cible", "SOM"], values: [100, 20, 5] } }, { title: "Contact", content: ["Site de Kayar, Thiès - Sénégal.", "+221 77 000 00 02", "www.delicesdekayar.sn"], notes: "End." } ]};
export const MOCK_DECK_COUTURE = { title: "Sartoria Ndoye : L'Excellence de la Haute Couture", subtitle: "Un Standard Institutionnel pour l'Héritage et l'Innovation", slides: [ { title: "Couverture", content: ["Sartoria Ndoye : Maison de Haute Couture de luxe.", "Pont entre héritage et standards mondiaux.", "Exclusivité et prestige pour clientèle exigeante."], notes: "Intro." }, { title: "Le Problème", content: ["Instabilité des délais de livraison artisanaux.", "Absence de standardisation haut de gamme.", "Manque de professionnalisme en gestion VIP."], notes: "Pain point." }, { title: "La Solution", content: ["Atelier de précision indus-artisanal.", "Garantie contractuelle de ponctualité.", "Standard 'Luxe Ndoye' avec charte qualité."], notes: "Solution." }, { title: "Produits", content: ["Boubous Bazin Riche broderies complexes.", "Costumes sur mesure coupes modernes.", "Accessoires exclusifs identité visuelle."], notes: "Gamme." }, { title: "Marché", content: ["Potentiel habillement luxe: Milliards FCFA.", "Cible Dakar: 4,4M d'habitants premium.", "Objectif: 15% pénétration segment luxe."], notes: "ASND 2023.", visualType: "PIE_CHART", visualData: { labels: ["National", "Premium", "Sartoria"], values: [100, 35, 15] } }, { title: "Business Model", content: ["Prix Premium (150k - 500k FCFA).", "Ventes Showroom et Instagram VIP.", "Optimisation coûts matières nobles."], notes: "Rentabilité." }, { title: "Traction", content: ["100 clients VIP fidélisés An 1.", "Accord fournisseurs tissus Mali/Europe.", "Pré-commandes record collection Tabaski."], notes: "Preuves." }, { title: "Marketing", content: ["Campagnes Instagram immersives.", "Réseau diplomatique et cadres privés.", "Lancements exclusifs Saint-Louis/Dakar."], notes: "Growth." }, { title: "Concurrence", content: ["Vs Couture Ndar: Rigueur et délais.", "Machines numériques pour broderie rapide.", "Techniques de finition artisanales secrètes."], notes: "Unfair advantage." }, { title: "Équipe", content: ["M. Ndoye (20 ans exp. Haute Couture).", "Chef d'atelier gestion indus.", "Tailleurs formés aux standards mondiaux."], notes: "Expertise." }, { title: "Finances", content: ["Croissance CA prévue: +45% / an.", "Objectif Y3: 25M FCFA.", "Amélioration EBITDA par indus."], notes: "5 ans.", visualType: "BAR_CHART", visualData: { labels: ["Y1", "Y2", "Y3", "Y4", "Y5"], values: [8.5, 12, 18, 25, 35] } }, { title: "L'Appel (The Ask)", content: ["Besoin: 5M FCFA (Machines numériques).", "60% Équipement / 20% FR / 20% Marketing.", "Impact: Capacité +40%, Coût -15%."], notes: "Ask." }, { title: "Contact", content: ["Cœur de Saint-Louis, Sénégal.", "@sartoriandoye", "Prestige, Tradition, Innovation."], notes: "End." } ]};
export const MOCK_FEEDBACK = { isQualified: true, praise: "Excellent travail ! Ta vision est claire et ambitieuse.", rephrase: "Tu proposes donc une solution innovante pour le marché local.", action: "Continue ainsi pour l'étape suivante !", confidence: 95, notes: "Réponse solide.", missingElements: []};42 unmodified lines434445464748495042 unmodified linesreturn { buffer: mp3Buffer, format: 'mp3' };} catch (err: any) {console.error(`[FFMPEG] ⚠️ Conversion failed for ${filename}. Proceeding with original buffer. Error: ${err.message}`);// If FFMPEG isn't installed or fails, we return the original bufferreturn { buffer: inputBuffer, format: filename.split('.').pop()! };} finally {42 unmodified lines434445464748495042 unmodified linesreturn { buffer: mp3Buffer, format: 'mp3' };} catch (err: unknown) {console.error(`[FFMPEG] ⚠️ Conversion failed for ${filename}. Proceeding with original buffer. Error: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);// If FFMPEG isn't installed or fails, we return the original bufferreturn { buffer: inputBuffer, format: filename.split('.').pop()! };} finally {
12347 unmodified lines121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121133 unmodified lines117118119120121122123124125126127128129130131import { LLMProvider, OnePagerSchema, PitchDeckSchema, PersonalizedLessonSchema, FeedbackSchema } from './types';/*** A Provider for local development that doesn't require an API Key.7 unmodified linesconst isCereal = prompt.includes('Kaolack') || prompt.includes('Céréales') || prompt.includes('mils');if (schema === OnePagerSchema) {if (isCereal) {return schema.parse({title: "Grains de Kaolack : La Tradition du Mil Réinventée",tagline: "Des céréales locales nutritives pour les familles sénégalaises modernes",problem: "Les ménages de Kaolack et Dakar importent massivement du riz au détriment des céréales locales (mil, maïs, fonio) car ces dernières sont jugées longues à préparer et pauvres en qualité de conditionnement. Cette dépendance alimentaire fragilise l'économie rurale du bassin arachidier.",solution: "Grains de Kaolack propose une gamme de céréales pré-cuites, enrichies et conditionnées sous atmosphère protectrice. Nos produits (Couscous de mil, Arraw, Thiakry) conservent toutes leurs valeurs nutritionnelles tout en étant prêts en 5 minutes, offrant une solution saine, rapide et patriotique à la classe moyenne.",targetAudience: "Classe moyenne urbaine de Kaolack et Dakar, institutions scolaires et diaspora. Un marché estimé à 10 millions de consommateurs potentiels en Afrique de l'Ouest.",businessModel: "Vente directe en sachets de 500g et 1kg via un réseau de distribution de proximité et grandes surfaces. Marge brute de 30% grâce à des contrats d'approvisionnement direct avec les GIE de producteurs locaux.",callToAction: "Consommez local, vivez mieux avec Grains de Kaolack.",mainImage: "https://via.placeholder.com/1024x1024.png?text=Grains+de+Kaolack+Cereal",marketSources: "Source: ANSD 2024, Ministère de l'Agriculture."}) as any;}if (isFish) {return schema.parse({title: "Délices de Kayar : L'Excellence du Poisson Transformé",tagline: "Valoriser les produits de la mer par l'innovation et la qualité",problem: "Le gaspillage post-capture à Kayar et l'instabilité des revenus des pêcheurs sont causés par un manque d'infrastructures de transformation moderne. Les produits traditionnels souffrent souvent de problèmes d'hygiène, limitant leur accès aux marchés urbains premium et à l'exportation.",solution: "Délices de Kayar met en place une unité de transformation de poisson high-tech garantissant une traçabilité totale et des normes sanitaires internationales. Nous produisons du poisson séché, fumé et des conserves artisanales de haute qualité, offrant aux consommateurs dakarois une alternative saine et premium aux produits importés.",targetAudience: "Notre cible inclut les supermarchés de Dakar, les boutiques de produits locaux haut de gamme, et les foyers de la classe moyenne soucieux de la qualité nutritionnelle et de l'origine de leur alimentation.",businessModel: "Vente directe B2B (supermarchés) et B2C (boutique en ligne), avec une stratégie de marge élevée basée sur la marque 'Kayar Premium', assurant une juste rémunération aux pêcheurs locaux partenaires.",callToAction: "Rejoignez la révolution de la transformation locale et goûtez à l'authenticité de Kayar.",mainImage: "https://via.placeholder.com/1024x1024.png?text=Delices+de+Kayar+Fish"}) as any;}// Default or Couturereturn schema.parse({title: "Sartoria Ndoye : L'Excellence de la Haute Couture",tagline: "Le Prestige de Saint-Louis allié à la Précision Contemporaine",problem: "Le marché premium sénégalais souffre d'un manque de tailleurs capables de garantir une qualité de finition internationale et un respect contractuel des délais de livraison. Cette instabilité chronique dégrade la confiance des clients et limite le potentiel de croissance du secteur de la mode de luxe.",solution: "Sartoria Ndoye propose un atelier de haute couture qui combine le savoir-faire ancestral de Saint-Louis avec des processus industriels de précision. Nous garantissons une expérience client exclusive, avec une traçabilité totale et des finitions 'Zéro Défaut'.",targetAudience: "Haute bourgeoisie sénégalaise, cadres dirigeants et diaspora en Europe, soit un segment de plus de 500 000 personnes à fort pouvoir d'achat.",businessModel: "Modèle de revenus direct basé sur une tarification premium (150k - 500k FCFA) générant une marge brute confortable, complété par un service VIP et numérique.",callToAction: "Découvrez l'élégance Ndoye et planifiez votre séance de mesures.",mainImage: "https://via.placeholder.com/1024x1024.png?text=Sartoria+Ndoye+Premium"}) as any;}if (schema === PitchDeckSchema) {if (isCereal) {return schema.parse({title: "Grains de Kaolack : Révolutionner la Consommation de Mil",subtitle: "Innovation, Nutrition et Souveraineté Alimentaire",slides: [{ title: "Couverture", content: ["Grains de Kaolack", "Transformation de céréales locales pré-cuites", "Kaolack, Sénégal"], notes: "Intro." },{ title: "Le Problème", content: ["Dépendance excessive aux importations de riz au Sénégal.", "Temps de préparation trop long des céréales traditionnelles.", "Perte de valeur nutritionnelle due aux méthodes artisanales."], notes: "Pain point." },{ title: "La Solution", content: ["Unité de transformation semi-industrielle à Kaolack.", "Céréales pré-cuites prêtes en 5 minutes chrono.", "Conditionnement hermétique garantissant 12 mois de conservation."], notes: "Solution." },{ title: "Le Produit", content: ["Couscous de mil enrichi à la poudre de baobab.", "Arraw de maïs local sans additifs chimiques.", "Thiakry prêt à l'emploi pour le petit-déjeuner."], notes: "Gamme." },{ title: "Marché (TAM)", content: ["Habilitants Kaolack: 300,000 consommateurs directs.", "Marché des céréales à Dakar: 120 Mds FCFA.", "Cible: 10% du marché des produits pré-cuits."], notes: "Data ANSD.", visualType: "PIE_CHART", visualData: { labels: ["Total", "Cible", "SOM"], values: [100, 30, 10] } },{ title: "Business Model", content: ["Vente directe en boutiques de quartier (Proximité).", "Contrats de distribution avec supermarchés Auchan/Casino.", "Marge nette de 25% sur chaque sachet vendu."], notes: "B-Model." },{ title: "Traction", content: ["Phase pilote réussie avec 200 ménages à Kaolack.", "Référencement en cours dans 5 supérettes locales.", "Certification FRA (Fabrication Française) obtenue."], notes: "Validation." },{ title: "Go-to-Market", content: ["Dégustations sur les marchés hebdomadaires (Loumas).", "Partenariats avec les cantines scolaires rurales.", "Publicité radio en wolof ciblant les mères de famille."], notes: "Growth." },{ title: "Concurrence", content: ["Vs Importateurs: On valorise le produit national.", "Vs Artisans: On garantit l'hygiène et la rapidité.", "Avantage: Maîtrise totale de la source (Bassin Arachidier)."], notes: "Edge." },{ title: "Équipe", content: ["M. Touré (Directeur, 15 ans agro-industrie).", "Responsable Production (Experte en procédés locaux).", "Réseau de 20 femmes pour le tri et le nettoyage."], notes: "People." },{ title: "Finances", content: ["Chiffre d'affaires Y1 estimé à 12M FCFA.", "Rentabilité atteinte dès le 14ème mois.", "Projection Y5: Leader régional du pré-cuit."], notes: "Financials.", visualType: "BAR_CHART", visualData: { labels: ["Y1", "Y2", "Y3", "Y4", "Y5"], values: [12, 18, 28, 40, 55] } },{ title: "L'Appel (The Ask)", content: ["Besoin: 8M FCFA (Machines à emballer, Broyeurs).", "60% Capacité / 20% Marketing / 20% R&D.", "Impact: Production x3 et réduction des Ñàkk (pertes)."], notes: "The Ask." },{ title: "Contact", content: ["Kaolack, Quartier Léona - Sénégal.", "@grainsdekaolack - Qualité, Santé, Nation.", "Contact@grainsdekaolack.sn"], notes: "End." }]}) as any;}if (isFish) {return schema.parse({title: "Délices de Kayar : Révolutionner la Transformation Halieutique",subtitle: "Qualité, Tradition et Innovation au Service du Sénégal",slides: [{ title: "Couverture", content: ["Délices de Kayar", "Transformation de produits halieutiques", "Kayar, Sénégal"], notes: "Intro." },{ title: "Le Problème", content: ["Pertes post-capture élevées à Kayar.", "Méthodes traditionnelles peu hygiéniques.", "Faible valeur ajoutée locale impacts."], notes: "Pain point." },{ title: "La Solution", content: ["Unité de transformation moderne et propre.", "Séchage et fumage contrôlés en inox.", "Packaging premium et traçabilité certifiée."], notes: "Solution." },{ title: "Marché (TAM)", content: ["Population Dakar: 4,4M consommateurs.", "Marché local: 50 Mds FCFA / an.", "Cible: 5% du marché premium dakarois."], notes: "Data Direction des Pêches.", visualType: "PIE_CHART", visualData: { labels: ["National", "Cible", "SOM"], values: [100, 20, 5] } },{ title: "Contact", content: ["Site de Kayar, Thiès - Sénégal.", "+221 77 000 00 02", "www.delicesdekayar.sn"], notes: "End." }]}) as any;}// Default or Couture (High Density)const mockDeck = {title: "Sartoria Ndoye : L'Excellence de la Haute Couture",subtitle: "Un Standard Institutionnel pour l'Héritage et l'Innovation",slides: [{ title: "Couverture", content: ["Sartoria Ndoye : Maison de Haute Couture de luxe.", "Pont entre héritage et standards mondiaux.", "Exclusivité et prestige pour clientèle exigeante."], notes: "Intro." },{ title: "Le Problème", content: ["Instabilité des délais de livraison artisanaux.", "Absence de standardisation haut de gamme.", "Manque de professionnalisme en gestion VIP."], notes: "Pain point." },{ title: "La Solution", content: ["Atelier de précision indus-artisanal.", "Garantie contractuelle de ponctualité.", "Standard 'Luxe Ndoye' avec charte qualité."], notes: "Solution." },{ title: "Produits", content: ["Boubous Bazin Riche broderies complexes.", "Costumes sur mesure coupes modernes.", "Accessoires exclusifs identité visuelle."], notes: "Gamme." },{ title: "Marché", content: ["Potentiel habillement luxe: Milliards FCFA.", "Cible Dakar: 4,4M d'habitants premium.", "Objectif: 15% pénétration segment luxe."], notes: "ASND 2023.", visualType: "PIE_CHART", visualData: { labels: ["National", "Premium", "Sartoria"], values: [100, 35, 15] } },{ title: "Business Model", content: ["Prix Premium (150k - 500k FCFA).", "Ventes Showroom et Instagram VIP.", "Optimisation coûts matières nobles."], notes: "Rentabilité." },{ title: "Traction", content: ["100 clients VIP fidélisés An 1.", "Accord fournisseurs tissus Mali/Europe.", "Pré-commandes record collection Tabaski."], notes: "Preuves." },{ title: "Marketing", content: ["Campagnes Instagram immersives.", "Réseau diplomatique et cadres privés.", "Lancements exclusifs Saint-Louis/Dakar."], notes: "Growth." },{ title: "Concurrence", content: ["Vs Couture Ndar: Rigueur et délais.", "Machines numériques pour broderie rapide.", "Techniques de finition artisanales secrètes."], notes: "Unfair advantage." },{ title: "Équipe", content: ["M. Ndoye (20 ans exp. Haute Couture).", "Chef d'atelier gestion indus.", "Tailleurs formés aux standards mondiaux."], notes: "Expertise." },{ title: "Finances", content: ["Croissance CA prévue: +45% / an.", "Objectif Y3: 25M FCFA.", "Amélioration EBITDA par indus."], notes: "5 ans.", visualType: "BAR_CHART", visualData: { labels: ["Y1", "Y2", "Y3", "Y4", "Y5"], values: [8.5, 12, 18, 25, 35] } },{ title: "L'Appel (The Ask)", content: ["Besoin: 5M FCFA (Machines numériques).", "60% Équipement / 20% FR / 20% Marketing.", "Impact: Capacité +40%, Coût -15%."], notes: "Ask." },{ title: "Contact", content: ["Cœur de Saint-Louis, Sénégal.", "@sartoriandoye", "Prestige, Tradition, Innovation."], notes: "End." }]};return schema.parse(mockDeck) as any;}if (schema === PersonalizedLessonSchema) {3 unmodified lines}if (schema === FeedbackSchema) {return schema.parse({isQualified: true,praise: "Excellent travail ! Ta vision est claire et ambitieuse.",rephrase: "Tu proposes donc une solution innovante pour le marché local.",action: "Continue ainsi pour l'étape suivante !",confidence: 95,notes: "Réponse solide.",missingElements: []}) as any;}throw new Error("MockLLMProvider does not support this schema.");1234567897 unmodified lines1718192021222324252627282930313 unmodified lines35363738394041import { LLMProvider, OnePagerSchema, PitchDeckSchema, PersonalizedLessonSchema, FeedbackSchema } from './types';import {MOCK_ONE_PAGER_CEREAL, MOCK_ONE_PAGER_FISH, MOCK_ONE_PAGER_COUTURE,MOCK_DECK_CEREAL, MOCK_DECK_FISH, MOCK_DECK_COUTURE,MOCK_FEEDBACK} from './__fixtures__/mock-data';/*** A Provider for local development that doesn't require an API Key.7 unmodified linesconst isCereal = prompt.includes('Kaolack') || prompt.includes('Céréales') || prompt.includes('mils');if (schema === OnePagerSchema) {if (isCereal) return schema.parse(MOCK_ONE_PAGER_CEREAL) as any;if (isFish) return schema.parse(MOCK_ONE_PAGER_FISH) as any;return schema.parse(MOCK_ONE_PAGER_COUTURE) as any;}if (schema === PitchDeckSchema) {if (isCereal) return schema.parse(MOCK_DECK_CEREAL) as any;if (isFish) return schema.parse(MOCK_DECK_FISH) as any;return schema.parse(MOCK_DECK_COUTURE) as any;}if (schema === PersonalizedLessonSchema) {3 unmodified lines}if (schema === FeedbackSchema) {return schema.parse(MOCK_FEEDBACK) as any;}throw new Error("MockLLMProvider does not support this schema.");
50 unmodified lines51525354555657585923 unmodified lines83848586878889909192939495969711 unmodified lines10911011111211311411511613 unmodified lines13013113213313413513650 unmodified linesconst result = completion.choices[0]?.message?.parsed;if (!result) throw new Error('OpenAI failed to return parsed structured data.');return result as T;} catch (err: any) {if (err?.status === 429 || err?.code === 'insufficient_quota') {const retryAfter = parseInt(err?.headers?.['retry-after'] || '120', 10) * 1000;console.warn(`[OPENAI] 429 quota exceeded. Retry after ${retryAfter}ms`);throw new QuotaExceededError(retryAfter);}23 unmodified lines}return { text: response.text, confidence };} catch (err: any) {console.error('[OPENAI] ❌ Connection or API Error:', {name: err?.name,message: err?.message,status: err?.status,code: err?.code,stack: err?.stack});if (err?.status === 429 || err?.code === 'insufficient_quota') {console.warn('[OPENAI] 429 on transcribeAudio');throw new QuotaExceededError();}11 unmodified linesinput: text,});return Buffer.from(await mp3.arrayBuffer());} catch (err: any) {if (err?.status === 429 || err?.code === 'insufficient_quota') {console.warn('[OPENAI] 429 on generateSpeech');throw new QuotaExceededError();}13 unmodified linesresponse_format: "url"});return response.data?.[0]?.url || '';} catch (err: any) {console.error('[OPENAI] Image generation failed:', err);return '';}50 unmodified lines51525354555657585923 unmodified lines83848586878889909192939495969711 unmodified lines10911011111211311411511613 unmodified lines13013113213313413513650 unmodified linesconst result = completion.choices[0]?.message?.parsed;if (!result) throw new Error('OpenAI failed to return parsed structured data.');return result as T;} catch (err: unknown) {if ((err as any)?.status === 429 || (err as any)?.code === 'insufficient_quota') {const retryAfter = parseInt((err as any)?.headers?.['retry-after'] || '120', 10) * 1000;console.warn(`[OPENAI] 429 quota exceeded. Retry after ${retryAfter}ms`);throw new QuotaExceededError(retryAfter);}23 unmodified lines}return { text: response.text, confidence };} catch (err: unknown) {console.error('[OPENAI] ❌ Connection or API Error:', {name: (err as any)?.name,message: (err as any)?.message,status: (err as any)?.status,code: (err as any)?.code,stack: (err as any)?.stack});if ((err as any)?.status === 429 || (err as any)?.code === 'insufficient_quota') {console.warn('[OPENAI] 429 on transcribeAudio');throw new QuotaExceededError();}11 unmodified linesinput: text,});return Buffer.from(await mp3.arrayBuffer());} catch (err: unknown) {if ((err as any)?.status === 429 || (err as any)?.code === 'insufficient_quota') {console.warn('[OPENAI] 429 on generateSpeech');throw new QuotaExceededError();}13 unmodified linesresponse_format: "url"});return response.data?.[0]?.url || '';} catch (err: unknown) {console.error('[OPENAI] Image generation failed:', err);return '';}
45 unmodified lines464748495051525345 unmodified linessnippet: r.snippet,link: r.link}));} catch (err: any) {console.error('[SEARCH_SERVICE] Search failed:', err.message);return [];}}45 unmodified lines464748495051525345 unmodified linessnippet: r.snippet,link: r.link}));} catch (err: unknown) {console.error('[SEARCH_SERVICE] Search failed:', (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)));return [];}}
44 unmodified lines454647484950515232 unmodified lines858687888990919244 unmodified lines} else {console.log(`[Storage] ✅ Verified public access: ${finalUrl}`);}} catch (err: any) {console.warn(`[Storage] ⚠️ Could not verify public access for ${finalUrl}: ${err.message}`);}return finalUrl;32 unmodified linesif (isR2Configured()) {try {return await uploadToR2(buffer, uniqueName, contentType);} catch (err: any) {console.error(`[Storage] R2 Upload Failed: ${err.message}. Falling back to local.`);}}return saveLocally(buffer, uniqueName);44 unmodified lines454647484950515232 unmodified lines858687888990919244 unmodified lines} else {console.log(`[Storage] ✅ Verified public access: ${finalUrl}`);}} catch (err: unknown) {console.warn(`[Storage] ⚠️ Could not verify public access for ${finalUrl}: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);}return finalUrl;32 unmodified linesif (isR2Configured()) {try {return await uploadToR2(buffer, uniqueName, contentType);} catch (err: unknown) {console.error(`[Storage] R2 Upload Failed: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}. Falling back to local.`);}}return saveLocally(buffer, uniqueName);
66 unmodified lines676869707172737466 unmodified linessignature,this.webhookSecret);} catch (err: any) {throw new Error(`Webhook Error: ${err.message}`);}}}66 unmodified lines676869707172737466 unmodified linessignature,this.webhookSecret);} catch (err: unknown) {throw new Error(`Webhook Error: ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))}`);}}}
63 unmodified lines646566676869707158 unmodified lines13013113213313413513613713813914014114214314414514663 unmodified linesuserId: user.id}});} catch (err: any) {console.error('[WhatsAppService] Failed to log incoming message:', err.message);}// 1.5. Testing / Cheat Codes (Only for registered users)58 unmodified linesawait (prisma as any).businessProfile.deleteMany({ where: { userId: user.id } });await prisma.user.update({ where: { id: user.id }, data: { activity: null } });console.log(`[SEED] Cleared cognitive cache for User ${user.id}`);} catch (cacheErr: any) {console.error('[SEED] Failed to clear cognitive cache:', cacheErr.message);}await scheduleMessage(user.id, result.seeded? "✅ Seeding terminé ! Le Cache Cognitif a été réinitialisé.\nEnvoie INSCRIPTION pour commencer.": "ℹ️ Les données existent déjà. Cache Cognitif purgé. Envoie INSCRIPTION.");} catch (err: any) {console.error('[SEED] Error:', err.message);await scheduleMessage(user.id, `❌ Erreur seed : ${err.message?.substring(0, 200)}`);}return;}63 unmodified lines646566676869707158 unmodified lines13013113213313413513613713813914014114214314414514663 unmodified linesuserId: user.id}});} catch (err: unknown) {console.error('[WhatsAppService] Failed to log incoming message:', (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)));}// 1.5. Testing / Cheat Codes (Only for registered users)58 unmodified linesawait (prisma as any).businessProfile.deleteMany({ where: { userId: user.id } });await prisma.user.update({ where: { id: user.id }, data: { activity: null } });console.log(`[SEED] Cleared cognitive cache for User ${user.id}`);} catch (cacheErr: unknown) {console.error('[SEED] Failed to clear cognitive cache:', (cacheErr as Error).message);}await scheduleMessage(user.id, result.seeded? "✅ Seeding terminé ! Le Cache Cognitif a été réinitialisé.\nEnvoie INSCRIPTION pour commencer.": "ℹ️ Les données existent déjà. Cache Cognitif purgé. Envoie INSCRIPTION.");} catch (err: unknown) {console.error('[SEED] Error:', (err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err)));await scheduleMessage(user.id, `❌ Erreur seed : ${(err instanceof Error ? (err instanceof Error ? err.message : String(err)) : String(err))?.substring(0, 200)}`);}return;}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103import { describe, it, expect, beforeAll } from 'vitest';import { PrismaClient } from '@prisma/client';import { aiService } from '../../src/services/ai';import * as path from 'path';import * as dotenv from 'dotenv';
dotenv.config({ path: path.join(__dirname, '../../../../../.env') });
const prisma = new PrismaClient();const KAOLACK_PHONE = '221770000003';
describe('Kaolack Elite Journey Simulation', () => { let trackId: string; let userId: string;
beforeAll(async () => { // 1. Cleanup before test await prisma.userProgress.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.response.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.enrollment.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.message.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.businessProfile.deleteMany({ where: { user: { phone: KAOLACK_PHONE } } }); await prisma.user.deleteMany({ where: { phone: KAOLACK_PHONE } });
const track = await prisma.track.findFirst({ where: { language: 'FR', title: { contains: "Comprendre" } } }); if (!track) throw new Error("Track T1-FR non trouvé."); trackId = track.id;
// 2. User Creation (Grains de Kaolack) const user = await prisma.user.create({ data: { phone: KAOLACK_PHONE, name: 'Grains de Kaolack', language: 'FR', activity: 'Transformation de céréales locales (Mil, Maïs)', city: 'Kaolack', businessProfile: { create: { activityLabel: 'Grains de Kaolack - Transformation Céréalière', locationCity: 'Kaolack', marketData: { source: "ANSD 2023", population_kaolack: "300,000", } as any, competitorList: ["Importations riz/blé"], financialProjections: { revenueY1: "12 000 000 FCFA" }, fundingAsk: "8 000 000 FCFA pour automatisation" } } } as any, include: { businessProfile: true } as any }) as any; userId = user.id;
// Mock an enrollment await prisma.enrollment.create({ data: { userId, trackId, status: 'COMPLETED', currentDay: 13 } as any }); });
it('should generate high-density Pitch Deck data from business profile', async () => { const user = await prisma.user.findUnique({ where: { id: userId }, include: { businessProfile: true } }) as any;
const userContext = `AUDIT : Transformation de Céréales à Kaolack.`; const deckData = await aiService.generatePitchDeckData(userContext, 'FR', user.businessProfile);
// Verify Genspark-Standard Requirements are met in the generation: expect(deckData).toBeDefined();
// Ensure no arrays of weak points - strict storytelling check via length/content expect(deckData.slides.length).toBeGreaterThan(5);
const marketSlide = deckData.slides.find(s => s.title.toLowerCase().includes('marché') || s.title.toLowerCase().includes('market')); expect(marketSlide).toBeDefined();
// The market slide must mention Kaolack sourced from ANSD const marketContent = ((marketSlide?.content || []).join(' ') + ' ' + (marketSlide?.notes || '')).toLowerCase(); expect(marketContent).toContain('ansd'); expect(marketContent).toContain('300,000'); }, 60000); // 60s timeout for OpenAI API call
it('should generate a One-Pager successfully', async () => { const user = await prisma.user.findUnique({ where: { id: userId }, include: { businessProfile: true } }) as any;
const userContext = `AUDIT : Kaolack Céréales.`; const pdfData = await aiService.generateOnePagerData(userContext, 'FR', user.businessProfile);
expect(pdfData).toBeDefined(); expect(pdfData.title).toBeDefined(); // Zod validation is implicitly guaranteed by the provider's `parse` returns if no exception is thrown. }, 60000);});1234567891011121314import { defineConfig } from 'vitest/config';
export default defineConfig({ test: { globals: true, environment: 'node', setupFiles: [], coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], }, testTimeout: 30000, },});123456789101112131415161718import * as fs from 'fs';import * as path from 'path';
function replaceInFile(filePath: string, replacements: [RegExp, string][]) { const fullPath = path.resolve(__dirname, '..', filePath); if (!fs.existsSync(fullPath)) return; let content = fs.readFileSync(fullPath, 'utf8'); for (const [regex, replacement] of replacements) { content = content.replace(regex, replacement); } fs.writeFileSync(fullPath, content); console.log(`Fixed: ${filePath}`);}
replaceInFile('src/whatsapp-cloud.ts', [ [/err\.response\?\.data\?\.error\?\.(?:message|error_user_msg)/g, '(err as any)?.response?.data?.error?.message']]);
106 unmodified lines10710810911011111211311449 unmodified lines16416516616716816917017117217317417517617734 unmodified lines2122132142152162172182192202212222232247 unmodified lines232233234235236237238239240241242243244245187 unmodified lines43343443543643743843944010 unmodified lines451452453454455456457458138 unmodified lines5975985996006016026036042 unmodified lines607608609610611612613614196 unmodified lines811812813814815106 unmodified linesconst errText = await feedbackRes.text();throw new Error(`generate-feedback failed HTTP ${feedbackRes.status}: ${errText}`);}} catch (err: any) {console.error(`[WORKER] generate-feedback failed:`, err.message);throw err;}49 unmodified lines? "Sa kàrdu business mu neex ! ✨": "Ta carte business personnalisée ! ✨";await sendImageMessage(user.phone, cardUrl, caption);} catch (vErr: any) {console.error('[WORKER] Pitch Card generation failed:', vErr.message);}}}}} catch (err: any) {console.error('[WORKER] BusinessProfile extraction failed:', err.message);}}34 unmodified lineswhere: { userId_trackId: { userId, trackId } },data: {exerciseStatus: 'PENDING_REMEDIATION', // Stay in remediation until final successscore: { increment: 0 },marketData: feedbackData?.searchResults,competitorList: (feedbackData as any)?.competitorList,financialProjections: (feedbackData as any)?.financialProjections,fundingAsk: (feedbackData as any)?.fundingAsk} as any});} else {// Success! Award Badges & Mark Completedconst trackDayBadges = (trackDay as any)?.badges as string[] || [];7 unmodified linesexerciseStatus: 'COMPLETED',score: { increment: 1 },badges: updatedBadges,behavioralScoring: updateBehavioralScore((currentProgress as any)?.behavioralScoring, (exerciseCriteria as any)?.scoring?.impact_success),marketData: feedbackData?.searchResults,competitorList: (feedbackData as any)?.competitorList,financialProjections: (feedbackData as any)?.financialProjections,fundingAsk: (feedbackData as any)?.fundingAsk} as any});// If we were in a remediation day (fractional) -> move to next integer dayif (currentDay % 1 !== 0) {nextDay = Math.floor(currentDay) + 1;187 unmodified linesconsole.log(`[R2] Inbound audio uploaded: ${audioUrl}`);}}} catch (err: any) {console.error('[WORKER] store-audio failed (inbound audio will not have a permanent link):', err.message);}// ─── Hardening: Record Inbound Message in DB ──────────10 unmodified lines}});console.log(`[DB] Recorded inbound audio message for ${phone}`);} catch (dbErr: any) {console.error('[DB] Failed to record inbound message:', dbErr.message);}}138 unmodified linesconsole.log(`${traceId} API handle-message success.`);}} catch (err: any) {console.error(`[WORKER] download-media failed for ${mediaId}:`, err.message);throw err;}}2 unmodified linestry {await sendImageMessage(to, imageUrl, caption || '');console.log(`[WhatsApp] ✅ Image message sent to ${to}`);} catch (err: any) {console.error(`[WORKER] send-image failed:`, err.message);}}else if (job.name === 'send-content') {196 unmodified lines});worker.on('failed', (job, err) => {console.error(`[WORKER] Job ${job?.id} has failed with ${err.message}`);});106 unmodified lines10710810911011111211311449 unmodified lines16416516616716816917017117217317417517617734 unmodified lines2122132142152162172182192202212222232242252262272282292302312322332342357 unmodified lines243244245246247248249250251252253254255256257258259260261262263264265266267187 unmodified lines45545645745845946046146210 unmodified lines473474475476477478479480138 unmodified lines6196206216226236246256262 unmodified lines629630631632633634635636196 unmodified lines833834835836837106 unmodified linesconst errText = await feedbackRes.text();throw new Error(`generate-feedback failed HTTP ${feedbackRes.status}: ${errText}`);}} catch (err: unknown) {console.error(`[WORKER] generate-feedback failed:`, (err instanceof Error ? err.message : String(err)));throw err;}49 unmodified lines? "Sa kàrdu business mu neex ! ✨": "Ta carte business personnalisée ! ✨";await sendImageMessage(user.phone, cardUrl, caption);} catch (vErr: unknown) {console.error('[WORKER] Pitch Card generation failed:', (vErr as any)?.message);}}}}} catch (err: unknown) {console.error('[WORKER] BusinessProfile extraction failed:', (err instanceof Error ? err.message : String(err)));}}34 unmodified lineswhere: { userId_trackId: { userId, trackId } },data: {exerciseStatus: 'PENDING_REMEDIATION', // Stay in remediation until final successscore: { increment: 0 }} as any});// 🚨 Store Strategy Data in BusinessProfileif (feedbackData?.searchResults || (feedbackData as any)?.competitorList || (feedbackData as any)?.financialProjections || (feedbackData as any)?.fundingAsk) {const updatePayload: any = { lastUpdatedFromDay: currentDay };if (feedbackData?.searchResults) updatePayload.marketData = feedbackData.searchResults;if ((feedbackData as any)?.competitorList) updatePayload.competitorList = (feedbackData as any).competitorList;if ((feedbackData as any)?.financialProjections) updatePayload.financialProjections = (feedbackData as any).financialProjections;if ((feedbackData as any)?.fundingAsk) updatePayload.fundingAsk = (feedbackData as any).fundingAsk;await (prisma as any).businessProfile.upsert({where: { userId },update: updatePayload,create: { userId, ...updatePayload }});}} else {// Success! Award Badges & Mark Completedconst trackDayBadges = (trackDay as any)?.badges as string[] || [];7 unmodified linesexerciseStatus: 'COMPLETED',score: { increment: 1 },badges: updatedBadges,behavioralScoring: updateBehavioralScore((currentProgress as any)?.behavioralScoring, (exerciseCriteria as any)?.scoring?.impact_success)} as any});// 🚨 Store Strategy Data in BusinessProfileif (feedbackData?.searchResults || (feedbackData as any)?.competitorList || (feedbackData as any)?.financialProjections || (feedbackData as any)?.fundingAsk) {const updatePayload: any = { lastUpdatedFromDay: currentDay };if (feedbackData?.searchResults) updatePayload.marketData = feedbackData.searchResults;if ((feedbackData as any)?.competitorList) updatePayload.competitorList = (feedbackData as any).competitorList;if ((feedbackData as any)?.financialProjections) updatePayload.financialProjections = (feedbackData as any).financialProjections;if ((feedbackData as any)?.fundingAsk) updatePayload.fundingAsk = (feedbackData as any).fundingAsk;await (prisma as any).businessProfile.upsert({where: { userId },update: updatePayload,create: { userId, ...updatePayload }});}// If we were in a remediation day (fractional) -> move to next integer dayif (currentDay % 1 !== 0) {nextDay = Math.floor(currentDay) + 1;187 unmodified linesconsole.log(`[R2] Inbound audio uploaded: ${audioUrl}`);}}} catch (err: unknown) {console.error('[WORKER] store-audio failed (inbound audio will not have a permanent link):', (err instanceof Error ? err.message : String(err)));}// ─── Hardening: Record Inbound Message in DB ──────────10 unmodified lines}});console.log(`[DB] Recorded inbound audio message for ${phone}`);} catch (dbErr: unknown) {console.error('[DB] Failed to record inbound message:', (dbErr as any)?.message);}}138 unmodified linesconsole.log(`${traceId} API handle-message success.`);}} catch (err: unknown) {console.error(`[WORKER] download-media failed for ${mediaId}:`, (err instanceof Error ? err.message : String(err)));throw err;}}2 unmodified linestry {await sendImageMessage(to, imageUrl, caption || '');console.log(`[WhatsApp] ✅ Image message sent to ${to}`);} catch (err: unknown) {console.error(`[WORKER] send-image failed:`, (err instanceof Error ? err.message : String(err)));}}else if (job.name === 'send-content') {196 unmodified lines});worker.on('failed', (job, err) => {console.error(`[WORKER] Job ${job?.id} has failed with ${(err instanceof Error ? err.message : String(err))}`);});
165 unmodified lines16616716816917017117217323 unmodified lines19719819920020120220320437 unmodified lines242243244245246247248249165 unmodified linestry {await sendVideoMessage(user.phone, vUrl, vCaption);console.log(`[VIDEO_OK] WhatsApp accepted video for ${user.phone}`);} catch (vErr: any) {console.warn(`[VIDEO_FALLBACK] reason=${vErr.message}. Sending image fallback for ${user.phone}`);// Fallback: Image + Link + "Clique pour regarder"const fallbackText = isWolof23 unmodified linesconsole.log(`[PEDAGOGY] Missing imageUrl on Day ${dayNumber}! Using fallback: ${fallbackImageUrl}`);try {await sendImageMessage(user.phone, fallbackImageUrl);} catch (e: any) {console.warn(`[PEDAGOGY] Fallback image also failed: ${e.message}`);}}37 unmodified linesmediaUrl: finalAudioUrl}});} catch (dbErr: any) {console.error('[DB] Failed to record outbound audio:', dbErr.message);}// Send the text as a separate short message165 unmodified lines16616716816917017117217323 unmodified lines19719819920020120220320437 unmodified lines242243244245246247248249165 unmodified linestry {await sendVideoMessage(user.phone, vUrl, vCaption);console.log(`[VIDEO_OK] WhatsApp accepted video for ${user.phone}`);} catch (vErr: unknown) {console.warn(`[VIDEO_FALLBACK] reason=${(vErr as any)?.message}. Sending image fallback for ${user.phone}`);// Fallback: Image + Link + "Clique pour regarder"const fallbackText = isWolof23 unmodified linesconsole.log(`[PEDAGOGY] Missing imageUrl on Day ${dayNumber}! Using fallback: ${fallbackImageUrl}`);try {await sendImageMessage(user.phone, fallbackImageUrl);} catch (e: unknown) {console.warn(`[PEDAGOGY] Fallback image also failed: ${(e instanceof Error ? e.message : String(e))}`);}}37 unmodified linesmediaUrl: finalAudioUrl}});} catch (dbErr: unknown) {console.error('[DB] Failed to record outbound audio:', (dbErr as any)?.message);}// Send the text as a separate short message
49 unmodified lines505152535455565724 unmodified lines828384858687888925 unmodified lines11511611711811912012112219 unmodified lines14214314414514614714814920 unmodified lines17017117217317417517617738 unmodified lines21621721821922022122222347 unmodified lines27127227327427527627727827949 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendTextMessage failed: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Text message sent to ${to}`);24 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendImageMessage failed for URL [${imageUrl}]: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Image message sent to ${to}`);25 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendDocumentMessage failed: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Document "${filename}" sent to ${to}`);19 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendAudioMessage failed for URL [${audioUrl}]: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Audio message sent to ${to}`);20 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendVideoMessage failed for URL [${videoUrl}]: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Video message sent to ${to}`);38 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: any) {throw new Error(`[WhatsApp] sendInteractiveButtonMessage failed: ${err.response?.data?.error?.message || err.message}`);}console.log(`[WhatsApp] ✅ Interactive message sent to ${to}`);47 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });console.log(`[WhatsApp] ✅ List message sent to ${to}`);} catch (err: any) {// Fallback to text if interactive list fails (e.g., WhatsApp doesn't support it)console.warn(`[WhatsApp] List message failed, falling back to text: ${err.response?.data?.error?.message || err.message}`);const fallback = sections.flatMap(s => s.rows.map((r, i) => `${i + 1}. ${r.title}`)).join('\n');await sendTextMessage(to, `${bodyText}\n\n${fallback}`);}49 unmodified lines505152535455565724 unmodified lines828384858687888925 unmodified lines11511611711811912012112219 unmodified lines14214314414514614714814920 unmodified lines17017117217317417517617738 unmodified lines21621721821922022122222347 unmodified lines27127227327427527627727827949 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendTextMessage failed: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Text message sent to ${to}`);24 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendImageMessage failed for URL [${imageUrl}]: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Image message sent to ${to}`);25 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendDocumentMessage failed: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Document "${filename}" sent to ${to}`);19 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendAudioMessage failed for URL [${audioUrl}]: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Audio message sent to ${to}`);20 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendVideoMessage failed for URL [${videoUrl}]: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Video message sent to ${to}`);38 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });} catch (err: unknown) {throw new Error(`[WhatsApp] sendInteractiveButtonMessage failed: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);}console.log(`[WhatsApp] ✅ Interactive message sent to ${to}`);47 unmodified linestry {await axios.post(getBaseUrl(), body, { headers: getHeaders() });console.log(`[WhatsApp] ✅ List message sent to ${to}`);} catch (err: unknown) {// Fallback to text if interactive list fails (e.g., WhatsApp doesn't support it)console.warn(`[WhatsApp] List message failed, falling back to text: ${(err as any)?.response?.data?.error?.message || (err instanceof Error ? err.message : String(err))}`);const fallback = sections.flatMap(s => s.rows.map((r, i) => `${i + 1}. ${r.title}`)).join('\n');await sendTextMessage(to, `${bodyText}\n\n${fallback}`);}
9 unmodified lines101112131415161718192021229 unmodified lines"scripts": {"db:push": "prisma db push","db:studio": "prisma studio","generate": "prisma generate"},"prisma": {"seed": "tsx seed.ts"},"dependencies": {"@prisma/client": "^5.0.0"},"devDependencies": {"@repo/tsconfig": "workspace:*",9 unmodified lines1011121314151617181920212223249 unmodified lines"scripts": {"db:push": "prisma db push","db:studio": "prisma studio","generate": "prisma generate","validate:content": "ts-node scripts/validate-content.ts"},"prisma": {"seed": "tsx seed.ts"},"dependencies": {"@prisma/client": "^5.0.0","zod": "^4.3.6"},"devDependencies": {"@repo/tsconfig": "workspace:*",
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246-- CreateEnumCREATE TYPE "Role" AS ENUM ('STUDENT', 'ADMIN');
-- CreateEnumCREATE TYPE "EnrollmentStatus" AS ENUM ('ACTIVE', 'COMPLETED', 'DROPPED');
-- CreateEnumCREATE TYPE "Language" AS ENUM ('FR', 'WOLOF');
-- CreateEnumCREATE TYPE "ContentType" AS ENUM ('TEXT', 'AUDIO', 'IMAGE', 'VIDEO');
-- CreateEnumCREATE TYPE "Direction" AS ENUM ('INBOUND', 'OUTBOUND');
-- CreateEnumCREATE TYPE "PaymentStatus" AS ENUM ('PENDING', 'COMPLETED', 'FAILED', 'REFUNDED');
-- CreateEnumCREATE TYPE "ExerciseType" AS ENUM ('TEXT', 'AUDIO', 'BUTTON');
-- CreateEnumCREATE TYPE "ExerciseStatus" AS ENUM ('PENDING', 'PENDING_REMEDIATION', 'PENDING_REVIEW', 'COMPLETED');
-- CreateEnumCREATE TYPE "TrainingStatus" AS ENUM ('PENDING', 'REVIEWED', 'IGNORED');
-- CreateTableCREATE TABLE "User" ( "id" TEXT NOT NULL, "phone" TEXT NOT NULL, "name" TEXT, "role" "Role" NOT NULL DEFAULT 'STUDENT', "language" "Language" NOT NULL DEFAULT 'FR', "city" TEXT, "activity" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, "currentStreak" INTEGER NOT NULL DEFAULT 0, "longestStreak" INTEGER NOT NULL DEFAULT 0, "lastActivityAt" TIMESTAMP(3),
CONSTRAINT "User_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "BusinessProfile" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "activityLabel" TEXT, "activityPhrase" TEXT, "activityType" TEXT, "locationCity" TEXT, "mainCustomer" TEXT, "mainProblem" TEXT, "offerSimple" TEXT, "promise" TEXT, "marketData" JSONB, "competitorList" JSONB, "financialProjections" JSONB, "fundingAsk" TEXT, "lastUpdatedFromDay" INTEGER NOT NULL DEFAULT 0, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "BusinessProfile_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "Track" ( "id" TEXT NOT NULL, "title" TEXT NOT NULL, "description" TEXT, "duration" INTEGER NOT NULL, "language" "Language" NOT NULL DEFAULT 'FR', "isPremium" BOOLEAN NOT NULL DEFAULT false, "priceAmount" INTEGER, "stripePriceId" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Track_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "TrackDay" ( "id" TEXT NOT NULL, "trackId" TEXT NOT NULL, "dayNumber" DOUBLE PRECISION NOT NULL, "title" TEXT, "audioUrl" TEXT, "imageUrl" TEXT, "videoUrl" TEXT, "videoCaption" TEXT, "lessonText" TEXT, "exerciseType" "ExerciseType" NOT NULL DEFAULT 'TEXT', "exercisePrompt" TEXT, "validationKeyword" TEXT, "buttonsJson" JSONB, "exerciseCriteria" JSONB, "badges" JSONB, "unlockCondition" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "TrackDay_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "UserProgress" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "trackId" TEXT NOT NULL, "score" INTEGER NOT NULL DEFAULT 0, "lastInteraction" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "exerciseStatus" "ExerciseStatus" NOT NULL DEFAULT 'PENDING', "badges" JSONB, "behavioralScoring" JSONB, "confidenceScore" DOUBLE PRECISION, "adminTranscription" TEXT, "overrideAudioUrl" TEXT, "reviewedBy" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "UserProgress_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "Enrollment" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "trackId" TEXT NOT NULL, "status" "EnrollmentStatus" NOT NULL DEFAULT 'ACTIVE', "currentDay" DOUBLE PRECISION NOT NULL DEFAULT 1, "startedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "completedAt" TIMESTAMP(3), "lastActivityAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Enrollment_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "Response" ( "id" TEXT NOT NULL, "enrollmentId" TEXT NOT NULL, "userId" TEXT NOT NULL, "dayNumber" INTEGER NOT NULL, "content" TEXT, "mediaUrl" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Response_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "Message" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "direction" "Direction" NOT NULL, "channel" TEXT NOT NULL DEFAULT 'WHATSAPP', "content" TEXT, "mediaUrl" TEXT, "payload" JSONB, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "Message_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "Payment" ( "id" TEXT NOT NULL, "userId" TEXT NOT NULL, "trackId" TEXT NOT NULL, "amount" INTEGER NOT NULL, "currency" TEXT NOT NULL DEFAULT 'XOF', "status" "PaymentStatus" NOT NULL DEFAULT 'PENDING', "stripeSessionId" TEXT, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Payment_pkey" PRIMARY KEY ("id"));
-- CreateTableCREATE TABLE "TrainingData" ( "id" TEXT NOT NULL, "audioUrl" TEXT NOT NULL, "transcription" TEXT NOT NULL, "manualCorrection" TEXT, "rawWER" DOUBLE PRECISION, "normalizedWER" DOUBLE PRECISION, "status" "TrainingStatus" NOT NULL DEFAULT 'PENDING', "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "TrainingData_pkey" PRIMARY KEY ("id"));
-- CreateIndexCREATE UNIQUE INDEX "User_phone_key" ON "User"("phone");
-- CreateIndexCREATE UNIQUE INDEX "BusinessProfile_userId_key" ON "BusinessProfile"("userId");
-- CreateIndexCREATE UNIQUE INDEX "UserProgress_userId_trackId_key" ON "UserProgress"("userId", "trackId");
-- CreateIndexCREATE INDEX "Message_userId_createdAt_idx" ON "Message"("userId", "createdAt");
-- CreateIndexCREATE UNIQUE INDEX "Payment_stripeSessionId_key" ON "Payment"("stripeSessionId");
-- AddForeignKeyALTER TABLE "BusinessProfile" ADD CONSTRAINT "BusinessProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "TrackDay" ADD CONSTRAINT "TrackDay_trackId_fkey" FOREIGN KEY ("trackId") REFERENCES "Track"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "UserProgress" ADD CONSTRAINT "UserProgress_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "UserProgress" ADD CONSTRAINT "UserProgress_trackId_fkey" FOREIGN KEY ("trackId") REFERENCES "Track"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Enrollment" ADD CONSTRAINT "Enrollment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Enrollment" ADD CONSTRAINT "Enrollment_trackId_fkey" FOREIGN KEY ("trackId") REFERENCES "Track"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Response" ADD CONSTRAINT "Response_enrollmentId_fkey" FOREIGN KEY ("enrollmentId") REFERENCES "Enrollment"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Response" ADD CONSTRAINT "Response_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Message" ADD CONSTRAINT "Message_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Payment" ADD CONSTRAINT "Payment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKeyALTER TABLE "Payment" ADD CONSTRAINT "Payment_trackId_fkey" FOREIGN KEY ("trackId") REFERENCES "Track"("id") ON DELETE RESTRICT ON UPDATE CASCADE;123# Please do not edit this file manually# It should be added in your version-control system (i.e. Git)provider = "postgresql"41 unmodified lines42434445464759 unmodified lines10710810911011111211311411511611741 unmodified linesofferSimple String?promise String?marketData Json? // Stored Google Search results for TAM/SAM/SOM & CompetitionlastUpdatedFromDay Int @default(0)createdAt DateTime @default(now())updatedAt DateTime @updatedAt59 unmodified linesoverrideAudioUrl String?reviewedBy String?// Enriched Data for Pitch Deck (Sprint 34)marketData Json? // Stored Google Search results (TAM/SAM/SOM)competitorList Json? // List of rivals found or declaredfinancialProjections Json? // 3-year growth datafundingAsk String? // Amount and purposecreatedAt DateTime @default(now())updatedAt DateTime @updatedAt41 unmodified lines42434445464748495059 unmodified lines11011111211311411511641 unmodified linesofferSimple String?promise String?marketData Json? // Stored Google Search results for TAM/SAM/SOM & CompetitioncompetitorList Json? // List of rivals found or declaredfinancialProjections Json? // 3-year growth datafundingAsk String? // Amount and purposelastUpdatedFromDay Int @default(0)createdAt DateTime @default(now())updatedAt DateTime @updatedAt59 unmodified linesoverrideAudioUrl String?reviewedBy String?// Removed Enriched Data for Pitch Deck (Moved to BusinessProfile - Sprint 38)createdAt DateTime @default(now())updatedAt DateTime @updatedAt
1234567891011121314import { PrismaClient } from '@repo/database';import { seedDatabase } from './src/seed';const prisma = new PrismaClient();async function main() {console.log('🚀 Running seed runner...');const result = await seedDatabase(prisma);console.log(result.message);}main().catch(console.error).finally(() => prisma.$disconnect());1234import { PrismaClient } from '@prisma/client';import { seedDatabase } from './src/seed';const prisma = new PrismaClient();seedDatabase(prisma).then(r => { console.log(r); process.exit(0); }).catch(e => { console.error(e); process.exit(1); });
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100import * as fs from 'fs';import * as path from 'path';import { fileURLToPath } from 'url';import { z } from 'zod';
const __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);
const SuccessMustIncludeSchema = z.object({ id: z.string(), desc: z.string(), weight: z.number()});
const CriteriaSchema = z.object({ version: z.string().optional(), type: z.string().optional(), goal: z.string().optional(), success: z.object({ mustInclude: z.array(SuccessMustIncludeSchema), threshold: z.object({ minScore: z.number(), minMustPass: z.number() }).optional() }).optional(), evaluation: z.object({ tone: z.string().optional(), format: z.string().optional(), examples: z.string().optional() }).optional(), remediation: z.object({ dayNumber: z.number().optional(), hint: z.string().optional() }).optional()});
const TrackDaySchema = z.object({ dayNumber: z.number(), title: z.string(), lessonText: z.string(), exerciseType: z.string().optional(), exercisePrompt: z.string().optional(), exerciseCriteria: CriteriaSchema.optional(), buttonsJson: z.array(z.object({ id: z.string(), title: z.string() })).optional(), badges: z.array(z.string()).optional(), imageUrl: z.string().optional(), videoUrl: z.string().optional(), videoCaption: z.string().optional()});
const TrackSchema = z.object({ trackId: z.string(), title: z.string(), language: z.enum(['WOLOF', 'FR', 'EN']), description: z.string().optional(), totalDays: z.number().optional(), version: z.string().optional(), days: z.array(TrackDaySchema)});
function validateContent() { console.log('🔍 Starting Content Validation (Zod Pre-commit)...'); const contentDir = path.resolve(__dirname, '../content/tracks');
if (!fs.existsSync(contentDir)) { console.warn(`⚠️ Content directory not found: ${contentDir}`); return; }
const files = fs.readdirSync(contentDir).filter(f => f.endsWith('.json')); let hasErrors = false;
for (const file of files) { const filePath = path.join(contentDir, file); try { const fileContent = fs.readFileSync(filePath, 'utf-8'); const jsonData = JSON.parse(fileContent); const r = TrackSchema.safeParse(jsonData);
if (!r.success) { console.error(`❌ Validation Failed: ${file}`); r.error.issues.forEach((e: z.ZodIssue) => { console.error(` - Path: ${e.path.join('.')}`); console.error(` - Error: ${e.message}`); }); hasErrors = true; } else { console.log(`✅ Validated: ${file}`); } } catch (e: unknown) { hasErrors = true; console.error(`❌ Parse Error in ${file}: ${(e instanceof Error ? e.message : String(e))}`); } }
if (hasErrors) { process.exit(1); } else { console.log('🎉 All 10 JSON Track files are strictly valid Zod structures.'); }}
validateContent();138 unmodified lines13914014114214314414514614714814915089 unmodified lines240241242243244245285 unmodified lines5315325335345355366 unmodified lines5435445455465475486 unmodified lines5555565575585595606 unmodified lines5675685695705715726 unmodified lines5795805815825835846 unmodified lines5915925935945955966 unmodified lines6036046056066076086 unmodified lines6156166176186196206 unmodified lines6276286296306316326 unmodified lines6396406416426436446 unmodified lines6516526536546556566 unmodified lines6636646656666676686 unmodified lines6756766776786796806 unmodified lines6876886896906916926 unmodified lines6997007017027037046 unmodified lines7117127137147157166 unmodified lines7237247257267277286 unmodified lines7357367377387397406 unmodified lines7477487497507517526 unmodified lines7597607617627637646 unmodified lines7717727737747757766 unmodified lines7837847857867877886 unmodified lines795796797798799800217 unmodified lines101810191020102110221023371 unmodified lines1395139613971398139914009 unmodified lines14101411141214131414141543 unmodified lines14591460146114621463146449 unmodified lines151415151516151715181519128 unmodified lines164816491650165116521653131 unmodified lines17851786178717881789179012 unmodified lines18031804180518061807180812 unmodified lines1821182218231824182518265 unmodified lines18321833183418351836183759 unmodified lines1897189818991900190119022 unmodified lines190519061907190819091910245 unmodified lines21562157215821592160216124 unmodified lines21862187218821892190219162 unmodified lines22542255225622572258225935 unmodified lines229522962297229822992300254 unmodified lines25552556255725582559256024 unmodified lines25852586258725882589259025912592259359 unmodified lines26532654265526562657265826592660266126622 unmodified lines266526662667266826692670106 unmodified lines2777277827792780278127824 unmodified lines27872788278927902791279237 unmodified lines283028312832283328342835611 unmodified lines344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584172 unmodified lines375737583759376037613762452 unmodified lines42154216421742184219422017 unmodified lines42384239424042414242424354 unmodified lines42984299430043014302430338 unmodified lines434243434344434543464347138 unmodified lines448644874488448944904491108 unmodified lines46004601460246034604460556 unmodified lines4662466346644665466646678 unmodified lines4676467746784679468046814 unmodified lines46864687468846894690469181 unmodified lines4773477447754776477747784 unmodified lines478347844785478647874788245 unmodified lines50345035503650375038503919 unmodified lines50595060506150625063506451 unmodified lines51165117511851195120512148 unmodified lines517051715172517351745175307 unmodified lines54835484548554865487548824 unmodified lines55135514551555165517551855195520112 unmodified lines5633563456355636563756385639564056415642564356445645564656475648564969 unmodified lines5719572057215722572357243 unmodified lines57285729573057315732573328 unmodified lines576257635764138 unmodified lines'@types/node':specifier: ^20.0.0version: 20.19.33tsx:specifier: ^3.0.0version: 3.14.0typescript:specifier: ^5.0.0version: 5.9.3apps/web:dependencies:89 unmodified lines'@prisma/client':specifier: ^5.0.0version: 5.22.0(prisma@5.22.0)devDependencies:'@repo/tsconfig':specifier: workspace:*285 unmodified linescpu: [ppc64]os: [aix]'@esbuild/android-arm64@0.18.20':resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [android]'@esbuild/android-arm@0.18.20':resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}engines: {node: '>=12'}6 unmodified linescpu: [arm]os: [android]'@esbuild/android-x64@0.18.20':resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [android]'@esbuild/darwin-arm64@0.18.20':resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [darwin]'@esbuild/darwin-x64@0.18.20':resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [darwin]'@esbuild/freebsd-arm64@0.18.20':resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [freebsd]'@esbuild/freebsd-x64@0.18.20':resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [freebsd]'@esbuild/linux-arm64@0.18.20':resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [linux]'@esbuild/linux-arm@0.18.20':resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}engines: {node: '>=12'}6 unmodified linescpu: [arm]os: [linux]'@esbuild/linux-ia32@0.18.20':resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}engines: {node: '>=12'}6 unmodified linescpu: [ia32]os: [linux]'@esbuild/linux-loong64@0.18.20':resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}engines: {node: '>=12'}6 unmodified linescpu: [loong64]os: [linux]'@esbuild/linux-mips64el@0.18.20':resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}engines: {node: '>=12'}6 unmodified linescpu: [mips64el]os: [linux]'@esbuild/linux-ppc64@0.18.20':resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}engines: {node: '>=12'}6 unmodified linescpu: [ppc64]os: [linux]'@esbuild/linux-riscv64@0.18.20':resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}engines: {node: '>=12'}6 unmodified linescpu: [riscv64]os: [linux]'@esbuild/linux-s390x@0.18.20':resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}engines: {node: '>=12'}6 unmodified linescpu: [s390x]os: [linux]'@esbuild/linux-x64@0.18.20':resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [linux]'@esbuild/netbsd-x64@0.18.20':resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [netbsd]'@esbuild/openbsd-x64@0.18.20':resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [openbsd]'@esbuild/sunos-x64@0.18.20':resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [sunos]'@esbuild/win32-arm64@0.18.20':resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [win32]'@esbuild/win32-ia32@0.18.20':resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}engines: {node: '>=12'}6 unmodified linescpu: [ia32]os: [win32]'@esbuild/win32-x64@0.18.20':resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [win32]'@fastify/ajv-compiler@3.6.0':resolution: {integrity: sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ==}217 unmodified lines'@pinojs/redact@0.4.0':resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==}'@prisma/client@5.22.0':resolution: {integrity: sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==}engines: {node: '>=16.13'}371 unmodified linesresolution: {integrity: sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw==}engines: {node: '>=18.0.0'}'@tootallnate/quickjs-emscripten@0.23.0':resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}9 unmodified lines'@types/babel__traverse@7.28.0':resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}'@types/diff@8.0.0':resolution: {integrity: sha512-o7jqJM04gfaYrdCecCVMbZhNdG6T1MHg/oQoRFdERLV+4d+V7FijhiEAbFu0Usww84Yijk9yH58U4Jk4HbtzZw==}deprecated: This is a stub types definition. diff provides its own type definitions, so you do not need this installed.43 unmodified linespeerDependencies:vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0abort-controller@3.0.0:resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}engines: {node: '>=6.5'}49 unmodified linesargparse@2.0.1:resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}ast-types@0.13.4:resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==}engines: {node: '>=4'}128 unmodified linescaniuse-lite@1.0.30001770:resolution: {integrity: sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==}chokidar@3.6.0:resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}engines: {node: '>= 8.10.0'}131 unmodified linesresolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}engines: {node: '>= 0.4'}es-object-atoms@1.1.1:resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}engines: {node: '>= 0.4'}12 unmodified linesengines: {node: '>=12'}hasBin: trueescalade@3.2.0:resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}engines: {node: '>=6'}12 unmodified linesresolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}engines: {node: '>=4.0'}esutils@2.0.3:resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}engines: {node: '>=0.10.0'}5 unmodified linesevents-universal@1.0.1:resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==}extract-zip@2.0.1:resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==}engines: {node: '>= 10.17.0'}59 unmodified linespicomatch:optional: truefill-range@7.1.1:resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}engines: {node: '>=8'}2 unmodified linesresolution: {integrity: sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA==}engines: {node: '>=14'}follow-redirects@1.15.11:resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==}engines: {node: '>=4.0'}245 unmodified linesresolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==}engines: {node: '>=12'}math-intrinsics@1.1.0:resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}engines: {node: '>= 0.4'}24 unmodified linesmnemonist@0.39.6:resolution: {integrity: sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==}ms@2.1.3:resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}62 unmodified linesobliterator@2.0.5:resolution: {integrity: sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==}on-exit-leak-free@2.1.2:resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}engines: {node: '>=14.0.0'}35 unmodified linespath-parse@1.0.7:resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}pend@1.2.0:resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}254 unmodified linesresolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}smart-buffer@4.2.0:resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}24 unmodified linesresolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}engines: {node: '>= 10.x'}standard-as-callback@2.1.0:resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==}streamx@2.23.0:resolution: {integrity: sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==}59 unmodified linesthrough@2.3.8:resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}tinyglobby@0.2.15:resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}engines: {node: '>=12.0.0'}to-regex-range@5.0.1:resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}engines: {node: '>=8.0'}2 unmodified linesresolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==}engines: {node: '>=12'}tr46@0.0.3:resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}106 unmodified linesterser:optional: trueweb-streams-polyfill@4.0.0-beta.3:resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}engines: {node: '>= 14'}4 unmodified lineswhatwg-url@5.0.0:resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}wrap-ansi@7.0.0:resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}engines: {node: '>=10'}37 unmodified lineszod@3.25.76:resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}snapshots:'@alloc/quick-lru@5.2.0': {}611 unmodified lines'@esbuild/aix-ppc64@0.21.5':optional: true'@esbuild/android-arm64@0.18.20':optional: true'@esbuild/android-arm64@0.21.5':optional: true'@esbuild/android-arm@0.18.20':optional: true'@esbuild/android-arm@0.21.5':optional: true'@esbuild/android-x64@0.18.20':optional: true'@esbuild/android-x64@0.21.5':optional: true'@esbuild/darwin-arm64@0.18.20':optional: true'@esbuild/darwin-arm64@0.21.5':optional: true'@esbuild/darwin-x64@0.18.20':optional: true'@esbuild/darwin-x64@0.21.5':optional: true'@esbuild/freebsd-arm64@0.18.20':optional: true'@esbuild/freebsd-arm64@0.21.5':optional: true'@esbuild/freebsd-x64@0.18.20':optional: true'@esbuild/freebsd-x64@0.21.5':optional: true'@esbuild/linux-arm64@0.18.20':optional: true'@esbuild/linux-arm64@0.21.5':optional: true'@esbuild/linux-arm@0.18.20':optional: true'@esbuild/linux-arm@0.21.5':optional: true'@esbuild/linux-ia32@0.18.20':optional: true'@esbuild/linux-ia32@0.21.5':optional: true'@esbuild/linux-loong64@0.18.20':optional: true'@esbuild/linux-loong64@0.21.5':optional: true'@esbuild/linux-mips64el@0.18.20':optional: true'@esbuild/linux-mips64el@0.21.5':optional: true'@esbuild/linux-ppc64@0.18.20':optional: true'@esbuild/linux-ppc64@0.21.5':optional: true'@esbuild/linux-riscv64@0.18.20':optional: true'@esbuild/linux-riscv64@0.21.5':optional: true'@esbuild/linux-s390x@0.18.20':optional: true'@esbuild/linux-s390x@0.21.5':optional: true'@esbuild/linux-x64@0.18.20':optional: true'@esbuild/linux-x64@0.21.5':optional: true'@esbuild/netbsd-x64@0.18.20':optional: true'@esbuild/netbsd-x64@0.21.5':optional: true'@esbuild/openbsd-x64@0.18.20':optional: true'@esbuild/openbsd-x64@0.21.5':optional: true'@esbuild/sunos-x64@0.18.20':optional: true'@esbuild/sunos-x64@0.21.5':optional: true'@esbuild/win32-arm64@0.18.20':optional: true'@esbuild/win32-arm64@0.21.5':optional: true'@esbuild/win32-ia32@0.18.20':optional: true'@esbuild/win32-ia32@0.21.5':optional: true'@esbuild/win32-x64@0.18.20':optional: true'@esbuild/win32-x64@0.21.5':optional: true'@fastify/ajv-compiler@3.6.0':dependencies:ajv: 8.18.0172 unmodified lines'@pinojs/redact@0.4.0': {}'@prisma/client@5.22.0(prisma@5.22.0)':optionalDependencies:prisma: 5.22.0452 unmodified linesdependencies:tslib: 2.8.1'@tootallnate/quickjs-emscripten@0.23.0': {}'@types/babel__core@7.20.5':17 unmodified linesdependencies:'@babel/types': 7.29.0'@types/diff@8.0.0':dependencies:diff: 8.0.354 unmodified linestransitivePeerDependencies:- supports-colorabort-controller@3.0.0:dependencies:event-target-shim: 5.0.138 unmodified linesargparse@2.0.1: {}ast-types@0.13.4:dependencies:tslib: 2.8.1138 unmodified linescaniuse-lite@1.0.30001770: {}chokidar@3.6.0:dependencies:anymatch: 3.1.3108 unmodified lineses-errors@1.3.0: {}es-object-atoms@1.1.1:dependencies:es-errors: 1.3.056 unmodified lines'@esbuild/win32-ia32': 0.21.5'@esbuild/win32-x64': 0.21.5escalade@3.2.0: {}escodegen@2.1.0:8 unmodified linesestraverse@5.3.0: {}esutils@2.0.3: {}event-target-shim@5.0.1: {}4 unmodified linestransitivePeerDependencies:- bare-abort-controllerextract-zip@2.0.1:dependencies:debug: 4.4.381 unmodified linesoptionalDependencies:picomatch: 4.0.3fill-range@7.1.1:dependencies:to-regex-range: 5.0.14 unmodified linesfast-querystring: 1.1.2safe-regex2: 3.1.0follow-redirects@1.15.11: {}form-data-encoder@1.7.2: {}245 unmodified linesluxon@3.7.2: {}math-intrinsics@1.1.0: {}merge2@1.4.1: {}19 unmodified linesdependencies:obliterator: 2.0.5ms@2.1.3: {}msgpackr-extract@3.0.3:51 unmodified linesobliterator@2.0.5: {}on-exit-leak-free@2.1.2: {}once@1.4.0:48 unmodified linespath-parse@1.0.7: {}pend@1.2.0: {}picocolors@1.1.1: {}307 unmodified lines'@img/sharp-win32-ia32': 0.34.5'@img/sharp-win32-x64': 0.34.5smart-buffer@4.2.0: {}socks-proxy-agent@8.0.5:24 unmodified linessplit2@4.2.0: {}standard-as-callback@2.1.0: {}streamx@2.23.0:dependencies:events-universal: 1.0.1112 unmodified linesthrough@2.3.8: {}tinyglobby@0.2.15:dependencies:fdir: 6.5.0(picomatch@4.0.3)picomatch: 4.0.3to-regex-range@5.0.1:dependencies:is-number: 7.0.0toad-cache@3.7.0: {}tr46@0.0.3: {}ts-interface-checker@0.1.13: {}69 unmodified lines'@types/node': 22.19.11fsevents: 2.3.3web-streams-polyfill@4.0.0-beta.3: {}webidl-conversions@3.0.1: {}3 unmodified linestr46: 0.0.3webidl-conversions: 3.0.1wrap-ansi@7.0.0:dependencies:ansi-styles: 4.3.028 unmodified lineszod@3.23.8: {}zod@3.25.76: {}138 unmodified lines13914014114214314414514614714814915015115215315415515689 unmodified lines246247248249250251252253254285 unmodified lines5405415425435445455465475485495505516 unmodified lines5585595605615625635645655665675685696 unmodified lines5765775785795805815825835845855865876 unmodified lines5945955965975985996006016026036046056 unmodified lines6126136146156166176186196206216226236 unmodified lines6306316326336346356366376386396406416 unmodified lines6486496506516526536546556566576586596 unmodified lines6666676686696706716726736746756766776 unmodified lines6846856866876886896906916926936946956 unmodified lines7027037047057067077087097107117127136 unmodified lines7207217227237247257267277287297307316 unmodified lines7387397407417427437447457467477487496 unmodified lines7567577587597607617627637647657667676 unmodified lines7747757767777787797807817827837847856 unmodified lines7927937947957967977987998008018028036 unmodified lines8108118128138148158168178188198208216 unmodified lines8288298308318328338348358368378388398408418428438448456 unmodified lines8528538548558568578588598608618628638648658668678688696 unmodified lines8768778788798808818828838848858868878888898908918928936 unmodified lines9009019029039049059069079089099109116 unmodified lines9189199209219229239249259269279289296 unmodified lines9369379389399409419429439449459469476 unmodified lines954955956957958959960961962963964965217 unmodified lines118311841185118611871188118911901191371 unmodified lines1563156415651566156715681569157015719 unmodified lines15811582158315841585158615871588158915901591159243 unmodified lines163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167549 unmodified lines1725172617271728172917301731173217331734128 unmodified lines1863186418651866186718681869187018711872131 unmodified lines20042005200620072008200920102011201212 unmodified lines2025202620272028202920302031203220332034203512 unmodified lines2048204920502051205220532054205520565 unmodified lines206220632064206520662067206820692070207159 unmodified lines2131213221332134213521362137213821392 unmodified lines214221432144214521462147214821492150245 unmodified lines23962397239823992400240124022403240424 unmodified lines242924302431243224332434243524362437243862 unmodified lines25012502250325042505250625072508250935 unmodified lines254525462547254825492550255125522553254 unmodified lines280828092810281128122813281428152816281728182819282024 unmodified lines28452846284728482849285028512852285328542855285628572858285959 unmodified lines2919292029212922292329242925292629272928292929302931293229332934293529362937293829392 unmodified lines2942294329442945294629472948294929502951106 unmodified lines305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631374 unmodified lines3142314331443145314631473148314931503151315237 unmodified lines319031913192319331943195319631973198611 unmodified lines381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025172 unmodified lines41984199420042014202420342044205452 unmodified lines4658465946604661466246634664466517 unmodified lines468346844685468646874688468946904691469246934694469554 unmodified lines4750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480538 unmodified lines48444845484648474848484948504851138 unmodified lines49904991499249934994499549964997108 unmodified lines5106510751085109511051115112511356 unmodified lines517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352048 unmodified lines52135214521552165217521852195220522152224 unmodified lines5227522852295230523152325233523481 unmodified lines531653175318531953205321532253234 unmodified lines53285329533053315332533353345335245 unmodified lines558155825583558455855586558755885589559019 unmodified lines5610561156125613561456155616561751 unmodified lines5669567056715672567356745675567648 unmodified lines57255726572757285729573057315732307 unmodified lines6040604160426043604460456046604760486049605060516052605324 unmodified lines607860796080608160826083608460856086608760886089112 unmodified lines620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622669 unmodified lines62966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263533 unmodified lines6357635863596360636163626363636463656366636728 unmodified lines63966397639863996400138 unmodified lines'@types/node':specifier: ^20.0.0version: 20.19.33'@vitest/ui':specifier: ^4.0.18version: 4.0.18(vitest@4.0.18)tsx:specifier: ^3.0.0version: 3.14.0typescript:specifier: ^5.0.0version: 5.9.3vitest:specifier: ^4.0.18version: 4.0.18(@types/node@20.19.33)(@vitest/ui@4.0.18)(jiti@1.21.7)(tsx@3.14.0)apps/web:dependencies:89 unmodified lines'@prisma/client':specifier: ^5.0.0version: 5.22.0(prisma@5.22.0)zod:specifier: ^4.3.6version: 4.3.6devDependencies:'@repo/tsconfig':specifier: workspace:*285 unmodified linescpu: [ppc64]os: [aix]'@esbuild/aix-ppc64@0.27.3':resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==}engines: {node: '>=18'}cpu: [ppc64]os: [aix]'@esbuild/android-arm64@0.18.20':resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [android]'@esbuild/android-arm64@0.27.3':resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==}engines: {node: '>=18'}cpu: [arm64]os: [android]'@esbuild/android-arm@0.18.20':resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}engines: {node: '>=12'}6 unmodified linescpu: [arm]os: [android]'@esbuild/android-arm@0.27.3':resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==}engines: {node: '>=18'}cpu: [arm]os: [android]'@esbuild/android-x64@0.18.20':resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [android]'@esbuild/android-x64@0.27.3':resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==}engines: {node: '>=18'}cpu: [x64]os: [android]'@esbuild/darwin-arm64@0.18.20':resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [darwin]'@esbuild/darwin-arm64@0.27.3':resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==}engines: {node: '>=18'}cpu: [arm64]os: [darwin]'@esbuild/darwin-x64@0.18.20':resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [darwin]'@esbuild/darwin-x64@0.27.3':resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==}engines: {node: '>=18'}cpu: [x64]os: [darwin]'@esbuild/freebsd-arm64@0.18.20':resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [freebsd]'@esbuild/freebsd-arm64@0.27.3':resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==}engines: {node: '>=18'}cpu: [arm64]os: [freebsd]'@esbuild/freebsd-x64@0.18.20':resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [freebsd]'@esbuild/freebsd-x64@0.27.3':resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==}engines: {node: '>=18'}cpu: [x64]os: [freebsd]'@esbuild/linux-arm64@0.18.20':resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [linux]'@esbuild/linux-arm64@0.27.3':resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==}engines: {node: '>=18'}cpu: [arm64]os: [linux]'@esbuild/linux-arm@0.18.20':resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}engines: {node: '>=12'}6 unmodified linescpu: [arm]os: [linux]'@esbuild/linux-arm@0.27.3':resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==}engines: {node: '>=18'}cpu: [arm]os: [linux]'@esbuild/linux-ia32@0.18.20':resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}engines: {node: '>=12'}6 unmodified linescpu: [ia32]os: [linux]'@esbuild/linux-ia32@0.27.3':resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==}engines: {node: '>=18'}cpu: [ia32]os: [linux]'@esbuild/linux-loong64@0.18.20':resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}engines: {node: '>=12'}6 unmodified linescpu: [loong64]os: [linux]'@esbuild/linux-loong64@0.27.3':resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==}engines: {node: '>=18'}cpu: [loong64]os: [linux]'@esbuild/linux-mips64el@0.18.20':resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}engines: {node: '>=12'}6 unmodified linescpu: [mips64el]os: [linux]'@esbuild/linux-mips64el@0.27.3':resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==}engines: {node: '>=18'}cpu: [mips64el]os: [linux]'@esbuild/linux-ppc64@0.18.20':resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}engines: {node: '>=12'}6 unmodified linescpu: [ppc64]os: [linux]'@esbuild/linux-ppc64@0.27.3':resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==}engines: {node: '>=18'}cpu: [ppc64]os: [linux]'@esbuild/linux-riscv64@0.18.20':resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}engines: {node: '>=12'}6 unmodified linescpu: [riscv64]os: [linux]'@esbuild/linux-riscv64@0.27.3':resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==}engines: {node: '>=18'}cpu: [riscv64]os: [linux]'@esbuild/linux-s390x@0.18.20':resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}engines: {node: '>=12'}6 unmodified linescpu: [s390x]os: [linux]'@esbuild/linux-s390x@0.27.3':resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==}engines: {node: '>=18'}cpu: [s390x]os: [linux]'@esbuild/linux-x64@0.18.20':resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [linux]'@esbuild/linux-x64@0.27.3':resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==}engines: {node: '>=18'}cpu: [x64]os: [linux]'@esbuild/netbsd-arm64@0.27.3':resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==}engines: {node: '>=18'}cpu: [arm64]os: [netbsd]'@esbuild/netbsd-x64@0.18.20':resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [netbsd]'@esbuild/netbsd-x64@0.27.3':resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==}engines: {node: '>=18'}cpu: [x64]os: [netbsd]'@esbuild/openbsd-arm64@0.27.3':resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==}engines: {node: '>=18'}cpu: [arm64]os: [openbsd]'@esbuild/openbsd-x64@0.18.20':resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [openbsd]'@esbuild/openbsd-x64@0.27.3':resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==}engines: {node: '>=18'}cpu: [x64]os: [openbsd]'@esbuild/openharmony-arm64@0.27.3':resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==}engines: {node: '>=18'}cpu: [arm64]os: [openharmony]'@esbuild/sunos-x64@0.18.20':resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [sunos]'@esbuild/sunos-x64@0.27.3':resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==}engines: {node: '>=18'}cpu: [x64]os: [sunos]'@esbuild/win32-arm64@0.18.20':resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}engines: {node: '>=12'}6 unmodified linescpu: [arm64]os: [win32]'@esbuild/win32-arm64@0.27.3':resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==}engines: {node: '>=18'}cpu: [arm64]os: [win32]'@esbuild/win32-ia32@0.18.20':resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}engines: {node: '>=12'}6 unmodified linescpu: [ia32]os: [win32]'@esbuild/win32-ia32@0.27.3':resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==}engines: {node: '>=18'}cpu: [ia32]os: [win32]'@esbuild/win32-x64@0.18.20':resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}engines: {node: '>=12'}6 unmodified linescpu: [x64]os: [win32]'@esbuild/win32-x64@0.27.3':resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==}engines: {node: '>=18'}cpu: [x64]os: [win32]'@fastify/ajv-compiler@3.6.0':resolution: {integrity: sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ==}217 unmodified lines'@pinojs/redact@0.4.0':resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==}'@polka/url@1.0.0-next.29':resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}'@prisma/client@5.22.0':resolution: {integrity: sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==}engines: {node: '>=16.13'}371 unmodified linesresolution: {integrity: sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw==}engines: {node: '>=18.0.0'}'@standard-schema/spec@1.1.0':resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==}'@tootallnate/quickjs-emscripten@0.23.0':resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}9 unmodified lines'@types/babel__traverse@7.28.0':resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}'@types/chai@5.2.3':resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}'@types/deep-eql@4.0.2':resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}'@types/diff@8.0.0':resolution: {integrity: sha512-o7jqJM04gfaYrdCecCVMbZhNdG6T1MHg/oQoRFdERLV+4d+V7FijhiEAbFu0Usww84Yijk9yH58U4Jk4HbtzZw==}deprecated: This is a stub types definition. diff provides its own type definitions, so you do not need this installed.43 unmodified linespeerDependencies:vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0'@vitest/expect@4.0.18':resolution: {integrity: sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==}'@vitest/mocker@4.0.18':resolution: {integrity: sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==}peerDependencies:msw: ^2.4.9vite: ^6.0.0 || ^7.0.0-0peerDependenciesMeta:msw:optional: truevite:optional: true'@vitest/pretty-format@4.0.18':resolution: {integrity: sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==}'@vitest/runner@4.0.18':resolution: {integrity: sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==}'@vitest/snapshot@4.0.18':resolution: {integrity: sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==}'@vitest/spy@4.0.18':resolution: {integrity: sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==}'@vitest/ui@4.0.18':resolution: {integrity: sha512-CGJ25bc8fRi8Lod/3GHSvXRKi7nBo3kxh0ApW4yCjmrWmRmlT53B5E08XRSZRliygG0aVNxLrBEqPYdz/KcCtQ==}peerDependencies:vitest: 4.0.18'@vitest/utils@4.0.18':resolution: {integrity: sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==}abort-controller@3.0.0:resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}engines: {node: '>=6.5'}49 unmodified linesargparse@2.0.1:resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}assertion-error@2.0.1:resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}engines: {node: '>=12'}ast-types@0.13.4:resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==}engines: {node: '>=4'}128 unmodified linescaniuse-lite@1.0.30001770:resolution: {integrity: sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==}chai@6.2.2:resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}engines: {node: '>=18'}chokidar@3.6.0:resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}engines: {node: '>= 8.10.0'}131 unmodified linesresolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}engines: {node: '>= 0.4'}es-module-lexer@1.7.0:resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}es-object-atoms@1.1.1:resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}engines: {node: '>= 0.4'}12 unmodified linesengines: {node: '>=12'}hasBin: trueesbuild@0.27.3:resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==}engines: {node: '>=18'}hasBin: trueescalade@3.2.0:resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}engines: {node: '>=6'}12 unmodified linesresolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}engines: {node: '>=4.0'}estree-walker@3.0.3:resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}esutils@2.0.3:resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}engines: {node: '>=0.10.0'}5 unmodified linesevents-universal@1.0.1:resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==}expect-type@1.3.0:resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==}engines: {node: '>=12.0.0'}extract-zip@2.0.1:resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==}engines: {node: '>= 10.17.0'}59 unmodified linespicomatch:optional: truefflate@0.8.2:resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==}fill-range@7.1.1:resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}engines: {node: '>=8'}2 unmodified linesresolution: {integrity: sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA==}engines: {node: '>=14'}flatted@3.3.4:resolution: {integrity: sha512-3+mMldrTAPdta5kjX2G2J7iX4zxtnwpdA8Tr2ZSjkyPSanvbZAcy6flmtnXbEybHrDcU9641lxrMfFuUxVz9vA==}follow-redirects@1.15.11:resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==}engines: {node: '>=4.0'}245 unmodified linesresolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==}engines: {node: '>=12'}magic-string@0.30.21:resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}math-intrinsics@1.1.0:resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}engines: {node: '>= 0.4'}24 unmodified linesmnemonist@0.39.6:resolution: {integrity: sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==}mrmime@2.0.1:resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}engines: {node: '>=10'}ms@2.1.3:resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}62 unmodified linesobliterator@2.0.5:resolution: {integrity: sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==}obug@2.1.1:resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}on-exit-leak-free@2.1.2:resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}engines: {node: '>=14.0.0'}35 unmodified linespath-parse@1.0.7:resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}pathe@2.0.3:resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}pend@1.2.0:resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}254 unmodified linesresolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==}engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}siginfo@2.0.0:resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}sirv@3.0.2:resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==}engines: {node: '>=18'}smart-buffer@4.2.0:resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}24 unmodified linesresolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}engines: {node: '>= 10.x'}stackback@0.0.2:resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}standard-as-callback@2.1.0:resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==}std-env@3.10.0:resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}streamx@2.23.0:resolution: {integrity: sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==}59 unmodified linesthrough@2.3.8:resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}tinybench@2.9.0:resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}tinyexec@1.0.2:resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==}engines: {node: '>=18'}tinyglobby@0.2.15:resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}engines: {node: '>=12.0.0'}tinyrainbow@3.0.3:resolution: {integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==}engines: {node: '>=14.0.0'}to-regex-range@5.0.1:resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}engines: {node: '>=8.0'}2 unmodified linesresolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==}engines: {node: '>=12'}totalist@3.0.1:resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}engines: {node: '>=6'}tr46@0.0.3:resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}106 unmodified linesterser:optional: truevite@7.3.1:resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==}engines: {node: ^20.19.0 || >=22.12.0}hasBin: truepeerDependencies:'@types/node': ^20.19.0 || >=22.12.0jiti: '>=1.21.0'less: ^4.0.0lightningcss: ^1.21.0sass: ^1.70.0sass-embedded: ^1.70.0stylus: '>=0.54.8'sugarss: ^5.0.0terser: ^5.16.0tsx: ^4.8.1yaml: ^2.4.2peerDependenciesMeta:'@types/node':optional: truejiti:optional: trueless:optional: truelightningcss:optional: truesass:optional: truesass-embedded:optional: truestylus:optional: truesugarss:optional: trueterser:optional: truetsx:optional: trueyaml:optional: truevitest@4.0.18:resolution: {integrity: sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==}engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}hasBin: truepeerDependencies:'@edge-runtime/vm': '*''@opentelemetry/api': ^1.9.0'@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0'@vitest/browser-playwright': 4.0.18'@vitest/browser-preview': 4.0.18'@vitest/browser-webdriverio': 4.0.18'@vitest/ui': 4.0.18happy-dom: '*'jsdom: '*'peerDependenciesMeta:'@edge-runtime/vm':optional: true'@opentelemetry/api':optional: true'@types/node':optional: true'@vitest/browser-playwright':optional: true'@vitest/browser-preview':optional: true'@vitest/browser-webdriverio':optional: true'@vitest/ui':optional: truehappy-dom:optional: truejsdom:optional: trueweb-streams-polyfill@4.0.0-beta.3:resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}engines: {node: '>= 14'}4 unmodified lineswhatwg-url@5.0.0:resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}why-is-node-running@2.3.0:resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}engines: {node: '>=8'}hasBin: truewrap-ansi@7.0.0:resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}engines: {node: '>=10'}37 unmodified lineszod@3.25.76:resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}zod@4.3.6:resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==}snapshots:'@alloc/quick-lru@5.2.0': {}611 unmodified lines'@esbuild/aix-ppc64@0.21.5':optional: true'@esbuild/aix-ppc64@0.27.3':optional: true'@esbuild/android-arm64@0.18.20':optional: true'@esbuild/android-arm64@0.21.5':optional: true'@esbuild/android-arm64@0.27.3':optional: true'@esbuild/android-arm@0.18.20':optional: true'@esbuild/android-arm@0.21.5':optional: true'@esbuild/android-arm@0.27.3':optional: true'@esbuild/android-x64@0.18.20':optional: true'@esbuild/android-x64@0.21.5':optional: true'@esbuild/android-x64@0.27.3':optional: true'@esbuild/darwin-arm64@0.18.20':optional: true'@esbuild/darwin-arm64@0.21.5':optional: true'@esbuild/darwin-arm64@0.27.3':optional: true'@esbuild/darwin-x64@0.18.20':optional: true'@esbuild/darwin-x64@0.21.5':optional: true'@esbuild/darwin-x64@0.27.3':optional: true'@esbuild/freebsd-arm64@0.18.20':optional: true'@esbuild/freebsd-arm64@0.21.5':optional: true'@esbuild/freebsd-arm64@0.27.3':optional: true'@esbuild/freebsd-x64@0.18.20':optional: true'@esbuild/freebsd-x64@0.21.5':optional: true'@esbuild/freebsd-x64@0.27.3':optional: true'@esbuild/linux-arm64@0.18.20':optional: true'@esbuild/linux-arm64@0.21.5':optional: true'@esbuild/linux-arm64@0.27.3':optional: true'@esbuild/linux-arm@0.18.20':optional: true'@esbuild/linux-arm@0.21.5':optional: true'@esbuild/linux-arm@0.27.3':optional: true'@esbuild/linux-ia32@0.18.20':optional: true'@esbuild/linux-ia32@0.21.5':optional: true'@esbuild/linux-ia32@0.27.3':optional: true'@esbuild/linux-loong64@0.18.20':optional: true'@esbuild/linux-loong64@0.21.5':optional: true'@esbuild/linux-loong64@0.27.3':optional: true'@esbuild/linux-mips64el@0.18.20':optional: true'@esbuild/linux-mips64el@0.21.5':optional: true'@esbuild/linux-mips64el@0.27.3':optional: true'@esbuild/linux-ppc64@0.18.20':optional: true'@esbuild/linux-ppc64@0.21.5':optional: true'@esbuild/linux-ppc64@0.27.3':optional: true'@esbuild/linux-riscv64@0.18.20':optional: true'@esbuild/linux-riscv64@0.21.5':optional: true'@esbuild/linux-riscv64@0.27.3':optional: true'@esbuild/linux-s390x@0.18.20':optional: true'@esbuild/linux-s390x@0.21.5':optional: true'@esbuild/linux-s390x@0.27.3':optional: true'@esbuild/linux-x64@0.18.20':optional: true'@esbuild/linux-x64@0.21.5':optional: true'@esbuild/linux-x64@0.27.3':optional: true'@esbuild/netbsd-arm64@0.27.3':optional: true'@esbuild/netbsd-x64@0.18.20':optional: true'@esbuild/netbsd-x64@0.21.5':optional: true'@esbuild/netbsd-x64@0.27.3':optional: true'@esbuild/openbsd-arm64@0.27.3':optional: true'@esbuild/openbsd-x64@0.18.20':optional: true'@esbuild/openbsd-x64@0.21.5':optional: true'@esbuild/openbsd-x64@0.27.3':optional: true'@esbuild/openharmony-arm64@0.27.3':optional: true'@esbuild/sunos-x64@0.18.20':optional: true'@esbuild/sunos-x64@0.21.5':optional: true'@esbuild/sunos-x64@0.27.3':optional: true'@esbuild/win32-arm64@0.18.20':optional: true'@esbuild/win32-arm64@0.21.5':optional: true'@esbuild/win32-arm64@0.27.3':optional: true'@esbuild/win32-ia32@0.18.20':optional: true'@esbuild/win32-ia32@0.21.5':optional: true'@esbuild/win32-ia32@0.27.3':optional: true'@esbuild/win32-x64@0.18.20':optional: true'@esbuild/win32-x64@0.21.5':optional: true'@esbuild/win32-x64@0.27.3':optional: true'@fastify/ajv-compiler@3.6.0':dependencies:ajv: 8.18.0172 unmodified lines'@pinojs/redact@0.4.0': {}'@polka/url@1.0.0-next.29': {}'@prisma/client@5.22.0(prisma@5.22.0)':optionalDependencies:prisma: 5.22.0452 unmodified linesdependencies:tslib: 2.8.1'@standard-schema/spec@1.1.0': {}'@tootallnate/quickjs-emscripten@0.23.0': {}'@types/babel__core@7.20.5':17 unmodified linesdependencies:'@babel/types': 7.29.0'@types/chai@5.2.3':dependencies:'@types/deep-eql': 4.0.2assertion-error: 2.0.1'@types/deep-eql@4.0.2': {}'@types/diff@8.0.0':dependencies:diff: 8.0.354 unmodified linestransitivePeerDependencies:- supports-color'@vitest/expect@4.0.18':dependencies:'@standard-schema/spec': 1.1.0'@types/chai': 5.2.3'@vitest/spy': 4.0.18'@vitest/utils': 4.0.18chai: 6.2.2tinyrainbow: 3.0.3'@vitest/mocker@4.0.18(vite@7.3.1(@types/node@20.19.33)(jiti@1.21.7)(tsx@3.14.0))':dependencies:'@vitest/spy': 4.0.18estree-walker: 3.0.3magic-string: 0.30.21optionalDependencies:vite: 7.3.1(@types/node@20.19.33)(jiti@1.21.7)(tsx@3.14.0)'@vitest/pretty-format@4.0.18':dependencies:tinyrainbow: 3.0.3'@vitest/runner@4.0.18':dependencies:'@vitest/utils': 4.0.18pathe: 2.0.3'@vitest/snapshot@4.0.18':dependencies:'@vitest/pretty-format': 4.0.18magic-string: 0.30.21pathe: 2.0.3'@vitest/spy@4.0.18': {}'@vitest/ui@4.0.18(vitest@4.0.18)':dependencies:'@vitest/utils': 4.0.18fflate: 0.8.2flatted: 3.3.4pathe: 2.0.3sirv: 3.0.2tinyglobby: 0.2.15tinyrainbow: 3.0.3vitest: 4.0.18(@types/node@20.19.33)(@vitest/ui@4.0.18)(jiti@1.21.7)(tsx@3.14.0)'@vitest/utils@4.0.18':dependencies:'@vitest/pretty-format': 4.0.18tinyrainbow: 3.0.3abort-controller@3.0.0:dependencies:event-target-shim: 5.0.138 unmodified linesargparse@2.0.1: {}assertion-error@2.0.1: {}ast-types@0.13.4:dependencies:tslib: 2.8.1138 unmodified linescaniuse-lite@1.0.30001770: {}chai@6.2.2: {}chokidar@3.6.0:dependencies:anymatch: 3.1.3108 unmodified lineses-errors@1.3.0: {}es-module-lexer@1.7.0: {}es-object-atoms@1.1.1:dependencies:es-errors: 1.3.056 unmodified lines'@esbuild/win32-ia32': 0.21.5'@esbuild/win32-x64': 0.21.5esbuild@0.27.3:optionalDependencies:'@esbuild/aix-ppc64': 0.27.3'@esbuild/android-arm': 0.27.3'@esbuild/android-arm64': 0.27.3'@esbuild/android-x64': 0.27.3'@esbuild/darwin-arm64': 0.27.3'@esbuild/darwin-x64': 0.27.3'@esbuild/freebsd-arm64': 0.27.3'@esbuild/freebsd-x64': 0.27.3'@esbuild/linux-arm': 0.27.3'@esbuild/linux-arm64': 0.27.3'@esbuild/linux-ia32': 0.27.3'@esbuild/linux-loong64': 0.27.3'@esbuild/linux-mips64el': 0.27.3'@esbuild/linux-ppc64': 0.27.3'@esbuild/linux-riscv64': 0.27.3'@esbuild/linux-s390x': 0.27.3'@esbuild/linux-x64': 0.27.3'@esbuild/netbsd-arm64': 0.27.3'@esbuild/netbsd-x64': 0.27.3'@esbuild/openbsd-arm64': 0.27.3'@esbuild/openbsd-x64': 0.27.3'@esbuild/openharmony-arm64': 0.27.3'@esbuild/sunos-x64': 0.27.3'@esbuild/win32-arm64': 0.27.3'@esbuild/win32-ia32': 0.27.3'@esbuild/win32-x64': 0.27.3escalade@3.2.0: {}escodegen@2.1.0:8 unmodified linesestraverse@5.3.0: {}estree-walker@3.0.3:dependencies:'@types/estree': 1.0.8esutils@2.0.3: {}event-target-shim@5.0.1: {}4 unmodified linestransitivePeerDependencies:- bare-abort-controllerexpect-type@1.3.0: {}extract-zip@2.0.1:dependencies:debug: 4.4.381 unmodified linesoptionalDependencies:picomatch: 4.0.3fflate@0.8.2: {}fill-range@7.1.1:dependencies:to-regex-range: 5.0.14 unmodified linesfast-querystring: 1.1.2safe-regex2: 3.1.0flatted@3.3.4: {}follow-redirects@1.15.11: {}form-data-encoder@1.7.2: {}245 unmodified linesluxon@3.7.2: {}magic-string@0.30.21:dependencies:'@jridgewell/sourcemap-codec': 1.5.5math-intrinsics@1.1.0: {}merge2@1.4.1: {}19 unmodified linesdependencies:obliterator: 2.0.5mrmime@2.0.1: {}ms@2.1.3: {}msgpackr-extract@3.0.3:51 unmodified linesobliterator@2.0.5: {}obug@2.1.1: {}on-exit-leak-free@2.1.2: {}once@1.4.0:48 unmodified linespath-parse@1.0.7: {}pathe@2.0.3: {}pend@1.2.0: {}picocolors@1.1.1: {}307 unmodified lines'@img/sharp-win32-ia32': 0.34.5'@img/sharp-win32-x64': 0.34.5siginfo@2.0.0: {}sirv@3.0.2:dependencies:'@polka/url': 1.0.0-next.29mrmime: 2.0.1totalist: 3.0.1smart-buffer@4.2.0: {}socks-proxy-agent@8.0.5:24 unmodified linessplit2@4.2.0: {}stackback@0.0.2: {}standard-as-callback@2.1.0: {}std-env@3.10.0: {}streamx@2.23.0:dependencies:events-universal: 1.0.1112 unmodified linesthrough@2.3.8: {}tinybench@2.9.0: {}tinyexec@1.0.2: {}tinyglobby@0.2.15:dependencies:fdir: 6.5.0(picomatch@4.0.3)picomatch: 4.0.3tinyrainbow@3.0.3: {}to-regex-range@5.0.1:dependencies:is-number: 7.0.0toad-cache@3.7.0: {}totalist@3.0.1: {}tr46@0.0.3: {}ts-interface-checker@0.1.13: {}69 unmodified lines'@types/node': 22.19.11fsevents: 2.3.3vite@7.3.1(@types/node@20.19.33)(jiti@1.21.7)(tsx@3.14.0):dependencies:esbuild: 0.27.3fdir: 6.5.0(picomatch@4.0.3)picomatch: 4.0.3postcss: 8.5.6rollup: 4.57.1tinyglobby: 0.2.15optionalDependencies:'@types/node': 20.19.33fsevents: 2.3.3jiti: 1.21.7tsx: 3.14.0vitest@4.0.18(@types/node@20.19.33)(@vitest/ui@4.0.18)(jiti@1.21.7)(tsx@3.14.0):dependencies:'@vitest/expect': 4.0.18'@vitest/mocker': 4.0.18(vite@7.3.1(@types/node@20.19.33)(jiti@1.21.7)(tsx@3.14.0))'@vitest/pretty-format': 4.0.18'@vitest/runner': 4.0.18'@vitest/snapshot': 4.0.18'@vitest/spy': 4.0.18'@vitest/utils': 4.0.18es-module-lexer: 1.7.0expect-type: 1.3.0magic-string: 0.30.21obug: 2.1.1pathe: 2.0.3picomatch: 4.0.3std-env: 3.10.0tinybench: 2.9.0tinyexec: 1.0.2tinyglobby: 0.2.15tinyrainbow: 3.0.3vite: 7.3.1(@types/node@20.19.33)(jiti@1.21.7)(tsx@3.14.0)why-is-node-running: 2.3.0optionalDependencies:'@types/node': 20.19.33'@vitest/ui': 4.0.18(vitest@4.0.18)transitivePeerDependencies:- jiti- less- lightningcss- msw- sass- sass-embedded- stylus- sugarss- terser- tsx- yamlweb-streams-polyfill@4.0.0-beta.3: {}webidl-conversions@3.0.1: {}3 unmodified linestr46: 0.0.3webidl-conversions: 3.0.1why-is-node-running@2.3.0:dependencies:siginfo: 2.0.0stackback: 0.0.2wrap-ansi@7.0.0:dependencies:ansi-styles: 4.3.028 unmodified lineszod@3.23.8: {}zod@3.25.76: {}zod@4.3.6: {}
apps/api/package.json+6-2
apps/api/src/index.ts+4-4
apps/api/src/routes/admin.ts+2-2
apps/api/src/routes/ai.ts+11-11
apps/api/src/routes/internal.ts+3-3
apps/api/src/routes/payments.ts+4-4
apps/api/src/routes/whatsapp.ts+14-6
apps/api/src/scripts/calibrate-whisper.ts+2-2
apps/api/src/scripts/complete-t4t5-images.ts+2-2
apps/api/src/scripts/elite-journey-simulation.tsDeleted-152
apps/api/src/scripts/fix-types.tsAdded+45
apps/api/src/scripts/full-journey-simulation.tsDeleted-118
apps/api/src/scripts/purge-any.tsAdded+49
apps/api/src/scripts/sync-content.ts+3-3
apps/api/src/scripts/test-e2e-journey.ts+4-4
apps/api/src/scripts/upload-t1-images.ts+2-2
apps/api/src/scripts/upload-t2t4-images.ts+2-2
apps/api/src/scripts/upload-t4t5-final.ts+2-2
apps/api/src/services/ai/__fixtures__/mock-data.tsAdded+95
apps/api/src/services/ai/ffmpeg.ts+2-2
apps/api/src/services/ai/mock-provider.ts+12-102
apps/api/src/services/ai/openai-provider.ts+13-13
apps/api/src/services/ai/search.ts+2-2
apps/api/src/services/storage.ts+4-4
apps/api/src/services/stripe.ts+2-2
apps/api/src/services/whatsapp.ts+7-7
apps/api/tests/integration/kaolack-journey.test.tsAdded+103
apps/api/vitest.config.tsAdded+14
apps/whatsapp-worker/src/fix-types.tsAdded+18
apps/whatsapp-worker/src/index.ts+47-25
apps/whatsapp-worker/src/pedagogy.ts+6-6
apps/whatsapp-worker/src/whatsapp-cloud.ts+14-14
packages/database/package.json+4-2
packages/database/prisma/migrations/20260307212923_move_pitchdeck_fields/migration.sqlAdded+246
packages/database/prisma/migrations/migration_lock.tomlAdded+3
packages/database/prisma/schema.prisma+4-5
packages/database/run-seed.ts+2-12
packages/database/scripts/validate-content.tsAdded+100
pnpm-lock.yaml+636