chore: update all dependencies to latest versions

- @cfworker/web: 1.12.5 → 5.1.0 (breaking: use export fetch handler)
- @grammyjs/types: 3.1.1 → 3.22.2
- @cloudflare/workers-types: 4.20230404.0 → 4.20251205.0
- prettier: 2.8.8 → 3.7.4
- typescript: 5.0.4 → 5.9.3
- vitest: 0.30.1 → 4.0.15
- wrangler: 4.26.1 → 4.53.0

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Kyle Fang
2025-12-07 14:38:42 +08:00
parent 27f196a132
commit 82e95eb60e
3 changed files with 901 additions and 888 deletions

View File

@@ -2,12 +2,12 @@
"name": "telert",
"version": "0.0.0",
"devDependencies": {
"@cloudflare/workers-types": "^4.20230404.0",
"@grammyjs/types": "^3.1.1",
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vitest": "^0.30.1",
"wrangler": "4.26.1"
"@cloudflare/workers-types": "^4.20251205.0",
"@grammyjs/types": "^3.22.2",
"prettier": "^3.7.4",
"typescript": "^5.9.3",
"vitest": "^4.0.15",
"wrangler": "4.53.0"
},
"private": true,
"scripts": {
@@ -16,6 +16,6 @@
"test": "vitest"
},
"dependencies": {
"@cfworker/web": "^1.12.5"
"@cfworker/web": "^5.1.0"
}
}

1768
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -186,7 +186,12 @@ const cors: Middleware = async ({ req, res }, next) => {
await next();
};
new Application().use(cors).use(router.middleware).listen();
const app = new Application().use(cors).use(router.middleware);
export default {
fetch: (request: Request, env: any, ctx: ExecutionContext) =>
app.handleRequest(request, env, ctx),
};
async function processUpdate(update: Update): Promise<void> {
const message = update.message ?? update.channel_post;