
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@cushin/api-runtime
Advanced tools
Runtime utilities for Cushin API codegen - types, schemas, and HTTP client
Runtime utilities for Cushin API codegen - provides type-safe HTTP client and schema helpers that can be used in both browser and Node.js environments.
ky and zodnpm install @cushin/api-runtime ky zod
import { defineConfig, defineEndpoint } from "@cushin/api-runtime";
import { z } from "zod";
export const apiConfig = defineConfig({
baseUrl: "https://api.example.com",
endpoints: {
getUser: defineEndpoint({
path: "/users/:id",
method: "GET",
params: z.object({ id: z.string() }),
response: z.object({
id: z.string(),
name: z.string(),
email: z.string(),
}),
}),
},
});
import { createAPIClient } from "@cushin/api-runtime";
import { apiConfig } from "./api-config";
const client = createAPIClient(apiConfig, {
getTokens: async () => ({
accessToken: localStorage.getItem("token") || "",
}),
onAuthError: () => {
// Redirect to login
},
onRefreshToken: async () => {
// Refresh your token
},
});
// Use the client
const user = await client.getUser({ id: "123" });
createAPIClient(config, authCallbacks?)Creates a type-safe API client with automatic token injection and refresh.
defineConfig(config)Helper function to define your API configuration with type inference.
defineEndpoint(config)Helper function to define individual endpoints with full type safety.
The runtime code needs to be imported by your web application, while the code generation tools (@cushin/api-codegen) contain Node.js-specific code (file system, path manipulation, etc.) that cannot be bundled for the browser.
By separating the runtime into its own package:
MIT
FAQs
Runtime utilities for Cushin API codegen - types, schemas, and HTTP client
We found that @cushin/api-runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.