make options required

This commit is contained in:
Ben Irvin 2022-11-16 12:46:34 +01:00
parent b44626d000
commit e63b7eb711

View File

@ -272,18 +272,21 @@ program
.command('export') .command('export')
.description('Export data from Strapi to file') .description('Export data from Strapi to file')
.addOption( .addOption(
new Option('--encrypt [boolean]', `Encrypt output file using the 'aes-128-ecb' algorithm`) new Option(
'--encrypt <boolean>',
`Encrypt output file using the 'aes-128-ecb' algorithm. Prompts for key unless key option is used.`
)
.default(true) .default(true)
.argParser(parseInputBool) .argParser(parseInputBool)
) )
.addOption( .addOption(
new Option('--compress [boolean]', 'Compress output file using gzip compression') new Option('--compress <boolean>', 'Compress output file using gzip compression')
.default(true) .default(true)
.argParser(parseInputBool) .argParser(parseInputBool)
) )
.addOption( .addOption(
new Option( new Option(
'--archive [boolean]', '--archive <boolean>',
'Export all backup files into a single tar archive instead of a folder' 'Export all backup files into a single tar archive instead of a folder'
) )
.default(true) .default(true)
@ -291,8 +294,8 @@ program
) )
.addOption( .addOption(
new Option( new Option(
'--key [encryption key]', '--key <encryption key>',
'Provide encryption key in command instead of using a prompt' 'Provide encryption key directly instead of being prompted'
) )
) )
.addOption( .addOption(