Pipeline orchestration utilities for building modular REST API clients in JavaScript/TypeScript. Current stable version is 1.3.14, with regular releases. Key differentiators include sequential and parallel stage execution, retry with exponential backoff and Retry-After support, response caching for GET requests, rate limiting, auth provider with automatic 401 refresh, stream stages (SSE/AsyncIterable), pause/resume/abort capabilities, pipeline metrics, a plugin system, persist adapter, and Vue/React integrations. It ships TypeScript types and has a single runtime dependency (axios). Peer dependencies for React/Vue integrations are separate entry points.
npm install rest-pipeline-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a rest client with retry, cache, and rate limiting, then define a two-stage pipeline with conditional execution.
Install react and react-dom if using React integrations: npm install react react-dom. For Vue integrations, ensure Vue 3 is available (peer dependency not formally declared).
Change import RestClient from 'rest-pipeline-js' to import { RestClient } from 'rest-pipeline-js'.Update calls to createPipeline() to pass a config object: createPipeline({ stages: [] }).Pass adapter in the initial config to RestClient constructor: new RestClient({ adapter: myAdapter }).Update custom persist adapters: save must accept (key, data) and return Promise<void>; load must accept (key) and return Promise<any>.
Use import syntax: import { createRestClient } from 'rest-pipeline-js'; or use dynamic import: const { createRestClient } = await import('rest-pipeline-js');Create a client first: const client = createRestClient({...}); then call client.createPipeline({...}).Install react and react-dom (npm install react react-dom) and ensure you're importing from 'rest-pipeline-js/react' (not 'rest-pipeline-js').
Ensure you pass a valid adapter in the RestClient config: createRestClient({ adapter: myFetchAdapter }). The adapter must be compatible with the axios adapter interface.