"use strict";var c=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var G=(t,r)=>{for(var i in r)c(t,i,{get:r[i],enumerable:!0})},N=(t,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of p(r))!y.call(t,o)&&o!==i&&c(t,o,{get:()=>r[o],enumerable:!(n=h(r,o))||n.enumerable});return t};var b=t=>N(c({},"__esModule",{value:!0}),t);var x={};G(x,{gitCommitInfo:()=>U});module.exports=b(x);var m=require("child_process"),e=t=>{try{return(0,m.execSync)(t,{encoding:"utf8"}).trim()}catch(r){return console.error(`\u6267\u884CGit\u547D\u4EE4 "${t}" \u51FA\u9519\uFF1A`,r),""}},j=()=>e("git symbolic-ref --short -q HEAD"),E=()=>e("git config user.name"),H=()=>e("git config user.email"),O=()=>{try{return e("git show-ref --tags").match(/refs\/tags\/.+/ig)||[]}catch{return[]}},C=t=>t.length>0?t[t.length-1].replace("refs/tags/",""):"",D=()=>{let r=e("git remote -v").match(/\/([^\/]+)\.git/);return r?r[1]:""},S=()=>{let t=e("git log -1 --pretty=format:%cn"),r=e("git log -1 --pretty=format:%ce"),i=e("git log -1 --pretty=format:%ci"),n=e("git log -1 --pretty=format:%s"),o=e("git log -1 --pretty=format:%H");return{commitName:t,commitEmail:r,commitDate:i,commitSubject:n,commitHash:o}},U=()=>{let t=D(),r=j(),i=E(),n=H(),{commitName:o,commitEmail:s,commitDate:g,commitSubject:a,commitHash:u}=S(),f=O(),l=C(f);return{projectName:t,branch:r,gitUserName:i,gitUserEmail:n,commitName:o,commitEmail:s,commitDate:g,commitSubject:a,commitHash:u,latestTag:l}};0&&(module.exports={gitCommitInfo});