@workit-dev/mcp 2.20.1 → 2.20.2

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/index.js +17 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -23372,7 +23372,23 @@ function runsByGlob(command, name) {
23372
23372
  const tokens = command.split(/\s+/u).map((token) => token.replace(/^--filter=/u, "").replaceAll(/^["']|["']$/gu, "").replace(/^(?:npm|pnpm|yarn|bun):/u, ""));
23373
23373
  if (/\bpnpm\b/u.test(command) && tokens.some((token) => /^\/.+\/$/u.test(token)))
23374
23374
  return true;
23375
- return tokens.filter((token) => token.includes("*")).some((glob) => new RegExp(`^${glob.split(/\*+/u).map((part) => part.replaceAll(/[.+?^${}()|[\]\\]/gu, "\\$&")).join(".*")}$`, "u").test(name));
23375
+ return tokens.filter((token) => token.includes("*")).some((glob) => globMatches(glob, name));
23376
+ }
23377
+ function globMatches(glob, name) {
23378
+ const parts = glob.split("*");
23379
+ const first = parts[0];
23380
+ const last = parts.at(-1) ?? "";
23381
+ const end = name.length - last.length;
23382
+ if (end < first.length || !name.startsWith(first) || !name.endsWith(last))
23383
+ return false;
23384
+ let at = first.length;
23385
+ for (const part of parts.slice(1, -1)) {
23386
+ const found = name.indexOf(part, at);
23387
+ if (found < 0 || found + part.length > end)
23388
+ return false;
23389
+ at = found + part.length;
23390
+ }
23391
+ return true;
23376
23392
  }
23377
23393
  function goDirectives(text) {
23378
23394
  const out = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "2.20.1",
3
+ "version": "2.20.2",
4
4
  "private": false,
5
5
  "description": "Workit shared MCP transport for the eight task and policy operation families",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@modelcontextprotocol/sdk": "1.32.0",
47
- "@workit-dev/core": "^2.20.1",
47
+ "@workit-dev/core": "^2.20.2",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {