(value: string)
| 10 | } |
| 11 | |
| 12 | function redactFilePaths(value: string): string { |
| 13 | return value |
| 14 | .replace(/file:\/\/[^\s'")]+/g, "[file-url]") |
| 15 | .replace(/\/Users\/[^\s'")]+/g, "[path]") |
| 16 | .replace(/\/(?:home|root|opt|app|workspace|srv|mnt)\/[^\s'")]+/g, "[path]") |
| 17 | .replace(/\/(?:private\/)?(?:var|tmp)\/[^\s'")]+/g, "[path]") |
| 18 | .replace(/[A-Za-z]:\\[^\s'")]+/g, "[path]"); |
| 19 | } |
| 20 | |
| 21 | export function redactTelemetryString( |
| 22 | value: string, |
no outgoing calls
no test coverage detected