Extend device plugin metadata to include supported devices

Summary: Plugin metadata format extended to include type of each plugin (client / device) and list of supported devices (android/ios/..., emulator/physical, etc). This will allow to detect plugins supported by device even if they are not installed and only available on Marketplace.

Reviewed By: mweststrate

Differential Revision: D26073531

fbshipit-source-id: e331f1be1af1046cd4220a286a1d52378c26cc53
This commit is contained in:
Anton Nikolaev
2021-01-27 17:23:51 -08:00
committed by Facebook GitHub Bot
parent 1ce619af7e
commit d7cfcb5d8e
22 changed files with 203 additions and 5 deletions

View File

@@ -39,6 +39,43 @@
"pattern": "flipper-plugin"
},
"errorMessage": "should contain keyword \"flipper-plugin\""
},
"pluginType": {
"description": "Type of the plugin - client or device. If omitted, \"client\" type is used by default.",
"type": "string",
"enum": ["client", "device"]
},
"supportedDevices": {
"description": "List of devices supported by the plugin. The list could contain multiple devices each defined as conjunction of several properties.",
"type": "array",
"items": {
"description": "Device definition. E.g. {\"os\": \"Android\", \"type\": \"physical\", \"archived\": false} means that plugin supports only Android physical unarchived devices.",
"type": "object",
"properties": {
"os": {
"description": "Device OS: iOS, Android or Metro. Lack of this property means that all OSes supported.",
"type": "string",
"enum": ["iOS", "Android", "Metro"]
},
"type": {
"description": "Device type: physical or emulator. Lack of this property means both physical and emulator devices supported.",
"type": "string",
"enum": ["physical", "emulator"]
},
"archived": {
"description": "Specifies support for archived devices. Lack of this property means that both live and archived devices supported. False means only live devices supported. True means only archived devices supported.",
"type": "boolean"
},
"specs": {
"description": "Additional specs required for plugin, e.g. \"KaiOS\" runtime.",
"type": "array",
"items": {
"type": "string",
"enum": ["KaiOS"]
}
}
}
}
}
},
"required": [