Function
buildDisabledMessage
(
toolName: string,
flag: string,
categoryLabel?: string,
)
Source from the content-addressed store, hash-verified
| 82 | } |
| 83 | |
| 84 | function buildDisabledMessage( |
| 85 | toolName: string, |
| 86 | flag: string, |
| 87 | categoryLabel?: string, |
| 88 | ): string { |
| 89 | const reason = categoryLabel |
| 90 | ? `is in category ${categoryLabel} which` |
| 91 | : `requires ${flag.startsWith('--experimental') ? 'experimental feature' : 'flag'} ${flag} and`; |
| 92 | |
| 93 | return `Tool ${toolName} ${reason} is currently disabled. Enable it by running chrome-devtools start ${flag}=true. For more information check the README.`; |
| 94 | } |
| 95 | |
| 96 | function getDisabledReason( |
| 97 | tool: AnyToolDefinition, |
Tested by
no test coverage detected