Commit Graph

41 Commits

Author SHA1 Message Date
Pascal Hartig
08e74e617b Polyfill fetch() for tests
Summary: Per title. Required as Scribe is now being used for device tests.

Reviewed By: jknoxville, danielbuechele

Differential Revision: D13971892

fbshipit-source-id: 2df36d44d4e45a579cc9cca0d4cad9105ba8a383
2019-02-06 16:33:24 -08:00
Daniel Büchele
e78bd57514 build headless
Summary:
- create a zip-file when building the headless version of Flipper
- restore pkg cache in Sandcastle from pantri
- run build script in sandcastle.

Changes need to go together with D13942919

Reviewed By: passy

Differential Revision: D13942701

fbshipit-source-id: caac7d6cda99fec2a6836c652957ff609a0bf8bb
2019-02-05 11:35:52 -08:00
Daniel Büchele
d512c97cab package bundle
Summary:
Building binaries for the headless version of Flipper. These binaries include node, so they can be run independent on any system.

allow-large-files

Reviewed By: passy

Differential Revision: D13843677

fbshipit-source-id: c053177328ddfcba11f9a293951ebe4db4d84034
2019-02-04 07:29:13 -08:00
Pascal Hartig
ce80e03e8f Add expand-tilde package
Summary:
Just splitting the diff adding the dep from using it
because this is always quite noisy.

Reviewed By: jknoxville

Differential Revision: D13940957

fbshipit-source-id: b31a953a7ebdce9a6611c47ee007c051cdcac147
2019-02-04 04:42:18 -08:00
Pascal Hartig
09a93cd9e6 Upgrading flow and fixing lint errors
Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13900794

fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
2019-02-01 06:51:01 -08:00
Pascal Hartig
1b9c32b103 Upgrade to ESLint 5
Summary:
Wanted to do that for a while, but the previous eslint error
blocked me. Continues running with the same level or warnings.

Reviewed By: jknoxville

Differential Revision: D13818478

fbshipit-source-id: ac12888dd4177316020c947925d4ff9d64784140
2019-01-28 04:51:06 -08:00
Daniel Büchele
7ac6a09af1 build headless version
Summary:
* Adds `build-headless.js` to bundle the app using metro
* the build script replaces the prelude code added by metro with our own to make it work in node. Metro will add an API to add custom prelude code in the next version.
* Pins down metro's dependency of `temp` to `v0.9.0` (instead of `0.8.3`) to be compatible with node 10. (This will be fixed in a metro upgrade)

Reviewed By: passy

Differential Revision: D13786574

fbshipit-source-id: bddb3542c370c068d90a90c4b59337f995e4fa3f
2019-01-25 12:19:07 -08:00
Daniel Büchele
dab50ec5c4 add headless entry point
Summary:
Adding `headless/index.js` This is the entry point to the headless version of Flipper.

This creates a redux store, and initializes the dispatchers. As all business logic (adb connections, etc.) are managed by dispatchers, this spins up a working version of Flipper, listening on our ports, allowing connections to devices.

For APIs not available in node.js, we are adding polyfills. `WebSocket` is used by redux-devtools, `fetch` is used in a couple of places throughout the application. These polyfills are added to the global namespace, so the app can run the same as in the browser.

Reviewed By: passy

Differential Revision: D13786573

fbshipit-source-id: 685f67e1c0d2948de7c43b8a1e2dc10dc69aa743
2019-01-25 12:19:07 -08:00
Pascal Hartig
7471dc6481 Fix emulator launching on Linux
Summary:
The Android SDK installation on Linux is really dumb. The emulator binary
is dynamically linked and ships with some `.so`s that need to be either in `LD_LIBRARY_PATH` or `$CWD`.
For some reason, there's no script, so you have to manually `cd` into the directory in order to
run it. ¯\_(ツ)_/¯

Reviewed By: jknoxville

Differential Revision: D13589660

fbshipit-source-id: e3bdd7468108f1fb1e52f23ae45e21cacc5480f9
2019-01-07 07:47:17 -08:00
Pritesh Nandgaonkar
470c770e97 Back out "[flipper] Explicitly start adb server"
Summary:
Original commit changeset: b1eae542aaa6

 This D13487864 has broken `adb start-server` command for the production builds, thus this diff backs out the changes done by that diff.

Reviewed By: danielbuechele

Differential Revision: D13532003

