Files
flipper/desktop/pkg/schemas/plugin-package-v2.json
Pritesh Nandgaonkar 60994bd41f Rename ClientDevice to DummyDevice
Summary: Rename ClientDevice to DummyDevice. It is being currently used in the case when we do cert exchange through WWW/Distillery. In this mode we are not able to figure out the exact device id(instead we create a fake one) and thus we would not like to use Android or IOSDevice for such cases.

Reviewed By: mweststrate

Differential Revision: D26944415

fbshipit-source-id: f9f76e8997cf5402ba5627ae1959f5a11e078bb1
2021-03-10 06:34:36 -08:00

90 lines
3.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{"$ref": "https://schemastore.azurewebsites.net/schemas/json/package.json"}
],
"properties": {
"name": {
"description": "The name of the package. Must start with \"flipper-plugin-\" prefix.",
"type": "string",
"maxLength": 214,
"pattern": "^(?:@[a-z0-9-*~][a-z0-9-*._~]*/)?flipper-plugin-[a-z0-9-._~]*$",
"errorMessage": "should start with \"flipper-plugin-\", e.g. \"flipper-plugin-example\""
},
"id": {
"type": "string",
"description": "Used as the plugin native identifier and must match the mobile plugin identifier. Also shown in the Flipper main sidebar if \"title\" property is omitted."
},
"flipperBundlerEntry": {
"type": "string",
"filePathExists": true,
"description": "Points to the source entry point which will be used for the plugin code bundling. \"flipper-pkg\" takes the path specified in this property as source, transpiles and bundles it, and saves the output to the path specified in property \"main\"."
},
"title": {
"type": "string",
"description": "Shown in the Flipper main sidebar as the human-readable name of the plugin. If omitted, \"id\" is used instead."
},
"icon": {
"type": "string",
"description": "Determines the plugin icon which is displayed in the main sidebar. The list of available icons is static for now and can be found in https://github.com/facebook/flipper/blob/master/desktop/static/icons.json."
},
"keywords": {
"description": "This helps people discover your package as it's listed in 'npm search'. To make the plugin discoverable in Flipper, the property must contain \"flipper-plugin\" keyword.",
"type": "array",
"items": {
"type": "string"
},
"contains": {
"type": "string",
"pattern": "flipper-plugin"
},
"errorMessage": "should contain keyword \"flipper-plugin\""
},
"pluginType": {
"description": "Type of the plugin - \"client\" if the plugin connects to a specific client plugin running in a mobile app, or \"device\" if it connects to devices. If omitted, \"client\" type is assumed 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 or dummy. Lack of this property means it supports physical, emulator and dummy devices.",
"type": "string",
"enum": ["physical", "emulator", "dummy"]
},
"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": [
"name",
"version",
"id",
"main",
"flipperBundlerEntry",
"keywords"
]
}