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