Commit Graph

21 Commits

Author SHA1 Message Date
Andrey Goncharov
b13bd2c092 Log supported plugins
Summary: We frequently get support requests asking why a certain plugin is not enabled for an app. This diff makes it easy to reason which plugins are enabled on the device

Differential Revision: D37381316

fbshipit-source-id: 148d6d8b6f51cb161eb625cabe0fa629b8a00cf5
2022-06-27 03:49:04 -07:00
Andrey Goncharov
3e72831699 Move most of plugin tests to flipper-frontend-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37241829

fbshipit-source-id: d6bef24416e2b999d529fb6e275c64384c775c21
2022-06-20 12:18:40 -07:00
Andrey Goncharov
f4fc07ffd2 Move BaseDevice tests from flipper-ui-core to flipper-frontend-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37241244

fbshipit-source-id: 3dca03e7a22c218b95702b77bb93efc983528142
2022-06-20 12:18:40 -07:00
Andrey Goncharov
115a4b7997 Use AbstractPluginInitializer from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: passy

Differential Revision: D37238571

fbshipit-source-id: 39d6bb87d6beacc793ef5acd71097fcc4e82969d
2022-06-20 12:18:40 -07:00
Andrey Goncharov
8768405e80 Use constants from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37238570

fbshipit-source-id: 5dbf6f179fc8957e074bad1e8f74e400644be049
2022-06-20 12:18:40 -07:00
Andrey Goncharov
fab8849c73 Use TestDevice from flipper-frontend-core in flipper-ui-core
Summary: See D37139129

Reviewed By: lblasa

Differential Revision: D37235567

fbshipit-source-id: a0596ba71fcb8722088e51361774389a7daaebb8
2022-06-20 12:18:40 -07:00
Andrey Goncharov
fd380a4c1e Use BaseDevice from flipper-frontend-core in flipper-ui-core
Summary: Use BasDevice definition from flipper-frontend-core in flipper-ui-core and remove the redundant definition from flipper-ui-core

Reviewed By: lblasa

Differential Revision: D37234785

fbshipit-source-id: 6e768090a197c1d2c49cb1cd573acea12fb65d24
2022-06-20 12:18:40 -07:00
Andrey Goncharov
ef5fa275a3 Use AbstractClient from flipper-frontend-core in fliper-ui-core
Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: lblasa

Differential Revision: D37139198

fbshipit-source-id: 042db7492c550e10ea72c32fd15001c141bf53f9
2022-06-20 12:18:40 -07:00
Andrey Goncharov
c2e3c4eb50 Add TestDeivce to flipper-frontend-core
Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: passy

Differential Revision: D37139129

fbshipit-source-id: 53ba08920735d1b40e1351fddf41a97a6352b2b6
2022-06-20 12:18:40 -07:00
Andrey Goncharov
976399b950 Move Tail to flipper-server-core
Summary: Tail is a server-side logging utility. We cannot add it to flipper-frontend-core as it is going to be included into the browser bundle then and break the build.

Reviewed By: antonk52

Differential Revision: D36771864

fbshipit-source-id: 169cdb88543f1e47f39e8c0976c3a3f45c0439d5
2022-05-31 02:58:21 -07:00
Lorenzo Blasa
49eb026769 Tail
Summary:
Added a new type, Tail. It observes changes made to a file and notifies the subscriber.

It is useful and used to tail flipper-server logs, for example.

Reviewed By: passy

Differential Revision: D36473529

fbshipit-source-id: b0f905f4f8419d9e13386440d2d2cdabd528295b
2022-05-26 09:44:30 -07:00
Lorenzo Blasa
23b551c8bf Host and port as function args
Summary:
^

Before this change, the client assumed the host and port came from location.host which is fine on the browser.

In all other cases, that object/properties may be undefined.

As such, add host and port as function args and use that instead.

Reviewed By: passy

Differential Revision: D36440423

fbshipit-source-id: 5f931f1d610d583db6a2e549e1213585f0d03dee
2022-05-17 04:20:30 -07:00
Lorenzo Blasa
bfcdb82b43 Move flipper-server client to flipper-frontend-core
Summary: ^

Reviewed By: aigoncharov

Differential Revision: D36410944

fbshipit-source-id: 2adb5904cd0f5f15d08be22c611d6774e7533f94
2022-05-17 03:54:16 -07:00
Michel Weststrate
e51e95af2e supportsMethod should return false if not connected
Summary: https://www.internalfb.com/logview/details/flipper_javascript/7e72d9f75d047791d9de43b72915cbd4/?selected-logview-tab=latest shows an exception for just checking whether a feature is supported, while the client is not connected. there is no point in checking if a feature is supported if not connected, so just returning false instead of throwing

Reviewed By: timur-valiev

Differential Revision: D36371047

fbshipit-source-id: 6e83bed6fc53cc41ddef30eeeb41d030b2c4c175
2022-05-13 06:40:06 -07:00
Andrey Goncharov
ad76060614 Expose intern graphQL reuqests to plugins
Summary: Some intern plugins use it, an dit is currently missing in FlipperLib

Reviewed By: timur-valiev

Differential Revision: D36313032

fbshipit-source-id: 5ea8e250f1d0bc8831727abd883d953286a022d4
2022-05-11 06:48:05 -07:00
Andrey Goncharov
d795117910 Expose exports from the root of flipper-frontend-core
Summary: flipper-frontend-core shares logic between different desktop flipper clients: flipper browser ui, flipper electron, flipper headless

Reviewed By: passy

Differential Revision: D36129747

fbshipit-source-id: 598382ad3897701b307a16a42dc65d4c277b3e15
2022-05-10 05:13:24 -07:00
Andrey Goncharov
7cae3af507 Add plugin initializer to flipper-frontend-core
Summary: Extract plugin initialization

Reviewed By: mweststrate

Differential Revision: D36129748

fbshipit-source-id: db56e24388f7ed858d2173b67affa37de842a9b1
2022-05-10 05:13:24 -07:00
Andrey Goncharov
ea6c293726 Set global replacements in flipper-frontend-core
Summary: Extract setting global replacements from plugin initialization

Reviewed By: mweststrate

Differential Revision: D36129749

fbshipit-source-id: 6f5b3e27c1b798124b5f2772e9099899ce521d0a
2022-05-10 05:13:24 -07:00
Andrey Goncharov
658cd1544d Add AbstractClient to flipper-frontend-core
Summary: AbstractClient provides basic interaction with Flipper Server and manages plugins

Reviewed By: mweststrate

Differential Revision: D36129750

fbshipit-source-id: 056589666c45821d0af276e3a1572708e0a3b903
2022-05-10 05:13:24 -07:00
Andrey Goncharov
f0b5e7cadb Copy RenderHost, FlipperLib initialization, device definition to flipper-frontend-core
Reviewed By: passy

Differential Revision: D36129746

fbshipit-source-id: 15e32b9482d7fe3a24567d2e6bc087095b98226e
2022-05-10 05:13:24 -07:00
Andrey Goncharov
db49673d8a Setup flipper-frontend-core
Reviewed By: passy

Differential Revision: D36129751

fbshipit-source-id: 7e2a792de412a7ada8c58e0d3f0c6c2d18828996
2022-05-10 05:13:24 -07:00