Commit Graph

185 Commits

Author SHA1 Message Date
Łukasz Domeradzki
3f98337459 Closes #3343 2025-01-05 02:32:05 +01:00
Łukasz Domeradzki
ba68d1010f Add optional filtering for plugins GET endpoint 2024-12-25 14:34:18 +01:00
Łukasz Domeradzki
540408a3d0 Fix kestrel deadlock in update procedure when using update command 2024-11-10 15:36:41 +01:00
Łukasz Domeradzki
7c481de811 Closes #3327 2024-11-06 17:40:05 +01:00
Łukasz Domeradzki
6dddaa5992 Fix kestrel deadlock in update procedure
This time for good
2024-10-27 18:48:26 +01:00
Łukasz Domeradzki
f2b8897ed1 Misc 2024-10-13 18:36:50 +02:00
Łukasz Domeradzki
f48caa08e9 Misc 2024-10-12 21:05:00 +02:00
Łukasz Domeradzki
f32fafdf15 Resolve eternal TODO with ASF API update routine 2024-10-12 21:03:11 +02:00
Łukasz Domeradzki
f534997e0e Close log endpoints upon graceful shutdown request
Previously we've kept websocket connection open for as long as caller requested it. During graceful shutdown, ASP.NET normally waits for all pending requests to finish, while no longer accepting new ones - this is a very good approach. In our case however, since we didn't do anything with that event before, the graceful shutdown was timing out after 30 seconds before eventually forcefully killing any still-ongoing requests, websocket connection in our case.

