Commit Graph

201 Commits

Author SHA1 Message Date
John Knox
16457e2adb Add notNull filter with type guard
Summary: You need to use a type guard when narrowing types in a filter.

Reviewed By: danielbuechele

Differential Revision: D17163782

fbshipit-source-id: aa78bdd392653ebf1080a04e62e131b607e5181b
2019-09-04 03:31:47 -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
9970c50daf gylphs
Summary: Adding type declaration for glyphs

Reviewed By: passy

Differential Revision: D17096295

fbshipit-source-id: e8994e0c81c3668fa909479dbaea613ec2b86dc4
2019-08-28 19:50:29 -07:00
Daniel Büchele
ff31ac0b45 fix strict errors
Summary: fixing some errors for strict mode enabled files

Reviewed By: passy

Differential Revision: D16988271

fbshipit-source-id: 09834cad9c2dd8abb987e4f708ae7a30922d90c7
2019-08-28 11:12:22 -07:00
Pascal Hartig
9a63ee9fff Make exportMetrics strict
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17074932

fbshipit-source-id: 1a6a8e81a9d15021dd9b51a0c3a394a2cf349e9c
2019-08-28 03:01:58 -07:00
Pascal Hartig
5c69ad8e8b Make LowPassFilter strict
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D17073163

fbshipit-source-id: 08127d85af317ff701f4d131fd41df095f50f6a4
2019-08-28 03:01:58 -07:00
Pascal Hartig
b6df5ecb83 Make onRegisterDevice strict
Summary: Needed relaxing some types in pluginUtils, but it's actually fine.

Reviewed By: danielbuechele

Differential Revision: D17072974

fbshipit-source-id: c3d3923ed70f71964aa10cf35f1b9ea2f30a8fa1
2019-08-28 03:01:57 -07:00
Pascal Hartig
5cac2edc37 Make processConfig pass strict mode
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17072572

fbshipit-source-id: fed0d93e7a4cfe04f339370dbace7181bec73ca1
2019-08-28 03:01:57 -07:00
Daniel Büchele
0ec48d4fc9 index
Summary:
This converts the index file to TypeScript which is used as an export for all plugins. Alongside, I had to fix a couple of errors in various files to make sure everything works correctly.

For plugins using flow, we define an interface which uses the type definition for FlipperPlugin and types all UI components as `any`.

Reviewed By: passy

Differential Revision: D16936890

fbshipit-source-id: dacd9a63a82b9f0bbb530b06072186874cba7b6f
2019-08-22 10:02:27 -07:00
Benjamin Elo
7def9bb681 Moved screenshot functions into Device's class.
Summary:
I have moved the screenshot functions from ScreenCaptureButtons to the Device classes. I have slightly rewritten them so that they return a Promise which resolves to a Buffer. The Buffer can then be saved to a file or converted to a data Blob.

I have removed streaming and simply loaded the image into memory. Once the image is in memory it can be manipulated for various tasks i.e. written to a file, or displayed in the app.

iOS screenshots had to be rewritten. I now save the image to a temp folder, load it into the apps memory, and then remove the temp image.

Reviewed By: jknoxville

Differential Revision: D16939901

fbshipit-source-id: 3e39a5aeda8d48829ac5a8ff912a98f110341c07
2019-08-22 05:28:33 -07:00
Pascal Hartig
263b47f82f Add x-platform update indicator
Summary: Use the new multi-platform update endpoint to indicate when new updates are available for Linux or Windows.

Reviewed By: danielbuechele

Differential Revision: D16939899

fbshipit-source-id: 11c1dc0d4fd19362a1163c613a7b7116c5edf996
2019-08-22 02:32:56 -07:00
Matthew Brotman
3730167b77 Add macOS as an OS option to CertificateProvider
Reviewed By: danielbuechele

Differential Revision: D16833334

fbshipit-source-id: 74a5e39814ff21d4be26fe2a60b5d201b9cec16b
2019-08-19 14:31:57 -07:00
Pascal Hartig
03d4a7d750 Migrate fbEmployee
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16827958

fbshipit-source-id: f2ab616b2682ede7da6c1e401fcc6d0644a1b960
2019-08-15 09:43:01 -07:00
John Knox
ce3f69c249 Convert serialization.js to TS
Summary:
Convert serialization to typescript.

I tried to type the deserialize function but don't know enough about the expected format to be able to tell what the types should be.

Reviewed By: passy

Differential Revision: D16785945

fbshipit-source-id: 45de7ee1c8972314a52abcf20d428ba44f031a00
2019-08-15 07:32:53 -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
6a0da24eb2 Migrate utils/index
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16805609

