Compare commits

...

6 Commits

Author SHA1 Message Date
Alex
bbc331485c
Merge 0815aea6fd78a84d2db9131ef6614fb467e83ba3 into 9b3f9f356db1ed29ca8a098cad3682d041b0c5fd 2025-12-10 08:06:10 +00:00
KimLS
0815aea6fd Sidecar stuff wont directly include cpp files now too. 2025-12-10 00:05:58 -08:00
KimLS
76f8f1fb95 Move zone cli out of source and into cmake 2025-12-10 00:02:38 -08:00
KimLS
7acff368ea Move world CLI include cpps to cmake. 2025-12-09 23:17:03 -08:00
KimLS
012c54c277 change db update manifest to header
change build yml
2025-12-09 23:01:03 -08:00
dependabot[bot]
9b3f9f356d
Bump golang.org/x/crypto in /utils/scripts/build/should-release (#5032)
Some checks failed
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.36.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 19:44:17 +01:00
42 changed files with 155 additions and 89 deletions

View File

@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build ccache libmariadb-dev libmariadb-dev-compat libboost-all-dev libperl-dev liblua5.1-0-dev libluajit-5.1-dev zlib1g-dev uuid-dev libssl-dev libsodium-dev libmbedtls-dev
sudo apt-get install -y build-essential ninja-build ccache
- name: Configure
run: |
@ -74,7 +74,7 @@ jobs:
- name: Build
shell: pwsh
run: cmake --build build --config RelWithDebInfo --target ALL_BUILD -- /m
run: cmake --build build --parallel --config RelWithDebInfo --target ALL_BUILD -- /m
- name: Test
working-directory: build

View File

@ -16,9 +16,6 @@ set(common_sources
database/database_dump_service.cpp
database.cpp
database_instances.cpp
database/database_update_manifest.cpp
database/database_update_manifest_custom.cpp
database/database_update_manifest_bots.cpp
database/database_update.cpp
data_bucket.cpp
dbcore.cpp
@ -557,6 +554,9 @@ set(common_headers
database.h
database_schema.h
database/database_update.h
database/database_update_manifest.h
database/database_update_manifest_custom.h
database/database_update_manifest_bots.h
data_bucket.cpp
dbcore.h
deity.h

View File

@ -5,11 +5,10 @@
#include "../strings.h"
#include "../rulesys.h"
#include "../http/httplib.h"
#include "database_update_manifest.cpp"
#include "database_update_manifest_custom.cpp"
#include "database_update_manifest_bots.cpp"
#include "database_dump_service.h"
#include "database_update_manifest.h"
#include "database_update_manifest_custom.h"
#include "database_update_manifest_bots.h"
constexpr int BREAK_LENGTH = 70;

View File

@ -1,4 +1,4 @@
#include "database_update.h"
#pragma once
std::vector<ManifestEntry> manifest_entries = {
ManifestEntry{

View File

@ -1,4 +1,4 @@
#include "database_update.h"
#pragma once
std::vector<ManifestEntry> bot_manifest_entries = {
ManifestEntry{

View File

@ -1,4 +1,4 @@
#include "database_update.h"
#pragma once
std::vector<ManifestEntry> manifest_entries_custom = {
ManifestEntry{

View File

@ -1,8 +1,6 @@
module should-release
go 1.23.0
toolchain go1.23.5
go 1.24.0
require (
github.com/google/go-github/v41 v41.0.0
@ -11,5 +9,5 @@ require (
require (
github.com/google/go-querystring v1.1.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
)

View File

@ -10,8 +10,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=

View File

@ -6,6 +6,25 @@ set(world_sources
client.cpp
cliententry.cpp
clientlist.cpp
cli/cli_database_concurrency.cpp
cli/cli_bots_enable.cpp
cli/cli_bots_disable.cpp
cli/cli_mercs_enable.cpp
cli/cli_mercs_disable.cpp
cli/cli_copy_character.cpp
cli/cli_database_updates.cpp
cli/cli_database_dump.cpp
cli/cli_database_get_schema.cpp
cli/cli_database_set_account_status.cpp
cli/cli_database_version.cpp
cli/cli_test.cpp
cli/cli_test_colors.cpp
cli/cli_test_expansion.cpp
cli/cli_test_repository.cpp
cli/cli_test_repository_2.cpp
cli/cli_test_string_benchmark.cpp
cli/cli_version.cpp
cli/cli_etl_get_settings.cpp
console.cpp
dynamic_zone.cpp
dynamic_zone_manager.cpp
@ -68,7 +87,29 @@ set(world_headers
world_event_scheduler.h
zonelist.h
zoneserver.h
)
)
source_group(cli FILES
cli/cli_database_concurrency.cpp
cli/cli_bots_enable.cpp
cli/cli_bots_disable.cpp
cli/cli_mercs_enable.cpp
cli/cli_mercs_disable.cpp
cli/cli_copy_character.cpp
cli/cli_database_updates.cpp
cli/cli_database_dump.cpp
cli/cli_database_get_schema.cpp
cli/cli_database_set_account_status.cpp
cli/cli_database_version.cpp
cli/cli_test.cpp
cli/cli_test_colors.cpp
cli/cli_test_expansion.cpp
cli/cli_test_repository.cpp
cli/cli_test_repository_2.cpp
cli/cli_test_string_benchmark.cpp
cli/cli_version.cpp
cli/cli_etl_get_settings.cpp
)
add_executable(world ${world_sources} ${world_headers})

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/database_schema.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/rulesys.h"

View File

@ -1,3 +1,5 @@
#include "../world_server_cli.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/eqemu_logsys_log_aliases.h"
#include "../worlddb.h"

View File

@ -1,4 +1,5 @@
#include <thread>
#include "../world_server_cli.h"
#include "../../common/repositories/zone_repository.h"
#include "../../common/eqemu_config.h"
#include <signal.h>

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/database/database_dump_service.h"
void WorldserverCLI::DatabaseDump(int argc, char **argv, argh::parser &cmd, std::string &description)

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/database_schema.h"
#include "../../common/json/json.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
void WorldserverCLI::DatabaseSetAccountStatus(int argc, char **argv, argh::parser &cmd, std::string &description)

View File

@ -1,3 +1,5 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/database/database_update.h"
void WorldserverCLI::DatabaseUpdates(int argc, char **argv, argh::parser &cmd, std::string &description)

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/version.h"
#include "../../common/json/json.h"
#include "../../common/rulesys.h"

View File

@ -1,3 +1,5 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/events/player_event_logs.h"
#include "../../common/json/json.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/database_schema.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/database_schema.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp>
#include <iomanip>

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/zone_store.h"
#include "../../common/termcolor/rang.hpp"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/rulesys.h"
#include "../../common/repositories/content_flags_repository.h"
#include "../../common/content/world_content_service.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/repositories/instance_list_repository.h"
#include "../worlddb.h"

View File

@ -1,3 +1,5 @@
#include "../world_server_cli.h"
#include "../worlddb.h"
#include "../../common/repositories/zone_repository.h"
void WorldserverCLI::TestRepository2(int argc, char **argv, argh::parser &cmd, std::string &description)

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp>
#include "../../common/events/player_events.h"

View File

@ -1,3 +1,4 @@
#include "../world_server_cli.h"
#include "../../common/json/json.h"
#include "../../common/version.h"

View File

@ -39,22 +39,3 @@ void WorldserverCLI::CommandHandler(int argc, char **argv)
EQEmuCommand::HandleMenu(function_map, cmd, argc, argv);
}
#include "cli/database_concurrency.cpp"
#include "cli/bots_enable.cpp"
#include "cli/bots_disable.cpp"
#include "cli/mercs_enable.cpp"
#include "cli/mercs_disable.cpp"
#include "cli/copy_character.cpp"
#include "cli/database_updates.cpp"
#include "cli/database_dump.cpp"
#include "cli/database_get_schema.cpp"
#include "cli/database_set_account_status.cpp"
#include "cli/database_version.cpp"
#include "cli/test.cpp"
#include "cli/test_colors.cpp"
#include "cli/test_expansion.cpp"
#include "cli/test_repository.cpp"
#include "cli/test_repository_2.cpp"
#include "cli/test_string_benchmark.cpp"
#include "cli/version.cpp"
#include "cli/etl_get_settings.cpp"

View File

@ -21,6 +21,13 @@ set(zone_sources
client_mods.cpp
client_packet.cpp
client_process.cpp
cli/cli_benchmark_databuckets.cpp
cli/cli_sidecar_serve_http.cpp
cli/tests/cli_test_util.cpp
cli/tests/cli_databuckets.cpp
cli/tests/cli_npc_handins.cpp
cli/tests/cli_npc_handins_multiquest.cpp
cli/tests/cli_zone_state.cpp
combat_record.cpp
corpse.cpp
doors.cpp

View File

@ -1,6 +1,8 @@
#include <chrono>
#include <iostream>
#include <random>
#include "../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include "../../common/http/httplib.h"
#include "../../common/eqemu_logsys.h"
#include "../sidecar_api/sidecar_api.h"

View File

@ -1,3 +1,5 @@
#include "../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include "../../common/http/httplib.h"
#include "../../common/eqemu_logsys.h"
#include "../sidecar_api/sidecar_api.h"

View File

@ -1,3 +1,5 @@
#include "../../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include "../../common/http/httplib.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/platform.h"
@ -7,6 +9,10 @@
extern Zone* zone;
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
void RunTest(const std::string& test_name, bool expected, bool actual);
void RunTest(const std::string& test_name, int expected, int actual);
void ZoneCLI::TestDataBuckets(int argc, char** argv, argh::parser& cmd, std::string& description)
{
if (cmd[{"-h", "--help"}]) {

View File

@ -1,3 +1,5 @@
#include "../../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include "../../common/http/httplib.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/platform.h"
@ -9,6 +11,10 @@
extern Zone *zone;
using json = nlohmann::json;
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
void RunTest(const std::string& test_name, bool expected, bool actual);
void RunTest(const std::string& test_name, int expected, int actual);
struct HandinEntry {
std::string item_id = "0";
uint32 count = 0;

View File

@ -1,3 +1,5 @@
#include "../../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/platform.h"
#include "../../zone.h"
@ -6,6 +8,10 @@
extern Zone *zone;
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
void RunTest(const std::string& test_name, bool expected, bool actual);
void RunTest(const std::string& test_name, int expected, int actual);
void ZoneCLI::TestNpcHandinsMultiQuest(int argc, char **argv, argh::parser &cmd, std::string &description)
{
if (cmd[{"-h", "--help"}]) {

View File

@ -1,6 +1,6 @@
#include "../../zone.h"
inline void RunTest(const std::string &test_name, const std::string &expected, const std::string &actual)
void RunTest(const std::string &test_name, const std::string &expected, const std::string &actual)
{
if (expected == actual) {
std::cout << "[✅] " << test_name << " PASSED\n";
@ -12,7 +12,7 @@ inline void RunTest(const std::string &test_name, const std::string &expected, c
}
}
inline void RunTest(const std::string &test_name, bool expected, bool actual)
void RunTest(const std::string &test_name, bool expected, bool actual)
{
if (expected == actual) {
std::cout << "[✅] " << test_name << " PASSED\n";
@ -25,7 +25,7 @@ inline void RunTest(const std::string &test_name, bool expected, bool actual)
}
}
inline void RunTest(const std::string &test_name, int expected, int actual)
void RunTest(const std::string &test_name, int expected, int actual)
{
if (expected == actual) {
std::cout << "[✅] " << test_name << " PASSED\n";
@ -40,7 +40,7 @@ inline void RunTest(const std::string &test_name, int expected, int actual)
extern Zone *zone;
inline void SetupZone(std::string zone_short_name, uint32 instance_id = 0) {
void SetupZone(std::string zone_short_name, uint32 instance_id = 0) {
EQEmuLogSys::Instance()->SilenceConsoleLogging();
EQEmuLogSys::Instance()->log_settings[Logs::ZoneState].log_to_console = std::getenv("DEBUG") ? 3 : 0;

View File

@ -1,11 +1,18 @@
extern Zone *zone;
#include "../../zone_cli.h"
#include "../../common/cli/eqemu_command_handler.h"
#include <cereal/archives/json.hpp>
#include <cereal/types/map.hpp>
#include "../../common/repositories/npc_types_repository.h"
#include "../../corpse.h"
#include "../../../common/repositories/respawn_times_repository.h"
extern Zone* zone;
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
void RunTest(const std::string& test_name, bool expected, bool actual);
void RunTest(const std::string& test_name, int expected, int actual);
void SetupZone(std::string zone_short_name, uint32 instance_id = 0);
inline void ClearState()
{
ZoneStateSpawnsRepository::DeleteWhere(database, "zone_id = 32 and instance_id = 0");

View File

@ -1,18 +0,0 @@
void SidecarApi::RequestLogHandler(const httplib::Request &req, const httplib::Response &res)
{
if (!req.path.empty()) {
std::vector<std::string> params;
for (auto &p: req.params) {
params.emplace_back(fmt::format("{}={}", p.first, p.second));
}
LogInfo(
"[API] Request [{}] [{}{}] via [{}:{}]",
res.status,
req.path,
(!params.empty() ? "?" + Strings::Join(params, "&") : ""),
req.remote_addr,
req.remote_port
);
}
}

View File

@ -1,4 +0,0 @@
void SidecarApi::MapBestZController(const httplib::Request &req, httplib::Response &res)
{
}

View File

@ -16,9 +16,39 @@ void CatchSidecarSignal(int sig_num)
std::exit(0);
}
#include "log_handler.cpp"
#include "test_controller.cpp"
#include "map_best_z_controller.cpp"
void SidecarApi::RequestLogHandler(const httplib::Request& req, const httplib::Response& res)
{
if (!req.path.empty()) {
std::vector<std::string> params;
for (auto& p : req.params) {
params.emplace_back(fmt::format("{}={}", p.first, p.second));
}
LogInfo(
"[API] Request [{}] [{}{}] via [{}:{}]",
res.status,
req.path,
(!params.empty() ? "?" + Strings::Join(params, "&") : ""),
req.remote_addr,
req.remote_port
);
}
}
void SidecarApi::TestController(const httplib::Request& req, httplib::Response& res)
{
nlohmann::json j;
j["data"]["test"] = "test";
res.set_content(j.dump(), "application/json");
}
void SidecarApi::MapBestZController(const httplib::Request& req, httplib::Response& res)
{
}
#include "../../common/file.h"
constexpr static int HTTP_RESPONSE_OK = 200;

View File

@ -1,10 +0,0 @@
#include "sidecar_api.h"
void SidecarApi::TestController(const httplib::Request &req, httplib::Response &res)
{
nlohmann::json j;
j["data"]["test"] = "test";
res.set_content(j.dump(), "application/json");
}

View File

@ -39,13 +39,3 @@ void ZoneCLI::CommandHandler(int argc, char **argv)
EQEmuCommand::HandleMenu(function_map, cmd, argc, argv);
}
// cli
#include "cli/benchmark_databuckets.cpp"
#include "cli/sidecar_serve_http.cpp"
// tests
#include "cli/tests/_test_util.cpp"
#include "cli/tests/databuckets.cpp"
#include "cli/tests/npc_handins.cpp"
#include "cli/tests/npc_handins_multiquest.cpp"
#include "cli/tests/zone_state.cpp"