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).
This commit is contained in:
vjrj 2026-07-14 11:32:19 +02:00
parent 0ff9848cd4
commit eb3aec82ae
16 changed files with 194 additions and 50 deletions

View file

@ -16,7 +16,7 @@ Meteor.publish('activefirestotal', function total() {
return counter;
});
const activefires = (northEastLng, northEastLat, southWestLng, southWestLat, withMarks) => {
const activefires = async (northEastLng, northEastLat, southWestLng, southWestLat, withMarks) => {
const fires = ActiveFires.find({
ourid: {
$geoWithin: {
@ -36,10 +36,10 @@ const activefires = (northEastLng, northEastLat, southWestLng, southWestLat, wit
}
});
if (Meteor.isDevelopment) console.log(`Active fires total: ${fires.count()}`);
if (Meteor.isDevelopment) console.log(`Active fires total: ${await fires.countAsync()}`);
if (withMarks && fires.fetch().length > 0) {
const union = firesUnion(fires);
if (withMarks && (await fires.fetchAsync()).length > 0) {
const union = await firesUnion(fires);
const falsePos = whichAreFalsePositives(FalsePositives, union);
const industries = whichAreFalsePositives(Industries, union);
return [fires, falsePos, industries];
@ -48,7 +48,7 @@ const activefires = (northEastLng, northEastLat, southWestLng, southWestLat, wit
return fires;
};
Meteor.publish('activefiresmyloc', function activeInMyLoc(northEastLng, northEastLat, southWestLng, southWestLat, withMarks) {
Meteor.publish('activefiresmyloc', async function activeInMyLoc(northEastLng, northEastLat, southWestLng, southWestLat, withMarks) {
// latitude -90 and 90 and the longitude between -180 and 180
check(northEastLng, NumberBetween(-180, 180));
check(southWestLat, NumberBetween(-90, 90));

View file

@ -16,7 +16,7 @@ Meteor.publish('activefiresuniontotal', function total() {
return counter;
});
const activeFiresUnion = (b1, b2, c1, c2, withMarks) => {
const activeFiresUnion = async (b1, b2, c1, c2, withMarks) => {
// a --- b
// c --- d
const geometry = {
@ -46,7 +46,7 @@ const activeFiresUnion = (b1, b2, c1, c2, withMarks) => {
}
});
if (Meteor.isDevelopment) console.log(`Active fires union total: ${fires.count()}`);
if (Meteor.isDevelopment) console.log(`Active fires union total: ${await fires.countAsync()}`);
/*
if (withMarks && fires.fetch().length > 0) {
@ -59,7 +59,7 @@ const activeFiresUnion = (b1, b2, c1, c2, withMarks) => {
return fires;
};
Meteor.publish('activefiresunionmyloc', function activeInMyLoc(northEastLng, northEastLat, southWestLng, southWestLat, withMarks) {
Meteor.publish('activefiresunionmyloc', async function activeInMyLoc(northEastLng, northEastLat, southWestLng, southWestLat, withMarks) {
// latitude -90 and 90 and the longitude between -180 and 180
check(northEastLng, NumberBetween(-180, 180));
check(southWestLat, NumberBetween(-90, 90));

View file

@ -6,7 +6,7 @@ import { check } from 'meteor/check';
import { NumberBetween } from '/imports/modules/server/other-checks';
import FireAlerts from '../FireAlerts';
Meteor.publish('fireAlerts', function fireAlerts(northEastLng, northEastLat, southWestLng, southWestLat) {
Meteor.publish('fireAlerts', async function fireAlerts(northEastLng, northEastLat, southWestLng, southWestLat) {
// latitude -90 and 90 and the longitude between -180 and 180
check(northEastLng, NumberBetween(-180, 180));
check(southWestLat, NumberBetween(-90, 90));
@ -37,6 +37,6 @@ Meteor.publish('fireAlerts', function fireAlerts(northEastLng, northEastLat, sou
track: 1
}
});
if (Meteor.isDevelopment) console.log(`Neighbour alerts total: ${fires.count()}`);
if (Meteor.isDevelopment) console.log(`Neighbour alerts total: ${await fires.countAsync()}`);
return fires;
});

View file

@ -4,16 +4,16 @@ import { ServiceConfiguration } from 'meteor/service-configuration';
import rateLimit from '../../../modules/rate-limit';
Meteor.methods({
'oauth.verifyConfiguration': function oauthVerifyConfiguration(services) {
'oauth.verifyConfiguration': async function oauthVerifyConfiguration(services) {
check(services, Array);
try {
const verifiedServices = [];
services.forEach((service) => {
if (ServiceConfiguration.configurations.findOne({ service })) {
for (const service of services) {
if (await ServiceConfiguration.configurations.findOneAsync({ service })) {
verifiedServices.push(service);
}
});
}
return verifiedServices.sort();
} catch (exception) {
throw new Meteor.Error('500', exception);