/** * @file Package tarball operations: extract a package to a directory and pack a * spec into a tarball, both via pacote/libnpmpack with the shared packument * cache. */ import type { ExtractOptions, PacoteOptions } from './types.js'; /** * Extract a package to a destination directory. * * @example * ;```typescript * await extractPackage('lodash@4.17.21', { dest: '/tmp/lodash' }) * ``` */ export declare function extractPackage(pkgNameOrId: string, options?: ExtractOptions | undefined, callback?: ((destPath: string) => Promise) | undefined): Promise; /** * Pack a package tarball using pacote. * * @example * ;```typescript * const tarball = await packPackage('lodash@4.17.21') * ``` */ export declare function packPackage(spec: string, options?: PacoteOptions | undefined): Promise;