aicommit2 2.1.10 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -33,7 +33,7 @@ ${i.footer}`:""}`}));return s.length>o?s.slice(0,o):s}catch{const s=/\[[\s\S]*?\
33
33
 
34
34
  ${m.body}`:""}${m.footer?`
35
35
 
36
- ${m.footer}`:""}`}));return l.length>o?l.slice(0,o):l}catch{return[]}}}extractMessageAsType(e,r){switch(r){case"conventional":const o=/(\w+)(?:\(.*?\))?:\s*(.*)/,n=e.subject.match(o),s=n?n[0]:e.subject;return{...e,subject:this.normalizeCommitMessage(s)};case"gitmoji":const i=/:\w*:\s*(.*)/,u=e.subject.match(i);return{...e,subject:u?u[0].toLowerCase():e.subject};default:return e}}normalizeCommitMessage(e){const r=/^(\w+)(\(.*?\))?:\s(.*)$/,o=e.match(r);if(o){const[,n,s,i]=o,u=n.toLowerCase(),a=i.charAt(0).toLowerCase()+i.slice(1);e=`${u}${s||""}: ${a}`}return e}sanitizeResponse(e){if(typeof e=="string")try{return[{title:`${Qr(e)}...`,value:e}]}catch{return[]}return e.map(r=>{try{return{title:`${Qr(r)}...`,value:r}}catch{return{title:"",value:""}}})}}var Zr="2.1.10",Vu="A Reactive CLI that generates git commit messages with various AI";class y extends Error{}const bt=" ",me=t=>{t instanceof Error&&(t instanceof y||(t.stack&&console.error(C.dim(t.stack.split(`
36
+ ${m.footer}`:""}`}));return l.length>o?l.slice(0,o):l}catch{return[]}}}extractMessageAsType(e,r){switch(r){case"conventional":const o=/(\w+)(?:\(.*?\))?:\s*(.*)/,n=e.subject.match(o),s=n?n[0]:e.subject;return{...e,subject:this.normalizeCommitMessage(s)};case"gitmoji":const i=/:\w*:\s*(.*)/,u=e.subject.match(i);return{...e,subject:u?u[0].toLowerCase():e.subject};default:return e}}normalizeCommitMessage(e){const r=/^(\w+)(\(.*?\))?:\s(.*)$/,o=e.match(r);if(o){const[,n,s,i]=o,u=n.toLowerCase(),a=i.charAt(0).toLowerCase()+i.slice(1);e=`${u}${s||""}: ${a}`}return e}sanitizeResponse(e){if(typeof e=="string")try{return[{title:`${Qr(e)}...`,value:e}]}catch{return[]}return e.map(r=>{try{return{title:`${Qr(r)}...`,value:r}}catch{return{title:"",value:""}}})}}var Zr="2.1.11",Vu="A Reactive CLI that generates git commit messages with various AI";class y extends Error{}const bt=" ",me=t=>{t instanceof Error&&(t instanceof y||(t.stack&&console.error(C.dim(t.stack.split(`
37
37
  `).slice(1).join(`
38
38
  `))),console.error(`
39
39
  ${bt}${C.dim(`aicommit2 v${Zr}`)}`),console.error(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aicommit2",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "description": "A Reactive CLI that generates git commit messages with various AI",
5
5
  "keywords": [
6
6
  "cli",