chore: add doc for martkeplace (#4395)

Summary:
Provide a documentation about marketplace feature of Flipper.

This should cover:
1. Introduction of the feature (plugin discovery, auto update)2.
2. Marketplace server - to list available plugins
3. Flipper settings - describe the new settings and how to enable4.

Closes https://github.com/facebook/flipper/issues/3545.

## Changelog

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

Reviewed By: antonk52

Differential Revision: D42918936

Pulled By: passy

fbshipit-source-id: 50b10178b569ecc6ea65b736ea58db401cf686c6
This commit is contained in:
Lukas Kurucz
2023-02-06 08:17:47 -08:00
committed by Facebook GitHub Bot
parent c19dc150e6
commit d97dfae1a0
5 changed files with 50 additions and 0 deletions

View File

@@ -65,4 +65,15 @@ This may be Maven Central, JCenter or GitHub Packages for Android, CocoaPods for
Make sure to leave setup instructions in the README of your npm package.
## Marketplace
When developing plugins intended only for internal use (within certaing organisation/group), we might not want to expose those plugins to public.
By default Flipper plugins will be published to [npmjs.com](https://www.npmjs.com). Thus anyone can try install&use this plugin.
To keep plugin private, we can provide a `.tar.gz` archive with pluginc code and user can manually install the plugin.
This is quite troublesome for most users and also does not provide a way to automatically update when new version is released.
Flipper provides a marketplace feature, which does help with discovery of plugins within organisation and also keeps the plugins private.
To read more details on how marketplace works and how it can be integrated, please read this document: [Marketplace](./marketplace.mdx).
</OssOnly>

View File

@@ -0,0 +1,38 @@
---
id: marketplace
title: Marketplace
---
import useBaseUrl from '@docusaurus/useBaseUrl';
Flipper provides this feature to allow distribution of `private` plugins, which are not published to [npmjs.com](https://npmjs.com).
### Plugin discovery
Plugins which are supported by currently connected app/device, will be listed under "Detected in app" section in sidebar.
This significantly help users to discover useful plugins for their app.
<img alt="Install plugins" src={useBaseUrl("img/marketplace-discovery.png")} />
### Plugin auto-update
Once plugin is installed, it will also keep updating to latest version.
## Enable markektplace
### Setup server
Instead of hosting plugins on npm server, we need to provide custom server, which will provide a list of internal plugins.
> It is recommended to connect this server with internal package registry (to allow providing latest version).
Here is a example implementation of server using Verdaccio as package registry: [marketplace-server-example](https://github.com/usrbowe/flipper-marketplace-server).
### Enable marketplace
Open Flipper settings and enter the URL to your Flipper marketplace server. It is also adviced to toggle ON the `Enable auto update`.
<img alt="Install plugins" src={useBaseUrl("img/marketplace-settings.png")} />