fbshipit-source-id: 1d169dcdab11a52f075187803219915f444952d6
2018-12-21 07:24:27 -08:00
Daniel Büchele
c9b982b182 revamp UI + show oncall/group
Summary:
Redesigns the bug reporting dialog:
- show information from `package.json`'s `bugs` field, where we can link to support groups or name oncalls.
- adds show/hide animation
- uses new button style

Reviewed By: jknoxville

Differential Revision: D13417287

fbshipit-source-id: 2948794e9b1f42bbd895981d5e4b0578a9b8ee2e
2018-12-18 09:34:52 -08:00
John Knox
cc5fba6975 Explicitly start adb server
Summary: We were relying on adbkit to do this, implicitly by calling listDevices(). However, this doesn't appear to be reliable, with retries, it usually succeeds, but sometimes still doesn't. I'm aiming to avoid all this entirely by just starting it directly using adb itself, which I expect to be much more reliable.

Reviewed By: danielbuechele

Differential Revision: D13487864

fbshipit-source-id: b1eae542aaa6ecb2b74b575a3582934093ccd588
2018-12-17 11:08:29 -08:00
Daniel Büchele
64b5e66168 upgrade react-window@1.3.1
Summary: as per title. The updated doesn't have any breaking changes. Only improvements and bugfixes.

Reviewed By: jknoxville

Differential Revision: D13376391

fbshipit-source-id: 46f2462cec87600f06fb793a42092f054489c397
2018-12-11 07:57:58 -08:00
John Knox
ca1f0202d7 Add retries around android device watching
Summary: Retry up to 5 times with exponential backoff.

Reviewed By: passy

Differential Revision: D13138244

fbshipit-source-id: 94c68b87aa281cfc3239b0bb8bdd75a2e0d7edc7
2018-11-22 06:39:58 -08:00
Panagiotis Vekris
e380fa7a08 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: gabelevi, dsainati1

Differential Revision: D13105210

fbshipit-source-id: 462af926206a10618a725531f2e62da9f3291fc0
2018-11-19 12:14:51 -08:00
Panagiotis Vekris
b2b27b774e Back out "Flow v0.86.0 in xplat/sonar"
Summary: Original commit changeset: f0122c8c6d60

Reviewed By: avielg

Differential Revision: D13083312

fbshipit-source-id: 4b77fda5221feff5c721bb8a509b1350d60046d5
2018-11-15 08:24:00 -08:00
Panagiotis Vekris
6362188563 Flow v0.86.0 in xplat/sonar
Summary: allow-large-files

Reviewed By: zertosh

Differential Revision: D13067587

fbshipit-source-id: f0122c8c6d602750289121d2ab2fdb09cbb033bc
2018-11-14 15:39:25 -08:00
Pascal Hartig
533c1ab59b Upgrade node-fs-extra
Summary:
Changes are mostly bug fixes, that shouldn't affect us. From the change log:

7.0.1 / 2018-11-07
------------------

- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](https://github.com/jprichardson/node-fs-extra/pull/646))
- Document `mode` option for `ensureDir*()` ([#587](https://github.com/jprichardson/node-fs-extra/pull/587))
- Don't include documentation files in npm package tarball ([#642](https://github.com/jprichardson/node-fs-extra/issues/642), [#643](https://github.com/jprichardson/node-fs-extra/pull/643))

7.0.0 / 2018-07-16
------------------

- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](https://github.com/jprichardson/node-fs-extra/pull/582))
- Fix bug with copying write-protected directories ([#600](https://github.com/jprichardson/node-fs-extra/pull/600))
- Universalify `fs.lchmod()` ([#596](https://github.com/jprichardson/node-fs-extra/pull/596))
- Add `engines` field to `package.json` ([#580](https://github.com/jprichardson/node-fs-extra/pull/580))

6.0.1 / 2018-05-09
------------------

- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](https://github.com/jprichardson/node-fs-extra/pull/578))

6.0.0 / 2018-05-01
------------------

- Drop support for Node.js versions 4, 5, & 7 ([#564](https://github.com/jprichardson/node-fs-extra/pull/564))
- Rewrite `move` to use `fs.rename` where possible ([#549](https://github.com/jprichardson/node-fs-extra/pull/549))
- Don't convert relative paths to absolute paths for `filter` ([#554](https://github.com/jprichardson/node-fs-extra/pull/554))
- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](https://github.com/jprichardson/node-fs-extra/pull/563))
- Fix subdirectory detection for `copy*` & `move*` ([#541](https://github.com/jprichardson/node-fs-extra/pull/541))
- Handle case-insensitive paths correctly in `copy*` ([#568](https://github.com/jprichardson/node-fs-extra/pull/568))

Reviewed By: jknoxville

Differential Revision: D13023753

fbshipit-source-id: 1ecc6f40be4c8146f92dd29ede846b5ab56765ea
2018-11-14 04:09:15 -08:00
Pascal Hartig
d159e27224 Remove ws dependency
Summary: Is it too early for spring cleaning? We don't use websockets anymore, do we? Couldn't find any imports or `require()`s.

Reviewed By: jknoxville

Differential Revision: D12997868

fbshipit-source-id: c87c67ec98b925c4209b97bf00e91fce67215465
2018-11-09 07:44:00 -08:00
Pascal Hartig
be3fae85df Upgrade to rsocket 0.0.9
Summary: Let's stay up to date and get the latest improvements.

Reviewed By: jknoxville

Differential Revision: D12997456

fbshipit-source-id: 1d543aec032052d1115d627f0103e7b8f721d74c
2018-11-09 06:31:14 -08:00
Pascal Hartig
f7063448e2 Upgrade electron jest runner
Summary: `v0.1.0` was released recently.

Reviewed By: jknoxville

Differential Revision: D12922054

fbshipit-source-id: 4f5dd42ca9e897d21dee4cc03e37d77d1d23972b
2018-11-05 10:50:35 -08:00
Pascal Hartig
0a6dbfcf3e Bump flow version
Reviewed By: priteshrnandgaonkar

Differential Revision: D12839991

fbshipit-source-id: 1dcca0a0bc682bf24430c7313d4af14b87cfc44d
2018-10-30 17:04:50 -07:00
Daniel Büchele
38268fe4c9 whitelist persisted reducers
Summary:
We only want to persist certain reducers that are whitelisted.

Currently some parts of the `connections` reducer and everything from the other reducers was persisted. This changes the behavior to only persist what is explicitly whitelisted and not the other reducers.

These pars of the store are whitelisted:
- `connections.userPreferredDevice`
- `connections.userPreferredPlugin`
- `connections.userPreferredApp`

Reviewed By: jknoxville

Differential Revision: D10401403

fbshipit-source-id: e4aa4f2b2f8f6229b02dcf46798965fa1ae74df6
2018-10-18 02:47:53 -07:00
Daniel Büchele
a455520ecb adding jest test setup
Summary:
Adds a test runner for jest test and adds three simple test cases:
- render the app
- start a server
- client connecting to the app

Test can be run using `yarn test`.

To make the test runner work, some changes needed to be made:
- remove the export of `init()` from `'flipper'`, because it was a cyclic dependency
- updating Button.js to the new ref-API

Reviewed By: jknoxville

Differential Revision: D10027078

fbshipit-source-id: 49107b0dd4dec666b92ecd841422fe7e6b3a7756
2018-09-28 06:42:08 -07:00
Daniel Büchele
af1ff7f039 electron 3 upgrade
Summary: Electron cache updated in D10051121

Reviewed By: passy

Differential Revision: D10051240

fbshipit-source-id: 858137397984d1d0260a4bff3d65f59d47f2931d
2018-09-28 06:42:08 -07:00
Daniel Büchele
71458b97b3 fixing plugin imports
Summary:
Plugins need to be self-contained. The can not require any dependency from Flipper's main app. This was a soft requirement before, but with the new version of metro, we now make this a hard requirement.

This speeds up plugin compile times, because only the files in the plugin's folder are watched and not all of Flipper's files. Moreover, this ensures "plugins" are real plugins and can be added and removed and are not mixed with the apps core.

Reviewed By: passy

Differential Revision: D9940735

fbshipit-source-id: 47e120429fc3c4c985731478ffa35c3359ff78f9
2018-09-20 04:27:48 -07:00
Daniel Büchele
7825d9247c optional chaining
Summary: Adds support for optional chaining to the codebase, enables flow and eslint support for it.

Reviewed By: passy

Differential Revision: D9940732

fbshipit-source-id: 730aa76653bd22a8fa17a73e72b3a7329de0226c
2018-09-20 04:27:48 -07:00
Daniel Büchele
73e5824e35 ManagedTable debouncing
Summary:
Removes the fix introduced in D9570518 and upgrading to `react-window@1.1.2` which fixes the problem in the library.

Also finetuning debounce times.

Reviewed By: passy

Differential Revision: D9582591

fbshipit-source-id: 92b008d29f96ce0f11f5cfb5d9e92175ae536ee2
2018-08-30 11:30:36 -07:00
Daniel Büchele
4151c73409 add emotion �
Summary: adding `react-emotion`

Reviewed By: jknoxville

Differential Revision: D9479892

fbshipit-source-id: 0813c887f01ba0f5cd93208e4fe285d5a9dcd6b2
2018-08-23 09:42:17 -07:00
Daniel Büchele
7bdb21e055 adding table debouncing
Summary:
When changing the props of a table often, this might results in a lot of unnecessary rerenders. This could be mostly seen in the analytics plugin, which is sending a lot of messages in a short time.

The update of the table component is now debounced to only re-render every 150ms. This also affects searching and filtering and makes typing in the search input smoother.

Reviewed By: passy

Differential Revision: D9447722

fbshipit-source-id: 00e092e4e047e9c40e5a1ec2789644858acc18dd
2018-08-23 04:57:28 -07:00
Daniel Büchele
1891e2c869 moving tables to react-window
Summary:
Tables were using a custom virtualization, which wasn't as performant as other solutions out there. In this diff, the table component is reworked for performance.
- removes `Table` component, because it was never used standalone, `ManagedTable` is what all plugins used
- uses `react-window` for `ManagedTable`
- reworks table highlighting and arrow-navigation to work with the new virtualization
- moves actual filtering out of `ManagedTable` into `Searchable` component for a better separation of concerns.

Reviewed By: jknoxville

Differential Revision: D9447721

fbshipit-source-id: 15eb2eb55eed9f49a0cb1ccfb2d748b3672fa898
2018-08-23 04:57:28 -07:00
Daniel Büchele
69eaedcbb0 upgrade to electron 3
Summary: upgrading to the latest electron version

Reviewed By: passy

Differential Revision: D9124759

fbshipit-source-id: 7d79f22f3b6dec6179eec868b8a6f20da1259401
2018-08-02 03:57:52 -07:00
Benjamin Pankow
4818d87c3f Add hprof analysis to Memory Tools plugin
Summary: Add needle dependency.

Reviewed By: danielbuechele

Differential Revision: D8665740

fbshipit-source-id: 552bbc3d346560d5d9981a666b8fb527a27d72d3
2018-07-31 14:19:15 -07:00
Daniel Büchele
37425e7ae8 persist state over reload
Summary: The selected device, app and plugin are not persisted over a reload using `redux-persist`.

Reviewed By: jknoxville

Differential Revision: D8836481

fbshipit-source-id: 3ace1a950a200255d5daf77791d706ede0ff2138
2018-07-31 07:58:33 -07:00
Aaron Brady
a223edafaa Get Sonar Running on Windows
Summary: Small tweaks so that Sonar can be started easily on windows.

Reviewed By: danielbuechele

Differential Revision: D8769592

fbshipit-source-id: 084dd50e5600a7e2e9c5544e3e79a18614933fdc
2018-07-11 08:18:25 -07:00
Daniel Büchele
9f95698492 disable auto publish
Summary: electro-builder automatically publishes when it detects builds on TravisCI. This disables this behaviour, as we want to manually publish releases.

Reviewed By: jknoxville

Differential Revision: D8783066

fbshipit-source-id: d8723c87b879b3ef7ee02585997a13cb55095e65
2018-07-11 08:03:57 -07:00
Daniel Büchele
dfddcc483e electron-update
Summary: Update to electron 2.0.4

Reviewed By: priteshrnandgaonkar

Differential Revision: D8767709

fbshipit-source-id: e7ddb626c59e2797ef68bb61e0938dcfc05e1980
2018-07-10 02:33:52 -07:00
Peter van der Zee
7246e8404b Upgrade Prettier to 1.13.6 on fbsource
Reviewed By: zertosh

Differential Revision: D8638504

fbshipit-source-id: c6991b2e884e14868ddc1d9047a78191219d673f
2018-06-27 03:33:24 -07:00
Daniel Büchele
50490b9435 Linux and Windows builds
Summary:
Adds windows and linux builds to Sandcastle

allow-large-files

Reviewed By: jknoxville

Differential Revision: D8379581

fbshipit-source-id: 94c80fc91c69f43b7dc0c7eb8b2ee5ace4daf888
2018-06-13 09:04:04 -07:00
Daniel Buchele
f7d487dd76 fbshipit-source-id: 2cd940396d650342920b28835f6e672febe6b55c 2018-06-12 03:39:09 -07:00
Daniel Büchele
fbbf8cf16b Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
2018-06-01 11:03:58 +01:00