mirror of
https://github.com/tiennm99/store-scraper-bot.git
synced 2026-10-17 10:14:58 +00:00
feat: migrate to Vercel + Upstash with KEY_PREFIX namespacing
Phases 1-5 of consolidate-vercel-upstash plan. Replaces Cloudflare Workers + KV with Vercel serverless functions + Upstash Redis. Inlines app-store-scraper / google-play-scraper npm libs (drops the store-scraper.vercel.app HTTP roundtrip). KEY_PREFIX (default 'store-scraper-bot:') namespaces all Redis keys so the Upstash DB can be safely shared with other Vercel projects. - vercel.json + .vercelignore + Vercel-aware package.json scripts - api/webhook.js + api/cron.js Vercel functions (with shared src/app-builder.js); cron auth fails closed when CRON_SECRET unset - src/repository/upstash.js replaces kv.js; all 4 repos take a handle bundling client + prefix - scripts/migrate-atlas-to-upstash.js writes legacy Java Atlas state directly to Upstash with --dry-run + --include-cache flags - .env.example refreshed for the new env surface Phases 6 (Vercel deploy + webhook cutover) and 7 (Docker + wrangler cleanup) remain operator-driven post-deploy.
This commit is contained in:
1 parent
cf17071679
commit
73762fa0a0
33 files changed
+4011
-488
No files matched your search
+12
-6
@@ -7,19 +7,25 @@
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"main": "api/webhook.js",
|
||||
"scripts": {
|
||||
"dev": "wrangler dev",
|
||||
"deploy": "wrangler deploy && npm run register",
|
||||
"dev": "vercel dev",
|
||||
"deploy": "vercel deploy --prod && npm run register",
|
||||
"register": "node --env-file=.env.deploy scripts/register-webhook.js",
|
||||
"register:dry": "node --env-file=.env.deploy scripts/register-webhook.js --dry-run",
|
||||
"migrate": "node --env-file=.env scripts/migrate-atlas-to-kv.js",
|
||||
"migrate:bulk": "wrangler kv bulk put --binding STORE_KV --remote scripts/.atlas-export.json",
|
||||
"migrate": "node --env-file=.env.deploy scripts/migrate-atlas-to-upstash.js",
|
||||
"migrate:dry": "node --env-file=.env.deploy scripts/migrate-atlas-to-upstash.js --dry-run",
|
||||
"lint": "node scripts/check-secret-leaks.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mongodb": "^6.10.0",
|
||||
"wrangler": "^3.90.0"
|
||||
},
|
||||
"license": "Apache-2.0"
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@upstash/redis": "^1.38.0",
|
||||
"@vercel/functions": "^3.5.1",
|
||||
"app-store-scraper": "^0.18.0",
|
||||
"google-play-scraper": "^10.1.2"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user