fbshipit-source-id: 57eda17f45fc2dfe94a0d34948be5b673591a8ee
2019-08-14 10:06:03 -07:00
Chaiwat Ekkaewnumchai
b9e0aae1e4 Add Warning for FB Employee
Summary: Add warning dialog when FB employee uses OSS Flipper

Reviewed By: passy, danielbuechele

Differential Revision: D16783408

fbshipit-source-id: 3e7e533c5b96d4204fc38570a4e65c23ac0aaa25
2019-08-14 06:14:16 -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
610a926611 Migrate openssl-wrapper-with-promises
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16781986

fbshipit-source-id: 1d07e3d71b7fabd4e0559007846b2a0c4a10a45e
2019-08-14 04:43:51 -07:00
Pascal Hartig
573655c2f6 Migrate onRegisterDevice
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16764866

fbshipit-source-id: bdf532dea1c3019f0cb7728b3a0a07a3602cf04b
2019-08-14 04:43:51 -07:00
Pascal Hartig
2a34125413 Migrate metrics
Summary:
Had to mess with the tagged union we had, to distinguish based on
a string rather a bool which is a bit rubbish.

Reviewed By: danielbuechele

Differential Revision: D16764797

fbshipit-source-id: c33536f17b0705ca40abef8448802f9961c4c114
2019-08-14 04:43:50 -07:00
Timur Valiev
46e0abecdf api + plugins examples
Summary:
Initial commit for Flipper API for JS apps:
1) Plugin, Connection, Client
2) a bridge to work with WebView proxy app
3) examples of ported plugins: AnalyticsLogging and Fury

Reviewed By: danielbuechele

Differential Revision: D16753405

fbshipit-source-id: cdd4b863db236b2043f09833aed130035f6738de
2019-08-14 03:29:55 -07:00
Pascal Hartig
d812b128ba Migrate LowPassFilter
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16764120

fbshipit-source-id: 03185c74f3a1e753089ea550d3f193027aae9424
2019-08-13 08:26:55 -07:00
Pascal Hartig
5c6ec866d6 Migrate listDevices
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16764089

fbshipit-source-id: 03d980c354f8c03d7091fe01f82655e61c5854ff
2019-08-13 08:26:55 -07:00
Pascal Hartig
93467193ad Migrate InteractionTracker
Summary: N.B. There was one duplicate definition which TS rightfully complained about.

Reviewed By: danielbuechele

Differential Revision: D16764036

fbshipit-source-id: 498e4703c2363b19a3bdfa44527bde5000034095
2019-08-13 08:26:54 -07:00
Pascal Hartig
e7cf4380bc Migrate info
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16763995

fbshipit-source-id: 635e029ea33ab645d0e4d52640fae49eb254ac1c
2019-08-13 08:26:54 -07:00
Pascal Hartig
1b99e8b830 Migrate Idler
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16763946

fbshipit-source-id: 96eb0cdaca8a6cd731a6d16f3bea02471c691c01
2019-08-13 08:26:54 -07:00
Pritesh Nandgaonkar
3401d1ef3c Do not log the cancelled flipper export as a failure
Summary: Currently cancelling the flipper export logs the event as a failure. This diff introduces one more event log type called cancelled.

Reviewed By: jknoxville

Differential Revision: D16711110

fbshipit-source-id: 308b7e64974610dbb17bd14b2425f6d939c99313
2019-08-12 08:10:16 -07:00
Pascal Hartig
6c7aeef7ed Migrate exportMetrics
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16712087

fbshipit-source-id: 63dc45a26eb8112aef2b1bfa0d67bf57aa9ec72a
2019-08-12 03:53:16 -07:00
Pascal Hartig
99ca6aa7e8 Migrate exportData
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16711940

fbshipit-source-id: 2e0e5cd0440fe1cdb7bd29af94e22c7f6b9137f8
2019-08-12 03:53:15 -07:00
Pascal Hartig
8c05c73c5f Migrate launcher
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16711748

fbshipit-source-id: e874b5b6197e64ab7db1d8daecf42a4b52b8c2a8
2019-08-12 03:53:15 -07:00
Pascal Hartig
85aeaa0e47 Migrate geometry/snap
Summary: Seemed quite related.

Reviewed By: jknoxville

Differential Revision: D16711573

fbshipit-source-id: 3c6b355a5ed6fae5cb5bac824b57adcc2b28024a
2019-08-12 03:53:15 -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
712669e800 Migrate electronCrashReporter
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16711091

