update all usages of ApiBlueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
```ts
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { defaultEntityContentGroups } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
@@ -33,9 +35,13 @@ const _default: FrontendPlugin<
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/auth-providers': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -48,9 +54,13 @@ const _default: FrontendPlugin<
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/cluster-link-formatter': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -63,9 +73,13 @@ const _default: FrontendPlugin<
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/proxy': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -78,9 +92,13 @@ const _default: FrontendPlugin<
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'entity-content:kubernetes/kubernetes': ExtensionDefinition<{
|
||||
kind: 'entity-content';
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
discoveryApiRef,
|
||||
fetchApiRef,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
@@ -41,8 +40,8 @@ import {
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
export const kubernetesApiExtension = ApiBlueprint.make({
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: define =>
|
||||
define({
|
||||
api: kubernetesApiRef,
|
||||
deps: {
|
||||
discoveryApi: discoveryApiRef,
|
||||
@@ -56,13 +55,12 @@ export const kubernetesApiExtension = ApiBlueprint.make({
|
||||
kubernetesAuthProvidersApi,
|
||||
}),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export const kubernetesProxyApi = ApiBlueprint.make({
|
||||
name: 'proxy',
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: define =>
|
||||
define({
|
||||
api: kubernetesProxyApiRef,
|
||||
deps: {
|
||||
kubernetesApi: kubernetesApiRef,
|
||||
@@ -72,13 +70,12 @@ export const kubernetesProxyApi = ApiBlueprint.make({
|
||||
kubernetesApi,
|
||||
}),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export const kubernetesAuthProvidersApi = ApiBlueprint.make({
|
||||
name: 'auth-providers',
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: define =>
|
||||
define({
|
||||
api: kubernetesAuthProvidersApiRef,
|
||||
deps: {
|
||||
gitlabAuthApi: gitlabAuthApiRef,
|
||||
@@ -109,13 +106,12 @@ export const kubernetesAuthProvidersApi = ApiBlueprint.make({
|
||||
});
|
||||
},
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export const kubernetesClusterLinkFormatterApi = ApiBlueprint.make({
|
||||
name: 'cluster-link-formatter',
|
||||
params: {
|
||||
factory: createApiFactory({
|
||||
params: define =>
|
||||
define({
|
||||
api: kubernetesClusterLinkFormatterApiRef,
|
||||
deps: { googleAuthApi: googleAuthApiRef },
|
||||
factory: deps => {
|
||||
@@ -126,5 +122,4 @@ export const kubernetesClusterLinkFormatterApi = ApiBlueprint.make({
|
||||
});
|
||||
},
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user