[MM-18592] Add IconPath field to plugin manifest (#12189)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b43b84807e
Коммит
ad474cb0d9
@@ -130,6 +130,10 @@ type Manifest struct {
|
|||||||
// A description of what your plugin is and does.
|
// A description of what your plugin is and does.
|
||||||
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
Description string `json:"description,omitempty" yaml:"description,omitempty"`
|
||||||
|
|
||||||
|
// A relative file path in the bundle that points to the plugins svg icon for use with the Plugin Marketplace.
|
||||||
|
// This should be relative to the root of your bundle and the location of the manifest file. Bitmap image formats are not supported.
|
||||||
|
IconPath string `json:"icon_path,omitempty" yaml:"icon_path,omitempty"`
|
||||||
|
|
||||||
// A version number for your plugin. Semantic versioning is recommended: http://semver.org
|
// A version number for your plugin. Semantic versioning is recommended: http://semver.org
|
||||||
Version string `json:"version" yaml:"version"`
|
Version string `json:"version" yaml:"version"`
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ func TestFindManifest(t *testing.T) {
|
|||||||
func TestManifestUnmarshal(t *testing.T) {
|
func TestManifestUnmarshal(t *testing.T) {
|
||||||
expected := Manifest{
|
expected := Manifest{
|
||||||
Id: "theid",
|
Id: "theid",
|
||||||
|
IconPath: "assets/icon.svg",
|
||||||
MinServerVersion: "5.6.0",
|
MinServerVersion: "5.6.0",
|
||||||
Server: &ManifestServer{
|
Server: &ManifestServer{
|
||||||
Executable: "theexecutable",
|
Executable: "theexecutable",
|
||||||
@@ -102,6 +103,7 @@ func TestManifestUnmarshal(t *testing.T) {
|
|||||||
var yamlResult Manifest
|
var yamlResult Manifest
|
||||||
require.NoError(t, yaml.Unmarshal([]byte(`
|
require.NoError(t, yaml.Unmarshal([]byte(`
|
||||||
id: theid
|
id: theid
|
||||||
|
icon_path: assets/icon.svg
|
||||||
min_server_version: 5.6.0
|
min_server_version: 5.6.0
|
||||||
server:
|
server:
|
||||||
executable: theexecutable
|
executable: theexecutable
|
||||||
@@ -131,7 +133,8 @@ settings_schema:
|
|||||||
var jsonResult Manifest
|
var jsonResult Manifest
|
||||||
require.NoError(t, json.Unmarshal([]byte(`{
|
require.NoError(t, json.Unmarshal([]byte(`{
|
||||||
"id": "theid",
|
"id": "theid",
|
||||||
"min_server_version": "5.6.0",
|
"icon_path": "assets/icon.svg",
|
||||||
|
"min_server_version": "5.6.0",
|
||||||
"server": {
|
"server": {
|
||||||
"executable": "theexecutable",
|
"executable": "theexecutable",
|
||||||
"executables": {
|
"executables": {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user