Mariusz Nowak c9be9bcc45 fix(CLI): Do not assume "string" param type, when not type set
Plugins do not set "type" on options they propose, and if they're boolean options, treating them as strings breaks handling
2021-04-02 13:04:48 +02:00

18 lines
333 B
JavaScript

'use strict';
module.exports = {
config: {
usage: 'Path to serverless config file',
shortcut: 'c',
},
stage: {
usage: 'Stage of the service',
shortcut: 's',
},
...require('./global'),
};
for (const optionSchema of Object.values(module.exports)) {
if (!optionSchema.type) optionSchema.type = 'string';
}