get rid of some core-api mentions too

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-09-23 14:06:12 +02:00
parent 07bd9068b4
commit 12e074a6e4
12 changed files with 35 additions and 27 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fix duplication checks to stop looking for the old core packages, and to allow some explicitly
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: Auth0
description: Adding Auth0 as an authentication provider in Backstage
---
The Backstage `core-api` package comes with an Auth0 authentication provider
that can authenticate users using OAuth.
The Backstage `core-plugin-api` package comes with an Auth0 authentication
provider that can authenticate users using OAuth.
## Create an Auth0 Application
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: GitHub
description: Adding GitHub OAuth as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a GitHub authentication provider
that can authenticate users using GitHub or GitHub Enterprise OAuth.
The Backstage `core-plugin-api` package comes with a GitHub authentication
provider that can authenticate users using GitHub or GitHub Enterprise OAuth.
## Create an OAuth App on GitHub
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: GitLab
description: Adding GitLab OAuth as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a GitLab authentication provider
that can authenticate users using GitLab OAuth.
The Backstage `core-plugin-api` package comes with a GitLab authentication
provider that can authenticate users using GitLab OAuth.
## Create an OAuth App on GitLab
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: Google
description: Adding Google OAuth as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a Google authentication provider
that can authenticate users using Google OAuth.
The Backstage `core-plugin-api` package comes with a Google authentication
provider that can authenticate users using Google OAuth.
## Create OAuth Credentials
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: Azure
description: Adding Microsoft Azure as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a Microsoft authentication provider
that can authenticate users using Azure OAuth.
The Backstage `core-plugin-api` package comes with a Microsoft authentication
provider that can authenticate users using Azure OAuth.
## Create an App Registration on Azure
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: Okta
description: Adding Okta OAuth as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a Okta authentication provider that
can authenticate users using Okta OpenID Connect.
The Backstage `core-plugin-api` package comes with a Okta authentication
provider that can authenticate users using Okta OpenID Connect.
## Create an Application on Okta
+2 -2
View File
@@ -5,8 +5,8 @@ sidebar_label: OneLogin
description: Adding OneLogin OIDC as an authentication provider in Backstage
---
The Backstage `core-api` package comes with a OneLogin authentication provider
that can authenticate users using OpenID Connect.
The Backstage `core-plugin-api` package comes with a OneLogin authentication
provider that can authenticate users using OpenID Connect.
## Create an Application on OneLogin
+4 -4
View File
@@ -166,12 +166,12 @@ are separated out into their own folder, see further down.
plugin and [techdocs-cli](https://github.com/backstage/techdocs-cli).
- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) -
This package contains specific testing facilities used when testing
`core-api`.
This package contains more general purpose testing facilities for testing a
Backstage App or its plugins.
- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) -
This package contains more general purpose testing facilities for testing a
Backstage App.
This package contains specific testing facilities used when testing Backstage
core internals.
- [`theme/`](https://github.com/backstage/backstage/tree/master/packages/theme) -
Holds the Backstage Theme.
+11 -3
View File
@@ -27,13 +27,21 @@ export const includedFilter = (name: string) =>
// Packages that are not allowed to have any duplicates
const FORBID_DUPLICATES = [
/^@backstage\/core$/,
/^@backstage\/core-api$/,
/^@backstage\/core-app-api$/,
/^@backstage\/plugin-/,
];
// There are some packages that ARE explicitly allowed to have duplicates since
// they handle that appropriately. This takes precedence over FORBID_DUPLICATES
// above.
const ALLOW_DUPLICATES = [
/^@backstage\/core-plugin-api$/,
/^@backstage\/plugin-catalog-react$/,
];
export const forbiddenDuplicatesFilter = (name: string) =>
FORBID_DUPLICATES.some(pattern => pattern.test(name));
FORBID_DUPLICATES.some(pattern => pattern.test(name)) &&
!ALLOW_DUPLICATES.some(pattern => pattern.test(name));
export default async (cmd: Command) => {
const fix = Boolean(cmd.fix);
@@ -90,11 +90,6 @@ export const defaultConfigLoader: AppConfigLoader = async (
return configs;
};
// createApp is defined in core, and not core-api, since we need access
// to the components inside core to provide defaults.
// The actual implementation of the app class still lives in core-api,
// as it needs to be used by dev- and test-utils.
export function OptionallyWrapInRouter({ children }: PropsWithChildren<{}>) {
if (useInRouterContext()) {
return <>{children}</>;
@@ -58,7 +58,7 @@ export const postMessageResponse = (
(window.opener || window.parent).postMessage(JSON.parse(authResponse), origin);
setTimeout(() => {
window.close();
}, 100); // same as the interval of the core-api lib/loginPopup.ts (to address race conditions)
}, 100); // same as the interval of the core-app-api lib/loginPopup.ts (to address race conditions)
`;
const hash = crypto.createHash('sha256').update(script).digest('base64');