Hook into application lifetime in order to be notified when the graceful shutdown happens. This way we can create linked cancellation token for request abort and graceful shutdown and close the websocket connection when any of those two happens.
2024-10-04 17:58:56 +02:00
Łukasz Domeradzki
55d49f87ff Closes #3299 2024-09-30 22:02:09 +02:00
Łukasz Domeradzki
7b65c1aeb7 Add support for telling plugins if runtime is trimmed 2024-09-16 17:58:35 +02:00
Łukasz Domeradzki
773698a0d4 Closes #3264
THANKS @ezhevita
2024-08-05 02:37:50 +02:00
Łukasz Domeradzki
416ec920cb Add AddLicense to ASF API 2024-05-19 20:07:41 +02:00
Łukasz Domeradzki
6014b3bdc6 Add missing LicenseID inheritance from current 2024-05-10 13:27:49 +02:00
Łukasz Domeradzki
e550cc0f43 Misc 2024-04-16 10:39:03 +02:00
Łukasz Domeradzki
5894226e93 Add optional health checks to ASF API 2024-04-16 10:37:32 +02:00
Łukasz Domeradzki
14b0b332c5 Fix 2024-04-10 01:52:11 +02:00
Łukasz Domeradzki
42dec2de39 Misc
Thanks @xPaw
2024-04-09 16:33:54 +02:00
Łukasz Domeradzki
1841cde776 Misc code enhancements 2024-04-04 02:15:16 +02:00
Łukasz Domeradzki
f98fd85fe9 Misc 2024-03-25 23:03:49 +01:00
Sebastian Göls
0c4e4e709f Add POST /Api/Plugins/Update (#3173) 2024-03-25 22:57:47 +01:00
Archi
4c2a786e54 Add downgrade possibility in update command 2024-03-20 04:16:22 +01:00
Archi
48a14136a9 Update all file headers, again 2024-03-17 02:35:40 +01:00
Archi
f98a159799 File header update 2024-03-17 00:06:13 +01:00
Łukasz Domeradzki
aedede3ba4 Implement plugin updates with IPluginUpdates interface (#3151)
* Initial implementation of plugin updates

* Update PluginsCore.cs

* Update IPluginUpdates.cs

* Update PluginsCore.cs

* Make it work

* Misc

* Revert "Misc"

This reverts commit bccd1bb2b8.

* Proper fix

* Make plugin updates independent of GitHub

* Final touches

* Misc

* Allow plugin creators for more flexibility in picking from GitHub releases

* Misc rename

* Make changelog internal again

This is ASF implementation detail, make body available instead and let people implement changelogs themselves

* Misc

* Add missing localization

* Add a way to disable plugin updates

* Update PluginsCore.cs

* Update PluginsCore.cs

* Misc

* Update IGitHubPluginUpdates.cs

* Update IGitHubPluginUpdates.cs

* Update IGitHubPluginUpdates.cs

* Update IGitHubPluginUpdates.cs

* Make zip selection ignore case

* Update ArchiSteamFarm/Core/Utilities.cs

Co-authored-by: Vita Chumakova <me@ezhevita.dev>

* Misc error notify

* Add commands and finally call it a day

* Misc progress percentages text

* Misc

* Flip DefaultPluginsUpdateMode as per the voting

* Misc

---------

Co-authored-by: Vita Chumakova <me@ezhevita.dev>
2024-03-16 23:56:57 +01:00
Łukasz Domeradzki
6b0bf0f9c1 Closes #3061 (#3145)
* Good start

* Misc

* Make ApiAuthenticationMiddleware use new json

* Remove first newtonsoft dependency

* Pull latest ASFB json enhancements

* Start reimplementing newtonsoft!

* One thing at a time

* Keep doing all kind of breaking changes which need to be tested later

* Add back ShouldSerialize() support

* Misc

* Eradicate remaining parts of newtonsoft

* WIP

* Workaround STJ stupidity in regards to derived types

STJ can't serialize derived type properties by default, so we'll use another approach in our serializable file function

* Make CI happy

* Bunch of further fixes

* Fix AddFreeLicense() after rewrite

* Add full support for JsonDisallowNullAttribute

* Optimize our json utilities even further

* Misc

* Add support for fields in disallow null

* Misc optimization

* Fix deserialization of GlobalCache in STD

* Fix non-public [JsonExtensionData]

* Fix IM missing method exception, correct db storage helpers

* Fix saving into generic databases

Thanks STJ

* Make Save() function abstract to force inheritors to implement it properly

* Correct ShouldSerializeAdditionalProperties to be a method

* Misc cleanup

* Code review

* Allow JSON comments in configs, among other

* Allow trailing commas in configs

Users very often add them accidentally, no reason to throw on them

* Fix confirmation ID

Probably needs further fixes, will need to check later

* Correct confirmations deserialization

* Use JsonNumberHandling

* Misc

* Misc

* [JsonDisallowNull] corrections

* Forbid [JsonDisallowNull] on non-nullable structs

* Not really but okay

* Add and use ToJson() helpers

* Misc

* Misc
2024-02-21 03:09:36 +01:00
Archi
cc28d7520e Misc 2024-01-25 23:34:58 +01:00
Sebastian Göls
dbf7148fbe Happy new year! (#3121)
Co-authored-by: Sebastian Göls <sebastian.goels@salvagninigroup.com>
2024-01-08 11:33:28 +01:00
Archi
636dd139c2 Misc 2023-12-11 11:42:19 +01:00
Archi
96239a97f3 Address trim warnings 2023-11-27 15:39:30 +01:00
Archi
70d3ca47d7 Update TypeController.cs 2023-11-27 14:15:33 +01:00
Archi
a59087b574 Resolve some warnings 2023-11-27 13:01:52 +01:00
Sebastian Göls
193f0e3c08 Use generic ProducesResponseTypeAttribute instead of typeof(...) (#3074) 2023-11-16 21:49:15 +01:00
Archi
103c543eea Closes #3067 2023-11-14 20:58:02 +01:00
Archi
f2ff2f4929 Closes #3060 2023-11-14 20:01:29 +01:00
Łukasz Domeradzki
b34f18497d .NET 8 (#3005)
* Initial .NET 8

* Make it compile in release mode ignoring warnings for now

* First round of improvements

* Second round of improvements

* Third round of improvements

* Use new throws

* Fix .NET Framework, YAY, thanks madness!

Madness devs are awesome

* Misc

* Misc

* AF_NETLINK might be required for some http calls

No clue why

* Fix service files

Doesn't do what it should

* Update CardsFarmer.cs

* New improvements

* Address feedback

* Misc

* Misc

* Misc refactor

* Misc
2023-11-14 19:12:33 +01:00
Archi
ad4c81ac02 Closes #3058 2023-11-02 00:43:11 +01:00
Łukasz Domeradzki
5d467aca9a Add default bot implementation (#3038)
* Add default bot implementation

* Thought so

* Brain damage for netf
2023-10-18 22:57:58 +02:00
Archi
44cbafa25b Misc 2023-08-07 16:39:44 +02:00
Archi
864617801f Add GetConfirmations() to ASF API 2023-08-07 16:34:32 +02:00
Archi
3f91b18a4d Refactor confirmations
Make it so the design actually follows what Steam gives us now. There is no need for standalone Confirmation object anymore, rather re-use what Steam gives us. Optimize parsing type, expose it as public API. Small breaking change in HandleConfirmations() action.
2023-06-29 22:34:26 +02:00
Archi
b2c34694ae Misc code improvements 2023-02-08 21:18:20 +01:00
Sebastian Göls
0c125db118 Happy new year! (#2809) 2023-01-25 15:43:12 +01:00
Archi
8d5653b41e Add target channel to update command and public API 2022-12-23 22:12:18 +01:00
Archi
fc20b6cfc4 Final Rider inspections 2022-12-15 19:23:46 +01:00
JustArchi
6227f84931 Misc cleanup 2022-10-10 22:50:36 +02:00
Sebastian Göls
321e02c0ff Add endpoints to manage IPC bans (#2715)
* Add endpoints to manage IPC bans

* Remove debug code

* Misc.

* Simplify unban logic

* Add explanatory comment to new string resource
2022-10-10 19:28:07 +02:00
Łukasz Domeradzki
d899dbc18c Add NLog/File endpoint (#2639)
* Add log endpoint

* Update LogController.cs

* Address netf breaking

* Fixes & feedback

* THIS IS MADNESS

* Revert "THIS IS MADNESS"

This reverts commit 8359960314.

* Solve netf madness differently
2022-07-03 01:20:43 +02:00
Archi
1dcf98c849 Fix SteamPassword input
Asking for password with encryption enabled always resulted in an error, as the password wasn't properly set to the plaintext and we were back to square one.

The previous logic was overly complex, I don't know why, this should achieve the same and be much easier to understand while at it.
2022-04-29 17:55:33 +02:00
Sebastian Göls
b8bfcd5df3 Simplify LogNullError calls (#2554)
* Remove necessity of nameof(...) in calls to ArchiLogger.LogNullError(...)

* Upgrade Madness

* Upgrade Madness

* Split up compound null log statements
2022-04-13 23:16:36 +02:00