export interface WalkOptions { /** Directory names skipped wherever they appear (default: ['node_modules']). */ exclude?: string[] | undefined; } /** * Every file under `dir`, as `/`-separated paths relative to it, sorted. * * A nested `node_modules` is skipped by default: its contents belong to the * packages inside it, which `dependencyFiles` reaches through the dependency * graph instead — so a hoisted tree and a nested one produce the same set. */ export declare function walk(dir: string, { exclude }?: WalkOptions, prefix?: string): string[]; /** * Every file of `names` and of everything they depend on, as paths relative to * `base`, sorted. Packages are located the way node locates them, so the answer * describes the tree that is actually installed rather than what a lock file * says should be. * * A dependency that is not installed under `base` — missing, or hoisted above * it, where no member path can name it — is an error rather than a silent * omission, because a bundle whose closure is incomplete is a bundle that * fails at runtime on a machine other than the one that built it. Only an * optional dependency may be absent. */ export declare function dependencyFiles(names: string[], base: string): string[]; export interface ModuleFilesOptions { /** Directory the result is relative to. */ base: string; /** Individual files to include, relative to `base`. */ files?: string[] | undefined; /** Directories to include whole, relative to `base`. */ dirs?: string[] | undefined; /** Package names whose dependency closure to include. */ dependencies?: string[] | undefined; /** Keep only files matching one of these; a bare extension counts. */ filter?: ((name: string) => boolean) | undefined; } /** The three sources above, combined and de-duplicated. */ export declare function moduleFiles({ base, files, dirs, dependencies, filter }: ModuleFilesOptions): string[]; /** * The shell launcher this package ships: the prefix that turns an archive into * a file you can run by name. `bundle create --launcher` uses it, so nobody has * to know it lives inside `node_modules`. */ export declare function launcherPath(): string; /** * One of the icons this package ships for `.nzip` files — `bundle.svg`, * `nzip.ico` or `nzip.icns` — which `bundle install` copies to wherever the * desktop looks for them. Beside the package root, like the launcher: in * `node_modules` from npm, and a member of the archive when the bundled CLI * runs, which is why it is copied out rather than pointed at. */ export declare function iconPath(name: string): string; /** This package's own root — the directory its `package.json` sits in. */ export declare function packageRoot(): string; /** * The version of this package as it is running — read from the package.json * beside it, which inside the bundled CLI is the archive's own member. */ export declare function packageVersion(): string; /** * The directory this package's runnable modules are in: `dist` once compiled, * `src` when the source is being run directly under node's type stripping. */ export declare function moduleDir(): string; //# sourceMappingURL=files.d.ts.map