@mtkruto/node 0.63.3 → 0.63.4
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 +8 -5
- package/esm/client/2_update_manager.js +11 -11
- 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 +12 -37
- 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 +7 -4
- package/script/client/2_update_manager.js +10 -10
- 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 +11 -36
- 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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown in {@linkcode retry} once the maximum number of failed attempts
|
|
3
|
+
* has been reached.
|
|
4
|
+
*
|
|
5
|
+
* @example Usage
|
|
6
|
+
* ```ts no-assert ignore
|
|
7
|
+
* import { RetryError } from "@std/async/retry";
|
|
8
|
+
*
|
|
9
|
+
* throw new RetryError({ foo: "bar" }, 3);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare class RetryError extends Error {
|
|
13
|
+
/**
|
|
14
|
+
* Constructs a new {@linkcode RetryError} instance.
|
|
15
|
+
*
|
|
16
|
+
* @param cause the cause for this error.
|
|
17
|
+
* @param attempts the number of retry attempts made.
|
|
18
|
+
*/
|
|
19
|
+
constructor(cause: unknown, attempts: number);
|
|
20
|
+
}
|
|
21
|
+
/** Options for {@linkcode retry}. */
|
|
22
|
+
export interface RetryOptions {
|
|
23
|
+
/**
|
|
24
|
+
* How much to backoff after each retry.
|
|
25
|
+
*
|
|
26
|
+
* @default {2}
|
|
27
|
+
*/
|
|
28
|
+
multiplier?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum milliseconds between attempts.
|
|
31
|
+
*
|
|
32
|
+
* @default {60000}
|
|
33
|
+
*/
|
|
34
|
+
maxTimeout?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The maximum amount of attempts until failure.
|
|
37
|
+
*
|
|
38
|
+
* @default {5}
|
|
39
|
+
*/
|
|
40
|
+
maxAttempts?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The initial and minimum amount of milliseconds between attempts.
|
|
43
|
+
*
|
|
44
|
+
* @default {1000}
|
|
45
|
+
*/
|
|
46
|
+
minTimeout?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Amount of jitter to introduce to the time between attempts. This is `1`
|
|
49
|
+
* for full jitter by default.
|
|
50
|
+
*
|
|
51
|
+
* @default {1}
|
|
52
|
+
*/
|
|
53
|
+
jitter?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Calls the given (possibly asynchronous) function up to `maxAttempts` times.
|
|
57
|
+
* Retries as long as the given function throws. If the attempts are exhausted,
|
|
58
|
+
* throws a {@linkcode RetryError} with `cause` set to the inner exception.
|
|
59
|
+
*
|
|
60
|
+
* The backoff is calculated by multiplying `minTimeout` with `multiplier` to the power of the current attempt counter (starting at 0 up to `maxAttempts - 1`). It is capped at `maxTimeout` however.
|
|
61
|
+
* How long the actual delay is, depends on `jitter`.
|
|
62
|
+
*
|
|
63
|
+
* When `jitter` is the default value of `1`, waits between two attempts for a
|
|
64
|
+
* randomized amount between 0 and the backoff time. With the default options
|
|
65
|
+
* the maximal delay will be `15s = 1s + 2s + 4s + 8s`. If all five attempts
|
|
66
|
+
* are exhausted the mean delay will be `9.5s = ½(4s + 15s)`.
|
|
67
|
+
*
|
|
68
|
+
* When `jitter` is `0`, waits the full backoff time.
|
|
69
|
+
*
|
|
70
|
+
* @example Example configuration 1
|
|
71
|
+
* ```ts no-assert
|
|
72
|
+
* import { retry } from "@std/async/retry";
|
|
73
|
+
* const req = async () => {
|
|
74
|
+
* // some function that throws sometimes
|
|
75
|
+
* };
|
|
76
|
+
*
|
|
77
|
+
* // Below resolves to the first non-error result of `req`
|
|
78
|
+
* const retryPromise = await retry(req, {
|
|
79
|
+
* multiplier: 2,
|
|
80
|
+
* maxTimeout: 60000,
|
|
81
|
+
* maxAttempts: 5,
|
|
82
|
+
* minTimeout: 100,
|
|
83
|
+
* jitter: 1,
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @example Example configuration 2
|
|
88
|
+
* ```ts no-assert
|
|
89
|
+
* import { retry } from "@std/async/retry";
|
|
90
|
+
* const req = async () => {
|
|
91
|
+
* // some function that throws sometimes
|
|
92
|
+
* };
|
|
93
|
+
*
|
|
94
|
+
* // Make sure we wait at least 1 minute, but at most 2 minutes
|
|
95
|
+
* const retryPromise = await retry(req, {
|
|
96
|
+
* multiplier: 2.34,
|
|
97
|
+
* maxTimeout: 80000,
|
|
98
|
+
* maxAttempts: 7,
|
|
99
|
+
* minTimeout: 1000,
|
|
100
|
+
* jitter: 0.5,
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @typeParam T The return type of the function to retry and returned promise.
|
|
105
|
+
* @param fn The function to retry.
|
|
106
|
+
* @param options Additional options.
|
|
107
|
+
* @returns The promise that resolves with the value returned by the function to retry.
|
|
108
|
+
*/
|
|
109
|
+
export declare function retry<T>(fn: (() => Promise<T>) | (() => T), options?: RetryOptions): Promise<T>;
|
|
110
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/retry.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC;;;;;OAKG;gBACS,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;CAK7C;AAED,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAClC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,CAAC,CAAC,CA6CZ"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.RetryError = void 0;
|
|
6
|
+
exports.retry = retry;
|
|
7
|
+
const _util_js_1 = require("./_util.js");
|
|
8
|
+
/**
|
|
9
|
+
* Error thrown in {@linkcode retry} once the maximum number of failed attempts
|
|
10
|
+
* has been reached.
|
|
11
|
+
*
|
|
12
|
+
* @example Usage
|
|
13
|
+
* ```ts no-assert ignore
|
|
14
|
+
* import { RetryError } from "@std/async/retry";
|
|
15
|
+
*
|
|
16
|
+
* throw new RetryError({ foo: "bar" }, 3);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
class RetryError extends Error {
|
|
20
|
+
/**
|
|
21
|
+
* Constructs a new {@linkcode RetryError} instance.
|
|
22
|
+
*
|
|
23
|
+
* @param cause the cause for this error.
|
|
24
|
+
* @param attempts the number of retry attempts made.
|
|
25
|
+
*/
|
|
26
|
+
constructor(cause, attempts) {
|
|
27
|
+
super(`Retrying exceeded the maxAttempts (${attempts}).`);
|
|
28
|
+
this.name = "RetryError";
|
|
29
|
+
this.cause = cause;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.RetryError = RetryError;
|
|
33
|
+
/**
|
|
34
|
+
* Calls the given (possibly asynchronous) function up to `maxAttempts` times.
|
|
35
|
+
* Retries as long as the given function throws. If the attempts are exhausted,
|
|
36
|
+
* throws a {@linkcode RetryError} with `cause` set to the inner exception.
|
|
37
|
+
*
|
|
38
|
+
* The backoff is calculated by multiplying `minTimeout` with `multiplier` to the power of the current attempt counter (starting at 0 up to `maxAttempts - 1`). It is capped at `maxTimeout` however.
|
|
39
|
+
* How long the actual delay is, depends on `jitter`.
|
|
40
|
+
*
|
|
41
|
+
* When `jitter` is the default value of `1`, waits between two attempts for a
|
|
42
|
+
* randomized amount between 0 and the backoff time. With the default options
|
|
43
|
+
* the maximal delay will be `15s = 1s + 2s + 4s + 8s`. If all five attempts
|
|
44
|
+
* are exhausted the mean delay will be `9.5s = ½(4s + 15s)`.
|
|
45
|
+
*
|
|
46
|
+
* When `jitter` is `0`, waits the full backoff time.
|
|
47
|
+
*
|
|
48
|
+
* @example Example configuration 1
|
|
49
|
+
* ```ts no-assert
|
|
50
|
+
* import { retry } from "@std/async/retry";
|
|
51
|
+
* const req = async () => {
|
|
52
|
+
* // some function that throws sometimes
|
|
53
|
+
* };
|
|
54
|
+
*
|
|
55
|
+
* // Below resolves to the first non-error result of `req`
|
|
56
|
+
* const retryPromise = await retry(req, {
|
|
57
|
+
* multiplier: 2,
|
|
58
|
+
* maxTimeout: 60000,
|
|
59
|
+
* maxAttempts: 5,
|
|
60
|
+
* minTimeout: 100,
|
|
61
|
+
* jitter: 1,
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @example Example configuration 2
|
|
66
|
+
* ```ts no-assert
|
|
67
|
+
* import { retry } from "@std/async/retry";
|
|
68
|
+
* const req = async () => {
|
|
69
|
+
* // some function that throws sometimes
|
|
70
|
+
* };
|
|
71
|
+
*
|
|
72
|
+
* // Make sure we wait at least 1 minute, but at most 2 minutes
|
|
73
|
+
* const retryPromise = await retry(req, {
|
|
74
|
+
* multiplier: 2.34,
|
|
75
|
+
* maxTimeout: 80000,
|
|
76
|
+
* maxAttempts: 7,
|
|
77
|
+
* minTimeout: 1000,
|
|
78
|
+
* jitter: 0.5,
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @typeParam T The return type of the function to retry and returned promise.
|
|
83
|
+
* @param fn The function to retry.
|
|
84
|
+
* @param options Additional options.
|
|
85
|
+
* @returns The promise that resolves with the value returned by the function to retry.
|
|
86
|
+
*/
|
|
87
|
+
async function retry(fn, options) {
|
|
88
|
+
const { multiplier = 2, maxTimeout = 60000, maxAttempts = 5, minTimeout = 1000, jitter = 1, } = options ?? {};
|
|
89
|
+
if (maxTimeout <= 0) {
|
|
90
|
+
throw new TypeError(`Cannot retry as 'maxTimeout' must be positive: current value is ${maxTimeout}`);
|
|
91
|
+
}
|
|
92
|
+
if (minTimeout > maxTimeout) {
|
|
93
|
+
throw new TypeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${minTimeout}', 'maxTimeout=${maxTimeout}'`);
|
|
94
|
+
}
|
|
95
|
+
if (jitter > 1) {
|
|
96
|
+
throw new TypeError(`Cannot retry as 'jitter' must be <= 1: current value is ${jitter}`);
|
|
97
|
+
}
|
|
98
|
+
let attempt = 0;
|
|
99
|
+
while (true) {
|
|
100
|
+
try {
|
|
101
|
+
return await fn();
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if (attempt + 1 >= maxAttempts) {
|
|
105
|
+
throw new RetryError(error, maxAttempts);
|
|
106
|
+
}
|
|
107
|
+
const timeout = (0, _util_js_1.exponentialBackoffWithJitter)(maxTimeout, minTimeout, attempt, multiplier, jitter);
|
|
108
|
+
await new Promise((r) => setTimeout(r, timeout));
|
|
109
|
+
}
|
|
110
|
+
attempt++;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for representing n-tuple. Used in {@linkcode tee}.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export type Tuple<T, N extends number> = N extends N ? number extends N ? T[] : TupleOf<T, N, []> : never;
|
|
7
|
+
/**
|
|
8
|
+
* Utility for representing n-tuple of. Used in {@linkcode Tuple}.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export type TupleOf<T, N extends number, R extends unknown[]> = R["length"] extends N ? R : TupleOf<T, N, [T, ...R]>;
|
|
13
|
+
/**
|
|
14
|
+
* Branches the given async iterable into the `n` branches.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { tee } from "@std/async/tee";
|
|
19
|
+
* import { assertEquals } from "@std/assert";
|
|
20
|
+
*
|
|
21
|
+
* const gen = async function* gen() {
|
|
22
|
+
* yield 1;
|
|
23
|
+
* yield 2;
|
|
24
|
+
* yield 3;
|
|
25
|
+
* };
|
|
26
|
+
*
|
|
27
|
+
* const [branch1, branch2] = tee(gen());
|
|
28
|
+
*
|
|
29
|
+
* const result1 = await Array.fromAsync(branch1);
|
|
30
|
+
* assertEquals(result1, [1, 2, 3]);
|
|
31
|
+
*
|
|
32
|
+
* const result2 = await Array.fromAsync(branch2);
|
|
33
|
+
* assertEquals(result2, [1, 2, 3]);
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @typeParam T The type of the provided async iterable and the returned async iterables.
|
|
37
|
+
* @typeParam N The amount of branches to tee into.
|
|
38
|
+
* @param iterable The iterable to tee.
|
|
39
|
+
* @param n The amount of branches to tee into.
|
|
40
|
+
* @returns The tuple where each element is an async iterable.
|
|
41
|
+
*/
|
|
42
|
+
export declare function tee<T, N extends number = 2>(iterable: AsyncIterable<T>, n?: N): Tuple<AsyncIterable<T>, N>;
|
|
43
|
+
//# sourceMappingURL=tee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tee.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/tee.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,GAChD,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC1C,KAAK,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,IAC1D,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GACrB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAuC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,CAAC,EACzC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,GAAE,CAAU,GACZ,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAuB5B"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
5
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
6
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
7
|
+
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");
|
|
8
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
12
|
+
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");
|
|
13
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _Queue_source, _Queue_queue;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.tee = tee;
|
|
18
|
+
class Queue {
|
|
19
|
+
constructor(iterable) {
|
|
20
|
+
_Queue_source.set(this, void 0);
|
|
21
|
+
_Queue_queue.set(this, void 0);
|
|
22
|
+
Object.defineProperty(this, "head", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: void 0
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(this, "done", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: void 0
|
|
33
|
+
});
|
|
34
|
+
__classPrivateFieldSet(this, _Queue_source, iterable[Symbol.asyncIterator](), "f");
|
|
35
|
+
__classPrivateFieldSet(this, _Queue_queue, {
|
|
36
|
+
value: undefined,
|
|
37
|
+
next: undefined,
|
|
38
|
+
}, "f");
|
|
39
|
+
this.head = __classPrivateFieldGet(this, _Queue_queue, "f");
|
|
40
|
+
this.done = false;
|
|
41
|
+
}
|
|
42
|
+
async next() {
|
|
43
|
+
const result = await __classPrivateFieldGet(this, _Queue_source, "f").next();
|
|
44
|
+
if (!result.done) {
|
|
45
|
+
const nextNode = {
|
|
46
|
+
value: result.value,
|
|
47
|
+
next: undefined,
|
|
48
|
+
};
|
|
49
|
+
__classPrivateFieldGet(this, _Queue_queue, "f").next = nextNode;
|
|
50
|
+
__classPrivateFieldSet(this, _Queue_queue, nextNode, "f");
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.done = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_Queue_source = new WeakMap(), _Queue_queue = new WeakMap();
|
|
58
|
+
/**
|
|
59
|
+
* Branches the given async iterable into the `n` branches.
|
|
60
|
+
*
|
|
61
|
+
* @example Usage
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { tee } from "@std/async/tee";
|
|
64
|
+
* import { assertEquals } from "@std/assert";
|
|
65
|
+
*
|
|
66
|
+
* const gen = async function* gen() {
|
|
67
|
+
* yield 1;
|
|
68
|
+
* yield 2;
|
|
69
|
+
* yield 3;
|
|
70
|
+
* };
|
|
71
|
+
*
|
|
72
|
+
* const [branch1, branch2] = tee(gen());
|
|
73
|
+
*
|
|
74
|
+
* const result1 = await Array.fromAsync(branch1);
|
|
75
|
+
* assertEquals(result1, [1, 2, 3]);
|
|
76
|
+
*
|
|
77
|
+
* const result2 = await Array.fromAsync(branch2);
|
|
78
|
+
* assertEquals(result2, [1, 2, 3]);
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @typeParam T The type of the provided async iterable and the returned async iterables.
|
|
82
|
+
* @typeParam N The amount of branches to tee into.
|
|
83
|
+
* @param iterable The iterable to tee.
|
|
84
|
+
* @param n The amount of branches to tee into.
|
|
85
|
+
* @returns The tuple where each element is an async iterable.
|
|
86
|
+
*/
|
|
87
|
+
function tee(iterable, n = 2) {
|
|
88
|
+
const queue = new Queue(iterable);
|
|
89
|
+
async function* generator() {
|
|
90
|
+
let buffer = queue.head;
|
|
91
|
+
while (true) {
|
|
92
|
+
if (buffer.next) {
|
|
93
|
+
buffer = buffer.next;
|
|
94
|
+
yield buffer.value;
|
|
95
|
+
}
|
|
96
|
+
else if (queue.done) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
await queue.next();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return Array.from({ length: n }).map(() => generator());
|
|
105
|
+
}
|
|
@@ -117,7 +117,7 @@ class Session {
|
|
|
117
117
|
return this.transport.connection.connected;
|
|
118
118
|
}
|
|
119
119
|
async connect() {
|
|
120
|
-
const
|
|
120
|
+
const unlock = await __classPrivateFieldGet(this, _Session_connectMutex, "f").lock();
|
|
121
121
|
try {
|
|
122
122
|
if (this.connected) {
|
|
123
123
|
return;
|
|
@@ -128,7 +128,7 @@ class Session {
|
|
|
128
128
|
__classPrivateFieldSet(this, _Session_disconnected, false, "f");
|
|
129
129
|
}
|
|
130
130
|
finally {
|
|
131
|
-
|
|
131
|
+
unlock();
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
async waitUntilConnected() {
|
|
@@ -167,7 +167,7 @@ _Session_dc = new WeakMap(), _Session_cdn = new WeakMap(), _Session_lastConnect
|
|
|
167
167
|
}
|
|
168
168
|
if (__classPrivateFieldGet(this, _Session_lastConnect, "f") && Date.now() - __classPrivateFieldGet(this, _Session_lastConnect, "f").getTime() <= 10 * _0_deps_js_1.SECOND) {
|
|
169
169
|
__classPrivateFieldGet(this, _Session_L, "f").debug("reconnecting after a delay");
|
|
170
|
-
await
|
|
170
|
+
await (0, _0_deps_js_1.delay)(3 * _0_deps_js_1.SECOND);
|
|
171
171
|
}
|
|
172
172
|
else {
|
|
173
173
|
__classPrivateFieldGet(this, _Session_L, "f").debug("reconnecting");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2_session_encrypted.d.ts","sourceRoot":"","sources":["../../src/session/2_session_encrypted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAA8C,OAAO,EAAuC,MAAM,YAAY,CAAC;AACtH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASxD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD;AAQD,qBAAa,gBAAiB,SAAQ,OAAQ,YAAW,OAAO;;IAI9D,QAAQ,EAAE,QAAQ,CAAM;gBAQZ,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa;IAMpC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC;IAM7C,IAAI,OAAO,IAAI,UAAU,CAExB;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAa9B,UAAU,IAAI,IAAI;IAuDrB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"2_session_encrypted.d.ts","sourceRoot":"","sources":["../../src/session/2_session_encrypted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAA8C,OAAO,EAAuC,MAAM,YAAY,CAAC;AACtH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASxD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD;AAQD,qBAAa,gBAAiB,SAAQ,OAAQ,YAAW,OAAO;;IAI9D,QAAQ,EAAE,QAAQ,CAAM;gBAQZ,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa;IAMpC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC;IAM7C,IAAI,OAAO,IAAI,UAAU,CAExB;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAa9B,UAAU,IAAI,IAAI;IAuDrB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;CAsU9C"}
|
|
@@ -390,13 +390,7 @@ async function _SessionEncrypted_onMessage(msgId, body) {
|
|
|
390
390
|
while (this.connected) {
|
|
391
391
|
const then = Date.now();
|
|
392
392
|
try {
|
|
393
|
-
await
|
|
394
|
-
const timeout = setTimeout(resolve, __classPrivateFieldGet(this, _SessionEncrypted_pingInterval, "f") - timeElapsed);
|
|
395
|
-
__classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f").signal.onabort = () => {
|
|
396
|
-
reject(__classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f")?.signal.reason);
|
|
397
|
-
clearTimeout(timeout);
|
|
398
|
-
};
|
|
399
|
-
});
|
|
393
|
+
await (0, _0_deps_js_1.delay)(__classPrivateFieldGet(this, _SessionEncrypted_pingInterval, "f") - timeElapsed, { signal: __classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f").signal });
|
|
400
394
|
if (!this.connected) {
|
|
401
395
|
continue;
|
|
402
396
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
3
|
-
* through a given tolerance. It can be used to take into account IEEE-754
|
|
4
|
-
* double-precision floating-point representation limitations. If the values
|
|
5
|
-
* are not almost equal then throw.
|
|
6
|
-
*
|
|
7
|
-
* The default tolerance is one hundred thousandth of a percent of the
|
|
8
|
-
* expected value.
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts ignore
|
|
12
|
-
* import { assertAlmostEquals } from "@std/assert";
|
|
13
|
-
*
|
|
14
|
-
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
15
|
-
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
16
|
-
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
17
|
-
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
18
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
19
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @param actual The actual value to compare.
|
|
23
|
-
* @param expected The expected value to compare.
|
|
24
|
-
* @param tolerance The tolerance to consider the values almost equal. The
|
|
25
|
-
* default is one hundred thousandth of a percent of the expected value.
|
|
26
|
-
* @param msg The optional message to include in the error.
|
|
27
|
-
*/
|
|
28
|
-
export declare function assertAlmostEquals(actual: number, expected: number, tolerance?: number, msg?: string): void;
|
|
29
|
-
//# sourceMappingURL=almost_equals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
|
4
|
-
/**
|
|
5
|
-
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
6
|
-
* through a given tolerance. It can be used to take into account IEEE-754
|
|
7
|
-
* double-precision floating-point representation limitations. If the values
|
|
8
|
-
* are not almost equal then throw.
|
|
9
|
-
*
|
|
10
|
-
* The default tolerance is one hundred thousandth of a percent of the
|
|
11
|
-
* expected value.
|
|
12
|
-
*
|
|
13
|
-
* @example Usage
|
|
14
|
-
* ```ts ignore
|
|
15
|
-
* import { assertAlmostEquals } from "@std/assert";
|
|
16
|
-
*
|
|
17
|
-
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
18
|
-
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
19
|
-
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
20
|
-
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
21
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
22
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @param actual The actual value to compare.
|
|
26
|
-
* @param expected The expected value to compare.
|
|
27
|
-
* @param tolerance The tolerance to consider the values almost equal. The
|
|
28
|
-
* default is one hundred thousandth of a percent of the expected value.
|
|
29
|
-
* @param msg The optional message to include in the error.
|
|
30
|
-
*/
|
|
31
|
-
export function assertAlmostEquals(actual, expected, tolerance, msg) {
|
|
32
|
-
if (Object.is(actual, expected)) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const delta = Math.abs(expected - actual);
|
|
36
|
-
if (tolerance === undefined) {
|
|
37
|
-
tolerance = isFinite(expected) ? Math.abs(expected * 1e-7) : 1e-7;
|
|
38
|
-
}
|
|
39
|
-
if (delta <= tolerance) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
43
|
-
const f = (n) => Number.isInteger(n) ? n : n.toExponential();
|
|
44
|
-
throw new AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
|
|
45
|
-
delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
|
|
46
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** An array-like object (`Array`, `Uint8Array`, `NodeList`, etc.) that is not a string */
|
|
2
|
-
export type ArrayLikeArg<T> = ArrayLike<T> & object;
|
|
3
|
-
/**
|
|
4
|
-
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
5
|
-
* an error will be thrown.
|
|
6
|
-
*
|
|
7
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
8
|
-
* same type.
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts ignore
|
|
12
|
-
* import { assertArrayIncludes } from "@std/assert";
|
|
13
|
-
*
|
|
14
|
-
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
15
|
-
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @typeParam T The type of the elements in the array to compare.
|
|
19
|
-
* @param actual The array-like object to check for.
|
|
20
|
-
* @param expected The array-like object to check for.
|
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
|
22
|
-
*/
|
|
23
|
-
export declare function assertArrayIncludes<T>(actual: ArrayLikeArg<T>, expected: ArrayLikeArg<T>, msg?: string): void;
|
|
24
|
-
//# sourceMappingURL=array_includes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { equal } from "./equal.js";
|
|
4
|
-
import { format } from "../../internal/1.0.6/format.js";
|
|
5
|
-
import { AssertionError } from "./assertion_error.js";
|
|
6
|
-
/**
|
|
7
|
-
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
8
|
-
* an error will be thrown.
|
|
9
|
-
*
|
|
10
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
11
|
-
* same type.
|
|
12
|
-
*
|
|
13
|
-
* @example Usage
|
|
14
|
-
* ```ts ignore
|
|
15
|
-
* import { assertArrayIncludes } from "@std/assert";
|
|
16
|
-
*
|
|
17
|
-
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
18
|
-
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @typeParam T The type of the elements in the array to compare.
|
|
22
|
-
* @param actual The array-like object to check for.
|
|
23
|
-
* @param expected The array-like object to check for.
|
|
24
|
-
* @param msg The optional message to display if the assertion fails.
|
|
25
|
-
*/
|
|
26
|
-
export function assertArrayIncludes(actual, expected, msg) {
|
|
27
|
-
const missing = [];
|
|
28
|
-
for (let i = 0; i < expected.length; i++) {
|
|
29
|
-
let found = false;
|
|
30
|
-
for (let j = 0; j < actual.length; j++) {
|
|
31
|
-
if (equal(expected[i], actual[j])) {
|
|
32
|
-
found = true;
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (!found) {
|
|
37
|
-
missing.push(expected[i]);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (missing.length === 0) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
44
|
-
msg = `Expected actual: "${format(actual)}" to include: "${format(expected)}"${msgSuffix}\nmissing: ${format(missing)}`;
|
|
45
|
-
throw new AssertionError(msg);
|
|
46
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that actual is not null or undefined.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertExists } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertExists("something"); // Doesn't throw
|
|
10
|
-
* assertExists(undefined); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @typeParam T The type of the actual value.
|
|
14
|
-
* @param actual The actual value to check.
|
|
15
|
-
* @param msg The optional message to include in the error if the assertion fails.
|
|
16
|
-
*/
|
|
17
|
-
export declare function assertExists<T>(actual: T, msg?: string): asserts actual is NonNullable<T>;
|
|
18
|
-
//# sourceMappingURL=exists.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { AssertionError } from "./assertion_error.js";
|
|
4
|
-
/**
|
|
5
|
-
* Make an assertion that actual is not null or undefined.
|
|
6
|
-
* If not then throw.
|
|
7
|
-
*
|
|
8
|
-
* @example Usage
|
|
9
|
-
* ```ts ignore
|
|
10
|
-
* import { assertExists } from "@std/assert";
|
|
11
|
-
*
|
|
12
|
-
* assertExists("something"); // Doesn't throw
|
|
13
|
-
* assertExists(undefined); // Throws
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @typeParam T The type of the actual value.
|
|
17
|
-
* @param actual The actual value to check.
|
|
18
|
-
* @param msg The optional message to include in the error if the assertion fails.
|
|
19
|
-
*/
|
|
20
|
-
export function assertExists(actual, msg) {
|
|
21
|
-
if (actual === undefined || actual === null) {
|
|
22
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
23
|
-
msg =
|
|
24
|
-
`Expected actual: "${actual}" to not be null or undefined${msgSuffix}`;
|
|
25
|
-
throw new AssertionError(msg);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Forcefully throws a failed assertion.
|
|
3
|
-
*
|
|
4
|
-
* @example Usage
|
|
5
|
-
* ```ts ignore
|
|
6
|
-
* import { fail } from "@std/assert";
|
|
7
|
-
*
|
|
8
|
-
* fail("Deliberately failed!"); // Throws
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* @param msg Optional message to include in the error.
|
|
12
|
-
* @returns Never returns, always throws.
|
|
13
|
-
*/
|
|
14
|
-
export declare function fail(msg?: string): never;
|
|
15
|
-
//# sourceMappingURL=fail.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
|