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

@cresium/cleric-utils

v0.2.3

Published

Shared utilities for Cresium services

Readme

@cresium/cleric-utils

Shared utilities for Cresium services.

Installation

yarn add @cresium/cleric-utils
# or
npm install @cresium/cleric-utils

Available Utilities

| Utility | Description | | ------- | ----------- | | S3Manager | AWS S3 operations (upload, retrieve, presigned URLs) |


S3Manager

Full-featured S3 client with typed retrieval and multiple upload methods.

Setup

import { S3Manager } from "@cresium/cleric-utils";

const s3Manager = new S3Manager({
  region: "us-east-1",
  bucketName: "my-bucket",
});

Methods

retrieve<T>(key) - Get typed JSON from S3

interface MyData {
  transactions: Transaction[];
}

const data = await s3Manager.retrieve<MyData>("path/to/file.json");
// data is typed as MyData

upload(key, buffer, contentType?) - Upload a buffer

await s3Manager.upload("documents/file.pdf", pdfBuffer, "application/pdf");
await s3Manager.upload("images/photo.jpg", imageBuffer, "image/jpeg");

uploadFile(file, key, location) - Upload with location prefix

// Returns "images/photo.jpg"
const path = await s3Manager.uploadFile(
  { buffer: fileBuffer, mimetype: "image/jpeg" },
  "photo.jpg",
  "images"
);

uploadJson(data, key, location?) - Upload JSON data

// Without location prefix
await s3Manager.uploadJson({ foo: "bar" }, "data.json");

// With location prefix (returns "documents/data.json")
await s3Manager.uploadJson({ foo: "bar" }, "data.json", "documents");

generatePresignedUrl(key, filename?, expiresIn?) - Presigned URL from key

const url = await s3Manager.generatePresignedUrl(
  "documents/file.pdf",
  "download.pdf",  // optional download filename
  3600             // optional expiry in seconds (default: 3600)
);

generatePresignedUrlFromUrl(url, filename?) - Presigned URL from S3 URL

const presignedUrl = await s3Manager.generatePresignedUrlFromUrl(
  "https://bucket.s3.amazonaws.com/path/to/file.pdf",
  "download.pdf"
);

// Returns original URL if it's not from the configured bucket

Types

S3ManagerConfig

interface S3ManagerConfig {
  region: string;
  bucketName: string;
}

S3File

Compatible with Multer file uploads.

interface S3File {
  buffer: Buffer;
  mimetype: string;
}

Publishing

Quick Release

cd /path/to/cleric/packages/utils

# 1. Build and verify
yarn build
yarn typecheck

# 2. Bump version
npm version patch   # 0.2.0 -> 0.2.1 (bug fixes)
npm version minor   # 0.2.0 -> 0.3.0 (new features)
npm version major   # 0.2.0 -> 1.0.0 (breaking changes)

# 3. Publish
npm publish

# 4. Push tags to git
git push && git push --tags

Pre-publish Checklist

# Verify what will be published
npm pack --dry-run

# Should show:
# - dist/
# - README.md
# - package.json

License

MIT