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

@byterm/agc-sdk

v0.2.0

Published

AppGallery Connect API SDK for Node.js (Service Account auth)

Readme

@byterm/agc-sdk

A typed Node.js + TypeScript client for the AppGallery Connect (AGC) API, using Service Account authentication. Part of the agc-ts monorepo — see also @byterm/agc-cli for the command-line tool.

Requirements

  • Node.js >= 18 (uses the built-in fetch and WebCrypto)

Install

npm i @byterm/agc-sdk

Authentication (Service Account only)

  1. In AGC → Users and permissions → API key → Connect API → Service Account, create a developer-level Service Account and download the *.private.json credential file.
  2. Pass that file to AgcClient.fromFile(...).

The SDK signs a PS256 JWT (RSASSA-PSS, SHA-256) from key_id, sub_account and private_key, and sends it directly as Authorization: Bearer <jwt>. Tokens are cached and refreshed automatically (1 h lifetime, refreshed ~5 min early). There is no separate token-exchange step for Service Account auth.

Keep the credential file secret — never commit it.

Usage

import { AgcClient } from '@byterm/agc-sdk';

const agc = AgcClient.fromFile('./my-key.private.json', { site: 'CN' });

const res = await agc.publishing.getAppInfo({ appId: '1234567890', lang: 'zh-CN' });
console.log(res.appInfo?.versionNumber);

// Upload a package and bind it
const { objectId } = await agc.upload.uploadFile({ appId: '1234567890', filePath: './app.app' });
await agc.publishing.updatePackageInfo('1234567890', { fileName: 'app.app', objectId });
await agc.publishing.submitPublish({ appId: '1234567890' });

Errors are typed: AgcCredentialsError, AgcHttpError (transport/non-2xx), AgcApiError (2xx with non-zero ret.code). The client automatically checks the ret envelope and throws AgcApiError on business failures.

Resource coverage

agc.publishing, agc.provisioning, agc.testing, agc.reports, agc.upload, agc.domain — covering the Publishing, Provisioning, Testing, Reports, Upload Management and Domain Management API groups. Method names map 1:1 to AGC endpoints. For anything not yet wrapped, drop to the raw client: agc.http.get(...) / .post(...) etc., which still applies auth and the ret check.

Region sites

| Site | Domain | | --- | --- | | CN | connect-api.cloud.huawei.com | | DE | connect-api-dre.cloud.huawei.com | | SG | connect-api-dra.cloud.huawei.com | | RU | connect-api-drru.cloud.huawei.com |

The site must match the project's configured data-processing location.

License

MIT © Term