Add headless plugin definition
Summary: Support explicitly marking headless plugins as "headless" Reviewed By: passy Differential Revision: D35891387 fbshipit-source-id: 50b5acb3a7c52d7aedf32e271ebe6fc6d4fcef73
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3ac93d301a
commit
50111ef24b
@@ -30,6 +30,7 @@ export interface PluginDetails {
|
|||||||
};
|
};
|
||||||
flipperSDKVersion?: string;
|
flipperSDKVersion?: string;
|
||||||
pluginType?: PluginType;
|
pluginType?: PluginType;
|
||||||
|
headless?: boolean;
|
||||||
supportedDevices?: SupportedDevice[];
|
supportedDevices?: SupportedDevice[];
|
||||||
supportedApps?: SupportedApp[];
|
supportedApps?: SupportedApp[];
|
||||||
publishedDocs?: {
|
publishedDocs?: {
|
||||||
@@ -179,6 +180,7 @@ function getPluginDetailsV2(packageJson: any): PluginDetails {
|
|||||||
supportedApps: packageJson?.supportedApps,
|
supportedApps: packageJson?.supportedApps,
|
||||||
engines: packageJson.engines,
|
engines: packageJson.engines,
|
||||||
publishedDocs: packageJson.publishedDocs,
|
publishedDocs: packageJson.publishedDocs,
|
||||||
|
headless: packageJson.headless,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"headless": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Specifies if plugin works in a headless mode. Default: false."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ test('getPluginDetailsV2', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -135,6 +136,7 @@ test('id used as title if the latter omited', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "test",
|
"id": "test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -180,6 +182,7 @@ test('name without "flipper-plugin-" prefix is used as title if the latter omite
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -228,6 +231,7 @@ test('flipper-plugin-version is parsed', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": "^0.45",
|
"flipperSDKVersion": "^0.45",
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -280,6 +284,7 @@ test('plugin type and supported devices parsed', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -348,6 +353,7 @@ test('plugin type and supported apps parsed', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
@@ -436,6 +442,7 @@ test('can merge two package.json files', async () => {
|
|||||||
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
"entry": "/Users/mock/.flipper/thirdparty/flipper-plugin-test/dist/bundle.js",
|
||||||
"flipperSDKVersion": undefined,
|
"flipperSDKVersion": undefined,
|
||||||
"gatekeeper": "GK_flipper_plugin_test",
|
"gatekeeper": "GK_flipper_plugin_test",
|
||||||
|
"headless": undefined,
|
||||||
"icon": undefined,
|
"icon": undefined,
|
||||||
"id": "flipper-plugin-test",
|
"id": "flipper-plugin-test",
|
||||||
"isActivatable": true,
|
"isActivatable": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user