Passed
Push — main ( b7799b...6c7a2f )
by Bjarn
03:09 queued 01:45
created

src/commands/startCommand.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 11
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 11
c 0
b 0
f 0
rs 10
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A startCommand.ts ➔ startCommand 0 7 1
1
import commander from 'commander'
2
import ServiceController from '../controllers/serviceController'
3
4
export default function startCommand(program: typeof commander) {
5
    return program
6
        .command('start [service]')
7
        .description('Start all or a specific service.')
8
        .action((service: string | undefined) => {
9
            (new ServiceController()).executeStart(service).catch(err => console.log(err.message))
10
        })
11
}