update all usages of ApiBlueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
```ts
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ApiRef } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { CustomFieldValidator } from '@backstage/plugin-scaffolder-react';
|
||||
@@ -218,9 +220,13 @@ export const formFieldsApi: ExtensionDefinition<{
|
||||
};
|
||||
kind: 'api';
|
||||
name: 'form-fields';
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
|
||||
// @alpha @deprecated (undocumented)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import {
|
||||
ApiBlueprint,
|
||||
createApiFactory,
|
||||
createExtensionInput,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import { formFieldsApiRef } from './ref';
|
||||
@@ -53,12 +52,12 @@ export const formFieldsApi = ApiBlueprint.makeWithOverrides({
|
||||
e.get(FormFieldBlueprint.dataRefs.formFieldLoader),
|
||||
);
|
||||
|
||||
return originalFactory({
|
||||
factory: createApiFactory({
|
||||
return originalFactory(define =>
|
||||
define({
|
||||
api: formFieldsApiRef,
|
||||
deps: {},
|
||||
factory: () => new DefaultScaffolderFormFieldsApi(formFieldLoaders),
|
||||
}),
|
||||
});
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user