UNPKG

pastoralist

Version:

A tool to watch over node module resolutions and overrides

24 lines (23 loc) 2.85 kB
import type { SecurityOverrideDetail, PastoralistJSON, SecurityProviderType } from "../../types"; import type { Appendix, AppendixItem, OverridesType, OverrideValue } from "../../types"; import type { PartialSecurityLedger, CompactAppendix } from "./types"; export declare const mergeOverrideReasons: (packageName: string, reason?: string, securityOverrideDetails?: SecurityOverrideDetail[], manualOverrideReasons?: Record<string, string>) => string | undefined; export declare const createSecurityLedger: (packageName: string, securityOverrideDetails?: SecurityOverrideDetail[], securityProvider?: SecurityProviderType) => PartialSecurityLedger; export declare const normalizeLedgerCveField: (ledger: NonNullable<AppendixItem["ledger"]>) => NonNullable<AppendixItem["ledger"]>; export declare const buildAppendixItem: (dependents: Record<string, string>, existingLedger: AppendixItem["ledger"], reason: string | undefined, securityLedger: Omit<NonNullable<AppendixItem["ledger"]>, "addedDate" | "reason">, addedDate?: string) => AppendixItem; export declare const mergeDependents: (currentDependents: Record<string, string>, packageName: string, dependentInfo: string) => Record<string, string>; export declare const buildDependentInfo: (hasOverride: boolean, override: string, packageVersion: string | undefined, dependencyTree?: Record<string, boolean>) => string; export declare const isNestedOverride: (overrideValue: OverrideValue) => boolean; export declare const removeEmptyEntries: (appendix: Appendix) => Appendix; export declare const mergeDependenciesForPackage: (packageConfig: PastoralistJSON | undefined) => Record<string, string>; export declare const hasDependenciesMatchingOverrides: (depList: string[], overridesList: string[]) => boolean; export declare const shouldWriteAppendix: (appendix: Appendix | undefined, writeAppendixToFile: boolean) => boolean; export declare const hasOverrides: (overrides: OverridesType | null) => overrides is OverridesType; export declare const mergeAppendixDependents: (currentAppendix: Appendix, key: string, value: AppendixItem) => Appendix; export declare const isKeptEntry: (item: AppendixItem) => boolean; export declare const isKeepExpired: (item: AppendixItem, pkgName: string, rootDeps: Record<string, string>) => boolean; export declare const toCompactAppendix: (appendix: Appendix, addedDate?: string) => CompactAppendix; export declare const findUnusedAppendixEntries: (appendix: Appendix, rootDeps?: Record<string, string>) => string[]; export declare const removeAppendixKeys: (appendix: Appendix, keys: string[]) => Appendix; export declare const extractPackageNames: (appendixKeys: string[]) => string[]; export declare const removeOverrideKeys: (overrides: Record<string, string | Record<string, string>>, packageNames: string[]) => Record<string, string | Record<string, string>>;