( warnings: HttpImportWarning[], source: string, message: string, )
| 33 | = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i |
| 34 | |
| 35 | export function addWarning( |
| 36 | warnings: HttpImportWarning[], |
| 37 | source: string, |
| 38 | message: string, |
| 39 | ): void { |
| 40 | if (warnings.length >= 200) { |
| 41 | if ( |
| 42 | !warnings.some( |
| 43 | warning => warning.message === 'Additional warnings omitted', |
| 44 | ) |
| 45 | ) { |
| 46 | warnings.push({ message: 'Additional warnings omitted', source }) |
| 47 | } |
| 48 | return |
| 49 | } |
| 50 | |
| 51 | warnings.push({ message, source }) |
| 52 | } |
| 53 | |
| 54 | export function normalizeImportName(value: unknown, fallback: string): string { |
| 55 | const raw = typeof value === 'string' ? value : '' |
no outgoing calls
no test coverage detected