declare const _default: { isSupported: typeof isSupported; validateLockFile: typeof validateLockFile; provideComponent: typeof provideComponent; provideStack: typeof provideStack; readLicenseFromManifest: typeof readLicenseFromManifest; packageManagerName(): string; }; export default _default; export type Provider = import('../provider').Provider; export type Provided = import('../provider').Provided; /** * @param {string} manifestName - the subject manifest name-type * @returns {boolean} - return true if `Cargo.toml` is the manifest name-type */ declare function isSupported(manifestName: string): boolean; /** * Read project license from Cargo.toml, with fallback to LICENSE file. * Supports the `license` field under `[package]` (single crate / workspace * with root) and under `[workspace.package]` (virtual workspaces). * When a member crate uses `license = { workspace = true }`, the actual * license is resolved from the workspace root Cargo.toml. * @param {string} manifestPath - path to Cargo.toml * @param {object} [metadata] - cargo metadata output (needed for workspace license resolution) * @returns {string|null} SPDX identifier or null */ declare function readLicenseFromManifest(manifestPath: string, metadata?: object): string | null; /** * Validates that Cargo.lock exists in the manifest directory or in a parent * workspace root directory. In Cargo workspaces the lock file always lives at * the workspace root, so when a member crate's Cargo.toml is provided we walk * up the directory tree looking for Cargo.lock (stopping when we find a * Cargo.toml that contains a [workspace] section, or when we reach the * filesystem root). * When TRUSTIFY_DA_WORKSPACE_DIR is provided (via env var or opts), * checks only that directory for Cargo.lock — no walk-up. * @param {string} manifestDir - the directory where the manifest lies * @param {{TRUSTIFY_DA_WORKSPACE_DIR?: string}} [opts={}] - optional workspace root * @returns {boolean} true if Cargo.lock is found */ declare function validateLockFile(manifestDir: string, opts?: { TRUSTIFY_DA_WORKSPACE_DIR?: string; }): boolean; /** * Provide content and content type for Cargo stack analysis. * @param {string} manifest - the manifest path * @param {{}} [opts={}] - optional various options to pass along the application * @returns {Provided} */ declare function provideStack(manifest: string, opts?: {}): Provided; /** * Provide content and content type for Cargo component analysis. * @param {string} manifest - path to Cargo.toml for component report * @param {{}} [opts={}] - optional various options to pass along the application * @returns {Provided} */ declare function provideComponent(manifest: string, opts?: {}): Provided;