( service: ExperimentalService )
| 82 | }; |
| 83 | |
| 84 | function getServiceDescriptionInfo( |
| 85 | service: ExperimentalService |
| 86 | ): ServiceDescriptionInfo { |
| 87 | if ( |
| 88 | service.type === 'worker' || |
| 89 | service.type === 'job' || |
| 90 | service.type === 'cron' |
| 91 | ) { |
| 92 | const typeLabel = |
| 93 | service.type === 'worker' |
| 94 | ? 'Worker' |
| 95 | : (jobTriggerLabels[service.trigger ?? ''] ?? 'Job'); |
| 96 | const typeColorFn = service.type === 'worker' ? chalk.magenta : chalk.cyan; |
| 97 | |
| 98 | if (service.runtime) { |
| 99 | const runtimeName = |
| 100 | service.runtime.charAt(0).toUpperCase() + service.runtime.slice(1); |
| 101 | const runtimeColorFn = runtimeColors[service.runtime] || chalk.yellow; |
| 102 | const label = `${typeLabel}${chalk.white('/')}${runtimeColorFn(runtimeName)}`; |
| 103 | return { label, colorFn: typeColorFn }; |
| 104 | } |
| 105 | return { label: typeLabel, colorFn: typeColorFn }; |
| 106 | } |
| 107 | |
| 108 | return getFrameworkRuntimeBuilderInfo(service); |
| 109 | } |
| 110 | |
| 111 | function getFrameworkRuntimeBuilderInfo(service: { |
| 112 | framework?: string; |
no test coverage detected