npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@janus-idp/backstage-plugin-catalog-backend-module-scaffolder-relation-processor-dynamic

v1.3.2

Published

The scaffolder-relation-processor backend module for the catalog plugin.

Downloads

14

Readme

❗DEPRECATED❗

This package has been deprecated.

Please use the @backstage-community/plugin-catalog-backend-module-scaffolder-relation-processor package instead.

Catalog Backend Module for Scaffolder Relation Catalog Processor

This is an extension module to the catalog-backend plugin, providing an additional catalog entity processor that adds a new relation that depends on the spec.scaffoldedFrom field to link scaffolder templates and the catalog entities they generated.

Getting Started

  1. Install the scaffolder relation catalog processor module using the following command:

    yarn workspace backend add @janus-idp/backstage-plugin-catalog-backend-module-scaffolder-relation-processor

Installing on the new backend system

To install this module into the new backend system, add the following into the packages/backend/src/index.ts file:

const backend = createBackend();

// highlight-add-start
backend.add(
  import(
    '@janus-idp/backstage-plugin-catalog-backend-module-scaffolder-relation-processor/alpha'
  ),
);
// highlight-add-end

backend.start();

Installing on the legacy backend system

To install this module into the legacy backend system, add the following to the packages/backend/src/plugins/catalog.ts file:

// highlight-add-start
import { ScaffolderRelationEntityProcessor } from '@janus-idp/backstage-plugin-catalog-backend-module-scaffolder-relation-processor';

// highlight-add-end

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  const builder = await CatalogBuilder.create(env);

  /* ... other processors and/or providers ... */
  // highlight-add-start
  builder.addProcessor(new ScaffolderRelationEntityProcessor());
  // highlight-add-end

  const { processingEngine, router } = await builder.build();
  await processingEngine.start();

  return router;
}

Usage

Catalog entities containing the spec.scaffoldedFrom field will have a relation link be formed between it and the template corresponding to the entity ref in the spec.scaffoldedFrom field.

This link can be viewed in the relations field of the Raw YAML view of a catalog entity when inspecting an entity. In the entity with the spec.scaffoldedFrom field, the relation type is scaffoldedFrom with a target pointing to the value of the spec.scaffoldedFrom field. Conversely, for the target template, it will have a relation type of ScaffolderOf with a target pointing to the entity with the spec.scaffoldedFrom field.

These relations should also appear on the EntityCatalogGraphView component from the @backstage/plugin-catalog-graph package (only if the entity corresponding to the entity ref exists in the catalog).

Example graph view

scaffoldedFrom Relation Graph View scaffolderOf Relation Graph View

Example Raw YAML view

scaffoldedFrom Relation YAML View scaffoldedOf Relation YAML View