(services: ExperimentalService[])
| 175 | } |
| 176 | |
| 177 | function buildServiceRowsV1(services: ExperimentalService[]): string[][] { |
| 178 | const outputOrder: Record<string, number> = { |
| 179 | web: 0, |
| 180 | cron: 1, |
| 181 | job: 1, |
| 182 | worker: 2, |
| 183 | }; |
| 184 | const sorted = [...services].sort( |
| 185 | (a, b) => (outputOrder[a.type] ?? 3) - (outputOrder[b.type] ?? 3) |
| 186 | ); |
| 187 | |
| 188 | return sorted.map(service => { |
| 189 | const descInfo = getServiceDescriptionInfo(service); |
| 190 | const target = getServiceTarget(service); |
| 191 | |
| 192 | return [ |
| 193 | `• ${service.name}`, |
| 194 | descInfo.colorFn(`[${descInfo.label}]`), |
| 195 | chalk.dim('→'), |
| 196 | target, |
| 197 | ]; |
| 198 | }); |
| 199 | } |
| 200 | |
| 201 | function buildServiceRowsV2(services: ExperimentalServiceV2[]): string[][] { |
| 202 | return services.map(service => { |
no test coverage detected