Merge branch 'main' into net9

This commit is contained in:
Łukasz Domeradzki 2024-07-07 18:07:58 +02:00
commit 9189aeb2b9
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
14 changed files with 82 additions and 112 deletions

View file

@ -12,14 +12,5 @@
],
"git-submodules": {
"enabled": true
},
"packageRules": [
{
// TODO: <= 1.7.0-rc.1 for invalid response on monitoring endpoint, last failed version 1.8.0-rc.1 - https://github.com/open-telemetry/opentelemetry-dotnet/issues/5506
// TODO: 1.9.0-alpha.1 generates empty responses - https://github.com/open-telemetry/opentelemetry-dotnet/issues/5661
"allowedVersions": "<= 1.7.0-rc.1",
"matchManagers": [ "nuget" ],
"matchPackageNames": [ "OpenTelemetry.Exporter.Prometheus.AspNetCore" ]
}
]
}
}

View file

@ -25,7 +25,7 @@ jobs:
show-progress: false
- name: Run Qodana scan
uses: JetBrains/qodana-action@v2024.1.5
uses: JetBrains/qodana-action@v2024.1.8
with:
args: --config,.github/qodana.yaml,--property=idea.headless.enable.statistics=false
pr-mode: false
@ -34,6 +34,6 @@ jobs:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
- name: Report Qodana results to GitHub
uses: github/codeql-action/upload-sarif@v3.25.10
uses: github/codeql-action/upload-sarif@v3.25.11
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json

View file

@ -25,10 +25,10 @@ jobs:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.4.0
- name: Build ${{ matrix.configuration }} Docker image from ${{ matrix.file }}
uses: docker/build-push-action@v6.1.0
uses: docker/build-push-action@v6.3.0
with:
build-args: CONFIGURATION=${{ matrix.configuration }}
context: .

View file

@ -24,7 +24,7 @@ jobs:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.4.0
- name: Login to ghcr.io
uses: docker/login-action@v3.2.0
@ -50,7 +50,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile.Service
uses: docker/build-push-action@v6.1.0
uses: docker/build-push-action@v6.3.0
with:
context: .
file: Dockerfile.Service

View file

@ -25,7 +25,7 @@ jobs:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.4.0
- name: Login to ghcr.io
uses: docker/login-action@v3.2.0
@ -50,7 +50,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@v6.1.0
uses: docker/build-push-action@v6.3.0
with:
context: .
platforms: ${{ env.PLATFORMS }}

View file

@ -25,7 +25,7 @@ jobs:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
uses: docker/setup-buildx-action@v3.4.0
- name: Login to ghcr.io
uses: docker/login-action@v3.2.0
@ -51,7 +51,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@v6.1.0
uses: docker/build-push-action@v6.3.0
with:
context: .
platforms: ${{ env.PLATFORMS }}

View file

@ -43,7 +43,7 @@ jobs:
run: npm run-script deploy --no-progress --prefix ASF-ui
- name: Upload ASF-ui
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.3.4
with:
if-no-files-found: error
name: ASF-ui
@ -95,7 +95,7 @@ jobs:
run: dotnet --info
- name: Download previously built ASF-ui
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ASF-ui
path: ASF-ui/dist
@ -367,7 +367,7 @@ jobs:
subject-path: out/ASF-${{ matrix.variant }}.zip
- name: Upload ASF-${{ matrix.variant }}
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.3.4
with:
if-no-files-found: error
name: ${{ matrix.os }}_ASF-${{ matrix.variant }}
@ -415,7 +415,7 @@ jobs:
- name: Upload ArchiSteamFarm.OfficialPlugins.Monitoring
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.3.4
with:
if-no-files-found: error
name: ArchiSteamFarm.OfficialPlugins.Monitoring
@ -439,55 +439,55 @@ jobs:
show-progress: false
- name: Download ASF-generic artifact from ubuntu-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ubuntu-latest_ASF-generic
path: out
- name: Download ASF-linux-arm artifact from ubuntu-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ubuntu-latest_ASF-linux-arm
path: out
- name: Download ASF-linux-arm64 artifact from ubuntu-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ubuntu-latest_ASF-linux-arm64
path: out
- name: Download ASF-linux-x64 artifact from ubuntu-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ubuntu-latest_ASF-linux-x64
path: out
- name: Download ASF-osx-arm64 artifact from macos-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: macos-latest_ASF-osx-arm64
path: out
- name: Download ASF-osx-x64 artifact from macos-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: macos-latest_ASF-osx-x64
path: out
- name: Download ASF-win-arm64 artifact from windows-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: windows-latest_ASF-win-arm64
path: out
- name: Download ASF-win-x64 artifact from windows-latest
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: windows-latest_ASF-win-x64
path: out
- name: Download ArchiSteamFarm.OfficialPlugins.Monitoring artifact
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4.1.8
with:
name: ArchiSteamFarm.OfficialPlugins.Monitoring
path: out
@ -512,7 +512,7 @@ jobs:
subject-path: out/SHA512SUMS
- name: Upload SHA512SUMS
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.3.4
with:
if-no-files-found: error
name: SHA512SUMS
@ -524,7 +524,7 @@ jobs:
subject-path: out/SHA512SUMS.sign
- name: Upload SHA512SUMS.sign
uses: actions/upload-artifact@v4.3.3
uses: actions/upload-artifact@v4.3.4
with:
if-no-files-found: error
name: SHA512SUMS.sign

