feat: added support for new backend system in scaffolder actions module
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -1 +1,7 @@
|
||||
import { scaffolderModule } from './module';
|
||||
|
||||
/*
|
||||
@deprecated - this way of importing modules will soon be unsupported, and you should use `backend.add(import(...))` instead.
|
||||
*/
|
||||
export { createAcmeExampleAction } from './example';
|
||||
export default scaffolderModule;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { createBackendModule } from "@backstage/backend-plugin-api";
|
||||
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
|
||||
import { createAcmeExampleAction } from "./example";
|
||||
|
||||
/**
|
||||
* A backend module that registers the action into the scaffolder
|
||||
*/
|
||||
export const scaffolderModule = createBackendModule({
|
||||
moduleId: 'acme:example',
|
||||
pluginId: 'scaffolder',
|
||||
register({ registerInit }) {
|
||||
registerInit({
|
||||
deps: {
|
||||
scaffolderActions: scaffolderActionsExtensionPoint
|
||||
},
|
||||
async init({ scaffolderActions}) {
|
||||
scaffolderActions.addActions(createAcmeExampleAction());
|
||||
}
|
||||
});
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user