Summary: various tests failing due to this dep
Reviewed By: antonk52
Differential Revision: D45731274
fbshipit-source-id: cb79199c15a8973f50e5075dab16605d0120b30c
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4732
This diff adds a `language` field into `CreatePasteArgs` type to potentially specify programming language in the paste service
Reviewed By: mweststrate
Differential Revision: D45701098
fbshipit-source-id: 080d76e5ff332518881e9c6b84aa47aaea680309
Summary:
Previously we would only generate debug wrapper for render core layout result when uidebugger was currently connected.
This meant if you navigate to a bloks screen *before* having the ui debugger open at render time it would read ui debugger as disconnected since the ui debugger is not a background plugin. The result is the user would see the native nodes instead of the bound tree, it was extra confusing since the layout result was cached so going forward and back doesnt solve it.
The ideal solution would be to have a global flipper is connected on the client but this isnt available yet, lorenzo said he would work on it later.
As a work around we use the fact that the uidebugger has ever been connected in this session.
It can still be confusing since the initial load of a bloks screen migt not generate the debug nodes until you navigate to the plugin once. I will add a note to the docs so say that you need to have open the uidebugger once before nodes will appear
Reviewed By: mweststrate
Differential Revision: D45605120
fbshipit-source-id: 970943b9f8f98221b7fc5e20bb1caf18c2266474
Summary:
For Electron builds, use the same directory as certificates and keys.
For headless builds, then use the static directory.
Reviewed By: antonk52
Differential Revision: D45728515
fbshipit-source-id: 55a3b143a9289fed23e57cbf6b701a5e48d27332
Summary: The isHeadlessBuild flag was not properly set.
Reviewed By: antonk52
Differential Revision: D45728435
fbshipit-source-id: 3616c4358114d4f3d96372766dabf48b27b44333
Summary:
Bit annoying if everytime we run it we have to manually delete/discard file.
So, add to gitignore.
Reviewed By: LukeDefeo, passy
Differential Revision: D45688164
fbshipit-source-id: 6ae2b570f571a3d44b0c75bb3d614887e4943e5b
Summary:
Until now, launching flipper-server with TCP would accept any incoming connection as long as it comes from the same origin (localhost) using web socket host origin verification.
This is not entirely secure as origin can be spoofed with tools like curl.
Our team created a security review and a proposal was written:
https://docs.google.com/document/d/16iXypCQibPiner061SoaQUFUY9tLVAEpkKfV_hUXI7c/
Effectively, Flipper can generate a token which is then used by the client to authenticate.
This diff contains the changes required to generate, obtain, and validate authentication tokens from clients connecting to flipper over TCP connections.
The token itself is a JWT token. JWT was chosen because it is a simple industry standard which offers three features which can immediately benefit us:
- Expiration handling. No need for Flipper to store this information anywhere.
- Payload. Payload can be used to push any data we deem relevant i.e. unix username.
- Signing. Signed and verified using the same server key pair which is already in place for certificate exchange.
Additionally, the token is stored in the Flipper static folder. This ensures that the browser and PWA clients have access to it.
Reviewed By: mweststrate
Differential Revision: D45179654
fbshipit-source-id: 6761bcb24f4ba30b67d1511cde8fe875158d78af
Summary: Cosmetic change to make the events more inline with what they are
Reviewed By: lblasa
Differential Revision: D42999134
fbshipit-source-id: e026e38da7e50e8f5520271246f9627eb22e8965
Summary:
This adds the base infra for the UIDebugger bloks integration as well as an implementation for the Layout result wrapper for bloks. When theUIDebugger is connected we wrap the original layout result with a debug varient that delegates all methods to the original layout result but also provides access to the bloks model.
This allows the UIDebugger to inspect the Layout result and bloks model together
Reviewed By: pasqualeanatriello
Differential Revision: D43444444
fbshipit-source-id: ac531a0c7491c05db1d6f7671e3ab09c73c213b9
Summary:
The logic was a little outdated to when we were accumulating subtrees, now its much simpler, if the previously focused id is not in the new frame, remove focus
Changelog: UIDebugger, fix focus mode behaviour
Reviewed By: mweststrate
Differential Revision: D45523026
fbshipit-source-id: 894a85df21cc27eb57dbef411ae57743d0c4f753
Summary:
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.70 to 1.0.71.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.71</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8b4fc43429"><code>8b4fc43</code></a> Release 1.0.71</li>
<li><a href="3c33b4b072"><code>3c33b4b</code></a> Merge pull request <a href="https://redirect.github.com/dtolnay/anyhow/issues/306">#306</a> from dtolnay/noinline</li>
<li><a href="d491b88840"><code>d491b88</code></a> Mark format_err macro as doc(no_inline)</li>
<li>See full diff in <a href="https://github.com/dtolnay/anyhow/compare/1.0.70...1.0.71">compare view</a></li>
</ul>
</details>
<br />
[](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/4707
Reviewed By: antonk52
Differential Revision: D45484397
Pulled By: passy
fbshipit-source-id: 4c960ef862e882789a6a1ff94aafb5b62ffb5058
Summary: People complained about barely noticeable filtered state indication multiple times
Reviewed By: antonk52
Differential Revision: D45394233
fbshipit-source-id: 60a3531b1808ae8f95ce8cd405a20b74bad0ed46
Summary:
Just to make sure that nobody injects something in our build chain. Checksum taken from the official website: https://gradle.org/release-checksums/
Pull Request resolved: https://github.com/facebook/flipper/pull/4704
Reviewed By: antonk52
Differential Revision: D45320680
fbshipit-source-id: 2a489264f3c377ef2c6bb4557cb788b4ab19bcc5
Summary:
Given that stream interceptor is async the folling race conditino could occur.
Frame at time t=0 comes in, we yeild to the event loop while fetching metadata, fetch takes 5 ticks
Frame at time t=1 comes in, we yeild to the event loop but fetch takes 1 tick
At time t=2 the second frame is augmented and display
At time t=5 the first fetch returns and we display and older frame
This is a simple check to avoid this.
Reviewed By: aigoncharov
Differential Revision: D45314013
fbshipit-source-id: 054e7e6beb52dfbfd94bc9f8ee3d0a758a669f66
Summary:
In order to support this the stream inceptor transform nodes now is able to return a list of new meta enties, since these are new attributes we try to mimic what would have happened if they were generated on the client. This makes the rest of the logic downstream simpler
Introduced metadata register, same idea as on the clients.
The attributes available are a mixed bag, will work with blok server to imporove
Reviewed By: antonk52
Differential Revision: D45177781
fbshipit-source-id: 9d761b2f682e7e0fd4710f5b2e9d9d6ff26741fc
Summary: This is purely a cosmetic change but more accurately reflects the nature of how we send data from device to desktop. Ie its always an entire frame rather than subtrees. This helps with correctness great Both ios and android are like this and have been for a while.
Reviewed By: lblasa
Differential Revision: D45080088
fbshipit-source-id: 8f68047056c4825b0b1dd89f26c7fa462e2ecb1b
Summary: We were memoizing the reduction trace fetch in the stream interceptor but this was redundant. We let the library handle that. Also pulled the calls into the uidebugger so we have more control over the retry behaviour
Reviewed By: mweststrate
Differential Revision: D45079132
fbshipit-source-id: 7354fce0fddbebdb0b027dade03398a36adc5e9a
Summary:
* Added line number as an attribute to node, in theory we could get it from the device in the case of compose
* dont need to use miles as have the file already
* cleaned up naming in ide file resolver so its clear its the qualified name we are talking about
Reviewed By: lblasa
Differential Revision: D45079135
fbshipit-source-id: 24f2d5814800a4a404b680599d307cc750758fcd
Summary:
1. Need to unminify the names from something call the minification map
2. Bloks attributes themselves are already minified. However the uidebugger also has a similar concept in its own metadata so the data we get off the device has been minified twice. To fix this we remap the metadata off the device using the minification map. In order to find the correct entry we need to get the style id of the bloks model parent. this is sent as a metadata custom attribute
Reviewed By: lblasa
Differential Revision: D45079136
fbshipit-source-id: bb448d81918c0b8c9e8ac87c4390b46a8a374d78
Summary:
Hooked up metadata to the stream inteceptor, enhanced error handling to deal with:
1. Recording subsequent metadata messaages that came in while in error state such that all of them are processed
2. Recording any frames that came in while in error state such that after recovering from error we have the latest state
3. Splitting out recoverable and non recoverable errors more explicitly
Reviewed By: lblasa
Differential Revision: D45079137
fbshipit-source-id: 67a2ffef72d94d2b1492f201a2228659720e306b
Summary:
Added stream interecptor which gets a chance to augment the messages off the wire. Stream interceptor transformations are async and can fail due to network errors so added error state with a retry button. The retry button will just call the function again.
I am also handling errors better generally when this method fails unexpectedly, logging more clearly what went wrong and communicating it to the user
Did some refactoring of subtree update event to support this
Reviewed By: lblasa
Differential Revision: D44415260
fbshipit-source-id: a5a5542b318775b641d53941808399a8fa4634d3
Summary: Type is any as it can be litterally anything, using json is a bit of pain as we have to do a lot of type checks to access anything
Reviewed By: lblasa
Differential Revision: D45079133
fbshipit-source-id: bcce93a1fce48d2779a648576f12df6392a0938e
Summary: These replace tags, and are KV instead. They allow us to send framework specific data that arent common enough to be promoted to the top level, similar to hidden attributes. They will be needed for bloks
Reviewed By: lblasa
Differential Revision: D45079134
fbshipit-source-id: e4962bd56f0c24608504367f50cd796fd3d79fcd
Summary: This is no longer needed or sent by the client given our new approach to frames
Reviewed By: antonk52
Differential Revision: D44872566
fbshipit-source-id: 9ec340a5cc68605f730cf6677fb89778bf77a3a1
Summary:
^
There's no references to this anywhere, so delete.
Reviewed By: antonk52
Differential Revision: D45309041
fbshipit-source-id: e62e94b089eee30b82b05f64c8e7b31dd03597b6
Summary: Payload size is useful to understand how much data is going down the wire for frame updates.
Reviewed By: LukeDefeo
Differential Revision: D45114582
fbshipit-source-id: d0c2a01deb84a67017db88bd396b4859e08d0037
Summary:
These are attributes that are:
1. Not common across frameworks
2. Not in every node
3. Will not be visualised via inspectable attribute mechansism
Currently we will use them for bloks but they should be useful for other features down the road
Reviewed By: lblasa
Differential Revision: D45048025
fbshipit-source-id: c258d0a384a2b09abb642778e68da178899fa9eb
Summary: This will allow a lot more flexibility and will be essential for making bloks work
Reviewed By: lblasa
Differential Revision: D44871256
fbshipit-source-id: 59d9fdccea7b18406eac532080e80a69a251267b
Summary: Since subtree update is effectively a frame dump its a lot easier to send the parent ID. This will save having figure it out on the client which is somewhat expensive and is needed for bloks
Reviewed By: lblasa
Differential Revision: D45048023
fbshipit-source-id: 90c4888df063de0aa69c9b93c86d9891e30becbe
Summary:
Bumps [com.vanniktech:gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin) from 0.24.0 to 0.25.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vanniktech/gradle-maven-publish-plugin/releases">com.vanniktech:gradle-maven-publish-plugin's releases</a>.</em></p>
<blockquote>
<h2>0.25.2</h2>
<ul>
<li>Fix javadoc jar being empty when using dokka.</li>
</ul>
<h2>0.25.1</h2>
<ul>
<li>Fix snapshot publishing being broken.</li>
</ul>
<h2>0.25.0</h2>
<ul>
<li>The <code>createStagingRepository</code> task now uses the worker API which allows the project to built
in parallel to the creation of the staging repository.</li>
<li>Fix incompatibility with Kotlin 1.8.20-Beta for Kotlin/JS projects. The Kotlin/JS plugin is now taking
care of creating the sources jar on its own. Because of this the base plugin won't allow disabling
sources jar creation for Kotlin/JS projects anymore starting with 1.8.20. The <code>KotlinJs</code> constructor
with a <code>sourcesJar</code> parameter has been deprecated.</li>
<li>Fix incompatibility with Gradle 8.1 for <code>java-test-fixtures</code> projects</li>
<li>Fix incompatibility with <code>com.gradle.plugin-publish</code> 1.0.0 and 1.1.0</li>
<li>New minimum supported versions:
<ul>
<li>Gradle 7.4</li>
<li>Android Gradle Plugin 7.3.0</li>
<li>Kotlin Gradle Plugin 1.7.0</li>
<li><code>com.gradle.plugin-publish</code> 1.0.0</li>
</ul>
</li>
<li>Note: Starting with Kotlin 1.8.20-Beta the <code>common</code> sources jar for multiplatform projects will only contain
the sources of the common source set instead of containing the sources from all source sets.</li>
</ul>
<h4>Configuration cache status</h4>
<p>Configuration cache is supported starting with <strong>Gradle 7.6+</strong> except for:</p>
<ul>
<li>Builds with enabled signing, will be resolved in Gradle 8.1.</li>
<li>Publishing releases to Maven Central (snapshots are fine), blocked by [Gradle issue <a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/22779">#22779</a>](<a href="https://redirect.github.com/gradle/gradle/issues/22779">gradle/gradle#22779</a>).</li>
<li>Kotlin Multiplatform projects, blocked by <a href="https://youtrack.jetbrains.com/issue/KT-49933">KT-49933</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/vanniktech/gradle-maven-publish-plugin/blob/main/CHANGELOG.md">com.vanniktech:gradle-maven-publish-plugin's changelog</a>.</em></p>
<blockquote>
<h2>0.25.2 <em>(2023-04-16)</em></h2>
<ul>
<li>Fix javadoc jar being empty when using dokka.</li>
</ul>
<h2>0.25.1 <em>(2023-03-24)</em></h2>
<ul>
<li>Fix snapshot publishing being broken.</li>
</ul>
<h2>0.25.0 <em>(2023-03-23)</em></h2>
<ul>
<li>The <code>createStagingRepository</code> task now uses the worker API which allows the project to built
in parallel to the creation of the staging repository.</li>
<li>Fix incompatibility with Kotlin 1.8.20-Beta for Kotlin/JS projects. The Kotlin/JS plugin is now taking
care of creating the sources jar on its own. Because of this the base plugin won't allow disabling
sources jar creation for Kotlin/JS projects anymore starting with 1.8.20. The <code>KotlinJs</code> constructor
with a <code>sourcesJar</code> parameter has been deprecated.</li>
<li>Fix incompatibility with Gradle 8.1 for <code>java-test-fixtures</code> projects</li>
<li>Fix incompatibility with <code>com.gradle.plugin-publish</code> 1.0.0 and 1.1.0</li>
<li>New minimum supported versions:
<ul>
<li>Gradle 7.4</li>
<li>Android Gradle Plugin 7.3.0</li>
<li>Kotlin Gradle Plugin 1.7.0</li>
<li><code>com.gradle.plugin-publish</code> 1.0.0</li>
</ul>
</li>
<li>Note: Starting with Kotlin 1.8.20-Beta the <code>common</code> sources jar for multiplatform projects will only contain
the sources of the common source set instead of containing the sources from all source sets.</li>
</ul>
<h4>Configuration cache status</h4>
<p>Configuration cache is supported starting with <strong>Gradle 7.6+</strong> except for:</p>
<ul>
<li>Builds with enabled signing, will be resolved in Gradle 8.1.</li>
<li>Publishing releases to Maven Central (snapshots are fine), blocked by [Gradle issue <a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/22779">#22779</a>](<a href="https://redirect.github.com/gradle/gradle/issues/22779">gradle/gradle#22779</a>).</li>
<li>Kotlin Multiplatform projects, blocked by <a href="https://youtrack.jetbrains.com/issue/KT-49933">KT-49933</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="faae7cc990"><code>faae7cc</code></a> Update to 0.25.2-rc1</li>
<li><a href="7c9a1c9b1e"><code>7c9a1c9</code></a> Changelog for 0.25.2</li>
<li><a href="899b4da7ea"><code>899b4da</code></a> fix Dokka javadoc jar set up (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/559">https://github.com/facebook/flipper/issues/559</a>)</li>
<li><a href="df8aee6f99"><code>df8aee6</code></a> Update dependency com.android.tools.build:gradle to v8 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/557">https://github.com/facebook/flipper/issues/557</a>)</li>
<li><a href="efb4317fdf"><code>efb4317</code></a> Update plugin com.gradle.enterprise to v3.13 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/556">https://github.com/facebook/flipper/issues/556</a>)</li>
<li><a href="5acae8c36f"><code>5acae8c</code></a> Gradle 8.1 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/554">https://github.com/facebook/flipper/issues/554</a>)</li>
<li><a href="8cc89daa5f"><code>8cc89da</code></a> update tested versions (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/552">https://github.com/facebook/flipper/issues/552</a>)</li>
<li><a href="436ee0002f"><code>436ee00</code></a> Update kotlin monorepo to v1.8.20 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/553">https://github.com/facebook/flipper/issues/553</a>)</li>
<li><a href="454faf601d"><code>454faf6</code></a> Update plugin com.gradle.enterprise to v3.12.6 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/550">https://github.com/facebook/flipper/issues/550</a>)</li>
<li><a href="f740112300"><code>f740112</code></a> Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.25.1 (<a href="https://redirect.github.com/vanniktech/gradle-maven-publish-plugin/issues/548">https://github.com/facebook/flipper/issues/548</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/vanniktech/gradle-maven-publish-plugin/compare/0.24.0...0.25.2">compare view</a></li>
</ul>
</details>
<br />
[](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/4679
Reviewed By: antonk52
Differential Revision: D45079156
Pulled By: passy
fbshipit-source-id: b996d486b817056b3ff5e3ddcc4eb81caa5abb62