mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-05 05:45:46 -05:00
830 lines
35 KiB
JSON
830 lines
35 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Pterodactyl extension manifest",
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,47}$",
|
|
"not": {
|
|
"enum": [
|
|
"pterodactyl",
|
|
"panel",
|
|
"core",
|
|
"classic",
|
|
"user-avatars",
|
|
"panel-logo"
|
|
]
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 64
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"extension",
|
|
"theme"
|
|
],
|
|
"description": "A theme (\"theme\") restyles the panel through its \"theme\" section; it is an extension in every other way. Defaults to \"extension\"."
|
|
},
|
|
"description": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"author": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"icon": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 255,
|
|
"anyOf": [
|
|
{
|
|
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
},
|
|
{
|
|
"pattern": "^(?:[A-Za-z0-9_-][A-Za-z0-9_.-]*/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\\.(?:png|jpe?g|webp)$"
|
|
}
|
|
],
|
|
"description": "Shown on the admin extensions page. A lucide icon name (https://lucide.dev/icons) such as life-buoy, or the path of a PNG, JPEG or WebP image inside the package such as icon.png (at most 512 KB and 2048 px per side). Without one the extension's initials are shown."
|
|
},
|
|
"provider": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"minLength": 1
|
|
},
|
|
"autoload": {
|
|
"type": "object",
|
|
"description": "PSR-4 namespace prefixes mapped to source directories inside the package. Without it, the panel reads autoload.psr-4 from the package's composer.json. A prefix cannot equal, contain or sit inside Pterodactyl\\, Illuminate\\, Laravel\\, Symfony\\ or a namespace of the panel's Composer packages, and enabling fails while another enabled extension autoloads an overlapping one.",
|
|
"propertyNames": {
|
|
"pattern": "^(?:[A-Za-z_\\u0080-\\uffff][A-Za-z0-9_\\u0080-\\uffff]*\\\\)+$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"pattern": "^(?!/)(?!.*\\.\\.).*$"
|
|
}
|
|
},
|
|
"requires": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"panel": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255,
|
|
"description": "Composer version constraint, such as ^2.0 or >=8.3 <9."
|
|
},
|
|
"sdk": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255,
|
|
"description": "Composer version constraint, such as ^2.0 or >=8.3 <9."
|
|
},
|
|
"php": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255,
|
|
"description": "Composer version constraint, such as ^2.0 or >=8.3 <9."
|
|
},
|
|
"extensions": {
|
|
"type": "object",
|
|
"maxProperties": 64,
|
|
"propertyNames": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,47}$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255,
|
|
"description": "Composer version constraint, such as ^2.0 or >=8.3 <9."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"routes": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"root": {
|
|
"type": "array",
|
|
"maxItems": 8,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,47}$",
|
|
"not": {
|
|
"enum": [
|
|
"account",
|
|
"admin",
|
|
"api",
|
|
"assets",
|
|
"auth",
|
|
"daemon",
|
|
"extension-files",
|
|
"extensions",
|
|
"favicons",
|
|
"locales",
|
|
"panel",
|
|
"sanctum",
|
|
"server",
|
|
"servers",
|
|
"storage",
|
|
"themes",
|
|
"up"
|
|
]
|
|
}
|
|
},
|
|
"description": "Top-level URL prefixes this extension claims, mounted with registerRootRoutes(). Prefixes used by the panel or by another enabled extension are rejected."
|
|
}
|
|
}
|
|
},
|
|
"ui": {
|
|
"type": "object",
|
|
"required": [
|
|
"entry"
|
|
],
|
|
"properties": {
|
|
"entry": {
|
|
"const": "dist/client.js"
|
|
},
|
|
"mode": {
|
|
"const": "native"
|
|
},
|
|
"prefix": {
|
|
"type": "string",
|
|
"pattern": "^[a-z]{2,12}$",
|
|
"not": {
|
|
"enum": [
|
|
"accent",
|
|
"active",
|
|
"after",
|
|
"animate",
|
|
"aria",
|
|
"aspect",
|
|
"autofill",
|
|
"backdrop",
|
|
"background",
|
|
"before",
|
|
"blur",
|
|
"border",
|
|
"breakpoint",
|
|
"card",
|
|
"caution",
|
|
"chart",
|
|
"checked",
|
|
"color",
|
|
"container",
|
|
"core",
|
|
"dark",
|
|
"data",
|
|
"default",
|
|
"destructive",
|
|
"disabled",
|
|
"drop",
|
|
"ease",
|
|
"editor",
|
|
"empty",
|
|
"enabled",
|
|
"even",
|
|
"file",
|
|
"first",
|
|
"focus",
|
|
"font",
|
|
"foreground",
|
|
"group",
|
|
"has",
|
|
"hover",
|
|
"in",
|
|
"inert",
|
|
"input",
|
|
"inset",
|
|
"invalid",
|
|
"landscape",
|
|
"last",
|
|
"layout",
|
|
"leading",
|
|
"lg",
|
|
"ltr",
|
|
"marker",
|
|
"max",
|
|
"md",
|
|
"min",
|
|
"muted",
|
|
"noscript",
|
|
"not",
|
|
"nth",
|
|
"odd",
|
|
"only",
|
|
"open",
|
|
"optional",
|
|
"panel",
|
|
"peer",
|
|
"perspective",
|
|
"placeholder",
|
|
"popover",
|
|
"portrait",
|
|
"primary",
|
|
"print",
|
|
"ptero",
|
|
"radius",
|
|
"radix",
|
|
"required",
|
|
"ring",
|
|
"rtl",
|
|
"scrollbar",
|
|
"secondary",
|
|
"selection",
|
|
"shadow",
|
|
"sidebar",
|
|
"sm",
|
|
"spacing",
|
|
"spinner",
|
|
"starting",
|
|
"state",
|
|
"success",
|
|
"sunken",
|
|
"supports",
|
|
"target",
|
|
"terminal",
|
|
"text",
|
|
"theme",
|
|
"tracking",
|
|
"tw",
|
|
"valid",
|
|
"visited",
|
|
"warning",
|
|
"xl"
|
|
]
|
|
},
|
|
"description": "The Tailwind prefix this extension builds with: prefix(<prefix>) on both Tailwind imports, classes written as <prefix>:flex. Required when the build ships Tailwind utilities or theme variables; Tailwind variant names, theme namespaces and panel names are reserved, and two enabled extensions cannot share one."
|
|
},
|
|
"screens": {
|
|
"type": "array",
|
|
"maxItems": 64,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"id",
|
|
"area",
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,47}$"
|
|
},
|
|
"area": {
|
|
"enum": [
|
|
"account",
|
|
"server",
|
|
"admin"
|
|
]
|
|
},
|
|
"parent": {
|
|
"enum": [
|
|
"admin.node",
|
|
"admin.server",
|
|
"admin.egg",
|
|
"admin.user"
|
|
]
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"pattern": "^[a-z][a-z0-9-]*(?:/(?:[a-z][a-z0-9-]*|\\$[a-zA-Z][a-zA-Z0-9_]*))*/?$"
|
|
},
|
|
"permission": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
}
|
|
},
|
|
"nav": {
|
|
"type": "object",
|
|
"required": [
|
|
"label"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
},
|
|
"exact": {
|
|
"type": "boolean"
|
|
},
|
|
"params": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 255
|
|
},
|
|
"description": "Supply every path parameter for the navigation entry."
|
|
},
|
|
"order": {
|
|
"type": "integer",
|
|
"minimum": -10000,
|
|
"maximum": 10000
|
|
},
|
|
"group": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
},
|
|
"badge": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 32
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
|
|
"description": "A lucide icon name (https://lucide.dev/icons), such as life-buoy. Names this panel does not ship render the default icon."
|
|
}
|
|
}
|
|
},
|
|
"when": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"eggFeatures": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"minProperties": 1,
|
|
"properties": {
|
|
"any": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 32,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
}
|
|
},
|
|
"all": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 32,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
}
|
|
}
|
|
},
|
|
"description": "Server screens only. Matches the features of the server's egg, ignoring case."
|
|
},
|
|
"eggTags": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"minProperties": 1,
|
|
"properties": {
|
|
"any": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 32,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
}
|
|
},
|
|
"all": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 32,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
}
|
|
}
|
|
},
|
|
"description": "Server screens only. Matches the tag slugs of the server's egg, ignoring case."
|
|
},
|
|
"match": {
|
|
"enum": [
|
|
"all",
|
|
"any"
|
|
],
|
|
"description": "How eggFeatures and eggTags combine when both are declared. Defaults to all."
|
|
},
|
|
"runtime": {
|
|
"type": "boolean",
|
|
"description": "The bundle registers a visibility predicate for this screen; the screen stays hidden until it has answered."
|
|
}
|
|
},
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"eggFeatures"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"eggTags"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"runtime"
|
|
],
|
|
"properties": {
|
|
"runtime": {
|
|
"const": true
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"dependentRequired": {
|
|
"match": [
|
|
"eggFeatures",
|
|
"eggTags"
|
|
]
|
|
},
|
|
"description": "Conditions under which the screen exists. A screen whose conditions fail is absent from navigation and not routable."
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"parent"
|
|
]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"area": {
|
|
"const": "admin"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"permission"
|
|
]
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"area": {
|
|
"const": "server"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"when"
|
|
],
|
|
"properties": {
|
|
"when": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"eggFeatures"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"eggTags"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"area": {
|
|
"const": "server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"views": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-zA-Z0-9]*(?:\\.[a-zA-Z0-9]+)+$"
|
|
},
|
|
"description": "The views this extension overrides with views.override, such as \"server.power\" or \"page.dashboard\". Declare a requires.sdk constraint. Themes override views through defineTheme instead."
|
|
}
|
|
}
|
|
},
|
|
"theme": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"extends": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]{0,47}$",
|
|
"description": "The installed theme this one is built on. Defaults to the built-in \"classic\"."
|
|
},
|
|
"stylesheet": {
|
|
"const": "dist/theme.css",
|
|
"description": "The panel stylesheet built by defineThemeConfig, beside its dist/theme.json."
|
|
},
|
|
"schemes": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"enum": [
|
|
"dark",
|
|
"light"
|
|
]
|
|
},
|
|
"description": "The colour schemes the theme supports; the first is the default. Defaults to those of the theme it extends."
|
|
},
|
|
"settings": {
|
|
"type": "object",
|
|
"propertyNames": {
|
|
"pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,47}$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"color",
|
|
"select",
|
|
"toggle",
|
|
"number",
|
|
"text",
|
|
"image"
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"help": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"tab": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The section of the settings dialog the setting sits in; settings without one go under General."
|
|
},
|
|
"default": {
|
|
"type": [
|
|
"string",
|
|
"number",
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"token": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"pattern": "^--[a-zA-Z][a-zA-Z0-9-]{0,62}$",
|
|
"description": "The custom property the value is written to on :root, such as \"--accent\"."
|
|
},
|
|
"attribute": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"pattern": "^data-[a-z][a-z0-9-]{0,58}$",
|
|
"not": {
|
|
"enum": [
|
|
"data-theme"
|
|
]
|
|
},
|
|
"description": "The <html> attribute the value is written to, such as \"data-density\"."
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"propertyNames": {
|
|
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,63}$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Select options: value => label."
|
|
},
|
|
"min": {
|
|
"type": "number"
|
|
},
|
|
"max": {
|
|
"type": "number"
|
|
},
|
|
"step": {
|
|
"type": "number",
|
|
"exclusiveMinimum": 0
|
|
},
|
|
"unit": {
|
|
"type": "string",
|
|
"pattern": "^(?:%|[a-z]{1,4})$",
|
|
"description": "Appended to a number token, such as \"rem\"."
|
|
},
|
|
"maxLength": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"const": "select"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"options"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"not": {
|
|
"const": "select"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"not": {
|
|
"required": [
|
|
"options"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"not": {
|
|
"const": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"min": false,
|
|
"max": false,
|
|
"step": false,
|
|
"unit": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"not": {
|
|
"const": "text"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"maxLength": false
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "A setting declares a \"type\" and a \"label\". A setting of the same name as one of the theme it extends replaces it.",
|
|
"required": [
|
|
"type",
|
|
"label"
|
|
]
|
|
},
|
|
"description": "Settings administrators change on the Themes page. Each writes a token, an <html> attribute or both before the page renders; useThemeSettings() reads them all."
|
|
}
|
|
},
|
|
"description": "Only for \"type\": \"theme\"."
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"ui"
|
|
],
|
|
"properties": {
|
|
"ui": {
|
|
"required": [
|
|
"views"
|
|
],
|
|
"properties": {
|
|
"views": {
|
|
"minItems": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"requires"
|
|
],
|
|
"properties": {
|
|
"requires": {
|
|
"required": [
|
|
"sdk"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"const": "theme"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"ui": {
|
|
"properties": {
|
|
"prefix": false,
|
|
"views": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"else": {
|
|
"not": {
|
|
"required": [
|
|
"theme"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|