chore: move things around a little bit to the app plugin
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com> Co-authored-by: Johan Haals <johan@haals.se> Co-authored-by: Camila Belo <camilaibs@users.noreply.github.com> Co-authored-by: Camila Belo <camilaibs@gmail.com> Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -34,10 +34,10 @@ import {
|
||||
createApiFactory,
|
||||
routeResolutionApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { App } from '../extensions/App';
|
||||
import { AppRoutes } from '../extensions/AppRoutes';
|
||||
import { AppLayout } from '../extensions/AppLayout';
|
||||
import { AppNav } from '../extensions/AppNav';
|
||||
import { App } from '@backstage/plugin-app/src/extensions/App';
|
||||
import { AppRoutes } from '@backstage/plugin-app/src/extensions/AppRoutes';
|
||||
import { AppLayout } from '@backstage/plugin-app/src/extensions/AppLayout';
|
||||
import { AppNav } from '@backstage/plugin-app/src/extensions/AppNav';
|
||||
import {
|
||||
AnyApiFactory,
|
||||
ApiHolder,
|
||||
@@ -75,7 +75,7 @@ import { apis as defaultApis } from '../../../app-defaults/src/defaults';
|
||||
import {
|
||||
oauthRequestDialogAppRootElement,
|
||||
alertDisplayAppRootElement,
|
||||
} from '../extensions/elements';
|
||||
} from '@backstage/plugin-app/src/extensions/elements';
|
||||
import { extractRouteInfoFromAppNode } from '../routing/extractRouteInfoFromAppNode';
|
||||
|
||||
import { CreateAppRouteBinder } from '../routing';
|
||||
@@ -86,21 +86,25 @@ import {
|
||||
DefaultProgressComponent,
|
||||
DefaultErrorBoundaryComponent,
|
||||
DefaultNotFoundErrorPageComponent,
|
||||
} from '../extensions/components';
|
||||
} from '@backstage/plugin-app/src/extensions/components';
|
||||
import { InternalAppContext } from './InternalAppContext';
|
||||
import { AppRoot } from '../extensions/AppRoot';
|
||||
import { AppRoot } from '@backstage/plugin-app/src/extensions/AppRoot';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { toInternalBackstagePlugin } from '../../../frontend-plugin-api/src/wiring/createFrontendPlugin';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { toInternalExtensionOverrides } from '../../../frontend-plugin-api/src/wiring/createExtensionOverrides';
|
||||
import { stringifyError } from '@backstage/errors';
|
||||
import { getBasePath } from '../routing/getBasePath';
|
||||
import { AppThemeApi, DarkTheme, LightTheme } from '../extensions/AppThemeApi';
|
||||
import { IconsApi } from '../extensions/IconsApi';
|
||||
import { TranslationsApi } from '../extensions/TranslationsApi';
|
||||
import { ComponentsApi } from '../extensions/ComponentsApi';
|
||||
import { AppLanguageApi } from '../extensions/AppLanguageApi';
|
||||
import { FeatureFlagsApi } from '../extensions/FeatureFlagsApi';
|
||||
import {
|
||||
AppThemeApi,
|
||||
DarkTheme,
|
||||
LightTheme,
|
||||
} from '@backstage/plugin-app/src/extensions/AppThemeApi';
|
||||
import { IconsApi } from '@backstage/plugin-app/src/extensions/IconsApi';
|
||||
import { TranslationsApi } from '@backstage/plugin-app/src/extensions/TranslationsApi';
|
||||
import { ComponentsApi } from '@backstage/plugin-app/src/extensions/ComponentsApi';
|
||||
import { AppLanguageApi } from '@backstage/plugin-app/src/extensions/AppLanguageApi';
|
||||
import { FeatureFlagsApi } from '@backstage/plugin-app/src/extensions/FeatureFlagsApi';
|
||||
import { Root } from '../extensions/Root';
|
||||
import { resolveAppTree } from '../tree/resolveAppTree';
|
||||
import { resolveAppNodeSpecs } from '../tree/resolveAppNodeSpecs';
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "workspace:^",
|
||||
"@backstage/core-plugin-api": "workspace:^",
|
||||
"@backstage/frontend-plugin-api": "workspace:^",
|
||||
"@backstage/theme": "workspace:^",
|
||||
"@material-ui/core": "^4.9.13",
|
||||
@@ -43,7 +44,8 @@
|
||||
"react-use": "^17.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
|
||||
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
||||
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { AppLanguageSelector } from '../../../core-app-api/src/apis/implementations/AppLanguageApi';
|
||||
import { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';
|
||||
import { appLanguageApiRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { ApiBlueprint, createApiFactory } from '@backstage/frontend-plugin-api';
|
||||
|
||||
+2
-2
@@ -33,9 +33,9 @@ import {
|
||||
SidebarItem,
|
||||
} from '@backstage/core-components';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import LogoIcon from '../../../app/src/components/Root/LogoIcon';
|
||||
import LogoIcon from '../../../../packages/app/src/components/Root/LogoIcon';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import LogoFull from '../../../app/src/components/Root/LogoFull';
|
||||
import LogoFull from '../../../../packages/app/src/components/Root/LogoFull';
|
||||
|
||||
const useSidebarLogoStyles = makeStyles({
|
||||
root: {
|
||||
+7
-4
@@ -36,12 +36,15 @@ import {
|
||||
configApiRef,
|
||||
useApi,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { InternalAppContext } from '../wiring/InternalAppContext';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';
|
||||
import { InternalAppContext } from '../../../../packages/frontend-app-api/src/wiring/InternalAppContext';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { AppIdentityProxy } from '../../../../packages/core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import { RouteTracker } from '../routing/RouteTracker';
|
||||
import { getBasePath } from '../routing/getBasePath';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { RouteTracker } from '../../../../packages/frontend-app-api/src/routing/RouteTracker';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { getBasePath } from '../../../../packages/frontend-app-api/src/routing/getBasePath';
|
||||
|
||||
export const AppRoot = createExtension({
|
||||
namespace: 'app',
|
||||
+2
-1
@@ -21,7 +21,8 @@ import {
|
||||
createApiFactory,
|
||||
componentsApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { DefaultComponentsApi } from '../apis/implementations/ComponentsApi';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { DefaultComponentsApi } from '../../../../packages/frontend-app-api/src/apis/implementations/ComponentsApi';
|
||||
|
||||
/**
|
||||
* Contains the shareable components installed into the app.
|
||||
+1
-1
@@ -20,7 +20,7 @@ import {
|
||||
featureFlagsApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { LocalStorageFeatureFlags } from '../../../core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';
|
||||
import { LocalStorageFeatureFlags } from '../../../../packages/core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';
|
||||
|
||||
/**
|
||||
* Contains the shareable icons installed into the app.
|
||||
+3
-2
@@ -21,9 +21,10 @@ import {
|
||||
createApiFactory,
|
||||
iconsApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { DefaultIconsApi } from '../apis/implementations/IconsApi';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { icons as defaultIcons } from '../../../app-defaults/src/defaults';
|
||||
import { DefaultIconsApi } from '../../../../packages/frontend-app-api/src/apis/implementations/IconsApi';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { icons as defaultIcons } from '../../../../packages/app-defaults/src/defaults';
|
||||
|
||||
/**
|
||||
* Contains the shareable icons installed into the app.
|
||||
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
} from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { I18nextTranslationApi } from '../../../core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi';
|
||||
import { I18nextTranslationApi } from '../../../../packages/core-app-api/src/apis/implementations/TranslationApi/I18nextTranslationApi';
|
||||
|
||||
/**
|
||||
* Contains translations that are installed in the app.
|
||||
+1
-2
@@ -24,8 +24,7 @@ import {
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { ErrorPanel } from '@backstage/core-components';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { components as defaultComponents } from '../../../app-defaults/src/defaults';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { components as defaultComponents } from '../../../../packages/app-defaults/src/defaults';
|
||||
|
||||
export const DefaultProgressComponent = createComponentExtension({
|
||||
ref: coreComponentRefs.progress,
|
||||
@@ -4690,6 +4690,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@backstage/cli": "workspace:^"
|
||||
"@backstage/core-components": "workspace:^"
|
||||
"@backstage/core-plugin-api": "workspace:^"
|
||||
"@backstage/dev-utils": "workspace:^"
|
||||
"@backstage/frontend-plugin-api": "workspace:^"
|
||||
"@backstage/frontend-test-utils": "workspace:^"
|
||||
@@ -4705,6 +4706,7 @@ __metadata:
|
||||
react-use: ^17.2.4
|
||||
peerDependencies:
|
||||
react: ^16.13.1 || ^17.0.0 || ^18.0.0
|
||||
react-router-dom: 6.0.0-beta.0 || ^6.3.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
||||
Reference in New Issue
Block a user