{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface NodeModuleInfo {\n name: string\n version: string\n dir: string\n dependencies?: Array\n}\n\nexport type ParsedDependencyTree = {\n readonly name: string\n readonly version: string\n readonly path: string\n readonly workspaces?: string[] // we only use this at root level\n}\n\nexport interface DependencyTree extends Omit, \"optionalDependencies\"> {\n readonly implicitDependenciesInjected: boolean\n}\n\n// Note: `PnpmDependency` and `NpmDependency` include the output of `JSON.parse(...)` of `pnpm list` and `npm list` respectively\n// This object has a TON of info - a majority, if not all, of each dependency's package.json\n// We extract only what we need when constructing DependencyTree in `extractProductionDependencyTree`\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PnpmDependency extends Dependency {}\nexport interface NpmDependency extends Dependency {\n // implicit dependencies\n readonly _dependencies?: {\n [packageName: string]: string\n }\n}\n\nexport type Dependency = Dependencies & ParsedDependencyTree\n\nexport type Dependencies = {\n readonly dependencies?: {\n [packageName: string]: T\n }\n readonly optionalDependencies?: {\n [packageName: string]: V\n }\n}\n\nexport interface DependencyGraph {\n [packageNameAndVersion: string]: PackageDependencies\n}\n\ninterface PackageDependencies {\n readonly dependencies: string[]\n}\n"]}