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

@axtrabase/sdk

v0.1.1

Published

TypeScript/JavaScript client for the AxtraBase API — a developer-friendly REST API in front of Microsoft Dataverse.

Readme

@axtrabase/sdk

TypeScript/JavaScript client for the AxtraBase API — a developer-friendly REST API in front of Microsoft Dataverse. You don't need to know Dataverse OAuth, OData, or security roles to use this.

Install

pnpm add @axtrabase/sdk

Quick start

import { AxtraBase } from "@axtrabase/sdk";

const axtra = new AxtraBase({
  apiKey: process.env.AXTRABASE_API_KEY!
});

const accounts = await axtra.table("accounts").list({ limit: 10 });
console.log(accounts.data);

Use this server-side (Next.js Server Components/Actions, Route Handlers, backend services) — a live API key is a secret and should never ship to a browser bundle (never NEXT_PUBLIC_...).

Tables

const accounts = await axtra.table("accounts");

await accounts.list({ limit: 25, select: ["name", "revenue"] });
await accounts.get(id);
await accounts.create({ name: "Acme" });
await accounts.update(id, { name: "Acme Inc" });
await accounts.delete(id);

Pagination

const page = await axtra.table("accounts").list({ limit: 50 });
page.data;
page.nextCursor;

const next = await axtra.table("accounts").list({ cursor: page.nextCursor });

Or, for simple cases:

for await (const account of axtra.table("accounts").iterate()) {
  console.log(account);
}

Events (Change Feed)

Canonical Dataverse change events — created/updated/deleted, across every table this API key can read.

// Paged, like tables:
const page = await axtra.events.list({ limit: 50 });
page.data; // AxtraBaseEvent[]
page.nextCursor;

// Or walk every page:
for await (const event of axtra.events.iterate({ table: "account" })) {
  console.log(event.type, event.table, event.recordId);
}

// One event by its public id:
await axtra.events.get("evt_3f9c2e1a-4b7d-4a2e-9c6f-1a2b3c4d5e6f");

Live tail (Server-Sent Events)

for await (const event of axtra.events.stream({ table: "account" })) {
  console.log(event); // arrives in real time, no polling
}

With no cursor, stream() starts from "now" — it never replays retained history. Pass after (a cursor from list()'s nextCursor or a previously streamed event.id) to catch up first, then continue live. stream() reconnects automatically on a transient disconnect (never on a 401/403 or other terminal error) and resumes from the last event you actually received — delivery is at-least-once: a reconnect can redeliver an event you already saw, so dedupe by event.id if that matters to your consumer. Pass signal (an AbortSignal) to stop the stream, or just break out of the loop.

const controller = new AbortController();
const stream = axtra.events.stream({ signal: controller.signal });
// later: controller.abort();

Errors

import { AxtraBase, AxtraBaseError } from "@axtrabase/sdk";

try {
  await axtra.table("accounts").list();
} catch (error) {
  if (error instanceof AxtraBaseError) {
    console.log(error.code); // e.g. "AXTRA_TABLE_PERMISSION_DENIED"
    console.log(error.status); // e.g. 403
    console.log(error.requestId); // paste into AxtraBase → Requests to see exactly what happened
  }
}

Configuration

new AxtraBase({
  apiKey: "axb_live_...",
  baseUrl: "http://localhost:3002" // defaults to the production AxtraBase API
});

Runtime support

Native fetch, ESM, no dependencies. Works in Node 20+, Next.js server-side, Bun, and any modern JS runtime with global fetch.