Summary:
This change has a few changes in the way our MacOS app was built and packaged.
- Instead of placing the Node binary inside the MacOS folder, place it inside the Resources folder. This is more in compliance with how an app is bundled. Also, with the added benefit of making it a resource which makes it eligible for code signing.
- Both, Node binary and server bundle are placed in the right location before building the MacOS app. By doing this, we ensure the app is not modified after the built process which messes up with code signing, if in place.
Reviewed By: antonk52
Differential Revision: D51568778
fbshipit-source-id: 0b1b0ad9947550ddf0f6d4b04e5aff41f7edcdee
Summary:
Add codesign capabilities to Flipper Server Cocoa app.
Also, push the version to the build step instead of overriding once built. Otherwise, the Info.plist will be marked as 'being tampered with'.
Note: we are still not using the signing, but the capability is there.
Reviewed By: antonk52
Differential Revision: D51547008
fbshipit-source-id: 33abcd2fce33a7daf2ae8941b54989dba82fc0e3
Summary:
As mentioned on the previous diff, we no longer use a pre-built template when creating a release build.
This change moves the built binary directly into place instead of updating the existing template after which it was moved to its final destination.
Reviewed By: antonk52
Differential Revision: D51424944
fbshipit-source-id: 284fb53bb5f00f92b3ca9db3b28cfd1e4dacfa19
Summary:
So far we have used a 'template' approach, in which the release build script will copy and use to create the final deliverable.
The template itself was updated locally by running:
cd ~/fbsource/xplat/sonar/facebook/flipper-server
yarn start
This would:
- Build the MacOS app for all supported architectures: x64 and arm64
- Update the template found on the static directory
After the update, we would just commit the changes to the repo.
## About this change
Instead, build the MacOS app when the release script is used. This is leaves way less margin for error as we have removed all the manual steps that had to be done as listed above.
Reviewed By: antonk52
Differential Revision: D51397661
fbshipit-source-id: 2234c9996fa98f32db244764acf3e35dc9a388c9
Summary: This is a duplicate, is not needed, causes confusion.
Reviewed By: aigoncharov
Differential Revision: D51307091
fbshipit-source-id: 4d55d727ea5f20100ecd15ad6e23aa0c01722524
Summary:
It was hard-coded to always open the first time.
This allows to run the server on debug mode without opening UI.
Reviewed By: antonk52
Differential Revision: D51115746
fbshipit-source-id: 9467f0fbff45987247a2bb3bf5eb1aa578de1913
Summary:
As to not conflict with non-electron installations, this will ensure the product name and app id matches the installation.
By doing this, both Flipper installations can co-exist, which I think is desirable.
Reviewed By: antonk52
Differential Revision: D51078955
fbshipit-source-id: fabaa6eb2a45ac542297b0456a09e938a2ec2e0b
Summary: These are local changes required to make an installer for the last RN-only Electron distribution of Flipper. Instead of just throwing this away, let's keep it in the history of the repository, just in case.
Reviewed By: passy
Differential Revision: D50838207
fbshipit-source-id: 4966e046161e24a616c04d5cf57fee2512f06525
Summary: Previously I had created a RN build, locally, with a few minor differences. That had to be reverted. Instead of reverting and re-applying changes, I'm introducing a flag that can be used in the interim to produce the RN-only builds.
Reviewed By: LukeDefeo
Differential Revision: D50555055
fbshipit-source-id: edface9a1587fb51e54eebe73724032baf985c83
Summary:
The current '--mac' arg builds all supported architectures. This is great when generating release builds but not so much when testing a release for the current architecture.
Not modifying the existing '--mac' arg as to not update our current CI.
Reviewed By: antonk52
Differential Revision: D50497211
fbshipit-source-id: 3e4d9728adc822c48788556e2ea47f4dd1c21b05
Summary:
Currently we download a bunch of FB icons and we normally use the smallest one available.
In this diff I change the download logic so we try to download from the largest to the smallest icon and use the first one available. One the client we no longer provide the icon of the same size that is requested, instead we provide the only one we have which will typically be larger than needed. This is a good thing because
1. flipper is a local application and we do not need to worry about icons take up broadband and downloading
2. People have high density displayed
I also stopped using density(rest of related code removed in the next diff) for icons as it the icons themselves did not support it.
Reviewed By: lblasa
Differential Revision: D50495194
fbshipit-source-id: f569c2f3b8ee424a67c6d21136e7e113868b8f6a
Summary:
Previously we had requested non existing icons. This fixes missing icons on pixel dense screens (macbook pro, 4k screens).
I could add x4, x5 icons as well. Though they are no better than x3. Even x3 is pretty raterized. Ideally we should be serving icons with higher resolution and scaling them down instead of doing this. Even better use SVG icons which we do not have.
Reviewed By: LukeDefeo
Differential Revision: D50454271
fbshipit-source-id: cda90972abb56069e160ddefdc6de460c49d06c0
Summary: This is the immediate follow-up from the previous diff which aims to integrate the MacOS app into our release build script, meta only.
Reviewed By: antonk52, aigoncharov
Differential Revision: D50301369
fbshipit-source-id: 23a4842666c3a7aa9616c6237e16b71bae87ba36
Summary: Changelog: When requesting Keychain Access, you will now see "flipper-runtime" instead of a generic "node" process.
Reviewed By: lblasa
Differential Revision: D50261830
fbshipit-source-id: ef6fd7d5099c4ff7370f0401a5de3fde1659f1f3
Summary: This is more reliable and follows redirect which we need for GitHub downloads.
Reviewed By: antonk52
Differential Revision: D50263976
fbshipit-source-id: d001b6eb460510b0b673ea66651e7c39cac3092f
Summary:
Copying files will randomly fail with something akin to
```
Error: Cannot copy '../acirb/bin/acorn' to a subdirectory of itself, '../acorn/bin/acorn'.
```
See https://github.com/jprichardson/node-fs-extra/issues/708
Reviewed By: antonk52
Differential Revision: D50263977
fbshipit-source-id: 39091ef57b79c692ec89e7a250595509839e2af8
Summary:
As discussed with lblasa. This solves a few issues:
- Confusing names in `ps` and Activity Monitor related to Flipper.
- Permission requests for the Keychain from "node" lead users to deny it.
- Seeing "node" as allowed apps for an entry in Keychain is confusing.
Reviewed By: lblasa
Differential Revision: D50232337
fbshipit-source-id: 3bc92aae0ca31d1a80582fb8a794bbc64fc2f2e5
Summary: Add an option to archive the server build inside a DMG.
Reviewed By: antonk52
Differential Revision: D49504225
fbshipit-source-id: 3c34e6f0e4c9a685d36771199a6e20394f68baef
Summary: A few improvements to the installation wizard.
Reviewed By: antonk52
Differential Revision: D49145069
fbshipit-source-id: 1aadd85e1d187bd61983a0b4201b530cbdbf509a
Summary:
We recently raised a concern that for some packages types/* version is different than the package we are using. This can cause runtime errors as typescript can suggest usage that no longer reflects current API of a library. To combat this issue we decided to add a CI check to verify that major versions of types and a libriary match.
This script will be refined if in the next few diffs
Reviewed By: LukeDefeo
Differential Revision: D48779652
fbshipit-source-id: 2a826ba9d00565563553f04cd809ae0638db6282
Summary: Need to copy this resource too from the static directory.
Reviewed By: aigoncharov
Differential Revision: D48864174
fbshipit-source-id: 0f3bfe9608bb9d48ec1cfb7243b3f0701d2fd8cf
Summary: Updating the remaining tsconfigs to build for an ES2021 target.
Reviewed By: antonk52
Differential Revision: D48687661
fbshipit-source-id: 2761704d251f701594ca5d362a17731f287088ed
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
Summary:
Electron-builder puts its results in a different directory, based on the architecture you build on.
While we don't have plans to release an arm64 build internally, we still need to support local builds for testing.
Without this, it fails with a rather confusing error message:
```
Script termnated. Error: spawn zip ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn zip',
path: 'zip',
spawnargs: [ '-qyr9', '../Flipper-mac.zip', 'Flipper.app' ]
```
Reviewed By: lblasa
Differential Revision: D48517426
fbshipit-source-id: 21a133f8fce3aee0737ce5cbccc7a692a613b98e
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
Summary: UDS will be removed. The first step would be to remove the TCP optionality.
Reviewed By: passy
Differential Revision: D48264741
fbshipit-source-id: ca9e1b68be61e99240e95bcd4f26f2db63a64005
Summary: This is needed on Windows, otherwise it just throws an error when using spawn.
Reviewed By: passy
Differential Revision: D47832379
fbshipit-source-id: c1a5094c2e72683a695949cd99b2a1054f01aced
Summary: Just adds a function stub that will add the necessary run script for windows.
Reviewed By: passy
Differential Revision: D47627532
fbshipit-source-id: 09b6a203c2a5def20e586b5753d95ca58797852a
Summary:
Right now, both Launcher and PWA share the same icon.
As to make it easier to identify which one is which, PWA will have a greyed icon instead.
Reviewed By: antonk52
Differential Revision: D47436998
fbshipit-source-id: 69d4d273c35e327263fbbf02d4ac7a005013f1d9
Summary: This diff follows up on the previous one, by trying a larger icon size if the original requested icon size was missing.
Reviewed By: lblasa
Differential Revision: D46556076
fbshipit-source-id: 4a078088aa27390f247e39afeda4b1df261d8b30
Summary:
Since ~yesterday all our builds started failing due to being unable to download static assets. Although those assets load correctly in the browser, and by using the browsers's generated `curl` command, which looks like:
```
curl 'https://facebook.com/assets/?name=face-unhappy&variant=outline&size=24&set=facebook_icons&density=1x' \
-H 'authority: facebook.com' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'accept-language: nl,en-GB;q=0.9,en;q=0.8,nl-NL;q=0.7,en-US;q=0.6' \
-H 'cache-control: no-cache' \
-H 'cookie: OMITTED' \
-H 'pragma: no-cache' \
-H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'sec-fetch-user: ?1' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
--compressed
```
Download fails as soon as the cookie header is dropped.
Changes the base url to `https://facebook.com/images/assets_DO_NOT_HARDCODE/facebook_icons/` fixes that problem, unless the resolution doesn't exist (addressed in next diff).
This also seems to remove the flakiness we were experiencing before, so dropped the retry mechanism for now.
Also made failing to download an icon a warning instead of a build failure.
Reviewed By: lblasa
Differential Revision: D46552986
fbshipit-source-id: f1382d6a8fc6669691f0c8da6b77834d24a373c5
Summary:
^
Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`
Changelog: Update Jest to v29.5.1
Reviewed By: antonk52
Differential Revision: D46319818
fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2