import type { AllowBuild, DepPath, IgnoredBuilds } from '@pnpm/types'; /** * The placeholder value written to `allowBuilds` for a package whose build * was ignored and still awaits an explicit `true`/`false` decision. */ export declare const UNDECIDED_ALLOW_BUILD = "set this to true or false"; export declare function isBuildExplicitlyDisallowed(depPath: DepPath, allowBuild?: AllowBuild): boolean; /** * The ignored builds the policy has no verdict on. A recorded build the policy * denies was decided on purpose, and one it allows is waiting for a rebuild, so * only the undecided entries are returned. */ export declare function unapprovedIgnoredBuilds(ignoredBuilds: IgnoredBuilds | undefined, allowBuild?: AllowBuild): DepPath[]; export declare function createAllowBuildFunction(opts: { dangerouslyAllowAllBuilds?: boolean; allowBuilds?: Record; }): undefined | AllowBuild; /** * The `allowBuilds` key under which an ignored build should be approved: * the package name for registry packages, the peer-suffix-free depPath for * git/tarball artifacts, whose name alone must not approve builds. */ export declare function allowBuildKeyFromIgnoredBuild(depPath: DepPath): string; /** * The package name an `allowBuilds` key identifies — the key itself for a * bare name, the name half of a `name@version` dep-path key — or * `undefined` for keys carrying no single package name (hashless git-repo * keys, malformed shapes). Cleanup may only drop an entry whose package * this proves absent from a resolved-name index. */ export declare function packageNameFromAllowBuildKey(key: string): string | undefined; /** * The package an `--allow-build` value or an `approve-builds` argument names, * and whether it is allowed to build: a leading `!` denies the build. * * A selector that is empty or only `!` yields an empty name. Callers reject * that rather than persist an empty `allowBuilds` key. */ export declare function parseAllowBuildSelector(selector: string): { name: string; allowed: boolean; };