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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@matsumana/centraldogma-nodejs

v0.6.1

Published

Central Dogma client for Node.js

Downloads

1,060

Readme

Central Dogma client for Node.js

npm version npm bundle size Dependencies npm downloads

CircleCI Known Vulnerabilities

This is an "unofficial" client library for Central Dogma.

What is Central Dogma?

Central Dogma is an open-source, highly-available and version-controlled service configuration repository

Please visit the official web site for more information.

In Central Dogma, there are various use cases.

e.g.

  • Service discovery
  • Managing Rate limit configuration
  • Managing A/B testing configuration
  • etc

If you refer to a Central Dogma server via client library, an app can get a change immediately.

It means that no need to restart your app for applying that changes.

Configure something that you want to apply changes without restarting your server application.

How to use this client library

How to install

$ npm i @matsumana/centraldogma-nodejs

How to watch a file managed by Central Dogma

You can get changes via EventEmitter continuously.

Please refer to the examples for more details.

import { CentralDogma } from '@matsumana/centraldogma-nodejs';

const centralDogma = new CentralDogma({
    baseURL: 'http://localhost:36462',
});

const emitter = centralDogma.watch.watchFile({
    project: 'project1',
    repo: 'repo1',
    filePath: '/example_config.json',
});

If you want to develop admin application to change configurations managed by Central Dogma

get a file

import { CentralDogma } from '@matsumana/centraldogma-nodejs';

const centralDogma = new CentralDogma({
    baseURL: 'http://localhost:36462',
});

const entry = await centralDogma.content.getFile({
    project: 'project1',
    repo: 'repo1',
    query: {
        path: '/example_config.json',
        type: QueryTypes.Identity,
    },
});

register or change files

import { CentralDogma } from '@matsumana/centraldogma-nodejs';

const centralDogma = new CentralDogma({
    baseURL: 'http://localhost:36462',
});

const result = await centralDogma.content.push({
    project: 'project1',
    repo: 'repo1',
    baseRevision: 'HEAD',
    commitMessage: {
        summary: 'Add /config1.json and /config2.json',
        detail: 'You can write a detail for changes',
    },
    changes: [
        {
            path: '/config1.json',
            type: ChangeTypes.UpsertJson,
            content: { field1: 'foo' },
        },
        {
            path: '/config2.json',
            type: ChangeTypes.UpsertJson,
            content: { field1: 'bar' },
        },
    ],
});

Other APIs

There are some more APIs.

Please refer to the sources and tests for more details.