From 0f55a7553394812b596579851c4d5551d30f2a82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:14:38 +0000 Subject: [PATCH 01/41] Bump the hotchocolate group with 7 updates Bumps the hotchocolate group with 7 updates: | Package | From | To | | --- | --- | --- | | [StrawberryShake.Server](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | | [HotChocolate.AspNetCore](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | | [HotChocolate.AspNetCore.Authorization](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | | [HotChocolate.Data.EntityFramework](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | | [Microsoft.EntityFrameworkCore](https://github.com/dotnet/efcore) | `8.0.11` | `8.0.0` | | [HotChocolate.Types.Analyzers](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | | [HotChocolate.Types.Scalars](https://github.com/ChilliCream/graphql-platform) | `14.2.0` | `14.3.0` | Updates `StrawberryShake.Server` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) Updates `HotChocolate.AspNetCore` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) Updates `HotChocolate.AspNetCore.Authorization` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) Updates `HotChocolate.Data.EntityFramework` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) Updates `Microsoft.EntityFrameworkCore` from 8.0.11 to 8.0.0 - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v8.0.11...v8.0.0) Updates `HotChocolate.Types.Analyzers` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) Updates `HotChocolate.Types.Scalars` from 14.2.0 to 14.3.0 - [Release notes](https://github.com/ChilliCream/graphql-platform/releases) - [Commits](https://github.com/ChilliCream/graphql-platform/compare/14.2.0...14.3.0) --- updated-dependencies: - dependency-name: StrawberryShake.Server dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate - dependency-name: HotChocolate.AspNetCore dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate - dependency-name: HotChocolate.AspNetCore.Authorization dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate - dependency-name: HotChocolate.Data.EntityFramework dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate - dependency-name: Microsoft.EntityFrameworkCore dependency-type: direct:production update-type: version-update:semver-patch dependency-group: hotchocolate - dependency-name: HotChocolate.Types.Analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate - dependency-name: HotChocolate.Types.Scalars dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hotchocolate ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Client.GraphQL.csproj | 2 +- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj index 2de8741b51..c3d49bff67 100644 --- a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj +++ b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 08a8222357..415a88332d 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -100,15 +100,15 @@ - + - + - + - + - + From d9dcbba7953cc2e0365f9aa05dd75da25fb16a9b Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 21 Dec 2024 11:09:56 -0500 Subject: [PATCH 02/41] Compatibility with SpacemanDMM's redefined_proc lint Closes #2056 --- build/Version.props | 2 +- src/DMAPI/tgs.dm | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/build/Version.props b/build/Version.props index 4f5fbf62a4..5808985031 100644 --- a/build/Version.props +++ b/build/Version.props @@ -10,7 +10,7 @@ 7.0.0 17.0.0 20.0.0 - 7.3.0 + 7.3.1 5.10.0 1.6.0 8.0.0 diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm index 42f2d5fc31..7e1ba820dd 100644 --- a/src/DMAPI/tgs.dm +++ b/src/DMAPI/tgs.dm @@ -1,7 +1,7 @@ // tgstation-server DMAPI // The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119. -#define TGS_DMAPI_VERSION "7.3.0" +#define TGS_DMAPI_VERSION "7.3.1" // All functions and datums outside this document are subject to change with any version and should not be relied on. @@ -58,6 +58,11 @@ #define TGS_FILE2TEXT_NATIVE file2text #endif +// SpacemanDMM compatibility +#ifndef CAN_BE_REDEFINED +#define CAN_BE_REDEFINED(X) +#endif + // EVENT CODES /// Before a reboot mode change, extras parameters are the current and new reboot mode enums. @@ -160,6 +165,7 @@ * * http_handler - Optional user defined [/datum/tgs_http_handler]. */ /world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE, datum/tgs_http_handler/http_handler) + CAN_BE_REDEFINED(TRUE) return /** @@ -170,6 +176,7 @@ * This function should not be called before ..() in [/world/proc/New]. */ /world/proc/TgsInitializationComplete() + CAN_BE_REDEFINED(TRUE) return /// Consumers MUST run this macro at the start of [/world/proc/Topic]. @@ -177,6 +184,7 @@ /// Consumers MUST call this as late as possible in [world/proc/Reboot] (BEFORE ..()). /world/proc/TgsReboot() + CAN_BE_REDEFINED(TRUE) return // DATUM DEFINITIONS @@ -214,6 +222,7 @@ * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. */ /datum/tgs_version/proc/Wildcard() + CAN_BE_REDEFINED(TRUE) return /** @@ -222,6 +231,7 @@ * other_version - The [/datum/tgs_version] to compare against. */ /datum/tgs_version/proc/Equals(datum/tgs_version/other_version) + CAN_BE_REDEFINED(TRUE) return /// Represents a merge of a GitHub pull request. @@ -459,16 +469,19 @@ /// Returns the maximum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMaximumApiVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the minimum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMinimumApiVersion() + CAN_BE_REDEFINED(TRUE) return /** * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. */ /world/proc/TgsAvailable() + CAN_BE_REDEFINED(TRUE) return // No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called. @@ -480,6 +493,7 @@ * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again. */ /world/proc/TgsEndProcess() + CAN_BE_REDEFINED(TRUE) return /** @@ -490,6 +504,7 @@ * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. */ /world/proc/TgsTargetedChatBroadcast(datum/tgs_message_content/message, admin_only = FALSE) + CAN_BE_REDEFINED(TRUE) return /** @@ -500,6 +515,7 @@ * user: The [/datum/tgs_chat_user] to PM. */ /world/proc/TgsChatPrivateMessage(datum/tgs_message_content/message, datum/tgs_chat_user/user) + CAN_BE_REDEFINED(TRUE) return /** @@ -510,42 +526,52 @@ * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. */ /world/proc/TgsChatBroadcast(datum/tgs_message_content/message, list/channels = null) + CAN_BE_REDEFINED(TRUE) return /// Returns the current [/datum/tgs_version] of TGS if it is running the server, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the running engine type /world/proc/TgsEngine() + CAN_BE_REDEFINED(TRUE) return /// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsApiVersion() + CAN_BE_REDEFINED(TRUE) return /// Returns the name of the TGS instance running the game if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsInstanceName() + CAN_BE_REDEFINED(TRUE) return /// Return the current [/datum/tgs_revision_information] of the running server if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsRevision() + CAN_BE_REDEFINED(TRUE) return /// Returns the current BYOND security level as a TGS_SECURITY_ define if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsSecurityLevel() + CAN_BE_REDEFINED(TRUE) return /// Returns the current BYOND visibility level as a TGS_VISIBILITY_ define if TGS is present, null otherwise. Requires TGS to be using interop API version 5 or higher otherwise the string "___unimplemented" wil be returned. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsVisibility() + CAN_BE_REDEFINED(TRUE) return /// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsTestMerges() + CAN_BE_REDEFINED(TRUE) return /// Returns a list of connected [/datum/tgs_chat_channel]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping! /world/proc/TgsChatChannelInfo() + CAN_BE_REDEFINED(TRUE) return /** @@ -556,6 +582,7 @@ * wait_for_completion - If set, this function will not return until the event has run to completion. */ /world/proc/TgsTriggerEvent(event_name, list/parameters, wait_for_completion = FALSE) + CAN_BE_REDEFINED(TRUE) return /* From a9f651a416a0ba15999330a52fffa9420cf4e221 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:00:53 +0000 Subject: [PATCH 03/41] Bump the mstest group with 2 updates Bumps the mstest group with 2 updates: [MSTest.TestAdapter](https://github.com/microsoft/testfx) and [MSTest.TestFramework](https://github.com/microsoft/testfx). Updates `MSTest.TestAdapter` from 3.6.4 to 3.7.0 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.6.4...v3.7.0) Updates `MSTest.TestFramework` from 3.6.4 to 3.7.0 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.6.4...v3.7.0) --- updated-dependencies: - dependency-name: MSTest.TestAdapter dependency-type: direct:production update-type: version-update:semver-minor dependency-group: mstest - dependency-name: MSTest.TestFramework dependency-type: direct:production update-type: version-update:semver-minor dependency-group: mstest ... Signed-off-by: dependabot[bot] --- build/TestCommon.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index c48c4b6acb..107b581ce9 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -18,9 +18,9 @@ - + - + From c1557365d2f9ef78c5bf93feba64c1d232a91272 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:04:39 +0000 Subject: [PATCH 04/41] Bump YamlDotNet from 16.2.1 to 16.3.0 Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 16.2.1 to 16.3.0. - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](https://github.com/aaubry/YamlDotNet/compare/v16.2.1...v16.3.0) --- updated-dependencies: - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj index f93188baa9..fa3e6e45fb 100644 --- a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -14,7 +14,7 @@ - + From a117e1f7590e56774e8e17d1a361d08bbe4b9a19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:00:31 +0000 Subject: [PATCH 05/41] Bump coverlet.collector from 6.0.2 to 6.0.3 Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.2 to 6.0.3. - [Release notes](https://github.com/coverlet-coverage/coverlet/releases) - [Commits](https://github.com/coverlet-coverage/coverlet/compare/v6.0.2...v6.0.3) --- updated-dependencies: - dependency-name: coverlet.collector dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build/TestCommon.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index 107b581ce9..9696568ca1 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -3,7 +3,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 20a7d1c051fe38ab8352c5850f6c5a0f10234327 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:22:27 +0000 Subject: [PATCH 06/41] Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 8.0.11 to 8.0.12 Bumps [Microsoft.AspNetCore.Mvc.NewtonsoftJson](https://github.com/dotnet/aspnetcore) from 8.0.11 to 8.0.12. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/compare/v8.0.11...v8.0.12) --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.Mvc.NewtonsoftJson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 415a88332d..c929a9a264 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -112,7 +112,7 @@ - + From 7db9805d7d47144c34ff87746eb6fae05772de3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:23:02 +0000 Subject: [PATCH 07/41] Bump Microsoft.Extensions.Logging.EventLog from 9.0.0 to 9.0.1 Bumps [Microsoft.Extensions.Logging.EventLog](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Logging.EventLog dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Service.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 80a62d106d..78a2c3234f 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -23,7 +23,7 @@ - + From a0621c9a5041039ffde083916ad91249f577863e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:02:51 +0000 Subject: [PATCH 08/41] Bump the mstest group with 2 updates Bumps the mstest group with 2 updates: [MSTest.TestAdapter](https://github.com/microsoft/testfx) and [MSTest.TestFramework](https://github.com/microsoft/testfx). Updates `MSTest.TestAdapter` from 3.7.0 to 3.7.1 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.0...v3.7.1) Updates `MSTest.TestFramework` from 3.7.0 to 3.7.1 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.0...v3.7.1) --- updated-dependencies: - dependency-name: MSTest.TestAdapter dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest - dependency-name: MSTest.TestFramework dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest ... Signed-off-by: dependabot[bot] --- build/TestCommon.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index 9696568ca1..4b1b5ad292 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -18,9 +18,9 @@ - + - + From 72a4805a9ceeaa785106ebc5ebcbf6908f09a436 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:24:52 +0000 Subject: [PATCH 09/41] Bump Octokit from 13.0.1 to 14.0.0 Bumps [Octokit](https://github.com/octokit/octokit.net) from 13.0.1 to 14.0.0. - [Release notes](https://github.com/octokit/octokit.net/releases) - [Changelog](https://github.com/octokit/octokit.net/blob/main/docs/releases.md) - [Commits](https://github.com/octokit/octokit.net/compare/v13.0.1...v14.0.0) --- updated-dependencies: - dependency-name: Octokit dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj index fa3e6e45fb..b61df11739 100644 --- a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -12,7 +12,7 @@ - + From abd683e2951b541fcb98c83067001ccecc230990 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:25:05 +0000 Subject: [PATCH 10/41] Bump System.ServiceProcess.ServiceController from 9.0.0 to 9.0.1 Bumps [System.ServiceProcess.ServiceController](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: System.ServiceProcess.ServiceController dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Service.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 80a62d106d..9caabc8669 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -35,7 +35,7 @@ - + From a9ab63c01dae7aff198703c571d503d93669cb9b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:25:24 +0000 Subject: [PATCH 11/41] Bump System.DirectoryServices.AccountManagement from 9.0.0 to 9.0.1 Bumps [System.DirectoryServices.AccountManagement](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: System.DirectoryServices.AccountManagement dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 415a88332d..0c2dbf49ac 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -154,7 +154,7 @@ - + From 71a2f6b54d475700fefc24952523300d24c5eceb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:25:33 +0000 Subject: [PATCH 12/41] Bump System.Security.Permissions from 9.0.0 to 9.0.1 Bumps [System.Security.Permissions](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: System.Security.Permissions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 415a88332d..1eddffd8ed 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -158,7 +158,7 @@ - + From f6a8d7932bdc682589c98c6f735c44ba03e33d64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:27:39 +0000 Subject: [PATCH 13/41] Bump Microsoft.AspNetCore.Http from 2.2.2 to 2.3.0 Bumps [Microsoft.AspNetCore.Http](https://github.com/dotnet/aspnetcore) from 2.2.2 to 2.3.0. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/commits) --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.Http dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Api.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj b/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj index 622b82d8cb..2f6f44c567 100644 --- a/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj +++ b/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj @@ -6,7 +6,7 @@ - + From f6efe25fa5ba2e4d614d6054e108866fa7a425bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:27:44 +0000 Subject: [PATCH 14/41] Bump System.Drawing.Common from 9.0.0 to 9.0.1 Bumps [System.Drawing.Common](https://github.com/dotnet/winforms) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/winforms/releases) - [Changelog](https://github.com/dotnet/winforms/blob/main/docs/release-activity.md) - [Commits](https://github.com/dotnet/winforms/commits/v9.0.1) --- updated-dependencies: - dependency-name: System.Drawing.Common dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Service.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 80a62d106d..dfdf8a108b 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -29,7 +29,7 @@ - + From a53b37e862c11c25a3f5db8582b09774a1f736d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:29:09 +0000 Subject: [PATCH 15/41] Bump System.Text.Encodings.Web from 9.0.0 to 9.0.1 Bumps [System.Text.Encodings.Web](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: System.Text.Encodings.Web dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Api/Tgstation.Server.Api.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 57ca211fbd..4eafea7554 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -31,7 +31,7 @@ - + From 78979a8c5589a5f6eda438ba28290227b9f42717 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:29:47 +0000 Subject: [PATCH 16/41] Bump Microsoft.Bcl.AsyncInterfaces from 9.0.0 to 9.0.1 Bumps [Microsoft.Bcl.AsyncInterfaces](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.Bcl.AsyncInterfaces dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Client.GraphQL.csproj | 2 +- .../Tgstation.Server.Client.Tests.csproj | 2 +- tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj index c3d49bff67..d150ca328d 100644 --- a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj +++ b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj index 0e74bf0b36..0c961dac12 100644 --- a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj +++ b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj index 84fb610491..32edf3de15 100644 --- a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj +++ b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj @@ -6,7 +6,7 @@ - + From 9af6e78903c6bcda4ea4ac06a01dcc40016973a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 00:04:46 +0000 Subject: [PATCH 17/41] Bump Microsoft.Extensions.Logging.Console from 9.0.0 to 9.0.1 Bumps [Microsoft.Extensions.Logging.Console](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Logging.Console dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Console.csproj | 2 +- .../Tgstation.Server.Host.Service.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj index 57b784056e..b2745f1445 100644 --- a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj +++ b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 78a2c3234f..9e1018da91 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -25,7 +25,7 @@ - + From c9ff5b6fca4b36763d841dd2076350a72daa9b0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 02:04:13 +0000 Subject: [PATCH 18/41] Bump Microsoft.AspNetCore.Authentication.JwtBearer from 8.0.11 to 8.0.12 Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/dotnet/aspnetcore) from 8.0.11 to 8.0.12. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/compare/v8.0.11...v8.0.12) --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj index fa3e6e45fb..7f601b6aca 100644 --- a/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj +++ b/src/Tgstation.Server.Shared/Tgstation.Server.Shared.csproj @@ -10,7 +10,7 @@ - + From a6e4fc8b9343ea55f0ea34a0c96b2c609cc44321 Mon Sep 17 00:00:00 2001 From: LetterN <24603524+LetterN@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:44:52 +0800 Subject: [PATCH 19/41] s --- build/stylecop.json | 3 ++- src/Tgstation.Server.Api/Models/ChatChannel.cs | 1 + src/Tgstation.Server.Api/Models/EngineVersion.cs | 2 ++ src/Tgstation.Server.Api/Models/EntityId.cs | 1 + .../Models/Internal/ChatBotSettings.cs | 2 ++ .../Models/Internal/ChatChannelBase.cs | 4 ++++ src/Tgstation.Server.Api/Models/Internal/CompileJob.cs | 2 ++ .../Models/Internal/DreamDaemonApiBase.cs | 3 +++ .../Models/Internal/DreamDaemonLaunchParameters.cs | 8 ++++++++ src/Tgstation.Server.Api/Models/Internal/Job.cs | 2 ++ .../Models/Internal/ServerInformationBase.cs | 5 +++++ src/Tgstation.Server.Api/Models/Internal/SwarmServer.cs | 1 + .../Models/Internal/SwarmServerInformation.cs | 1 + .../Models/Internal/TestMergeApiBase.cs | 1 + .../Models/Internal/TestMergeModelBase.cs | 4 ++++ .../Models/Internal/UpdateInformation.cs | 1 + src/Tgstation.Server.Api/Models/NamedEntity.cs | 1 + .../Models/Request/ServerUpdateRequest.cs | 1 + .../Models/Response/AdministrationResponse.cs | 1 + .../Models/Response/DreamDaemonResponse.cs | 7 +++++++ .../Models/Response/ErrorMessageResponse.cs | 5 ++++- src/Tgstation.Server.Api/Models/Response/JobResponse.cs | 5 ++++- .../Models/Response/LogFileResponse.cs | 1 + .../Models/Response/PaginatedResponse.cs | 3 +++ .../Models/Response/ServerInformationResponse.cs | 4 ++++ .../Models/Response/ServerUpdateResponse.cs | 1 + src/Tgstation.Server.Api/Models/Response/TokenResponse.cs | 1 + src/Tgstation.Server.Api/Models/TestMergeParameters.cs | 5 ++++- src/Tgstation.Server.Api/Models/UserName.cs | 1 + 29 files changed, 73 insertions(+), 4 deletions(-) diff --git a/build/stylecop.json b/build/stylecop.json index d18cd8693c..1ce8caabbd 100644 --- a/build/stylecop.json +++ b/build/stylecop.json @@ -5,7 +5,8 @@ "documentPrivateElements": true, "documentPrivateFields": true, "excludeFromPunctuationCheck": [ - "remarks" + "remarks", + "example" ] }, "indentation": { diff --git a/src/Tgstation.Server.Api/Models/ChatChannel.cs b/src/Tgstation.Server.Api/Models/ChatChannel.cs index 3192603e2b..064711d76c 100644 --- a/src/Tgstation.Server.Api/Models/ChatChannel.cs +++ b/src/Tgstation.Server.Api/Models/ChatChannel.cs @@ -14,6 +14,7 @@ namespace Tgstation.Server.Api.Models /// For , it's the IRC channel name and optional password colon separated. /// For , it's the stringified Discord channel snowflake. /// + /// 124823852418 [Required] [StringLength(Limits.MaximumIndexableStringLength, MinimumLength = 1)] public string? ChannelData { get; set; } diff --git a/src/Tgstation.Server.Api/Models/EngineVersion.cs b/src/Tgstation.Server.Api/Models/EngineVersion.cs index 6196610597..c84ee37eec 100644 --- a/src/Tgstation.Server.Api/Models/EngineVersion.cs +++ b/src/Tgstation.Server.Api/Models/EngineVersion.cs @@ -26,12 +26,14 @@ namespace Tgstation.Server.Api.Models /// /// The of the engine. Currently only valid when is . /// + /// 516.1651.0 [ResponseOptions] public Version? Version { get; set; } /// /// The git commit SHA of the engine. Currently only valid when is . /// + /// caa1e1f400c8b6a535e03cff28cf57f919e9378c [ResponseOptions] [StringLength(Limits.MaximumCommitShaLength, MinimumLength = Limits.MaximumCommitShaLength)] public string? SourceSHA { get; set; } diff --git a/src/Tgstation.Server.Api/Models/EntityId.cs b/src/Tgstation.Server.Api/Models/EntityId.cs index 43ac2e7eda..c7660d399e 100644 --- a/src/Tgstation.Server.Api/Models/EntityId.cs +++ b/src/Tgstation.Server.Api/Models/EntityId.cs @@ -8,6 +8,7 @@ /// /// The ID of the entity. /// + /// 1 [RequestOptions(FieldPresence.Required)] [RequestOptions(FieldPresence.Ignored, PutOnly = true)] public virtual long? Id { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/ChatBotSettings.cs b/src/Tgstation.Server.Api/Models/Internal/ChatBotSettings.cs index 4f6a9e2fac..ecdd0a3110 100644 --- a/src/Tgstation.Server.Api/Models/Internal/ChatBotSettings.cs +++ b/src/Tgstation.Server.Api/Models/Internal/ChatBotSettings.cs @@ -16,6 +16,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The time interval in minutes the chat bot attempts to reconnect if and disconnected. Must not be zero. /// + /// 60 [Required] [Range(1, UInt32.MaxValue)] public uint? ReconnectionInterval { get; set; } @@ -23,6 +24,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The maximum number of s the may contain. /// + /// 5 [Required] public ushort? ChannelLimit { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/ChatChannelBase.cs b/src/Tgstation.Server.Api/Models/Internal/ChatChannelBase.cs index eee19f244f..cc0501d2b5 100644 --- a/src/Tgstation.Server.Api/Models/Internal/ChatChannelBase.cs +++ b/src/Tgstation.Server.Api/Models/Internal/ChatChannelBase.cs @@ -10,18 +10,21 @@ namespace Tgstation.Server.Api.Models.Internal /// /// If the is an admin channel. /// + /// false [Required] public bool? IsAdminChannel { get; set; } /// /// If the is a watchdog channel. /// + /// false [Required] public bool? IsWatchdogChannel { get; set; } /// /// If the is an updates channel. /// + /// false [Required] public bool? IsUpdatesChannel { get; set; } @@ -34,6 +37,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// A custom tag users can define to group channels together. /// + /// system-channel-only [ResponseOptions] [StringLength(Limits.MaximumStringLength)] public string? Tag { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/CompileJob.cs b/src/Tgstation.Server.Api/Models/Internal/CompileJob.cs index eb8862a86c..386a65a9fb 100644 --- a/src/Tgstation.Server.Api/Models/Internal/CompileJob.cs +++ b/src/Tgstation.Server.Api/Models/Internal/CompileJob.cs @@ -12,6 +12,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The .dme file used for compilation. /// + /// tgstation.dme [Required] public string? DmeName { get; set; } @@ -36,6 +37,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The DMAPI . /// + /// 7.3.0 [NotMapped] [ResponseOptions] public virtual Version? DMApiVersion { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonApiBase.cs b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonApiBase.cs index c0c6f63374..116f27425d 100644 --- a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonApiBase.cs +++ b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonApiBase.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// An incrementing ID for representing current server execution. /// + /// 1 [ResponseOptions] public long? SessionId { get; set; } @@ -22,12 +23,14 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The last known count of connected players. Requires to not be 0 and a game server interop version >= 5.10.0 to populate. /// + /// 30 [ResponseOptions] public uint? ClientCount { get; set; } /// /// If the server is undergoing a soft reset. This may be automatically set by changes to other fields. /// + /// false [ResponseOptions] public bool? SoftRestart { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs index 05bef48a50..dca2356a9d 100644 --- a/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs +++ b/src/Tgstation.Server.Api/Models/Internal/DreamDaemonLaunchParameters.cs @@ -11,6 +11,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// If the BYOND web client can be used to connect to the game server. No-op for . /// + /// false [Required] [ResponseOptions] public bool? AllowWebClient { get; set; } @@ -25,6 +26,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The level of DreamDaemon. No-op for . /// + /// 2 [Required] [ResponseOptions] [EnumDataType(typeof(DreamDaemonVisibility))] @@ -33,6 +35,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The level of DreamDaemon. No-op for . /// + /// 1 [Required] [ResponseOptions] [EnumDataType(typeof(DreamDaemonSecurity))] @@ -41,6 +44,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The port DreamDaemon uses. This should be publically accessible. /// + /// 1337 [Required] [ResponseOptions] [Range(1, UInt16.MaxValue)] @@ -49,6 +53,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The port used by for its topic port. /// + /// 2337 [Required] [ResponseOptions] public ushort? OpenDreamTopicPort { get; set; } @@ -56,6 +61,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The DreamDaemon startup timeout in seconds. /// + /// 5 [Required] [ResponseOptions] [Range(1, UInt32.MaxValue)] @@ -64,6 +70,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The number of seconds between each watchdog health check. 0 disables. /// + /// 5 [Required] [ResponseOptions] public uint? HealthCheckSeconds { get; set; } @@ -78,6 +85,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The timeout for sending and receiving BYOND topics in milliseconds. /// + /// 500 [Required] [ResponseOptions] [Range(1, UInt32.MaxValue)] diff --git a/src/Tgstation.Server.Api/Models/Internal/Job.cs b/src/Tgstation.Server.Api/Models/Internal/Job.cs index 8b3b210c60..29a44c7803 100644 --- a/src/Tgstation.Server.Api/Models/Internal/Job.cs +++ b/src/Tgstation.Server.Api/Models/Internal/Job.cs @@ -20,6 +20,7 @@ namespace Tgstation.Server.Api.Models.Internal /// English description of the . /// /// May not match the listed on the . + /// Installing and configuring important objects. [Required] public string? Description { get; set; } @@ -50,6 +51,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// If the was cancelled. /// + /// false [Required] public bool? Cancelled { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/ServerInformationBase.cs b/src/Tgstation.Server.Api/Models/Internal/ServerInformationBase.cs index 15fafe90b1..9341662df3 100644 --- a/src/Tgstation.Server.Api/Models/Internal/ServerInformationBase.cs +++ b/src/Tgstation.Server.Api/Models/Internal/ServerInformationBase.cs @@ -10,26 +10,31 @@ namespace Tgstation.Server.Api.Models.Internal /// /// Minimum length of database user passwords. /// + /// 20 public uint MinimumPasswordLength { get; set; } /// /// The maximum number of s allowed. /// + /// 100 public uint InstanceLimit { get; set; } /// /// The maximum number of users allowed. /// + /// 100 public uint UserLimit { get; set; } /// /// The maximum number of user groups allowed. /// + /// 50 public uint UserGroupLimit { get; set; } /// /// Limits the locations instances may be created or attached from. /// + /// ["/home/tgstation-server/my-server-1", "/home/tgstation-server/my-server-2"] [ResponseOptions] public List? ValidInstancePaths { get; set; } } diff --git a/src/Tgstation.Server.Api/Models/Internal/SwarmServer.cs b/src/Tgstation.Server.Api/Models/Internal/SwarmServer.cs index 998c519b19..3682306335 100644 --- a/src/Tgstation.Server.Api/Models/Internal/SwarmServer.cs +++ b/src/Tgstation.Server.Api/Models/Internal/SwarmServer.cs @@ -22,6 +22,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The server's identifier. /// + /// myserver-us-east [Required] public string? Identifier { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/SwarmServerInformation.cs b/src/Tgstation.Server.Api/Models/Internal/SwarmServerInformation.cs index 89238b3099..6ea4ee92f3 100644 --- a/src/Tgstation.Server.Api/Models/Internal/SwarmServerInformation.cs +++ b/src/Tgstation.Server.Api/Models/Internal/SwarmServerInformation.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// If the is the controller. /// + /// false public bool Controller { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/Internal/TestMergeApiBase.cs b/src/Tgstation.Server.Api/Models/Internal/TestMergeApiBase.cs index 036124c2a1..7b3a26cf33 100644 --- a/src/Tgstation.Server.Api/Models/Internal/TestMergeApiBase.cs +++ b/src/Tgstation.Server.Api/Models/Internal/TestMergeApiBase.cs @@ -11,6 +11,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The ID of the . /// + /// 1 public long Id { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/Internal/TestMergeModelBase.cs b/src/Tgstation.Server.Api/Models/Internal/TestMergeModelBase.cs index 20a2821d07..d936f9f026 100644 --- a/src/Tgstation.Server.Api/Models/Internal/TestMergeModelBase.cs +++ b/src/Tgstation.Server.Api/Models/Internal/TestMergeModelBase.cs @@ -11,18 +11,21 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The title of the test merge source. /// + /// Fixes and Breaks everything [Required] public string? TitleAtMerge { get; set; } /// /// The body of the test merge source. /// + /// # GitHub markdown\n\rI assume? [Required] public string? BodyAtMerge { get; set; } /// /// The URL of the test merge source. /// + /// https://github.com/tgstation/tgstation/pull/31026 [Required] #pragma warning disable CA1056 // Uri properties should not be strings public string? Url { get; set; } @@ -31,6 +34,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The author of the test merge source. /// + /// MrStonedOne [Required] public string? Author { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Internal/UpdateInformation.cs b/src/Tgstation.Server.Api/Models/Internal/UpdateInformation.cs index 9f049e4814..ea587a9d63 100644 --- a/src/Tgstation.Server.Api/Models/Internal/UpdateInformation.cs +++ b/src/Tgstation.Server.Api/Models/Internal/UpdateInformation.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Internal /// /// The latest available version of the Tgstation.Server.Host assembly from the upstream repository. If is less than 4 the update cannot be applied due to API changes. /// + /// 1.0.0 public Version? LatestVersion { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/NamedEntity.cs b/src/Tgstation.Server.Api/Models/NamedEntity.cs index a138ef7eb5..930ca9c6e3 100644 --- a/src/Tgstation.Server.Api/Models/NamedEntity.cs +++ b/src/Tgstation.Server.Api/Models/NamedEntity.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models /// /// The name of the entity represented by the . /// + /// MyThingyName [Required] [RequestOptions(FieldPresence.Required, PutOnly = true)] [StringLength(Limits.MaximumIndexableStringLength, MinimumLength = 1)] diff --git a/src/Tgstation.Server.Api/Models/Request/ServerUpdateRequest.cs b/src/Tgstation.Server.Api/Models/Request/ServerUpdateRequest.cs index ab34e28bde..c3bf7b8425 100644 --- a/src/Tgstation.Server.Api/Models/Request/ServerUpdateRequest.cs +++ b/src/Tgstation.Server.Api/Models/Request/ServerUpdateRequest.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Request /// /// Changes the version of tgstation-server to the given version from the upstream repository. /// + /// 6.12.3 [RequestOptions(FieldPresence.Required)] public Version? NewVersion { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Response/AdministrationResponse.cs b/src/Tgstation.Server.Api/Models/Response/AdministrationResponse.cs index fbdd1f00a1..437dc6132a 100644 --- a/src/Tgstation.Server.Api/Models/Response/AdministrationResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/AdministrationResponse.cs @@ -12,6 +12,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The GitHub repository the server is built to receive updates from. /// + /// https://github.com/tgstation/tgstation public Uri? TrackedRepositoryUrl { get; set; } } } diff --git a/src/Tgstation.Server.Api/Models/Response/DreamDaemonResponse.cs b/src/Tgstation.Server.Api/Models/Response/DreamDaemonResponse.cs index d0b86cdaa4..115d2c395e 100644 --- a/src/Tgstation.Server.Api/Models/Response/DreamDaemonResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/DreamDaemonResponse.cs @@ -24,6 +24,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The current . /// + /// 2 [EnumDataType(typeof(WatchdogStatus))] [ResponseOptions] public WatchdogStatus? Status { get; set; } @@ -31,6 +32,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The current . May be upgraded. due to requirements of . /// + /// 1 [EnumDataType(typeof(DreamDaemonSecurity))] [ResponseOptions] public DreamDaemonSecurity? CurrentSecurity { get; set; } @@ -38,6 +40,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The current . /// + /// 2 [EnumDataType(typeof(DreamDaemonVisibility))] [ResponseOptions] public DreamDaemonVisibility? CurrentVisibility { get; set; } @@ -45,24 +48,28 @@ namespace Tgstation.Server.Api.Models.Response /// /// The port the running instance is set to. /// + /// 1337 [ResponseOptions] public ushort? CurrentPort { get; set; } /// /// The topic port the running instance is set to. /// + /// 3000 [ResponseOptions] public ushort? CurrentTopicPort { get; set; } /// /// The webclient status the running instance is set to. /// + /// false [ResponseOptions] public bool? CurrentAllowWebclient { get; set; } /// /// The amount of RAM in use by the game server in bytes. /// + /// 1073741824 [ResponseOptions] public long? ImmediateMemoryUsage { get; set; } } diff --git a/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs b/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs index 70cb64c530..d58d81b6b4 100644 --- a/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs @@ -13,16 +13,19 @@ namespace Tgstation.Server.Api.Models.Response /// /// The version of the API the server is using. /// + /// 9.3.0 public Version? ServerApiVersion { get; set; } /// - /// A human readable description of the error. + /// A human-readable description of the error. /// + /// Ooopsie, we did a fucky wucky! public string? Message { get; set; } /// /// Additional data associated with the error message. /// + /// Error at thing.app.dependency.class.function in line 32 [ResponseOptions] public string? AdditionalData { get; set; } diff --git a/src/Tgstation.Server.Api/Models/Response/JobResponse.cs b/src/Tgstation.Server.Api/Models/Response/JobResponse.cs index 053fe1f9aa..4e97485e95 100644 --- a/src/Tgstation.Server.Api/Models/Response/JobResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/JobResponse.cs @@ -8,6 +8,7 @@ /// /// The of the . /// + /// 1 public long? InstanceId { get; set; } /// @@ -24,12 +25,14 @@ /// /// Optional progress between 0 and 100 inclusive. /// + /// 25 [ResponseOptions] public int? Progress { get; set; } /// - /// Optional description of the job's current . + /// Optional description of the job's current progress. /// + /// Doing something important [ResponseOptions] public string? Stage { get; set; } } diff --git a/src/Tgstation.Server.Api/Models/Response/LogFileResponse.cs b/src/Tgstation.Server.Api/Models/Response/LogFileResponse.cs index 05c05e8aa0..b39867b413 100644 --- a/src/Tgstation.Server.Api/Models/Response/LogFileResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/LogFileResponse.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The name of the log file. /// + /// tgs-20250118.log public string? Name { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/Response/PaginatedResponse.cs b/src/Tgstation.Server.Api/Models/Response/PaginatedResponse.cs index df3d72595f..dc42fa230c 100644 --- a/src/Tgstation.Server.Api/Models/Response/PaginatedResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/PaginatedResponse.cs @@ -18,16 +18,19 @@ namespace Tgstation.Server.Api.Models.Response /// /// The total number of pages in the query. /// + /// 5 public int TotalPages { get; set; } /// /// The current size of pages in the query. /// + /// 20 public int PageSize { get; set; } /// /// The total items across all pages. /// + /// 100 public int TotalItems { get; set; } } } diff --git a/src/Tgstation.Server.Api/Models/Response/ServerInformationResponse.cs b/src/Tgstation.Server.Api/Models/Response/ServerInformationResponse.cs index 4e80e80564..82f27e7e7c 100644 --- a/src/Tgstation.Server.Api/Models/Response/ServerInformationResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/ServerInformationResponse.cs @@ -11,16 +11,19 @@ namespace Tgstation.Server.Api.Models.Response /// /// The version of the host. /// + /// 6.12.3 public Version? Version { get; set; } /// /// The version of the host. /// + /// 10.12.0 public Version? ApiVersion { get; set; } /// /// The DMAPI interop version the server uses. /// + /// 7.3.0 public Version? DMApiVersion { get; set; } /// @@ -36,6 +39,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// If there is a server update in progress. /// + /// false public bool UpdateInProgress { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/Response/ServerUpdateResponse.cs b/src/Tgstation.Server.Api/Models/Response/ServerUpdateResponse.cs index 48c9b99e6a..46a96d8d49 100644 --- a/src/Tgstation.Server.Api/Models/Response/ServerUpdateResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/ServerUpdateResponse.cs @@ -12,6 +12,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The version of tgstation-server pending update. /// + /// 6.12.3 public Version NewVersion { get; } /// diff --git a/src/Tgstation.Server.Api/Models/Response/TokenResponse.cs b/src/Tgstation.Server.Api/Models/Response/TokenResponse.cs index f81066741a..ddc757dfd0 100644 --- a/src/Tgstation.Server.Api/Models/Response/TokenResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/TokenResponse.cs @@ -10,6 +10,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// The value of the JWT. /// + /// eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwibmJmIjoxNzM3MDkzNDgwLCJleHAiOjE3MzcwOTQzODAsImlhdCI6MTczNzA5MzQ4MCwiaXNzIjoiVGdzdGF0aW9uLlNlcnZlci5Ib3N0IiwiYXVkIjoiVGdzdGF0aW9uLlNlcnZlci5BcGkifQ.v64KX34_YOpH-HCbwqlx1p8u-MNbb4L6a9qEyXhcNcU public string? Bearer { get; set; } /// diff --git a/src/Tgstation.Server.Api/Models/TestMergeParameters.cs b/src/Tgstation.Server.Api/Models/TestMergeParameters.cs index 174bb6886b..22b4b5f28e 100644 --- a/src/Tgstation.Server.Api/Models/TestMergeParameters.cs +++ b/src/Tgstation.Server.Api/Models/TestMergeParameters.cs @@ -10,18 +10,21 @@ namespace Tgstation.Server.Api.Models /// /// The number of the test merge source. /// + /// 31026 public int Number { get; set; } /// /// The sha of the test merge revision to merge. If not specified, the latest commit from the source will be used. /// + /// caa1e1f400c8b6a535e03cff28cf57f919e9378c [Required] - [StringLength(40)] + [StringLength(Limits.MaximumCommitShaLength, MinimumLength = Limits.MaximumCommitShaLength)] public virtual string? TargetCommitSha { get; set; } /// /// Optional comment about the test. /// + /// this will fix everything -Admin [ResponseOptions] [StringLength(Limits.MaximumStringLength)] public string? Comment { get; set; } diff --git a/src/Tgstation.Server.Api/Models/UserName.cs b/src/Tgstation.Server.Api/Models/UserName.cs index a3b6be8162..00f9b4772a 100644 --- a/src/Tgstation.Server.Api/Models/UserName.cs +++ b/src/Tgstation.Server.Api/Models/UserName.cs @@ -6,6 +6,7 @@ public class UserName : NamedEntity { /// + /// Admin [RequestOptions(FieldPresence.Optional)] public override string? Name { From 16194fa88505b76a1d5d2faa003a6b34f171c632 Mon Sep 17 00:00:00 2001 From: LetterN <24603524+LetterN@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:45:38 +0800 Subject: [PATCH 20/41] api flattener & desc --- .../Utils/SwaggerConfiguration.cs | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs index d415e30ea3..5c3c55313b 100644 --- a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs +++ b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Net; using System.Net.Mime; using System.Reflection; - +using System.Text.RegularExpressions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; using Microsoft.OpenApi.Any; @@ -99,6 +99,7 @@ namespace Tgstation.Server.Host.Utils In = ParameterLocation.Header, Type = SecuritySchemeType.Http, Name = HeaderNames.Authorization, + Description = "Username & Password authentication to obtain an JWT token when doing a (POST /api).", Scheme = ApiHeaders.BasicAuthenticationScheme, }); @@ -107,16 +108,18 @@ namespace Tgstation.Server.Host.Utils In = ParameterLocation.Header, Type = SecuritySchemeType.Http, Name = HeaderNames.Authorization, + Description = "OAuth2 based authentication.", Scheme = ApiHeaders.OAuthAuthenticationScheme, }); swaggerGenOptions.AddSecurityDefinition(TokenSecuritySchemeId, new OpenApiSecurityScheme { - BearerFormat = "JWT", In = ParameterLocation.Header, Type = SecuritySchemeType.Http, Name = HeaderNames.Authorization, + Description = "JWT Bearer token generated by the server (POST /api). You need this for most endpoints to work.", Scheme = ApiHeaders.BearerAuthenticationScheme, + BearerFormat = "JWT", }); } @@ -368,14 +371,11 @@ namespace Tgstation.Server.Host.Utils }, }; - operation.Security = new List + operation.Security = new List() { new() { - { - tokenScheme, - new List() - }, + { tokenScheme, new List() }, }, }; @@ -493,7 +493,6 @@ namespace Tgstation.Server.Host.Utils var productHeaderSchema = new OpenApiSchema { Type = "string", - Format = "productheader", }; swaggerDoc.Components.Parameters.Add(ApiHeaders.ApiVersionHeader, new OpenApiParameter @@ -541,6 +540,28 @@ namespace Tgstation.Server.Host.Utils Id = HeaderNames.UserAgent, }, }); + + // flatten (Tgstation.Server.*).MyClass + if (operation.Description?.Length > 0) + operation.Description = Regex.Replace(operation.Description, @"Tgstation\.Server\.(\w+\.)+(?=\w+)", string.Empty); + + if (operation.Summary?.Length > 0) + operation.Summary = Regex.Replace(operation.Summary, @"Tgstation\.Server\.(\w+\.)+(?=\w+)", string.Empty); + + if (operation.RequestBody?.Description != null) + operation.RequestBody.Description = Regex.Replace(operation.RequestBody.Description, @"Tgstation\.Server\.(\w+\.)+(?=\w+)", string.Empty); + + foreach (var opPar in operation.Parameters) + { + if (opPar.Description != null) + opPar.Description = Regex.Replace(opPar.Description, @"Tgstation\.Server\.(\w+\.)+(?=\w+)", string.Empty); + } + + foreach (var (_, opRes) in operation.Responses) + { + if (opRes.Description != null) + opRes.Description = Regex.Replace(opRes.Description, @"Tgstation\.Server\.(\w+\.)+(?=\w+)", string.Empty); + } } AddDefaultResponses(swaggerDoc); From d9b07aed17fa92d4ca06e593a826da518f4fc8ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:18:44 +0000 Subject: [PATCH 21/41] Bump coverlet.collector from 6.0.3 to 6.0.4 Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.3 to 6.0.4. - [Release notes](https://github.com/coverlet-coverage/coverlet/releases) - [Commits](https://github.com/coverlet-coverage/coverlet/compare/v6.0.3...v6.0.4) --- updated-dependencies: - dependency-name: coverlet.collector dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build/TestCommon.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index 4b1b5ad292..40da0e7137 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -3,7 +3,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From a97b349c72828bd0477cb48508da3cc6f4fd5486 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:21:43 +0000 Subject: [PATCH 22/41] Bump Microsoft.Extensions.Hosting.WindowsServices, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.EventLog and System.ServiceProcess.ServiceController Bumps [Microsoft.Extensions.Hosting.WindowsServices](https://github.com/dotnet/runtime), [Microsoft.Extensions.Logging.Console](https://github.com/dotnet/runtime), [Microsoft.Extensions.Logging.EventLog](https://github.com/dotnet/runtime) and [System.ServiceProcess.ServiceController](https://github.com/dotnet/runtime). These dependencies needed to be updated together. Updates `Microsoft.Extensions.Hosting.WindowsServices` from 9.0.0 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) Updates `Microsoft.Extensions.Logging.Console` from 9.0.1 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v9.0.1) Updates `Microsoft.Extensions.Logging.EventLog` from 9.0.1 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v9.0.1) Updates `System.ServiceProcess.ServiceController` from 9.0.1 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Hosting.WindowsServices dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging.Console dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging.EventLog dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: System.ServiceProcess.ServiceController dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Service.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 9a855dbec9..ac29220817 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -21,7 +21,7 @@ - + From 41c391d7871099d83b32eeb2a45d1618345e5032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:23:08 +0000 Subject: [PATCH 23/41] Bump Microsoft.IdentityModel.JsonWebTokens and System.Text.Encodings.Web Bumps [Microsoft.IdentityModel.JsonWebTokens](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) and [System.Text.Encodings.Web](https://github.com/dotnet/runtime). These dependencies needed to be updated together. Updates `Microsoft.IdentityModel.JsonWebTokens` from 8.3.0 to 8.3.1 - [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases) - [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/8.3.1/CHANGELOG.md) - [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/8.3.0...8.3.1) Updates `System.Text.Encodings.Web` from 9.0.1 to 8.0.0 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v8.0.0) --- updated-dependencies: - dependency-name: Microsoft.IdentityModel.JsonWebTokens dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: System.Text.Encodings.Web dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Api/Tgstation.Server.Api.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 4eafea7554..8deaaf5832 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -28,7 +28,7 @@ - + From 895705fe774aa2ee9f837b51b990c034637032b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:23:55 +0000 Subject: [PATCH 24/41] Bump Microsoft.Extensions.Hosting.Systemd and Microsoft.Extensions.Logging.Console Bumps [Microsoft.Extensions.Hosting.Systemd](https://github.com/dotnet/runtime) and [Microsoft.Extensions.Logging.Console](https://github.com/dotnet/runtime). These dependencies needed to be updated together. Updates `Microsoft.Extensions.Hosting.Systemd` from 9.0.0 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) Updates `Microsoft.Extensions.Logging.Console` from 9.0.1 to 9.0.1 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.1...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Hosting.Systemd dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging.Console dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Tgstation.Server.Host.Console.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj index b2745f1445..889a862be4 100644 --- a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj +++ b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj @@ -13,7 +13,7 @@ - + From cb0fb87f42dec74a90c62ea1ed69235df80d2967 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:17:30 +0000 Subject: [PATCH 25/41] Bump Microsoft.AspNetCore.SignalR.Client from 9.0.0 to 9.0.1 Bumps [Microsoft.AspNetCore.SignalR.Client](https://github.com/dotnet/aspnetcore) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.SignalR.Client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Client/Tgstation.Server.Client.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index 91278a6dcd..0870f67e4a 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -11,7 +11,7 @@ - + From 50ebdaedd45f8776c784522b8e069eea61f3bcaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:20:01 +0000 Subject: [PATCH 26/41] Bump System.Management from 9.0.0 to 9.0.1 Bumps [System.Management](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: System.Management dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 9af3134c45..582f408503 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -156,7 +156,7 @@ - + From eaba979abc989a9129e87d62927ab8e90703207f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:49:00 +0000 Subject: [PATCH 27/41] Bump the mstest group with 2 updates Bumps the mstest group with 2 updates: [MSTest.TestAdapter](https://github.com/microsoft/testfx) and [MSTest.TestFramework](https://github.com/microsoft/testfx). Updates `MSTest.TestAdapter` from 3.7.1 to 3.7.2 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.1...v3.7.2) Updates `MSTest.TestFramework` from 3.7.1 to 3.7.2 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.1...v3.7.2) --- updated-dependencies: - dependency-name: MSTest.TestAdapter dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest - dependency-name: MSTest.TestFramework dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest ... Signed-off-by: dependabot[bot] --- build/TestCommon.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index 40da0e7137..222609c004 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -18,9 +18,9 @@ - + - + From 3f350aa6db82ac7367c08fedb218080e1099932e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 18:01:58 -0500 Subject: [PATCH 28/41] Add DreamDaemonPreLaunch event --- .../Components/Events/EventType.cs | 6 ++++++ .../Components/Session/SessionControllerFactory.cs | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/Events/EventType.cs b/src/Tgstation.Server.Host/Components/Events/EventType.cs index 711d6ca246..1dbfdb2b6f 100644 --- a/src/Tgstation.Server.Host/Components/Events/EventType.cs +++ b/src/Tgstation.Server.Host/Components/Events/EventType.cs @@ -173,5 +173,11 @@ /// [EventScript("EngineInstallComplete")] EngineInstallComplete, + + /// + /// Before game server process is created. No parameters. + /// + [EventScript("DreamDaemonPreLaunch")] + DreamDaemonPreLaunch, } } diff --git a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs index 1573d4c48a..0785051b64 100644 --- a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs +++ b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.Linq; using System.Net.Sockets; using System.Text; using System.Threading; @@ -516,6 +517,14 @@ namespace Tgstation.Server.Host.Components.Session ? logFilePath : null); + // If this isnt a staging DD (From a Deployment), fire off events + if (!apiValidate) + await eventConsumer.HandleEvent( + EventType.DreamDaemonPreLaunch, + Enumerable.Empty(), + false, + cancellationToken); + var process = await processExecutor.LaunchProcess( engineLock.ServerExePath, dmbProvider.Directory, @@ -539,7 +548,6 @@ namespace Tgstation.Server.Host.Components.Session if (!engineLock.HasStandardOutput) networkPromptReaper.RegisterProcess(process); - // If this isnt a staging DD (From a Deployment), fire off an event if (!apiValidate) await eventConsumer.HandleEvent( EventType.DreamDaemonLaunch, From d235bcc482d20c9c854c653b6bc16da324230725 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 18:50:04 -0500 Subject: [PATCH 29/41] Log the database provider used --- src/Tgstation.Server.Host/Core/Application.cs | 4 ++++ .../Extensions/WebHostBuilderExtensions.cs | 1 + .../Core/TestApplication.cs | 24 +++++++++++-------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index f0cf647c79..dd88ce5d80 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -527,6 +527,7 @@ namespace Tgstation.Server.Host.Core /// The . /// The containing the to use. /// The containing the to use. + /// The containing the to use. /// The containing the to use. /// The containing the to use. /// The for the . @@ -538,6 +539,7 @@ namespace Tgstation.Server.Host.Core IAssemblyInformationProvider assemblyInformationProvider, IOptions controlPanelConfigurationOptions, IOptions generalConfigurationOptions, + IOptions databaseConfigurationOptions, IOptions swarmConfigurationOptions, IOptions internalConfigurationOptions, ILogger logger) @@ -552,11 +554,13 @@ namespace Tgstation.Server.Host.Core var controlPanelConfiguration = controlPanelConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(controlPanelConfigurationOptions)); var generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions)); + var databaseConfiguration = databaseConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(databaseConfigurationOptions)); var swarmConfiguration = swarmConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(swarmConfigurationOptions)); var internalConfiguration = internalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(internalConfigurationOptions)); ArgumentNullException.ThrowIfNull(logger); + logger.LogDebug("Database provider: {provider}", databaseConfiguration.DatabaseType); logger.LogDebug("Content Root: {contentRoot}", hostingEnvironment.ContentRootPath); logger.LogTrace("Web Root: {webRoot}", hostingEnvironment.WebRootPath); diff --git a/src/Tgstation.Server.Host/Extensions/WebHostBuilderExtensions.cs b/src/Tgstation.Server.Host/Extensions/WebHostBuilderExtensions.cs index c3bd0d593b..73add394bd 100644 --- a/src/Tgstation.Server.Host/Extensions/WebHostBuilderExtensions.cs +++ b/src/Tgstation.Server.Host/Extensions/WebHostBuilderExtensions.cs @@ -65,6 +65,7 @@ namespace Tgstation.Server.Host.Extensions applicationBuilder.ApplicationServices.GetRequiredService(), applicationBuilder.ApplicationServices.GetRequiredService>(), applicationBuilder.ApplicationServices.GetRequiredService>(), + applicationBuilder.ApplicationServices.GetRequiredService>(), applicationBuilder.ApplicationServices.GetRequiredService>(), applicationBuilder.ApplicationServices.GetRequiredService>(), applicationBuilder.ApplicationServices.GetRequiredService>()); diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs b/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs index 258c0f20ff..bad2265de1 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs +++ b/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs @@ -40,39 +40,43 @@ namespace Tgstation.Server.Host.Core.Tests Assert.ThrowsException(() => app.ConfigureServices(mockServiceCollection, null, null)); - Assert.ThrowsException(() => app.Configure(null, null, null, null, null, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(null, null, null, null, null, null, null, null, null, null, null)); var mockAppBuilder = new Mock(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, null, null, null, null, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, null, null, null, null, null, null, null, null, null, null)); var mockServerControl = new Mock(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, null, null, null, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, null, null, null, null, null, null, null, null, null)); var mockTokenFactory = new Mock(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, null, null, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, null, null, null, null, null, null, null, null)); var mockServerPortProvider = new Mock(); mockServerPortProvider.SetupGet(x => x.HttpApiPort).Returns(5345); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, null, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, null, null, null, null, null, null, null)); var mockAssemblyInformationProvider = Mock.Of(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, null, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, null, null, null, null, null, null)); var mockControlPanelOptions = new Mock>(); mockControlPanelOptions.SetupGet(x => x.Value).Returns(new ControlPanelConfiguration()).Verifiable(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, null, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, null, null, null, null, null)); var mockGeneralOptions = new Mock>(); mockGeneralOptions.SetupGet(x => x.Value).Returns(new GeneralConfiguration()).Verifiable(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, null, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, null, null, null, null)); + + var mockDatabaseOptions = new Mock>(); + mockGeneralOptions.SetupGet(x => x.Value).Returns(new GeneralConfiguration()).Verifiable(); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockDatabaseOptions.Object, null, null, null)); var mockSwarmOptions = new Mock>(); mockSwarmOptions.SetupGet(x => x.Value).Returns(new SwarmConfiguration()).Verifiable(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockSwarmOptions.Object, null, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockDatabaseOptions.Object, mockSwarmOptions.Object, null, null)); var mockInternalOptions = new Mock>(); mockInternalOptions.SetupGet(x => x.Value).Returns(new InternalConfiguration()).Verifiable(); - Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockSwarmOptions.Object, mockInternalOptions.Object, null)); + Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockDatabaseOptions.Object, mockSwarmOptions.Object, mockInternalOptions.Object, null)); mockControlPanelOptions.VerifyAll(); mockInternalOptions.VerifyAll(); From 192e62e4821ec982df26c30f44946b3ef82c4c97 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 18:50:30 -0500 Subject: [PATCH 30/41] Fix deleting the propagated exception file before reading it Fixes #2101 --- .../Watchdog.cs | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs index 09a985c9dd..706c418d94 100644 --- a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs @@ -258,6 +258,7 @@ namespace Tgstation.Server.Host.Watchdog process.StartInfo.UseShellExecute = false; // runs in the same console var killedHostProcess = false; + var createdShutdownFile = false; try { Task? processTask = null; @@ -279,6 +280,7 @@ namespace Tgstation.Server.Host.Watchdog { logger.LogInformation("Cancellation requested! Writing shutdown lock file..."); File.WriteAllBytes(updateDirectory, Array.Empty()); + createdShutdownFile = true; } else logger.LogWarning("Cancellation requested while update directory exists!"); @@ -330,15 +332,16 @@ namespace Tgstation.Server.Host.Watchdog logger.LogWarning(ex2, "Error killing host process!"); } - try - { - if (File.Exists(updateDirectory)) - File.Delete(updateDirectory); - } - catch (Exception ex2) - { - logger.LogWarning(ex2, "Error deleting comms file!"); - } + if (createdShutdownFile) + try + { + if (File.Exists(updateDirectory)) + File.Delete(updateDirectory); + } + catch (Exception ex2) + { + logger.LogWarning(ex2, "Error deleting comms file!"); + } logger.LogInformation("Host exited!"); } From 69978ba49858a3481b27872c3768d90fef64c7a1 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 18:54:43 -0500 Subject: [PATCH 31/41] Switch a bunch of nix options to non-empty strings --- build/package/nix/tgstation-server.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/package/nix/tgstation-server.nix b/build/package/nix/tgstation-server.nix index fa9f659657..54978adb3f 100644 --- a/build/package/nix/tgstation-server.nix +++ b/build/package/nix/tgstation-server.nix @@ -53,7 +53,7 @@ in }; username = lib.mkOption { - type = lib.types.str; + type = lib.types.nonEmptyStr; default = "tgstation-server"; description = '' The name of the user used to execute tgstation-server. @@ -61,7 +61,7 @@ in }; groupname = lib.mkOption { - type = lib.types.str; + type = lib.types.nonEmptyStr; default = "tgstation-server"; description = '' The name of group the user used to execute tgstation-server will belong to. @@ -69,7 +69,7 @@ in }; home-directory = lib.mkOption { - type = lib.types.str; + type = lib.types.nonEmptyStr; default = "/home/tgstation-server"; description = '' The home directory of TGS. Should be persistent. From a57343abb6adae477cb08f16f342ea086b6aaaae Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 19:14:30 -0500 Subject: [PATCH 32/41] Update HotChocolate --- .../Tgstation.Server.Client.GraphQL.csproj | 2 +- .../GraphQL/ErrorMessageFilter.cs | 2 +- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj index d150ca328d..e9308d8bee 100644 --- a/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj +++ b/src/Tgstation.Server.Client.GraphQL/Tgstation.Server.Client.GraphQL.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Tgstation.Server.Host/GraphQL/ErrorMessageFilter.cs b/src/Tgstation.Server.Host/GraphQL/ErrorMessageFilter.cs index cbb9ac05e8..c5184ee05e 100644 --- a/src/Tgstation.Server.Host/GraphQL/ErrorMessageFilter.cs +++ b/src/Tgstation.Server.Host/GraphQL/ErrorMessageFilter.cs @@ -38,7 +38,7 @@ namespace Tgstation.Server.Host.GraphQL return error; var errorBuilder = ErrorBuilder.FromError(error) - .RemoveException() + .SetException(null) .ClearExtensions(); const string ErrorCodeFieldName = "errorCode"; diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 582f408503..18f3e1e1d1 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -100,15 +100,15 @@ - + - + - + - + - + From be6e0628c939729cbb490f806c611dffe271077e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 19:15:31 -0500 Subject: [PATCH 33/41] Bump MSTest --- build/TestCommon.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/TestCommon.props b/build/TestCommon.props index 222609c004..f0d0217523 100644 --- a/build/TestCommon.props +++ b/build/TestCommon.props @@ -18,9 +18,9 @@ - + - + From 8d32652561aa205360136ecd4274a0bf292f44d5 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 19:18:25 -0500 Subject: [PATCH 34/41] Update other packages --- src/Tgstation.Server.Api/Tgstation.Server.Api.csproj | 4 ++-- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 8deaaf5832..27bbd839ba 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -26,9 +26,9 @@ - + - + diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 18f3e1e1d1..5f181858d7 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -114,7 +114,7 @@ - + From 4e7b982b1a4224545c6c35c8a9966dd04694efe3 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 19:07:55 -0500 Subject: [PATCH 35/41] Test adding manual wants to nix Closes #2104 --- build/package/nix/tgstation-server.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/package/nix/tgstation-server.nix b/build/package/nix/tgstation-server.nix index 54978adb3f..1618f11750 100644 --- a/build/package/nix/tgstation-server.nix +++ b/build/package/nix/tgstation-server.nix @@ -1,6 +1,7 @@ inputs@{ config, lib, + systemdUtils, nixpkgs, pkgs, writeShellScriptBin, @@ -99,6 +100,14 @@ in Environment file as defined in {manpage}`systemd.exec(5)` ''; }; + + wants = lib.mkOption { + type = lib.types.listOf systemdUtils.lib.unitNameType; + default = []; + description = '' + Start the specified units when this unit is started. + ''; + } }; }; From 71bf2d2e0f22e7cab33896ef5c7009d4eb49b6a0 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 7 Feb 2025 19:19:54 -0500 Subject: [PATCH 36/41] Fix an IDE message --- src/Tgstation.Server.Host.Watchdog/Watchdog.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs index 706c418d94..9defdd8a5e 100644 --- a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs @@ -177,6 +177,10 @@ namespace Tgstation.Server.Host.Watchdog var watchdogVersion = executingAssembly.GetName().Version?.Semver().ToString(); + var serializerOptions = new JsonSerializerOptions + { + WriteIndented = true, + }; while (!cancellationToken.IsCancellationRequested) { if (!File.Exists(assemblyPath)) @@ -214,10 +218,7 @@ namespace Tgstation.Server.Host.Watchdog bootstrapperSettingsFile, JsonSerializer.Serialize( bootstrapSettings, - new JsonSerializerOptions - { - WriteIndented = true, - }), + serializerOptions), cancellationToken); } } From 108cd6567378382a4fcd8aea614fcd12a77ba160 Mon Sep 17 00:00:00 2001 From: LetterN <24603524+LetterN@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:51:19 +0800 Subject: [PATCH 37/41] thingies --- build/Version.props | 2 +- .../Models/Response/ErrorMessageResponse.cs | 2 +- src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Version.props b/build/Version.props index f5a77aabad..e1e94b6991 100644 --- a/build/Version.props +++ b/build/Version.props @@ -8,7 +8,7 @@ 10.12.0 0.5.0 7.0.0 - 17.0.0 + 17.0.1 20.0.0 7.3.1 5.10.0 diff --git a/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs b/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs index d58d81b6b4..1df20f57cb 100644 --- a/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs +++ b/src/Tgstation.Server.Api/Models/Response/ErrorMessageResponse.cs @@ -19,7 +19,7 @@ namespace Tgstation.Server.Api.Models.Response /// /// A human-readable description of the error. /// - /// Ooopsie, we did a fucky wucky! + /// Oopsie woopsie, we did a fucky wucky! public string? Message { get; set; } /// diff --git a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs index 5c3c55313b..8e5806f30c 100644 --- a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs +++ b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs @@ -6,6 +6,7 @@ using System.Net; using System.Net.Mime; using System.Reflection; using System.Text.RegularExpressions; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Net.Http.Headers; using Microsoft.OpenApi.Any; From e93f41d8882e991d925601db0e33873ec8922a4e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 8 Feb 2025 07:38:32 -0500 Subject: [PATCH 38/41] Add missing semicolon --- build/package/nix/tgstation-server.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package/nix/tgstation-server.nix b/build/package/nix/tgstation-server.nix index 1618f11750..6079ea037f 100644 --- a/build/package/nix/tgstation-server.nix +++ b/build/package/nix/tgstation-server.nix @@ -107,7 +107,7 @@ in description = '' Start the specified units when this unit is started. ''; - } + }; }; }; From 7a072cb3b5c55da05813102d0c11bc635e185167 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 8 Feb 2025 12:13:32 -0500 Subject: [PATCH 39/41] Patch rest version --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index e1e94b6991..be264f4cef 100644 --- a/build/Version.props +++ b/build/Version.props @@ -5,7 +5,7 @@ 6.12.3 5.4.0 - 10.12.0 + 10.12.1 0.5.0 7.0.0 17.0.1 From dc2c81c3a3ec43b7ee750efd4154eae4ac668e1f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 8 Feb 2025 14:19:14 -0500 Subject: [PATCH 40/41] Fix null reference warning --- src/Tgstation.Server.Api/ApiHeaders.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Api/ApiHeaders.cs b/src/Tgstation.Server.Api/ApiHeaders.cs index 2f670f5029..00b7733715 100644 --- a/src/Tgstation.Server.Api/ApiHeaders.cs +++ b/src/Tgstation.Server.Api/ApiHeaders.cs @@ -244,7 +244,7 @@ namespace Tgstation.Server.Api else { var auth = authorization.First(); - var splits = new List(auth.Split(' ')); + var splits = new List(auth?.Split(' ') ?? Enumerable.Empty()); var scheme = splits.First(); if (String.IsNullOrWhiteSpace(scheme)) AddError(HeaderErrorTypes.AuthorizationInvalid, "Missing authentication scheme!"); From 06d087fd3b930dc5163ff3327244fc8cfbe8de84 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 8 Feb 2025 19:48:01 -0500 Subject: [PATCH 41/41] Fix unit test --- tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs b/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs index bad2265de1..ba5469714b 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs +++ b/tests/Tgstation.Server.Host.Tests/Core/TestApplication.cs @@ -67,7 +67,7 @@ namespace Tgstation.Server.Host.Core.Tests Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, null, null, null, null)); var mockDatabaseOptions = new Mock>(); - mockGeneralOptions.SetupGet(x => x.Value).Returns(new GeneralConfiguration()).Verifiable(); + mockDatabaseOptions.SetupGet(x => x.Value).Returns(new DatabaseConfiguration()).Verifiable(); Assert.ThrowsException(() => app.Configure(mockAppBuilder.Object, mockServerControl.Object, mockTokenFactory.Object, mockServerPortProvider.Object, mockAssemblyInformationProvider, mockControlPanelOptions.Object, mockGeneralOptions.Object, mockDatabaseOptions.Object, null, null, null)); var mockSwarmOptions = new Mock>();