{ "name": "meshcore-analytics-backend", "version": "2.0.0", "private": true, "type": "module", "scripts": { "build": "tsc", "dev": "tsx watch src/index.ts", "spam:recompute": "node dist/tools/recomputeSpamSuspects.js", "identity:backfill": "node dist/tools/backfillPacketIdentity.js", "spam:messages": "node dist/tools/recomputeSpamMessages.js", "regions:rebuild": "node dist/tools/rebuildRegionParticipation.js", "db:migrate": "node dist/tools/migrate.js", "stats:backfill-rollups": "node dist/tools/backfillStatsRollups.js", "stats:backfill-multibyte": "node dist/tools/backfillMultibytePathFacts.js", "stats:seed-chart-snapshot": "node dist/tools/seedStatsChartSnapshot.js", "db:lifecycle": "node dist/tools/dataLifecycle.js", "privacy:converge": "node dist/tools/convergePacketVisibility.js", "owner-auth:inventory": "node dist/tools/inventoryOwnerAuthorization.js", "owner-auth:revoke": "node dist/tools/revokeOwnerSessions.js", "owner-packet-share:encrypt-secret": "node dist/tools/encryptPacketShareSecret.js", "owner-packet-share:prepare-scotmesh": "node dist/tools/prepareScotmesh.js", "owner-packet-share:provision-scotmesh": "node dist/tools/provisionScotmesh.js", "analysis:cleanup-orphans": "node dist/tools/cleanupOrphanedAnalysisRuns.js", "bench:decode": "tsx src/tools/benchmarkPacketDecode.ts", "bench:mqtt-caches": "tsx src/tools/benchmarkMqttCacheSweeps.ts", "path:accuracy": "tsx src/tools/pathAccuracy.ts", "load:realtime": "tsx src/tools/loadRealtime.ts", "test": "node --import tsx --test $(find src -name '*.test.ts' ! -name '*.integration.test.ts' -print) && bash ../scripts/test-alert-receiver.sh", "test:owner-integration": "timeout 120s node --import tsx --test src/owner/ownerAuth*.integration.test.ts src/owner/enrollmentStore.integration.test.ts", "test:analysis-integration": "node scripts/run-analysis-integration.mjs", "test:schema-fixtures": "timeout 400s node --import tsx --test src/owner/packetShareRepository.integration.test.ts src/spam/repository.integration.test.ts src/db/nodeNameHistory.integration.test.ts", "test:owner-last-hop-integration": "timeout 120s node --import tsx --test src/owner/ownerService.integration.test.ts", "test:owner-acl-integration": "node --import tsx --test src/owner/ownerAclArtifacts.integration.test.ts", "test:external-consumers": "npm run test:external-consumers:sql && npm run test:external-consumers:views", "test:external-consumers:sql": "python3 ../scripts/check_external_consumer_sql.py --root ../backend/src --root ../viewshed-worker", "test:external-consumers:views": "node --import tsx --test src/db/externalConsumerCompat.integration.test.ts", "test:vacuum-integration": "node --import tsx --test src/health/vacuumBacklog.integration.test.ts", "test:privacy-integration": "node --import tsx --test src/db/visibilityConvergence.integration.test.ts src/http/publicJson.integration.test.ts", "test:migration-supersession": "timeout 240s node --import tsx --test src/db/migrationSupersession.integration.test.ts", "test:regions": "node --import tsx --test src/features.test.ts src/regions/filter.test.ts src/api/routes/regionScoping.test.ts src/api/routes/pathing.test.ts src/db/regionScoping.test.ts src/repositories/nodes.test.ts src/ws/regionScoping.test.ts src/ram/liveStore.test.ts", "test:regions-integration": "timeout 120s node --import tsx --test src/regions/snapshotRefresh.integration.test.ts src/db/regionScoping.integration.test.ts src/ws/regionScoping.integration.test.ts", "test:ingest-integration": "timeout 300s node --import tsx --test --test-concurrency=1 src/mqtt/spamSnapshot.integration.test.ts src/health/capacity.integration.test.ts src/health/linkActivity.integration.test.ts src/path-learning/rebuild.integration.test.ts src/db/ingest.integration.test.ts src/db/databaseRuntime.integration.test.ts src/db/disposableDatabase.integration.test.ts src/tools/lookupBenchmarkSession.integration.test.ts src/db/preparedPacketBatch.integration.test.ts src/db/packetBatchPrivacy.integration.test.ts src/ingest/advertIdentity.integration.test.ts src/ingest/quarantine.integration.test.ts src/db/packetBatch.integration.test.ts src/db/recentRead.integration.test.ts src/db/packetDailyBoundary.integration.test.ts src/db/nodeIdentityRefresh.integration.test.ts src/db/ledgerArchive.integration.test.ts src/db/privacyCompletion.integration.test.ts src/db/silentRecovery.integration.test.ts src/api/routes/mqttNodes.integration.test.ts && timeout 90s node --import tsx --test src/ram/ram.integration.test.ts && timeout 60s node --import tsx --test src/ws/publicAuthorization.integration.test.ts", "test:migration-integration": "timeout 300s node --import tsx --test --test-concurrency=1 src/db/migrationBootstrap.integration.test.ts src/db/legacyMoveReplay.integration.test.ts src/db/onlineMigration.integration.test.ts", "test:ram-operational": "timeout 300s node ../scripts/test-ram-redis-acl.mjs", "typecheck": "tsc --noEmit", "contract:generate": "tsx src/tools/generateOpenApi.ts", "contract:check": "tsx src/tools/generateOpenApi.ts --check", "start": "node dist/index.js", "sample:load": "tsx src/tools/loadSampleDataset.ts", "sample:replay": "tsx src/tools/replaySampleMqtt.ts", "sample:generate": "tsx src/tools/generateSampleDataset.ts", "sample:prepare": "tsx src/tools/prepareSampleDataset.ts", "sample:smoke": "tsx src/tools/smokeSampleReplay.ts", "test:sample-integration": "node --import tsx --test src/tools/samplePipeline.integration.test.ts src/tools/soakWorksetCounts.integration.test.ts src/stats/statsSummary.integration.test.ts src/tools/prepareChartSnapshots.integration.test.ts src/db/runtimePrivileges.integration.test.ts", "check": "npm run typecheck && npm test && npm run contract:check", "bench:api": "tsx src/tools/benchmarkApi.ts", "bench:ingest": "tsx src/tools/benchmarkIngest.ts", "bench:db": "tsx src/tools/benchmarkDatabase.ts", "bench:lookups": "tsx src/tools/benchmarkLookups.ts", "bench:lookup-parity": "tsx src/tools/checkLookupParity.ts", "bench:lookup-soak": "tsx src/tools/soakDatabaseLookups.ts", "sample:scale-lookups": "tsx src/tools/scaleLookupFixture.ts", "sample:lookup-scope": "tsx src/tools/prepareLookupScope.ts", "sample:refresh-recent": "tsx src/tools/refreshSampleRecent.ts" }, "dependencies": { "@michaelhart/meshcore-decoder": "^0.3.0", "@noble/ed25519": "2.3.0", "compression": "^1.8.2", "cors": "^2.8.5", "express": "^5.3.0", "express-rate-limit": "^8.7.5", "ioredis": "^6.1.0", "mqtt": "^5.16.1", "pg": "^8.23.1", "prom-client": "^15.1.3", "ws": "^8.23.0" }, "devDependencies": { "@types/compression": "^1.7.5", "@types/cors": "^2.8.17", "@types/express": "^5.0.6", "@types/node": "^26.6.6", "@types/pg": "^8.23.1", "@types/pg-copy-streams": "^1.2.5", "@types/ws": "^8.18.2", "pg-copy-streams": "^7.0.0", "tsx": "^4.23.15", "typescript": "^7.0.2" } }