()
| 17 | } |
| 18 | |
| 19 | function parseArgs() { |
| 20 | const args = process.argv.slice(2); |
| 21 | const out = { name: undefined, description: undefined }; |
| 22 | |
| 23 | for (let i = 0; i < args.length; i++) { |
| 24 | const a = args[i]; |
| 25 | if (a === "--name" || a === "-n") { |
| 26 | out.name = args[i + 1]; |
| 27 | i++; |
| 28 | } else if (a.startsWith("--name=")) { |
| 29 | out.name = a.split("=")[1]; |
| 30 | } else if (a === "--description" || a === "-d") { |
| 31 | out.description = args[i + 1]; |
| 32 | i++; |
| 33 | } else if (a.startsWith("--description=")) { |
| 34 | out.description = a.split("=")[1]; |
| 35 | } else if (!a.startsWith("-") && !out.name) { |
| 36 | out.name = a; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | return out; |
| 41 | } |
| 42 | |
| 43 | async function createSkillTemplate() { |
| 44 | try { |
no outgoing calls
no test coverage detected