Skip to content
Snippets Groups Projects
Commit 567d5e01 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat(plugins): add `submodule` boolean property to manifest schema

parent 94cea0ce
No related branches found
No related tags found
No related merge requests found
Pipeline #19064 failed
......@@ -50,14 +50,28 @@ The URL to the project homepage.
### license
**Default:** `"UNLICENSED"`
Specify a license for your plugin so that people know how they are permitted to
use it, and any restrictions you're placing on it.
### private
**Default:** `false`
Whether or not to publish the plugin in public directories. If set to `true`,
directories should refuse to publish the plugin.
### submodule
**Default:** `false`
Indicates whether the plugin is part of a monorepo (a single Git repository
containing multiple plugins). If `true`, the plugin shares its repository with
other plugins. In this case, releases should be tagged using the format
`<plugin-name>@<version>` (eg. `acme/hello-world@1.0.0`) to ensure proper
version indexing by plugin repositories.
### keywords
Array of strings to help your plugin get discovered when listed in repositories.
......
......@@ -15,6 +15,7 @@ use CodeIgniter\HTTP\URI;
* @property ?URI $homepage
* @property ?string $license
* @property bool $private
* @property bool $submodule
* @property list<string> $keywords
* @property ?string $minCastopodVersion
* @property list<string> $hooks
......@@ -31,6 +32,7 @@ class Manifest extends ManifestObject
'homepage' => 'permit_empty|valid_url_strict',
'license' => 'permit_empty|string',
'private' => 'permit_empty|is_boolean',
'submodule' => 'permit_empty|is_boolean',
'keywords.*' => 'permit_empty',
'minCastopodVersion' => 'permit_empty|regex_match[/^(0|[1-9]\d*)\.(0|[1-9]\d*)(\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/]',
'hooks.*' => 'permit_empty|in_list[rssBeforeChannel,rssAfterChannel,rssBeforeItem,rssAfterItem,siteHead]',
......@@ -62,6 +64,8 @@ class Manifest extends ManifestObject
protected bool $private = false;
protected bool $submodule = false;
/**
* @var list<string>
*/
......
......@@ -59,7 +59,13 @@
},
"private": {
"type": "boolean",
"description": "If set to true, then repositories should refuse to publish it."
"description": "If set to true, then repositories should refuse to publish it.",
"default": false
},
"submodule": {
"type": "boolean",
"description": "Set to `true` if the plugin is part of a monorepo (i.e., in the same Git repository as other plugins). Releases should be tagged as `<plugin-name>@<version>` to ensure proper version indexing by plugin repositories.",
"default": false
},
"keywords": {
"description": "This helps people discover your plugin as it's listed in repositories",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment