Commit Graph

111 Commits

Author SHA1 Message Date
Pascal Hartig
4b60433425 Add warning when config parsing fails
Summary:
This can quite easily happen if you manually edit it and
aren't careful. The least we can do is tell the user about it,
because it be a bit surprising otherwise.

Reviewed By: jknoxville

Differential Revision: D17626760

fbshipit-source-id: 8c7d64b041fa4b97ce2753116800d0e855442dd9
2019-09-27 08:14:53 -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
Pascal Hartig
2cb89bd8d9 Add p-map to static package.json
Summary: Hotfix.

Reviewed By: danielbuechele

Differential Revision: D17528168

fbshipit-source-id: 4743510196c308f28819719098fd92012fe742df
2019-09-23 09:00:02 -07:00
Pritesh Nandgaonkar
84c5067210 Create Support Requests from Flipper
Summary: This diff adds an initial support to prefill the app information and the revision information. This diff also copies the workplace url in the clipboard.

Reviewed By: passy

Differential Revision: D16990925

fbshipit-source-id: 4f354e52de5fea07c2ea36336761d6963c27ef66
2019-09-20 11:39:05 -07:00
Pascal Hartig
2a6462641b Limit concurrency during plugin compilation
Summary:
My MBP just crashed again during startup. I would like to
understand why every plugin compilation appears to start
up a new electron process, but until that's understood
and hopefully fixed, it's probably best to limit the number
of processes we spawn by setting an upper bound here.

N.B. My Linux box doesn't mind this at all.

Reviewed By: jknoxville, danielbuechele

Differential Revision: D17419289

fbshipit-source-id: a11562a21a984059dc35e826eb20d869df218546
2019-09-17 12:21:15 -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
Pascal Hartig
c0cffe1240 Pass on launcherEnabled flag
Summary:
This is a bit embarrassing. It seems like I never wired this up which is
why the update indicator keeps coming up even if the app was started
by the Launcher.

This actually makes sure that we proxy the yargs flag through to
`processConfig`.

Reviewed By: jknoxville

Differential Revision: D17341896

fbshipit-source-id: 73602e2035c26fb0d03e853a4e94065af3986757
2019-09-12 08:12:42 -07:00
Daniel Büchele
bb70b53c7c headless
Summary: _typescript_

Reviewed By: passy

Differential Revision: D17284499

fbshipit-source-id: 7306e36772911044a1d8b36c4a38f79b861eb2e6
2019-09-11 03:04:55 -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
Benjamin Elo
77811c3c1b Fix for Jest tests failing with typescript
Summary: Tests were failing as they were not being transformed correctly. Class properties (proposed syntax) was only partially added for Typescript files. This fixes the issue.

Reviewed By: passy

Differential Revision: D16686613

fbshipit-source-id: 2108cf77eb688bb6825d016960480ea55fcc2620
2019-08-08 02:36:36 -07:00
Pascal Hartig
40a76d5c00 Make .watchmanconfig templates valid JSON
Summary: Otherwise, this causes errors as soon as you add custom plugin paths.

Reviewed By: jknoxville

Differential Revision: D16666507

fbshipit-source-id: 1dca599854ebc48f1f3cb7fe0e01f717648b36d5
2019-08-06 15:17:39 -07:00
Daniel Büchele
80b2929992 babel pipeline
Summary: adding babel transpile pipeline for TypeScript files

Reviewed By: jknoxville

Differential Revision: D16651124

fbshipit-source-id: e9215ba2da467f58005271916b65d6da4f6e36b7
2019-08-06 02:50:06 -07:00
Pascal Hartig
e87a1a44c4 Upgrade deps in static/
Summary: Same as previous diff, but for `static/`.

Reviewed By: danielbuechele

Differential Revision: D16579860

fbshipit-source-id: aa4449ded8734270fb5e1ab400a95768c6a1c09f
2019-08-05 03:52:41 -07:00
Daniel Büchele
16e913a819 local icons
Summary:
Currently icons were always fetched remotely. We used a service worker to prefetch and cache some icons, that were critical to the UI.

