mirror of
https://github.com/davidmarkclements/0x.git
synced 2026-01-25 14:47:55 +00:00
argv part of schema
This commit is contained in:
parent
30cec38f65
commit
7aa4eacfc3
4
index.js
4
index.js
@ -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
|
||||
|
||||
@ -112,6 +112,10 @@
|
||||
"--": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
},
|
||||
"argv": {
|
||||
"type": "array",
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user