import { PackageModuleType, PackageNodeRaw, ListPackageDependenciesResult } from 'node-modules-tools'; interface FilterOptions { search: string; modules: null | PackageModuleType[]; focus: null | string[]; why: null | string[]; sourceType: null | 'prod' | 'dev'; depths: null | (number | string)[]; clusters: null | string[]; clustersMode: 'and' | 'or'; excludes: null | string[]; excludeDts: boolean; excludeDev: boolean; excludeOptional: boolean; excludePrivate: boolean; excludeWorkspace: boolean; compareA: null | string[]; compareB: null | string[]; } interface NodeModulesInspectorPayload extends ListPackageDependenciesResult { timestamp: number; hash: string; config?: NodeModulesInspectorConfig; } interface NodeModulesInspectorConfig { /** * The name of the project */ name?: string; /** * Fetch meta data like publish date, deprecated info, from npm * This will require internet connection. * The result will be cached in filesystem or IndexedDB. * * @default true */ fetchNpmMeta?: boolean; /** * Enable publint * * @experimental * @see https://publint.dev/ * @default false */ publint?: boolean; /** * Exclude the packages and it's dependencies */ excludePackages?: (string | ((node: PackageNodeRaw) => boolean))[]; /** * Present the packages matched as no dependencies */ excludeDependenciesOf?: (string | ((node: PackageNodeRaw) => boolean))[]; /** * Default filters for the frontend */ defaultFilters?: Partial; /** * Default settings for the frontend */ defaultSettings?: Partial; /** * Hook called after payload is collected. * Use `console.log` to print data for CI/CD pipelines. * Throw an error to block the process with a non-zero exit code. */ onPayloadReady?: (payload: NodeModulesInspectorPayload) => void | Promise; } interface SettingsOptions { graphRender: 'normal' | 'dots'; moduleTypeSimple: boolean; moduleTypeRender: 'badge' | 'circle' | 'none'; deepDependenciesTree: boolean; dependenciesGroupBy: 'none' | 'catalog' | 'module'; packageDetailsTab: 'dependencies' | 'dependents'; colorizePackageSize: boolean; showInstallSizeBadge: boolean; showPublishTimeBadge: boolean; showSupplyChainBadge: 'present' | 'absent' | 'none'; showFileComposition: boolean; showDependencySourceBadge: 'none' | 'dev' | 'prod' | 'both'; treatFauxAsESM: boolean; showPublintMessages: boolean; showMaintainerActions: boolean; showThirdPartyServices: boolean; collapseSidepanel: boolean; chartAnimation: boolean; preferNpmx: boolean; } declare function defineConfig(config: NodeModulesInspectorConfig): NodeModulesInspectorConfig; export { defineConfig }; export type { NodeModulesInspectorConfig, NodeModulesInspectorPayload };