@gonzih/cc-tg 0.2.14 → 0.2.15

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.
package/dist/bot.d.ts CHANGED
@@ -43,3 +43,4 @@ export declare class CcTgBot {
43
43
  private killSession;
44
44
  stop(): void;
45
45
  }
46
+ export declare function splitMessage(text: string, maxLen?: number): string[];
package/dist/bot.js CHANGED
@@ -780,7 +780,7 @@ function downloadToFile(url, destPath) {
780
780
  }).on("error", reject);
781
781
  });
782
782
  }
783
- function splitMessage(text, maxLen = 4096) {
783
+ export function splitMessage(text, maxLen = 4096) {
784
784
  if (text.length <= maxLen)
785
785
  return [text];
786
786
  const chunks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonzih/cc-tg",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Claude Code Telegram bot — chat with Claude Code via Telegram",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,10 @@
9
9
  "scripts": {
10
10
  "build": "tsc",
11
11
  "start": "node dist/index.js",
12
- "dev": "node --loader ts-node/esm src/index.ts"
12
+ "dev": "node --loader ts-node/esm src/index.ts",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest",
15
+ "test:coverage": "vitest run --coverage"
13
16
  },
14
17
  "files": [
15
18
  "dist/"
@@ -20,7 +23,9 @@
20
23
  "devDependencies": {
21
24
  "@types/node": "^22.0.0",
22
25
  "@types/node-telegram-bot-api": "^0.64.0",
23
- "typescript": "^5.5.0"
26
+ "@vitest/coverage-v8": "^4.1.0",
27
+ "typescript": "^5.5.0",
28
+ "vitest": "^4.1.0"
24
29
  },
25
30
  "repository": {
26
31
  "type": "git",