mirror of
https://github.com/tiennm99/store-scraper-bot.git
synced 2026-10-20 02:18:18 +00:00
feat: replace MongoDB driver with Cloudflare KV storage
Drops the mongodb dependency entirely; all four logical collections (admin singleton, group, apple_app, google_app) now live in a single KV namespace bound as STORE_KV with prefixed keys. Cache TTL is delegated to KV via expirationTtl (clamped to the 60s minimum). Document shape, field names, and Java parity at the doc level are preserved. - Adds src/repository/kv.js helper (getJson/putJson/del with TTL clamp) - Rewrites all four *-repository.js modules on top of KV - Removes src/repository/mongodb.js and the MONGODB_URI env requirement - Adds an early STORE_KV-binding guard in src/index.js - Bumps to 0.3.0
This commit is contained in:
1 parent
00f49531e0
commit
9898f408a2
12 files changed
+81
-108
No files matched your search
+2
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "js-store-scraper-bot",
|
||||
"version": "0.2.0",
|
||||
"description": "JavaScript port of store-scraper-bot — Telegram bot tracking Apple App Store + Google Play app updates. Deploys to Cloudflare Workers.",
|
||||
"version": "0.3.0",
|
||||
"description": "JavaScript port of store-scraper-bot — Telegram bot tracking Apple App Store + Google Play app updates. Deploys to Cloudflare Workers, backed by Cloudflare KV.",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"engines": {
|
||||
@@ -15,9 +15,6 @@
|
||||
"register:dry": "node --env-file=.env.deploy scripts/register-webhook.js --dry-run",
|
||||
"lint": "node scripts/check-secret-leaks.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"mongodb": "^6.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"wrangler": "^3.90.0"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user