From f690a28e5a25a3aaf278eed1004e6940cc21fe4e Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Tue, 18 Jul 2023 10:40:25 +0200 Subject: [PATCH] devtools: pull available modules Signed-off-by: Vincenzo Scamporlino --- plugins/devtools/package.json | 1 + .../src/components/Content/InfoContent/InfoContent.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/devtools/package.json b/plugins/devtools/package.json index 7c7ec44575..de95310ea9 100644 --- a/plugins/devtools/package.json +++ b/plugins/devtools/package.json @@ -28,6 +28,7 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { + "@backstage/autodetect": "workspace:^", "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", "@backstage/errors": "workspace:^", diff --git a/plugins/devtools/src/components/Content/InfoContent/InfoContent.tsx b/plugins/devtools/src/components/Content/InfoContent/InfoContent.tsx index d9301ea6ec..2379df8b60 100644 --- a/plugins/devtools/src/components/Content/InfoContent/InfoContent.tsx +++ b/plugins/devtools/src/components/Content/InfoContent/InfoContent.tsx @@ -41,6 +41,7 @@ import { DevToolsInfo, PackageDependency, } from '@backstage/plugin-devtools-common'; +import * as autodetect from '@backstage/autodetect'; const PACKAGES_GLOBAL = '__backstage_detected_packages__'; @@ -78,7 +79,7 @@ const copyToClipboard = ({ about }: { about: DevToolsInfo | undefined }) => { export const InfoContent = () => { const classes = useStyles(); const { about, loading, error } = useInfo(); - + console.log('ooo', autodetect.getAvailablePlugins()); const availablePlugins: PackageDependency[] = (window as any)[PACKAGES_GLOBAL] ? ( (window as any)[PACKAGES_GLOBAL].modules as Array>