MCPcopy
hub / github.com/semantic-release/semantic-release / validateSteps

Function validateSteps

lib/plugins/utils.js:8–28  ·  view source on GitHub ↗
(conf)

Source from the content-addressed store, hash-verified

6const __dirname = dirname(fileURLToPath(import.meta.url));
7
8const 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
30export function validatePlugin(conf) {
31 return (

Callers 1

validateStepFunction · 0.85

Calls 1

parseConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…