(input: string | string[], cwd?: string)
| 96 | }, |
| 97 | |
| 98 | resolveGlob(input: string | string[], cwd?: string): string[] { |
| 99 | if (Array.isArray(input)) { |
| 100 | return input.flatMap(paths => this.resolveGlob(paths, cwd)); |
| 101 | } |
| 102 | |
| 103 | const hasGlobChars = /[*?[\]]/.test(input); |
| 104 | |
| 105 | if (!hasGlobChars) { |
| 106 | try { |
| 107 | const s = statSync(cwd ? this.normalizePath(cwd, input) : input); |
| 108 | |
| 109 | if (s.isDirectory()) { |
| 110 | return globSync(join(input, '**'), { cwd }); |
| 111 | } |
| 112 | } catch { |
| 113 | // ignore |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | return globSync(input, { cwd }); |
| 118 | }, |
| 119 | |
| 120 | getPackageConfig<T extends Dictionary>(basePath = process.cwd()): T { |
| 121 | if (this.pathExists(`${basePath}/package.json`)) { |
nothing calls this directly
no test coverage detected