diff --git a/docs/src/content/docs/en/plugins/manifest.mdx b/docs/src/content/docs/en/plugins/manifest.mdx index ecf315c1..192a824f 100644 --- a/docs/src/content/docs/en/plugins/manifest.mdx +++ b/docs/src/content/docs/en/plugins/manifest.mdx @@ -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 +`@` (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. diff --git a/modules/Plugins/Manifest/Manifest.php b/modules/Plugins/Manifest/Manifest.php index 59c65ab3..6c098d6c 100644 --- a/modules/Plugins/Manifest/Manifest.php +++ b/modules/Plugins/Manifest/Manifest.php @@ -15,6 +15,7 @@ use CodeIgniter\HTTP\URI; * @property ?URI $homepage * @property ?string $license * @property bool $private + * @property bool $submodule * @property list $keywords * @property ?string $minCastopodVersion * @property list $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 */ diff --git a/modules/Plugins/Manifest/manifest.schema.json b/modules/Plugins/Manifest/manifest.schema.json index 71c71980..9ace64aa 100644 --- a/modules/Plugins/Manifest/manifest.schema.json +++ b/modules/Plugins/Manifest/manifest.schema.json @@ -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 `@` to ensure proper version indexing by plugin repositories.", + "default": false }, "keywords": { "description": "This helps people discover your plugin as it's listed in repositories",