export type ProjectDataEntry = { module: string; moduleType: 'barrel' | 'barrel-less'; tags: string[]; imports: string[]; externalLibraries?: string[]; unresolvedImports: string[]; projectName: string; }; /** * */ export type Options = { /** * Adds a property `externalLibraries` to each entry * that contains the external libraries, i.e. node_modules. */ includeExternalLibraries?: boolean; /** * Adds a property `projectName` to each entry * that contains the name of the project. */ projectName?: string; }; export type ProjectData = Record; /** * Traverses through the imports of the entryFileAbsolute * and returns the complete dependency graph. * * All paths are absolute. * * Each node contains the module, tags and imports. * * ```json5 * { * '/project/src/main.ts': { * module: '.', * tags: ['root'], * imports: ['/project/src/holidays/feature/index.ts'], * }, * '/project/src/holidays/feature/index.ts': { * module: '/project/src/holidays/feature', * tags: ['domain:holidays', 'type:feature'], * imports: ['/project/src/holidays/feature/holidays-container.component.ts'], * }, * // ... * } * ``` * * You can add additional properties via the options parameter. * * @param entryFileAbsolute absolute path to the entry file, e.g. /project/src/main.ts * @param options additional options for the output */ export declare function getProjectData(entryFileAbsolute: string, options?: Options): ProjectData; /** * Traverses through the imports of the entryFileRelative * and returns the complete dependency graph. * * All paths are relative to the cwd. * * Each node contains the module, tags and imports. * * ```json5 * { * 'src/main.ts': { * module: '.', * tags: ['root'], * imports: ['src/holidays/feature/index.ts'], * }, * 'src/holidays/feature/index.ts': { * module: 'src/holidays/feature', * tags: ['domain:holidays', 'type:feature'], * imports: ['src/holidays/feature/holidays-container.component.ts'], * }, * // ... * } * ``` * * You can add additional properties via the options parameter. * * @param entryFileRelative relative path to the entry file, e.g. main.ts * @param cwd absolute path to the entry file, e.g. /project/src * @param options additional options for the output */ export declare function getProjectData(entryFileRelative: string, cwd: string, options?: Options): ProjectData;