* Format update information text
(data: ExtensionListData)
| 1149 | * Format update information text |
| 1150 | */ |
| 1151 | private _formatUpdateText(data: ExtensionListData): string { |
| 1152 | const {updateVersion, unsafeUpdateVersion, upToDate, updateError} = data; |
| 1153 | if (updateError) { |
| 1154 | return console.styleText('red', ` [Cannot check for updates: ${updateError}]`); |
| 1155 | } |
| 1156 | let txt = ''; |
| 1157 | if (updateVersion) { |
| 1158 | txt += console.styleText('magenta', ` [${updateVersion} available]`); |
| 1159 | } |
| 1160 | if (upToDate) { |
| 1161 | txt += console.styleText('green', ' [Up to date]'); |
| 1162 | } |
| 1163 | if (unsafeUpdateVersion) { |
| 1164 | txt += console.styleText('cyan', ` [${unsafeUpdateVersion} available (potentially unsafe)]`); |
| 1165 | } |
| 1166 | return txt; |
| 1167 | } |
| 1168 | |
| 1169 | /** |
| 1170 | * Get repository URL from package data |
nothing calls this directly
no outgoing calls
no test coverage detected