@cachly-dev/mcp-server 0.10.250 → 0.10.252

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.
package/dist/src/autor.js CHANGED
@@ -1 +1 @@
1
- import{execFileSync as c}from"node:child_process";const m=e=>t=>{try{return t.startsWith("-")?"":c("git",["config",t],{cwd:e,encoding:"utf-8",stdio:"pipe",timeout:1500,windowsHide:!0}).trim()}catch{return""}};function r(e){const t=(e??"").trim();return t?(t.split(/[\s.]+/)[0]??"").toLowerCase().replace(/[^a-z0-9_-]/g,"").slice(0,32):""}const a=new Set(["-","anonym","anonymous","none","kein","off"]);function g(e){const t=(e.uebergeben??"").trim().toLowerCase();if(a.has(t))return{autor:"",quelle:"anonym"};const n=(e.umgebung??"").trim().toLowerCase();if(a.has(n))return{autor:"",quelle:"anonym"};const o=r(e.uebergeben??"");if(o)return{autor:o,quelle:"uebergeben"};const u=r(e.umgebung??"");if(u)return{autor:u,quelle:"umgebung"};const i=r(e.git("user.name"));if(i)return{autor:i,quelle:"git-name"};const l=e.git("user.email"),s=r((l??"").split("@")[0]??"");return s?{autor:s,quelle:"git-mail"}:{autor:"",quelle:"unbekannt"}}const h="coauthor";function b(e){const t=(e??"").trim().toLowerCase();return!t||t==="off"||t==="false"||t==="0"||t==="none"?"":r(t)}function p(e,t){return e?!t||t===e?e:`${e}+${t}`:""}function d(e){return(e??"").split("+")[0]??""}function w(e){return e.autor||e.quelle==="anonym"?null:'\u{1F464} **No author found** \u2014 neither `author`, nor `CACHLY_AUTHOR`, nor `git config user.name`. Without an author this lesson does not count as team knowledge: `brain_who_knows` finds nobody and reuse across people stays uncounted. A `git config user.name "Your Name"` in the project is enough for all future lessons.'}export{h as COAUTHOR_PREF_KEY,w as autorHinweis,b as coautorAus,m as echterGitLeser,g as ermittleAutor,p as mitCoautor,r as normalisiere,d as nurMensch};
1
+ import{execFileSync as f}from"node:child_process";const w=e=>t=>{try{return t.startsWith("-")?"":f("git",["config",t],{cwd:e,encoding:"utf-8",stdio:"pipe",timeout:1500,windowsHide:!0}).trim()}catch{return""}};function r(e){const t=(e??"").trim();return t?(t.split(/[\s.]+/)[0]??"").toLowerCase().replace(/[^a-z0-9_-]/g,"").slice(0,32):""}const l=new Set(["-","anonym","anonymous","none","kein","off"]);function b(e){const t=(e.uebergeben??"").trim().toLowerCase();if(l.has(t))return{autor:"",quelle:"anonym"};const o=(e.umgebung??"").trim().toLowerCase();if(l.has(o))return{autor:"",quelle:"anonym"};const u=r(e.uebergeben??"");if(u)return{autor:u,quelle:"uebergeben"};const i=r(e.umgebung??"");if(i)return{autor:i,quelle:"umgebung"};const s=r(e.git("user.name"));if(s)return{autor:s,quelle:"git-name"};const c=e.git("user.email"),a=r((c??"").split("@")[0]??"");return a?{autor:a,quelle:"git-mail"}:{autor:"",quelle:"unbekannt"}}const p="coauthor";function h(e){const t=(e??"").trim().toLowerCase();return!t||t==="off"||t==="false"||t==="0"||t==="none"?"":r(t)}function x(e,t){return e?!t||t===e?e:`${e}+${t}`:""}function q(e){return(e??"").split("+")[0]??""}function m(e){return e.autor||e.quelle==="anonym"?null:'\u{1F464} **Tip:** saved without an author name. Set `git config user.name "Your Name"` (or `CACHLY_AUTHOR`) once, and `brain_who_knows` can tell teammates who knows this.'}let n=!1;function A(e){const t=m(e);return!t||n?null:(n=!0,t)}function C(){n=!1}export{p as COAUTHOR_PREF_KEY,m as autorHinweis,A as autorHinweisEinmal,h as coautorAus,w as echterGitLeser,b as ermittleAutor,x as mitCoautor,r as normalisiere,q as nurMensch,C as setzeAutorHinweisZurueck};