@tduniec/backstage-plugin-catalog-backend-module-time-saver-processor
v1.1.0
Published
The time-saver-processor backend module for the catalog plugin.
Maintainers
Readme
Time Saver - catalog processor
The Time Saver plugin provides an implementation of charts and statistics
related to your time savings that are coming from usage of your templates. This
catalog module translates granular Time Saver metadata stored on your template
definitions into the more coarse backstage.io/time-saved metadata annotation,
which may be leveraged by the Analytics API.
Installation
Install the plugin package in your Backstage backend:
# From your Backstage root directory yarn add --cwd packages/backend @tduniec/backstage-plugin-catalog-backend-module-time-saver-processorWire up the processor in your backend.
Add the
TimeSaverProcessorto the catalog plugin inpackages/backend/src/catalog.ts.+ import { + TimeSaverProcessor, + } from '@tduniec/backstage-plugin-catalog-backend-module-time-saver-processor'; import { Router } from 'express'; import { PluginEnvironment } from '../types'; export default async function createPlugin( env: PluginEnvironment, ): Promise<Router> { const builder = CatalogBuilder.create(env); + builder.addProcessor(new TimeSaverProcessor(logger)); // ... return router; }New Backend System
If you are using the New Backend System, you can instead do so by updating your
packages/backend/src/index.tsin the following way:import { createBackend } from '@backstage/backend-defaults'; const backend = createBackend(); backend.add(import('@backstage/plugin-app-backend/alpha')); + backend.add(import('@tduniec/backstage-plugin-catalog-backend-module-time-saver-processor')); // ... backend.start();
