MCPcopy
hub / github.com/di-sukharev/opencommit / Z2

Function Z2

out/cli.cjs:65255–65264  ·  view source on GitHub ↗
(t2, e3, r3 = process.argv.slice(2))

Source from the content-addressed store, hash-verified

65253 i3 && (Array.isArray(i3) ? a4.push(...i3) : a4.push(i3));
65254 for (const s2 of a4) {
65255 if (r3.has(s2)) throw new Error(`Duplicate command name found: ${d3(s2)}`);
65256 r3.set(s2, n2);
65257 }
65258 }
65259 return r3.get(t2);
65260}
65261function Z2(t2, e3, r3 = process.argv.slice(2)) {
65262 if (!t2) throw new Error("Options is required");
65263 if ("name" in t2 && (!t2.name || !y2.test(t2.name))) throw new Error(`Invalid script name: ${d3(t2.name)}`);
65264 const n2 = r3[0];
65265 if (t2.commands && y2.test(n2)) {
65266 const a4 = z2(n2, t2.commands);
65267 if (a4) return x2(a4.options.name, { ...a4.options, parent: t2 }, a4.callback, r3.slice(1));

Callers 1

cli.cjsFile · 0.85

Calls 4

z2Function · 0.85
x2Function · 0.85
testMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected