mirror of
https://github.com/jason5ng32/MyIP.git
synced 2026-11-04 08:55:47 +00:00
MaxMind and CAIDA each had their own updater with its own lock, state file, publish step, boot download and timer. One engine (common/dataset-updater.js) now owns all of that, and each dataset is a row in common/datasets.js that holds only its own logic: find the newest remote version, fetch or distill it, validate, reload. - Locks: proper-lockfile, a heartbeat lock shared by every process, so a crashed holder's lock goes stale on its own; a booting server waits for a live holder and loads what it published. - State: one file per dataset, written with write-file-atomic; the old .maxmind-update-state.json / .caida-update-state.json are read once, so an upgrade doesn't re-download. - Schedule: croner at a fixed time (DATASET_UPDATE_CRON, default 04:30 local) instead of 24 h from process start, plus a catch-up run at boot for a check a downtime skipped. DATASET_AUTO_UPDATE (default on) replaces MAXMIND_AUTO_UPDATE / CAIDA_AUTO_UPDATE, which still apply when it is unset. - Reload: the engine watches every dataset's files, so a publish by another process or a hand-placed .mmdb is picked up; MaxMind's own watcher goes. MaxMind's City and ASN editions now publish together under one version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
88 lines
3.0 KiB
JSON
88 lines
3.0 KiB
JSON
{
|
|
"name": "myip",
|
|
"private": true,
|
|
"version": "7.7.0",
|
|
"type": "module",
|
|
"packageManager": "pnpm@12.4.2",
|
|
"engines": {
|
|
"node": ">=24"
|
|
},
|
|
"scripts": {
|
|
"dev": "concurrently \"vite\" \"nodemon --import ./sentry-instrument.js backend-server.js\"",
|
|
"build": "vite build",
|
|
"postbuild": "node -e \"const{existsSync}=require('fs');const{spawnSync}=require('child_process');if(existsSync('scripts/purge-index-cache.js')){const r=spawnSync(process.execPath,['scripts/purge-index-cache.js'],{stdio:'inherit'});process.exit(r.status??1)}\"",
|
|
"test": "node --import ./tests/setup.js --test tests/*.test.js",
|
|
"check": "pnpm run test && pnpm run build",
|
|
"preview": "vite preview",
|
|
"start-backend": "node --import ./sentry-instrument.js backend-server.js",
|
|
"start-frontend": "node frontend-server.js",
|
|
"start": "concurrently \"node frontend-server.js\" \"node --import ./sentry-instrument.js backend-server.js\"",
|
|
"purge-index": "node scripts/purge-index-cache.js",
|
|
"dns-check": "node scripts/check-dns-resolvers.js",
|
|
"fetch-favicons": "node scripts/fetch-favicons.js",
|
|
"i18n-status": "node scripts/i18n-status.js",
|
|
"i18n-new": "node scripts/i18n-scaffold.js new",
|
|
"i18n-sync": "node scripts/i18n-scaffold.js sync"
|
|
},
|
|
"dependencies": {
|
|
"@cloudflare/speedtest": "^1.14.0",
|
|
"@iconify-json/circle-flags": "^1.2.11",
|
|
"@iconify/vue": "^5.0.1",
|
|
"@khmyznikov/pwa-install": "^0.7.0",
|
|
"@lucide/vue": "^1.46.0",
|
|
"@photostructure/tz-lookup": "^11.7.0",
|
|
"@sentry/node": "^10.75.0",
|
|
"@sentry/vue": "^10.75.0",
|
|
"@tanstack/vue-table": "^9.2.4",
|
|
"@thumbmarkjs/thumbmarkjs": "^1.11.0",
|
|
"@vueuse/core": "^15.0.0",
|
|
"chart.js": "^4.5.1",
|
|
"chartjs-chart-geo": "^4.3.6",
|
|
"circle-progress.vue": "^3.4.1",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"concurrently": "^10.0.5",
|
|
"croner": "^10.0.1",
|
|
"dagre": "^0.8.5",
|
|
"dotenv": "^17.4.2",
|
|
"express": "^5.2.1",
|
|
"express-rate-limit": "^8.7.0",
|
|
"express-slow-down": "^3.1.1",
|
|
"firebase": "^12.19.0",
|
|
"html-to-image": "^1.11.13",
|
|
"http-proxy-middleware": "^4.2.0",
|
|
"maxmind": "^5.0.7",
|
|
"pinia": "^4.0.3",
|
|
"pino": "^10.3.1",
|
|
"pino-http": "^11.0.0",
|
|
"pino-pretty": "^13.1.3",
|
|
"proper-lockfile": "^4.1.2",
|
|
"reka-ui": "^2.10.4",
|
|
"tailwind-merge": "^3.7.0",
|
|
"tar": "^7.5.22",
|
|
"tw-animate-css": "^1.4.0",
|
|
"ua-parser-js": "^2.0.10",
|
|
"unbzip2-stream": "^1.4.3",
|
|
"vaul-vue": "^0.4.1",
|
|
"vue": "^3.5.42",
|
|
"vue-i18n": "^11.4.12",
|
|
"vue-input-otp": "^0.4.0",
|
|
"vue-markdown-render": "^2.3.1",
|
|
"vue-router": "^5.3.1",
|
|
"vue-sonner": "^2.0.9",
|
|
"whoiser": "^1.18.0",
|
|
"world-atlas": "^2.0.2",
|
|
"write-file-atomic": "^8.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@sentry/vite-plugin": "^5.4.0",
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
"code-inspector-plugin": "^2.0.9",
|
|
"nodemon": "^3.1.14",
|
|
"tailwindcss": "^4.3.3",
|
|
"vconsole": "^3.15.1",
|
|
"vite": "^8.3.0"
|
|
}
|
|
}
|