🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@code-pushup/portal-client

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-pushup/portal-client

Type definitions and client for uploading report to portal.

npmnpm
Version
0.14.1
Version published
Weekly downloads
2.5K
86.77%
Maintainers
3
Weekly downloads
 
Created
Source

Code PushUp portal client

Type definitions and client for uploading report to portal.

Setup

npm install @code-pushup/portal-client

Usage

Upload report to portal

import { uploadToPortal } from '@code-pushup/portal-client';

// ...

const report = await uploadToPortal({
  server: '<GRAPHQL URL>',
  apiKey: process.env.CODE_PUSHUP_API_KEY,
  data: {
    organization: '<ORGANIZATION SLUG>',
    project: '<PROJECT SLUG>',
    commit: '<COMMIT SHA>',
    plugins: [
      // ...
    ],
    categories: [
      // ...
    ],
    // ...
  },
});
import { getPortalComparisonLink } from '@code-pushup/portal-client';

// ...

const url = await getPortalComparisonLink({
  server: '<GRAPHQL URL>',
  apiKey: process.env.CODE_PUSHUP_API_KEY,
  parameters: {
    organization: '<ORGANIZATION SLUG>',
    project: '<PROJECT SLUG>',
    before: '<COMMIT SHA_1>',
    after: '<COMMIT SHA_2>',
  },
});

Download report from portal

import { downloadFromPortal } from '@code-pushup/portal-client';

// ...

const report = await downloadFromPortal({
  server: '<GRAPHQL URL>',
  apiKey: process.env.CODE_PUSHUP_API_KEY,
  parameters: {
    organization: '<ORGANIZATION SLUG>',
    project: '<PROJECT SLUG>',
    /* OPTIONAL: if commit not provided, finds latest report in default branch */
    // commit: '<COMMIT SHA>',
    /* OPTIONAL: opt in to including audit details (issues, trees, etc.), omitted by default to minimize payload */
    // withDetails: true,
  },
});

FAQs

Package last updated on 01 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts