teleton 0.7.4 → 0.7.5

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 (35) hide show
  1. package/README.md +36 -26
  2. package/dist/{chunk-XDYDA2KV.js → chunk-2GLHOJ5C.js} +268 -59
  3. package/dist/chunk-5UVXJMOX.js +292 -0
  4. package/dist/{chunk-BGC2IUM5.js → chunk-AVDWXYQ7.js} +65 -20
  5. package/dist/{chunk-RMLQS3X6.js → chunk-CB2Y45HA.js} +106 -1
  6. package/dist/{chunk-5PLZ3KSO.js → chunk-DMXTIRUW.js} +5 -6
  7. package/dist/{chunk-YFG2QHLA.js → chunk-G2LLMJXJ.js} +1578 -115
  8. package/dist/{chunk-EK7M5K26.js → chunk-LCCVZ4D2.js} +3 -3
  9. package/dist/{chunk-LAQOUFOJ.js → chunk-OGMVWDVU.js} +3517 -3620
  10. package/dist/{chunk-4DU3C27M.js → chunk-R4YSJ4EY.js} +5 -1
  11. package/dist/{chunk-XBKSS6DM.js → chunk-VFA7QMCZ.js} +5 -3
  12. package/dist/{chunk-VAUJSSD3.js → chunk-XQUHC3JZ.js} +1 -1
  13. package/dist/{chunk-RO62LO6Z.js → chunk-YP25WTQK.js} +2 -0
  14. package/dist/cli/index.js +92 -28
  15. package/dist/{client-RTNALK7W.js → client-O37XDCJB.js} +4 -5
  16. package/dist/index.js +12 -13
  17. package/dist/{memory-JQZ6MTRU.js → memory-KQALFUV3.js} +6 -7
  18. package/dist/{migrate-GS5ACQDA.js → migrate-UV3WEL5D.js} +6 -7
  19. package/dist/{server-TCJOBV3D.js → server-BHHJGUDF.js} +35 -9
  20. package/dist/{setup-server-YHYJLAMA.js → setup-server-G7UG2DI3.js} +21 -9
  21. package/dist/store-H4XPNGC2.js +34 -0
  22. package/dist/{task-dependency-resolver-WKZWJLLM.js → task-dependency-resolver-VMEVJRPO.js} +2 -2
  23. package/dist/{task-executor-PD3H4MLO.js → task-executor-WWSPBJ4V.js} +1 -1
  24. package/dist/{tool-index-6HBRVXVG.js → tool-index-2KH3OB6X.js} +5 -5
  25. package/dist/web/assets/index-BrVqauzj.css +1 -0
  26. package/dist/web/assets/index-Bx8JW3gV.js +72 -0
  27. package/dist/web/assets/{index.es-CqZHj0tz.js → index.es-Pet5-M13.js} +1 -1
  28. package/dist/web/index.html +2 -2
  29. package/package.json +2 -2
  30. package/dist/chunk-JQDLW7IE.js +0 -107
  31. package/dist/chunk-UCN6TI25.js +0 -143
  32. package/dist/web/assets/index-B6M9knfJ.css +0 -1
  33. package/dist/web/assets/index-DAGeQfVZ.js +0 -72
  34. package/scripts/patch-gramjs.sh +0 -46
  35. package/scripts/postinstall.mjs +0 -16
@@ -1,46 +0,0 @@
1
- #!/bin/bash
2
- # Patch GramJS TL schema to support KeyboardButtonStyle (Telegram layer 222)
3
- # This adds colored button support for inline keyboards via MTProto.
4
- #
5
- # New constructors:
6
- # keyboardButtonStyle#4fdd3430 - button color/style (bg_success, bg_danger, bg_primary)
7
- # keyboardButtonCallback#e62bc960 - updated callback button with optional style field
8
-
9
- set -euo pipefail
10
-
11
- # Resolve path: works for both local dev and global npm install
12
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
13
- PKG_ROOT="$(dirname "$SCRIPT_DIR")"
14
- APITL="$PKG_ROOT/node_modules/telegram/tl/apiTl.js"
15
-
16
- # Check if already patched
17
- if grep -q "keyboardButtonStyle#4fdd3430" "$APITL" 2>/dev/null; then
18
- echo "✅ GramJS TL schema already patched"
19
- exit 0
20
- fi
21
-
22
- # Check if file exists
23
- if [ ! -f "$APITL" ]; then
24
- echo "⚠️ GramJS not found at $APITL, skipping patch"
25
- exit 0
26
- fi
27
-
28
- # Verify the old constructor exists (guards against GramJS version changes)
29
- if ! grep -q "keyboardButtonCallback#35bbdb6b" "$APITL"; then
30
- echo "⚠️ Old keyboardButtonCallback#35bbdb6b not found, GramJS version may have changed"
31
- exit 0
32
- fi
33
-
34
- # Patch: replace old keyboardButtonCallback with:
35
- # 1. keyboardButtonStyle type (new)
36
- # 2. keyboardButtonCallbackLegacy (old constructor kept for deserialization)
37
- # 3. keyboardButtonCallback (new constructor with style field)
38
- sed -i 's|keyboardButtonCallback#35bbdb6b flags:# requires_password:flags.0?true text:string data:bytes = KeyboardButton;|keyboardButtonStyle#4fdd3430 flags:# bg_primary:flags.0?true bg_danger:flags.1?true bg_success:flags.2?true icon:flags.3?long = KeyboardButtonStyle;\nkeyboardButtonCallbackLegacy#35bbdb6b flags:# requires_password:flags.0?true text:string data:bytes = KeyboardButton;\nkeyboardButtonCallback#e62bc960 flags:# requires_password:flags.0?true style:flags.10?KeyboardButtonStyle text:string data:bytes = KeyboardButton;|' "$APITL"
39
-
40
- # Verify patch was applied
41
- if grep -q "keyboardButtonStyle#4fdd3430" "$APITL"; then
42
- echo "✅ GramJS TL schema patched (KeyboardButtonStyle + styled KeyboardButtonCallback)"
43
- else
44
- echo "❌ Failed to patch GramJS TL schema"
45
- exit 1
46
- fi
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- // Postinstall: patch GramJS TL schema + skip problematic dep scripts
3
- import { execSync } from "child_process";
4
- import { dirname, join } from "path";
5
- import { fileURLToPath } from "url";
6
-
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const root = dirname(__dirname);
9
- const patchScript = join(root, "scripts", "patch-gramjs.sh");
10
-
11
- try {
12
- execSync(`bash "${patchScript}"`, { stdio: "inherit", cwd: root });
13
- } catch {
14
- // Non-fatal: styled buttons won't work but everything else will
15
- console.log("⚠️ GramJS patch skipped (styled buttons disabled)");
16
- }