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

@opslevel/backstage-maturity-backend

v2.0.2

Published

The official OpsLevel back-end Backstage plugin for fetching catalog and service maturity details.

Downloads

277

Readme

Overall npm

OpsLevel Maturity Backend Plugin

This plugin, in combination with the frontend plugin, provides automatic, scheduled export functionality of users, groups, and components from Backstage into OpsLevel.

Installation

Step 1

In the root directory of your Backstage installation, run the following command:

yarn add --cwd packages/backend @opslevel/backstage-maturity-backend

Step 2

Create a file called opslevel.ts in the packages/backend/src/plugins subdirectory of your Backstage installation and insert the following contents:

import { Router } from 'express';
import { PluginEnvironment } from '../types';
import { OpsLevelBuilder } from '@opslevel/backstage-maturity-backend';

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

  return router;
}

Step 3

Open the index.ts file in the packages/backend/src subdirectory of your Backstage installation with the code editor of your choice.

Step 3.1

Add the following line after the end of the existing import statements:

import opslevel from './plugins/opslevel';

Step 3.2

Add the following statement to the cluster of similar statements near the top of the main() function:

const opslevelEnv = useHotMemoize(module, () => createEnv('opslevel'));

Step 3.3

Add the following statement to the cluster of similar statements a bit further down in the main() function:

apiRouter.use('/opslevel', await opslevel(opslevelEnv));

Step 4

Set up the necessary configuration in your Backstage instance's app-config.yaml. Note: that this configuration is the same as for installing the installing the frontend plugin, if you've already done the changes in app-config.yaml for the frontend plugin, you don't need to do this again.

Set Up the Proxy Configuration

Add a proxy configuration for OpsLevel. Replace <your_OpsLevel_API_token> with a token from https://app.opslevel.com/api_tokens (or, if you're running a self-hosted OpsLevel instance, the /api_tokens page on your OpsLevel instance).

proxy:
  endpoints:
    '/opslevel':
      target: 'https://app.opslevel.com'
      headers:
        X-Custom-Source: backstage
        Authorization: Bearer <your_OpsLevel_API_token>
      allowedHeaders: ['GraphQL-Visibility']

If you're running Self-Hosted OpsLevel, replace target with your URL.

Set Up the Base OpsLevel URL

opslevel:
  baseUrl: 'https://app.opslevel.com'

If you're running Self-Hosted OpsLevel, replace baseUrl with your URL.