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

@tuddo/s3

v0.1.0

Published

S3-compatible BlobStore adapter for tuddofs

Readme

@tuddo/s3

@tuddo/s3 is the reference implementation of the structural BlobStore SPI from tuddofs architecture §8.4. It implements put, head, get, delete, list, presignPut, and presignGet against AWS S3-compatible stores, including AWS S3, MinIO, and Cloudflare R2.

The package has no dependency on, and no peer dependency on, tuddofs core. Pass the adapter to createTuddoFs({ storage }) or use it with any structurally compatible BlobStore consumer.

Install

npm install @tuddo/s3

Configure

import { S3BlobStore } from '@tuddo/s3'

const storage = new S3BlobStore({
  bucket: process.env.TUDDOFS_S3_BUCKET!,
  region: process.env.TUDDOFS_S3_REGION ?? 'us-east-1',
  endpoint: process.env.TUDDOFS_S3_ENDPOINT,
  forcePathStyle: process.env.TUDDOFS_S3_FORCE_PATH_STYLE === 'true',
  credentials: {
    accessKeyId: process.env.TUDDOFS_S3_ACCESS_KEY_ID!,
    secretAccessKey: process.env.TUDDOFS_S3_SECRET_ACCESS_KEY!,
  },
})

Set forcePathStyle: true for MinIO and other endpoints that do not expose virtual-hosted bucket DNS. Omit endpoint and forcePathStyle for AWS S3. R2 uses its account-specific S3 endpoint and credentials.

presignPut(key, { ttlSeconds, checksumSha256 }) signs x-amz-checksum-sha256 and requires the caller to send that header with the PUT. The store rejects a body whose SHA-256 does not match the signed checksum.

Public API

  • StorageError is thrown when an S3 operation cannot satisfy the BlobStore SPI. It exposes operation, key, and the original backend failure as cause.
  • StorageOperation is the union of operation names carried by StorageError: put, head, get, delete, list, presignPut, and presignGet.
  • S3BlobStore.destroy() releases the AWS SDK client created by the adapter. Call it when the store owns its client; it is a no-op for an injected client.

SigV4 host reachability

Presigned URLs embed the configured endpoint host. Target-direct I/O therefore requires the blob endpoint to be reachable from the target network. A LAN-only MinIO endpoint cannot be used directly by an external target; downgrade large-blob capture to the server-relay path in that case (architecture §8.3).

BlobStore conformance kit

The @tuddo/s3/conformance export provides defineBlobStoreConformanceSuite and its fixture types for any adapter implementing the same BlobStore SPI. The suite checks SPI behavior, including checksum enforcement through a presigned PUT. Adapters whose presigned transport needs request metadata may provide the fixture's generic request callback; protocol-specific details stay outside the kit. Set presignPutChecksumEnforced: false only when the adapter's declared SPI capability cannot enforce checksums.

MinIO contract tests

The S3 adapter tests use the reusable kit. Start a disposable MinIO instance, then set the endpoint and run:

TUDDOFS_S3_ENDPOINT=http://127.0.0.1:59000 \
TUDDOFS_S3_ACCESS_KEY_ID=minioadmin \
TUDDOFS_S3_SECRET_ACCESS_KEY=minioadmin \
npm run test:contract --workspace @tuddo/s3

The suite exercises all seven methods and verifies a presigned PUT with the right checksum succeeds while the same URL rejects mismatched bytes.

License

MIT. See LICENSE.