import{logger as n}from"../../server/tools/notifiers/logger.js";import{generateTag as a}from"./generate-tag.js";import{normalizeTagName as c}from"./normalize-tag-name.js";const i={Tag:"tag"},f={boolean:["force"],alias:{f:"force",d:"contentDir"},default:{contentDir:process.cwd()}};async function m(t){const[e,r]=t._;try{switch(e){case i.Tag:if(!r)return n.panicOnContentError(`${e} "name" is not provided.`);const o=await c(r);return a(t.contentDir,o,t.force);case null:case void 0:n.panicOnContentError('generation "type" is not provided.');break;default:n.panicOnContentError(`Unsupported type: "${e}".`)}}catch{return n.warn(`${e} was not created.`)}}export{m as generate,f as generateCliOptions};
