Commit Graph

36 Commits

Author SHA1 Message Date
Anton Nikolaev
caf04e4e4a Typescriptify the main process code (9/N)
Summary: Converted scripts/build-release.js and scripts/build-headless.js to typescript

Reviewed By: passy

Differential Revision: D20066504

fbshipit-source-id: 25f336062361e1211b581f96979978a6bf4fe6d4
2020-02-27 05:45:23 -08:00
Anton Nikolaev
609ca27eae Typescriptify the main process code (8/N)
Summary:
- Enabled typescript in "scripts" folder
- Converted start-dev-server.js to typescript

Reviewed By: passy

Differential Revision: D20066501

fbshipit-source-id: 23550cf3774e07fad0a8783831e3d574baee977f
2020-02-24 19:07:08 -08:00
Anton Nikolaev
e42e44c324 Support installation of plugins packaged as vsix
Summary: This is experimental feature to prove that vsix format can be used to publish plugins. Turns out there are almost no differences of vsix in comparison with npm packages.

Reviewed By: jknoxville

Differential Revision: D19770476

fbshipit-source-id: b3c62e7f2a4e8000113b9f1651e8657eb3e0d6fa
2020-02-06 11:14:15 -08:00
Anton Nikolaev
b9e7f5d6d1 Install plugin from package file
Summary:
Adding a way to install plugins directly from package files. This is required for testing after packaging format changes.

Stage 3: Implemented installation of plugins directly from package file.

Reviewed By: jknoxville

Differential Revision: D19765619

fbshipit-source-id: 57f36c87d3cf5d4e1c9a1f8f9f9f32b14a18bc8b
2020-02-06 09:43:27 -08:00
Pascal Hartig
ef0cf87448 Remove custom react-virtualized type overlay
Summary:
This takes presendence over the official types and
masked a bunch of errors we had in the codebase.

Reviewed By: mweststrate

Differential Revision: D19374741

fbshipit-source-id: 2fd5074f42381dd552b9cc2d460769766ab67b85
2020-01-17 03:58:33 -08:00
Michel Weststrate
d2a2e2ab75 Introduce async message queuing
Summary:
This diff introduces the logic for queueing incoming messages rather then directly processing them you are behind the `flipper_event_queue` GK.

The reason the queue processing is a bit complicated is to make the queue can be processed non-blocking, can be cancelled, and is safe to concurrency issues.
The idea here is that the queue is processed when we switch to a plugin, report it's progress, and abort the process when switching to another plugin without loosing any work.

