MCPcopy Create free account
hub / github.com/appium/appium / _formatUpdateText

Function _formatUpdateText

packages/appium/lib/cli/extension-command.ts:1151–1167  ·  view source on GitHub ↗

* Format update information text

(data: ExtensionListData)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected