Commit Graph

23 Commits

Author SHA1 Message Date
Lorenzo Blasa
1360e906f8 Centralise sessionId to a dedicated place
Summary:
The sessionId is just uuid() which is held by the config. This changes moves that to a single place.

This achieves two goals:
1) Makes it very clear where is created and what value it holds
2) It allows us to know the sessionId even before the config is available. This becomes useful as we can start logging to Scribe earlier.

Reviewed By: passy

Differential Revision: D48601829

fbshipit-source-id: c54d86d76f0b58d2b59f8dd1c45d7f345c4a84c3
2023-08-24 06:18:39 -07:00
Lorenzo Blasa
17cfa0e571 Session Id moved to server config
Summary:
Session Id should be shared between client and server, but it was defined deep in the client (redux store).

The proposed solution presented below is to move the session id to the server configuration. By doing this, it becomes available to both server and client VERY early in the application life-cycle for both Electron and non-Electron builds.

Reviewed By: LukeDefeo

Differential Revision: D48520367

fbshipit-source-id: ca959b27ab18b1a2e4cd2fac1d28545664f1b514
2023-08-22 05:16:20 -07:00
Pascal Hartig
160b05a5bd Bump deps
Summary:
This updates minor and patch level dependencies. Frustratingly, I had to revert a bunch
of changes in that version range that still caused incompatibilities and test failures.

If I find time, I'll dig a bit deeper.

Reviewed By: ivanmisuno

Differential Revision: D48433210

