Commit Graph

8410 Commits

Author SHA1 Message Date
Pranav Yadav
78d56eaa70 Enforce minimum Node JS to v18 (#4897)
Summary:
Enforce minimum Node JS version to `v18` via `/package.json#engines
`

- Node JS `v16`'s EOL is `2023-09-11`:
https://nodejs.org/en/blog/announcements/nodejs16-eol

- react-native also bumped Node JS to `v18` recently https://github.com/facebook/react-native/pull/37709 (RN `0.73` will probably enforce min Node JS `v18`)

Bumps in CI via:
1. https://github.com/facebook/flipper/issues/4898

## Changelog:

[General] [Breaking] - Enforce minimum Node JS `v18`

Pull Request resolved: https://github.com/facebook/flipper/pull/4897

Test Plan: - Should pass tests & builds successfully

Reviewed By: ivanmisuno

Differential Revision: D47294577

Pulled By: passy

fbshipit-source-id: 7ba6a1b6ea6a9e42c77620dc7e0ddf7bd0c641b8
2023-07-17 04:44:21 -07:00
Sanjaiyan Parthipan
7cef8286f9 Concurrent Function Upgrade for Enhanced Performance (#4918)
Summary:
Republishing sanjaiyan-dev's PR https://github.com/facebook/flipper/pull/4889 running `git rebase` because of a conflict.

Pull Request resolved: https://github.com/facebook/flipper/pull/4918

Reviewed By: lblasa

Differential Revision: D47294545

Pulled By: passy

fbshipit-source-id: 74904ec6179ed5a3bab6f9b701c3cd769ecad3bf
2023-07-17 04:43:14 -07:00
Michel Weststrate
c8776175c3 Added support for secondary indices for fast lookups
Summary:
Add support for secondary indices, to allow for cheap lookups, like a set of events for a specific UI element in the events table:

```

#### getAllRecordsByIndex

Usage: `getAllRecordsByIndex({ indexedAttribute: value, indexAttribute2: value2, .... })`

This method allows fast lookups for objects that match specific attributes exactly.
Returns all items matching the specified index query.
Note that the results are unordered, unless
records have not been updated using upsert / update, in that case
insertion order is maintained.
If no index has been specified for this exact keyset in the indexQuery (see options.indices), this method will throw.

Example:
```

```
const ds = createDataSource([eatCookie, drinkCoffee, submitBug], {
  key: 'id',
  indices: [
    ['title']
    ['id', 'title'],
    ['title', 'done'],
  ],
});

// Find first element with title === cookie (or undefined)
const todo = ds.getFirstRecordByIndex({
    title: 'cookie',
})

// Find all elements where title === cookie, and done === false
const todos = ds.getAllRecordsByIndex({
  title: 'cookie',
  done: false,
})
```

Reviewed By: antonk52

Differential Revision: D47396435

fbshipit-source-id: 20c4527be83532863b9b07ab20ebf20a80c3c35d
2023-07-14 07:46:52 -07:00
Andrey Goncharov
0345d7d533 Handle onMessage errors when client is not connected
Reviewed By: lblasa

Differential Revision: D47397641

fbshipit-source-id: ac9c057050a3bac0c5149f5ce2998657fededb61
2023-07-14 03:31:20 -07:00
generatedunixname89002005306973
257003af42 Flipper Snapshot Bump: v0.206.1-SNAPSHOT
Summary: Releasing snapshot version 0.206.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D47461478

fbshipit-source-id: 6510f25a6214f0c00bf39eaf0bef308390cf9ebf
2023-07-14 00:01:53 -07:00
generatedunixname89002005306973
e51b1afd71 Flipper Release: v0.206.0
Summary: Releasing version 0.206.0

Reviewed By: lblasa

Differential Revision: D47461479

fbshipit-source-id: a298f0877ae48062d31e8a824f780f70b503e7ab
2023-07-14 00:01:53 -07:00
Lorenzo Blasa
fb845a5ae6 Back out "Remove usage of ReactDOM.render for root"
Summary:
Original commit changeset: 2a975690bab0

Original Phabricator Diff: D47257442

For context:
More things need updating and testing. Node, antd, etc. needs all updating.

Once this lands, a new release needs to be made triggered by:
https://www.internalfb.com/chronos/job/gp/27021599065494131

Differential Revision: D47456598

fbshipit-source-id: 1f96e88744b98c7d477c5ccc43167bde475e3036
2023-07-13 18:16:50 -07:00
generatedunixname89002005306973
e0d9b899d2 Flipper Snapshot Bump: v0.205.1-SNAPSHOT
Summary: Releasing snapshot version 0.205.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D47439004

fbshipit-source-id: 58229d3d32f1025653ad4272473d177fcfc8b881
2023-07-13 09:49:18 -07:00
generatedunixname89002005306973
64db93136c Flipper Release: v0.205.0
Summary: Releasing version 0.205.0

Reviewed By: lblasa

Differential Revision: D47439005

fbshipit-source-id: 85b299368111d48cee7be184a2745146e19bd835
2023-07-13 09:49:18 -07:00
Lorenzo Blasa
a165d37ab3 Grey icon for PWA
Summary:
Right now, both Launcher and PWA share the same icon.

As to make it easier to identify which one is which, PWA will have a greyed icon instead.

Reviewed By: antonk52

Differential Revision: D47436998

fbshipit-source-id: 69d4d273c35e327263fbbf02d4ac7a005013f1d9
2023-07-13 07:41:44 -07:00
Lorenzo Blasa
2f617d5eab Fix Windows
Summary: For Windows, we cannot use UDS, so use TCP instead.

Reviewed By: antonk52

Differential Revision: D47436314

fbshipit-source-id: ee2454f9f77b3642f4988957eefc250a64bf02b6
2023-07-13 06:44:19 -07:00
Lorenzo Blasa
f404827c69 Exit if proxy fails
Summary:
If the proxy fails, exit.

The proxy server is the one listening on the supplied TCP port, used by PWA.

If it has failed, then quit the process.

Reviewed By: aigoncharov

Differential Revision: D47433631

fbshipit-source-id: 55750db5bf3e00876074a6b403747ec07718878c
2023-07-13 03:59:58 -07:00
Andrey Goncharov
ca009d1233 Ignoring errors from "send"
Summary: "send" returns "void" which means we do not care about the execution result, including errors

Reviewed By: lblasa

Differential Revision: D47398015

fbshipit-source-id: ef185575f6e91d69356ab88c7f3d213033759da8
2023-07-13 03:23:56 -07:00
Andrey Goncharov
f59a2e5fba Allow unsubscribing from client events
Summary: In the next diffs, we are going to show a message only once when the plugin gets activated. This diff adds a way to unsubscribe from Flipper events after the first execution.

Reviewed By: LukeDefeo

Differential Revision: D47366239

fbshipit-source-id: 18cb99df865f9cf26c055a99b7d1b7058dcb123c
2023-07-12 08:56:50 -07:00
Andrey Goncharov
7644c9092a Expose activated state to plugins
Reviewed By: LukeDefeo

Differential Revision: D47365658

fbshipit-source-id: 4ce2a65e9439c51e635548d84a25a2cdcde9a0d3
2023-07-12 08:56:50 -07:00
Lorenzo Blasa
0e01fcad44 Android container utility integration
Summary: Report commands as executed by the android container utility.

Reviewed By: antonk52

Differential Revision: D47340410

fbshipit-source-id: dc2f80572816c8746e603aae2d721da2c47c3c4e
2023-07-12 03:30:34 -07:00
Lorenzo Blasa
6668420083 Disable stdout for successful device listing
Summary: If it is successful, we rarely care about stdout, which can be quite verbose. So don't use it.

Reviewed By: antonk52

Differential Revision: D47339446

fbshipit-source-id: 66f43d4184e44ed07364a6f33715139e19b2dc1d
2023-07-11 07:21:00 -07:00
Andrey Goncharov
b1d2bf4b9f Add documentation for Jest E2E integration
Reviewed By: lblasa

Differential Revision: D47363239

fbshipit-source-id: 8bf46f1a9143e1b9f6b54961ba92c9e3846ac89a
2023-07-11 04:41:24 -07:00
Lorenzo Blasa
564d62d8d5 AndroidDevice, transform to async function
Summary: ^

Reviewed By: lawrencelomax

Differential Revision: D47331809

fbshipit-source-id: 819aefd1703cefc24b71216b946ca66bed3f5db1
2023-07-11 04:04:37 -07:00
Luke De Feo
994b472750 Increase thickness of selection border to make selection more apparant
Summary:
We had feedback that when a small eleemnt was selected it was hard to find, this should help

Changelog: [UIDebugger] Make selection more prominent in the visualiser

Reviewed By: lblasa

Differential Revision: D47223504

fbshipit-source-id: 33b448d36b0323e958e45fd1d0e2c7f659de293c
2023-07-10 09:22:39 -07:00
Luke De Feo
36447d550a Keyboard controls moved selected and hovered node together
Summary:
Following feedback when using keyboard controls its a little bit awkward to have to move with arrows and then select with enter.

Now when using keyboard controls you are manipulating the selected state.

Enter still selects / unselects but its not really needed anymore

When using the mouse the hover state is still there

Changelog: [UIDebugger] Using keyboard arrow control changes the selected and hovered state together for faster / easier navigation

Reviewed By: lblasa

Differential Revision: D47212492

fbshipit-source-id: 996196880d623885b4d4b7d1a70954201f809d28
2023-07-10 09:22:39 -07:00
Luke De Feo
f3f5018f71 Add No source found state and error state
Summary: Note There is currently an issue with myles https://fb.workplace.com/groups/myles.search/permalink/1446945366079946/?notif_id=1688467057742844&notif_t=video_processed&ref=notif

Reviewed By: lblasa

Differential Revision: D47210290

fbshipit-source-id: 584435922610e5138a6c14543163fcf3a347a727
2023-07-10 09:22:39 -07:00
Luke De Feo
33ebe05126 Add icons to context menu
Summary: So pretty

Reviewed By: lblasa

Differential Revision: D47210293

fbshipit-source-id: 592dde396d43e4af30e38cab6a198e2153cfbf30
2023-07-10 09:22:39 -07:00
Luke De Feo
993413c5f2 Prefetch IDE resolve query
Summary:
To avoid showing the Ugly spinner in the context menu as well as a better UX we prefetch the IDE resolved path. It was important to limit the concurrency of the running arc jobs otherwise lots of bad things happen and the whole machine stalls out.

The general idea is as the frame comes off the wire we send them to react query to prefetch. by setting the cache time sending the same key twice will not result in 2 fetches, so we dont need to worry about deduplication on our side

Reviewed By: antonk52

Differential Revision: D47210292

fbshipit-source-id: 4a1d8efdfae754c1a73c6a868b02d1f3a0a5b567
2023-07-10 09:22:39 -07:00
Luke De Feo
5aa0ddb0a3 Move open in ide and big grep to context menu
Summary:
Originally we planned to move the IDE inline in the row but this is hard to do well, especially with the horizontal scroll as well as the extra buttons for biggrep, codehub, AS and vscode.

Context menu is still very natural so lets try this

Reviewed By: lblasa

Differential Revision: D47210289

fbshipit-source-id: 339508c820915298161bf95fd1c3cea60b800746
2023-07-10 09:22:39 -07:00
Lorenzo Blasa
cc0f42be76 Integrate iOS and Android certificate providers with recorder
Summary: Integrate and clean existing logs.

Reviewed By: antonk52

Differential Revision: D47330592

fbshipit-source-id: 7b1c7ebbe5804ccc184edd2583f5cddd598f11e8
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
c15ac08714 Clean AndroidCertificateProvider
Summary: Remove debug logs and add re-format other warn logs to have parity with iOS

Reviewed By: antonk52

Differential Revision: D47330455

fbshipit-source-id: ac8edde2124bbe99d0ea11f46f3b85dd77b96c7b
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
f8e51dc847 ConnectivityHub integration
Summary:
This change has a minimal Connectivity Hub with a log viewer of connectivity related events.

The hub is integrated so that is usable.

Reviewed By: antonk52

Differential Revision: D47296027

fbshipit-source-id: 7611ce0b1480e9bdb7cdff2bcedeb445a322c195
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
e484867f21 Enable dispatch of events
Summary: To dispatch events, we need a valid instance of FlipperServer. This is the place so enable the recorder with it.

Reviewed By: antonk52

Differential Revision: D47295986

fbshipit-source-id: f2231544c58ba8f76e9102265e10a99520260b0a
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
e20d723ac0 Make ClientQuery available to certificate provider
Summary:
CertificateProvider is intrinsically related to a client query, make it available to it.

This becomes the optional 'context' of shell executions. When these are recorded, the context is provider to the recorder which can then link an ongoing certificate exchange process with the success or failure of said command.

Reviewed By: antonk52

Differential Revision: D47295894

fbshipit-source-id: 9469d18bda02793d71a6a8b29c93f4af1db23569
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
60b3ff99ce Troubleshoot FlipperServer support
Summary: Add neessary types and events to troubleshoot connectivity.

Reviewed By: antonk52

Differential Revision: D47293373

fbshipit-source-id: 9ffbe07e5c71ba0d8ab1c58cd322eaab22141f12
2023-07-10 05:52:07 -07:00
Lorenzo Blasa
fc38355eee Centralise logging
Summary:
Centralise connectivity logging into a single place. By having all logs go through a single interface, then it becomes trivial to manipulate them as needed.

In this change, this is not done.

In subsequent diffs, logs will be dispatched via an event and will be visualised in the Connectivity Hub.

Reviewed By: passy

Differential Revision: D47185054

fbshipit-source-id: fb5eab98895be0c8f61fb9a77d3e66d6a8dbcb27
2023-07-10 04:14:14 -07:00
Eli White
49d1a8b0fa Removing unused yarn resolutions
Summary: These resolutions aren't used, validated with `yarn why`. See the diff higher in the stack for automation.

Reviewed By: yungsters

Differential Revision: D47282205

fbshipit-source-id: a2e909e3802f780fbe7525e5945faebee7004aef
2023-07-07 15:15:45 -07:00
Lorenzo Blasa
87c5296cd8 Scaffolding
Summary:
Scaffolding connectivity hub. The final place may be different though.

But at least for now whilst we iterate on the solution, this should be enough.

Reviewed By: passy

Differential Revision: D47230905

fbshipit-source-id: e3b3f7d773e1bf8b0dd9821cf25c6fa8e77669f4
2023-07-06 06:57:53 -07:00
Lorenzo Blasa
9810edcdfb Remove usage of ReactDOM.render for root
Summary: As per comment, the issue is already fixed and released.

Reviewed By: LukeDefeo

Differential Revision: D47257442

fbshipit-source-id: 2a975690bab0eaed12b6b4233be41f675760a0bc
2023-07-06 05:14:00 -07:00
Lorenzo Blasa
f78ca5c09e iOSContainerUtility improvements (?)
Summary:
Bit of refactoring, bit of improvements, maybe. Mainly:

- Name consistency
- Promise chaining to async/await
- Refactoring

Reviewed By: lawrencelomax, antonk52

Differential Revision: D47224620

fbshipit-source-id: 5f4515f576decc03d470c11f24577b43f34a5a28
2023-07-05 05:15:01 -07:00
Lorenzo Blasa
e052c27f27 Remove ClientCsrQuery
Summary: Already have SecureClientQuery. No need to have this as a type as it's not used or needed anywhere.

Reviewed By: antonk52

Differential Revision: D47210345

fbshipit-source-id: d9f3026a0e2a0b5dd2e87f16dba34a388dacd75f
2023-07-04 09:01:26 -07:00
Lorenzo Blasa
4a0ad8c1c3 SecureClientQuery moved to flipper-common
Summary: It should've been there with ClientQuery.

Reviewed By: antonk52

Differential Revision: D47210314

fbshipit-source-id: 869496918648f20b616c1a612296fff55597af77
2023-07-04 09:01:26 -07:00
Lorenzo Blasa
f63e5d440a Move certificate exchange bits to app-connectivity
Summary: Bit of reorganising as utils is a bit too generic and crowded.

Reviewed By: passy

Differential Revision: D47186536

fbshipit-source-id: 7b1dd26db95aef00778ff4f23d91f7371c4d07ad
2023-07-04 02:19:58 -07:00
Luke De Feo
20d7b57dbe Fix KState extraction
Summary:
The field changed from mStates to states breaking our reflection based code. Ideally I would like to just check if type == KStateContainer and access the field normally but the rest of the infrastructure expect to work on a java field.

Added tests to catch this sort of thing in the future. had to shift buck files around a bit to get it to work

Reviewed By: antonk52

Differential Revision: D46974357

fbshipit-source-id: 87a6f5883b33e4d1a7359df5987fc7ead7c19033
2023-07-03 12:19:26 -07:00
Lorenzo Blasa
62cb33b763 comms: app-connectivity
Summary: It doesn't get more generic than 'comms'. So, narrow it down: app-connectivity.

Reviewed By: passy

Differential Revision: D47185255

fbshipit-source-id: 87e9c2487c9b07603d14e856de670757078c0da1
2023-07-03 09:40:26 -07:00
Lorenzo Blasa
48495c906e ServerAdapter: ServerWebSocketBase
Summary: Make it more clear about that this is. `ServerAdapter` was VERY generic.

Reviewed By: passy

Differential Revision: D47185076

fbshipit-source-id: 7d9b30f423398004bedc92ad22bc0217d1c8453f
2023-07-03 05:01:17 -07:00
Octavian Guzu
71751855df Set null-terminator after strncpy
Summary: When the length of `pkcs12.second.c_str()` is equal to `length`, strncpy won't write a null-terminator at the end of the destination string, making the destination unsafe to read and potentially cause an overflow.

Reviewed By: lblasa

Differential Revision: D46934320

fbshipit-source-id: 5e7acd49523b80105bcc47471facd9ff23b8a2b8
2023-07-03 04:41:02 -07:00
Lorenzo Blasa
54b7d8feea Fix react native windows (#4905)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4905

Use fully qualified names in an attempt to fix the broken build.

Reviewed By: passy

Differential Revision: D47148297

fbshipit-source-id: bb2e81f62a65b9d4516a0bc4cfe2abddfc18a566
2023-07-03 04:31:49 -07:00
Luke De Feo
c067346870 Add more diagnostics
Summary: node count and root node prescense will be very useful

Reviewed By: lblasa

Differential Revision: D47153394

fbshipit-source-id: 067f6f3aefa17cdfa88124956781400f53fe08d7
2023-06-30 08:17:46 -07:00
Pascal Hartig
2b17ac76de Temporarily switch to console-feed mirror
Summary:
See https://github.com/samdenty/console-feed/issues/124.

This is breaking our CI and lots of other things. We should hopefully be able to cleanly revert this on Monday.

Reviewed By: ivanmisuno

Differential Revision: D47150333

fbshipit-source-id: f34d6afdb83607c8ac2cc7fb2989ca68733798e0
2023-06-30 05:53:31 -07:00
Pranav Yadav
94a2e33cb8 CI - Bump Node JS to v18 in CI Pipeline (#4898)
Summary:
This diff bumps Node JS to `v18` in CI Pipeline.
Related PR:
1. https://github.com/facebook/flipper/issues/4897

## Changelog

[General] [Changed] - Bump Node JS to `v18` in CI Pipeline

Pull Request resolved: https://github.com/facebook/flipper/pull/4898

Test Plan: - Should pass tests & builds successfully

Reviewed By: lblasa

Differential Revision: D47128828

Pulled By: passy

fbshipit-source-id: b8d829b273898bf5e297560fbbdbafba80285b33
2023-06-30 03:25:05 -07:00
generatedunixname89002005306973
808895cef4 Flipper Snapshot Bump: v0.204.1-SNAPSHOT
Summary: Releasing snapshot version 0.204.1-SNAPSHOT

Reviewed By: lblasa

Differential Revision: D47130669

fbshipit-source-id: be9123d9499815de3222949d9017d06f5db4915f
2023-06-29 13:00:48 -07:00
generatedunixname89002005306973
5363dc8652 Flipper Release: v0.204.0
Summary: Releasing version 0.204.0

Reviewed By: lblasa

Differential Revision: D47130672

fbshipit-source-id: feb4c7aa2e702cfdcc3e6e247d25d61c7c5bb48f
2023-06-29 13:00:48 -07:00
Lorenzo Blasa
4ac755370d Move socket clean inside operation queue
Summary: Set delegate and close inside the operation's queue as to make it safer i.e. all socket related operations are done inside the queue.

Reviewed By: ivanmisuno

Differential Revision: D47124235

fbshipit-source-id: 48b53db1cd47d017a26186a156046ba68fe358b7
2023-06-29 12:40:09 -07:00