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

@open-xchange/playwright-hindsight

v0.1.1

Published

Playwright reporter for sending test results to Hindsight

Readme

@open-xchange/playwright-hindsight

Playwright reporter that sends test results to Hindsight.

Installation

npm install @open-xchange/playwright-hindsight

Configuration

In your playwright.config.ts:

import { defineConfig } from '@playwright/test'

export default defineConfig({
  reporter: [
    ['list'],
    ['@open-xchange/playwright-hindsight', {
      url: 'https://hindsight.example.com',
      project: 'my-project',
      client: 'playwright',
    }],
  ],
})

Options

All options can also be set via environment variables — useful for CI pipelines.

| Option | Env var | Default | Description | |--------|---------|---------|-------------| | url | HINDSIGHT_URL | http://localhost:8080 | Hindsight API base URL | | branch | CI_COMMIT_REF_NAME | local | Git branch name | | project | CI_PROJECT_PATH | hindsight | Project identifier | | pipelineId | CI_PIPELINE_ID | — | CI pipeline ID | | client | — | playwright | Client identifier | | deployment | REPORT_PROJECT | — | Deployment identifier | | clientId | HINDSIGHT_CLIENT_ID | — | OIDC client ID | | clientSecret | HINDSIGHT_CLIENT_SECRET | — | OIDC client secret | | tokenEndpoint | HINDSIGHT_TOKEN_ENDPOINT | — | Keycloak token endpoint |

Options passed in the config take precedence over environment variables.

Authentication

When clientId, clientSecret, and tokenEndpoint are provided (via options or env vars), the reporter authenticates using the OIDC client credentials flow. The token is cached and refreshed automatically.

When credentials are not configured, requests are sent without authentication — suitable for local development against an unprotected API.

What gets reported

After all tests complete, the reporter sends a single batch request to POST /api/v1/test-runs containing:

| Field | Source | |-------|--------| | feature | Test suite title (test.parent.title) | | scenario | Test title | | state | passed, failed, or skipped (timeouts → failed) | | duration_ms | Test duration | | time | Test start time (ISO 8601) | | branch | From options or CI_COMMIT_REF_NAME | | project | From options or CI_PROJECT_PATH | | pipeline_id | From options or CI_PIPELINE_ID | | client | From options (default: playwright) |

CI example (GitLab)

e2e tests:
  variables:
    HINDSIGHT_URL: https://hindsight.example.com
    HINDSIGHT_TOKEN_ENDPOINT: https://keycloak.example.com/realms/my-realm/protocol/openid-connect/token
    # HINDSIGHT_CLIENT_ID and HINDSIGHT_CLIENT_SECRET set as masked CI/CD variables
  script:
    - npx playwright test

Token provider utility

The package also exports createTokenProvider for use in custom setup scripts (e.g., seeding test data):

import { createTokenProvider } from '@open-xchange/playwright-hindsight'

const provider = createTokenProvider({
  clientId: process.env.HINDSIGHT_CLIENT_ID,
  clientSecret: process.env.HINDSIGHT_CLIENT_SECRET,
  tokenEndpoint: process.env.HINDSIGHT_TOKEN_ENDPOINT,
})

const token = await provider.getToken()

Error handling

API errors are logged as warnings — they never fail the test run.

License

AGPL-3.0-or-later