In this diff, we are bundling icons at build time, with the app. In utils/icons.js we still specfify the list of icons which should be bundled. These are downloaded as part of the build step and bundled with the app. We are downloading the icons in 1x and 2x (the two most common pixel densities).

Reviewed By: jknoxville

Differential Revision: D16620764

fbshipit-source-id: 965a7793ad1f08aebb292606add00218429cdaf4
2019-08-02 09:00:00 -07:00
Sidd Srinivasan
0c37a93a84 Add path to adb in production env
Summary: Move from adding adb path in tracery plugin to adding flipper as a whole. Se discussion here: D16494684

Reviewed By: jknoxville

Differential Revision: D16542414

fbshipit-source-id: abb2f4989693025a8bfe7d12f4c328870a962204
2019-07-30 07:07:18 -07:00
Arthur Kushka
d2f9697deb Fixed PATH env variable for production bundle
Summary:
In my last plugin for React VR I used spawn heavily to call adb and python2. It worked out well, but after Flipper released, I noticed that all my spawn commands were broken.

I found that Electron start in different way when bundled as production bundle, and because of it, it does not inherit process.env.PATH in a same way as it do this for development mode. (only linux/mac issue)

In this diff I used npm package which detects linux/mac and executes bash command which returns all the env variables from the system. After it, it takes PATH and merge it with process.env.PATH.

Reviewed By: passy

Differential Revision: D16457847

fbshipit-source-id: 60226f2d7977f1dfec49de6e889f3115d8688991
2019-07-24 06:25:40 -07:00
Pascal Hartig
10559a188f Make yarn start twice as fast
Summary:
Compilation is a mixture of I/O and CPU work, so there's some good optimisation potential even on a single thread by running the promises concurrently. The downside is that the output is a bit garbled, but it's quite a bit faster for me.

To test this, I applied this diff so I could just `time yarn start` for an entire run.

```
 diff --git a/xplat/sonar/src/init.js b/xplat/sonar/src/init.js
 --- a/xplat/sonar/src/init.js
+++ b/xplat/sonar/src/init.js
@@ -80,4 +80,5 @@
   dispatcher(store, logger);
   // make init function callable from outside
   window.Flipper.init = init;
+  window.close();
 });
```

## Before

**Cold Start**
```
696.89user 93.21system 4:21.44elapsed 302%CPU (0avgtext+0avgdata 1111448maxresident)k
1416inputs+372824outputs (3major+28155897minor)pagefaults 0swaps
```

**Hot Start**
```
6.87user 1.62system 0:17.32elapsed 49%CPU (0avgtext+0avgdata 249264maxresident)k
216inputs+182912outputs (0major+251426minor)pagefaults 0swaps
```

## After

**Cold Start**

```
736.86user 95.47system 1:53.13elapsed 735%CPU (0avgtext+0avgdata 970616maxresident)k
42864inputs+356776outputs (42major+25299531minor)pagefaults 0swaps
```

**Hot Start**

```
6.85user 1.60system 0:15.93elapsed 53%CPU (0avgtext+0avgdata 269420maxresident)k
2592inputs+197904outputs (0major+260099minor)pagefaults 0swaps
```

## Summary

It's beneficial in both cases, but the wall clock time for cold start goes from *4:21.44* to *1:53.13* for me (mind that this is a single sample). This is a 2.3x speed-up!

Reviewed By: jknoxville

Differential Revision: D16359215

