Commit graph

782 commits

Author SHA1 Message Date
007c98205d
fix(client): _parsedStatus is no longer inspectable 2023-11-16 02:42:01 +03:00
207dc5f15a
fix(client): false negatives in automatic forward detection 2023-11-16 02:42:01 +03:00
484149eae9
test(core): more tests! 2023-11-14 04:37:00 +03:00
13be8482e0
refactor: moved test utils to @mtcute/test 2023-11-13 20:14:32 +03:00
9d12b715c7
chore: moved most configs to .config 2023-11-13 13:28:11 +03:00
08d3afadd8
test(core): more transport tests 2023-11-13 10:43:56 +03:00
6e3394316e v0.1.1 2023-11-12 16:36:12 +00:00
ec1154fdef
build: fixed tl versioning + changelog generation 2023-11-12 19:19:02 +03:00
f525c12f83
fix: auth storage fixes
- .reset() no longer resets auth keys by default
- auth keys are stored immediately in sqlite
- update loop fixes for logout
- tests for sqlite storage

likely closes #13 (?)
2023-11-12 07:51:30 +03:00
38de001e8d
fix(docs): exclude test files from docs, also fixed build for crypto-node 2023-11-12 01:55:26 +03:00
8204dc86a4
chore: removed dispatcher dep from core (again), improved build script 2023-11-12 01:17:20 +03:00
964f47497c
chore(core): moved random to crypto provider, added tests for functions relying on rng 2023-11-12 00:36:00 +03:00
e31ecbd3d1
test(core): improved test coverage 2023-11-11 18:38:57 +03:00
59a4a7553f
test(tl-utils): improved test coverage 2023-11-09 21:03:52 +03:00
96a443f8d3
test: moved to vitest from mocha/chai
damn vitest is so good
2023-11-09 00:20:43 +03:00
1abf35e30c
feat: basic test utils 2023-11-08 17:28:45 +03:00
18178b438d
feat(wasm): added sha1/256 to wasm, removed most of async in crypto 2023-11-08 00:53:15 +03:00
70f4e40ef5
chore: embraced native bigints 2023-11-06 02:28:35 +03:00
1c60082d61
fix(wasm): fixed CC in makefile 2023-11-04 22:42:37 +03:00
0a7979a986
fix(wasm): added option for custom compiler in makefile
also rebuilt .wasm with appleclang
2023-11-04 20:52:46 +03:00
eec142f0e5
feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
4c42304a79
build: extracted custom build config to packages themselves 2023-11-02 21:23:17 +03:00
e0f4b0d7b5
build(deps): removed @types/node and file-type 2023-11-02 19:40:14 +03:00
5e79dc32c5
feat: build crypto-node against node crypto 2023-11-02 19:11:26 +03:00
59c6ae4cbf v0.1.0 2023-11-01 19:56:23 +00:00
23a0e69942
refactor: no more parse modes! 2023-11-01 20:24:00 +03:00
cfa7e8ef5c
fix(template): new dispatcher api 2023-11-01 14:11:46 +03:00
871f161694
docs: updated packages readmes 2023-11-01 14:05:45 +03:00
958f7ff81c
ci: release building 2023-11-01 01:03:49 +03:00
103901ed21
build: use workspace:^ to link monorepo deps 2023-10-31 20:55:56 +03:00
e3682058df
chore: removed hard tl dependency for parsers 2023-10-31 13:12:12 +03:00
f31d93c365
fix: dont use regex to extract filename
closes #12
2023-10-30 21:40:51 +03:00
220b564d52
chore: set version to 0.1.0 2023-10-30 14:59:34 +03:00
73cd1e7dc9
docs: use @default jsdoc tag 2023-10-29 20:25:06 +03:00
0ef2eeb082
fix(dispatcher): reset state when entering another scene 2023-10-29 16:58:47 +03:00
fcab8a5882
fix(tl): cross-schema conflict resolution leading to missing references 2023-10-29 09:14:48 +03:00
137f1cc81b
fix: pnpm install
apparently im dumb
2023-10-29 08:35:44 +03:00
fc42dcb973
feat: updated to layer 166 2023-10-29 08:14:00 +03:00
49d9d5999d
fix: stop using tsconfig paths 2023-10-29 00:51:31 +03:00
fdec2b8621
fix: improved surface api 2023-10-29 00:48:37 +03:00
04c702dfd2
fix: improved downloadToFile API 2023-10-27 19:44:40 +03:00
9791f8faae
docs: updated typedoc, added ci, fixed some docs 2023-10-27 14:25:21 +03:00
528cc4dc92
fix(create-bot): git setup
also im retarded and forgot to include prettier in deps
2023-10-27 00:15:56 +03:00
52773a6cb5
fix(create-bot): added .env to gitignore 2023-10-26 23:58:39 +03:00
f3609fedca
fix: tests 2023-10-26 23:54:04 +03:00
4ac6e439a9
fix: various improvements 2023-10-26 22:23:25 +03:00
022481966b
refactor(dispatcher): improved surface api 2023-10-26 22:22:40 +03:00
c061581abb
chore: various surface api improvements & fixes 2023-10-24 11:49:17 +03:00
21d7488788
fix(core): allow empty startgroup parameter 2023-10-23 19:17:04 +03:00
3d7004fda5
fix: exports 2023-10-23 18:51:24 +03:00
969a0366d3
fix(create-bot): disabled import/named rule 2023-10-23 18:08:22 +03:00
343c925b72
fix(node): do not override .start() 2023-10-23 12:25:39 +03:00
d5d5615a4d
build(create-bot): fixed package building 2023-10-23 12:19:53 +03:00
f1bc6aff64
fix: ts 2023-10-23 11:45:17 +03:00
c3d954f334
fix(dispatcher): state fixes + better wizard interface 2023-10-23 11:43:24 +03:00
e86eddfb57
fix(create-bot): fix ts 2023-10-23 00:11:02 +03:00
0054491665
feat(core): helpers for deeplinks 2023-10-22 23:42:10 +03:00
92dddb75f1
feat: new package to automatically scaffold bots 2023-10-22 20:18:12 +03:00
15c855df84
fix: more fixes for web 2023-10-21 01:42:27 +03:00
dafe631435
fix: migrated to web streams 2023-10-20 00:41:47 +03:00
Alina Tumanova
f5976a2d74
ESM + end-to-end tests (#11)
* feat: moved tl-runtime to esm and native ArrayBuffers

* feat: migration to esm

* fix(core): web-related fixes

* test: finally, some good fucking e2e

* chore: fixed linters etc

* ci: added e2e to ci

* build(tl): fixed gen-code on node 20

* fix: codegen Uint8Array, not Buffer

never `git reset --hard` kids

* build: only do type-aware linting for `packages/*`

* build: ignore no-unresolved in ci for e2e

* fix: node 16 doesn't have subtle crypto apparently?

* fix(tests): use Uint8Array

for gods sake please can i just merge this already

* ci: don't parallel tasks in ci

because machines are utter garbage and it may just randomly break

* ci: pass secrets to e2e tests

* ci: separate cli command for ci

apparently im retarded

* fix: run codegen in e2e

im actually retarded

* ci: more fixes for e2e

* ci: debugging stuff

* ci: still debugging

* ci: hopefully fix ci???
2023-10-16 19:23:53 +03:00
01e5fbb95d
chore: fuck esm, all my homies hate esm
feel free to contribute though
2023-10-12 15:03:15 +03:00
b5c7a6b90d
chore: change license to MIT 2023-10-12 07:26:26 +03:00
0841cbb031
fix: errors codegen 2023-10-12 05:24:16 +03:00
0ca62ab375
fix: support new permissions in ChatPermissions 2023-10-12 04:50:47 +03:00
1ba366a12b
chore: extracted getters memoization into util 2023-10-12 04:43:50 +03:00
337418a34c feat: contexts 2023-10-11 08:42:37 +03:00
6629d91274 chore: remove remaining MaybeArray flex 2023-10-11 08:42:37 +03:00
3e5b2af7c0 feat: per-method disabling of no-dispatch 2023-10-11 08:42:37 +03:00
e01c876690 feat: accept high-level objects as inputs to methods 2023-10-11 08:42:37 +03:00
a03d73503a refactor: initial support for esm
also fixed all circular imports and added checking for them via dpdm
2023-10-11 08:42:37 +03:00
280a98f52a chore: re-thought method arguments
also dropped support for registration
2023-10-11 08:42:37 +03:00
a6726ccb40 build(deps): bumped prettier to 3.0.3 2023-10-11 08:42:37 +03:00
75021648eb
refactor: improved typings for MessageEntity 2023-10-06 04:53:19 +03:00
5600f292f7
fix: support more cases in chat-member-update 2023-10-06 03:45:34 +03:00
c7d82d41f0
feat: message groups 2023-10-06 01:47:45 +03:00
85ca3b4603
feat: abort signals 2023-10-05 18:10:15 +03:00
31b41c93fc
chore: extract MASK_POS
closes MTQ-43
2023-10-05 04:41:47 +03:00
74f3d53448
chore: removed eager-async-pool dependency
closes MTQ-76
2023-10-05 04:38:55 +03:00
ff75d40e78
docs: generate user/bot availability automagically
closes MTQ-85
2023-10-05 04:00:58 +03:00
ec55cb37f7
chore: export Long from core 2023-10-05 01:47:14 +03:00
e22db98444
fix: support no-dispatch index + option to disable it 2023-10-05 01:32:22 +03:00
2bde1c4f3e
feat: feature parity with botapi 6.9
well mostly, and assuming i didn't miss anything. closes MTQ-72
2023-10-04 23:34:55 +03:00
e7dc8f0ec7
feat: setEmojiStatus 2023-10-04 21:05:07 +03:00
15b76aab60
feat: more stories-related stuff
i forgor 💀
2023-10-04 20:50:57 +03:00
c13cb93b97
docs(threads): imroved HistoryReadUpdate docs 2023-10-04 19:31:00 +03:00
7abcc6188a
feat: stories and boosts
closes MTQ-51
2023-10-04 19:26:21 +03:00
62815d26d7
fix(tl): support multiple usages of the same flag 2023-10-04 02:45:11 +03:00
e4e51f7d90
docs: fixed nbsp handling, updated to layer 165 2023-10-03 19:34:12 +03:00
94a3c1631f
fix: bumped file_id version 2023-10-03 16:55:03 +03:00
1686c3f183
feat: history ttl
closes MTQ-86
2023-10-03 04:05:24 +03:00
6f7cda5544
feat: content protection aka noforwards
closes MTQ-84
2023-10-03 03:48:52 +03:00
efaba06102
feat: multiple usernames
closes MTQ-57
2023-10-03 03:23:23 +03:00
544e5a68dc
feat: opt-in error reporting 2023-10-03 02:49:53 +03:00
00f30a6495
feat: forums
closes MTQ-77
2023-10-03 00:58:45 +03:00
b2fccf4978
feat: better support for join requests 2023-10-02 19:54:11 +03:00
ea7eabf0be
feat: more non-iterable versions of methods 2023-10-02 18:00:00 +03:00
55c4f296fb
refactor: extract input reactions to InputReaction 2023-10-01 16:36:29 +03:00
95032d3b9a
feat: added ArrayPaginated 2023-09-29 21:45:11 +03:00
82994408a2
feat: refactor some iterable methods to have non-iterable counterpart 2023-09-29 17:02:36 +03:00
59ac74f300
refactor: moved makeInspectable to utils, also fixed ArrayWithTotal 2023-09-25 14:48:32 +03:00
dbcd3f0911
feat(tl): updated to 164 layer 2023-09-24 20:22:09 +03:00
6279126439
chore: remove some casts from filter 2023-09-24 04:26:28 +03:00
7a41950632
fix: use inputPeer in CallbackQuery#getMessage()
closes #7
2023-09-24 04:16:43 +03:00
5dcd965934
chore: add export * from core to client 2023-09-24 04:10:18 +03:00
7ff433ed0a
refactor: import tl from core/client, not tl 2023-09-24 03:37:34 +03:00
e771e592fd
feat: assertTypeIsNot
closes MTQ-64
2023-09-24 02:40:41 +03:00
befbceaf8a
chore: changed prettier width to 120 2023-09-24 01:32:22 +03:00
fbe264aab0
ci: moved type-aware linting to pre-commit and ci 2023-09-24 01:08:01 +03:00
976c25141c
refactor: move errors to core 2023-09-22 15:32:28 +03:00
6e8351ac01
refactor: extracted dispatcher filters into multiple files 2023-09-21 14:48:08 +03:00
a3ebd3fc66
fix(tl): ctors with primitive vectors are incorrectly marked as static-size 2023-09-21 14:46:44 +03:00
7a6a30ea5c
chore: export core utils from @mtcute/core/utils 2023-09-21 13:18:09 +03:00
85d2c5f305
fix: test fixes 2023-09-21 02:53:08 +03:00
b8f63b0634
feat(tl): static object size computation
closes MTQ-21
2023-09-20 18:37:26 +03:00
5a3b101c9f
chore: avoid using {}, use Maps instead 2023-09-19 01:33:47 +03:00
80d4c59c69
fix: lru map doesn't update links
closes #8
2023-09-18 19:40:09 +03:00
53b008f8bc
fix: support <tg-emoji> and tg-spoiler in html parser 2023-09-18 03:40:20 +03:00
7bf63b2507
fix: dont export everything on first connection 2023-09-18 03:16:29 +03:00
55edbde3e7
fix: fixed new error codegen 2023-09-07 22:26:52 +03:00
aa863c6a2f
chore: added no-console rule 2023-09-07 22:25:50 +03:00
4b7d7d2e35
refactor: reworked errors codegen 2023-09-06 23:54:51 +03:00
22d8b815d3
refactor: improved api of set-game-score function 2023-09-03 03:44:02 +03:00
81ce550604
chore: improved eslint config
closes MTQ-54
2023-09-03 02:37:51 +03:00
a679f364fd
fix: fixed upload and download for new networking 2023-08-23 23:49:47 +03:00
4a0d6fbc88
fix: fixed upload and download for new networking 2023-08-23 22:11:42 +03:00
85c43d804d
fix: client and updates fixes 2023-08-12 22:40:37 +03:00
2b1bac053e
feat: support for tmp_sessions 2023-08-12 18:26:46 +03:00
01d476d19a
feat: support for dc switches, session import/export, rpc sending 2023-08-11 23:59:24 +03:00
13c0a97a58
fix: rebase fixes 2023-07-24 00:14:37 +03:00
743058a020
fix: rebase fixes 2023-07-24 00:14:37 +03:00
eb585fc3f1
build: fixes after rebase 2023-07-24 00:14:37 +03:00
teidesu
0b4edbf70e
feat(core): update connection count and pfs usage on the go
holy shit i actually made it 🫣
2023-07-24 00:14:37 +03:00
teidesu
f68d83da06
feat(core): sync keys between connections, exclusive lock for auth
in other words, only one main connection does authorization, others wait
2023-07-24 00:14:37 +03:00
teidesu
bd5130c77b
fix(core): use existing auth_key from storage 2023-07-24 00:14:37 +03:00
teidesu
a23197df91
feat(core): (initial) support pfs 2023-07-24 00:14:37 +03:00
teidesu
c9a86c28f0
feat(core): support %h for non-buffer types in logger 2023-07-24 00:14:37 +03:00
teidesu
27d3058408
fix(core): destroy_session requests not being sent
i am actually retarded
2023-07-24 00:14:36 +03:00
teidesu
6eed69ad02
refactor: extracted auth key management to AuthKey class 2023-07-24 00:14:36 +03:00
teidesu
4f834afc6a
refactor: (initial) extracted connection management to NetworkManager 2023-07-24 00:14:29 +03:00
teidesu
76639d2993
fix(early-timer): rescheduling inside handler getting instantly reset 2023-07-24 00:13:44 +03:00
teidesu
4848c4e62d
refactor: extracted dc config management to separate class 2023-07-24 00:13:42 +03:00
6a2c5d90b7
fix: error on extra fields in TelegramClient#call + related fixes 2023-07-24 00:12:17 +03:00
6221a8716f
fix: handle vectors of primitives in rpc_result 2023-07-20 22:07:07 +03:00
99e83b40aa
feat(codegen): support bare types and vectors
closes MTQ-48
2023-07-20 20:22:57 +03:00
754a288c87
fix: fixes after layer bump 2023-07-20 19:01:34 +03:00
d3338f6614
fix: build fixes + updated to 160 schema 2023-07-20 17:51:24 +03:00
d88bc0ea60
chore: code quality improvements
improved eslint config, fixed linter issues, added husky
2023-06-05 00:30:48 +00:00
0471310382
chore: better dependencies management
updated and pinned dependencies
added validation for external deps conflicts
removed tl-reference
2023-06-04 17:00:33 +00:00
c591f96b81
fix: local floodwait handler fix
im actually retarded lmao
2023-06-04 16:04:46 +00:00
teidesu
8df099fcb8 feat: updated to layer 150 2022-12-07 14:13:24 +03:00
teidesu
b0055b791c fix(client): incorrect parsing of video stickers as video 2022-12-05 04:05:43 +03:00
teidesu
bc2ed98b14 refactor: use ??= for memoization 2022-10-30 22:24:07 +03:00
teidesu
70b09903f1 feat(client): support pre-checkout queries 2022-10-30 20:51:50 +03:00
teidesu
e75ac9fa5d feat(client): support invoices with extended media 2022-10-30 20:51:38 +03:00
teidesu
1935413aee fix(build): fixed delimiter in updates codegen conflicting with prettier 2022-10-30 20:37:52 +03:00
teidesu
f5986e694a refactor(client): moved parse-update.ts to types/updates 2022-10-30 20:36:17 +03:00
teidesu
7d10e65ecc fix: properly handle peers without access hash 2022-10-30 20:25:49 +03:00
teidesu
89fd8e8ef0 feat(tl): updated schema to 147 2022-10-30 18:49:55 +03:00
teidesu
71b39d6f53 feat(tl): generate diff file for simpler update flow
primarily for my own use
2022-10-30 18:38:31 +03:00
teidesu
416b3d9ef9 refactor: exported string session parsing/serialization to a module 2022-10-09 20:49:39 +03:00
teidesu
8adb79511f feat(tl): updated layer to 146 2022-09-28 00:42:21 +03:00
teidesu
d0ea4ed5ca refactor: changed stylizing of the name (MTCute -> mtcute) 2022-09-14 16:18:56 +03:00
teidesu
443786a35b build: fixed build for client and dispatcher packages 2022-09-12 19:50:39 +03:00
teidesu
bbd738f572 feat(i18n): added OtherLanguageWrapExhaustive for exhaustive other languages 2022-09-12 15:34:30 +03:00
teidesu
d4040a768f fix(i18n): enforce same arg types in OtherLanguageWrap 2022-09-12 15:28:45 +03:00
teidesu
b7d0b85a15 docs(i18n): improved docs 2022-09-12 15:01:43 +03:00
teidesu
4847523cc1 build: updated name in package.json
again. i am actually braindead
2022-09-12 14:50:43 +03:00
teidesu
b96c1407d0 feat(i18n): added pluralization helpers
also slight refactor of typings
2022-09-12 14:37:09 +03:00
teidesu
77bfef98d1 feat: updated to 145 layer 2022-09-12 13:54:33 +03:00
teidesu
597cb4f07b feat(i18n): exported default adapter 2022-08-29 18:57:00 +03:00
teidesu
5019d7b596 feat(i18n): removed immediate dependency on client to allow for outside usage 2022-08-29 18:54:43 +03:00
teidesu
689533c549 feat(i18n): allow custom adapters 2022-08-29 18:53:27 +03:00
teidesu
ea299cacca docs: improve documentation 2022-08-29 16:22:57 +03:00
teidesu
e7219ed2de refactor: normalizeToInput* now throws an error by itself, never returning null 2022-08-29 16:15:37 +03:00
teidesu
1cc3594f09 docs(tl-utils): documented everything 2022-08-29 14:33:11 +03:00
teidesu
7b7fdc7092 docs: removed typedoc-plugin-coverage
it works like shit
2022-08-28 17:56:56 +03:00
teidesu
7eb843dd20 feat(markdown-parser): added support for custom emojis 2022-08-25 20:17:33 +03:00
teidesu
34f783aa66 feat(html-parser): added support for custom emojis 2022-08-25 20:17:25 +03:00
teidesu
390b65f796 build(docs): api reference generation improvements
- added readme in each package
- updated typedoc, fixed related issues
- use @link instead of @see
- moved configs to typedoc.js, improved exclusion of unneeded stuff
- custom plugin for typedoc for cross-package references
- preparing to move documentation to separate repository
2022-08-24 23:37:26 +03:00
teidesu
b08ec342e5 feat(client): export customEmojiId in Sticker 2022-08-18 21:34:35 +03:00
teidesu
eaa517a5c3 feat(client): support custom emojis 2022-08-18 19:52:24 +03:00
teidesu
e39057bda5 fix(file-id): bumped version
todo: should we really enforce the version? tdlib uses current version from Version.h, but not every version there changes file id format (and v32 is fully compatible with v41 as far as im concerned)
2022-08-18 17:46:03 +03:00
teidesu
26b96c3151 refactor(tl-utils): export everything in index.ts 2022-08-12 20:11:27 +03:00
teidesu
16fdd5ded1 fix(tl): better {@link} generation from documentation 2022-08-12 17:46:04 +03:00
teidesu
9b027425dd fix(tl-utils): handle <br> 2022-08-12 17:22:40 +03:00
teidesu
be343b561e fix(tl-utils): do not break <a href 2022-08-12 17:13:24 +03:00
teidesu
ff58e3ee0d fix(tl-utils): do not make @link tags for primitives 2022-08-12 17:11:19 +03:00
teidesu
e3dbe3b7d1 fix(tl-utils): do not break @link tags 2022-08-12 17:00:02 +03:00
teidesu
b34a90ec30 build: updated layer to 144 2022-08-12 16:17:35 +03:00
teidesu
afb07534f9 feat(tl): added blogfork domain, auto-choose domain for docs 2022-08-12 16:16:44 +03:00
teidesu
8b6cde6db5 fix(client): made ChatJoinRequestUpdate inspectable 2022-08-02 03:48:18 +03:00
teidesu
537b7d0462 feat(core): support overwriting existing session with session strings 2022-07-31 08:01:40 +03:00
teidesu
2a97616d80 fix(codegen): fixed typings codegen, added a test 2022-07-23 05:03:38 +03:00
teidesu
ad29b2af17 fix(client): improved getHistory method
merged iterHistory into getHistory, improved pagination, offset support and other stuff
2022-07-23 02:22:20 +03:00
teidesu
b6f2f39906 fix(client): improved searchMessages method
use offsetId for pagination, expose minId/maxId/minDate/maxDate, threadId, offsetId
2022-07-23 01:29:36 +03:00
teidesu
0330efd4dc fix(i18n): support FormattedString
totally forgot about it
2022-07-19 03:11:08 +03:00
teidesu
ebe9786987 feat: i18n package 2022-07-19 02:47:59 +03:00
teidesu
a3aca20099 build: updated name in package.json files 2022-07-18 23:32:11 +03:00
teidesu
feac72e3ec feat(client): accept raw tl object for keyboard 2022-07-13 05:14:56 +03:00