(dir)
| 126 | } |
| 127 | |
| 128 | async function findDtsFiles(dir) { |
| 129 | const entries = await readdir(dir, { withFileTypes: true }); |
| 130 | const files = await Promise.all( |
| 131 | entries.map(async (entry) => { |
| 132 | const entryPath = path.join(dir, entry.name); |
| 133 | if (entry.isDirectory()) { |
| 134 | return findDtsFiles(entryPath); |
| 135 | } |
| 136 | return entry.name.endsWith('.d.ts') ? [entryPath] : []; |
| 137 | }), |
| 138 | ); |
| 139 | |
| 140 | return files.flat(); |
| 141 | } |
| 142 | |
| 143 | function packageDirForFile(file) { |
| 144 | const parts = path.relative(dtsRoot, file).split(path.sep); |
no test coverage detected