2
ASF-ui

@ -1 +1 @@
Subproject commit 3ae4df4206a3f5fbbe582403403df848fd29847f
Subproject commit cd60876ac01174a1ffb9e12a2e809de3700d3f33

View file

@ -87,7 +87,10 @@ StackTrace:
{2}</value>
<comment>{0} will be replaced by function name, {1} will be replaced by exception message, {2} will be replaced by entire stack trace. Please note that this string should include newlines for formatting.</comment>
</data>
<data name="ErrorExitingWithNonZeroErrorCode" xml:space="preserve">
<value>Aplikace byla ukončena s chybovým kódem {0}!</value>
<comment>{0} will be replaced by error code (number)</comment>
</data>
<data name="ErrorFailingRequest" xml:space="preserve">
<value>Požadavek selhal: {0}</value>
<comment>{0} will be replaced by URL of the request</comment>
@ -691,7 +694,10 @@ StackTrace:
<value>Váš šifrovací klíč je příliš krátký. Doporučujeme použít ten, který je alespoň {0} bajtů (znaků) dlouhý.</value>
<comment>{0} will be replaced by the number of bytes (characters) recommended</comment>
</data>
<data name="WarningDefaultCryptKeyUsedForHashing" xml:space="preserve">
<value>Používáte {0} nastavení {1} vlastnosti, ale neposkytli jste vlastní --cryptkey. Pro zvýšení bezpečnosti byste měli poskytnout vlastní --cryptkey.</value>
<comment>{0} will be replaced by the name of a particular setting (e.g. "SCrypt"), {1} will be replaced by the name of the property (e.g. "IPCPassword")</comment>
</data>
<data name="WarningDefaultCryptKeyUsedForEncryption" xml:space="preserve">
<value>Používáte {0} nastavení vlastnosti {1}, ale neposkytuješ vlastní --cryptkey. To zcela ruší ochranu, protože ASF je nucen použít svůj vlastní (známý) klíč. Pro využití bezpečnostního přínosu nabízeného tímto nastavením, byste měli poskytnout vlastní --cryptkey.</value>
<comment>{0} will be replaced by the name of a particular setting (e.g. "AES"), {1} will be replaced by the name of the property (e.g. "SteamPassword")</comment>
@ -737,17 +743,48 @@ StackTrace:
<data name="WarningSkipping" xml:space="preserve">
<value>Přeskakování: {0}...</value>
<comment>{0} will be replaced by text value (string) of entry being skipped.</comment>
</data>
<data name="PluginUpdatesChecking" xml:space="preserve">
<value>Kontrola aktualizací zásuvných modulů...</value>
</data>
<data name="PluginUpdateChecking" xml:space="preserve">
<value>Kontrola aktualizace zásuvného modulu {0}...</value>
<comment>{0} will be replaced by plugin name (string).</comment>
</data>
<data name="PluginUpdateNotFound" xml:space="preserve">
<value>Není dostupná žádná aktualizace pro zásuvný modul {0}: {1} ≥ {2}.</value>
<comment>{0} will be replaced by plugin name (string), {1} will be replaced by current plugin's version, {2} will be replaced by remote plugin's version.</comment>
</data>
<data name="PluginUpdateNewVersionAvailable" xml:space="preserve">
<value>Nová verze zásuvného modulu {0} je k dispozici. Zvažte aktualizaci!</value>
<comment>{0} will be replaced by plugin name (string).</comment>
</data>
<data name="PluginUpdateFound" xml:space="preserve">
<value>Nalezena aktualizace pro zásuvný modul {0} z verze {1} na {2}...</value>
<comment>{0} will be replaced by plugin name (string), {1} will be replaced by current plugin's version, {2} will be replaced by remote plugin's version.</comment>
</data>
<data name="PluginUpdateInProgress" xml:space="preserve">
<value>Aktualizuji zásuvný modul {0}...</value>
<comment>{0} will be replaced by plugin name (string).</comment>
</data>
<data name="PluginUpdateFinished" xml:space="preserve">
<value>Aktualizace zásuvného modulu {0} byla provedena úspěšně, změny se projeví až při opětovném spuštění ASF.</value>
<comment>{0} will be replaced by plugin name (string).</comment>
</data>
<data name="PluginUpdateEnabled" xml:space="preserve">
<value>Zásuvný modul {0}/{1} byl zaregistrován a je mu umožněno provádět automatické aktualizace.</value>
<comment>{0} will be replaced by plugin name (string), {1} will be replaced by plugin assembly name (string).</comment>
</data>
<data name="PluginUpdateDisabled" xml:space="preserve">
<value>Zásuvnému modulu {0} ({1}) byly zakázány automatické aktualizace, přestože tuto funkci podporuje.</value>
<comment>{0} will be replaced by plugin name (string), {1} will be replaced by plugin assembly name (string).</comment>
</data>
<data name="CustomPluginUpdatesEnabled" xml:space="preserve">
<value>Vlastní zásuvné moduly byly zaregistrovány pro automatické aktualizace. Tým ASF by vám rád připomněl, že pro vaši vlastní bezpečnost byste měli povolit automatické aktualizace pouze od důvěryhodných stran. Pokud jste to nechtěli udělat, můžete aktualizace zásuvných modulů zakázat v globální konfiguraci ASF.</value>
</data>
</root>

