import { promisify } from 'util'
import { getClient, login } from '../tests/utils'
import { uploadVideo } from '../tests/utils/index'
import { promisify } from 'util'
import { getClient, login } from '../tests/utils'
import { uploadVideo } from '../tests/utils/index'
.option('-U, --username <username>', 'Username')
.option('-p, --password <token>', 'Password')
.option('-n, --video-name <name>', 'Video name')
.option('-U, --username <username>', 'Username')
.option('-p, --password <token>', 'Password')
.option('-n, --video-name <name>', 'Video name')
.option('-N, --nsfw', 'Video is Not Safe For Work')
.option('-c, --category <category number>', 'Category number')
.option('-m, --comments-enabled', 'Enable comments')
.option('-l, --licence <licence number>', 'Licence number')
.option('-N, --nsfw', 'Video is Not Safe For Work')
.option('-c, --category <category number>', 'Category number')
.option('-m, --comments-enabled', 'Enable comments')
.option('-l, --licence <licence number>', 'Licence number')
.option('-d, --video-description <description>', 'Video description')
.option('-t, --tags <tags>', 'Video tags', list)
.option('-b, --thumbnail <thumbnailPath>', 'Thumbnail path')
.option('-d, --video-description <description>', 'Video description')
.option('-t, --tags <tags>', 'Video tags', list)
.option('-b, --thumbnail <thumbnailPath>', 'Thumbnail path')
- console.error('Url, username, password, name and input file are required.')
+ if (!program['url']) console.error('--url field is required.')
+ if (!program['username']) console.error('--username field is required.')
+ if (!program['password']) console.error('--password field is required.')
+ if (!program['videoName']) console.error('--video-name field is required.')
+ if (!program['file']) console.error('--file field is required.')
fixture: program['file'],
thumbnailfile: program['thumbnailPath'],
previewfile: program['previewPath'],
fixture: program['file'],
thumbnailfile: program['thumbnailPath'],
previewfile: program['previewPath'],