Summary:
init() was being misused. This returns a Logger instance, so there's no need to create one as well.
This was a problem because different arguments were being passed to each (isHeadless in this case).
Reviewed By: passy
Differential Revision: D14083320
fbshipit-source-id: b0001a2b3cdd914609d54382575e3b0fa4b5f077
Summary:
So we can distinguish between humans and the machines.
We can redirect the traffic to different tables based on this attribute if necessary.
Reviewed By: danielbuechele
Differential Revision: D14025004
fbshipit-source-id: c3a24b5f8a30f24445eaee67843b78ddabfc9d51
Summary:
CLI was not working:
- setup now needs an object with arguments passed
- the `argv` property is needed by `yargs` to work in node: http://yargs.js.org/docs/#api-argv
Reviewed By: passy
Differential Revision: D13991958
fbshipit-source-id: a9432b27f3d4d24c1e43014b8fb87dca806a6e8a
Summary:
This seems like a better approach than ad-hoc lookup in
`electron.remove.argv`. Left a note to a task to provide
a better interface to this.
I also need this in order to ensure we're starting
Flipper through the launcher which needs to happen
before we start the Electron runtime.
Reviewed By: jknoxville
Differential Revision: D13881355
fbshipit-source-id: 69c70d71035a47084f789ddb4dc969b45ba4648b
Summary: listening on `SIGINT` events and putting the serialized store to stdout.
Reviewed By: passy
Differential Revision: D13878051
fbshipit-source-id: 19c1d857a299ed9a474605169c54e5359e0515bd
Summary:
Wrapping console to send all console.logs to stderr, as we are planning to use stdout for the actual data.
By default only console.error messages are logged. I will add a `-v` argument to show all.
Also, displaying some ASCII-art and the version number when starting flipper CLI.
Reviewed By: passy
Differential Revision: D13843675
fbshipit-source-id: acaa70d16f12965a8426abca506049dbafb7962c
Summary:
For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path.
This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`.
For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI.
Reviewed By: passy
Differential Revision: D13843676
fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
Summary:
Adding `headless/index.js` This is the entry point to the headless version of Flipper.
This creates a redux store, and initializes the dispatchers. As all business logic (adb connections, etc.) are managed by dispatchers, this spins up a working version of Flipper, listening on our ports, allowing connections to devices.
For APIs not available in node.js, we are adding polyfills. `WebSocket` is used by redux-devtools, `fetch` is used in a couple of places throughout the application. These polyfills are added to the global namespace, so the app can run the same as in the browser.
Reviewed By: passy
Differential Revision: D13786573
fbshipit-source-id: 685f67e1c0d2948de7c43b8a1e2dc10dc69aa743