A modern TypeScript SDK for the Front API.
npm install @dugjason/front-nodeimport { Front } from "@dugjason/front-node";
const front = new Front({ apiKey: process.env.FRONT_API_TOKEN });
const teammates = await front.teammates.list();bun install
bun test
bun run checkReleases are managed by Changesets. Add a changeset for user-facing changes:
bun run changesetMerging to main opens or updates a version PR. Merging that version PR publishes
to npm as @dugjason/front-node through npm trusted publishing.
You can use the library with a custom fetch library, compatible with node:fetch.
An illustrative example could be a fetch implementation with built-in tracing or custom telemetry;
import { Front } from "@dugjason/front-node";
const loggingFetch: typeof fetch = async (input, init) => {
const t0 = performance.now();
const response = await globalThis.fetch(input, init);
console.log(
`${init?.method ?? "GET"} ${input} ${response.status} ${Math.round(performance.now() - t0)}ms`,
);
return response;
};
const front = new Front({ fetch: loggingFetch });