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

@qontinui/wrapper-gmail

v0.1.0

Published

UI Bridge wrapper — Gmail REST API (api transport only).

Readme

@qontinui/wrapper-gmail

Api-only UI Bridge wrapper for Gmail. Exposes five semantic actions:

| Action | Params | Result | | ------------- | ------------------------------------------ | ----------------------------------- | | list-unread | { limit?: number, query?: string } | { messages: MessageSummary[] } | | search | { query: string, limit?: number } | { messages: MessageSummary[] } | | get-thread | { threadId: string } | { thread: ThreadDetail } | | send-reply | { threadId: string, body: string } | { id, threadId } | | archive | { messageId: string } | { success: true } |

Each action is wrapped in withRetry({ attempts: 3, baseMs: 250 }) and withAuthRefresh so transient failures and expired access tokens recover automatically.

Setup

cp .env.example .env
# Fill in GMAIL_OAUTH_CLIENT_ID, GMAIL_OAUTH_CLIENT_SECRET,
# and GMAIL_REFRESH_TOKEN. See "Getting credentials" below.

Getting credentials

  1. Create a Google Cloud OAuth client. In the Google Cloud Console, create (or pick) a project, enable the Gmail API, and add an OAuth 2.0 Client ID of type Desktop application. Google's OAuth desktop guide covers the console steps in detail; we don't reproduce them here.

  2. Set the client id + secret in your environment. Copy .env.example to .env and fill in the two values from the credential you just created:

    GMAIL_OAUTH_CLIENT_ID=...
    GMAIL_OAUTH_CLIENT_SECRET=...
  3. Run the loopback setup script to mint a refresh token. The credentials must already be exported in your shell — the script reads them from process.env (it does not load .env itself):

    # from the repo root
    set -a; . packages/wrapper-gmail/.env; set +a   # POSIX shells
    pnpm --filter @qontinui/wrapper-gmail exec gmail-oauth-setup

    PowerShell equivalent:

    Get-Content packages/wrapper-gmail/.env | ForEach-Object {
      if ($_ -match '^([^=#]+)=(.*)$') { Set-Item "env:$($Matches[1])" $Matches[2] }
    }
    pnpm --filter @qontinui/wrapper-gmail exec gmail-oauth-setup

    The script picks an ephemeral loopback port, prints the consent URL (and best-effort opens it in your browser), waits for Google to redirect to http://127.0.0.1:<port>/oauth/callback, exchanges the auth code for tokens, and prints the refresh token in copy-pasteable form.

  4. Paste GMAIL_REFRESH_TOKEN into .env. That's it — the wrapper is now ready and auth.ts will pick the value up at runtime.

The script always re-prompts for consent (prompt=consent) so each run mints a fresh refresh token; the previous one keeps working until you revoke it at https://myaccount.google.com/permissions.

Entry points

  • React (@qontinui/wrapper-gmail): default export GmailWrapper. Renders <WrapperAppShell> and registers the component with UI Bridge.
  • Node (@qontinui/wrapper-gmail/node): spins up the transport and parks on SIGINT. No React imports.

Scripts

npm run build      # tsup (cjs+esm) + tsc (.d.ts)
npm run typecheck  # tsc --noEmit
npm run test       # vitest