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

@uppercut-labs/android-app-links

v0.1.0

Published

Serve Android App Links for a web product: the assetlinks.json Digital Asset Links file from package names and signing fingerprints, and a branded sign-in return page, as a function from Request to Response.

Readme

@uppercut-labs/android-app-links

Serves Android App Links for a web product from one function. It answers two paths and returns null for every other:

  • GET /.well-known/assetlinks.json: the Digital Asset Links statements for the product's debug and release Android apps, built from package names and signing-certificate fingerprints.
  • GET /android/callback: the sign-in return path an installed app intercepts as a verified App Link. In a browser, where the app is not installed, it is a branded page that says to open the app. The page is built only from the brand you pass, never from the URL, so it cannot reflect the authorization code or state it was sent.
npm install @uppercut-labs/android-app-links

What runs where

TypeScript compiled to ESM JavaScript. It is server code that takes a standard Request and returns a Response, so it runs in Node 18 or later, Deno, Bun and Cloudflare Workers with Node compatibility turned on (it imports node:crypto to hash the page style). It runs on any OS. Nothing here is PowerShell or Bash. The commands under Working on it work in PowerShell on Windows and in Bash on macOS and Linux.

Example

import { handleAndroidLinks, type CallbackBrand } from '@uppercut-labs/android-app-links';

const brand: CallbackBrand = {
  name: 'Notes',
  logo: '/icon.svg',
  homeHref: '/',
  colors: { base: '#0c1016', glow: '#1b2b43', button: '#dceafd', buttonBorder: '#cadcf5', buttonText: '#0c203c', focus: '#8db8f2' },
};

export default {
  async fetch(request: Request, env: Record<string, string>) {
    const answered = handleAndroidLinks(request, {
      debugPackage: env.ANDROID_DEBUG_PACKAGE,
      debugCertSha256: env.ANDROID_DEBUG_CERT_SHA256,
      releasePackage: env.ANDROID_RELEASE_PACKAGE,
      releaseCertSha256: env.ANDROID_RELEASE_CERT_SHA256,
    }, brand);
    if (answered) return answered; // null for every other path
    return new Response('Not found', { status: 404 });
  },
};

assetlinks.json lists each build whose package and fingerprints are both set. It is 404 when none is, and 503 when a value is malformed. A build with a package but no fingerprints yet (a release key that does not exist yet) is left out. The callback page carries a Content-Security-Policy that allows only its own hashed style; keep that policy when you add your own headers. Both paths answer GET and HEAD; any other method gets 405.

Exports

| Export | What it is | | --- | --- | | handleAndroidLinks(request, settings, brand) | Answers the two paths, or returns null | | androidTargets(settings) | The apps to declare, as { packageName, fingerprints }. Throws AndroidLinksConfigError on a malformed package name or fingerprint | | assetLinks(targets) | The Digital Asset Links statement list for those apps | | parseFingerprints(value) | Splits, upper-cases and de-duplicates a comma-separated list of SHA-256 fingerprints (AA:BB:..., 32 bytes); throws on a malformed entry | | callbackPage(brand) | { html, styleHash }: the page and the base64 SHA-256 of its inline style, for a CSP | | ASSET_LINKS_PATH, ANDROID_CALLBACK_PATH | The two paths | | AndroidLinksConfigError | Thrown for malformed configuration |

Types: AndroidAppSettings, AndroidAppTarget, CallbackBrand.

The logo is shown at its own proportions, with no rounding, mask or clipping. The brand values are HTML-escaped.

Working on it

From the repository root:

npm install
npm run check

License

MIT