Commit Graph

12 Commits

Author SHA1 Message Date
Lawrence Lomax
e16662a28f Improve xcode version mismatch messaging
Summary:
This runs in a very hot loop (which I will change shortly)

However, there's also some simplification that we can do here:
- Only look for `Simulator.app` processes instead of all the processes. This limits the amount of string comparison to do. If there's a `Simulator.app` running, then we know a sim is running for that Xcode.
- Use piping to extract the launch path of the process, instead of then regex'ing this out.
- Use a simpler substring match to determine if paths have a different start.

Reviewed By: passy

Differential Revision: D33891296

fbshipit-source-id: e37d5f260fc6c6113be9c5268b7c8cffb4057b9a
2022-02-01 00:44:34 -08:00
Lawrence Lomax
ccae37aa71 Extract idb device querying to IOSBridge
Summary:
Again this is just a code move for now.

However, we now have a common method between simctl and idb cases. This means that the next diff can call an `IOSBridge` with polymorpism taking over. This is still delegated out, but there's an argument to be made to move `iosUtil` functionality back so that this all lives in the same place.

Reviewed By: passy

Differential Revision: D33843093

fbshipit-source-id: 5cd884140817df851cccf63e5780582b16d4231c
2022-01-31 07:29:34 -08:00
Lawrence Lomax
aeb0b5f317 Extract getSimulators to IOSBridge
Summary:
Extracts `getSimulator` interrnals to `SimctlBridge`. This allows this functionality to be used independently of things like the the flipper server.

For now this just moves the functionality, but future diffs will build on top of this.

Reviewed By: passy

Differential Revision: D33842986

fbshipit-source-id: bae26a9bd5c21c9813f8a2b10c3b3e3efc1c5929
2022-01-31 07:29:34 -08:00
Lawrence Lomax
959a2a77d7 Extract launchSimulator to IOSBridge
Summary:
This is related to `simctl` functionality, so can be extracted there.

This will aid in future changes whereby we can hide `getDeviceSetPath` in the IOSBridge module

Reviewed By: passy

Differential Revision: D33842987

fbshipit-source-id: de292ce5afba3e7d79d8ba27c2b8852909d7e6f3
2022-01-31 07:29:34 -08:00
Anton Kastritskiy
1aff8466b1 let linter handle type naming conventions
Summary: {gif:kosnw403}

Reviewed By: passy

Differential Revision: D33846715

fbshipit-source-id: 5de4bb0cf88f24f5a26acedb82a0816417fb0787
2022-01-31 02:49:09 -08:00
Andrey Goncharov
da618fd3f3 Decouple CertificateProvider and adb/idb client intialization
Summary:
Previously CertificateProvider initialized ADB and provided config to IDB. As result, AndroidDeviceManager and iOSDeviceManager indirectly depended on CertificateProvider.

With this diff we:
1. Make idbConfig resemble adbClient.
2. Make AndroidDeviceManager and iOSDeviceManager initialize their own clients
3. Fix server crash when one of the clients couldn't be initialized. The reason for the crash is CertificateProvider.prototype.init which is no longer needed.

Reviewed By: passy

Differential Revision: D33711652

fbshipit-source-id: 055b5625ed993827b65396f4af5157808479242b
2022-01-26 04:23:05 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Michel Weststrate
dcfeb4a4d5 Clean up packages and types
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.

This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins

This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:

{F686704253}

{F686704295}

Reviewed By: antonk52

Differential Revision: D33062859

fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
2021-12-16 14:54:59 -08:00
Michel Weststrate
bca169df73 Move settings, launcherSettings, GKs to app / flipper-server-core
Summary:
This diff moves a lot of stuff from the client to the server. This diff is fairly large, as a lot of concept closely relate, although some things have split off to the earlier diffs in the stack, or are still to follow (like making intern requests).

This diff primarily moves reading and storing settings and GKs from client to server (both flipper and launcher settings). This means that settings are no longer persisted by Redux (which only exists on client). Most other changes are fallout from that. For now settings are just one big object, although we might need to separate settings that are only make sense in an Electron context. For example launcher settings.

Reviewed By: passy, aigoncharov

Differential Revision: D32498649

fbshipit-source-id: d842faf7a7f03774b621c7656e53a9127afc6192
2021-12-08 04:30:54 -08:00
Andrey Goncharov
bffd58b3a6 Fix idb device duplicates
Summary:
idb sometimes returns duplicates when we query targets. It leads us to removing valid devices and reconnecting to them again. Eventually, it starves the idb thread pool.
This diff removes the duplicates from the idb output.

Reviewed By: jknoxville

Differential Revision: D32099320

fbshipit-source-id: 7d8b756360f82557000ea5aa037a249b33be9961
2021-11-03 08:11:01 -07:00
Michel Weststrate
6589eb86c5 Improve port forwarding logging
Summary: Port forwarding tool was logging the child process object. Made the logging cleaner and more useful.

Reviewed By: nikoant

Differential Revision: D31608867

fbshipit-source-id: 1c2ae7c926ed4e1b44d51db5415874600acde7ae
2021-10-14 03:17:47 -07:00
Michel Weststrate
d88b28330a Move app/server to flipper-server-core
Summary: moved `app/src/server` to `flipper-server-core/src` and fixed any fallout from that (aka integration points I missed on the preparing diffs).

Reviewed By: passy

Differential Revision: D31541378

fbshipit-source-id: 8a7e0169ebefa515781f6e5e0f7b926415d4b7e9
2021-10-12 16:00:52 -07:00