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

@cloudscaile-eng/platform-ext-utils

v0.0.2

Published

Utilities for CloudScaile extensions: env validation, logging, Kafka, and platform HTTP client

Readme

@cloudscaile-eng/platform-ext-utils

Utilities for CloudScaile extensions: environment validation, structured logging, Kafka messaging, and platform HTTP client helpers.

Install

npm install @cloudscaile-eng/platform-ext-utils

Quick start

ESM

import { initExtUtils, logger } from "@cloudscaile-eng/platform-ext-utils";

const utils = await initExtUtils();

logger.info("Extension started");
await utils.produceMessage({ action: "sync" }, "topic");

process.on("SIGINT", async () => {
  await utils.shutdown();
  process.exit(0);
});

CommonJS

const { initExtUtils } = require("@cloudscaile-eng/platform-ext-utils");

(async () => {
  const utils = await initExtUtils();
  await utils.produceMessage({ action: "sync" }, "topic");
})();

API

| Export | Description | |--------|-------------| | initExtUtils(options?) | Validates env, optionally connects Kafka, returns a configured instance | | validateEnv(overrides?) | Explicit environment validation without full init | | logger | Standalone JSON console logger (error, warn, info) | | KafkaService | Low-level Kafka wrapper for advanced use | | platformAxiosInstance(req, platformUrl) | Creates an Axios client for the platform API | | shutdown(instance) | Disconnects Kafka on a given instance |

initExtUtils return value

{
  env: ValidatedEnv;
  secrets: PgSecrets | { PG_DB_REQUIRED: false };
  kafka: KafkaService | null;
  produceMessage(message, routingKey): Promise<void>;
  consumeMessages(callback): Promise<void>;
  platformAxiosInstance(req): AxiosInstance;
  shutdown(): Promise<void>;
}

Environment variables

Required (always)

| Variable | Description | |----------|-------------| | TENANT_NAME | Tenant name for the application | | EXTENSION_NAME | Name of the extension | | MODULE_NAME | Name of the module | | PLATFORM_URL | Base URL for the platform API |

Optional

| Variable | Default | Description | |----------|---------|-------------| | PORT | 8000 | Application port | | PG_DB_REQUIRED | false | Enable PostgreSQL config validation | | KAFKA_REQUIRED | false | Enable Kafka integration |

When PG_DB_REQUIRED=true

| Variable | Description | |----------|-------------| | PG_HOST | PostgreSQL host | | PG_PORT | PostgreSQL port | | PG_DB | Database name | | PG_USERNAME | Database username | | PG_PASSWORD | Database password |

When KAFKA_REQUIRED=true

| Variable | Default | Description | |----------|---------|-------------| | KAFKA_BROKERS | — | Comma-separated broker list | | KAFKA_CLIENT_ID | — | Kafka client ID | | KAFKA_GROUP_ID | cs-platform-group-ext | Consumer group ID | | KAFKA_PRODUCER_TOPIC | cs-platform-producer-topic | Physical Kafka topic for outbound messages | | KAFKA_CONSUMER_TOPIC | cs-platform-consumer-topic | Topic to consume from | | KAFKA_SASL | false | Enable SASL SCRAM-SHA-512 auth | | KAFKA_SASL_USERNAME | — | SASL username (when KAFKA_SASL=true) | | KAFKA_SASL_PASSWORD | — | SASL password (when KAFKA_SASL=true) |

Kafka message format

Messages are published to the fixed KAFKA_PRODUCER_TOPIC. The second argument to produceMessage is a routing key, not the Kafka topic:

{
  "topic": "topic",
  "message": { "action": "sync" }
}

Consumers should parse the envelope and route on topic.

License

Copyright 2026 CloudScaile

Licensed under the Apache License, Version 2.0 — see LICENSE.