Versioning for plugin format

Summary:
Added versioning for plugin format.

The first version is where "main" points to source code entry and plugins are bundled by Flipper in run-time on loading them.

The second version is where "main" points to the already existing bundle and Flipper just loads it without bundling. The plugins of version 2 must be bundled using "flipper-pkg" tool before publishing.

Changelog: Support new packaging format for plugins.

Reviewed By: mweststrate

Differential Revision: D21074173

fbshipit-source-id: 7b70250e48e5bd5d359c96149fb5b14e67783c4d
This commit is contained in:
Anton Nikolaev
2020-04-20 06:01:08 -07:00
committed by Facebook GitHub Bot
parent eb34b2f6e3
commit ca2d04a5da
22 changed files with 329 additions and 163 deletions

View File

@@ -122,6 +122,7 @@ export const NetworkRouteContext = createContext<NetworkRouteManager>(
);
export default class extends FlipperPlugin<State, any, PersistedState> {
static id = 'Network';
static keyboardActions: Array<DefaultKeyboardAction> = ['clear'];
static subscribed = [];
static defaultPersistedState = {

View File

@@ -1,21 +1,26 @@
{
"name": "Network",
"name": "flipper-plugin-network",
"specVersion": 2,
"flipperBundlerEntry": "index.tsx",
"main": "dist/index.js",
"title": "Network",
"description": "Use the Network inspector to inspect outgoing network traffic in your apps.",
"icon": "internet",
"version": "1.0.0",
"main": "index.tsx",
"license": "MIT",
"keywords": [
"flipper-plugin"
],
"bugs": {
"email": "oncall+flipper@xmail.facebook.com",
"url": "https://fb.workplace.com/groups/flippersupport/"
},
"dependencies": {
"@types/pako": "^1.0.1",
"lodash": "^4.17.11",
"pako": "^1.0.11",
"xml-beautifier": "^0.4.0"
},
"icon": "internet",
"title": "Network",
"bugs": {
"email": "oncall+flipper@xmail.facebook.com",
"url": "https://fb.workplace.com/groups/flippersupport/"
"devDependencies": {
"@types/pako": "^1.0.1"
}
}