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:
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: 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: 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
Summary:
This was originally introduced so we could squash multiple instances of the same error at the client side and only report one instance of them.
Now we've moved to doing the aggregation server side, which is more powerful, so this is no longer necessary. We've also seen a case of these Error objects appearing opaque making it hard to see the underlying problem, so removing it entirely.
Reviewed By: passy
Differential Revision: D14576715
fbshipit-source-id: b285dcb5249e209f9008a14ac6a2f226f3aa82d7
Summary:
Unified all imports of Logger. Some were called LogManager before.
Now the fb-stub and the fb variants use the same interface.
Constructor of Logger is no longer exposed so it can't be initialized twice, unless in the case you're explicitly using the fb variant, which has extra functionality.
Reviewed By: danielbuechele
Differential Revision: D14083929
fbshipit-source-id: 9b61a06e1264d5f142b5a9188465c99deaf18193
Summary: support for DEVICE_SET_PATH as used by 1W
Reviewed By: passy
Differential Revision: D14007285
fbshipit-source-id: 79f40355020c67efcb439f470af2fc35ec7fea7e
Summary:
Fixes required to be able to run Flipper in node.js:
* Adds checks if the `window`-object exists before using it, to allow running in node.
* Imports from within Flipper should directly reference the file they are requiring instead of `import from 'flipper'`. This was done in most of the places. Fixed a few occurrences where this wasn't the case. This is to prevent cyclic dependencies in node.
* shared packages (React, ReactDOM and Flipper) were exposed on the `window` before, changed this to `global` as this works in browser and node.
* Adds some missing methods to our electron stubs (used for testing and headless Flipper)
Reviewed By: passy
Differential Revision: D13786577
fbshipit-source-id: 145d560f1446e7d0bdec2acd8dd54dae983d7b36
Summary: This diff adds a static function `onRegisterDevice` which is being called whenever an device gets registered. This callback is used to add loglisterner for android. I even moved the logic of iOS from `onRegisterPlugin` to this callback. The reason for not adding android log listener in `onRegisterPlugin` was that there were cases when baseDevice was not yet registered before calling `onRegisterPlugin`. For android, I want the instance of `BaseDevice` so that I can add logListener on it.
Reviewed By: danielbuechele
Differential Revision: D13563282
fbshipit-source-id: b5be40f3dbc808bdaeabae28423c563cf2345a22
Summary: This diff refactors CrashReporter Plugin. The business logic of crash reporter plugin was placed in the `iOSDevice.js` as it gets the hook to the initialisation of iOSDevice. This diff moves the business logic to the Crash Reporter plugin files under the plugins folder. To get the hook, so that we can add our watcher, I have added a static function over `FlipperBasePlugin`, which if exists, will be called once `REGISTER_PLUGIN` event is dispatched
Reviewed By: danielbuechele
Differential Revision: D13529035
fbshipit-source-id: 28216b273b4032727859107d8a6751c6465af9ac
Summary:
Before this diff we used to show crash notifications for all kind of crashes. This diff adds the check, which makes sure that only the crashes of a selected device is shown
Also added tests and updated few tests
Reviewed By: danielbuechele
Differential Revision: D13518019
fbshipit-source-id: 6d640d078a43480274242a5d86f2d135d875d630
Summary:
This diff adds a watcher on `~/Library/Logs/Diagnostics/` library and fires a notification whenever a crash log is added there. This will only work for iOS crashes. With this change, for iOS we should be able to see all kind of crash notification be it due to uncaught exception or a native crash or signal errors.
For android, it will still show notifications due to uncaught exceptions. In upcoming diffs, I will change the logic for android too by parsing Logcat logs.
This diff doesn't support physical device crash reporting. The crashes for physical devices are synced to other folder and that too they are symbolicated.
Reviewed By: danielbuechele
Differential Revision: D13404648
fbshipit-source-id: 7219855ebc73451af87f77f90cc3ed0f2ab5287c
Summary:
Now we get one event for every time an android or iOS device is detected by flipper.
This is different from a successfull connection. E.g. it may not have any flipper-enabled apps running.
Reviewed By: danielbuechele
Differential Revision: D13377316
fbshipit-source-id: 80e42ab0ae1c2ab50d4bec732a0fa86fcd941991
Summary:
Now flipper will include iOS devices in the dropdown, but you'll also get a message saying they aren't yet supported.
Also doesn't start up the PortForwardingMacApp instances in this case, because it's pointless.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13319990
fbshipit-source-id: 75d72c6ed2478c7b999c5f43b764f097141b33de
Summary:
At the moment, when a client is failing to connect, you effectively get an infinite spinner, as it keeps retrying.
This keeps the spinner while it's retrying, but in between, shows a failure icon.
This isn't perfect. It's still shown under possibly the wrong device, but that already happens anyway, this just adds an extra icon.
Pull Request resolved: https://github.com/facebook/flipper/pull/339
Reviewed By: priteshrnandgaonkar
Differential Revision: D13319635
Pulled By: jknoxville
fbshipit-source-id: e16177ecc7058b779fb17b61e20fcbac8ccf0c29
Summary: Adds support for physical iOS devices, when the necessary dependencies are present. Unfortunately these aren't open sourced yet so the open source build won't get this feature yet.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13001473
fbshipit-source-id: d8c2bcd53b7972bec676717c8af0112800b918d0
Summary: Apple seems to have changed the key for device availablility. We check for both now.
Reviewed By: jknoxville
Differential Revision: D10401073
fbshipit-source-id: 284a168a701eb2d5d9b3cbcac2aa6276ee1a2211
Summary: Removing PortForwarderMacApp as it is not used anymore. Before it was used to allow us to debug physical iOS device. However, the support for physical iOS device was removed a while ago for security reasons. The PortForwarder was not in use anymore so it is safe to remove it.
Reviewed By: passy
Differential Revision: D10337888
fbshipit-source-id: 93f508ec524a0fc055141176c06d7e7169d83f16
Summary:
First connection attempt to iOS device was only made after 3000ms. This caused all iOS devices only show up after this delay.
Now, the devices are queried immediately.
Reviewed By: passy
Differential Revision: D9613057
fbshipit-source-id: a14e3f02576ec5e159f4002bf68efe53236dcc50
Summary:
Refactors the plugin architecture of Sonar:
- Before plugin rendering had it's own implementation of the react lifecycle. This means the `render`-function was not called by react, but rather by the application it self. In this diff, the render method is now called from react, which enables better debugging and allows react to do optimizations.
- Business logic for querying emulators is moved away from the view components into its own dispatcher
- All plugin handling is moved from `App.js` to `PluginContainer`.
- The sidebar only shows one selected device. This allows us to add the screenshot feature as part of the Sonar main app and not a plugin.
- This also fixes the inconsistency between the devices button and the sidebar
Reviewed By: jknoxville
Differential Revision: D8186933
fbshipit-source-id: 46404443025bcf18d6eeba0679e098d5440822d5