Merge pull request #27056 from backstage/blam/add-integrations
NFS: Add missing default API's and `DefaultSignInPage`
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
"@backstage/core-components": "workspace:^",
|
||||
"@backstage/core-plugin-api": "workspace:^",
|
||||
"@backstage/frontend-plugin-api": "workspace:^",
|
||||
"@backstage/integration-react": "workspace:^",
|
||||
"@backstage/plugin-permission-react": "workspace:^",
|
||||
"@backstage/theme": "workspace:^",
|
||||
"@material-ui/core": "^4.9.13",
|
||||
|
||||
@@ -383,6 +383,21 @@ const appPlugin: FrontendPlugin<
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
}>;
|
||||
'sign-in-page:app': ExtensionDefinition<{
|
||||
kind: 'sign-in-page';
|
||||
name: undefined;
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
ComponentType<SignInPageProps>,
|
||||
'core.sign-in-page.component',
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
loader: () => Promise<ComponentType<SignInPageProps>>;
|
||||
};
|
||||
}>;
|
||||
'app-root-element:app/oauth-request-dialog': ExtensionDefinition<{
|
||||
kind: 'app-root-element';
|
||||
name: 'oauth-request-dialog';
|
||||
@@ -705,6 +720,36 @@ const appPlugin: FrontendPlugin<
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
}>;
|
||||
'api:app/scm-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
name: 'scm-auth';
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
AnyApiFactory,
|
||||
'core.api.factory',
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
}>;
|
||||
'api:app/scm-integrations': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
name: 'scm-integrations';
|
||||
config: {};
|
||||
configInput: {};
|
||||
output: ConfigurableExtensionDataRef<
|
||||
AnyApiFactory,
|
||||
'core.api.factory',
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
>;
|
||||
export default appPlugin;
|
||||
|
||||
@@ -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']} />,
|
||||
},
|
||||
});
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user