Set up Flipper decapitated packages
Summary: This diff introduces the packages necessary for Flipper decapitated. * flipper-common: utilities & types shared between client, server, flipper-plugin * flipper-server-core: all device & client management goes in here. Basically flipper's backend * flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron * desktop: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron specific stuff like dialgos * flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well. * flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs. * flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core. This diff just creates the packages, but doesn't move any code, so it can be summarized as: restoftheowl Reviewed By: nikoant Differential Revision: D30218646 fbshipit-source-id: 735598a1261a98e584f52504b5eba01ec0afa162
This commit is contained in:
committed by
Facebook GitHub Bot
parent
99acd766b9
commit
c3ff0ff355
41
desktop/README.md
Normal file
41
desktop/README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Flipper Desktop
|
||||
|
||||
This folder contains everything to run the Flipper 'Desktop', that is, the UI which you use to interact with the device / app under debug.
|
||||
|
||||
### Packages provided here:
|
||||
|
||||
* flipper-common: utilities & types shared between client, server, flipper-plugin
|
||||
* flipper-server-core: all device & client management goes in here. Basically flipper's backend
|
||||
* flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron
|
||||
* flipper-ui-electron: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron * specific stuff like dialgos
|
||||
* flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well.
|
||||
* flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs.
|
||||
* flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core.
|
||||
* flipper-plugin: The flipper SDK used by plugins. Exposes all API's that can be used by plugins
|
||||
* pkg: CLI tool to manage building flipper plugins
|
||||
* pkg-lib
|
||||
* plugin-lib
|
||||
* babel-transformer
|
||||
* doctor
|
||||
* eslint-plugin-flipper
|
||||
|
||||
### Packages overview
|
||||
|
||||
```
|
||||
flipper-ui-electron:
|
||||
- flipper-server-core (directly embedded)
|
||||
- flipper-ui-core
|
||||
- plugins (prebundled)
|
||||
- plugins (installable)
|
||||
- flipper-plugin
|
||||
|
||||
flipper-server
|
||||
- flipper-server-core
|
||||
- flipper-ui-browser (served by webserver)
|
||||
- flipper-ui-core (communicates using WebSocket with server-core)
|
||||
- plugins (prebundled)
|
||||
- plugins (installable)?
|
||||
|
||||
flipper-dump
|
||||
- flipper-server-core
|
||||
```
|
||||
@@ -38,6 +38,8 @@
|
||||
"flipper-doctor": "0.0.0",
|
||||
"flipper-plugin": "0.0.0",
|
||||
"flipper-plugin-lib": "0.0.0",
|
||||
"flipper-server-core": "0.0.0",
|
||||
"flipper-ui-core": "0.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"immer": "^9.0.6",
|
||||
"invariant": "^2.2.2",
|
||||
|
||||
@@ -51,6 +51,9 @@ import {getVersionString} from './utils/versionString';
|
||||
import {PersistGate} from 'redux-persist/integration/react';
|
||||
// eslint-disable-next-line flipper/no-electron-remote-imports
|
||||
import {ipcRenderer, remote} from 'electron';
|
||||
import {helloWorld} from 'flipper-server-core';
|
||||
|
||||
helloWorld();
|
||||
|
||||
if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') {
|
||||
// By default Node.JS has its internal certificate storage and doesn't use
|
||||
|
||||
@@ -10,9 +10,18 @@
|
||||
{
|
||||
"path": "../doctor"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-common"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-plugin"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-server-core"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-ui-core"
|
||||
},
|
||||
{
|
||||
"path": "../plugin-lib"
|
||||
},
|
||||
@@ -23,9 +32,5 @@
|
||||
"path": "../plugins/public/navigation"
|
||||
}
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/",
|
||||
"**/__tests__/",
|
||||
"**/lib/"
|
||||
]
|
||||
"exclude": ["**/node_modules/", "**/__tests__/", "**/lib/"]
|
||||
}
|
||||
|
||||
3
desktop/flipper-common/README.md
Normal file
3
desktop/flipper-common/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# flipper-common
|
||||
|
||||
Utilities that are shared between flipper-ui, flipper-server and flipper-plugin.
|
||||
27
desktop/flipper-common/package.json
Normal file
27
desktop/flipper-common/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "flipper-common",
|
||||
"version": "0.0.0",
|
||||
"description": "Server & UI shared Flipper utilities",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-common/src/index.tsx
Normal file
12
desktop/flipper-common/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
8
desktop/flipper-common/tsconfig.json
Normal file
8
desktop/flipper-common/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": []
|
||||
}
|
||||
3
desktop/flipper-dump/README.md
Normal file
3
desktop/flipper-dump/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# flipper-dump (TBD)
|
||||
|
||||
Stand alone Flipper command, that uses flipper-server-core to connect to apps and dump all incoming messages.
|
||||
28
desktop/flipper-dump/package.json
Normal file
28
desktop/flipper-dump/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "flipper-dump",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Flipper tool to dump data from clients",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-dump/src/index.tsx
Normal file
12
desktop/flipper-dump/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
12
desktop/flipper-dump/tsconfig.json
Normal file
12
desktop/flipper-dump/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../flipper-server-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,6 +7,9 @@
|
||||
"references": [
|
||||
{
|
||||
"path": "../plugin-lib"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-common"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
5
desktop/flipper-server-core/README.md
Normal file
5
desktop/flipper-server-core/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# flipper-server-core
|
||||
|
||||
Package that manages connections with flipper clients, queries for adb/idb clients, accepts incoming websocket / rsocket connections and takes care of certificate exchange.
|
||||
|
||||
Used by Flipper desktop, flipper-server and flipper-dump
|
||||
28
desktop/flipper-server-core/package.json
Normal file
28
desktop/flipper-server-core/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "flipper-server-core",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Flipper server connection SDK",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-server-core/src/index.tsx
Normal file
12
desktop/flipper-server-core/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
12
desktop/flipper-server-core/tsconfig.json
Normal file
12
desktop/flipper-server-core/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../flipper-common"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
desktop/flipper-server/README.md
Normal file
5
desktop/flipper-server/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# flipper-server (TBD)
|
||||
|
||||
Stand alone Flipper server as NodeJS process, that uses flipper-server-core for device communication and also provides a webserver to serve flipper-ui.
|
||||
|
||||
Flipper-server can be used as background process, for example on CI servers or to power IDE plugins.
|
||||
28
desktop/flipper-server/package.json
Normal file
28
desktop/flipper-server/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "flipper-server",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Standalone nodeJS based Flipper server",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-server/src/index.tsx
Normal file
12
desktop/flipper-server/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
12
desktop/flipper-server/tsconfig.json
Normal file
12
desktop/flipper-server/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../flipper-server-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
desktop/flipper-ui-browser/README.md
Normal file
3
desktop/flipper-ui-browser/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# flipper-ui-browser (TBD)
|
||||
|
||||
Flippers UI, ready to be served to a webbrowser. Typically served by flipper-server. Leverages flipper-ui-core and binds the necessary features to the browser, such as file dialogs or menu's.
|
||||
28
desktop/flipper-ui-browser/package.json
Normal file
28
desktop/flipper-ui-browser/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "flipper-ui-browser",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Flipper's UI, packaged for the browser",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-ui-browser/src/index.tsx
Normal file
12
desktop/flipper-ui-browser/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
12
desktop/flipper-ui-browser/tsconfig.json
Normal file
12
desktop/flipper-ui-browser/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../flipper-ui-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
desktop/flipper-ui-core/README.md
Normal file
3
desktop/flipper-ui-core/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# flipper-ui-core (TBD)
|
||||
|
||||
Flipper's UI, agnostic of Electron vs Browser.
|
||||
28
desktop/flipper-ui-core/package.json
Normal file
28
desktop/flipper-ui-core/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "flipper-ui-core",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Flipper's UI",
|
||||
"repository": "facebook/flipper",
|
||||
"main": "lib/index.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"types": "lib/index.d.ts",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"prepack": "yarn reset && yarn build"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
"Flipper"
|
||||
],
|
||||
"author": "Facebook, Inc"
|
||||
}
|
||||
12
desktop/flipper-ui-core/src/index.tsx
Normal file
12
desktop/flipper-ui-core/src/index.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function helloWorld() {
|
||||
return true;
|
||||
}
|
||||
15
desktop/flipper-ui-core/tsconfig.json
Normal file
15
desktop/flipper-ui-core/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../flipper-common"
|
||||
},
|
||||
{
|
||||
"path": "../flipper-plugin"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -17,6 +17,7 @@ module.exports = {
|
||||
moduleNameMapper: {
|
||||
'^flipper$': '<rootDir>/app/src',
|
||||
'^flipper-plugin$': '<rootDir>/flipper-plugin/src',
|
||||
'^flipper-(server-core|ui-core|common)$': '<rootDir>/flipper-$1/src',
|
||||
'^flipper-(pkg|pkg-lib|doctor|test-utils)$': '<rootDir>/$1/src',
|
||||
},
|
||||
clearMocks: true,
|
||||
|
||||
@@ -269,7 +269,13 @@
|
||||
"doctor",
|
||||
"pkg",
|
||||
"pkg-lib",
|
||||
"flipper-common",
|
||||
"flipper-plugin",
|
||||
"flipper-server-core",
|
||||
"flipper-ui-core",
|
||||
"flipper-ui-browser",
|
||||
"flipper-server",
|
||||
"flipper-dump",
|
||||
"static",
|
||||
"e2e",
|
||||
"plugin-lib",
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
"flipper": ["./app/src"],
|
||||
"flipper-plugin": ["./flipper-plugin/src"],
|
||||
"eslint-plugin-flipper": ["./eslint-plugin-flipper/src"],
|
||||
"flipper-server-core": ["./flipper-server-core/src"],
|
||||
"flipper-server-ui": ["./flipper-server-ui/src"],
|
||||
"flipper-common": ["./flipper-common/src"],
|
||||
"flipper-*": ["./*/src"]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user