tcef-notifications/package.json
vjrj b3aeb6108f Fase 1b: nucleo del matcher geoespacial (caracterizado + testeado)
Caracterizacion del matching viejo de node-red en docs/legacy-matching.md
(reglas: candidatas geo $near 1000km, filtro fino geolib dist/1000<=sub.distance,
dedupe 500m, content i18n kmnasa/kmvecinal con 'км' cirilico verbatim, sealed via
Iron). Modulos:

- matcher/content.ts: i18n kmnasa/kmvecinal + km redondeado (Math.round dist/1000*10/10)
- matcher/geo.ts: geolib.getDistance (identico al viejo) + isHit
- matcher/seal.ts: @hapi/iron (Fe26.2) — COMPATIBLE con el iron@5 de la web
  (verificado: sello en servicio -> unseal en web round-trip OK)
- matcher/matcher.ts: matchFire(fire, ctx) -> docs notifications identicos a
  node-red; dedupe 500m + 1 notif/usuario/fuego; solo audiencia web/mobile
- deps: @hapi/iron, geolib

63 tests en verde (incluye interop CJS/ESM en dist). MongoDB 3.2 -> ingesta por
polling (sin change streams), pendiente de cablear.
2026-07-13 17:58:43 +02:00

40 lines
1.2 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": {
"@hapi/iron": "^7.0.1",
"bullmq": "^5.34.0",
"firebase-admin": "^13.0.2",
"geolib": "^3.3.14",
"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"
}
}