1414import { readFileSync , existsSync } from 'fs' ;
1515import { join , dirname } from 'path' ;
1616import { fileURLToPath } from 'url' ;
17+ import { ALIASES } from './lib/aliases.mjs' ;
18+
1719
1820const CAREER_OPS = dirname ( fileURLToPath ( import . meta. url ) ) ;
1921const APPS_FILE = existsSync ( join ( CAREER_OPS , 'data/applications.md' ) )
@@ -27,25 +29,13 @@ const summaryMode = args.includes('--summary');
2729const minThresholdIdx = args . indexOf ( '--min-threshold' ) ;
2830const MIN_THRESHOLD = minThresholdIdx !== - 1 ? parseInt ( args [ minThresholdIdx + 1 ] ) || 5 : 5 ;
2931
32+
3033// --- Status normalization (mirrors verify-pipeline.mjs) ---
31- const ALIASES = {
32- 'evaluada' : 'evaluated' , 'condicional' : 'evaluated' , 'hold' : 'evaluated' ,
33- 'evaluar' : 'evaluated' , 'verificar' : 'evaluated' ,
34- 'aplicado' : 'applied' , 'enviada' : 'applied' , 'aplicada' : 'applied' ,
35- 'applied' : 'applied' , 'sent' : 'applied' ,
36- 'respondido' : 'responded' ,
37- 'entrevista' : 'interview' ,
38- 'oferta' : 'offer' ,
39- 'rechazado' : 'rejected' , 'rechazada' : 'rejected' ,
40- 'descartado' : 'discarded' , 'descartada' : 'discarded' ,
41- 'cerrada' : 'discarded' , 'cancelada' : 'discarded' ,
42- 'no aplicar' : 'skip' , 'no_aplicar' : 'skip' , 'monitor' : 'skip' , 'geo blocker' : 'skip' ,
43- } ;
4434
4535function normalizeStatus ( raw ) {
4636 const clean = raw . replace ( / \* \* / g, '' ) . trim ( ) . toLowerCase ( )
4737 . replace ( / \s + \d { 4 } - \d { 2 } - \d { 2 } .* $ / , '' ) . trim ( ) ;
48- return ALIASES [ clean ] || clean ;
38+ return ( ALIASES [ clean ] || clean ) . toLowerCase ( ) ;
4939}
5040
5141function classifyOutcome ( status ) {
0 commit comments