From 7aa4eacfc35d3b93e477aacbc021c848ea6d017e Mon Sep 17 00:00:00 2001 From: davidmarkclements Date: Wed, 28 Feb 2018 02:31:07 +0000 Subject: [PATCH] argv part of schema --- index.js | 4 +--- schema.json | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index a60fda5..f872e66 100644 --- a/index.js +++ b/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 diff --git a/schema.json b/schema.json index ff9ab96..74db82d 100644 --- a/schema.json +++ b/schema.json @@ -112,6 +112,10 @@ "--": { "type": "array", "items": {} + }, + "argv": { + "type": "array", + "items": {} } } }