Device plugin management (1/n): use static metadata for checking plugin compatibility with devices
Summary: *Stack summary*: this stack adds ability to manage device plugins in the same way as client plugins: install, update, uninstall, enable (star) and disable (unstar) them. *Diff summary*: changed the way how plugin compatibility with devices is checked from dynamic call to "supportsDevice" to static checks of "supportedDevices" metadata property which make it possible to check compatibility without even downloading plugin from Marketplace. Changelog: plugin compatibility with devices is now checked according to metadata in property "supportedDevices" in package.json Reviewed By: mweststrate Differential Revision: D26315848 fbshipit-source-id: 6e4b052c4ea0507ee185fc17999b6211cdb11093
This commit is contained in:
committed by
Facebook GitHub Bot
parent
19f2fccc79
commit
899fcd0783
@@ -49,7 +49,7 @@ test('getPluginDetailsV1', async () => {
|
||||
"isBundled": false,
|
||||
"main": "dist/bundle.js",
|
||||
"name": "flipper-plugin-test",
|
||||
"pluginType": "client",
|
||||
"pluginType": undefined,
|
||||
"source": "src/index.tsx",
|
||||
"specVersion": 1,
|
||||
"supportedDevices": undefined,
|
||||
@@ -90,7 +90,7 @@ test('getPluginDetailsV2', async () => {
|
||||
"isBundled": false,
|
||||
"main": "dist/bundle.js",
|
||||
"name": "flipper-plugin-test",
|
||||
"pluginType": "client",
|
||||
"pluginType": undefined,
|
||||
"source": "src/index.tsx",
|
||||
"specVersion": 2,
|
||||
"supportedDevices": undefined,
|
||||
@@ -131,7 +131,7 @@ test('id used as title if the latter omited', async () => {
|
||||
"isBundled": false,
|
||||
"main": "dist/bundle.js",
|
||||
"name": "flipper-plugin-test",
|
||||
"pluginType": "client",
|
||||
"pluginType": undefined,
|
||||
"source": "src/index.tsx",
|
||||
"specVersion": 2,
|
||||
"supportedDevices": undefined,
|
||||
@@ -171,7 +171,7 @@ test('name without "flipper-plugin-" prefix is used as title if the latter omite
|
||||
"isBundled": false,
|
||||
"main": "dist/bundle.js",
|
||||
"name": "flipper-plugin-test",
|
||||
"pluginType": "client",
|
||||
"pluginType": undefined,
|
||||
"source": "src/index.tsx",
|
||||
"specVersion": 2,
|
||||
"supportedDevices": undefined,
|
||||
@@ -214,7 +214,7 @@ test('flipper-plugin-version is parsed', async () => {
|
||||
"isBundled": false,
|
||||
"main": "dist/bundle.js",
|
||||
"name": "flipper-plugin-test",
|
||||
"pluginType": "client",
|
||||
"pluginType": undefined,
|
||||
"source": "src/index.tsx",
|
||||
"specVersion": 2,
|
||||
"supportedDevices": undefined,
|
||||
|
||||
Reference in New Issue
Block a user