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

@kellyson/plugin-pact-broker

v0.1.0

Published

Website: [https://docs.pact.io/](https://docs.pact.io/)

Downloads

3

Readme

Pact-Broker Plugin

Website: https://docs.pact.io/

Screenshots

Setup

  1. If you have a standalone app (you didn't clone this repo), then do
# From your Backstage root directory
yarn add --cwd packages/app @backstage/plugin-pact-broker
  1. Add the EntityPactBrokerContentTab extension to the entity page in your app:
// In packages/app/src/components/catalog/EntityPage.tsx
import {
  EntityPactBrokerContentTab,
  isPactBrokerAvailable,
} from '@backstage/plugin-pact-broker';

// For example in the website entity section
const websiteEntityPage = (
  <EntityLayout>
    
    ...

    <EntityLayout.Route if={isPactBrokerAvailable} path="/pact-broker-frontend" title="Pacts">
      <EntityPactBrokerContent />
    </EntityLayout.Route> 

  </EntityLayout>
  1. Add proxy config:
  • If you are using Pactflow service:
# In app-config.yaml
proxy:
  '/pactbroker':
    target: https://{ACCOUNT_NAME}.pactflow.io # by example: https://xyz.pactflow.io
    headers:
      Authorization: Bearer {PACTFLOW_API_TOKEN}

Note: Get and provide a PACTFLOW_API_TOKEN as an environment variable (see the Pactflow docs).

  • If you are using self-hosting Pact Broker:
# In app-config.yaml
'/pactbroker':
    target: {YOUR_PACT_BROKER_URL_HOST} # by example: http:// localhost:9080
    headers:
      Authorization: Basic {PACT_BROKER_TOKEN}

Note: Get and provide a PACT_BROKER_TOKEN as an environment variable (see the RFC 7617).

  1. Add an annotation to your respective catalog-info.yaml files, with the format pactbroker/consumer-provider: <consumerName>:<providerName> (See reference in ADR002).
# Example catalog-info.yaml entity definition file
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    pactbroker/consumer-provider: 'ExampleApp-ExampleAPI'
spec:
  type: service
  # ...

Features

  • List all published pacts between consumer and provider
  • Pagination for pacts