): (
WrappedComponent: React_2.ComponentType
,
) => {
(props: React_2.PropsWithChildren>): JSX.Element;
diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json
index 7b2aa3deea..a0057c1b0c 100644
--- a/packages/core-plugin-api/package.json
+++ b/packages/core-plugin-api/package.json
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-plugin-api",
"description": "Core API used by Backstage plugins",
- "version": "0.1.3",
+ "version": "0.1.5",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,10 +29,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
- "@backstage/config": "^0.1.3",
- "@backstage/theme": "^0.2.8",
- "@material-ui/core": "^4.11.0",
- "@types/react": "^16.9",
+ "@backstage/config": "^0.1.6",
+ "@backstage/theme": "^0.2.9",
+ "@material-ui/core": "^4.12.2",
+ "@types/react": "*",
"history": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
@@ -41,9 +41,9 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
- "@backstage/cli": "^0.7.2",
- "@backstage/core-app-api": "^0.1.3",
- "@backstage/test-utils": "^0.1.14",
+ "@backstage/cli": "^0.7.7",
+ "@backstage/core-app-api": "^0.1.7",
+ "@backstage/test-utils": "^0.1.16",
"@backstage/test-utils-core": "^0.1.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
diff --git a/packages/core-plugin-api/src/apis/definitions/auth.ts b/packages/core-plugin-api/src/apis/definitions/auth.ts
index c786b43fc3..c585619ba5 100644
--- a/packages/core-plugin-api/src/apis/definitions/auth.ts
+++ b/packages/core-plugin-api/src/apis/definitions/auth.ts
@@ -151,9 +151,14 @@ export type BackstageIdentity = {
id: string;
/**
- * An ID token that can be used to authenticate the user within Backstage.
+ * @deprecated This is deprecated, use `token` instead.
*/
idToken: string;
+
+ /**
+ * The token used to authenticate the user within Backstage.
+ */
+ token: string;
};
/**
diff --git a/packages/core-plugin-api/src/apis/system/helpers.ts b/packages/core-plugin-api/src/apis/system/helpers.ts
index 8e84dd6c09..547d583482 100644
--- a/packages/core-plugin-api/src/apis/system/helpers.ts
+++ b/packages/core-plugin-api/src/apis/system/helpers.ts
@@ -24,7 +24,7 @@ import { ApiRef, ApiFactory, TypesToApiRefs } from './types';
export function createApiFactory<
Api,
Impl extends Api,
- Deps extends { [name in string]: unknown }
+ Deps extends { [name in string]: unknown },
>(factory: ApiFactory): ApiFactory;
export function createApiFactory(
api: ApiRef,
@@ -33,7 +33,7 @@ export function createApiFactory(
export function createApiFactory<
Api,
Impl extends Api,
- Deps extends { [name in string]: unknown }
+ Deps extends { [name in string]: unknown },
>(
factory: ApiFactory | ApiRef,
instance?: Impl,
diff --git a/packages/core-plugin-api/src/apis/system/types.ts b/packages/core-plugin-api/src/apis/system/types.ts
index e805b6f255..a97d29fdaa 100644
--- a/packages/core-plugin-api/src/apis/system/types.ts
+++ b/packages/core-plugin-api/src/apis/system/types.ts
@@ -36,7 +36,7 @@ export type ApiHolder = {
export type ApiFactory<
Api,
Impl extends Api,
- Deps extends { [name in string]: unknown }
+ Deps extends { [name in string]: unknown },
> = {
api: ApiRef;
deps: TypesToApiRefs;
diff --git a/packages/core-plugin-api/src/app/useApp.tsx b/packages/core-plugin-api/src/app/useApp.tsx
index 1d17fb2d0f..aa323db4e2 100644
--- a/packages/core-plugin-api/src/app/useApp.tsx
+++ b/packages/core-plugin-api/src/app/useApp.tsx
@@ -18,9 +18,8 @@ import { useVersionedContext } from '../lib/versionedValues';
import { AppContext as AppContextV1 } from './types';
export const useApp = (): AppContextV1 => {
- const versionedContext = useVersionedContext<{ 1: AppContextV1 }>(
- 'app-context',
- );
+ const versionedContext =
+ useVersionedContext<{ 1: AppContextV1 }>('app-context');
const appContext = versionedContext.atVersion(1);
if (!appContext) {
throw new Error('AppContext v1 not available');
diff --git a/packages/core-plugin-api/src/extensions/extensions.tsx b/packages/core-plugin-api/src/extensions/extensions.tsx
index 5142dccc55..73b927afc8 100644
--- a/packages/core-plugin-api/src/extensions/extensions.tsx
+++ b/packages/core-plugin-api/src/extensions/extensions.tsx
@@ -33,7 +33,7 @@ type ComponentLoader =
// ComponentType inserts children as an optional prop whether the inner component accepts it or not,
// making it impossible to make the usage of children type safe.
export function createRoutableExtension<
- T extends (props: any) => JSX.Element | null
+ T extends (props: any) => JSX.Element | null,
>(options: {
component: () => Promise;
mountPoint: RouteRef;
@@ -91,7 +91,7 @@ export function createRoutableExtension<
// ComponentType inserts children as an optional prop whether the inner component accepts it or not,
// making it impossible to make the usage of children type safe.
export function createComponentExtension<
- T extends (props: any) => JSX.Element | null
+ T extends (props: any) => JSX.Element | null,
>(options: { component: ComponentLoader }): Extension {
const { component } = options;
return createReactExtension({ component });
@@ -101,7 +101,7 @@ export function createComponentExtension<
// ComponentType inserts children as an optional prop whether the inner component accepts it or not,
// making it impossible to make the usage of children type safe.
export function createReactExtension<
- T extends (props: any) => JSX.Element | null
+ T extends (props: any) => JSX.Element | null,
>(options: {
component: ComponentLoader;
data?: Record;
@@ -111,9 +111,9 @@ export function createReactExtension<
let Component: T;
if ('lazy' in options.component) {
const lazyLoader = options.component.lazy;
- Component = (lazy(() =>
+ Component = lazy(() =>
lazyLoader().then(component => ({ default: component })),
- ) as unknown) as T;
+ ) as unknown as T;
} else {
Component = options.component.sync;
}
diff --git a/packages/core-plugin-api/src/lib/versionedValues.ts b/packages/core-plugin-api/src/lib/versionedValues.ts
index a7b7d8e3b7..7686842ecd 100644
--- a/packages/core-plugin-api/src/lib/versionedValues.ts
+++ b/packages/core-plugin-api/src/lib/versionedValues.ts
@@ -32,7 +32,7 @@ export type VersionedValue = {
* Creates a container for a map of versioned values that implements VersionedValue.
*/
export function createVersionedValueMap<
- Versions extends { [version: number]: any }
+ Versions extends { [version: number]: any },
>(versions: Versions): VersionedValue {
Object.freeze(versions);
return {
@@ -43,7 +43,7 @@ export function createVersionedValueMap<
}
export function useVersionedContext<
- Versions extends { [version in number]: any }
+ Versions extends { [version in number]: any },
>(key: string): VersionedValue {
const versionedValue = useContext(
getGlobalSingleton>>(key),
diff --git a/packages/core-plugin-api/src/plugin/Plugin.tsx b/packages/core-plugin-api/src/plugin/Plugin.tsx
index abf4bfa35c..53a53b76d0 100644
--- a/packages/core-plugin-api/src/plugin/Plugin.tsx
+++ b/packages/core-plugin-api/src/plugin/Plugin.tsx
@@ -26,8 +26,9 @@ import { AnyApiFactory } from '../apis';
export class PluginImpl<
Routes extends AnyRoutes,
- ExternalRoutes extends AnyExternalRoutes
-> implements BackstagePlugin {
+ ExternalRoutes extends AnyExternalRoutes,
+> implements BackstagePlugin
+{
private storedOutput?: PluginOutput[];
constructor(private readonly config: PluginConfig) {}
@@ -81,7 +82,7 @@ export class PluginImpl<
export function createPlugin<
Routes extends AnyRoutes = {},
- ExternalRoutes extends AnyExternalRoutes = {}
+ ExternalRoutes extends AnyExternalRoutes = {},
>(
config: PluginConfig,
): BackstagePlugin {
diff --git a/packages/core-plugin-api/src/plugin/types.ts b/packages/core-plugin-api/src/plugin/types.ts
index 23ff4594a5..b3e1043efd 100644
--- a/packages/core-plugin-api/src/plugin/types.ts
+++ b/packages/core-plugin-api/src/plugin/types.ts
@@ -42,7 +42,7 @@ export type AnyExternalRoutes = { [name: string]: ExternalRouteRef };
export type BackstagePlugin<
Routes extends AnyRoutes = {},
- ExternalRoutes extends AnyExternalRoutes = {}
+ ExternalRoutes extends AnyExternalRoutes = {},
> = {
getId(): string;
output(): PluginOutput[];
@@ -54,7 +54,7 @@ export type BackstagePlugin<
export type PluginConfig<
Routes extends AnyRoutes,
- ExternalRoutes extends AnyExternalRoutes
+ ExternalRoutes extends AnyExternalRoutes,
> = {
id: string;
apis?: Iterable;
diff --git a/packages/core-plugin-api/src/routing/ExternalRouteRef.ts b/packages/core-plugin-api/src/routing/ExternalRouteRef.ts
index 348c78220f..401e34773c 100644
--- a/packages/core-plugin-api/src/routing/ExternalRouteRef.ts
+++ b/packages/core-plugin-api/src/routing/ExternalRouteRef.ts
@@ -24,8 +24,9 @@ import {
export class ExternalRouteRefImpl<
Params extends AnyParams,
- Optional extends boolean
-> implements ExternalRouteRef {
+ Optional extends boolean,
+> implements ExternalRouteRef
+{
readonly [routeRefType] = 'external';
constructor(
@@ -42,7 +43,7 @@ export class ExternalRouteRefImpl<
export function createExternalRouteRef<
Params extends { [param in ParamKey]: string },
Optional extends boolean = false,
- ParamKey extends string = never
+ ParamKey extends string = never,
>(options: {
/**
* An identifier for this route, used to identify it in error messages
diff --git a/packages/core-plugin-api/src/routing/RouteRef.ts b/packages/core-plugin-api/src/routing/RouteRef.ts
index 0239b57c25..31dd9ef518 100644
--- a/packages/core-plugin-api/src/routing/RouteRef.ts
+++ b/packages/core-plugin-api/src/routing/RouteRef.ts
@@ -32,7 +32,8 @@ export type RouteRefConfig = {
};
export class RouteRefImpl
- implements RouteRef {
+ implements RouteRef
+{
readonly [routeRefType] = 'absolute';
constructor(
@@ -70,7 +71,7 @@ export function createRouteRef<
// ParamKey is here to make sure the Params type properly has its keys narrowed down
// to only the elements of params. Defaulting to never makes sure we end up with
// Param = {} if the params array is empty.
- ParamKey extends string = never
+ ParamKey extends string = never,
>(config: {
/** The id of the route ref, used to identify it when printed */
id?: string;
diff --git a/packages/core-plugin-api/src/routing/SubRouteRef.ts b/packages/core-plugin-api/src/routing/SubRouteRef.ts
index f7e5cf0bc5..6b329dfd42 100644
--- a/packages/core-plugin-api/src/routing/SubRouteRef.ts
+++ b/packages/core-plugin-api/src/routing/SubRouteRef.ts
@@ -27,7 +27,8 @@ import {
const PARAM_PATTERN = /^\w+$/;
export class SubRouteRefImpl
- implements SubRouteRef {
+ implements SubRouteRef
+{
readonly [routeRefType] = 'sub';
constructor(
@@ -55,7 +56,7 @@ type PathParams = { [name in ParamNames]: string };
*/
type MergeParams<
P1 extends { [param in string]: string },
- P2 extends AnyParams
+ P2 extends AnyParams,
> = (P1[keyof P1] extends never ? {} : P1) & (P2 extends undefined ? {} : P2);
/**
@@ -64,14 +65,14 @@ type MergeParams<
*/
type MakeSubRouteRef<
Params extends { [param in string]: string },
- ParentParams extends AnyParams
+ ParentParams extends AnyParams,
> = keyof Params & keyof ParentParams extends never
? SubRouteRef>>
: never;
export function createSubRouteRef<
Path extends string,
- ParentParams extends AnyParams = never
+ ParentParams extends AnyParams = never,
>(config: {
id: string;
path: Path;
diff --git a/packages/core-plugin-api/src/routing/types.ts b/packages/core-plugin-api/src/routing/types.ts
index 9ea1e3ff0d..5afcc72265 100644
--- a/packages/core-plugin-api/src/routing/types.ts
+++ b/packages/core-plugin-api/src/routing/types.ts
@@ -21,9 +21,8 @@ export type AnyParams = { [param in string]: string } | undefined;
export type ParamKeys = keyof Params extends never
? []
: (keyof Params)[];
-export type OptionalParams<
- Params extends { [param in string]: string }
-> = Params[keyof Params] extends never ? undefined : Params;
+export type OptionalParams =
+ Params[keyof Params] extends never ? undefined : Params;
// The extra TS magic here is to require a single params argument if the RouteRef
// had at least one param defined, but require 0 arguments if there are no params defined.
@@ -65,7 +64,7 @@ export type SubRouteRef = {
export type ExternalRouteRef<
Params extends AnyParams = any,
- Optional extends boolean = any
+ Optional extends boolean = any,
> = {
readonly [routeRefType]: 'external';
diff --git a/packages/core-plugin-api/src/routing/useRouteRef.tsx b/packages/core-plugin-api/src/routing/useRouteRef.tsx
index 4447759b99..ed261489a4 100644
--- a/packages/core-plugin-api/src/routing/useRouteRef.tsx
+++ b/packages/core-plugin-api/src/routing/useRouteRef.tsx
@@ -48,9 +48,8 @@ export function useRouteRef(
| ExternalRouteRef,
): RouteFunc | undefined {
const sourceLocation = useLocation();
- const versionedContext = useVersionedContext<{ 1: RouteResolver }>(
- 'routing-context',
- );
+ const versionedContext =
+ useVersionedContext<{ 1: RouteResolver }>('routing-context');
const resolver = versionedContext.atVersion(1);
const routeFunc = useMemo(
() => resolver && resolver.resolve(routeRef, sourceLocation),
diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md
index 86a7c3e3fe..318c508211 100644
--- a/packages/create-app/CHANGELOG.md
+++ b/packages/create-app/CHANGELOG.md
@@ -1,5 +1,71 @@
# @backstage/create-app
+## 0.3.34
+
+### Patch Changes
+
+- c189c5da5: fix typo in the comments of EntityPage component
+- 48ea3d25b: The recommended value for a `backstage.io/techdocs-ref` annotation is now
+ `dir:.`, indicating "documentation source files are located in the same
+ directory relative to the catalog entity." Note that `url:` values
+ are still supported.
+- 98dda80b4: Update `techdocs.generators` with the latest `techdocs.generator` config in `app-config.yaml`. See
+ https://backstage.io/docs/features/techdocs/configuration for reference and relevant PR
+ https://github.com/backstage/backstage/pull/6071/files for the changes.
+
+## 0.3.33
+
+### Patch Changes
+
+- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`.
+ - Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core`
+ - This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components.
+ - `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange`
+ - `onChangePage` has been renamed to `onPageChange`
+ - Migration guide is here: https://material-table-core.com/docs/breaking-changes
+- d50c9e7c0: Update the `software-templates` to point to `main` branch instead of `master`
+- 224e54484: Added an `EntityProcessingErrorsPanel` component to show any errors that occurred when refreshing an entity from its source location.
+
+ If upgrading, this should be added to your `EntityPage` in your Backstage application:
+
+ ```diff
+ // packages/app/src/components/catalog/EntityPage.tsx
+
+ const overviewContent = (
+ ...
+
+