fbshipit-source-id: 9ab12e774c1992d4f22cc1428d34f102ce820b75
2023-08-21 03:03:30 -07:00
Sanjaiyan Parthipan
7cef8286f9 Concurrent Function Upgrade for Enhanced Performance (#4918)
Summary:
Republishing sanjaiyan-dev's PR https://github.com/facebook/flipper/pull/4889 running `git rebase` because of a conflict.

Pull Request resolved: https://github.com/facebook/flipper/pull/4918

Reviewed By: lblasa

Differential Revision: D47294545

Pulled By: passy

fbshipit-source-id: 74904ec6179ed5a3bab6f9b701c3cd769ecad3bf
2023-07-17 04:43:14 -07:00
Pascal Hartig
18b6ce6f24 Dep bump
Summary: Combining a bunch of individual tasks for dep upgrades into one diff.

Reviewed By: ivanmisuno

Differential Revision: D42706074

fbshipit-source-id: 054b2545ad1295699f47f4c6eb5065b7b9a1d6a0
2023-01-25 04:35:09 -08:00
dependabot[bot]
404449d499 Bump yargs from 17.4.1 to 17.6.0 in /desktop (#4165)
Summary:
Bumps [yargs](https://github.com/yargs/yargs) from 17.4.1 to 17.6.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/yargs/yargs/blob/main/CHANGELOG.md">yargs's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/yargs/yargs/compare/v17.5.1...v17.6.0">17.6.0</a> (2022-10-01)</h2>
<h3>Features</h3>
<ul>
<li><strong>lang:</strong> Czech locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2220">https://github.com/facebook/flipper/issues/2220</a>) (<a href="5895cf1ba1">5895cf1</a>)</li>
<li><strong>usage:</strong> add YARGS_DISABLE_WRAP env variable to disable wrap (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2210">https://github.com/facebook/flipper/issues/2210</a>) (<a href="b680ace299">b680ace</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deno:</strong> use 'globalThis' instead of 'window' (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2186">https://github.com/facebook/flipper/issues/2186</a>) (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2215">https://github.com/facebook/flipper/issues/2215</a>) (<a href="561fc7a787">561fc7a</a>)</li>
<li><strong>deps:</strong> cliui with forced strip-ansi update (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2241">https://github.com/facebook/flipper/issues/2241</a>) (<a href="38e8df10f0">38e8df1</a>)</li>
<li>dont clobber description for multiple option calls (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2171">https://github.com/facebook/flipper/issues/2171</a>) (<a href="f91d9b334a">f91d9b3</a>)</li>
<li><strong>typescript:</strong> address warning with objectKeys (<a href="394f5f86d1">394f5f8</a>)</li>
</ul>
<h3><a href="https://github.com/yargs/yargs/compare/v17.5.0...v17.5.1">17.5.1</a> (2022-05-16)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>add missing entries to published files (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2185">https://github.com/facebook/flipper/issues/2185</a>) (<a href="5685382d18">5685382</a>)</li>
<li>address bug when strict and async middleware used together (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2164">https://github.com/facebook/flipper/issues/2164</a>) (<a href="cbc2eb726e">cbc2eb7</a>)</li>
<li><strong>completion:</strong> correct zsh installation instructions (<a href="22e9af28bb">22e9af2</a>)</li>
<li>handle multiple node_modules folders determining mainFilename for ESM (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2123">https://github.com/facebook/flipper/issues/2123</a>) (<a href="e0823dd7e6">e0823dd</a>)</li>
<li><strong>lang:</strong> add missing terms to Russian translation (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2181">https://github.com/facebook/flipper/issues/2181</a>) (<a href="1c331f22c7">1c331f2</a>)</li>
<li>prevent infinite loop with empty locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2179">https://github.com/facebook/flipper/issues/2179</a>) (<a href="b672e709e4">b672e70</a>)</li>
<li>veriadic arguments override array provided in config (the same as multiple dash arguments). (<a href="4dac5b8c2f">4dac5b8</a>)</li>
</ul>
<h2><a href="https://github.com/yargs/yargs/compare/v17.4.1...v17.5.0">17.5.0</a> (2022-05-11)</h2>
<h3>Features</h3>
<ul>
<li>add browser.d.ts and check for existence of Error.captureStackTrace() (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2144">https://github.com/facebook/flipper/issues/2144</a>) (<a href="6192990509">6192990</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>completion:</strong> support for default flags (<a href="db35423270">db35423</a>)</li>
<li>import yargs/yargs in esm projects (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2151">https://github.com/facebook/flipper/issues/2151</a>) (<a href="95aed1c175">95aed1c</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6cd8e2d6a4"><code>6cd8e2d</code></a> chore(main): release 17.6.0 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2213">https://github.com/facebook/flipper/issues/2213</a>)</li>
<li><a href="38e8df10f0"><code>38e8df1</code></a> fix(deps): cliui with forced strip-ansi update (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2241">https://github.com/facebook/flipper/issues/2241</a>)</li>
<li><a href="394f5f86d1"><code>394f5f8</code></a> fix(typescript): address warning with objectKeys</li>
<li><a href="561fc7a787"><code>561fc7a</code></a> fix(deno): use 'globalThis' instead of 'window' (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2186">https://github.com/facebook/flipper/issues/2186</a>) (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2215">https://github.com/facebook/flipper/issues/2215</a>)</li>
<li><a href="5895cf1ba1"><code>5895cf1</code></a> feat(lang): Czech locale (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2220">https://github.com/facebook/flipper/issues/2220</a>)</li>
<li><a href="f91d9b334a"><code>f91d9b3</code></a> fix: dont clobber description for multiple option calls (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2171">https://github.com/facebook/flipper/issues/2171</a>)</li>
<li><a href="b680ace299"><code>b680ace</code></a> feat(usage): add YARGS_DISABLE_WRAP env variable to disable wrap (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2210">https://github.com/facebook/flipper/issues/2210</a>)</li>
<li><a href="659dbbb4a4"><code>659dbbb</code></a> docs: update links to main branch</li>
<li><a href="02515116f8"><code>0251511</code></a> chore(main): release 17.5.1 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2187">https://github.com/facebook/flipper/issues/2187</a>)</li>
<li><a href="22e9af28bb"><code>22e9af2</code></a> fix(completion): correct zsh installation instructions</li>
<li>Additional commits viewable in <a href="https://github.com/yargs/yargs/compare/v17.4.1...v17.6.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=yargs&package-manager=npm_and_yarn&previous-version=17.4.1&new-version=17.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/4165

Reviewed By: aigoncharov

Differential Revision: D40022361

Pulled By: aigoncharov

fbshipit-source-id: 5408257376334746865b27b27461ec29dea8e78a
2022-10-05 02:27:07 -07:00
Andrey Goncharov
4eca8d1088 Add isHeadlessBuild to EnvironmentInfo
Summary: Allows to attribute errors to flipper server or flipper electron

Reviewed By: passy

Differential Revision: D36698504

fbshipit-source-id: 6d07216fd05aa48b7c8cca5b53145916b64526eb
2022-05-27 02:37:53 -07:00
dependabot[bot]
8ce64bbec4 Bump yargs from 17.2.1 to 17.4.1 in /desktop (#3714)
Summary:
Bumps [yargs](https://github.com/yargs/yargs) from 17.2.1 to 17.4.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/yargs/yargs/blob/main/CHANGELOG.md">yargs's changelog</a>.</em></p>
<blockquote>
<h3><a href="https://github.com/yargs/yargs/compare/v17.4.0...v17.4.1">17.4.1</a> (2022-04-09)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>coerce pollutes argv (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2161">https://github.com/facebook/flipper/issues/2161</a>) (<a href="2d1136d303">2d1136d</a>)</li>
<li><strong>completion:</strong> don't show positional args choices with option choices (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2148">https://github.com/facebook/flipper/issues/2148</a>) (<a href="b58b5bc2cd">b58b5bc</a>)</li>
<li>hide hidden options from completion (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2143">https://github.com/facebook/flipper/issues/2143</a>) (<a href="e086dfad7f">e086dfa</a>), closes <a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2142">https://github.com/facebook/flipper/issues/2142</a></li>
<li>show message when showHelpOnFail is chained globally (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2154">https://github.com/facebook/flipper/issues/2154</a>) (<a href="ad9fcacb00">ad9fcac</a>)</li>
</ul>
<h2><a href="https://github.com/yargs/yargs/compare/v17.3.1...v17.4.0">17.4.0</a> (2022-03-19)</h2>
<h3>Features</h3>
<ul>
<li><strong>completion:</strong> choices will now work for all possible aliases of an option and not just the default long option (<a href="30edd50671">30edd50</a>)</li>
<li><strong>completion:</strong> positional arguments completion (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2090">https://github.com/facebook/flipper/issues/2090</a>) (<a href="00e4ebbe3a">00e4ebb</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>completion:</strong> changed the check for option arguments to match options that begin with '-', instead of '--', to include short options (<a href="30edd50671">30edd50</a>)</li>
<li><strong>completion:</strong> fix for completions that contain non-leading hyphens (<a href="30edd50671">30edd50</a>)</li>
<li>failed command usage string is missing arg descriptions and optional args (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2105">https://github.com/facebook/flipper/issues/2105</a>) (<a href="d6e342d8ef">d6e342d</a>)</li>
<li>wrap unknown args in quotes (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2092">https://github.com/facebook/flipper/issues/2092</a>) (<a href="6a2977867b">6a29778</a>)</li>
</ul>
<h3><a href="https://github.com/yargs/yargs/compare/v17.3.0...v17.3.1">17.3.1</a> (2021-12-23)</h3>
<h3>Bug Fixes</h3>
<ul>
<li><strong>translations:</strong> correct Korean translation (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2095">https://github.com/facebook/flipper/issues/2095</a>) (<a href="c7c2b9eb34">c7c2b9e</a>)</li>
</ul>
<h2><a href="https://github.com/yargs/yargs/compare/v17.2.1...v17.3.0">17.3.0</a> (2021-11-30)</h2>
<h3>Features</h3>
<ul>
<li>fallback to default bash completion (<a href="74c0ba5cfc">74c0ba5</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>avoid legacy accessors (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2013">https://github.com/facebook/flipper/issues/2013</a>) (<a href="adb0d11e02">adb0d11</a>)</li>
<li><strong>deps:</strong> update dependency yargs-parser to v21 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2063">https://github.com/facebook/flipper/issues/2063</a>) (<a href="76c19518d7">76c1951</a>)</li>
<li>don't fail if &quot;fileURLToPath(import.meta.url)&quot; throws (<a href="3a44796c84">3a44796</a>)</li>
<li>re-add options to check callback (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2079">https://github.com/facebook/flipper/issues/2079</a>) (<a href="e75319d991">e75319d</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="be525157f3"><code>be52515</code></a> chore(main): release 17.4.1 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2147">https://github.com/facebook/flipper/issues/2147</a>)</li>
<li><a href="2d1136d303"><code>2d1136d</code></a> fix: coerce pollutes argv (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2161">https://github.com/facebook/flipper/issues/2161</a>)</li>
<li><a href="ad9fcacb00"><code>ad9fcac</code></a> fix: show message when showHelpOnFail is chained globally (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2154">https://github.com/facebook/flipper/issues/2154</a>)</li>
<li><a href="b58b5bc2cd"><code>b58b5bc</code></a> fix(completion): don't show positional args choices with option choices (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2148">https://github.com/facebook/flipper/issues/2148</a>)</li>
<li><a href="0bb49c3d86"><code>0bb49c3</code></a> samples: event.keyCode is deprecated, use new <code>.code</code> API (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2125">https://github.com/facebook/flipper/issues/2125</a>)</li>
<li><a href="e086dfad7f"><code>e086dfa</code></a> fix: hide hidden options from completion (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2143">https://github.com/facebook/flipper/issues/2143</a>)</li>
<li><a href="bcd59f1715"><code>bcd59f1</code></a> chore(main): release 17.4.0 (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2108">https://github.com/facebook/flipper/issues/2108</a>)</li>
<li><a href="3cbc38ccbf"><code>3cbc38c</code></a> docs: fix hyphenation (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2141">https://github.com/facebook/flipper/issues/2141</a>)</li>
<li><a href="00e4ebbe3a"><code>00e4ebb</code></a> feat(completion): positional arguments completion (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2090">https://github.com/facebook/flipper/issues/2090</a>)</li>
<li><a href="c0661643fc"><code>c066164</code></a> docs: an example using inquirer prompting (<a href="https://github-redirect.dependabot.com/yargs/yargs/issues/2114">https://github.com/facebook/flipper/issues/2114</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/yargs/yargs/compare/v17.2.1...v17.4.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=yargs&package-manager=npm_and_yarn&previous-version=17.2.1&new-version=17.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/3714

Reviewed By: timur-valiev

Differential Revision: D36371211

Pulled By: mweststrate

fbshipit-source-id: 8a67df778d5d4cb3c314eaf1463d9437fe4261bb
2022-05-23 07:29:26 -07:00
Pascal Hartig
cc3aca0e8b Upgrade @types/node to one version everywhere
Summary: Caused some inconsistencies when running `tsc`. This brings them back in line.

Reviewed By: aigoncharov

Differential Revision: D36101548

fbshipit-source-id: b8f757c59f879911c9b0920fe11396246ffa37e2
2022-05-04 04:03:19 -07:00
Andres Orozco Gonzalez
b2dae4da81 Add support to load settings from options (flag) and default to specific options
Summary: This change gives priority to a user option settingsString to set up the flipper-server configuration and load them from a json string. Also giving the user the chance to avoid flipper-server looking at the launcher config files in the computer

Reviewed By: mweststrate

Differential Revision: D34210110

fbshipit-source-id: 9e852b79da106b5140c59116fd7d0c0f3155e620
2022-02-16 06:23:45 -08:00
Lawrence Lomax
be451e15d9 Use demandOption instead of explicit checks of args
Summary: `yargs` supports this

Reviewed By: passy

Differential Revision: D33812132

fbshipit-source-id: d7846222f140fc32035824fe035737ae9ae2780e
2022-01-27 03:22:30 -08:00
Lawrence Lomax
85d1b060c7 Match on device serial as well as title
Summary: Device UDID/serial is necessary for matching uniquely. It's certainly possible to connect more than one of the same phone model, or have multiple iOS Sims with the same model and different OS versions.

Reviewed By: nikoant

Differential Revision: D33793569

fbshipit-source-id: aabd31a5b86c78a85aa867c6fa34d92f411fcb6e
2022-01-27 01:22:51 -08:00
Michel Weststrate
b6c884f011 Make sure flipper server initialization errors are propagated properly
Summary:
This diff makes sure that errors are propagated similarly in flipper desktop and browser version, and that they are shown in either case.

Since in the browser version, the UI loads after the error happened, we'll store the error so that any client connecting in the future will read and report it.

Also added a `--failFast` flag to flipper-server, so that the process exits immediately if misconfigured, which is convenient in CI use cases and such

Reviewed By: nikoant

Differential Revision: D33348922

fbshipit-source-id: 0f584104f881141fde38da3f0031748415343ea2
2022-01-04 02:57:25 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Michel Weststrate
5df34a337c Unshare global types
Summary:
This diff adds `types` fields on the compiler config for every project. This way we can make sure that for example node types and packages are not available in flipper-ui-core. Without an explicit types field, all types would be shared between all packages, and implicitly included into the compilation of everything. For the same reason `types/index.d.ts` has been removed, we want to be intentional on which types are being used in which package.

This diff does most of the work, the next diff will fine tune the globals, and do some further cleanup.

As an alternative solution I first tried a `nohoist: **/node_modules/types/**` and make sure every package list explicitly the types used in package json, which works but is much more error prone, as for example two different react types versions in two packages will cause the most unreadable compiler error due to the types not being shared and not literally the same.

Reviewed By: lawrencelomax

Differential Revision: D33124441

fbshipit-source-id: c2b9d768f845ac28005d8331ef5fa1066c7e4cd7
2021-12-17 07:36:07 -08:00
Michel Weststrate
dcfeb4a4d5 Clean up packages and types
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.

This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins

This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:

{F686704253}

{F686704295}

Reviewed By: antonk52

Differential Revision: D33062859

fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
2021-12-16 14:54:59 -08:00
Michel Weststrate
2a4fe77404 Extract environment config initialisation to server-core
Summary: This diff makes most stuff that is read from the `os` package, and version info etc available from the `serverConfig` object, so that flipper-ui-core no longer needs the `os` package.

Reviewed By: passy

Differential Revision: D32694848

fbshipit-source-id: 93af1e95d898da9aaf351a6970b5a7652ee835c8
2021-12-08 04:30:56 -08:00
Michel Weststrate
bca169df73 Move settings, launcherSettings, GKs to app / flipper-server-core
Summary:
This diff moves a lot of stuff from the client to the server. This diff is fairly large, as a lot of concept closely relate, although some things have split off to the earlier diffs in the stack, or are still to follow (like making intern requests).

This diff primarily moves reading and storing settings and GKs from client to server (both flipper and launcher settings). This means that settings are no longer persisted by Redux (which only exists on client). Most other changes are fallout from that. For now settings are just one big object, although we might need to separate settings that are only make sense in an Electron context. For example launcher settings.

Reviewed By: passy, aigoncharov

Differential Revision: D32498649

fbshipit-source-id: d842faf7a7f03774b621c7656e53a9127afc6192
2021-12-08 04:30:54 -08:00
Michel Weststrate
eed19b3a3d Move FlipperServer initialisation out of flipper-core
Summary: This diff makes sure flipper-ui-core no longer depends on flipper-server-core. Currently server config is still transferred from UI to server, which doesn't really make sense in future scenarios where server might start before client, but will address that separately

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D32462835

fbshipit-source-id: 498a944256ba1aabbf963b896953e64d11e27214
2021-12-08 04:30:54 -08:00
Michel Weststrate
d4eb618cdd change to zero exit if target app disconnects
Summary: Per yesterdays review, consider target app exiting as  a signal to end the dump process.

Reviewed By: passy

Differential Revision: D31609065

fbshipit-source-id: fbd92f6c5344245d0bdae3f21be1a5d235aa1fa1
2021-10-14 03:17:47 -07:00
Michel Weststrate
f43ff73591 Addressed some earlier diff comments
Summary: Async processed review feedback from stack D31474919 (cfd44b592a) e.o. (decapitate)

Reviewed By: passy

Differential Revision: D31608309

fbshipit-source-id: 536b3c9350f7acc40530000ecf5e46d5b074d50f
2021-10-14 03:17:47 -07:00
Michel Weststrate
598bdeb12a Created a proof of concept flipper-dump
Summary: Created a quick-and-dirty flipper-dump command, to verify that the stand alone flipper-server-core can do it's job without the Electron Flipper

Reviewed By: passy

Differential Revision: D31543516

fbshipit-source-id: ce8e37316ab5f09700421bcf1c7830266e02c999
2021-10-12 16:00:53 -07:00
Michel Weststrate
c3ff0ff355 Set up Flipper decapitated packages
Summary:
This diff introduces the packages necessary for Flipper decapitated.

* flipper-common: utilities & types shared between client, server, flipper-plugin
* flipper-server-core: all device & client management goes in here. Basically flipper's backend
* flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron
* desktop: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron specific stuff like dialgos
* flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well.
* flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs.
* flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core.

This diff just creates the packages, but doesn't move any code, so it can be summarized as:

restoftheowl

Reviewed By: nikoant

Differential Revision: D30218646

fbshipit-source-id: 735598a1261a98e584f52504b5eba01ec0afa162
2021-10-08 01:33:03 -07:00