@cachly-dev/mcp-server 0.10.217 → 0.10.218
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/zeit-normalisieren.js +1 -1
- package/glama.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function s(e){const n=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return`${n}-${t}-${a}`}function o(e,n){const t=new Date(e.getTime());return t.setDate(t.getDate()-n),t}function d(e,n){const t=new Date(e.getTime());return t.setMonth(t.getMonth()-n),t}function c(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`}const r=e=>s(e),N=(e,n)=>`${n} week${n===1?"":"s"} before ${s(e)}`,E=(e,n)=>`${n} Wochen vor dem ${s(e)}`;function W(e,n){return o(e,(e.getDay()-n+7)%7||7)}const p={sonntag:0,montag:1,dienstag:2,mittwoch:3,donnerstag:4,freitag:5,samstag:6,sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6,sun:0,mon:1,tue:2,tues:2,wed:3,thu:4,thur:4,thurs:4,fri:5,sat:6},w=(e,n)=>{const t=p[n[2].toLowerCase()];return t===void 0?null:r(W(e,t))},v=String.raw`(?!\s+(?:im|des|eines|jedes|of|in)\b)`,M=[{re:/\bvorgestern\b/gi,angabe:e=>r(o(e,2))},{re:/\buebermorgen\b|\bübermorgen\b/gi,angabe:e=>r(o(e,-2))},{re:/\bgestern\b/gi,angabe:e=>r(o(e,1))},{re:/\bmorgen\b/gi,angabe:e=>r(o(e,-1))},{re:/\bheute\b/gi,angabe:e=>r(e)},{re:/\bvor\s+(\d{1,3})\s+Tagen\b/gi,angabe:(e,n)=>r(o(e,Number(n[1])))},{re:/\bvor\s+(\d{1,3})\s+Wochen\b/gi,angabe:(e,n)=>E(e,Number(n[1]))},{re:/\bvor\s+(\d{1,3})\s+Monaten\b/gi,angabe:(e,n)=>c(d(e,Number(n[1])))},{re:/\bvor\s+einer\s+Woche\b/gi,angabe:e=>`eine Woche vor dem ${s(e)}`},{re:/\bvor\s+einem\s+Monat\b/gi,angabe:e=>c(d(e,1))},{re:/\b(letztes|vergangenes|voriges|letzten|vergangenen|vorigen)\s+Wochenende\b/gi,angabe:e=>`das Wochenende vor dem ${s(e)}`},{re:/\b(letzte|letzten|letzter|vorige|vorigen)\s+Woche\b/gi,angabe:e=>`die Woche vor dem ${s(e)}`},{re:/\b(letzten|letzter|vorigen)\s+Monat\b/gi,angabe:e=>c(d(e,1))},{re:new RegExp(String.raw`\b(letzten|vergangenen|vorigen)\s+(Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|Sonntag)\b${v}`,"gi"),angabe:w},{re:/\bthe\s+day\s+before\s+yesterday\b/gi,angabe:e=>r(o(e,2))},{re:/\byesterday\b/gi,angabe:e=>r(o(e,1))},{re:/\btomorrow\b/gi,angabe:e=>r(o(e,-1))},{re:/\btoday\b/gi,angabe:e=>r(e)},{re:/\b(\d{1,3})\s+days?\s+ago\b/gi,angabe:(e,n)=>r(o(e,Number(n[1])))},{re:/\b(\d{1,3})\s+weeks?\s+ago\b/gi,angabe:(e,n)=>N(e,Number(n[1]))},{re:/\b(\d{1,3})\s+months?\s+ago\b/gi,angabe:(e,n)=>c(d(e,Number(n[1])))},{re:/\blast\s+weekend\b/gi,angabe:e=>`the weekend before ${s(e)}`},{re:/\blast\s+week\b/gi,angabe:e=>`the week before ${s(e)}`},{re:/\blast\s+month\b/gi,angabe:e=>c(d(e,1))},{re:new RegExp(String.raw`\b(last)\s+(monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b${v}`,"gi"),angabe:w},{re:new RegExp(String.raw`\b([Ll]ast)\s+(Mon|Tues?|Wed|Thu(?:rs?)?|Fri|Sat|Sun)\b${v}`,"g"),angabe:w}],y=String.raw`\((?:\d{4}-\d{2}(?:-\d{2})?|(?:the week(?:end)? before|\d{1,3} weeks? before|die Woche vor dem|das Wochenende vor dem|eine Woche vor dem|\d{1,3} Wochen vor dem) \d{4}-\d{2}-\d{2})\)`,T=new RegExp(String.raw`^\s*${y}`),$=new RegExp(y,"g");function D(e){const n=[];for(const t of[/```[\s\S]*?```/g,/`[^`\n]*`/g,/"[^"\n]*"/g,/„[^“\n]*“/g,/«[^»\n]*»/g])for(const a of e.matchAll(t))a.index!==void 0&&n.push([a.index,a.index+a[0].length]);return n}const S=(e,n,t)=>e.some(([a,u])=>n<u&&t>a);function k(e,n){if(!e)return e;const t=D(e),a=[],u=[];for(const{re:g,angabe:f}of M){g.lastIndex=0;for(const m of e.matchAll(g)){const b=m.index;if(b===void 0)continue;const i=b+m[0].length;if(S(t,b,i)||S(u,b,i)||T.test(e.slice(i))||Number.isNaN(n.getTime()))continue;const l=f(n,m);!l||l.includes("NaN")||(u.push([b,i]),a.push({ende:i,angabe:l}))}}if(a.length===0)return e;a.sort((g,f)=>f.ende-g.ende);let h=e;for(const g of a)h=`${h.slice(0,g.ende)} (${g.angabe})${h.slice(g.ende)}`;return h}function z(e,n){if(!e)return 0;const t=(e.match($)??[]).length;return(k(e,n).match($)??[]).length-t}export{k as normalisiereZeit,z as zaehleZeitangaben};
|
package/glama.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cachly-dev/mcp-server",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.218",
|
|
4
4
|
"mcpName": "io.github.cachly-dev/mcp-server",
|
|
5
5
|
"description": "Solve it once. From then on, your AI knows. Experience for coding agents, EU-hosted: an MCP server for Claude Code, Cursor, Copilot & Windsurf. Learns from every bug fix, commit and CI run.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"url": "https://github.com/cachly-dev/cachly-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.10.
|
|
9
|
+
"version": "0.10.218",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"name": "@cachly-dev/mcp-server",
|
|
14
14
|
"identifier": "@cachly-dev/mcp-server",
|
|
15
|
-
"version": "0.10.
|
|
15
|
+
"version": "0.10.218",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|