mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-27 18:20:40 +00:00
1e01437766
Adds loldle module with classic-mode champion guessing. Ports comparison logic from tiennm99/loldle (lib/classic-mode.js) and bundles champion data from tiennm99/loldle-data. Adds GH Actions workflow that re-syncs champions.json on cross-repo dispatch from loldle-data. - Three public commands: /loldle, /loldle_giveup, /loldle_stats - Per-user daily state + streak stats in KV (3-day TTL on games) - champions-data.js wrapper sidesteps Node 24 / esbuild disagreement on JSON import attributes; generator script + npm run build:loldle-data - register script now tolerates missing .env.deploy (env-file-if-exists) so Workers Builds can inject env vars directly - fix(scripts): escape stray */ in migrate.js docstring that broke node - 16 new unit tests (compare, daily, lookup); dispatcher test updated for the new command set
32 lines
1013 B
JSON
32 lines
1013 B
JSON
{
|
|
"name": "miti99bot",
|
|
"version": "0.1.0",
|
|
"description": "Telegram bot with plug-n-play module system, deployed to Cloudflare Workers.",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=20.6"
|
|
},
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"build:loldle-data": "node scripts/build-loldle-data.js",
|
|
"deploy": "npm run build:loldle-data && wrangler deploy && npm run db:migrate && npm run register",
|
|
"db:migrate": "node scripts/migrate.js",
|
|
"register": "node --env-file-if-exists=.env.deploy scripts/register.js",
|
|
"register:dry": "node --env-file-if-exists=.env.deploy scripts/register.js --dry-run",
|
|
"lint": "biome check src tests scripts && eslint src",
|
|
"format": "biome format --write src tests scripts",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"grammy": "^1.30.0"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^1.9.0",
|
|
"eslint": "^10.2.0",
|
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
"vitest": "^2.1.0",
|
|
"wrangler": "^3.90.0"
|
|
}
|
|
}
|