(pattern: string, options: { cwd: string })
| 350 | return baseHost.readFile(path, encoding); |
| 351 | }, |
| 352 | glob(pattern: string, options: { cwd: string }) { |
| 353 | if (pattern.includes('..')) { |
| 354 | throw new Error( |
| 355 | `Access denied: glob pattern '${pattern}' contains path traversal sequences.`, |
| 356 | ); |
| 357 | } |
| 358 | |
| 359 | checkPath(options.cwd); |
| 360 | |
| 361 | const firstWildcardIndex = pattern.search(/[*?[{]/); |
| 362 | const basePath = firstWildcardIndex >= 0 ? pattern.substring(0, firstWildcardIndex) : pattern; |
| 363 | |
| 364 | const targetDir = resolve(options.cwd, basePath); |
| 365 | checkPath(targetDir); |
| 366 | |
| 367 | return baseHost.glob(pattern, options); |
| 368 | }, |
| 369 | executeNgCommand( |
| 370 | args: readonly string[], |
| 371 | options: Parameters<Host['executeNgCommand']>[1] = {}, |
no test coverage detected