Commit Graph

77 Commits

Author SHA1 Message Date
bitfl0wer b03b703c22 Update reqwest dependency to version 0.11.22 2023-11-22 17:32:22 +01:00
bitfl0wer e828c3cada Bump version, explain why custom `reqwest` 2023-11-22 16:14:47 +01:00
bitfl0wer 8a588892b2 Add wasm-bindgen-futures 2023-11-22 14:24:01 +01:00
bitfl0wer 8c385ee39e Add wasm-bindgen to Cargo.toml 2023-11-20 11:41:32 +01:00
bitfl0wer 5826ccd923 add wasm-bindgen-test 2023-11-19 22:49:41 +01:00
bitfl0wer 926a9fc90e TEMP: Compile wasm dependencies&code per default
TODO: Check todos before merging into dev
2023-11-19 12:52:11 +01:00
bitfl0wer 9ae07a15d7 start implementing wasm gateway 2023-11-19 01:31:04 +01:00
bitfl0wer 29efae385e Apparently, the conditional dependency now works again. lol 2023-11-18 19:18:55 +01:00
bitfl0wer 81455afb7c Use upstream ws_stream_wasm 2023-11-18 19:13:26 +01:00
bitfl0wer 17a58f6f40 Use ws_stream_wasm fork 2023-11-18 15:27:22 +01:00
bitfl0wer b27f60b989 Move ws_stream_wasm to shared dependencies
Avoids conditional compiling bug i haven't yet fully found out. See:
https://cloud.bitfl0wer.de/s/KEcZs7PtQ3JZo8x
2023-11-16 16:28:55 +01:00
bitfl0wer bdfc261c93 Merge branch 'main' into feature/wasm32-unknown 2023-11-14 16:30:24 +01:00
Flori e055d8f04c Bump version 2023-11-14 16:02:51 +01:00
Flori 5e8fe3d24b Manually bump tungstenite to 0.20.1 in cargo.toml 2023-11-14 12:33:12 +01:00
bitfl0wer ec8d1c1f90 Replace tokio::time with safina-timer 2023-11-13 19:20:38 +01:00
bitfl0wer 641abe8ba6 Use patched reqwest with multipart-headers support 2023-11-13 17:34:16 +01:00
bitfl0wer 1b7450366f Include `rand` crate in all targets 2023-11-13 15:38:20 +01:00
bitfl0wer 9f81806ff1 remove sqlx from wasm-exclusion, add futures-timer 2023-11-13 15:29:37 +01:00
bitfl0wer af0178e15a compile-lock most wasm32 incompatibilities 2023-11-13 13:55:55 +01:00
bitfl0wer cc80bb50be Format changes 2023-11-13 12:57:17 +01:00
bitfl0wer 110ce51c05 + ws_stream_wasm, - dev-dependency on tokio/full 2023-11-13 12:43:00 +01:00
bitfl0wer 6af267c7cf HOTFIX: remove openssl, like it was intended 2023-11-12 18:04:47 +01:00
bitfl0wer c3d6937171 Remove openssl-dependency fully 2023-11-12 18:04:15 +01:00
bitfl0wer 279ac9d8ca Bump version for chorus 2023-11-12 17:41:59 +01:00
bitfl0wer 2f559b1397 Remove openssl, use rustls and rand instead 2023-11-12 17:20:32 +01:00
bitfl0wer 7938f0295e Add source url field trait 2023-09-03 21:00:48 +02:00
bitfl0wer db533f9700 Make Errors Hash and Eq, bump version 2023-09-03 16:55:19 +02:00
bitfl0wer 47ba03102c Bugfix time 2023-09-01 15:02:57 +02:00
bitfl0wer 635361a417 Bump version 2023-09-01 13:02:11 +02:00
bitfl0wer c9c222664d Bump version 2023-09-01 00:49:42 +02:00
fowb b949477b24 Bump Version 2023-08-30 15:29:14 +02:00
bitfl0wer 8c45355620 Bump version 2023-08-29 14:45:10 +02:00
bitfl0wer 560a0d8fd8 Fix typo 2023-08-29 00:08:59 +02:00
bitfl0wer 387991c605 Bump version 2023-08-29 00:06:17 +02:00
Flori 60aa559e6d Update Cargo.toml 2023-08-28 18:23:30 +02:00
bitfl0wer 54f907b12e Bump version to 0.2 2023-08-28 12:39:16 +02:00
bitfl0wer f8c7fc84c4 Add website 2023-08-27 12:49:58 +02:00
bitfl0wer 033c8c6a6f Merge branch 'enhancement/bump-deps' of https://github.com/polyphony-chat/chorus into enhancement/bump-deps 2023-08-27 01:11:52 +02:00
bitfl0wer 3f829246ab Bump chorus-macros deps 2023-08-27 01:00:41 +02:00
bitfl0wer 2e4abb468a Bump chorus-macros deps 2023-08-27 00:59:22 +02:00
bitfl0wer a8769ffca6 Bump dependencies 2023-08-27 00:51:52 +02:00
bitfl0wer 558232c1a2 replace sqlx-git-custom with sqlx 2023-08-27 00:11:11 +02:00
bitfl0wer c8378083cf Add json feature to reqwest 2023-08-22 19:22:30 +02:00
bitfl0wer 917f1cfb0d Add rc feature to serde 2023-08-02 20:17:36 +02:00
SpecificProtagonist 9ebe72a7dc derive Updateable (#167) 2023-07-22 11:20:31 +02:00
SpecificProtagonist 776efce4dc Fix gateway heartbeat blocking (#162)
fix gateway heartbeat blocking
2023-07-21 13:59:40 +02:00
Flori df08bc33ac Bump crate versions (#158) 2023-07-17 20:06:57 +02:00
Zert3x 0d6d705e46 Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
Flori 69b7c2445c Ratelimiter overhaul (#144)
* Rename limits and limit to have better names

* Remove empty lines

* Remove handle_request (moved to requestlimiter)

* Start working on new ratelimiter

* Make limits Option, add "limited?" to constructor

* Add missing logic to send_request

* Rename Limits

* Create Ratelimits and Limit Struct

* Define Limit

* Import Ratelimits

* Define get_rate_limits

* Remove unused import

* + check_rate_limits & limits_config_to_ratelimits

* Remove Absolute Limits
These limits are not meant to be tracked anyways.

* add ratelimits is_exhausted

* Add error handling and send request checking

* change limits to option ratelimits

* Add strum

* Change Ratelimits to Hashmap

* Remove ratelimits in favor of hashmap

* Change code from struct to hashmap

* start working on update rate limits

* Remove wrong import

* Rename ChorusLibError to ChorusError

* Documented the chorus errors

* Made error documentation docstring

* Make ReceivedErrorCodeError have error string

* Remove unneeded import

* Match changes in errors.rs

* Improve update_rate_limits and can_send_request

* add ratelimits.to_hash_map()

* use instances' client instead of new client

* add LimitsConfiguration to instance

* improve update_limits, change a method name

* Fix un-updated errors

* Get LimitConfiguration in a sane way

* Move common.rs into ratelimiter::ChorusRequest

* Delete common.rs

* Make instance.rs use overhauled errors

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* Refactor to use new Rate limiting implementation

* update ratelimiter implementation across all files

* Fix remaining errors post-refactor

* Changed Enum case to be correct

* Use result

* Re-add missing body to request

* Remove unneeded late initalization

* Change visibility from pub to pub(crate)
I feel like these core methods don't need to be exposed as public API.

* Remove unnecessary import

* Fix clippy warnings

* Add docstring

* Change Error names across all files

* Update Cargo.toml

Strum is not needed

* Update ratelimits.rs

* Update ratelimits.rs

* Bug/discord instance info unavailable (#146)

* Change text to be more ambigous

* Use default Configuration instead of erroring out

* Emit warning log if instance config cant be gotten

* Remove import

* Update src/instance.rs

Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>

* Add missing closing bracket

* Put limits and limits_configuration as one struct

* Derive Hash

* remove import

* rename limits and limits_configuration

* Save clone call

* Change LimitsConfiguration to RateLimits
`LimitsConfiguration` is in no way related to whether the instance has API rate limits enabled or not. Therefore, it has been replaced with what it should have been all along.

* Add ensure_limit_in_map(), add `window` to `Limit`

* Remove unneeded var

* Remove import

* Clean up unneeded things
Dead code warnings have been supressed, but flagged as FIXME so they don't get forgotten. Anyone using tools like TODO Tree in VSCode can still see that they are there, however, they will not be shown as warnings anymore

* Remove nested submodule `limit`

* Add doc comments

* Add more doc comments

* Add some log messages to some methods

---------

Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-09 18:38:02 +02:00
kozabrada123 3f6d0e2d9d Use log instead of prints 2023-07-01 19:29:50 +02:00