From d97dfae1a02ce028528f9a6e411cea52425fafd6 Mon Sep 17 00:00:00 2001 From: Lukas Kurucz Date: Mon, 6 Feb 2023 08:17:47 -0800 Subject: [PATCH] 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 --- docs/tutorial/js-publishing.mdx | 11 ++++++ docs/tutorial/marketplace.mdx | 38 ++++++++++++++++++++ website/sidebars.js | 1 + website/static/img/marketplace-discovery.png | 0 website/static/img/marketplace-settings.png | 0 5 files changed, 50 insertions(+) create mode 100644 docs/tutorial/marketplace.mdx create mode 100644 website/static/img/marketplace-discovery.png create mode 100644 website/static/img/marketplace-settings.png diff --git a/docs/tutorial/js-publishing.mdx b/docs/tutorial/js-publishing.mdx index 5ad0fc139..8ca30762f 100644 --- a/docs/tutorial/js-publishing.mdx +++ b/docs/tutorial/js-publishing.mdx @@ -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). + diff --git a/docs/tutorial/marketplace.mdx b/docs/tutorial/marketplace.mdx new file mode 100644 index 000000000..18f992f08 --- /dev/null +++ b/docs/tutorial/marketplace.mdx @@ -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. + +Install plugins + +### 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`. + +Install plugins + + + diff --git a/website/sidebars.js b/website/sidebars.js index 86501d599..b84b345cf 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -144,6 +144,7 @@ module.exports = { 'extending/layout-inspector', ], }, + ], 'Under the Hood': [ 'internals/index', diff --git a/website/static/img/marketplace-discovery.png b/website/static/img/marketplace-discovery.png new file mode 100644 index 000000000..e69de29bb diff --git a/website/static/img/marketplace-settings.png b/website/static/img/marketplace-settings.png new file mode 100644 index 000000000..e69de29bb