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

@dogmatiq/protobuf

v0.8.0

Published

Protocol Buffers and gRPC definitions for Dogma

Readme

Dogma Protocol Buffers Schema

The Protocol Buffers and gRPC schema used by Dogma engines and their clients.

Documentation Latest Version Build Status Code Coverage

This repository contains Dogma's schema — the .proto definitions for envelopes, identities, UUIDs and the engine's messaging gRPC APIs. It is not a Protocol Buffers implementation.

Each release publishes generated code for every supported language from a single tag:

  • Go — the github.com/dogmatiq/protobuf module
  • TypeScript and JavaScript — the @dogmatiq/protobuf npm package

Both include the .proto files at the same paths they have in this repository, so that other schemas can import them, for example:

import "github.com/dogmatiq/protobuf/uuidpb/uuid.proto";

Packages

| Package | Protocol Buffers package | Contents | | --------------- | ------------------------ | ------------------------------------------ | | uuidpb | dogma.protobuf.v1 | UUID | | identitypb | dogma.protobuf.v1 | Identity | | envelopepb | dogma.protobuf.v1 | Envelope, MultiEnvelope and extensions | | messaginggrpc | dogma.messaging.v1 | The event stream consumer API |

Message data

The engine treats Message.data as opaque. The message type, identified by Message.type_id, determines how the data is decoded. Applications that exchange messages between programs written in different languages must use an encoding that every participating language can decode. We recommend Protocol Buffers.

TypeScript

The npm package is ESM-only. It uses protobuf-es as its runtime.

npm install @dogmatiq/protobuf

Each package has its own entry point:

import { getExtension } from "@dogmatiq/protobuf/envelopepb";
import { uuidToString } from "@dogmatiq/protobuf/uuidpb";

The package doesn't depend on any gRPC library. The generated service descriptors work with any transport that supports protobuf-es, such as Connect-ES, whose gRPC transport is compatible with grpc-go clients and servers.

uint64 and int64 fields, such as event stream offsets and the components of a UUID, are represented as bigint values.

Importing from your own schema

If your own .proto files import Dogma's, tell protoc where to find them, and tell protoc-gen-es to import the generated code from this package:

protoc \
  --proto_path=. \
  --proto_path=github.com/dogmatiq/protobuf=node_modules/@dogmatiq/protobuf \
  --plugin=protoc-gen-es=node_modules/.bin/protoc-gen-es \
  --es_out=. \
  --es_opt=target=ts,import_extension=js \
  --es_opt=map_imports=github.com/dogmatiq/protobuf/:@dogmatiq/protobuf \
  your/schema.proto

The generated code then imports from paths such as @dogmatiq/protobuf/github.com/dogmatiq/protobuf/uuidpb/uuid_pb.js, which the package exports for this purpose.