argv part of schema

This commit is contained in:
davidmarkclements 2018-02-28 02:31:07 +00:00
parent 30cec38f65
commit 7aa4eacfc3
2 changed files with 5 additions and 3 deletions

View File

@ -100,15 +100,13 @@ module.exports = zeroEks
function validate (args) {
const privateProps = {
workingDir: {type: 'string'},
argv: {type: 'array'}
workingDir: {type: 'string'}
}
const valid = ajv.compile({
...schema,
properties: {...schema.properties, ...privateProps}
}
)
if (valid(args)) return
const [{keyword, dataPath, params, message}] = ajv.errors

View File

@ -112,6 +112,10 @@
"--": {
"type": "array",
"items": {}
},
"argv": {
"type": "array",
"items": {}
}
}
}