Add tags to egg importer & exporter, add tags to egg jsons (#1125)

* add tags to egg importer & exporter

* add tags to stock eggs
This commit is contained in:
Boy132 2025-03-18 17:35:15 +01:00 committed by GitHub
parent 517f17cbcc
commit c52439132d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 66 additions and 15 deletions

View File

@ -46,6 +46,7 @@ use Illuminate\Support\Str;
* @property string|null $inherit_config_stop
* @property string $inherit_file_denylist
* @property string[]|null $inherit_features
* @property string[] $tags
* @property \Illuminate\Database\Eloquent\Collection|\App\Models\Server[] $servers
* @property int|null $servers_count
* @property \Illuminate\Database\Eloquent\Collection|\App\Models\EggVariable[] $variables
@ -128,6 +129,7 @@ class Egg extends Model implements Validatable
'config_files' => ['required_without:config_from', 'nullable', 'json'],
'update_url' => ['sometimes', 'nullable', 'string'],
'force_outgoing_ip' => ['sometimes', 'boolean'],
'tags' => ['array'],
];
protected $attributes = [

View File

@ -104,6 +104,7 @@ class Node extends Model implements Validatable
'daemon_listen' => ['required', 'numeric', 'between:1,65535'],
'maintenance_mode' => ['boolean'],
'upload_size' => ['int', 'between:1,1024'],
'tags' => ['array'],
];
/**

View File

@ -27,6 +27,7 @@ class EggExporterService
'author' => $egg->author,
'uuid' => $egg->uuid,
'description' => $egg->description,
'tags' => $egg->tags,
'features' => $egg->features,
'docker_images' => $egg->docker_images,
'file_denylist' => Collection::make($egg->inherit_file_denylist)->filter(function ($value) {

View File

@ -160,6 +160,7 @@ class EggImporterService
* @param array{
* name: string,
* description: string,
* tags: string[],
* features: string[],
* docker_images: string[],
* file_denylist: string[],
@ -176,10 +177,10 @@ class EggImporterService
return $model->forceFill([
'name' => Arr::get($parsed, 'name'),
'description' => Arr::get($parsed, 'description'),
'tags' => Arr::get($parsed, 'tags', []),
'features' => Arr::get($parsed, 'features'),
'docker_images' => Arr::get($parsed, 'docker_images'),
'file_denylist' => Collection::make(Arr::get($parsed, 'file_denylist'))
->filter(fn ($value) => !empty($value)),
'file_denylist' => Collection::make(Arr::get($parsed, 'file_denylist'))->filter(fn ($value) => !empty($value)),
'update_url' => Arr::get($parsed, 'meta.update_url'),
'config_files' => Arr::get($parsed, 'config.files'),
'config_startup' => Arr::get($parsed, 'config.startup'),

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-bungeecord.json"
},
"exported_at": "2024-11-23T22:22:34+00:00",
"exported_at": "2025-03-18T12:35:34+00:00",
"name": "Bungeecord",
"author": "panel@example.com",
"uuid": "9e6b409e-4028-4947-aea8-50a2c404c271",
"description": "For a long time, Minecraft server owners have had a dream that encompasses a free, easy, and reliable way to connect multiple Minecraft servers together. BungeeCord is the answer to said dream. Whether you are a small server wishing to string multiple game-modes together, or the owner of the ShotBow Network, BungeeCord is the ideal solution for you. With the help of BungeeCord, you will be able to unlock your community's full potential.",
"tags": [
"minecraft",
"proxy"
],
"features": [
"eula",
"java_version",

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-forge-minecraft.json"
},
"exported_at": "2024-11-23T22:22:35+00:00",
"exported_at": "2025-03-18T12:35:39+00:00",
"name": "Forge Minecraft",
"author": "panel@example.com",
"uuid": "ed072427-f209-4603-875c-f540c6dd5a65",
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
"tags": [
"minecraft"
],
"features": [
"eula",
"java_version",

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-paper.json"
},
"exported_at": "2024-11-23T22:22:36+00:00",
"exported_at": "2025-03-18T12:35:44+00:00",
"name": "Paper",
"author": "parker@example.com",
"uuid": "5da37ef6-58da-4169-90a6-e683e1721247",
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
"tags": [
"minecraft"
],
"features": [
"eula",
"java_version",

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-sponge--sponge-vanilla.json"
},
"exported_at": "2024-11-23T22:22:37+00:00",
"exported_at": "2025-03-18T12:35:50+00:00",
"name": "Sponge (SpongeVanilla)",
"author": "panel@example.com",
"uuid": "f0d2f88f-1ff3-42a0-b03f-ac44c5571e6d",
"description": "SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.",
"tags": [
"minecraft"
],
"features": [
"eula",
"java_version",

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/minecraft\/egg-vanilla-minecraft.json"
},
"exported_at": "2024-11-23T22:22:38+00:00",
"exported_at": "2025-03-18T12:35:55+00:00",
"name": "Vanilla Minecraft",
"author": "panel@example.com",
"uuid": "9ac39f3d-0c34-4d93-8174-c52ab9e6c57b",
"description": "Minecraft is a game about placing blocks and going on adventures. Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles. Play in Creative Mode with unlimited resources or mine deep in Survival Mode, crafting weapons and armor to fend off dangerous mobs. Do all this alone or with friends.",
"tags": [
"minecraft"
],
"features": [
"eula",
"java_version",

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/rust\/egg-rust.json"
},
"exported_at": "2024-11-23T22:22:46+00:00",
"exported_at": "2025-03-18T12:36:48+00:00",
"name": "Rust",
"author": "panel@example.com",
"uuid": "bace2dfb-209c-452a-9459-7d6f340b07ae",
"description": "The only aim in Rust is to survive. To do this you will need to overcome struggles such as hunger, thirst and cold. Build a fire. Build a shelter. Kill animals for meat. Protect yourself from other players, and kill them for meat. Create alliances with other players and form a town. Do whatever it takes to survive.",
"tags": [
"source",
"steamcmd"
],
"features": [
"steam_disk_space"
],

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/source-engine\/egg-counter--strike--global-offensive.json"
},
"exported_at": "2024-11-23T22:22:39+00:00",
"exported_at": "2025-03-18T12:36:01+00:00",
"name": "Counter-Strike: Global Offensive",
"author": "panel@example.com",
"uuid": "437c367d-06be-498f-a604-fdad135504d7",
"description": "Counter-Strike: Global Offensive is a multiplayer first-person shooter video game developed by Hidden Path Entertainment and Valve Corporation.",
"tags": [
"source",
"steamcmd"
],
"features": [
"gsl_token",
"steam_disk_space"

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/source-engine\/egg-custom-source-engine-game.json"
},
"exported_at": "2024-11-23T22:22:40+00:00",
"exported_at": "2025-03-18T12:36:07+00:00",
"name": "Custom Source Engine Game",
"author": "panel@example.com",
"uuid": "2a42d0c2-c0ba-4067-9a0a-9b95d77a3490",
"description": "This option allows modifying the startup arguments and other details to run a custom SRCDS based game on the panel.",
"tags": [
"source",
"steamcmd"
],
"features": [
"steam_disk_space"
],

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/source-engine\/egg-garrys-mod.json"
},
"exported_at": "2024-11-23T22:22:41+00:00",
"exported_at": "2025-03-18T12:36:13+00:00",
"name": "Garrys Mod",
"author": "panel@example.com",
"uuid": "60ef81d4-30a2-4d98-ab64-f59c69e2f915",
"description": "Garrys Mod, is a sandbox physics game created by Garry Newman, and developed by his company, Facepunch Studios.",
"tags": [
"source",
"steamcmd"
],
"features": [
"gsl_token",
"steam_disk_space"

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/source-engine\/egg-insurgency.json"
},
"exported_at": "2024-11-23T22:22:42+00:00",
"exported_at": "2025-03-18T12:36:22+00:00",
"name": "Insurgency",
"author": "panel@example.com",
"uuid": "a5702286-655b-4069-bf1e-925c7300b61a",
"description": "Take to the streets for intense close quarters combat, where a team's survival depends upon securing crucial strongholds and destroying enemy supply in this multiplayer and cooperative Source Engine based experience.",
"tags": [
"source",
"steamcmd"
],
"features": [
"steam_disk_space"
],

View File

@ -4,11 +4,15 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/source-engine\/egg-team-fortress2.json"
},
"exported_at": "2024-11-23T22:22:43+00:00",
"exported_at": "2025-03-18T12:36:28+00:00",
"name": "Team Fortress 2",
"author": "panel@example.com",
"uuid": "7f8eb681-b2c8-4bf8-b9f4-d79ff70b6e5d",
"description": "Team Fortress 2 is a team-based first-person shooter multiplayer video game developed and published by Valve Corporation. It is the sequel to the 1996 mod Team Fortress for Quake and its 1999 remake.",
"tags": [
"source",
"steamcmd"
],
"features": [
"gsl_token",
"steam_disk_space"

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/voice-servers\/egg-mumble-server.json"
},
"exported_at": "2024-11-23T22:22:44+00:00",
"exported_at": "2025-03-18T12:36:35+00:00",
"name": "Mumble Server",
"author": "panel@example.com",
"uuid": "727ee758-7fb2-4979-972b-d3eba4e1e9f0",
"description": "Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.",
"tags": [
"voice"
],
"features": [],
"docker_images": {
"Mumble": "ghcr.io\/parkervcp\/yolks:voice_mumble"

View File

@ -4,11 +4,14 @@
"version": "PLCN_v1",
"update_url": "https:\/\/github.com\/pelican-dev\/panel\/raw\/main\/database\/Seeders\/eggs\/voice-servers\/egg-teamspeak3-server.json"
},
"exported_at": "2024-11-23T22:22:45+00:00",
"exported_at": "2025-03-18T12:36:41+00:00",
"name": "Teamspeak3 Server",
"author": "panel@example.com",
"uuid": "983b1fac-d322-4d5f-a636-436127326b37",
"description": "VoIP software designed with security in mind, featuring crystal clear voice quality, endless customization options, and scalabilty up to thousands of simultaneous users.",
"tags": [
"voice"
],
"features": [],
"docker_images": {
"Debian": "ghcr.io\/parkervcp\/yolks:debian"