core-app-api: rename PrivateAppImpl to AppManager
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
+6
-6
@@ -37,7 +37,7 @@ import {
|
||||
createRoutableExtension,
|
||||
analyticsApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { generateBoundRoutes, PrivateAppImpl } from './App';
|
||||
import { generateBoundRoutes, AppManager } from './AppManager';
|
||||
import { AppComponents } from './types';
|
||||
|
||||
describe('generateBoundRoutes', () => {
|
||||
@@ -188,7 +188,7 @@ describe('Integration Test', () => {
|
||||
};
|
||||
|
||||
it('runs happy paths', async () => {
|
||||
const app = new PrivateAppImpl({
|
||||
const app = new AppManager({
|
||||
apis: [noOpAnalyticsApi],
|
||||
defaultApis: [],
|
||||
themes: [
|
||||
@@ -242,7 +242,7 @@ describe('Integration Test', () => {
|
||||
});
|
||||
|
||||
it('runs happy paths without optional routes', async () => {
|
||||
const app = new PrivateAppImpl({
|
||||
const app = new AppManager({
|
||||
apis: [noOpAnalyticsApi],
|
||||
defaultApis: [],
|
||||
themes: [
|
||||
@@ -299,7 +299,7 @@ describe('Integration Test', () => {
|
||||
}),
|
||||
];
|
||||
|
||||
const app = new PrivateAppImpl({
|
||||
const app = new AppManager({
|
||||
apis,
|
||||
defaultApis: [],
|
||||
themes: [
|
||||
@@ -349,7 +349,7 @@ describe('Integration Test', () => {
|
||||
it('should track route changes via analytics api', async () => {
|
||||
const mockAnalyticsApi = new MockAnalyticsApi();
|
||||
const apis = [createApiFactory(analyticsApiRef, mockAnalyticsApi)];
|
||||
const app = new PrivateAppImpl({
|
||||
const app = new AppManager({
|
||||
apis,
|
||||
defaultApis: [],
|
||||
themes: [
|
||||
@@ -409,7 +409,7 @@ describe('Integration Test', () => {
|
||||
});
|
||||
|
||||
it('should throw some error when the route has duplicate params', () => {
|
||||
const app = new PrivateAppImpl({
|
||||
const app = new AppManager({
|
||||
apis: [],
|
||||
defaultApis: [],
|
||||
themes: [
|
||||
+2
-2
@@ -171,7 +171,7 @@ function useConfigLoader(
|
||||
}
|
||||
|
||||
class AppContextImpl implements AppContext {
|
||||
constructor(private readonly app: PrivateAppImpl) {}
|
||||
constructor(private readonly app: AppManager) {}
|
||||
|
||||
getPlugins(): BackstagePlugin<any, any>[] {
|
||||
return this.app.getPlugins();
|
||||
@@ -186,7 +186,7 @@ class AppContextImpl implements AppContext {
|
||||
}
|
||||
}
|
||||
|
||||
export class PrivateAppImpl implements BackstageApp {
|
||||
export class AppManager implements BackstageApp {
|
||||
private apiHolder?: ApiHolder;
|
||||
private configApi?: ConfigApi;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { AppConfig } from '@backstage/config';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { withDefaults } from '@backstage/core-components';
|
||||
import { PrivateAppImpl } from './App';
|
||||
import { AppManager } from './AppManager';
|
||||
import { AppComponents, AppConfigLoader, AppOptions } from './types';
|
||||
import { defaultApis } from './defaultApis';
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
@@ -132,7 +132,7 @@ export function createApp(options?: AppOptions) {
|
||||
|
||||
const { icons, themes, components } = optionsWithDefaults;
|
||||
|
||||
return new PrivateAppImpl({
|
||||
return new AppManager({
|
||||
icons: icons!,
|
||||
themes: themes!,
|
||||
components: components! as AppComponents,
|
||||
|
||||
Reference in New Issue
Block a user