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

@ulvio/utilities

v0.1.0

Published

Official TypeScript SDK for the Ulvio Utilities service (MJML, LiquidJS, Markdown, image transform).

Readme

@ulvio/utilities

Official TypeScript SDK for the standalone Ulvio Utilities service — MJML compilation, LiquidJS template rendering, Markdown-to-HTML conversion, and image transformation.

This is a thin, direct client for the Utilities HTTP service (the endpoints under /api/*). The service has no authentication, so the SDK only needs a baseUrl. Requests and responses are validated at runtime with zod.

Talking to the Ulvio platform instead of a standalone service? Use @ulvio/client, whose .utilities sub-client proxies these same operations through the gateway with an API key.

Install

npm install @ulvio/utilities

Requires Node.js 24+.

Usage

import { Utilities } from '@ulvio/utilities';

const utilities = new Utilities({ baseUrl: 'http://localhost:3002' });

// MJML → HTML
const { html, errors } = await utilities.compileMjml({
  mjml: '<mjml><mj-body><mj-text>Hi</mj-text></mj-body></mjml>',
  options: { minify: true },
});

// Liquid render + variable extraction
const rendered = await utilities.renderLiquid({ template: 'Hi {{ name }}', data: { name: 'Ada' } });
const { variables } = await utilities.extractLiquidVariables({ template: 'Hi {{ name }}' });

// Markdown → HTML
const md = await utilities.renderMarkdown({ markdown: '# Title' });

// Combined: Liquid interpolation → MJML compile, in one call
const email = await utilities.renderEmail({
  mjml: '<mjml><mj-body><mj-text>Hi {{ name }}</mj-text></mj-body></mjml>',
  data: { name: 'Ada' },
});

Image transform (streaming)

POST /api/image/transform streams progress over Server-Sent Events. transformImage drives that stream, forwards progress to optional callbacks, and resolves with the final result.

const result = await utilities.transformImage(
  {
    source: { url: 'https://cdn.example.com/img.jpg' }, // or { base64: '...' }
    outputMode: 'base64',                                // or 'upload'
    variants: [
      { name: 'thumbnail', resize: { width: 400 }, format: { type: 'avif', quality: 70 } },
    ],
  },
  {
    onQueued: ({ position }) => console.log('queued at', position),
    onProcessing: ({ step, progress }) => console.log(step, `${progress}%`),
  },
);

// base64 mode → each variant has { name, contentType, bytes, width, height, base64 }
// upload mode  → each variant has { name, contentType, bytes, width, height, uploaded: true }
// (in 'upload' mode, give every variant a presigned `uploadUrl`)

Errors

Every failure is a UtilitiesError with a stable string code, the HTTP status (when the service responded), and the parsed error response:

import { UtilitiesError, NOT_CONFIGURED_CODE } from '@ulvio/utilities';

try {
  await utilities.compileMjml({ mjml: '' });
} catch (err) {
  if (err instanceof UtilitiesError) {
    console.error(err.code, err.status, err.message);
  }
}

code is not_configured (missing baseUrl), network_error (fetch failed), or a status-derived code such as bad_request / server_error. Image-transform failures surface as image_transform_failed (error event) or truncated (stream ended early).

API

| Method | Endpoint | | --- | --- | | health() | GET /api/health | | compileMjml(req) | POST /api/mjml/compile | | renderLiquid(req) | POST /api/liquidjs/render | | extractLiquidVariables(req) | POST /api/liquidjs/variables | | renderMarkdown(req) | POST /api/markdown/render | | renderEmail(req) | POST /api/render-email | | transformImage(req, callbacks?) | POST /api/image/transform (SSE) |

All request/response types are exported (MjmlCompileRequest, ImageTransformResponse, …).

License

UNLICENSED — internal Ulvio package.