(conf)
| 6 | const __dirname = dirname(fileURLToPath(import.meta.url)); |
| 7 | |
| 8 | const validateSteps = (conf) => { |
| 9 | return conf.every((conf) => { |
| 10 | if ( |
| 11 | isArray(conf) && |
| 12 | (conf.length === 1 || conf.length === 2) && |
| 13 | (isString(conf[0]) || isFunction(conf[0])) && |
| 14 | (isNil(conf[1]) || isPlainObject(conf[1])) |
| 15 | ) { |
| 16 | return true; |
| 17 | } |
| 18 | |
| 19 | conf = castArray(conf); |
| 20 | |
| 21 | if (conf.length !== 1) { |
| 22 | return false; |
| 23 | } |
| 24 | |
| 25 | const [name, config] = parseConfig(conf[0]); |
| 26 | return (isString(name) || isFunction(name)) && isPlainObject(config); |
| 27 | }); |
| 28 | }; |
| 29 | |
| 30 | export function validatePlugin(conf) { |
| 31 | return ( |
no test coverage detected
searching dependent graphs…