npm.io
1100.2.7 • Published 2 weeks ago

@pnpm/fetching.fetcher-base

Licence
MIT
Version
1100.2.7
Deps
3
Size
23 kB
Vulns
0
Weekly
0
Stars
36.0K

@pnpm/fetching.fetcher-base

Types for pnpm-compatible fetchers

npm version

Installation

pnpm add @pnpm/fetching.fetcher-base

Usage

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

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

Keywords