Back to Pnpm

@pnpm/fetching.fetcher-base

fetching/fetcher-base/README.md

11.0.6739 B
Original Source

@pnpm/fetching.fetcher-base

Types for pnpm-compatible fetchers

<!--@shields('npm')-->

<!--/@-->

Installation

sh
pnpm add @pnpm/fetching.fetcher-base

Usage

Here's a template for a fetcher using types from @pnpm/fetching.fetcher-base:

ts
import { Resolution } from '@pnpm/resolver-base'
import {
  FetchOptions,
  FetchResult,
} from '@pnpm/fetching.fetcher-base'

export async function demoFetcher (
  resolution: Resolution,
  targetFolder: string,
  opts: FetchOptions,
): Promise<FetchResult> {
  // ...
  return {
    filesIndex,
    tempLocation,
  }
}

License

MIT