Home Identifier Source Test Repository

src/cli/cmd-run.es6

import * as action from '../acts/run';

export default function () {
    return this
        .title('Run checker command')
        .helpful()
        .opt()
            .name('config')
            .title('Path to configuration file')
            .short('c').long('config')
            .req()
            .end()
        .opt()
            .name('url')
            .title('Url of website or page')
            .short('u').long('url')
            .end()
        .opt()
            .name('concurrent')
            .title('Number of concurrent requests performed simulteniously')
            .short('cc').long('concurrent')
            .end()
        .opt()
            .name('requestRetriesAmount')
            .title('Number of request retry attempts')
            .short('rra').long('requestRetriesAmount')
            .end()
        .opt()
            .name('requestTimeout')
            .title('Request timeout (in milliseconds)')
            .short('rt').long('requestTimeout')
            .end()
        .opt()
            .name('checkExternalUrls')
            .title('Set true to check external urls too')
            .short('ext').long('checkExternalUrls')
            .flag()
            .end()
        .opt()
            .name('mode')
            .title('Mode of analyze ("website", "section", "page")')
            .short('m').long('mode')
            .def('website')
            .end()
        .act((options) => {
            action.run(options);
        });
}