@mtkruto/node 0.63.3 → 0.63.6
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/esm/0_deps.d.ts +10 -5
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +10 -5
- package/esm/0_test_deps.d.ts.map +1 -0
- package/esm/_dnt.polyfills.d.ts +13 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +11 -0
- package/esm/client/2_file_manager.d.ts.map +1 -1
- package/esm/client/2_file_manager.js +52 -72
- package/esm/client/2_update_manager.js +11 -11
- package/esm/client/3_client_encrypted_pool.d.ts +0 -1
- package/esm/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/esm/client/3_client_encrypted_pool.js +15 -22
- package/esm/client/3_client_encrypted_pool_test.d.ts.map +1 -0
- package/esm/client/5_client.d.ts +0 -9
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +25 -44
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/_util.js +6 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/abortable.js +46 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/deadline.js +38 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/debounce.js +57 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/delay.js +65 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mod.js +23 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +170 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/pool.js +99 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/retry.js +107 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/async/1.0.12/tee.js +102 -0
- package/esm/session/1_session.js +4 -4
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +2 -8
- package/package.json +1 -1
- package/script/0_deps.d.ts +10 -5
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +25 -28
- package/script/0_test_deps.d.ts.map +1 -0
- package/script/_dnt.polyfills.d.ts +13 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +11 -0
- package/script/client/2_file_manager.d.ts.map +1 -1
- package/script/client/2_file_manager.js +51 -71
- package/script/client/2_update_manager.js +10 -10
- package/script/client/3_client_encrypted_pool.d.ts +0 -1
- package/script/client/3_client_encrypted_pool.d.ts.map +1 -1
- package/script/client/3_client_encrypted_pool.js +15 -22
- package/script/client/3_client_encrypted_pool_test.d.ts.map +1 -0
- package/script/client/5_client.d.ts +0 -9
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +23 -42
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
- package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/_util.js +9 -0
- package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
- package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/abortable.js +49 -0
- package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
- package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/deadline.js +41 -0
- package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
- package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/debounce.js +60 -0
- package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
- package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/delay.js +91 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mod.js +39 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +174 -0
- package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
- package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/pool.js +102 -0
- package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
- package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/retry.js +112 -0
- package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
- package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/async/1.0.12/tee.js +105 -0
- package/script/session/1_session.js +3 -3
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +1 -7
- package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -52
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/less.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -33
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -167
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -57
- package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -30
- package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -55
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
- package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/less.js +0 -31
- package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
- package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
- package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -36
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -170
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -60
- package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
- package/script/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -47
- package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -23
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
- /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
package/script/0_deps.js
CHANGED
|
@@ -18,43 +18,40 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
26
|
-
}
|
|
27
|
-
Object.defineProperty(o, k2, desc);
|
|
28
|
-
}) : (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
o[k2] = m[k];
|
|
31
|
-
}));
|
|
32
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
33
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
34
|
-
};
|
|
35
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Parser = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.contentType = exports.encodeBase64 = exports.decodeBase64 = exports.
|
|
22
|
+
exports.Parser = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.contentType = exports.encodeBase64 = exports.decodeBase64 = exports.toArrayBuffer = exports.SECOND = exports.MINUTE = exports.iterateReader = exports.concat = exports.delay = exports.isAbsolute = exports.toFileUrl = exports.basename = exports.extname = exports.join = exports.AssertionError = exports.unreachable = exports.assertEquals = exports.assertFalse = exports.assert = void 0;
|
|
37
23
|
exports.extension = extension;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
var assert_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/assert.js");
|
|
25
|
+
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return assert_js_1.assert; } });
|
|
26
|
+
var false_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/false.js");
|
|
27
|
+
Object.defineProperty(exports, "assertFalse", { enumerable: true, get: function () { return false_js_1.assertFalse; } });
|
|
28
|
+
var equals_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/equals.js");
|
|
29
|
+
Object.defineProperty(exports, "assertEquals", { enumerable: true, get: function () { return equals_js_1.assertEquals; } });
|
|
30
|
+
var unreachable_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/unreachable.js");
|
|
31
|
+
Object.defineProperty(exports, "unreachable", { enumerable: true, get: function () { return unreachable_js_1.unreachable; } });
|
|
32
|
+
var assertion_error_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/assertion_error.js");
|
|
33
|
+
Object.defineProperty(exports, "AssertionError", { enumerable: true, get: function () { return assertion_error_js_1.AssertionError; } });
|
|
45
34
|
var join_js_1 = require("./deps/jsr.io/@std/path/1.0.8/join.js");
|
|
46
35
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_js_1.join; } });
|
|
36
|
+
var extname_js_1 = require("./deps/jsr.io/@std/path/1.0.8/extname.js");
|
|
37
|
+
Object.defineProperty(exports, "extname", { enumerable: true, get: function () { return extname_js_1.extname; } });
|
|
38
|
+
var basename_js_1 = require("./deps/jsr.io/@std/path/1.0.8/basename.js");
|
|
39
|
+
Object.defineProperty(exports, "basename", { enumerable: true, get: function () { return basename_js_1.basename; } });
|
|
47
40
|
var to_file_url_js_1 = require("./deps/jsr.io/@std/path/1.0.8/to_file_url.js");
|
|
48
41
|
Object.defineProperty(exports, "toFileUrl", { enumerable: true, get: function () { return to_file_url_js_1.toFileUrl; } });
|
|
42
|
+
var is_absolute_js_1 = require("./deps/jsr.io/@std/path/1.0.8/is_absolute.js");
|
|
43
|
+
Object.defineProperty(exports, "isAbsolute", { enumerable: true, get: function () { return is_absolute_js_1.isAbsolute; } });
|
|
44
|
+
var mod_js_1 = require("./deps/jsr.io/@std/async/1.0.12/mod.js");
|
|
45
|
+
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return mod_js_1.delay; } });
|
|
49
46
|
var concat_js_1 = require("./deps/jsr.io/@std/bytes/1.0.5/concat.js");
|
|
50
47
|
Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_js_1.concat; } });
|
|
48
|
+
var iterate_reader_js_1 = require("./deps/jsr.io/@std/io/0.225.2/iterate_reader.js");
|
|
49
|
+
Object.defineProperty(exports, "iterateReader", { enumerable: true, get: function () { return iterate_reader_js_1.iterateReader; } });
|
|
51
50
|
var constants_js_1 = require("./deps/jsr.io/@std/datetime/0.225.3/constants.js");
|
|
52
51
|
Object.defineProperty(exports, "MINUTE", { enumerable: true, get: function () { return constants_js_1.MINUTE; } });
|
|
53
52
|
Object.defineProperty(exports, "SECOND", { enumerable: true, get: function () { return constants_js_1.SECOND; } });
|
|
54
53
|
var to_array_buffer_js_1 = require("./deps/jsr.io/@std/streams/1.0.9/to_array_buffer.js");
|
|
55
54
|
Object.defineProperty(exports, "toArrayBuffer", { enumerable: true, get: function () { return to_array_buffer_js_1.toArrayBuffer; } });
|
|
56
|
-
var iterate_reader_js_1 = require("./deps/jsr.io/@std/io/0.225.2/iterate_reader.js");
|
|
57
|
-
Object.defineProperty(exports, "iterateReader", { enumerable: true, get: function () { return iterate_reader_js_1.iterateReader; } });
|
|
58
55
|
var base64_js_1 = require("./deps/jsr.io/@std/encoding/1.0.7/base64.js");
|
|
59
56
|
Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
|
|
60
57
|
Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
|
|
@@ -77,9 +74,9 @@ function extension(mimeType) {
|
|
|
77
74
|
return (0, extension_js_1.extension)(mimeType) || "unknown";
|
|
78
75
|
}
|
|
79
76
|
}
|
|
80
|
-
var
|
|
81
|
-
Object.defineProperty(exports, "ige256Decrypt", { enumerable: true, get: function () { return
|
|
82
|
-
Object.defineProperty(exports, "ige256Encrypt", { enumerable: true, get: function () { return
|
|
83
|
-
Object.defineProperty(exports, "initTgCrypto", { enumerable: true, get: function () { return
|
|
77
|
+
var mod_js_2 = require("./deps/jsr.io/@roj/tgcrypto/1.0.1/dist/mod.js");
|
|
78
|
+
Object.defineProperty(exports, "ige256Decrypt", { enumerable: true, get: function () { return mod_js_2.ige256Decrypt; } });
|
|
79
|
+
Object.defineProperty(exports, "ige256Encrypt", { enumerable: true, get: function () { return mod_js_2.ige256Encrypt; } });
|
|
80
|
+
Object.defineProperty(exports, "initTgCrypto", { enumerable: true, get: function () { return mod_js_2.init; } });
|
|
84
81
|
var htmlparser2_1 = require("htmlparser2");
|
|
85
82
|
Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return htmlparser2_1.Parser; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_test_deps.d.ts","sourceRoot":"","sources":["../src/0_test_deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC"}
|
|
@@ -4,4 +4,17 @@ declare global {
|
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
export {};
|
|
7
|
+
declare global {
|
|
8
|
+
interface PromiseConstructor {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a Promise that can be resolved or rejected using provided functions.
|
|
11
|
+
* @returns An object containing `promise` promise object, `resolve` and `reject` functions.
|
|
12
|
+
*/
|
|
13
|
+
withResolvers<T>(): {
|
|
14
|
+
promise: Promise<T>;
|
|
15
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
16
|
+
reject: (reason?: any) => void;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
7
20
|
//# sourceMappingURL=_dnt.polyfills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC;AACV,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,kBAAkB;QAC1B;;;WAGG;QACH,aAAa,CAAC,CAAC,KAAK;YAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;YAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;SAAE,CAAC;KAC3H;CACF"}
|
package/script/_dnt.polyfills.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// https://github.com/tc39/proposal-promise-with-resolvers/blob/3a78801e073e99217dbeb2c43ba7212f3bdc8b83/polyfills.js#L1C1-L9C2
|
|
4
|
+
if (Promise.withResolvers === undefined) {
|
|
5
|
+
Promise.withResolvers = () => {
|
|
6
|
+
const out = {};
|
|
7
|
+
out.promise = new Promise((resolve_, reject_) => {
|
|
8
|
+
out.resolve = resolve_;
|
|
9
|
+
out.reject = reject_;
|
|
10
|
+
});
|
|
11
|
+
return out;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_file_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_file_manager.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA+C,UAAU,EAA8C,OAAO,EAAkB,MAAM,eAAe,CAAC;AAE7J,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,qBAAa,WAAW;;
|
|
1
|
+
{"version":3,"file":"2_file_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_file_manager.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA+C,UAAU,EAA8C,OAAO,EAAkB,MAAM,eAAe,CAAC;AAE7J,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,qBAAa,WAAW;;gBAOV,CAAC,EAAE,CAAC;IAOV,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,EAAE,WAAW,UAAO,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IA6M1I,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,SAAS;IA2EtG,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAevD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM;IAY7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc;IAmDjD,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,SAAI;IAalE,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE;CA6CnD"}
|
|
@@ -33,7 +33,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
33
33
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
34
34
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
35
35
|
};
|
|
36
|
-
var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD,
|
|
36
|
+
var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_uploadPart, _FileManager_handleError, _FileManager_getFileContents, _FileManager_CUSTOM_EMOJI_TTL;
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.FileManager = void 0;
|
|
39
39
|
/**
|
|
@@ -124,6 +124,7 @@ class FileManager {
|
|
|
124
124
|
const limit = chunkSize;
|
|
125
125
|
let offset = params?.offset ? BigInt(params.offset) : 0n;
|
|
126
126
|
let part = 0;
|
|
127
|
+
let ms = 0.05;
|
|
127
128
|
while (true) {
|
|
128
129
|
signal?.throwIfAborted();
|
|
129
130
|
let retryIn = 1;
|
|
@@ -152,6 +153,8 @@ class FileManager {
|
|
|
152
153
|
else {
|
|
153
154
|
(0, _0_deps_js_1.unreachable)();
|
|
154
155
|
}
|
|
156
|
+
await (0, _0_deps_js_1.delay)(ms);
|
|
157
|
+
ms = Math.max(ms * .8, 0.003);
|
|
155
158
|
}
|
|
156
159
|
catch (err) {
|
|
157
160
|
if (typeof err === "object" && err instanceof _0_deps_js_1.AssertionError) {
|
|
@@ -310,38 +313,13 @@ exports.FileManager = FileManager;
|
|
|
310
313
|
_a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new WeakMap(), _FileManager_instances = new WeakSet(), _FileManager_uploadStream = async function _FileManager_uploadStream(stream, fileId, chunkSize, signal) {
|
|
311
314
|
let part;
|
|
312
315
|
let promises = new Array();
|
|
316
|
+
let ms = 0.05;
|
|
313
317
|
for await (part of (0, _1_utilities_js_1.iterateReadableStream)(stream.pipeThrough(new _1_utilities_js_1.PartStream(chunkSize)))) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
signal?.throwIfAborted();
|
|
320
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploading part ` + (part.part + 1));
|
|
321
|
-
if (part.small) {
|
|
322
|
-
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveFilePart", file_id: fileId, bytes: part.bytes, file_part: part.part });
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: part.part, bytes: part.bytes, file_total_parts: part.totalParts });
|
|
326
|
-
}
|
|
327
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded part ` + (part.part + 1));
|
|
328
|
-
break;
|
|
329
|
-
}
|
|
330
|
-
catch (err) {
|
|
331
|
-
signal?.throwIfAborted();
|
|
332
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] failed to upload part ` + (part.part + 1));
|
|
333
|
-
++errorCount;
|
|
334
|
-
if (errorCount > 20) {
|
|
335
|
-
retryIn = 0;
|
|
336
|
-
}
|
|
337
|
-
await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${fileId}-${part.part + 1}]`);
|
|
338
|
-
retryIn += 2;
|
|
339
|
-
if (retryIn > 11) {
|
|
340
|
-
retryIn = 11;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
})());
|
|
318
|
+
if (!part.small && part.part > 0) {
|
|
319
|
+
await (0, _0_deps_js_1.delay)(ms);
|
|
320
|
+
ms = Math.max(ms * .8, 0.003);
|
|
321
|
+
}
|
|
322
|
+
promises.push(__classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_uploadPart).call(this, fileId, part.totalParts, !part.small, part.part, part.bytes, signal));
|
|
345
323
|
if (promises.length == _0_utilities_js_1.UPLOAD_POOL_SIZE * _0_utilities_js_1.UPLOAD_REQUEST_PER_CONNECTION) {
|
|
346
324
|
await Promise.all(promises);
|
|
347
325
|
promises = [];
|
|
@@ -354,55 +332,28 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
|
|
|
354
332
|
const partCount = Math.ceil(buffer.byteLength / chunkSize);
|
|
355
333
|
let promises = new Array();
|
|
356
334
|
let started = false;
|
|
357
|
-
let
|
|
335
|
+
let ms = 0.05;
|
|
358
336
|
main: for (let part = 0; part < partCount;) {
|
|
359
337
|
for (let i = 0; i < _0_utilities_js_1.UPLOAD_POOL_SIZE; ++i) {
|
|
360
|
-
for (let i = 0; i <
|
|
338
|
+
for (let i = 0; i < _0_utilities_js_1.UPLOAD_REQUEST_PER_CONNECTION; ++i) {
|
|
361
339
|
const start = part * chunkSize;
|
|
362
340
|
const end = start + chunkSize;
|
|
363
341
|
const bytes = buffer.subarray(start, end);
|
|
364
342
|
if (!bytes.length) {
|
|
365
343
|
break main;
|
|
366
344
|
}
|
|
367
|
-
const thisPart = part++; // `thisPart` must be used instead of `part` in the promise body
|
|
368
345
|
if (!started) {
|
|
369
346
|
started = true;
|
|
370
347
|
}
|
|
371
|
-
else if (isBig) {
|
|
372
|
-
await
|
|
373
|
-
|
|
348
|
+
else if (isBig && part > 0) {
|
|
349
|
+
await (0, _0_deps_js_1.delay)(ms);
|
|
350
|
+
ms = Math.max(ms * .8, 0.003);
|
|
351
|
+
}
|
|
352
|
+
promises.push(__classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_uploadPart).call(this, fileId, partCount, isBig, part++, bytes, signal));
|
|
353
|
+
if (promises.length == _0_utilities_js_1.UPLOAD_POOL_SIZE * _0_utilities_js_1.UPLOAD_REQUEST_PER_CONNECTION) {
|
|
354
|
+
await Promise.all(promises);
|
|
355
|
+
promises = [];
|
|
374
356
|
}
|
|
375
|
-
promises.push((async () => {
|
|
376
|
-
let retryIn = 1;
|
|
377
|
-
let errorCount = 0;
|
|
378
|
-
while (true) {
|
|
379
|
-
try {
|
|
380
|
-
signal?.throwIfAborted();
|
|
381
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploading part ` + (thisPart + 1));
|
|
382
|
-
if (isBig) {
|
|
383
|
-
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: thisPart, bytes, file_total_parts: partCount }, { type: "upload" });
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveFilePart", file_id: fileId, bytes, file_part: thisPart }, { type: "upload" });
|
|
387
|
-
}
|
|
388
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded part ` + (thisPart + 1) + " / " + partCount);
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
catch (err) {
|
|
392
|
-
signal?.throwIfAborted();
|
|
393
|
-
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] failed to upload part ` + (thisPart + 1) + " / " + partCount, err);
|
|
394
|
-
++errorCount;
|
|
395
|
-
if (errorCount > 20) {
|
|
396
|
-
retryIn = 0;
|
|
397
|
-
}
|
|
398
|
-
await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${fileId}-${thisPart + 1}]`);
|
|
399
|
-
retryIn += 2;
|
|
400
|
-
if (retryIn > 11) {
|
|
401
|
-
retryIn = 11;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
})());
|
|
406
357
|
}
|
|
407
358
|
}
|
|
408
359
|
await Promise.all(promises);
|
|
@@ -410,10 +361,40 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
|
|
|
410
361
|
}
|
|
411
362
|
await Promise.all(promises);
|
|
412
363
|
return { small: !isBig, parts: partCount };
|
|
364
|
+
}, _FileManager_uploadPart = async function _FileManager_uploadPart(fileId, partCount, isBig, index, bytes, signal) {
|
|
365
|
+
let retryIn = 1;
|
|
366
|
+
let errorCount = 0;
|
|
367
|
+
while (true) {
|
|
368
|
+
try {
|
|
369
|
+
signal?.throwIfAborted();
|
|
370
|
+
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploading part ` + (index + 1));
|
|
371
|
+
if (isBig) {
|
|
372
|
+
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveBigFilePart", file_id: fileId, file_part: index, bytes: bytes, file_total_parts: partCount }, { type: "upload" });
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.saveFilePart", file_id: fileId, bytes: bytes, file_part: index }, { type: "upload" });
|
|
376
|
+
}
|
|
377
|
+
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] uploaded part ` + (index + 1));
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
catch (err) {
|
|
381
|
+
signal?.throwIfAborted();
|
|
382
|
+
__classPrivateFieldGet(this, _FileManager_Lupload, "f").debug(`[${fileId}] failed to upload part ` + (index + 1));
|
|
383
|
+
++errorCount;
|
|
384
|
+
if (errorCount > 20) {
|
|
385
|
+
retryIn = 0;
|
|
386
|
+
}
|
|
387
|
+
await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${fileId}-${index + 1}]`);
|
|
388
|
+
retryIn += 2;
|
|
389
|
+
if (retryIn > 11) {
|
|
390
|
+
retryIn = 11;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
413
394
|
}, _FileManager_handleError = async function _FileManager_handleError(err, retryIn, logPrefix) {
|
|
414
395
|
if (retryIn > 0) {
|
|
415
396
|
__classPrivateFieldGet(this, _FileManager_Lupload, "f").warning(`${logPrefix} retrying in ${retryIn} seconds`);
|
|
416
|
-
await
|
|
397
|
+
await (0, _0_deps_js_1.delay)(retryIn * _0_deps_js_1.SECOND);
|
|
417
398
|
}
|
|
418
399
|
else {
|
|
419
400
|
throw err;
|
|
@@ -505,5 +486,4 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
|
|
|
505
486
|
_FileManager_UPLOAD_MAX_CHUNK_SIZE = { value: 512 * _1_utilities_js_1.kilobyte };
|
|
506
487
|
_FileManager_DOWNLOAD_MAX_CHUNK_SIZE = { value: 1 * _1_utilities_js_1.megabyte };
|
|
507
488
|
_FileManager_BIG_FILE_THRESHOLD = { value: 10 * _1_utilities_js_1.megabyte };
|
|
508
|
-
_FileManager_UPLOAD_REQUEST_PER_CONNECTION = { value: 2 };
|
|
509
489
|
_FileManager_CUSTOM_EMOJI_TTL = { value: 30 * _0_deps_js_1.MINUTE };
|
|
@@ -282,7 +282,7 @@ class UpdateManager {
|
|
|
282
282
|
__classPrivateFieldGet(this, _UpdateManager_LrecoverUpdateGap, "f").debug(`recovering from update gap [${source}]`);
|
|
283
283
|
__classPrivateFieldGet(this, _UpdateManager_c, "f").setConnectionState("updating");
|
|
284
284
|
try {
|
|
285
|
-
let
|
|
285
|
+
let retryIn = 5;
|
|
286
286
|
let state = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
|
|
287
287
|
while (true) {
|
|
288
288
|
let difference;
|
|
@@ -291,10 +291,10 @@ class UpdateManager {
|
|
|
291
291
|
}
|
|
292
292
|
catch (err) {
|
|
293
293
|
if (err instanceof _3_errors_js_1.PersistentTimestampInvalid) {
|
|
294
|
-
await
|
|
295
|
-
++
|
|
296
|
-
if (
|
|
297
|
-
|
|
294
|
+
await (0, _0_deps_js_1.delay)(retryIn * _0_deps_js_1.SECOND);
|
|
295
|
+
++retryIn;
|
|
296
|
+
if (retryIn > 60) {
|
|
297
|
+
retryIn = 60;
|
|
298
298
|
}
|
|
299
299
|
continue;
|
|
300
300
|
}
|
|
@@ -808,7 +808,7 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
|
|
|
808
808
|
__classPrivateFieldGet(this, _UpdateManager_LrecoverChannelUpdateGap, "f").debug(`recovering channel update gap [${channelId}, ${source}]`);
|
|
809
809
|
const pts_ = await __classPrivateFieldGet(this, _UpdateManager_c, "f").storage.getChannelPts(channelId);
|
|
810
810
|
let pts = pts_ == null ? 1 : pts_;
|
|
811
|
-
let
|
|
811
|
+
let retryIn = 5;
|
|
812
812
|
while (true) {
|
|
813
813
|
const { access_hash } = await __classPrivateFieldGet(this, _UpdateManager_c, "f").getInputPeer(_1_utilities_js_1.ZERO_CHANNEL_ID + -Number(channelId)).then((v) => _2_tl_js_1.Api.as("inputPeerChannel", v));
|
|
814
814
|
let difference;
|
|
@@ -824,10 +824,10 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
|
|
|
824
824
|
}
|
|
825
825
|
catch (err) {
|
|
826
826
|
if (err instanceof _3_errors_js_1.PersistentTimestampInvalid) {
|
|
827
|
-
await
|
|
828
|
-
|
|
829
|
-
if (
|
|
830
|
-
|
|
827
|
+
await (0, _0_deps_js_1.delay)(retryIn * _0_deps_js_1.SECOND);
|
|
828
|
+
retryIn += 5;
|
|
829
|
+
if (retryIn > 60) {
|
|
830
|
+
retryIn = 60;
|
|
831
831
|
}
|
|
832
832
|
continue;
|
|
833
833
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3_client_encrypted_pool.d.ts","sourceRoot":"","sources":["../../src/client/3_client_encrypted_pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,qBAAa,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"3_client_encrypted_pool.d.ts","sourceRoot":"","sources":["../../src/client/3_client_encrypted_pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,qBAAa,mBAAmB;;IAI9B,IAAI,IAAI,WAEP;IAED,GAAG,CAAC,MAAM,EAAE,eAAe;IAI3B,UAAU;IAUV,UAAU;IAMV,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI;CAGhD"}
|
|
@@ -18,47 +18,40 @@
|
|
|
18
18
|
* You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
22
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
23
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
24
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
25
|
+
};
|
|
21
26
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
22
27
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
23
28
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
24
29
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
25
30
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
26
31
|
};
|
|
27
|
-
var
|
|
28
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
29
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
30
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
31
|
-
};
|
|
32
|
-
var _ClientEncryptedPool_index, _ClientEncryptedPool_requestCounter, _ClientEncryptedPool_clients, _ClientEncryptedPool_requestPerClient;
|
|
32
|
+
var _ClientEncryptedPool_index, _ClientEncryptedPool_clients;
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
34
|
exports.ClientEncryptedPool = void 0;
|
|
35
35
|
class ClientEncryptedPool {
|
|
36
|
-
constructor(
|
|
36
|
+
constructor() {
|
|
37
37
|
_ClientEncryptedPool_index.set(this, 0);
|
|
38
|
-
_ClientEncryptedPool_requestCounter.set(this, 0);
|
|
39
38
|
_ClientEncryptedPool_clients.set(this, new Array());
|
|
40
|
-
_ClientEncryptedPool_requestPerClient.set(this, void 0);
|
|
41
|
-
__classPrivateFieldSet(this, _ClientEncryptedPool_requestPerClient, requestPerClient, "f");
|
|
42
39
|
}
|
|
43
40
|
get size() {
|
|
44
41
|
return __classPrivateFieldGet(this, _ClientEncryptedPool_clients, "f").length;
|
|
45
42
|
}
|
|
46
43
|
add(client) {
|
|
47
44
|
__classPrivateFieldGet(this, _ClientEncryptedPool_clients, "f").push(client);
|
|
48
|
-
const invoke = client.invoke.bind(client);
|
|
49
|
-
client.invoke = (...args) => {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
if (__classPrivateFieldSet(this, _ClientEncryptedPool_requestCounter, (_a = __classPrivateFieldGet(this, _ClientEncryptedPool_requestCounter, "f"), ++_a), "f") >= __classPrivateFieldGet(this, _ClientEncryptedPool_requestPerClient, "f")) {
|
|
52
|
-
__classPrivateFieldSet(this, _ClientEncryptedPool_index, (_b = __classPrivateFieldGet(this, _ClientEncryptedPool_index, "f"), _b++, _b), "f");
|
|
53
|
-
if (__classPrivateFieldGet(this, _ClientEncryptedPool_index, "f") >= __classPrivateFieldGet(this, _ClientEncryptedPool_clients, "f").length - 1) {
|
|
54
|
-
__classPrivateFieldSet(this, _ClientEncryptedPool_index, 0, "f");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return invoke(...args);
|
|
58
|
-
};
|
|
59
45
|
}
|
|
60
46
|
nextClient() {
|
|
47
|
+
var _a;
|
|
61
48
|
const client = __classPrivateFieldGet(this, _ClientEncryptedPool_clients, "f")[__classPrivateFieldGet(this, _ClientEncryptedPool_index, "f")];
|
|
49
|
+
if (__classPrivateFieldGet(this, _ClientEncryptedPool_index, "f") >= __classPrivateFieldGet(this, _ClientEncryptedPool_clients, "f").length - 1) {
|
|
50
|
+
__classPrivateFieldSet(this, _ClientEncryptedPool_index, 0, "f");
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
__classPrivateFieldSet(this, _ClientEncryptedPool_index, (_a = __classPrivateFieldGet(this, _ClientEncryptedPool_index, "f"), ++_a), "f");
|
|
54
|
+
}
|
|
62
55
|
return client;
|
|
63
56
|
}
|
|
64
57
|
disconnect() {
|
|
@@ -71,4 +64,4 @@ class ClientEncryptedPool {
|
|
|
71
64
|
}
|
|
72
65
|
}
|
|
73
66
|
exports.ClientEncryptedPool = ClientEncryptedPool;
|
|
74
|
-
_ClientEncryptedPool_index = new WeakMap(),
|
|
67
|
+
_ClientEncryptedPool_index = new WeakMap(), _ClientEncryptedPool_clients = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3_client_encrypted_pool_test.d.ts","sourceRoot":"","sources":["../../src/client/3_client_encrypted_pool_test.ts"],"names":[],"mappings":""}
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
import { MaybePromise } from "../1_utilities.js";
|
|
21
21
|
import { Storage } from "../2_storage.js";
|
|
22
22
|
import { Api, Mtproto } from "../2_tl.js";
|
|
23
|
-
import { DC } from "../3_transport.js";
|
|
24
23
|
import { BotCommand, BusinessConnection, CallbackQueryAnswer, CallbackQueryQuestion, Chat, ChatAction, ChatListItem, ChatMember, ChatP, type ChatPChannel, type ChatPGroup, type ChatPSupergroup, ChatSettings, ClaimedGifts, FailedInvitation, FileSource, Gift, ID, InactiveChat, InlineQueryAnswer, InlineQueryResult, InputMedia, InputStoryContent, InviteLink, LiveStreamChannel, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageInvoice, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Poll, PriceTag, Reaction, SlowModeDuration, Sticker, Story, Topic, Translation, Update, User, VideoChat, VideoChatActive, VideoChatScheduled, VoiceTranscription } from "../3_types.js";
|
|
25
24
|
import { Migrate } from "../4_errors.js";
|
|
26
25
|
import { AddChatMemberParams, AddContactParams, AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, type CreateChannelParams, type CreateGroupParams, CreateInviteLinkParams, CreateStoryParams, type CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamChunkParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageTextParams, EditTopicParams, ForwardMessagesParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetMyCommandsParams, GetTranslationsParams, InvokeParams, JoinVideoChatParams, PinMessageParams, ReplyParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLocationParams, SendMediaGroupParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatPhotoParams, SetEmojiStatusParams, SetLocationParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetSignaturesEnabledParams, SignInParams, type StartBotParams, StartVideoChatParams, StopPollParams, UnpinMessageParams, UpdateProfileParams } from "./0_params.js";
|
|
@@ -274,20 +273,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
274
273
|
constructor(params?: ClientParams);
|
|
275
274
|
get connected(): boolean;
|
|
276
275
|
get disconnected(): boolean;
|
|
277
|
-
/**
|
|
278
|
-
* Sets the DC and resets the auth key stored in the session provider
|
|
279
|
-
* if the stored DC was not the same as the `dc` parameter.
|
|
280
|
-
*
|
|
281
|
-
* @param dc The DC to change to.
|
|
282
|
-
*/
|
|
283
|
-
setDc(dc: DC): Promise<void>;
|
|
284
276
|
/**
|
|
285
277
|
* Loads the session if `setDc` was not called, initializes and connnects
|
|
286
278
|
* a `ClientPlain` to generate auth key if there was none, and connects the client.
|
|
287
279
|
* Before establishing the connection, the session is saved.
|
|
288
280
|
*/
|
|
289
281
|
connect(): Promise<void>;
|
|
290
|
-
reconnect(dc?: DC): Promise<void>;
|
|
291
282
|
[handleMigrationError](err: Migrate): Promise<void>;
|
|
292
283
|
disconnect(): void;
|
|
293
284
|
/**
|