chore: added some more default api implementations, and default sign in page

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-10-09 16:11:32 +02:00
parent a45e483b95
commit ff27933a17
5 changed files with 50 additions and 0 deletions
+21
View File
@@ -61,6 +61,11 @@ import {
vmwareCloudAuthApiRef,
} from '@backstage/core-plugin-api';
import { ApiBlueprint } from '@backstage/frontend-plugin-api';
import {
ScmAuth,
ScmIntegrationsApi,
scmIntegrationsApiRef,
} from '@backstage/integration-react';
import {
permissionApiRef,
IdentityPermissionApi,
@@ -380,4 +385,20 @@ export const apis = [
}),
},
}),
ApiBlueprint.make({
name: 'scm-auth',
params: {
factory: ScmAuth.createDefaultApiFactory(),
},
}),
ApiBlueprint.make({
name: 'scm-integrations',
params: {
factory: createApiFactory({
api: scmIntegrationsApiRef,
deps: { configApi: configApiRef },
factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi),
}),
},
}),
] as const;
@@ -0,0 +1,25 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { SignInPageBlueprint } from '@backstage/frontend-plugin-api';
import { SignInPage } from '@backstage/core-components';
export const DefaultSignInPage = SignInPageBlueprint.make({
params: {
loader: async () => props =>
<SignInPage {...props} providers={['guest']} />,
},
});
+1
View File
@@ -24,6 +24,7 @@ export { ComponentsApi } from './ComponentsApi';
export { IconsApi } from './IconsApi';
export { FeatureFlagsApi } from './FeatureFlagsApi';
export { TranslationsApi } from './TranslationsApi';
export { DefaultSignInPage } from './DefaultSignInPage';
export {
DefaultProgressComponent,
DefaultErrorBoundaryComponent,
+2
View File
@@ -34,6 +34,7 @@ import {
DefaultErrorBoundaryComponent,
oauthRequestDialogAppRootElement,
alertDisplayAppRootElement,
DefaultSignInPage,
} from './extensions';
import { apis } from './defaultApis';
@@ -58,6 +59,7 @@ export const appPlugin = createFrontendPlugin({
DefaultProgressComponent,
DefaultNotFoundErrorPageComponent,
DefaultErrorBoundaryComponent,
DefaultSignInPage,
oauthRequestDialogAppRootElement,
alertDisplayAppRootElement,
],