Summary: Implementation was missing for the browser. This provides a default implementation.
Reviewed By: aigoncharov
Differential Revision: D48311198
fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
Summary:
Match isProduction definition in flipper-common and flipper-server/src/index.tsx.
Without it, PWA never quits after all clients disconnect because Flipper Launcher does not set NODE_ENV to production currently (changed in the next diff)
Reviewed By: LukeDefeo, lblasa
Differential Revision: D48265768
fbshipit-source-id: 59e4660cb57da20b606562144c47c65276999d6c
Summary: OS will become useful later on, add it.
Reviewed By: antonk52
Differential Revision: D47989161
fbshipit-source-id: 3615544051b163b77f87e5c52e6ac9cae8c478d4
Summary:
Styles are applied depending on entry type. This was an issue when we had 'cmd' as a type too.
So, let's simplify and keep type to denote info, warning, or errors.
Later on we can add a different tag if we want to differentiate between logs, command, others.
Reviewed By: passy
Differential Revision: D47912857
fbshipit-source-id: 213a0768a95f63cbd692ba96f6745ab740346a58
Summary:
There's a generic notification server event.
This change introduces a new notification server event dedicated for connection troubleshoot.
The difference is, this notification will have a button to troubleshoot the issue. Additionally, in the future, we may even be able to add a payload so that we can troubleshoot the exact problem.
Reviewed By: antonk52
Differential Revision: D47873697
fbshipit-source-id: 28843a08836d0054909f6b9ab7a88b14b8a1b868
Summary: Already have SecureClientQuery. No need to have this as a type as it's not used or needed anywhere.
Reviewed By: antonk52
Differential Revision: D47210345
fbshipit-source-id: d9f3026a0e2a0b5dd2e87f16dba34a388dacd75f
Summary: It should've been there with ClientQuery.
Reviewed By: antonk52
Differential Revision: D47210314
fbshipit-source-id: 869496918648f20b616c1a612296fff55597af77
Summary:
Simplifies medium usage. Clients report this value as an integer. Internally, we transform this integer as type (a set of valid strings).
Instead of transform this value in different places, do it once when the client query is received.
Reviewed By: antonk52
Differential Revision: D46358024
fbshipit-source-id: ecd2b6c6ccbe7c38787a89d4e2f81930c7b91864
Summary: It is hard to pass auth token to Jest E2E tests.
Reviewed By: lblasa
Differential Revision: D46279204
fbshipit-source-id: ee0138c3bd014bafb416f7fa8951fb25b25b4067
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog
Support --updater and --no-updater options for flipper.exe
Pull Request resolved: https://github.com/facebook/flipper/pull/4277
Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).
Reviewed By: passy
Differential Revision: D41298321
Pulled By: mweststrate
fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.
Effectively, the plugin can import the css and export it when is bundled.
When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.
Reviewed By: aigoncharov
Differential Revision: D40758178
fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b
Summary:
Design doc: https://docs.google.com/document/d/1HLCFl46RfqG0o1mSt8SWrwf_HMfOCRg_oENioc1rkvQ/edit#
In later diffs, we'll start fetching the actual files as well. The list of available files itself might be useful already to see what we have in our folder on the device
Reviewed By: passy
Differential Revision: D40508960
fbshipit-source-id: 96193fef3fed64d509cd3397513ae3e94438ae22
Summary:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.
## Changelog
Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"
Pull Request resolved: https://github.com/facebook/flipper/pull/3992
Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.
Reviewed By: antonk52
Differential Revision: D39654481
Pulled By: antonk52
fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
Summary:
In D39311893 (094c5bdfdd) we started monkey-patching `require` to resolve global dependencies in the plugins. Apparently, patching `globalThis.require` did not work in the electron env. On my local machine it kept working because I had the experimental `flipper-server` feature enabled which embeds flipper-server into the electron build. In flipper-server we properly patch `require` via `Module.prototype.require` which affected the global require in electron.
With this fix we now properly patch require in electron via Module.prototype.require all the time
Changelog: Fix plugin loading with experimental flipper-server disabled
Reviewed By: nikoant
Differential Revision: D39633821
fbshipit-source-id: 9554f643c625620d116075ae87f573d8447850f6
Summary: esbuild references external modules via `require`. We wrap `require` to point the references to built-in modules to global variables
Reviewed By: lblasa
Differential Revision: D39311893
fbshipit-source-id: a99480161c082f4095d78c22271f114532f32c16
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.
Reviewed By: lblasa
Differential Revision: D39276249
fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
Summary:
This is the first diff to implement the feature for the Flipper logs plugin to have an option to persist logs in the table between crashes, disconnections, etc.
Since this is not a local change, the UI option for persistence will be located in the settings for the Flipper UI(as seen in the test plan). The setting is associated with the Redux Store `Settings` and is stored globally to be used across all plugins. So the plan is making the persistence pertain to all plugins.
Reviewed By: mweststrate
Differential Revision: D37786988
fbshipit-source-id: 7ffc6077cbca559b3401b16770eda657a6c45620
Summary:
Expose two new methods as to be able to:
- List plugins from marketplace
- Install a plugin from marketplace
Reviewed By: passy
Differential Revision: D37749817
fbshipit-source-id: 82b78f7906c5664d5747289fa4f8eadebcde1d73
Summary: Move User from reducers to flipper-common. User will now be usable by other modules.
Reviewed By: passy
Differential Revision: D37599802
fbshipit-source-id: 66412e7ed00bf27448fa2deae70f0e8e80303aba
Summary: There is a new flipper server command to install apps. For android it uses adb (via adb kit) For ios depending on idb availablity it will use idb or xcrun. Consumed in the next diff
Reviewed By: lblasa, aigoncharov
Differential Revision: D36936637
fbshipit-source-id: e09d34d840a9f3bf9136bcaf94fb8ca15dd27cbb
Summary: The part I'm most interested in is the `appVersion`. For non-debug builds this will allow us to check if a flipper-server version is compatible with flipperd/arc_uiqr or any other tool that builds on top of it.
Reviewed By: lblasa
Differential Revision: D37456699
fbshipit-source-id: 50eeb6da0f55e3a3552d43fa7c9ea34608090f97
Summary: Make it possible to ask whether a user is logged in. This won't tackle token expiration but it's consistent with the internal API we have through the `isLoggedIn` atom.
Reviewed By: lblasa
Differential Revision: D37422274
fbshipit-source-id: 2d3a5e27f5dbbe866d5392403e690faf2f1156b2
Summary:
There's one setting: to enable or disable flipper-server.
However, I've added some current running state to it. If there's a better way of doing this, please do let me know.
Reviewed By: aigoncharov
Differential Revision: D37276670
fbshipit-source-id: f6c941cf0cfe55c267b9bcb9f799934fba1e28ef
Summary:
Introduce a 'shutdown' command which effectively kills the process.
Killing the process, for flipper-server, will close down the server and active ws connections.
Reviewed By: passy
Differential Revision: D37209193
fbshipit-source-id: 83303e8209530a41ba870009603cfb383915b7a6
Summary: Allows to attribute errors to flipper server or flipper electron
Reviewed By: passy
Differential Revision: D36698504
fbshipit-source-id: 6d07216fd05aa48b7c8cca5b53145916b64526eb
Summary:
^
This change aims to extract some bits and pieces that are not specific to FBLogger and could be used by other Logger implementations.
Reviewed By: passy
Differential Revision: D36473286
fbshipit-source-id: 57f02d132673dbac97384da4dca51bf3e6fb8738
Summary: Allow subscribing to state updates from the plugin in headless mode
Reviewed By: passy
Differential Revision: D36516754
fbshipit-source-id: 14db51243e1d91332a7327c1792412149339f907
Summary: Expose uuid from flipper-common as it is required in multiple packages
Reviewed By: lblasa
Differential Revision: D36441889
fbshipit-source-id: 1fa539cb437976dbefe7d5d9a52e5e098a6402a7
Summary:
- Support loading globally installed DevTools
Background:
1. Initially, I wanted to use react-devtools-core as before. react-devtools-core standalone contains quite a few imports of node.js APIs. After [a conversation with Brian](https://fb.workplace.com/groups/react.devtools/permalink/3131548550392044), I pivoted to react-devtools-inline
2. Technical design doc of react-devtools-inline integration: https://docs.google.com/document/d/1STUSUhXzrW_KkvqSu7Ge-rxjVFF7oU3_NbwzimkO_Z4
3. We support usage of globally installed devtools. Code of react-devtools-inline is not ready to be used by the browser as is. We need to bundle it and substitute React and ReactDOM imports with the globals.
4. As we can't pre-compile what users install globally, we need to bundle global devtools on demand,
5. I tried re-using our Metro bundling pipeline initially, but gave up after fighting it for 2 days. Included, `rollup` instead.
6. Size of a `tgz` archive with a plugin is 2.1MB
allow-large-files
Reviewed By: mweststrate
Differential Revision: D34968770
fbshipit-source-id: 352299964ccc195b8677dbda47db84ffaf38737b
Summary: Adbkit configurations settings may be neccesary when we want to run flipper-server in an IPv6 stack machine as localhost would bind to [::1] rather than 127.0.0.1 which is where the adb server usually runs
Reviewed By: mweststrate
Differential Revision: D34964851
fbshipit-source-id: 9cf70f9bdc0c40e92382b1537013439f85983f65
Summary: Following up on D34787674 (f85def32fb).
Reviewed By: aigoncharov
Differential Revision: D34930249
fbshipit-source-id: f209a638c1281957fd2b03b6fc50389bd98bc5f6
Summary:
^
Usually, when launching Chrome, this error will take place a significat amount of times. By looking at the HTTP request, it is difficult to determine the origin other than being a Chrome extension.
There's no actionable items in Flipper, so do not emit the error.
Changelog: Do not emit errors when unable to extract client query
Reviewed By: antonk52
Differential Revision: D34898603
fbshipit-source-id: fbeb2db7ec2914669192cbebc2e6b15464e31827