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

@bielu/scalar-grpc-standalone

v0.1.0

Published

Standalone browser bundle for @bielu/scalar-grpc. Includes Scalar and the plugin in one script.

Downloads

70

Readme

@bielu/scalar-grpc

An interactive gRPC console plugin for the Scalar API Reference.

It reads the grpc bindings from your AsyncAPI document(s) and renders a panel where you can pick a service, edit a JSON request prefilled from the payload schema, and invoke unary and server-streaming methods live — over gRPC-Web (browsers cannot speak native gRPC). Client- and bidirectional-streaming methods are rendered as documentation with a "not invokable from the browser" badge.

Because AsyncAPI payload schemas are JSON Schema (no protobuf field numbers), the console encodes wire messages from real protobuf descriptors fetched from the companion .NET package's {assetsPath}/descriptors endpoint (a serialized FileDescriptorSet), using @bufbuild/protobuf + @connectrpc/connect-web — fully dynamic, no codegen in the browser.

This package is produced from, and consumed by, the Bielu.AspNetCore.AsyncApi.Scalar.Grpc .NET package (which embeds the built bundle), but it is also published standalone to npm so it can be loaded from a CDN or bundled by hand.

Server prerequisites

The target ASP.NET Core app must:

  1. enable gRPC-Web: app.UseGrpcWeb(new GrpcWebOptions { DefaultEnabled = true }) (package Grpc.AspNetCore.Web), and
  2. serve the descriptor endpoint: app.MapScalarGrpcAssets() (package Bielu.AspNetCore.AsyncApi.Scalar.Grpc).

When the page and the gRPC server are on different origins, CORS must allow the gRPC-Web response headers: grpc-status and grpc-message need to be exposed (policy.WithExposedHeaders("Grpc-Status", "Grpc-Message", "Grpc-Encoding", "Grpc-Accept-Encoding")).

Standalone usage (CDN)

<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/@bielu/scalar-grpc"></script>
<script>
  window.__BIELU_SCALAR_GRPC__ = {
    documents: [{ name: 'grpc', url: '/asyncapi/grpc.json' }],
  }
  Scalar.createApiReference('#app', {
    sources: [{ url: '/asyncapi/grpc.json' }],
  })
</script>

The gRPC documents can be provided either via the global window.__BIELU_SCALAR_GRPC__ or inline on the Scalar config as config.grpc.

Programmatic usage

import { createGrpcPlugin } from '@bielu/scalar-grpc'

Scalar.createApiReference('#app', {
  sources: [{ url: '/asyncapi/grpc.json' }],
  plugins: [createGrpcPlugin()],
})

Auth

The console picks up the credentials entered in Scalar's Authentication panel (Scalar ≥ 2.16.12) and maps them onto gRPC-Web call metadata: header API keys, Authorization: Bearer … and HTTP Basic all map directly (gRPC-Web metadata is plain HTTP headers). Additional per-call metadata can be entered in the console's metadata editor.

Building

npm install
npm run build   # → dist/plugin.js (IIFE) + dist/standalone.js (Scalar + plugin) + dist/types

The build inlines the private @bielu/scalar-core workspace package (document discovery, auth state, schema examples, Scalar bootstrap) — see that package's README for the shared contract.

dist/plugin.js hooks an already-loaded Scalar (MapScalarGrpcAssets() serves it next to Scalar's own bundle). dist/standalone.js prepends Scalar's prebuilt browser bundle for pages where nothing else loads Scalar — it is what ScalarAspireOptions.BundleUrl is pointed at in the Aspire setup, since that option replaces Scalar's bundle.