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 🙏

© 2026 – Pkg Stats / Ryan Hefner

product-pages

v1.0.0

Published

A NodeJS module to access Product Pages (PP) through the REST API.

Readme

Product Pages

npm version Tests Linters CodeQL codecov

Typesafe access to Red Hat's Product Pages REST API.

Installation

npm install product-pages

For Kerberos authentication, also install the optional kerberos peer dependency:

npm install kerberos

API

Creating the API instance

import ProductPagesAPI from 'product-pages';

No authentication (public endpoints only)

const api = new ProductPagesAPI('https://productpages.redhat.com/api/v7');

OIDC client credentials (JWT)

Obtain a JWT access token automatically using the OAuth2 client credentials grant. The token is cached and refreshed automatically before expiry.

const api = new ProductPagesAPI('https://pp.engineering.redhat.com/api/v7', {
  type: 'oidc',
  tokenEndpoint: 'https://auth.redhat.com/auth/realms/EmployeeIDP/protocol/openid-connect/token',
  clientId: process.env.OIDC_CLIENT_ID,
  clientSecret: process.env.OIDC_CLIENT_SECRET,
});

Kerberos (SPNEGO)

Authenticate using a Kerberos ticket. Requires the kerberos npm package and a valid Kerberos ticket (personal or service account).

const api = new ProductPagesAPI('https://pp.engineering.redhat.com/api/v7', {
  type: 'kerberos',
});

You can optionally specify a custom authenticate endpoint:

const api = new ProductPagesAPI('https://pp.engineering.redhat.com/api/v7', {
  type: 'kerberos',
  authenticateEndpoint: 'https://pp.engineering.redhat.com/oidc/authenticate',
});

API key (Bearer token)

Pass an API key directly as a Bearer token:

// Using AuthOptions object
const api = new ProductPagesAPI('https://pp.engineering.redhat.com/api/v7', {
  type: 'apiKey',
  apiKey: 'your-api-key',
});

// Or pass the API key as a string (shorthand)
const api = new ProductPagesAPI('https://pp.engineering.redhat.com/api/v7', 'your-api-key');

Get the current user

Documentation: GET /whoami

const whoami: WhoamiResponse = await api.whoami();
const whoami: unknown = await api.whoami(false);

Get the releases for a product

Documentation: GET /releases/<id_or_shortname>

const releases: ReleasesResponse = await api.releases('rhel-8.2.0');
const releases: unknown = await api.releases('rhel-8.2.0', false);

Get the schedules for a release

Documentation: GET /releases/<id_or_shortname>/schedule-tasks

const schedules: ReleasesScheduleTasksResponse = await api.releasesScheduleTasks('rhel-8.2.0');
const schedules: ReleasesScheduleTasksResponse = await api.releasesScheduleTasks('rhel-8.2.0', {
  name__regex: '.*Special Event.*',
});
const schedules: unknown = await api.releasesScheduleTasks('rhel-8.2.0', false);

[!TIP] You can use the following options to filter the schedule tasks:

  • fields: The fields to return. Defaults to all fields.
  • search: The search query.
  • ordering: The ordering of the schedules.
  • name__regex: The regex to filter the schedule tasks by name.

Auth Options Types

The library exports TypeScript types for all authentication options:

import type { AuthOptions, OIDCAuthOptions, KerberosAuthOptions, ApiKeyAuthOptions } from 'product-pages';

Development

# Install dependencies
yarn install

# Build
yarn build

# Run unit tests
yarn test

# Run integration tests (requires credentials)
OIDC_CLIENT_ID=... OIDC_CLIENT_SECRET=... yarn test

# Format code
yarn format