diff --git a/desktop/app/src/index.tsx b/desktop/app/src/index.tsx index a8fdc0de4..913649221 100644 --- a/desktop/app/src/index.tsx +++ b/desktop/app/src/index.tsx @@ -198,8 +198,6 @@ export {getInstance as getLogger} from './fb-stubs/Logger'; export {callVSCode, getVSCodeUrl} from './utils/vscodeUtils'; export {useLocalStorage} from './utils/useLocalStorage'; export {checkIdbIsInstalled} from './utils/iOSContainerUtility'; -// Sidebar extensions should be last so they can import anything from here. -export {default as SidebarExtensions} from './fb-stubs/LayoutInspectorSidebarExtensions'; export {IDEFileResolver, IDEType} from './fb-stubs/IDEFileResolver'; export {renderMockFlipperWithPlugin} from './test-utils/createMockFlipperWithPlugin'; export {Tracked} from 'flipper-plugin'; // To be able to use it in legacy plugins diff --git a/desktop/plugins/public/layout/InspectorSidebar.tsx b/desktop/plugins/public/layout/InspectorSidebar.tsx index 1b26f6c93..8b7655156 100644 --- a/desktop/plugins/public/layout/InspectorSidebar.tsx +++ b/desktop/plugins/public/layout/InspectorSidebar.tsx @@ -14,7 +14,6 @@ import { styled, colors, PluginClient, - SidebarExtensions, Element, Client, Logger, @@ -24,6 +23,7 @@ import deepEqual from 'deep-equal'; import React from 'react'; import {useMemo, useEffect} from 'react'; import {kebabCase} from 'lodash'; +import {default as SidebarExtensions} from './extensions/fb-stubs/index'; const NoData = styled(FlexCenter)({ fontSize: 18, diff --git a/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx b/desktop/plugins/public/layout/extensions/fb-stubs/index.tsx similarity index 70% rename from desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx rename to desktop/plugins/public/layout/extensions/fb-stubs/index.tsx index 7049f7ce6..ad1957351 100644 --- a/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx +++ b/desktop/plugins/public/layout/extensions/fb-stubs/index.tsx @@ -7,10 +7,7 @@ * @format */ -import Client from '../Client'; -import {Logger} from '../fb-interfaces/Logger'; -import {PluginClient} from '../plugin'; -import {Element} from '../ui'; +import type {Client, Logger, PluginClient, Element} from 'flipper'; export default [] as Array< ( diff --git a/desktop/plugins/public/layout/package.json b/desktop/plugins/public/layout/package.json index 9d2e792a6..02cc3265f 100644 --- a/desktop/plugins/public/layout/package.json +++ b/desktop/plugins/public/layout/package.json @@ -11,11 +11,15 @@ ], "dependencies": { "deep-equal": "^2.0.5", - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "prism-react-renderer": "^0.1.7" }, "devDependencies": { "@testing-library/react": "^11.2.5" }, + "peerDependencies": { + "nt-shared": "*" + }, "title": "Layout", "icon": "target", "bugs": { diff --git a/desktop/plugins/public/yarn.lock b/desktop/plugins/public/yarn.lock index 3604e39fd..9b26a78a5 100644 --- a/desktop/plugins/public/yarn.lock +++ b/desktop/plugins/public/yarn.lock @@ -1445,6 +1445,11 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" +prism-react-renderer@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-0.1.7.tgz#dc273d0cb6e4a498ba0775094e9a8b01a3ad2eaa" + integrity sha512-EhnM0sYfLK103ASK0ViSv0rta//ZGB0dBA9TiFyOvA+zOj5peLmGEG01sLEDwl9sMe+gSqncInafBe1VFTCMvA== + promisify-child-process@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/promisify-child-process/-/promisify-child-process-4.1.1.tgz#290659e079f9c7bd46708404d4488a1a6b802686" diff --git a/desktop/scripts/get-app-watch-folders.ts b/desktop/scripts/get-app-watch-folders.ts index 03e058551..d60808b63 100644 --- a/desktop/scripts/get-app-watch-folders.ts +++ b/desktop/scripts/get-app-watch-folders.ts @@ -19,7 +19,6 @@ import isFB from './isFB'; */ const pluginsReferencedDirectlyFromFlipper = [ path.join(publicPluginsDir, 'navigation'), - path.join(fbPluginsDir, 'layout', 'sidebar_extensions'), path.join(fbPluginsDir, 'mobileconfig'), path.join(fbPluginsDir, 'watch'), ];