This diff does not include
[x] updates to the UI (**SO DON"T LAND IN ISOLATION**)
[x] metrics to see the effect

The effect of the changes can be seen when profiling the application, before this change there are very regular CPU spikes (see the small yellow bar on the top):

https://pxl.cl/TQtl

These go away when the events are no longer processed
https://pxl.cl/TQtp

Reviewed By: nikoant

Differential Revision: D19095564

fbshipit-source-id: 0b8c3421acc4a4f240bf2aab5c1743132f69aa6e
2020-01-02 07:14:12 -08:00
Pascal Hartig
7a148ef7a6 Search for update logic
Summary:
To be used in the following diff and because it's super side effect
heavy, I didn't bother to implement tests for it.

Reviewed By: jknoxville

Differential Revision: D18479311

fbshipit-source-id: 5cbcae0ebf2de4558b993325e50f6a2da1ed3ea7
2019-11-14 08:53:15 -08:00
Michel Weststrate
f2d12f1025 Fixed a bunch of prettier errors after upgrading
Summary: prettier upgrade uncovered more errors

Reviewed By: passy

Differential Revision: D18474908

fbshipit-source-id: b1553000fb3386f2bbd9defdd3332618e4b9c867
2019-11-13 08:36:54 -08:00
Pascal Hartig
6c900d4f5f Upgrade all deps in range
Summary:
Another attempt of D17736468. This time all the breaking
deps should have been found and fixed by greenkeeper.

Reviewed By: jknoxville

Differential Revision: D18059567

fbshipit-source-id: c7f1225af6d7d2842f0a1488637f52651b341598
2019-10-23 05:51:56 -07:00
Michel Weststrate
40bc957b21 Show uncatched errors to developers
Summary: To make (accidental) errors more visible to developers of Flipper, all uncaught and FBLogger logged errors will be shown in the UI and prefixed with `[DEV]`. This is only done in non-production builds

Reviewed By: jknoxville

Differential Revision: D18061174

fbshipit-source-id: 9dab0e8d34396b0cb421a4d4e6fc14c81447d190
2019-10-23 04:16:15 -07:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Pritesh Nandgaonkar
920d4eaa1d Migrate Mobile Config plugin to tsx
Summary: This diff migrates the Mobile config plugin to typescript. In the later diffs, I will refactor the logic of the plugin to use persisted state as it can then be used to export the data, which is required for the litho support form.

Reviewed By: jknoxville

Differential Revision: D17628276

fbshipit-source-id: b48d4fb346b582408774ef08ffbead23adc7aaac
2019-09-30 07:20:58 -07:00
Pascal Hartig
e6d8844ceb Potential fix for console proxying
Summary: My hypothesis is that on hot reloads / `Ctrl+R`s calls to `this.log` from within the proxy would call the proxy itself. So the only truly relevant change here should be the `.bind(this)` removal. But I'm still not 100% sure that this was the reason for the stack overflow error. Let's keep an eye on this.

Reviewed By: jknoxville

Differential Revision: D17664509

fbshipit-source-id: c9e1c5fe32048b04ef0585f7162bd00ad5ccf18a
2019-09-30 06:32:34 -07:00
Daniel Büchele
2c66e3d4d0 install dependencies
Summary:
In the previous implementation plugins were downloaded from npm, but dependencies weren't. This diff uses the `live-plugin-manager` which does mostly what we want. It install a package from NPM with all its dependencies.
live-plugin-manager puts the plugin and its dependencies in the same folder. We expect the plugins to be in `node_modules`. For this reason, we are installing the plugin into `$pluginName/node_modules` and move the plugin after the installation out of the `node_modules` folder.

* Fixed plugin loading path for thirdparty plugins.
* Disabled hot reloading for plugins in the flipper folder to prevent reloads when moving around files and installing dependencies here.
* an empty `.watchmanconfig` is created, because metro requires it
* tsx files are added to the list of supported extensions for metro

Reviewed By: passy

Differential Revision: D17570413

fbshipit-source-id: ecbedc60841b36188fec9c83da41ef1f27e5e155
2019-09-26 07:57:54 -07:00
Daniel Büchele
f3326f8874 install/remove
Summary: Installing/removing plugins in/from `~/.flipper/thirdparty`.

Reviewed By: jknoxville

Differential Revision: D17394822

fbshipit-source-id: b62f62fa2415403e4377fba445e77534be87350d
2019-09-17 06:21:29 -07:00
Daniel Büchele
e33f72bb21 use adbkit instead of adbkit-fb
Summary: Finally we are able to switch back from our adbkit-fb fork to the original `adbkit`. Replacing all imports

Reviewed By: jknoxville

Differential Revision: D17343236

fbshipit-source-id: e6dd328f1a956544e8be2ab768aa270972463c6b
2019-09-13 05:28:31 -07:00
Daniel Büchele
4e7cf077b8 adbkit typing
Summary: Adding proper types for adbkit (extracted from their documentation)

Reviewed By: passy

Differential Revision: D17342184

fbshipit-source-id: da0fc0264961ca3a0fa775ab5165d20872042eb8
2019-09-13 05:28:30 -07:00
Pascal Hartig
cbbe32b9b9 Remove FlowFixMe's from TypeScript
Summary: This diff was a joy to draft.

Reviewed By: jknoxville

Differential Revision: D17344676

fbshipit-source-id: 0694d0393fa243edef61408ecfee92912fbbfa32
2019-09-12 10:20:08 -07:00
Daniel Büchele
ac120aa59c [strict[ ScreenCaptureButton
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17282357

fbshipit-source-id: 6ddd912978faa30195f59971f19d29d3ea79342b
2019-09-11 03:04:52 -07:00
Pritesh Nandgaonkar
263a738972 Strictify adbClient
Summary: As per title

Reviewed By: jknoxville

Differential Revision: D17284770

fbshipit-source-id: 85bc6b2b19b38f409b7eb0fda6fb94655a05c0d9
2019-09-10 10:36:15 -07:00
Pascal Hartig
4f6bae7cbf Make AndroidDevice strict
Summary:
Relies heavily on types (not) defined in other modules,
so right now it's mostly sprinkling more `any`s in.

My type declaration is based on `dts-gen` output and some
manual fixes. This is the same level as the old flow-typed
definition we had.

Reviewed By: jknoxville

Differential Revision: D17282739

fbshipit-source-id: 0e5015d3b61044615a03c50fefade908041310a8
2019-09-10 10:33:24 -07:00
Pascal Hartig
80f26eaa82 Make IOSDevice strict
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17260434

fbshipit-source-id: 7f1c28ed1cb7fc0127a01957767f4430cf770bf2
2019-09-10 05:43:25 -07:00
Viktor Patrushev
f3691bec7b Converted QPL plugin to TypeScript
Summary: Converted QPL plugin to TypeScript

Reviewed By: danielbuechele

Differential Revision: D17184095

fbshipit-source-id: 2a841bd8bc746cab70e6a03b0ccc8ffbdbda43c6
2019-09-10 04:12:26 -07:00
Pascal Hartig
71bb121ab8 Make dispatcher/plugins strict
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17258265

fbshipit-source-id: 875d434120422c782074d4c345f765684533e399
2019-09-09 10:24:44 -07:00
Ivelin Rachev
9ebf5346df Convert Flipper plugin "mobileboost" to TypeScript
Summary: Bugfix for Tab.tsx + implicitly typed react vizualized

Reviewed By: danielbuechele

Differential Revision: D17205342

fbshipit-source-id: 48d29c583f0790af46f3d9c8d0280015b58d56aa
2019-09-09 03:51:22 -07:00
Chaiwat Ekkaewnumchai
5b883351c4 data-inspector/utils.tsx
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17180421

fbshipit-source-id: 1264f402d1b5071617462179c80e6c951e513f0e
2019-09-05 03:19:48 -07:00
Chaiwat Ekkaewnumchai
705ba8eaa8 Convert Flipper plugin "Network" to TypeScript
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17155509

fbshipit-source-id: 45ae3e2de8cd7b3cdf7271905ef7c318d4289391
2019-09-05 02:51:40 -07:00
Ivelin Rachev
f4fc96756a Convert Flipper plugin "DeviceCPU" to TypeScript
Summary: Migrate CPU plugin to use TypeScript

Reviewed By: danielbuechele

Differential Revision: D17072709

fbshipit-source-id: d9acf172af08d764216e7b79b79994199dc83f5c
2019-09-02 11:46:21 -07:00
Daniel Büchele
5868946818 certificate provider
Summary: _typescript_

Reviewed By: passy

Differential Revision: D17096517

fbshipit-source-id: a6e69e8b9a82fe76bb1de51a3a93182f35f40b3f
2019-08-28 20:34:59 -07:00
Daniel Büchele
853d80f182 headless
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16962733

fbshipit-source-id: 6583c5a4471b12f91895f6449ed9c510265a63e2
2019-08-23 09:33:56 -07:00
Daniel Büchele
4c4169063d table
Summary: _typescript_

Reviewed By: priteshrnandgaonkar

Differential Revision: D16807180

fbshipit-source-id: dcba794351eee69c0574dc224cf7bd2732bea447
2019-08-20 05:45:48 -07:00
Daniel Büchele
d0da0d66a5 main folder
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16762117

fbshipit-source-id: b6ee32e0bb3fc686fc69cfccab703e2ef4989571
2019-08-15 03:33:06 -07:00
Pascal Hartig
0f270c9f48 Migrate packageMetadata
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16782045

fbshipit-source-id: cfbabc036eb707f76a375f451ccc831b25c6d462
2019-08-14 04:43:51 -07:00
Pascal Hartig
fcf99fda4b Migrate is{Headless,Production}
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16711115

fbshipit-source-id: 174e1d3057182c35a6e3493612ddcb3d6ba1ee54
2019-08-12 03:53:14 -07:00
Pascal Hartig
e56d3a4c6d Migrate user
Summary: Migrate user and introduce a global declarations file.

Reviewed By: danielbuechele

Differential Revision: D16690480

fbshipit-source-id: be4e5218715dcae4b403b24cdbc2f3e89728dd59
2019-08-09 10:47:12 -07:00
Daniel Büchele
5f53087c7e client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript

Reviewed By: passy

Differential Revision: D16687855

fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
2019-08-08 11:00:38 -07:00