fbshipit-source-id: e77e2d209998b847e467d353cccb64ccaab2718b
2019-08-12 03:53:14 -07:00
John Knox
ce34c20506 Convert utils/pluginUtils to TS
Reviewed By: danielbuechele

Differential Revision: D16710689

fbshipit-source-id: 8da309810f633af27759286521c784ac665531b9
2019-08-12 03:11:16 -07:00
John Knox
882d7e1a39 Convert utils/processConfig to TS
Reviewed By: danielbuechele

Differential Revision: D16710602

fbshipit-source-id: 3dbccdb0aedd3d5415487d690fb943aafdafa0f0
2019-08-12 03:11:16 -07:00
John Knox
fda506086f Convert utils/promiseTimeout to TS
Reviewed By: danielbuechele

Differential Revision: D16710520

fbshipit-source-id: 146ec33537de038d59e6f13647ee0de7b9edbcb8
2019-08-12 03:11:16 -07:00
John Knox
aab92446b4 Convert utils/reduxDevToolsConfig to TS
Reviewed By: danielbuechele

Differential Revision: D16710475

fbshipit-source-id: 8b2a9e9592354702f6ea5bfb777635fff4e0220b
2019-08-12 03:11:16 -07:00
John Knox
9b6f3684cb Convert utils/snap to TS
Reviewed By: danielbuechele

Differential Revision: D16710422

fbshipit-source-id: 2f907904a7df24f6972952d0c7a63d7e6506e2ff
2019-08-12 03:11:15 -07:00
John Knox
a522afd64f Convert utils/textContent.tsx to TS
Summary: Convert utils/textContent.tsx to TS

Reviewed By: danielbuechele

Differential Revision: D16710386

fbshipit-source-id: 225d66965d915fc1c36e382e3c06c7b2dad5d973
2019-08-12 03:11:15 -07:00
Pascal Hartig
fd9b83eac3 rm LRUCache
Summary: Appears to be unused.

Reviewed By: danielbuechele

Differential Revision: D16710463

fbshipit-source-id: 00ba195689ffc96700ae623fd02fb806b9730272
2019-08-09 10:47:15 -07:00
Pascal Hartig
7bb241bf63 Migrate androidContainerUtility*
Summary: Both util and internals.

Reviewed By: danielbuechele

Differential Revision: D16710453

fbshipit-source-id: e98972920084ce4d6bf083a48a442ab44c8e5f3e
2019-08-09 10:47:15 -07:00
Pascal Hartig
beba2799d2 Migrate errors
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16710217

fbshipit-source-id: a6596f84d6002f1972ae17170f9decaed853f991
2019-08-09 10:47:15 -07:00
Pascal Hartig
9e423e4bef Migrate environmentVariables
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16709690

fbshipit-source-id: efa0431ab1ab0e2fc81ae4a9155d2f0a3ab9e4c5
2019-08-09 10:47:14 -07:00
Pascal Hartig
8135727f5a Migrate crashReporterUtility
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16709553

fbshipit-source-id: 90d7d9bda703e650b5922f5c609bb884feaebf40
2019-08-09 10:47:14 -07:00
Pascal Hartig
b60a3fcfe9 Migrate CertificateProvider
Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D16709300

fbshipit-source-id: ced6d2a40607f2eefe121463f47056e8e0e3b806
2019-08-09 10:47:14 -07:00
Pascal Hartig
b292ecec71 Migrate argvUtils
Summary:
_typescript_

Quite happy that the stupid check for `remote` can finally go away.

Reviewed By: jknoxville

Differential Revision: D16709217

fbshipit-source-id: 94bc035d2a7bbc3131e35febd48723760841f6b4
2019-08-09 10:47:13 -07:00
Pascal Hartig
c191514d68 Migrate adbConfig
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D16708956

fbshipit-source-id: 040421bfcd68821f3567b47104f1c0c678015f3f
2019-08-09 10:47:13 -07:00
Pascal Hartig
cf7e692620 Migrate adbClient
Summary:
Per title. Eliminated an attempt to catch an error
which never actually worked, but flow couldn't work out
how `promisify` works.

Reviewed By: danielbuechele

Differential Revision: D16708932

fbshipit-source-id: c1e98afd671ffd9bd8be25222366870ddf849ce3
2019-08-09 10:47:13 -07:00
Pascal Hartig
b42abcbb59 Migrate logger
Summary:
Removed defunct log filtering functionality, but we probably want to rebuild that.
Funny that tsc caught this as non functioning but Flow happily accepted it.

Reviewed By: danielbuechele

Differential Revision: D16690959

fbshipit-source-id: b079dd6faba83ca0c443d00cbb69c8ff95c4fa69
2019-08-09 10:47:12 -07:00