(link: Link, store: Store, color?: boolean)
| 242 | } |
| 243 | |
| 244 | function buildProductString(link: Link, store: Store, color?: boolean): string { |
| 245 | if (color) { |
| 246 | if (store.currentProxyIndex !== undefined && store.proxyList) { |
| 247 | const proxy = `${store.currentProxyIndex + 1}/${store.proxyList.length}`; |
| 248 | return ( |
| 249 | chalk.gray(`[${proxy}]`) + |
| 250 | chalk.cyan(` [${store.name}]`) + |
| 251 | chalk.grey(` [${link.brand} (${link.series})] ${link.model}`) |
| 252 | ); |
| 253 | } else { |
| 254 | return ( |
| 255 | chalk.cyan(`[${store.name}]`) + |
| 256 | chalk.grey(` [${link.brand} (${link.series})] ${link.model}`) |
| 257 | ); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | if (store.currentProxyIndex !== undefined && store.proxyList) { |
| 262 | const proxy = `${store.currentProxyIndex + 1}/${store.proxyList.length}`; |
| 263 | return `[${proxy}] [${store.name}] [${link.brand} (${link.series})] ${link.model}`; |
| 264 | } else { |
| 265 | return `[${store.name}] [${link.brand} (${link.series})] ${link.model}`; |
| 266 | } |
| 267 | } |
no outgoing calls
no test coverage detected