Commit graph

285 commits

Author SHA1 Message Date
b418577bfa
refactor(test): refactored and improved deno/bun vitest polyfills a bit 2024-04-27 12:19:07 +03:00
641df422cc
test(unit): running unit tests under deno 2024-04-27 12:19:05 +03:00
44a60360ab
fix(core): normalizeInputMedia should respect uploaded file name 2024-04-24 13:20:06 +03:00
alina sireneva
7ad3ddbc0c
Jsr (#27) 2024-04-23 22:53:59 +03:00
78457fb158
fix(web): wait for the websocket to close 2024-04-22 19:16:47 +03:00
9d114a3552
build: initial support for jsr building 2024-04-21 04:53:09 +03:00
29d3fd8f8c
fix(core): correct default offset for getHistory with reverse flag 2024-04-19 15:45:10 +03:00
c5ce2c321d
build: some fixes + made @mtcute/test esm-only 2024-04-14 22:18:53 +03:00
ae8ab45a74
chore: fixed remaining type errors 2024-04-14 22:18:53 +03:00
c5d115f088
chore: use target=es2022 with useDefineForClassFields=true 2024-04-14 22:18:53 +03:00
9491b2b1e6
fix: use node: scheme for node imports 2024-04-14 22:18:53 +03:00
ac8d63a669
chore(core)!: inlined dcOption parsing in string sessions
breaking: readStringSession now accepts only one argument
2024-04-14 18:07:10 +03:00
f24f41b646
chore(core): added deprecation notice for v1-2 session strings 2024-04-14 17:52:47 +03:00
32e29715ad
fix(core): automatically add relevant file extension 2024-04-14 05:47:30 +03:00
f527ca49cf
fix(core): hopefully fixed typescript performace issues with tg.call
closes #30
2024-04-13 00:31:33 +03:00
3f0e95ef31
feat(core): joinTextWithEntities method in utils 2024-04-05 18:19:52 +03:00
bf2f7999a6
feat!: updated to 177 layer
breaking: `.createGroup` now returns `CreateGroupResult`
2024-04-01 15:22:40 +03:00
9091a10537
fix(core): hopefully fix duplicating msg_id leading to bad_msg_container 64 2024-03-30 16:27:59 +03:00
5ab251cafe
fix(core): improved state_req handling 2024-03-29 09:34:39 +03:00
d577f0ed9b
fix(core): improved state_req handling 2024-03-28 18:12:32 +03:00
1e780ec4af
feat: @mtcute/bun package for initial first-class bun support 2024-03-23 18:13:31 +03:00
142dddd253
refactor: moved most of sqlite implementation to core 2024-03-20 01:17:58 +03:00
3074e9bbf5
build(deps): updated vitest 2024-03-17 21:46:51 +03:00
6828d56317
feat(tl): updated to layer 176 2024-03-17 08:29:46 +03:00
14a54f5a25
fix(core): check for message id in _findMessageInUpdate 2024-03-17 06:23:40 +03:00
81a12a8088
fix(core): send connection state through worker 2024-03-17 00:36:09 +03:00
f7d6e6730b
feat(core): withParams method 2024-03-17 00:31:58 +03:00
c9a4558e5c
fix: download threads never connecting 2024-03-15 03:20:59 +03:00
ab2425a26e
feat: support for "updating" states + improved catch up a bit 2024-03-15 00:02:04 +03:00
83746aa460
feat: initial support for connection states 2024-03-12 13:15:27 +03:00
a0b3e9cc6e
chore: avoid using namespaces in favor of esm 2024-03-07 18:11:02 +03:00
b9f8fd58db
fix(core): try to use symbol for platform 2024-03-07 05:35:37 +03:00
42f1482d7f
build(core): improved tree-shakeability 2024-03-07 05:35:37 +03:00
fbf5c8f4bc
chore!: removed @mtcute/wasm dependency from core
breaking: `WasmCryptoProvider` no longer exists
2024-03-07 05:35:37 +03:00
14549020aa
test(e2e): added worker tests 2024-03-07 05:35:36 +03:00
cbc2002781
chore: worker 2024-03-07 05:35:36 +03:00
fb72d3194d
fix: properly handle file uploads + downloading as node stream 2024-03-07 05:35:36 +03:00
a2739b678c
chore!: started extracting platform-specific stuff into separate packages 2024-03-07 05:35:36 +03:00
ceb606a347
fix(core): hide _parsedStatus from inspect 2024-03-07 05:35:36 +03:00
be899afca2
fix(core): infinite bad_msg_notification 17 when system time is wrong 2024-02-28 13:18:36 +03:00
8f0e072f4a
fix(core): string session
closes #17
2024-02-22 16:30:17 +03:00
852bc10629
fix(core): session import/export
closes #17
2024-02-22 15:22:22 +03:00
8c38f836dd
feat(core): export all methods in methods.js 2024-02-21 21:44:19 +03:00
6c36cf2a72
chore: initial bun support 2024-02-20 00:55:41 +03:00
54c904d3fa
fix(core): avoid imports from tty 2024-02-20 00:28:12 +03:00
2d01b38e95
feat(core): support new message actions 2024-02-19 20:45:53 +03:00
8460cc3ade
feat(tl): updated to 174 layer 2024-02-19 20:37:36 +03:00
a17604b623
fix(core): websocket reconnection
lol. lmao, even
2024-02-08 04:14:43 +03:00
5d137a9125
fix(core): check pq for primality 2024-02-08 04:10:41 +03:00
809e794816
test: added factorization tests 2024-02-08 04:10:09 +03:00
99bd1bc313
feat: resolveUser and resolveChannel methods + refactor to use them 2024-02-06 00:25:08 +03:00
27e14472ff
feat: app config manager 2024-02-05 01:44:51 +03:00
e6c7af6ed2
feat: updated to layer 173 2024-02-04 18:28:27 +03:00
7036fe1e97
fix: fixed handling of -404 2024-02-03 22:08:19 +03:00
ac3b5df9a0
refactor!: renamed MaybeAsync -> MaybePromise 2024-02-03 21:56:44 +03:00
20a46c54a8
fix: e2e 2024-02-03 13:26:21 +03:00
6768b15514
fix: tests 2024-02-03 11:57:40 +03:00
c8e026dc03
refactor!: merged client into core + fixed dispatcher for new storage 2024-01-31 19:30:57 +03:00
eca99a7535
refactor!: large refactor of storage implementation
breaking: pretty much the entire storage thing has been overhauled.
migrations from older versions **are not** available, please do them manually through string sessions
2024-01-04 00:22:26 +03:00
ca1916c5cb
fix(core): do not close connection by inactivity when there are pending queries 2023-12-23 21:58:36 +03:00
7e0f172aa8
fix(core): incomplete session reset 2023-12-20 14:00:29 +03:00
c538c2b059
fix(core): allow storage reset to be async 2023-12-19 23:44:39 +03:00
02a6a0e133
fix(core): proper exit cleanup in json file 2023-12-19 02:24:19 +03:00
4f7fd24dd9
chore(core): expose init params in .params field 2023-12-16 20:00:31 +03:00
dfed3c2761
chore(core)!: disallow passing api id as string 2023-12-16 19:55:29 +03:00
7a0d8ecef2
chore(core): various improvements 2023-12-16 19:52:44 +03:00
712c1e8348
fix(client): added true assertions to methods returning Bool 2023-12-16 19:00:13 +03:00
38358622e7
feat(core): allow passing rpc call options by proxy 2023-12-13 18:30:28 +03:00
314bfa0fec
fix(core): export MemoryStorage 2023-12-13 17:19:10 +03:00
56c2085190
feat(core)!: future salts storage
breaking: `ITelegramStorage` interface changed
2023-12-12 00:23:34 +03:00
987de6571a
feat(core): handle future salts 2023-12-11 06:15:31 +03:00
ce2d1b0a9a
fix(core): getState requests not scheduling properly 2023-12-11 01:03:19 +03:00
d1e4a15f81
feat(core): requests chaining 2023-12-11 00:07:41 +03:00
aaa2875fe1
fix(core): support opting out of -503 resending 2023-12-08 20:33:41 +03:00
b6fac0785c
fix(core): cleanly close connection on inactivity timeout 2023-12-08 06:31:17 +03:00
e42a73fd07
fix(core): session exporting while on default dc 2023-12-04 16:28:25 +03:00
d4555f107e
fix(core): apparently re-export from tl
apparently due to some issue in vite `export *` from cjs module doesnt export shit
2023-12-04 15:40:17 +03:00
7a89e5049e
fix(client): save storage after each api call
idk might rollback later
2023-12-04 15:10:13 +03:00
c42c629475
feat(client): allow implicit storage usage 2023-11-30 23:53:33 +03:00
93ddc6a58c
chore!: do not default to MemoryStorage 2023-11-30 22:57:10 +03:00
8214750055
chore: deprecated json-based storages 2023-11-30 22:40:38 +03:00
1f53923dfc
feat(core): indexeddb storage 2023-11-30 22:20:16 +03:00
a36cdf1d20
test: run tests in browser 2023-11-30 00:20:37 +03:00
b25f9dddfa
feat!: support min updates
breaking: changed `ITelegramStorage` interface, changed tl schema a bit
2023-11-27 06:33:32 +03:00
48411323af
fix(core): fixes for highload bots 2023-11-25 18:15:34 +03:00
0d3c18b885
fix(core): some dumb null checks 2023-11-17 18:09:35 +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
08d3afadd8
test(core): more transport tests 2023-11-13 10:43:56 +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
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
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
eec142f0e5
feat: wasm! 🚀 2023-11-04 06:44:18 +03:00
73cd1e7dc9
docs: use @default jsdoc tag 2023-10-29 20:25:06 +03:00
9791f8faae
docs: updated typedoc, added ci, fixed some docs 2023-10-27 14:25:21 +03:00