@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
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that actual includes expected. If not
|
|
3
|
-
* then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertStringIncludes } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertStringIncludes("Hello", "ello"); // Doesn't throw
|
|
10
|
-
* assertStringIncludes("Hello", "world"); // Throws
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param actual The actual string to check for inclusion.
|
|
14
|
-
* @param expected The expected string to check for inclusion.
|
|
15
|
-
* @param msg The optional message to display if the assertion fails.
|
|
16
|
-
*/
|
|
17
|
-
export declare function assertStringIncludes(actual: string, expected: string, msg?: string): void;
|
|
18
|
-
//# sourceMappingURL=string_includes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1,26 +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 includes expected. If not
|
|
6
|
-
* then throw.
|
|
7
|
-
*
|
|
8
|
-
* @example Usage
|
|
9
|
-
* ```ts ignore
|
|
10
|
-
* import { assertStringIncludes } from "@std/assert";
|
|
11
|
-
*
|
|
12
|
-
* assertStringIncludes("Hello", "ello"); // Doesn't throw
|
|
13
|
-
* assertStringIncludes("Hello", "world"); // Throws
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @param actual The actual string to check for inclusion.
|
|
17
|
-
* @param expected The expected string to check for inclusion.
|
|
18
|
-
* @param msg The optional message to display if the assertion fails.
|
|
19
|
-
*/
|
|
20
|
-
export function assertStringIncludes(actual, expected, msg) {
|
|
21
|
-
if (actual.includes(expected))
|
|
22
|
-
return;
|
|
23
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
24
|
-
msg = `Expected actual: "${actual}" to contain: "${expected}"${msgSuffix}`;
|
|
25
|
-
throw new AssertionError(msg);
|
|
26
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Executes a function, expecting it to throw. If it does not, then it
|
|
3
|
-
* throws.
|
|
4
|
-
*
|
|
5
|
-
* To assert that an asynchronous function rejects, use
|
|
6
|
-
* {@linkcode assertRejects}.
|
|
7
|
-
*
|
|
8
|
-
* @example Usage
|
|
9
|
-
* ```ts ignore
|
|
10
|
-
* import { assertThrows } from "@std/assert";
|
|
11
|
-
*
|
|
12
|
-
* assertThrows(() => { throw new TypeError("hello world!"); }); // Doesn't throw
|
|
13
|
-
* assertThrows(() => console.log("hello world!")); // Throws
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @param fn The function to execute.
|
|
17
|
-
* @param msg The optional message to display if the assertion fails.
|
|
18
|
-
* @returns The error that was thrown.
|
|
19
|
-
*/
|
|
20
|
-
export declare function assertThrows(fn: () => unknown, msg?: string): unknown;
|
|
21
|
-
/**
|
|
22
|
-
* Executes a function, expecting it to throw. If it does not, then it
|
|
23
|
-
* throws. An error class and a string that should be included in the
|
|
24
|
-
* error message can also be asserted.
|
|
25
|
-
*
|
|
26
|
-
* To assert that an asynchronous function rejects, use
|
|
27
|
-
* {@linkcode assertRejects}.
|
|
28
|
-
*
|
|
29
|
-
* @example Usage
|
|
30
|
-
* ```ts ignore
|
|
31
|
-
* import { assertThrows } from "@std/assert";
|
|
32
|
-
*
|
|
33
|
-
* assertThrows(() => { throw new TypeError("hello world!"); }, TypeError); // Doesn't throw
|
|
34
|
-
* assertThrows(() => { throw new TypeError("hello world!"); }, RangeError); // Throws
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @typeParam E The error class to assert.
|
|
38
|
-
* @param fn The function to execute.
|
|
39
|
-
* @param ErrorClass The error class to assert.
|
|
40
|
-
* @param msgIncludes The string that should be included in the error message.
|
|
41
|
-
* @param msg The optional message to display if the assertion fails.
|
|
42
|
-
* @returns The error that was thrown.
|
|
43
|
-
*/
|
|
44
|
-
export declare function assertThrows<E extends Error = Error>(fn: () => unknown, ErrorClass: abstract new (...args: any[]) => E, msgIncludes?: string, msg?: string): E;
|
|
45
|
-
//# sourceMappingURL=throws.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { assertIsError } from "./is_error.js";
|
|
4
|
-
import { AssertionError } from "./assertion_error.js";
|
|
5
|
-
export function assertThrows(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
6
|
-
// deno-lint-ignore no-explicit-any
|
|
7
|
-
let ErrorClass;
|
|
8
|
-
let msgIncludes;
|
|
9
|
-
let err;
|
|
10
|
-
if (typeof errorClassOrMsg !== "string") {
|
|
11
|
-
if (errorClassOrMsg === undefined ||
|
|
12
|
-
errorClassOrMsg?.prototype instanceof Error ||
|
|
13
|
-
errorClassOrMsg?.prototype === Error.prototype) {
|
|
14
|
-
ErrorClass = errorClassOrMsg;
|
|
15
|
-
msgIncludes = msgIncludesOrMsg;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
msg = msgIncludesOrMsg;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
msg = errorClassOrMsg;
|
|
23
|
-
}
|
|
24
|
-
let doesThrow = false;
|
|
25
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
26
|
-
try {
|
|
27
|
-
fn();
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
if (ErrorClass) {
|
|
31
|
-
if (error instanceof Error === false) {
|
|
32
|
-
throw new AssertionError(`A non-Error object was thrown${msgSuffix}`);
|
|
33
|
-
}
|
|
34
|
-
assertIsError(error, ErrorClass, msgIncludes, msg);
|
|
35
|
-
}
|
|
36
|
-
err = error;
|
|
37
|
-
doesThrow = true;
|
|
38
|
-
}
|
|
39
|
-
if (!doesThrow) {
|
|
40
|
-
msg = `Expected function to throw${msgSuffix}`;
|
|
41
|
-
throw new AssertionError(msg);
|
|
42
|
-
}
|
|
43
|
-
return err;
|
|
44
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use this to stub out methods that will throw when invoked.
|
|
3
|
-
*
|
|
4
|
-
* @example Usage
|
|
5
|
-
* ```ts ignore
|
|
6
|
-
* import { unimplemented } from "@std/assert";
|
|
7
|
-
*
|
|
8
|
-
* unimplemented(); // Throws
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* @param msg Optional message to include in the error.
|
|
12
|
-
* @returns Never returns, always throws.
|
|
13
|
-
*/
|
|
14
|
-
export declare function unimplemented(msg?: string): never;
|
|
15
|
-
//# sourceMappingURL=unimplemented.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
|
|
@@ -1,20 +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
|
-
* Use this to stub out methods that will throw when invoked.
|
|
6
|
-
*
|
|
7
|
-
* @example Usage
|
|
8
|
-
* ```ts ignore
|
|
9
|
-
* import { unimplemented } from "@std/assert";
|
|
10
|
-
*
|
|
11
|
-
* unimplemented(); // Throws
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @param msg Optional message to include in the error.
|
|
15
|
-
* @returns Never returns, always throws.
|
|
16
|
-
*/
|
|
17
|
-
export function unimplemented(msg) {
|
|
18
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
19
|
-
throw new AssertionError(`Unimplemented${msgSuffix}`);
|
|
20
|
-
}
|
|
@@ -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,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertAlmostEquals = assertAlmostEquals;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
9
|
-
* through a given tolerance. It can be used to take into account IEEE-754
|
|
10
|
-
* double-precision floating-point representation limitations. If the values
|
|
11
|
-
* are not almost equal then throw.
|
|
12
|
-
*
|
|
13
|
-
* The default tolerance is one hundred thousandth of a percent of the
|
|
14
|
-
* expected value.
|
|
15
|
-
*
|
|
16
|
-
* @example Usage
|
|
17
|
-
* ```ts ignore
|
|
18
|
-
* import { assertAlmostEquals } from "@std/assert";
|
|
19
|
-
*
|
|
20
|
-
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
21
|
-
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
22
|
-
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
23
|
-
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
24
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
25
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param actual The actual value to compare.
|
|
29
|
-
* @param expected The expected value to compare.
|
|
30
|
-
* @param tolerance The tolerance to consider the values almost equal. The
|
|
31
|
-
* default is one hundred thousandth of a percent of the expected value.
|
|
32
|
-
* @param msg The optional message to include in the error.
|
|
33
|
-
*/
|
|
34
|
-
function assertAlmostEquals(actual, expected, tolerance, msg) {
|
|
35
|
-
if (Object.is(actual, expected)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const delta = Math.abs(expected - actual);
|
|
39
|
-
if (tolerance === undefined) {
|
|
40
|
-
tolerance = isFinite(expected) ? Math.abs(expected * 1e-7) : 1e-7;
|
|
41
|
-
}
|
|
42
|
-
if (delta <= tolerance) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
46
|
-
const f = (n) => Number.isInteger(n) ? n : n.toExponential();
|
|
47
|
-
throw new assertion_error_js_1.AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
|
|
48
|
-
delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
|
|
49
|
-
}
|
|
@@ -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,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertArrayIncludes = assertArrayIncludes;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const equal_js_1 = require("./equal.js");
|
|
7
|
-
const format_js_1 = require("../../internal/1.0.6/format.js");
|
|
8
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
9
|
-
/**
|
|
10
|
-
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
11
|
-
* an error will be thrown.
|
|
12
|
-
*
|
|
13
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
14
|
-
* same type.
|
|
15
|
-
*
|
|
16
|
-
* @example Usage
|
|
17
|
-
* ```ts ignore
|
|
18
|
-
* import { assertArrayIncludes } from "@std/assert";
|
|
19
|
-
*
|
|
20
|
-
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
21
|
-
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @typeParam T The type of the elements in the array to compare.
|
|
25
|
-
* @param actual The array-like object to check for.
|
|
26
|
-
* @param expected The array-like object to check for.
|
|
27
|
-
* @param msg The optional message to display if the assertion fails.
|
|
28
|
-
*/
|
|
29
|
-
function assertArrayIncludes(actual, expected, msg) {
|
|
30
|
-
const missing = [];
|
|
31
|
-
for (let i = 0; i < expected.length; i++) {
|
|
32
|
-
let found = false;
|
|
33
|
-
for (let j = 0; j < actual.length; j++) {
|
|
34
|
-
if ((0, equal_js_1.equal)(expected[i], actual[j])) {
|
|
35
|
-
found = true;
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (!found) {
|
|
40
|
-
missing.push(expected[i]);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (missing.length === 0) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
47
|
-
msg = `Expected actual: "${(0, format_js_1.format)(actual)}" to include: "${(0, format_js_1.format)(expected)}"${msgSuffix}\nmissing: ${(0, format_js_1.format)(missing)}`;
|
|
48
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
49
|
-
}
|
|
@@ -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,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertExists = assertExists;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that actual is not null or undefined.
|
|
9
|
-
* If not then throw.
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { assertExists } from "@std/assert";
|
|
14
|
-
*
|
|
15
|
-
* assertExists("something"); // Doesn't throw
|
|
16
|
-
* assertExists(undefined); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @typeParam T The type of the actual value.
|
|
20
|
-
* @param actual The actual value to check.
|
|
21
|
-
* @param msg The optional message to include in the error if the assertion fails.
|
|
22
|
-
*/
|
|
23
|
-
function assertExists(actual, msg) {
|
|
24
|
-
if (actual === undefined || actual === null) {
|
|
25
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
26
|
-
msg =
|
|
27
|
-
`Expected actual: "${actual}" to not be null or undefined${msgSuffix}`;
|
|
28
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -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"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fail = fail;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Forcefully throws a failed assertion.
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts ignore
|
|
12
|
-
* import { fail } from "@std/assert";
|
|
13
|
-
*
|
|
14
|
-
* fail("Deliberately failed!"); // Throws
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @param msg Optional message to include in the error.
|
|
18
|
-
* @returns Never returns, always throws.
|
|
19
|
-
*/
|
|
20
|
-
function fail(msg) {
|
|
21
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
22
|
-
throw new assertion_error_js_1.AssertionError(`Failed assertion${msgSuffix}`);
|
|
23
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` is greater than `expected`.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertGreater } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertGreater(2, 1); // Doesn't throw
|
|
10
|
-
* assertGreater(1, 1); // Throws
|
|
11
|
-
* assertGreater(0, 1); // Throws
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @typeParam T The type of the values to compare.
|
|
15
|
-
* @param actual The actual value to compare.
|
|
16
|
-
* @param expected The expected value to compare.
|
|
17
|
-
* @param msg The optional message to display if the assertion fails.
|
|
18
|
-
*/
|
|
19
|
-
export declare function assertGreater<T>(actual: T, expected: T, msg?: string): void;
|
|
20
|
-
//# sourceMappingURL=greater.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertGreater = assertGreater;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const format_js_1 = require("../../internal/1.0.6/format.js");
|
|
7
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `actual` is greater than `expected`.
|
|
10
|
-
* If not then throw.
|
|
11
|
-
*
|
|
12
|
-
* @example Usage
|
|
13
|
-
* ```ts ignore
|
|
14
|
-
* import { assertGreater } from "@std/assert";
|
|
15
|
-
*
|
|
16
|
-
* assertGreater(2, 1); // Doesn't throw
|
|
17
|
-
* assertGreater(1, 1); // Throws
|
|
18
|
-
* assertGreater(0, 1); // Throws
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @typeParam T The type of the values to compare.
|
|
22
|
-
* @param actual The actual value to compare.
|
|
23
|
-
* @param expected The expected value to compare.
|
|
24
|
-
* @param msg The optional message to display if the assertion fails.
|
|
25
|
-
*/
|
|
26
|
-
function assertGreater(actual, expected, msg) {
|
|
27
|
-
if (actual > expected)
|
|
28
|
-
return;
|
|
29
|
-
const actualString = (0, format_js_1.format)(actual);
|
|
30
|
-
const expectedString = (0, format_js_1.format)(expected);
|
|
31
|
-
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} > ${expectedString}`);
|
|
32
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` is greater than or equal to `expected`.
|
|
3
|
-
* If not then throw.
|
|
4
|
-
*
|
|
5
|
-
* @example Usage
|
|
6
|
-
* ```ts ignore
|
|
7
|
-
* import { assertGreaterOrEqual } from "@std/assert";
|
|
8
|
-
*
|
|
9
|
-
* assertGreaterOrEqual(2, 1); // Doesn't throw
|
|
10
|
-
* assertGreaterOrEqual(1, 1); // Doesn't throw
|
|
11
|
-
* assertGreaterOrEqual(0, 1); // Throws
|
|
12
|
-
* ```
|
|
13
|
-
*
|
|
14
|
-
* @typeParam T The type of the values to compare.
|
|
15
|
-
* @param actual The actual value to compare.
|
|
16
|
-
* @param expected The expected value to compare.
|
|
17
|
-
* @param msg The optional message to display if the assertion fails.
|
|
18
|
-
*/
|
|
19
|
-
export declare function assertGreaterOrEqual<T>(actual: T, expected: T, msg?: string): void;
|
|
20
|
-
//# sourceMappingURL=greater_or_equal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertGreaterOrEqual = assertGreaterOrEqual;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const format_js_1 = require("../../internal/1.0.6/format.js");
|
|
7
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
8
|
-
/**
|
|
9
|
-
* Make an assertion that `actual` is greater than or equal to `expected`.
|
|
10
|
-
* If not then throw.
|
|
11
|
-
*
|
|
12
|
-
* @example Usage
|
|
13
|
-
* ```ts ignore
|
|
14
|
-
* import { assertGreaterOrEqual } from "@std/assert";
|
|
15
|
-
*
|
|
16
|
-
* assertGreaterOrEqual(2, 1); // Doesn't throw
|
|
17
|
-
* assertGreaterOrEqual(1, 1); // Doesn't throw
|
|
18
|
-
* assertGreaterOrEqual(0, 1); // Throws
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @typeParam T The type of the values to compare.
|
|
22
|
-
* @param actual The actual value to compare.
|
|
23
|
-
* @param expected The expected value to compare.
|
|
24
|
-
* @param msg The optional message to display if the assertion fails.
|
|
25
|
-
*/
|
|
26
|
-
function assertGreaterOrEqual(actual, expected, msg) {
|
|
27
|
-
if (actual >= expected)
|
|
28
|
-
return;
|
|
29
|
-
const actualString = (0, format_js_1.format)(actual);
|
|
30
|
-
const expectedString = (0, format_js_1.format)(expected);
|
|
31
|
-
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} >= ${expectedString}`);
|
|
32
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** Any constructor */
|
|
2
|
-
export type AnyConstructor = new (...args: any[]) => any;
|
|
3
|
-
/** Gets constructor type */
|
|
4
|
-
export type GetConstructorType<T extends AnyConstructor> = InstanceType<T>;
|
|
5
|
-
/**
|
|
6
|
-
* Make an assertion that `obj` is an instance of `type`.
|
|
7
|
-
* If not then throw.
|
|
8
|
-
*
|
|
9
|
-
* @example Usage
|
|
10
|
-
* ```ts ignore
|
|
11
|
-
* import { assertInstanceOf } from "@std/assert";
|
|
12
|
-
*
|
|
13
|
-
* assertInstanceOf(new Date(), Date); // Doesn't throw
|
|
14
|
-
* assertInstanceOf(new Date(), Number); // Throws
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* @typeParam T The expected type of the object.
|
|
18
|
-
* @param actual The object to check.
|
|
19
|
-
* @param expectedType The expected class constructor.
|
|
20
|
-
* @param msg The optional message to display if the assertion fails.
|
|
21
|
-
*/
|
|
22
|
-
export declare function assertInstanceOf<T extends abstract new (...args: any[]) => any>(actual: unknown, expectedType: T, msg?: string): asserts actual is InstanceType<T>;
|
|
23
|
-
//# sourceMappingURL=instance_of.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertInstanceOf = assertInstanceOf;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `obj` is an instance of `type`.
|
|
9
|
-
* If not then throw.
|
|
10
|
-
*
|
|
11
|
-
* @example Usage
|
|
12
|
-
* ```ts ignore
|
|
13
|
-
* import { assertInstanceOf } from "@std/assert";
|
|
14
|
-
*
|
|
15
|
-
* assertInstanceOf(new Date(), Date); // Doesn't throw
|
|
16
|
-
* assertInstanceOf(new Date(), Number); // Throws
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @typeParam T The expected type of the object.
|
|
20
|
-
* @param actual The object to check.
|
|
21
|
-
* @param expectedType The expected class constructor.
|
|
22
|
-
* @param msg The optional message to display if the assertion fails.
|
|
23
|
-
*/
|
|
24
|
-
function assertInstanceOf(actual, expectedType, msg = "") {
|
|
25
|
-
if (actual instanceof expectedType)
|
|
26
|
-
return;
|
|
27
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
28
|
-
const expectedTypeStr = expectedType.name;
|
|
29
|
-
let actualTypeStr = "";
|
|
30
|
-
if (actual === null) {
|
|
31
|
-
actualTypeStr = "null";
|
|
32
|
-
}
|
|
33
|
-
else if (actual === undefined) {
|
|
34
|
-
actualTypeStr = "undefined";
|
|
35
|
-
}
|
|
36
|
-
else if (typeof actual === "object") {
|
|
37
|
-
actualTypeStr = actual.constructor?.name ?? "Object";
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
actualTypeStr = typeof actual;
|
|
41
|
-
}
|
|
42
|
-
if (expectedTypeStr === actualTypeStr) {
|
|
43
|
-
msg =
|
|
44
|
-
`Expected object to be an instance of "${expectedTypeStr}"${msgSuffix}`;
|
|
45
|
-
}
|
|
46
|
-
else if (actualTypeStr === "function") {
|
|
47
|
-
msg =
|
|
48
|
-
`Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object${msgSuffix}`;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
msg =
|
|
52
|
-
`Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}"${msgSuffix}`;
|
|
53
|
-
}
|
|
54
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
55
|
-
}
|