devtools: pull available modules
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
committed by
Patrik Oldsberg
parent
e940ddcdf8
commit
f690a28e5a
@@ -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:^",
|
||||
|
||||
@@ -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<Record<string, any>>
|
||||
|
||||
Reference in New Issue
Block a user