Merge branch 'master' into redirect-oauth-flow

This commit is contained in:
headphonejames
2023-02-27 17:20:37 -08:00
1999 changed files with 73777 additions and 12080 deletions
+17
View File
@@ -0,0 +1,17 @@
/*
* Copyright 2023 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.
*/
export * from './testUtils/MockPluginProvider';
@@ -15,7 +15,8 @@
*/
import React, { PropsWithChildren } from 'react';
import { createPlugin, PluginProvider } from '@backstage/core-plugin-api';
import { PluginProvider } from '@backstage/core-plugin-api/alpha';
import { createPlugin } from '@backstage/core-plugin-api';
/**
* Mock for PluginProvider to use in unit tests
@@ -91,6 +91,10 @@ export class TestApiRegistry implements ApiHolder {
* It lets you provide any number of API implementations, without necessarily
* having to fully implement each of the APIs.
*
* @remarks
* todo: remove this remark tag and ship in the api-reference. There's some odd formatting going on when this is made into a markdown doc, that there's no line break between
* the emmited <p> for To the following </p> so what happens is that when parsing in docusaurus, it thinks that the code block is mdx rather than a code
* snippet. Just ommiting this from the report for now until we can work out how to fix laterr.
* A migration from `ApiRegistry` and `ApiProvider` might look like this, from:
*
* ```tsx
@@ -100,7 +104,7 @@ export class TestApiRegistry implements ApiHolder {
* [identityApiRef, mockIdentityApi as unknown as IdentityApi]
* ])}
* >
* {...}
* ...
* </ApiProvider>
* )
* ```
@@ -110,7 +114,7 @@ export class TestApiRegistry implements ApiHolder {
* ```tsx
* renderInTestApp(
* <TestApiProvider apis={[[identityApiRef, mockIdentityApi]]}>
* {...}
* ...
* </TestApiProvider>
* )
* ```
@@ -119,7 +123,7 @@ export class TestApiRegistry implements ApiHolder {
* implements a subset of the `IdentityApi`.
*
* @public
**/
*/
export const TestApiProvider = <T extends any[]>(
props: TestApiProviderProps<T>,
) => {
@@ -25,7 +25,6 @@ export {
export type { TestAppOptions } from './appWrappers';
export * from './msw';
export * from './logCollector';
export * from './providers';
export * from './testingLibrary';
export { TestApiProvider, TestApiRegistry } from './TestApiProvider';
export type { TestApiProviderProps } from './TestApiProvider';