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

@cratestack/api

v0.8.6

Published

Compat umbrella over the split @cratestack/{ts-types,link-*,runtime-*,validator-*,adapter-*} family for CrateStack's generated TypeScript RPC client — batching, logging, and more.

Readme

@cratestack/api

Compat umbrella over the split @cratestack/* npm family for CrateStack's generated TypeScript RPC client (transport rpc schemas). If you're starting fresh, prefer depending on the individual packages below directly — smaller install, no unused peer dependencies. @cratestack/api exists so existing import { createBatchLink } from "@cratestack/api" code keeps working unchanged.

The split

| Package | What it does | | --- | --- | | @cratestack/ts-types | Shared RpcLink/wire-frame interfaces. Types only — no runtime code. | | @cratestack/link-batch | Automatic batch-scheduler RpcLink. | | @cratestack/link-logger | Reference logging RpcLink. | | @cratestack/runtime-fetch | typeof fetch transport with an optional timeout. | | @cratestack/runtime-axios | typeof fetch transport backed by axios. | | @cratestack/validator-zod | Input-validating RpcLink, zod schemas. | | @cratestack/validator-yup | Input-validating RpcLink, yup schemas. | | @cratestack/adapter-tanstack-query | Generic TanStack Query option builders. | | @cratestack/adapter-rtk | RTK Query BaseQueryFn adapter. |

Usage

The root import is unchanged from before the split — it re-exports exactly ts-types + link-batch + link-logger, so importing it never pulls in zod/yup/axios/tanstack-query/rtk as implicit peer dependencies:

import { createBatchLink, createLoggerLink } from "@cratestack/api";
import { CratestackRpcRuntime } from "./generated/runtime"; // your project's generated client

const runtime = new CratestackRpcRuntime("https://api.example.com", {
  links: [createLoggerLink(), createBatchLink()],
});
const client = new MyGeneratedClient(runtime);

// These three calls, if issued in the same tick, become ONE /rpc/batch request:
const [a, b, c] = await Promise.all([
  client.widgets.get(1),
  client.widgets.get(2),
  client.widgets.get(3),
]);

Everything else added since the split is available as a named subpath — each pulls in only its own peer dependency, not every package's:

import { createFetchRuntime } from "@cratestack/api/runtime-fetch";
import { createAxiosRuntime } from "@cratestack/api/runtime-axios";
import { createZodValidatorLink } from "@cratestack/api/validator-zod";
import { createYupValidatorLink } from "@cratestack/api/validator-yup";
import { rpcQueryOptions, rpcMutationOptions } from "@cratestack/api/adapter-tanstack-query";
import { createRpcBaseQuery } from "@cratestack/api/adapter-rtk";

See each package's own README (linked in the table above) for its full API and semantics.

Order matters: a link's next reruns everything below it (the real fetch and any links declared after it), never just the terminal fetch. stream() calls bypass the chain entirely — a link that wants to inspect/retry a response would need to clone a streamed body, which defeats streaming.