/** * Lazily load spdx-correct. It's an optional peer dependency. * * @returns The corrected identifier, `null` if unrecognized, or `undefined` if * spdx-correct is not installed. * * @internal */ export declare function tryCorrectLicence(licence: string): Promise; /** * Result of validating licence identifiers with spdx-correct. * * @internal */ export interface LicenceValidationResult { /** Human-readable error messages. */ errors: string[]; /** Map from original identifier to its corrected form. */ corrections: Map; } /** * Validate an array of licence identifiers using spdx-correct. * * @internal */ export declare function validateWithSpdxCorrect(licences: string[]): Promise; /** * Check that all licence identifiers are in the allowed list. * * @internal */ export declare function validateAllowlist(licences: string[], allowedLicences: string[]): string[]; /** * Replace quoted licence strings in TOML/text content with their corrected forms. * * @internal */ export declare function applyCorrections(content: string, corrections: Map): string; /** * Read a file, apply licence corrections, and write it back. * * @internal */ export declare function tryAutoFix(filePath: string, corrections: Map, errors: string[]): Promise<{ error: string; fixable: boolean; fixed: boolean; }>; /** * Validate licence identifiers and optionally auto-fix them. * * Combines spdx-correct validation with allowlist checking and auto-fix * into a single helper used by both Cargo and Gleam licence policies. * * @returns `true` if valid, or a PolicyError-compatible object on failure. * Returns `undefined` if no validation was requested (both allowlist and * validateSpdx are empty/false). * * @internal */ export declare function validateLicenceField(options: { licences: string[]; allowedLicences?: string[]; validateSpdx: boolean; shouldResolve: boolean; filePath: string; manualFixMessage: string; }): Promise; //# sourceMappingURL=spdxValidator.d.ts.map