tcef-notifications/package.json
vjrj a5ba2cdcf1 Fase 1a: driver mongodb v3.7 (produccion es MongoDB 3.2)
El smoke-test contra prod revelo MongoDB 3.2.11 (EOL): el driver v6 exige >=4.2
y no conecta. Cambios:

- mongodb ^3.7.4 + @types/mongodb; db.ts con useUnifiedTopology, sin retryWrites
- sends.ts: deteccion de duplicate-key (11000) sin depender de MongoServerError
- poller.ts: FilterQuery en vez de Filter
- tests de integracion migrados de mongodb-memory-server a un fake en memoria
  (test/fake-repo.ts) porque no hay mongod 3.x ejecutable en hosts modernos;
  emula operadores ($ne/$in/$gte/$exists), $set/$unset e indice unico (11000)
- docs: legacy-behavior.md §0 (entorno MongoDB 3.2, sin change streams -> fase
  1b usara polling; recomendacion de upgrade de Mongo como fase propia)

47 tests en verde, typecheck y build OK. Datos reales del import: 413 pendientes
FCM, 0 email, 8176 users con fireBaseToken.
2026-07-13 00:58:27 +02:00

38 lines
1.1 KiB
JSON

{
"name": "tcef-notifications",
"version": "0.1.0",
"private": true,
"description": "Notification sending microservice for Todos contra el Fuego (FCM v1 + email, later Telegram). Replaces the dead node-gcm push path and the Meteor observer.",
"type": "module",
"engines": {
"node": ">=22"
},
"scripts": {
"build": "tsc -p tsconfig.json && node scripts/copy-templates.mjs",
"typecheck": "tsc -p tsconfig.json --noEmit",
"start": "node --enable-source-maps dist/index.js",
"dev": "node --experimental-strip-types --watch src/index.ts",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"bullmq": "^5.34.0",
"firebase-admin": "^13.0.2",
"handlebars": "^4.7.8",
"ioredis": "^5.4.2",
"juice": "^11.0.0",
"luxon": "^3.5.0",
"mongodb": "^3.7.4",
"nodemailer": "^6.9.16",
"pino": "^9.5.0",
"pino-pretty": "^13.0.0"
},
"devDependencies": {
"@types/luxon": "^3.4.2",
"@types/mongodb": "^3.6.20",
"@types/node": "^22.10.2",
"@types/nodemailer": "^6.4.17",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
}
}