View file

@ -1,46 +0,0 @@
// ----------------------------------------------------------------------------------------------
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// ----------------------------------------------------------------------------------------------
// |
// Copyright 2015-2024 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Threading.Tasks;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using JetBrains.Annotations;
namespace ArchiSteamFarm.Plugins.Interfaces;
/// <inheritdoc />
/// <summary>
/// Implementing this interface allows your plugin to implement custom logic for accepting trades that ASF isn't willing to handle itself.
/// </summary>
[PublicAPI]
[Obsolete($"Use {nameof(IBotTradeOffer2)} interface instead, this one will be removed in the next version")]
public interface IBotTradeOffer : IPlugin {
/// <summary>
/// ASF will call this method for unhandled (ignored and rejected) trade offers received by the bot.
/// </summary>
/// <param name="bot">Bot object related to this callback.</param>
/// <param name="tradeOffer">Trade offer related to this callback.</param>
/// <returns>True if the trade offer should be accepted as part of this plugin, false otherwise.</returns>
Task<bool> OnBotTradeOffer(Bot bot, TradeOffer tradeOffer);
}

View file

@ -602,19 +602,7 @@ public static class PluginsCore {
return false;
}
#pragma warning disable CS0618 // TODO: Pending removal
IList<bool> oldResponses;
try {
oldResponses = await Utilities.InParallel(ActivePlugins.OfType<IBotTradeOffer>().Select(plugin => plugin.OnBotTradeOffer(bot, tradeOffer))).ConfigureAwait(false);
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
return false;
}
#pragma warning restore CS0618 // TODO: Pending removal
return responses.Any(static response => response) || oldResponses.Any(static response => response);
return responses.Any(static response => response);
}
internal static async Task OnBotTradeOfferResults(Bot bot, IReadOnlyCollection<ParseTradeResult> tradeResults) {

View file

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>6.0.4.4</Version>
<Version>6.0.5.1</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -4,13 +4,13 @@
<PackageVersion Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0.1" />
<PackageVersion Include="CryptSharpStandard" Version="1.0.0" />
<PackageVersion Include="Humanizer" Version="3.0.0-beta.54" />
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2024.2.0" />
<PackageVersion Include="Markdig.Signed" Version="0.37.0" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.6.2" />
<PackageVersion Include="MSTest" Version="3.4.3" />
<PackageVersion Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
<PackageVersion Include="NLog.Web.AspNetCore" Version="5.3.11" />
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.7.0-rc.1" />
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.9.0-beta.2" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />

2
wiki

@ -1 +1 @@
Subproject commit 099da0df00f1a8a38f9bcaddd5fc4076eca4bf10
Subproject commit c05f5e48b1dd6ea5b5327ed159570432ebfa5e11