Summary:
This converts the index file to TypeScript which is used as an export for all plugins. Alongside, I had to fix a couple of errors in various files to make sure everything works correctly.
For plugins using flow, we define an interface which uses the type definition for FlipperPlugin and types all UI components as `any`.
Reviewed By: passy
Differential Revision: D16936890
fbshipit-source-id: dacd9a63a82b9f0bbb530b06072186874cba7b6f
Summary:
Removed defunct log filtering functionality, but we probably want to rebuild that.
Funny that tsc caught this as non functioning but Flow happily accepted it.
Reviewed By: danielbuechele
Differential Revision: D16690959
fbshipit-source-id: b079dd6faba83ca0c443d00cbb69c8ff95c4fa69
Summary: TSC actually found a type error here in `safeExec` which is nice.
Reviewed By: danielbuechele
Differential Revision: D16666740
fbshipit-source-id: 28a1ad12190d2351a48323f23c3a69947503625d
Summary:
Adds a star rating to flipper internal.
Based on the nuclide behaviour:
We get an event emitted when a user changes their rating.
And we also get the rating with every ping event, which is fired every minute, if flipper is the primary window.
The only thing I don't like that much is that this doesn't actually say anywhere what the stars are for.
Reviewed By: passy
Differential Revision: D16420281
fbshipit-source-id: 69a52f64058955d7cd068215478e95c554cb9ed4
Summary:
There's been a bug here where the id was treated as a pluginId.
Renaming to make it clear.
Reviewed By: passy
Differential Revision: D16338884
fbshipit-source-id: 42c6c92653811d88cd37ebf4834346b1f0bb2c2a
Summary:
Original commit changeset: 650ef1344b8b
Backing this out until we can come up with a better way to do it.
The change was introduced so that when a device disconnects / crashes, we don't lose all plugin state, and you can still see what was on screen before the crash..
However, there are some problems with this solution, which get quite complicated. Putting them here for future reference:
* Closing an app results in the plugins staying there, and there's no way to tell it's not actually connected.
* If the app reconnects, the JS plugin doesn't get re-initialized. Even though the client plugin has been.
Reviewed By: bnelo12
Differential Revision: D16280931
fbshipit-source-id: 48e09b876e631aa87372054e706cdb9a2b3e2eb7
Summary:
Original commit changeset: 1d0e6ce17c89
Backing this out until we can come up with a better way to do it.
The change was introduced so that when a device disconnects / crashes, we don't lose all plugin state, and you can still see what was on screen before the crash..
However, there are some problems with this solution, which get quite complicated. Putting them here for future reference:
* Closing an app results in the plugins staying there, and there's no way to tell it's not actually connected.
* If the app reconnects, the JS plugin doesn't get re-initialized. Even though the client plugin has been.
Reviewed By: bnelo12
Differential Revision: D16280932
fbshipit-source-id: 92585cdd0dace2012924df4106327a1e21ab9f9b
Summary: Taking another stab at adding some lint rules to make it harder to shoot yourself in the foot. Hopefully nothing too controversial. Preferring spread and rest should lead is more readable and there's no downside when using ES6. The "useless" rules are just things like renaming imports to the original name which should only happen during refactors.
Reviewed By: jknoxville
Differential Revision: D16180453
fbshipit-source-id: 1cf6851b7726c0aee953ec7cf7dd6fa0aca32253
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.
This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.
Used `eslint --fix` to change all existing cases.
Reviewed By: jknoxville
Differential Revision: D16131329
fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
Summary: As we are trying to clean the console from any non-important logs, I am removing the warnings about GK'd plugins. This information can be seen on the "Plugin not showing" panel.
Reviewed By: jknoxville
Differential Revision: D16148408
fbshipit-source-id: 5aeffa6e82524aacb050385ba86439654c07c741
Summary:
When an archived device reconnected, the clients from the architved device weren't removed and a new client was added. This caused a client to be shown multiple times after reconnecting a device.
In this diff, all clients and pluginStates from an archived device are removed once the device reconnects.
Reviewed By: passy
Differential Revision: D16075349
fbshipit-source-id: 1d0e6ce17c89bb75dd993466bca6bd64e2c63338
Summary:
Event emitter was typed any. Therefore, Client extended any and thing went south.
removing the explicit any type and fixing flow errors.
Reviewed By: jknoxville
Differential Revision: D15987630
fbshipit-source-id: 9456149d46f839d9579fcc2671ab2a82935fc23a
Summary: When an Android device disconnects, the device is marked as offline. In this diff, we want to make sure the client for the disconnected apps is not removed, but converted into a "disconnected" client. This makes sure plugins are still shown for the disconnected app.
Reviewed By: passy
Differential Revision: D15985424
fbshipit-source-id: 650ef1344b8be4411794b0344805cb75ceae4a83
Summary:
Adding a `archive` method to Android devices, that returns a new ArchivedDevice with the same properties as the Android device. This method is called when an android device disconnects and the new ArchivedDevice is added to the devices list. When the device reconnects again, the archived device is removed.
Currently only logs are persisted. In following diffs we can:
- add support for iOS
- move the persisted pluginStates to the archived device as well
Reviewed By: passy
Differential Revision: D15942904
fbshipit-source-id: 07c5415994594abd630d0c4b458b76d1aac6ef02
Summary:
Apple has changed the xcrun api in some cases, it seems.
Adding support for true instead of YES...
Reviewed By: danielbuechele
Differential Revision: D15940810
fbshipit-source-id: 94ba2733527e005b989fb5a62ffbab2f7a0243b9
Summary:
Trying to detect version mismatches between the running Simulator and the version of Xcode's CLI tools.
What is done in this check:
- The running path of the running simulator is queries from `ps`
- The path of Xcode CLI tools is queried using `xcode-select -p`.
- The two paths are compared if they differ
Reviewed By: jknoxville, passy
Differential Revision: D15803238
fbshipit-source-id: 6638312505fc950ff7869fd55494984bfffb677b
Summary:
Using `process.exit()` stops the node process without waiting for the event loop to finish, so when using async i/o, which is what happens when piped, if the output is buffered, the process can terminate before it finishes flushing the buffer.
This means you only get some of the output and the JSON is malformed.
This fixes it by calling `process.exit()` inside the flushed callback.
Reviewed By: passy
Differential Revision: D15624806
fbshipit-source-id: ea540ed5a40fb1811e5b705b190da96c8e54730d
Summary: Catch the exception thrown in xcrun, which will occur for linux machines and in the cases when Xcode command line toolchain is not installed.
Reviewed By: passy
Differential Revision: D15621368
fbshipit-source-id: f3044cee6f7a4b5ba927a33003f9690c1fe31586
Summary:
Notification from plugins (especially network) could be very spammy. This diff introduces a throttle, so a plugin can only send a notification every 5 seconds. If a notification is sent earlier, it is not displayed and the counter is reset to 5 seconds from now.
In the notifications panel still all notifications are dispalyed.
Reviewed By: passy
Differential Revision: D15621427
fbshipit-source-id: ea5e3b39fdd5cdedff3fd5234e752800520a423b
Summary:
We've got some exit troubles, meaning we have to use process.exit() to stop the headless process. This isn't good because the output isn't necessarily flushed when the process forcefully exits this way.
The tests can check for this, so I've removed the forceExit flag, and fixed the case stopping them from cleanly exiting - the android adb client.
Reviewed By: passy
Differential Revision: D15602919
fbshipit-source-id: b4a9dbabf5d3c874bda6bf938e4acb7b5b7e901b
Summary: This diff adds an option of `--list-devices` which will list the currently active devices on the machine. It will be later used to select a device by passing an `id` as an argument.
Reviewed By: danielbuechele
Differential Revision: D15524250
fbshipit-source-id: 7a79ceb1e431a25adcb4e05bc0cb68407c527806