import { resolveBatchMetadata, resolveContinueOnError } from './batch_opts.js'; import { discoverGoWorkspaceModules } from './providers/golang_gomodules.js'; import { discoverGradleSubprojects } from './providers/java_gradle.js'; import { discoverMavenModules } from './providers/java_maven.js'; import { discoverUvWorkspaceMembers } from './providers/python_uv.js'; import { discoverWorkspaceCrates, discoverWorkspacePackages, filterManifestPathsByDiscoveryIgnore, resolveWorkspaceDiscoveryIgnore, validatePackageJson } from './workspace.js'; export { parseImageRef } from "./oci_image/utils.js"; export { ImageRef } from "./oci_image/images.js"; export { getProjectLicense, findLicenseFilePath, identifyLicense, getLicenseDetails, licensesFromReport, normalizeLicensesResponse, runLicenseCheck, getCompatibility } from "./license/index.js"; export { extractRemediations, maxSeverity } from "./remediation.js"; export { generateReport, generateDeduplicationKey } from './remediation_report.js'; export { loadConfig, mergeConfig, resolveConfig, CONFIG_FILENAMES } from './config.js'; export { runRemediation, findManifests } from './remediate.js'; export type RunRemediationOptions = import('./remediate.js').RunRemediationOptions; /** @typedef {import('./remediate.js').RunRemediationOptions} RunRemediationOptions */ declare const _default: { componentAnalysis: typeof componentAnalysis; stackAnalysis: typeof stackAnalysis; stackAnalysisBatch: typeof stackAnalysisBatch; imageAnalysis: typeof imageAnalysis; validateToken: typeof validateToken; generateSbom: typeof generateSbom; }; export default _default; export { discoverMavenModules, discoverGradleSubprojects, discoverGoWorkspaceModules, discoverUvWorkspaceMembers, discoverWorkspacePackages, discoverWorkspaceCrates, validatePackageJson, resolveWorkspaceDiscoveryIgnore, filterManifestPathsByDiscoveryIgnore, resolveContinueOnError, resolveBatchMetadata, }; export type Options = { TRUSTIFY_DA_CARGO_PATH?: string | undefined; TRUSTIFY_DA_DOCKER_PATH?: string | undefined; TRUSTIFY_DA_GO_MVS_LOGIC_ENABLED?: string | undefined; TRUSTIFY_DA_GO_PATH?: string | undefined; TRUSTIFY_DA_GRADLE_PATH?: string | undefined; TRUSTIFY_DA_IMAGE_PLATFORM?: string | undefined; TRUSTIFY_DA_MVN_PATH?: string | undefined; TRUSTIFY_DA_PIP_PATH?: string | undefined; TRUSTIFY_DA_PIP_USE_DEP_TREE?: string | undefined; TRUSTIFY_DA_PIP3_PATH?: string | undefined; TRUSTIFY_DA_PNPM_PATH?: string | undefined; TRUSTIFY_DA_PODMAN_PATH?: string | undefined; TRUSTIFY_DA_PREFER_GRADLEW?: string | undefined; TRUSTIFY_DA_PREFER_MVNW?: string | undefined; TRUSTIFY_DA_PROXY_URL?: string | undefined; TRUSTIFY_DA_PYTHON_INSTALL_BEST_EFFORTS?: string | undefined; TRUSTIFY_DA_PYTHON_PATH?: string | undefined; TRUSTIFY_DA_PYTHON_VIRTUAL_ENV?: string | undefined; TRUSTIFY_DA_PYTHON3_PATH?: string | undefined; TRUSTIFY_DA_PROVIDERS?: string | undefined; TRUSTIFY_DA_RECOMMEND?: string | undefined; TRUSTIFY_DA_SOURCES?: string | undefined; TRUSTIFY_DA_SKOPEO_CONFIG_PATH?: string | undefined; TRUSTIFY_DA_SKOPEO_PATH?: string | undefined; TRUSTIFY_DA_SYFT_CONFIG_PATH?: string | undefined; TRUSTIFY_DA_SYFT_PATH?: string | undefined; TRUSTIFY_DA_YARN_PATH?: string | undefined; TRUSTIFY_DA_WORKSPACE_DIR?: string | undefined; TRUSTIFY_DA_LICENSE_CHECK?: string | undefined; licenseCheck?: boolean | undefined; MATCH_MANIFEST_VERSIONS?: string | undefined; TRUSTIFY_DA_SOURCE?: string | undefined; TRUSTIFY_DA_TOKEN?: string | undefined; TRUSTIFY_DA_TELEMETRY_ID?: string | undefined; batchConcurrency?: number | undefined; TRUSTIFY_DA_BATCH_CONCURRENCY?: string | undefined; workspaceDiscoveryIgnore?: string[] | undefined; TRUSTIFY_DA_WORKSPACE_DISCOVERY_IGNORE?: string | undefined; continueOnError?: boolean | undefined; TRUSTIFY_DA_CONTINUE_ON_ERROR?: string | undefined; batchMetadata?: boolean | undefined; TRUSTIFY_DA_BATCH_METADATA?: string | undefined; TRUSTIFY_DA_UV_PATH?: string | undefined; TRUSTIFY_DA_POETRY_PATH?: string | undefined; [key: string]: string | number | boolean | string[] | undefined; }; export type BatchAnalysisMetadata = { workspaceRoot: string; ecosystem: 'javascript' | 'cargo' | 'pyproject' | 'unknown'; total: number; successful: number; failed: number; errors: Array<{ manifestPath: string; phase: 'validation' | 'sbom'; reason: string; }>; }; /** * Selects the Trustify DA backend URL from opts.TRUSTIFY_DA_BACKEND_URL, then environment * variable TRUSTIFY_DA_BACKEND_URL. Options take precedence over environment variables. * If TRUSTIFY_DA_BACKEND_URL is not set, the function will throw an error. * @param {{TRUSTIFY_DA_DEBUG?: string | undefined; TRUSTIFY_DA_BACKEND_URL?: string | undefined}} [opts={}] * @return {string} - The selected Trustify DA backend URL * @throws {Error} if TRUSTIFY_DA_BACKEND_URL is unset * @private */ export declare function selectTrustifyDABackend(opts?: { TRUSTIFY_DA_DEBUG?: string | undefined; TRUSTIFY_DA_BACKEND_URL?: string | undefined; }): string; declare function stackAnalysis(manifest: string, html: true, opts?: Options): Promise; declare function stackAnalysis(manifest: string, html: false, opts?: Options): Promise; declare function stackAnalysis(manifest: string, html?: boolean, opts?: Options): Promise; /** * Get component analysis report for a manifest content. * @param {string} manifest - path to the manifest * @param {Options} [opts={}] - optional various options to pass along the application * @returns {Promise} * @throws {Error} if no matching provider, failed to get create content, or backend request failed */ declare function componentAnalysis(manifest: string, opts?: Options): Promise; declare function imageAnalysis(imageRefs: Array, html: true, opts?: Options): Promise; declare function imageAnalysis(imageRefs: Array, html: false, opts?: Options): Promise>; declare function imageAnalysis(imageRefs: Array, html?: boolean, opts?: Options): Promise>; /** * Generate a CycloneDX SBOM from a manifest file. No backend HTTP request is made. * * @param {string} manifestPath - path to the manifest file (e.g. pom.xml, package.json) * @param {Options} [opts={}] - optional options (e.g. workspace dir, tool paths) * @returns {Promise} parsed CycloneDX SBOM JSON object * @throws {Error} if the manifest is unsupported or SBOM generation fails */ export declare function generateSbom(manifestPath: string, opts?: Options): Promise; export type SbomResult = { ok: true; purl: string; sbom: object; } | { ok: false; manifestPath: string; reason: string; }; declare function stackAnalysisBatch(workspaceRoot: string, html: true, opts: Options & { batchMetadata: true; }): Promise<{ analysis: string; metadata: BatchAnalysisMetadata; }>; declare function stackAnalysisBatch(workspaceRoot: string, html: true, opts?: Options & { batchMetadata?: false; }): Promise; declare function stackAnalysisBatch(workspaceRoot: string, html: false, opts: Options & { batchMetadata: true; }): Promise<{ analysis: Record; metadata: BatchAnalysisMetadata; }>; declare function stackAnalysisBatch(workspaceRoot: string, html: false, opts?: Options & { batchMetadata?: false; }): Promise>; declare function stackAnalysisBatch(workspaceRoot: string, html?: boolean, opts?: Options): Promise | { analysis: string | Record; metadata: BatchAnalysisMetadata; }>; /** * Validates the Exhort token. * @param {Options} [opts={}] - Optional parameters, potentially including token override. * @returns {Promise} A promise that resolves with the validation result from the backend. * @throws {Error} if the backend request failed. */ declare function validateToken(opts?: Options): Promise;