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

@vkma.dev/bridge

v0.2.2

Published

Independent VK Bridge for VK Mini Apps — drop-in API, built-in devtools tap

Readme

@vkma.dev/bridge

npm minzip

Independent VK Bridge for VK Mini Apps. Drop-in classic API (send / subscribe / supportsAsync / …) plus a built-in observability tap, per-send timeout/abort and a configurable request_id policy.

Types come from @vkma.dev/bridge-schema — the catalogue of every platform event as data, with an open interface for your own events.

Install

npm install @vkma.dev/bridge
# or: pnpm add / yarn add / bun add

Use

import bridge from "@vkma.dev/bridge";

await bridge.send("VKWebAppInit");
const user = await bridge.send("VKWebAppGetUserInfo");

// every classic subscribe returns its own off — no unsubscribe bookkeeping
const off = bridge.subscribe(event => {
    // event.detail.type / event.detail.data — every event from the host
});

Or build isolated instances (own tap, own pairing state):

import { createVKBridge } from "@vkma.dev/bridge";

const bridge = createVKBridge("1.0.0", {
    // the version string is reported to the web host
    requestId: { generator: sequence => `req-${sequence}` },
});

Beyond the classic API

Everything lives on the instance — no extra imports:

// Every outgoing send / incoming event, always on, replayed to late subscribers
const off = bridge.onSend(event => log(event.name, event.payload));
const off2 = bridge.onEvent(event => log(event.name, event.ok));

// Per-send controls
await bridge.send("VKWebAppGetUserInfo", undefined, { timeout: 5000 });
await bridge.send("VKWebAppShowWallPostBox", props, { signal: controller.signal });

// request_id policy (default: auto-inject __vkma_<n>, that's what pairing uses)
createVKBridge("1.0.0", { requestId: { inject: false } });

The page-wide default instance also publishes the devtools handle on globalThis.__vkmaDevtoolsBridge ({ tap, send }) — that's the contract the VKMA devtools collector observes. Importing the package is enough; no opt-in.

Types & custom events

All payload types and the three catalogue maps are re-exported here. To teach the bridge your own (or your proxy backend's) events, extend the schema package — send, subscribe and every consumer of the types pick it up:

declare module "@vkma.dev/bridge-schema" {
    interface RequestPropsMap {
        VKWebAppMyCustomMethod: { foo: string };
    }
    interface ReceiveDataMap {
        VKWebAppMyCustomMethodResult: { bar: number };
    }
    interface ReceiveEventMap {
        VKWebAppMyCustomMethod: {
            result: "VKWebAppMyCustomMethodResult";
            failed: "VKWebAppMyCustomMethodFailed";
        };
    }
}

The rules live in @vkma.dev/bridge-schema — augment that package's root, extend only.

Transports

Web (iframe postMessage with the vk-connect envelope), Android WebView, iOS WebView and React Native WebView — with receive-side message / VKWebAppEvent listeners to match. The web transport is covered by the automated suite; the mobile WebView transports follow the platform host contracts.

License

MIT.