@codebam/cf-workers-telegram-bot 9.1.0 → 9.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/webhook.js +4 -2
  2. package/package.json +11 -11
package/dist/webhook.js CHANGED
@@ -24,7 +24,8 @@ export default class Webhook {
24
24
  * @throws Will throw an error if the fetch request fails
25
25
  */
26
26
  async set() {
27
- const url = new URL(`${this.api.toString()}setWebhook`);
27
+ const baseUrl = this.api.toString();
28
+ const url = new URL(`${baseUrl}${baseUrl.endsWith('/') ? '' : '/'}setWebhook`);
28
29
  // Configure webhook parameters
29
30
  const params = new URLSearchParams({
30
31
  url: this.webhook.toString(),
@@ -47,7 +48,8 @@ export default class Webhook {
47
48
  * @throws Will throw an error if the fetch request fails
48
49
  */
49
50
  async delete() {
50
- const url = new URL(`${this.api.toString()}deleteWebhook`);
51
+ const baseUrl = this.api.toString();
52
+ const url = new URL(`${baseUrl}${baseUrl.endsWith('/') ? '' : '/'}deleteWebhook`);
51
53
  try {
52
54
  return await fetch(url.toString());
53
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebam/cf-workers-telegram-bot",
3
- "version": "9.1.0",
3
+ "version": "9.1.3",
4
4
  "description": "serverless telegram bot on cf workers",
5
5
  "main": "./dist/main.js",
6
6
  "module": "./dist/main.js",
@@ -31,16 +31,16 @@
31
31
  "url": "https://github.com/codebam/cf-workers-telegram-bot.git"
32
32
  },
33
33
  "devDependencies": {
34
- "@cloudflare/workers-types": "^4.20250303.0",
35
- "@eslint/js": "^9.21.0",
36
- "@typescript-eslint/eslint-plugin": "^8.26.0",
37
- "@typescript-eslint/parser": "^8.26.0",
38
- "eslint": "^9.21.0",
39
- "eslint-config-prettier": "^10.0.2",
40
- "globals": "^16.0.0",
34
+ "@cloudflare/workers-types": "^4.20250620.0",
35
+ "@eslint/js": "^9.29.0",
36
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
37
+ "@typescript-eslint/parser": "^8.34.1",
38
+ "eslint": "^9.29.0",
39
+ "eslint-config-prettier": "^10.1.5",
40
+ "globals": "^16.2.0",
41
41
  "prettier": "^3.5.3",
42
- "typescript": "^5.8.2",
43
- "typescript-eslint": "^8.26.0",
44
- "vitest": "^3.0.8"
42
+ "typescript": "^5.8.3",
43
+ "typescript-eslint": "^8.34.1",
44
+ "vitest": "^3.2.4"
45
45
  }
46
46
  }