fbshipit-source-id: 62257ec3bdefbf98356f5ac9418c4906f7cb4b1b
2019-07-18 10:44:50 -07:00
dependabot[bot]
0261f17785 Bump lodash from 4.17.5 to 4.17.14 in /static (#493)
Summary:
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.5 to 4.17.14.
<details>
<summary>Commits</summary>

- [`be87d30`](be87d30394) Bump to v4.17.14.
- [`a6fe6b1`](a6fe6b1e17) Rebuild lodash and docs.
- [`e371828`](e37182845f) Bump to v4.17.13.
- [`357e899`](357e899e68) Rebuild lodash and docs.
- [`fd9a062`](fd9a062d57) Bump to v4.17.12.
- [`e77d681`](e77d68121f) Rebuild lodash and docs.
- [`629d186`](629d186579) Update OpenJS references.
- [`2406eac`](2406eac542) Fix minified build.
- [`17a34bc`](17a34bc585) Fix test bootstrap for core build.
- [`53838a3`](53838a38f8) Fix tests in older browsers.
- Additional commits viewable in [compare view](https://github.com/lodash/lodash/compare/4.17.5...4.17.14)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lodash&package-manager=npm_and_yarn&previous-version=4.17.5&new-version=4.17.14)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/493

Reviewed By: jknoxville

Differential Revision: D16323535

Pulled By: passy

fbshipit-source-id: 9511b4050306a872295a7053f465ae46b9c5fa8a
2019-07-18 05:28:46 -07:00
Pascal Hartig
147f120a42 Fix fb-stubs typo
Summary: Per title.

Reviewed By: bnelo12

Differential Revision: D16332419

fbshipit-source-id: cbe3354561ab2251064f76c01ec1660aef59a7bb
2019-07-17 06:52:01 -07:00
Sidd Srinivasan
aff991b313 Render Webview
Summary: When Trace has been uploaded, load it inside a webview in Flipper.

Reviewed By: habond

Differential Revision: D16185763

fbshipit-source-id: 3217211f1d5035fc16d733ef48db44d8f8d9d360
2019-07-16 09:05:11 -07:00
Pascal Hartig
48db46def2 Fix lint
Summary: This one snuck in while rebasing my new rules onto master.

Reviewed By: bnelo12

Differential Revision: D16180472

fbshipit-source-id: b715c218ff1886c1901c7730a6b8dac67beb3968
2019-07-10 12:13:14 -07:00
Pascal Hartig
e831743132 Harden lint rules
Summary: Taking another stab at adding some lint rules to make it harder to shoot yourself in the foot. Hopefully nothing too controversial. Preferring spread and rest should lead is more readable and there's no downside when using ES6. The "useless" rules are just things like renaming imports to the original name which should only happen during refactors.

Reviewed By: jknoxville

Differential Revision: D16180453

fbshipit-source-id: 1cf6851b7726c0aee953ec7cf7dd6fa0aca32253
2019-07-10 12:06:39 -07:00
Pascal Hartig
c588b650ae Prefer const wherever possible
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.

This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.

Used `eslint --fix` to change all existing cases.

Reviewed By: jknoxville

Differential Revision: D16131329

fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
2019-07-10 03:28:25 -07:00
Pascal Hartig
662db20948 Disallow var
Summary: We're ES6 and `var`s scoping rules are weird. Let's block this.

Reviewed By: jknoxville

Differential Revision: D16131290

fbshipit-source-id: ba67d16bb8a185a4bb59a657a97b00230dbacafe
2019-07-10 03:28:25 -07:00
Daniel Büchele
df795a3b88 metro upgrade
Summary: updating to the latest metro version

Reviewed By: passy

Differential Revision: D15986739

fbshipit-source-id: 83fba99bf7cc0903590831aeb852d14dde576901
2019-07-09 03:07:04 -07:00
Zoltán Gilián
aff51b881d Fix uneccesary compilation when fs.watch rapid-fires
Summary:
On Windows fs.watch fires multiple times after a single edit causing multiple instances of plugin compilation threads to start bogging down system resources.
This diff delays compilation by 1 second, soaking additional watch events fired for that plugin in that time window.

Reviewed By: danielbuechele

Differential Revision: D16109076

fbshipit-source-id: bc4f89d83f04487a3d32ee5cc2105fe0a8b7366c
2019-07-08 03:05:08 -07:00
Daniel Büchele
766996b8dd keytar update node v70
Summary: Keytar binaries weren't updated when upgrading the electron version. This diff updates the binaries to match electron's node version.

Reviewed By: passy

Differential Revision: D15821734

fbshipit-source-id: 04688f1e465d2f7bdefecfdda8e2f3868de18780
2019-06-14 03:41:54 -07:00
Daniel Büchele
79414aa3e1 Bumped electron version
Summary:
We in React VR were need newer Chrome DevTools version to make our plugin work properly. Chromium version with required fixes were shipped in electron 5.0.0.

This diff bumps electron version and explicitly allows node integration (accessing require, process and other node related functions from window object in index.html), because it was disabled by default in 5.0.0.

Reviewed By: jknoxville

Differential Revision: D15693539

fbshipit-source-id: 4f71a07b2afaa489aec46940c924f4ad30ad0413
2019-06-10 10:36:25 -07:00
Pascal Hartig
10211e4fa1 Update ws dependency
Summary: Addresses security alert https://github.com/facebook/flipper/network/alert/static/yarn.lock/ws/open (WS-2017-0421).

Reviewed By: jknoxville

Differential Revision: D15695745

fbshipit-source-id: e5e24ace95ecccc8e3be65d159c285914bff10dd
2019-06-10 03:55:36 -07:00
Pascal Hartig
2885f87189 Update copyright headers (#433)
Summary:
Style is modified, so I think it's okay to add
our header there too.
Pull Request resolved: https://github.com/facebook/flipper/pull/433

Differential Revision: D15213091

Pulled By: passy

fbshipit-source-id: c02b67b022f12fdb3e0da39a308d33b073dcb9d3
2019-05-04 11:16:23 -07:00
Pascal Hartig
6dda7d2b63 More headers
Reviewed By: jknoxville

Differential Revision: D15199272

fbshipit-source-id: d46355a284a6e2acdaccd622dfd4419b06e61a61
2019-05-03 12:08:04 -07:00
Pascal Hartig
578b53b98a Removed unused identifiers
Summary: Eslint doesn't like them and me neither.

Reviewed By: danielbuechele

Differential Revision: D14798690

fbshipit-source-id: 5ee7108b9ecfbb05cf2d54cfce68931d16d69a73
2019-04-05 08:07:15 -07:00
Daniel Büchele
294d5b110f rename keytar Windows native module
Summary:
`process.platform` is used to require the native-module for keytar. On Windows this returns `win32` (No matter if 64bit or 32bit system). The native module was named `keytar-win.node`. This diff renames it to `keytar-win32.node`.

This is the code that requires the module from `user.js`:

```
keytar = global.electronRequire(
    path.join(
      isProduction() ? remote.app.getAppPath() : process.cwd(),
      'native-modules',
      `keytar-${process.platform}.node`,
    ),
  );
```

Reviewed By: priteshrnandgaonkar

Differential Revision: D14771646

fbshipit-source-id: cd48d25cb5921e07e472eb46636fa2599c8ff721
2019-04-04 04:51:11 -07:00
Pascal Hartig
dde68356eb Upgrade Babel
Summary:
Just minor version bumps so this doesn't have any noticeable effects.
Doing some cleanups after danielbuechele pointed out that it's important
for us to stay close to the upstream releases in the last team meeting.

Reviewed By: jknoxville

Differential Revision: D14665264

fbshipit-source-id: 91efb0663693823f394284457550716f22c40938
2019-03-28 08:36:13 -07:00
Pascal Hartig
fd6cab2a7b Launcher cycle detection
Summary:
Flipper Electron delegates to the Launcher if it is found right on startup to fetch the most recent/compatible version of Flipper. The Launcher then opens the downloaded app with a `--no-launcher` option to avoid bouncing back and forth between the Electron app and the Launcher.

This depends on the argument processing working unchanged. In the past this has been somewhat difficult to guarantee as this doesn't happen in one place and dev/prod builds have handled arguments different due to Electron weirdness (requiring a `--` passed in, for instance).

If anything here goes wrong, we end up in a very nasty scenario where the launcher and the Electron app rapidly open and close, making it nearly impossible for users to escape that vicious cycle. `pkill -f Flipper` being the best option, if you can focus a terminal for long enough.

In order to avoid this from ever happening in the future, this introduces a quick check for the last startup is written with a timestamp and if this is less than 5s in the past, we will skip delegating to the Launcher altogether, keeping the current instance running.

Reviewed By: jknoxville

Differential Revision: D14598136

fbshipit-source-id: b3335ce7ec7dc3e5e014d459db31df4c8a774fc6
2019-03-25 11:36:19 -07:00
Pascal Hartig
ec42fd62ac Wire up --file/--url on Flipper startup
Summary:
When passing --file or --url explicitly on startup, they should
be used in the same way that event handlers are used.

Reviewed By: jknoxville

Differential Revision: D14598688

fbshipit-source-id: 07179227da3b6c754a4d3a9e15342474e39d72b7
2019-03-25 11:31:24 -07:00
Pascal Hartig
759329bbc3 Pass URL and file arguments to launcher
Summary:
Changes where we delegate to the launcher to a later point so we can successfully intercept file open events and custom URI events.

There's more information in Phase 1 in this paragraph of the doc: https://fb.quip.com/tpqnAbxnJw1w#UNZACAnVVGs

Reviewed By: danielbuechele

Differential Revision: D14563585

fbshipit-source-id: a8757a6072386e56102f15b0668456369a44aad7
2019-03-22 12:18:10 -07:00
Pascal Hartig
939cc531e2 Fix revision bundling
Summary:
This fixes headless not terminating due to the `package.json` not being readable.
I instead write this to the `global` object in the same way that the version is
set.

Reviewed By: jknoxville

Differential Revision: D14579316

fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
2019-03-22 10:41:01 -07:00
Pascal Hartig
3b53aff55c Add --file option
Summary:
Positional arguments with yargs are a mess, so I'm adding a `--file` instead.
This can then be used to pass parameters on through the launcher.

Reviewed By: danielbuechele

Differential Revision: D14525320

fbshipit-source-id: f04ebed85b6eb9e3c82e76736695d41e7bafb301
2019-03-20 05:30:59 -07:00
Daniel Büchele
79124891a9 url handler downloads
Summary:
Adding support for downloading archived Flipper data using a URL handler.
A URL looks like `flipper://import/?url=` and will download the file specified in the url param. While downloading the file, a spinner is shown in the app's titlebar.

Reviewed By: jknoxville

Differential Revision: D14262763

fbshipit-source-id: 6538fc78c07a48cef7b71b3f7bdbcb712d054593
2019-03-01 04:30:22 -08:00
Daniel Büchele
ffa586dd49 adding keytar native module
Summary:
`keytar` is developped by the Nuclide team and allows cross-platform access to the system's keychain. As `keytar` has a native dependency, we need to make sure Metro doesn't try to bundle it as part of our JS bundle. We are adding another rule to our electron-transform, to not bundle `.node` files (which are native node modules).

Secondly, we need to make sure, the native module is compiled for the correct version of node.js. Usually native modules are compiled for the node version that is running on the system it is installed on. However, we need to make sure it is compiled with the node version that is bundled with electron. That's exactly what `electron-rebuild` does: It recompiles all native modules with the electron's node version.

More on native modules: https://electronjs.org/docs/tutorial/using-native-node-modules

Reviewed By: jknoxville

Differential Revision: D14224402

fbshipit-source-id: 6414a53391a861a23a5d95bf6f18cd0058d9178f
2019-02-28 07:28:25 -08:00
Daniel Büchele
13f7444013 electron update
Summary:
Started with upgrading electron from 3.0.0 to 4.0.5. This required a bunch of subsequent updates:
* upgrading `electron-builder` to latest version, because the old version couldn't build electron 4 apps.
  * `appDir` is deprecated in builder config, `projectDir` is used instead, which we already had set, so its fine to just remove this ([see GitHub commit](a5e457163e)).
* upgrading `jest-runner/electron` because the old version couldn't run electron 4 tests.
  * upgrading our custom dependency resolution to use electron 4.0.5, because the test runner still resolves to 2.0.8 ([see GitHub issue](https://github.com/facebook-atom/jest-electron-runner/issues/31)).
* updating `sandcastle.sh` to use the new cache files from D14131344.
* removing `package-lock.json` as is was causing warnings. We use `yarn` and `yarn.lock` anyways. This file must have been committed by accident.
* updating our check to only run one version of Flipper at a time to use the new electron API `app.requestSingleInstanceLock` as the old one was removed in electron 4.
* updating the snapshot test that checks App rendering, which changed a little due to the electron upgrade.
* upgrading flow-type definitions to `electron-v4.0.5.js` generated by [electron-flowtype-definitions](https://github.com/danielbuechele/electron-flowtype-definitions).

**PS: Best new feature in Electron 4: Copy&paste working in dev tools**

Reviewed By: jknoxville

Differential Revision: D14131360

fbshipit-source-id: d7ed9643875629a1fa1860bb61b11dd0c64112ab
2019-02-21 02:46:12 -08:00
Daniel Büchele
6ada04bc38 ignore flipper-public/dist folder in build
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260

That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!

Reviewed By: passy

Differential Revision: D14134423

fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
2019-02-20 06:58:54 -08:00
Daniel Büchele
517262bbf2 fix version number
Summary: The electron stub is used by the headless version of Flipper. For that reason, the version number was always `1`. The headless version has a the actual version written to a global variable. So let's use it here.

Reviewed By: passy

Differential Revision: D14149692

fbshipit-source-id: c4781987fd3201e67897eaf31627b0bb2970ffcb
2019-02-20 06:42:21 -08:00
Pascal Hartig
e53f8fa98d Provide clearer message about launcher delegation (#373)
Summary:
To make it more obvious how to disable this if unwanted (e.g. when
testing local builds).
Pull Request resolved: https://github.com/facebook/flipper/pull/373

Reviewed By: jknoxville

Differential Revision: D14130771

Pulled By: passy

fbshipit-source-id: 82c83c1ad14737c8c7791de71a1ee23fcea5ec18
2019-02-19 03:27:31 -08:00
Daniel Büchele
8d134ba89e disable babel cache
Summary: as per title. see explanation in code comment

Reviewed By: jknoxville

Differential Revision: D14125820

fbshipit-source-id: 9b8e31214a65a184397852544cebd7b69ea0aadb
2019-02-18 12:49:34 -08:00
Daniel Büchele
c6752110cf watch recursive
Summary: Plugin files in subfolders were not watched. Adding recursive flag to reload plugins, even when there are changes in any of the plugin's subdirectories.

Reviewed By: jknoxville

Differential Revision: D14100394

fbshipit-source-id: 2a0b5e35df4bbbfe6cf8a0fafd5271222d99a46c
2019-02-15 06:31:31 -08:00
Pascal Hartig
c0b5f10693 Add --launcher-msg option to pass to desktop app
Summary:
Allows the launcher to provide messages to the user. Currently, in the form
of the red notification bar at the bottom. This is just meant as a temporary measure
during the alpha to have some clearly noticeable way of getting the user's attention.

I consider removing this a blocker for the release as this mechanism is not well
suited for this in many ways.

The current use case for this is providing a warning if a cached version is used
instead of the requested one, e.g. "Could not fetch requested Flipper version 'deadbeef', using cached version instead."

Reviewed By: jknoxville, priteshrnandgaonkar

Differential Revision: D14073687

fbshipit-source-id: 85630347027063103315eeb1286731fe2478e261
2019-02-14 06:02:44 -08:00
Pascal Hartig
a41d8eb4f8 Delegate to launcher app on startup
Summary:
For the production version, if the Launcher is installed and no `--no-launcher` (note the double-negation) is supplied, then
let the launcher start the app instead.

The launcher will pass the `--no-launcher` option back to prevent this from looping.

Reviewed By: jknoxville

Differential Revision: D14066620

fbshipit-source-id: 27d305efac36005e5e1082076829f10ef14aba0d
2019-02-14 02:33:06 -08:00
Pascal Hartig
2b9e3c54c6 Set up --no-launcher flag
Summary: For future use to disable launcher loops.

Reviewed By: jknoxville

Differential Revision: D13979653

fbshipit-source-id: db56f7d71d7a4d1322cb36622313dbad4307396d
2019-02-14 02:33:06 -08:00