Commit graph

634 commits

Author SHA1 Message Date
c6c22643c1 scss: migrate @import -> @use, lighten/darken -> color.adjust (dart-sass)
Silences the dart-sass deprecation warnings that flooded every build:
- All @import of local partials (colors, mixins, and the CSS-emitting
  partials) -> @use '...' as * (partials are pure defs, so 'as *' keeps the
  global names and the ~25 call sites unchanged). Added explicit @use './colors'
  to bootstrap-overrides.scss and cookies-eu.scss, which used -palette*
  transitively (broke under @use's scoping).
- lighten(c, x%) -> color.adjust(c, $lightness: x%) and darken -> negative,
  with @use 'sass:color' in the 6 affected files.
Compiles clean (byte-for-byte CSS behavior preserved).
2026-07-17 18:18:04 +02:00
62ac2fbd9c sentry: tunnel client events through the app to dodge Cloudflare's 503
GlitchTip is behind Cloudflare, which answers the browser's cross-site ingest
POSTs with 503 (no CORS headers -> 'Failed to fetch'); server-side requests
pass. The browser SDK now posts envelopes same-origin to /sentry-tunnel, and
the server forwards them to GlitchTip:
- imports/startup/server/sentryTunnel.js: WebApp handler that relays the raw
  envelope to <dsn>/api/<project>/envelope/?sentry_key=<key> over IPv4
  (family:4 avoids Happy-Eyeballs picking Cloudflare's unroutable IPv6 on
  IPv4-only hosts). GlitchTip authenticates by the sentry_key query, so the
  key is derived from the DSN and passed explicitly.
- client ravenLogger: tunnel: '/sentry-tunnel'.
Verified: POST /sentry-tunnel -> 200 (envelope reaches GlitchTip).
2026-07-17 18:17:47 +02:00
696789e2b1 meteor3: react-meteor-data 0.2.16 -> 3.0.6 (fixes blank fire-detail pages)
0.2.16 (React-15/16-era withTracker) looped forever on fire-detail pages
under React 18: the withTracker subscription never reached ready() so the
page stayed blank and pegged a CPU core. Publications were already correct
(subscribing standalone from the console readied instantly). 3.0.6 (the
React-18 line for Meteor 3.1) fixes it with zero call-site changes. Also
drops tmeasday:check-npm-versions (the constraint that pinned 0.2.16).

Browser-verified at /fire/archive/<id>: full render (map, NASA/satellite,
FalsePositives widget, Comments box), zero console errors. REST smoke
byte-identical (12/12).
2026-07-17 13:03:54 +02:00
efa1e30bcb docs: record fire-detail page bug (react-meteor-data 0.2.16 vs React 18)
Browser verification of the Comments feature surfaced a pre-existing client
bug: fire-detail pages (/fire/*/:id) stay blank because the page's withTracker
subscription never reaches ready() and re-subscribes in a loop. Isolated it:
the publications ready fine when subscribed standalone, so it's client-side —
react-meteor-data@0.2.16 (React-15/16 era) misbehaving under React 18 for a
component that gates render on subscription.ready(). Fix = upgrade
react-meteor-data to 2.x (useTracker). Documented in UPGRADE.md; not yet done.
2026-07-16 15:57:20 +02:00
0711416300 meteor3: nodemailer 4 -> 6.10
Drop-in for our usage: email.js only does createTransport(MAIL_URL) and reads
transport.options.auth.user (production-only from() branch) — both verified
identical in v6 (createTransport from a URL still populates options.auth.user).
Actual sending goes through ostrio:mailer (MailTime 2.5), v6-compatible. Mail
server inits clean ('I'm the mail server'); REST smoke byte-identical (12/12).
2026-07-16 12:29:10 +02:00
4ca7e198d3 meteor3: raven -> @sentry/node + @sentry/browser
flowkey:raven (Sentry legacy SDK) is dead on Meteor 3 and, with the old
sentry.comunes.org DSN unreachable, spammed the boot log with 502s on every
exception. Replaced by the modern SDKs (8.x) behind the same ravenLogger.log()
facade so the 6 call sites are unchanged. Empty DSN -> plain console logger
(same behavior as before).

End-to-end verified against a real backend: GlitchTip deployed on aaron
(Sentry-compatible, fits in ~1.5GB vs Sentry's 16GB), fronted at
sentry.comunes.org. A test exception sent from the dev server appeared in
GlitchTip within seconds. REST smoke byte-identical (12/12).
2026-07-16 12:20:02 +02:00
197a59f641 fase 3: stack docker-compose local del sistema modernizado
Compose con los 5 servicios: mongo:7 (replica set rs0 + mongo-init one-shot),
redis (AOF), web Meteor 3.1 (Dockerfile multi-stage: builder debian con
meteor-tool 3.1 -> server-deps alpine -> runtime node:22-alpine), notifications
(dry-run) y node-red 4. Healthchecks (127.0.0.1, no localhost: busybox wget
prefiere IPv6 y Meteor escucha IPv4), restart unless-stopped, logging rotado
3x10MB, secretos montados desde ./secrets (gitignored, solo .example versionado).
.npmrc legacy-peer-deps para el ERESOLVE de las libs react viejas.

Validado: los 5 servicios healthy y smoke REST byte-identico (12/12) contra la
web dockerizada en :3200. RUNBOOK.md documenta arranque, smoke, backups y
rollback. No toca infra de Comunes.
2026-07-15 01:01:07 +02:00
e3f3f4aa20 meteor3: remove dead chimp e2e runner (pulled fibers, broke Docker build)
chimp 0.51.1 (Selenium 2 / cucumber e2e runner) was the last dependency
pulling native fibers@1.x, which cannot compile on Node 22 and failed the
clean Docker image build (node-gyp: no prebuilt, no python). Not imported
anywhere. Also add python-is-python3 to the builder stage so node-gyp can
find python for any other native dep. Boot + REST smoke green.
2026-07-15 00:39:48 +02:00
713f1346e7 meteor3: bcrypt 1.0.3 -> 5.1.1
The 1.x native binding was built for another Node ABI and failed to load
(accounts-password silently used the pure-JS fallback) and 1.x does not
compile on Node 22, which would break the Docker image build. 5.1.1 ships
prebuilt Node-22 binaries and loads natively. Boot + REST smoke green.
2026-07-14 11:43:37 +02:00
1f1f5c697d meteor3: port all 18 migration up() bodies to async
percolate:migrations 2.0.1 awaits async up(), so historical migrations
now run on Meteor 3: fetchAsync + for..of instead of cursor forEach,
insert/update/remove -> *Async, _ensureIndex -> createIndexAsync,
Accounts.createUser -> createUserAsync, awaited rawCollection indexes.

Verified: empty Mongo 7 DB migrates 0->18 cleanly (indexes + industry
registries created, control unlocked at v18); pre-marking version=18 is
no longer needed (UPGRADE.md updated). REST smoke stays byte-identical.
2026-07-14 11:36:30 +02:00
1892c0ead0 meteor3: React 16 -> 18.3 with createRoot
react/react-dom ^18.3.1 (--legacy-peer-deps for the pinned ancient react-*
libs, which still work on 18 via legacy context but gate React 19). Client
entry uses createRoot. Browser-verified on / and /fires; REST smoke
byte-identical (12/12).
2026-07-14 11:32:37 +02:00
eb3aec82ae meteor3: purge dead client packages — web UI renders on 3.1
alanning:roles removed (client crashed the whole bundle; plain user.roles
checks instead), selaias:cookie-consent replaced by in-repo React banner,
publish-performant-counts vendored with countAsync, Meteor.autorun dropped
(App)/Tracker.autorun (FiresMap), and the map publications not covered by
the REST smoke (activefiresmyloc, activefiresunionmyloc, fireAlerts,
oauth.verifyConfiguration) converted to async APIs.

Verified in browser: / and /fires render with map + cookie banner, zero
uncaught exceptions. REST smoke byte-identical (12/12).
2026-07-14 11:32:19 +02:00
0ff9848cd4 meteor3: re-enable fixtures and sitemaps with async/Meteor-3 implementations
fixtures: drop @cleverbeagle/seeder (sync Mongo, unmaintained) for a small
idempotent async seeder (same dev accounts). sitemaps: drop dead
gadicohen:sitemaps for a WebApp.connectHandlers /sitemap.xml with the same
static page list (the per-fire section was already disabled). Verified on
dev boot: 6 users ensured, sitemap serving; REST smoke byte-identical.
2026-07-14 07:06:07 +02:00
66bab7a43b meteor3: Comments methods and mail fan-out to async
comments.insert/edit/remove/like/dislike use *Async collection APIs;
requireOwner/toggle helpers are async; onCommentAdd iterates users with
forEachAsync. subscriptions.* methods were already async. REST smoke stays
byte-identical (12/12).
2026-07-14 06:52:32 +02:00
feaf66fe34 meteor3: web Fires publications to async (findOneAsync/countAsync/awaited firesUnion)
fireFromId, fireFromAlertId, fireFromActiveId and fireFromHash now use the
async collection APIs and async publish handlers (so try/catch catches
rejections). falsePositivesMyloc/industriesMyloc/comments.forReference are
cursor-only and needed no change. Verified over raw DDP against the seeded
dev Mongo 7; REST smoke stays byte-identical (12/12).
2026-07-14 06:52:08 +02:00
48d33c397b docs(UPGRADE): Meteor 3.1 + Mongo 7 REST smoke green; reproduce steps + remaining web-UI TODO 2026-07-14 06:23:52 +02:00
637a749e8d meteor3: REST API async migration COMPLETE — smoke green on Meteor 3.1 + Mongo 7
All 12 Flutter REST endpoints byte-identical to the 1.6.1.1 baseline, running on
Meteor 3.1 against dockerized MongoDB 7. The 3.x jump works end-to-end.

- Rest.js: every endpoint action -> async; all Mongo calls -> *Async
  (findOneAsync/countAsync/fetchAsync/upsertAsync/removeAsync).
- Helpers to async: countRealFires (accepts array|cursor, forEachAsync->for-of),
  firesUnion (fetchAsync), fireFromHash/findOrCreateFire (await, dropped Fibers
  Promise.await), subscriptionsInsert/subscriptionsRemove, upsertFalsePositive,
  falsePositives.insert, subscriptions.update method, countFiresInRegions.
- getFires: countAsync() on a $near cursor throws on the mongodb 6 driver
  ($near not allowed in the aggregation countDocuments uses) -> fetch once and
  use array length for total.
- Route order: json-routes 3.0 matches in registration order, so
  mobile/subscriptions/all/:token/:mobileToken is now registered BEFORE
  :token/:mobileToken/:subsId (else GET .../all/x/y hit the delete-only route).
2026-07-14 06:21:35 +02:00
b37069c3e5 WIP(meteor3): server BOOTS on 3.1 + Mongo 7; restivus async-patched
Major milestone: the Meteor 3.1 server boots and runs against dockerized
MongoDB 7, and the REST framework responds (status/uptime OK).

- collection2 v4: import its eager entry 'meteor/aldeed:collection2/static.js'
  from new eager files server|client/00-collection2-init.js so main.js runs and
  patches attachSchema before collections load (v4 is fully lazy, no main module).
- fixtures.js disabled: @cleverbeagle/seeder uses sync Mongo, no Meteor 3 support
  (dev fixtures, not needed for smoke). Debt.
- sitemaps.js disabled: gadicohen:sitemaps@0.0.17 pre-0.9 API, no 'sitemaps'
  global on Meteor 3. Debt (SEO).
- Vendored restivus patched for async endpoints: route handler is async and
  awaits _callEndpoint; _callEndpoint awaits the action + auth/role checks.

NEXT: Rest.js endpoints + helpers (countRealFires/firesUnion/whichAreFalsePositives/
fireFromHash/subscriptionsInsert/upsertFalsePositive) still use sync Mongo
(.count()/.findOne()/.fetch()/.insert()/.upsert()) -> convert to *Async, then
smoke test against Mongo 7.
2026-07-14 06:11:00 +02:00
25dc1b99c0 WIP(meteor3): boot progresses past linker + several async fixes
Past the client-bundle underscore linker (pin underscore@1.6.4) and now working
through the server async/await migration on Meteor 3.1 + Mongo 7:

- Removed fibers (imports/startup/server/fibers.js + import) — gone in Meteor 3.
- accounts/oauth.js: upsert -> upsertAsync (top-level await).
- migrations.js: startup async + await Migrations.migrateTo (async in 2.x).
  mongo7 marked at version 18 so historical up() bodies (still sync Mongo) don't
  run — prod data restores already-migrated. Documented.
- subsUnion.js: fully async (fetchAsync/findOneAsync/countAsync/upsertAsync,
  observeAsync with async callbacks).
- facts.js: dropped dead sync findOne.
- email.js: ostrio:mailer 2.5 is a default export (was named import); dropped
  removed static MailTime.Template (built-in default '{{{html}}}').

NEXT wall + remaining chain (multi-session):
1. aldeed:collection2@4.2.0 needs simpl-schema 3.x (app has 1.x) -> 'attachSchema
   is not a function'. Requires upgrading npm simpl-schema to 3.x and migrating
   all collection schemas (SimpleSchema.RegEx.Id etc.) across ~8 files.
2. Rest.js + helpers (countRealFires/firesUnion/whichAreFalsePositives/
   fireFromHash/subscriptionsInsert/upsertFalsePositive) -> *Async.
3. Patch vendored restivus to await async endpoint handlers.
4. methods/publications/comments to async; cron SyncedCron(quave)/Facts imports.
5. alanning:roles@1.2.10 + gadicohen:sitemaps@0.0.17 warn incompatible -> bump.
6. React 16 -> 18 render root.

Run with: NODE_OPTIONS='--dns-result-order=ipv4first --no-network-family-autoselection'
MONGO_URL='mongodb://localhost:27019/fuegos?replicaSet=rs0'
2026-07-13 23:46:45 +02:00
8fa10e47c7 WIP: Meteor 2.5 -> 3.1 migration (package resolution done; build blocked)
Reaches release METEOR@3.1 with all package-version conflicts resolved against a
modern dockerized MongoDB 7 (replica set). NOT yet building — parked here.

Done:
- MongoDB 7 single-node replica set (docker, port 27019) as the fuegos DB,
  decoupled from the shared rsmain 3.2 (unblocks Meteor 3's mongodb driver).
- meteor update --release 3.1 resolves after swapping dead packages:
  mongo-livedata removed; facts -> facts-base; saucecode:timezoned-synced-cron
  -> quave:synced-cron; aldeed:collection2-core -> aldeed:collection2@4.0.4;
  mys:fonts removed (pinned caching-compiler@1.0.0); fourseven:scss 4.14.1 ->
  5.0.0 (Dart Sass, no node-sass) + sass installed; nimble-restivus vendored
  package loosened to accounts-password 2.x||3.x.
- Network: meteor-tool node 22 needs NODE_OPTIONS='--dns-result-order=ipv4first
  --no-network-family-autoselection' to reach warehouse.meteor.com (Happy
  Eyeballs picks an unreachable IPv6 otherwise).
- smoke/smoke.sh generalized to mongosh + configurable port for Mongo 7.

Blocked on (remaining Meteor 3 work):
1. Client bundle linker: 'Runtime is not available, but it uses features needing
   the runtime: underscore' — an old client atmosphere package needs replacing.
2. Server async/await migration (Rest.js + helpers + methods + publications +
   comments + subsUnion + migrations to *Async; no Fibers).
3. Patch vendored restivus to await async endpoint handlers.
4. cron.js SyncedCron import (quave), facts.js Facts import (facts-base).
5. React 16 -> 18 render root (createRoot).
6. SCSS @import/@use + lighten/darken -> color.adjust (dart-sass deprecations).
2026-07-13 23:25:29 +02:00
bddeca79a0 docs: confirm Mongo 3.2 ceiling = Meteor 2.5 (2.6 driver 4.x rejects wire v4)
Empirically verified: 2.4 and 2.5 green against mongo:3.2 (npm-mongo 3.9.1);
2.6 bumps npm-mongo to 4.3.1 which refuses MongoDB < 3.6
(MongoCompatibilityError, wire version 4). Branch lands on Meteor 2.5.
2026-07-13 22:40:40 +02:00
208e250277 escala: Meteor 2.4 -> 2.5 (Mongo 3.2 compatible, smoke byte-identical)
npm-mongo still 3.9.1 (driver 3.x). All 12 REST endpoints identical against
mongo:3.2.
2026-07-13 22:34:14 +02:00
9b0c53fa4a escala: Meteor 2.3 -> 2.4 (Mongo 3.2 compatible, smoke byte-identical)
Trivial escala; npm-mongo still driver 3.x. All 12 REST endpoints identical
against mongo:3.2.
2026-07-13 22:30:32 +02:00
dbe2f3759f docs: UPGRADE.md — escalas 1.11/2.3, dead-package remediation, Mongo 3.2 ceiling, 3.x blockers 2026-07-13 22:26:50 +02:00
cd570b9d9c escala 2+3: Meteor 1.8.3 -> 2.3 (Mongo 3.2 compatible), dead-package remediation
Reaches Meteor 2.3 building + running against Mongo 3.2, REST smoke test
byte-identical to the 1.6.1.1 baseline (all 12 Flutter endpoints green).

Dead/abandoned Atmosphere packages removed or replaced (the upgrade blockers):
- arkham:comments-ui (no Meteor 2.x build; pinned accounts-password@1.x):
  reimplemented the fire-page comments as a React feature:
    imports/api/Comments/ (collection, server methods, publication, media
    analyzers, new-fire-comment email) + imports/ui/components/Comments/CommentsBox.
    Comment text now rendered as safe plain text + image/youtube embed (was
    markdown-to-HTML). Wired into Fires.js; sitemaps.js + migration v11 updated
    to the new collection. Old Blaze/startup comments files deleted.
- nimble:restivus (REST API; pinned accounts-password@1.3.3, CoffeeScript source
  that crashes this build host): vendored as a local package
  packages/nimble-restivus with the .coffee precompiled to plain JS and the
  accounts-password constraint loosened to 2.x. REST behavior unchanged
  (verified by smoke test). This also dropped the entire iron:router stack.
- maximum:server-transform (+ peerlibrary:*, meteorhacks:zones/inject-initial):
  unused; removal broke Meteor.publishTransformed in FalsePositives publications
  -> replaced with plain Meteor.publish (no transform was configured).
- less, markdown (no source files), and the dead test stack
  (meteortesting:mocha, practicalmeteor:chai, xolvio:cleaner) which transitively
  pulled coffeescript@1.0.17 — the build plugin that crashed meteor-tool
  (node_contextify assertion) on this machine. Removing it unblocked the build.
- fourseven:scss 4.5.4 -> 4.14.1 (node-sass 4.5.3 doesn't build on node 12).

npm-mongo driver at 2.3 is 3.9.x — still compatible with the production Mongo
3.2 replica set.
2026-07-13 22:24:09 +02:00
ccfc80547a escala 1: Meteor 1.6.1.1 -> 1.8.3
meteor update --release 1.8.3 + Babel beta->stable fix.

- Core packages bumped (meteor 1.9.3, ecmascript 0.13.2, mongo 1.7.0,
  npm-mongo 3.2.0 driver — still compatible with Mongo 3.2 server).
- Fix boot failure 'Cannot find @babel/runtime/helpers/objectSpread2':
  upgraded @babel/runtime 7.0.0-beta.44 -> ^7.29.7 (stable 7.x; not 8.x).
- underscore auto-added, fetch/modern-browsers added by the release.

REST smoke test byte-identical to baseline. See UPGRADE.md.
2026-07-13 19:59:58 +02:00
dc8a05a0d4 notif: remove code migrated to tcef-notifications microservice
The push/email notification processing now lives in the tcef-notifications
service (fases 1a-1c). Removed from the web:
- imports/startup/server/notificationsObserver.js (observe Notifications -> processNotif)
- imports/modules/server/notificationsProcess.js (node-gcm push + notif emails)
- the 'Process pending notif' SyncedCron job in cron.js
- node-gcm dependency (dead Google API since jun-2024)

subsUnion.js is KEPT: it feeds the subs-public-union SiteSettings that the REST
API (status/subs-public-union) serves to the Flutter app; it is not part of the
notifications pipeline.

DEPLOY ORDERING (see UPGRADE.md): production must not run this build until the
tcef-notifications service is emitting in prod — otherwise notifications stop.
REST smoke test green (byte-identical).
2026-07-13 19:45:13 +02:00
296dab4f38 smoke: REST API regression harness + baseline snapshots (Meteor 1.6.1.1)
Adds a standalone Node smoke test (smoke/) that exercises every REST endpoint
consumed by the Flutter app against a seeded local dev server and compares
responses to committed snapshots. This is the safety net for the Meteor upgrade:
it must stay byte-identical after every escala.

- smoke/seed.js: deterministic Mongo seed (fixed ObjectIds, geo indexes)
- smoke/run.js: calls endpoints, normalizes volatile fields, diffs snapshots
- smoke/smoke.sh: seed + run wrapper
- smoke/snapshots/: baseline captured on Meteor 1.6.1.1
- IPGeocoder.js: degrade gracefully when MaxMind DB absent (dev boot)
- settings-development.json: dev-only internalApiToken to enable the REST API
- .meteorignore: exclude smoke/ from the Meteor server build
2026-07-13 19:42:55 +02:00
39415808bf Fase 1a: flag de cutover notifDisabledChannels en processNotif
Guard reversible al inicio de processNotif: los canales listados en
settings.private.notifDisabledChannels (p.ej. ['mobile','web']) los gestiona el
microservicio tcef-notifications, y el observer/cron viejos los ignoran.
Exclusion mutua por canal sin desplegar codigo (solo editar settings).
ES5-compatible (Meteor 1.6 / Node 8).
2026-07-13 00:10:39 +02:00
9d92ec4f88 deps: regenera package-lock.json y actualiza puntero de meteor-comments-ui 2026-07-12 23:26:17 +02:00
2a31435135 Refactor server startup: elimina segfaults, añade leaflet-workaround
Retira import './segfaults' (workaround de crash obsoleto) y añade
leaflet-workaround.js (shims global window/document/navigator para
render de Leaflet en servidor). Ajustes menores en publications de
FalsePositives y subsUnion.
2026-07-12 23:26:16 +02:00
8281fa3427 chore: ignorar settings-production-*.json y settings-tests.json (secretos) 2026-07-12 23:26:16 +02:00
vjrj
ee7af168d6 Update meteor dev user/pass 2022-08-14 21:53:41 +02:00
vjrj
4cbbe65fa3 Fix wrong grey tiles 2022-08-13 19:37:56 +02:00
vjrj
b9457fe141 Minor changes in fires union 2018-12-23 13:31:41 +01:00
vjrj
c4cb52abaf Improved chimp command in README 2018-11-18 18:01:38 +01:00
vjrj
423dbc5ed9 Added optional chimp configuration 2018-11-18 18:01:17 +01:00
vjrj
1fdf86dd47 Union of subs 'null' when app is initialized 2018-11-18 16:24:49 +01:00
vjrj
5f9a84dfd7 Unify don't calc boundaries of empty union 2018-11-18 15:45:14 +01:00
vjrj
564b9e8ead Trying to fix race condition in i18n load 2018-11-18 15:43:48 +01:00
vjrj
df51368d50 Better log in error 2018-11-18 15:05:04 +01:00
vjrj
0f6dd21541 Removed watch to test 2018-11-18 15:04:46 +01:00
vjrj
8903c765e3 Minor refactor 2018-11-18 14:27:51 +01:00
vjrj
266707052c Better error message 2018-11-18 14:27:34 +01:00
vjrj
3f8bc3666b Fixed index DOM warning. Google Play btn height 2018-11-18 13:08:36 +01:00
vjrj
6abe668740 Added fires union (wip) 2018-11-18 11:48:03 +01:00
vjrj
7b5f17fbe8 Added activeFiresUnion (wip) 2018-10-28 20:27:38 +01:00
vjrj
8b598fab7c Disabled fires render 2018-10-15 06:02:05 +02:00
vjrj
cb7aeda4b8 Create a sender on each message 2018-09-20 15:21:38 +02:00
vjrj
181f488263 New map libs 2018-09-20 15:21:17 +02:00