@flemist/mcp-project-tools 3.0.7 → 3.0.8

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/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Command as u } from "commander";
2
- import { S as c, a as p, b as f, A as g, p as m, s as d } from "./startMcpServer-CQMiY_N3.js";
2
+ import { S as c, a as p, b as f, A as g, p as m, s as d } from "./startMcpServer-BwbVbpru.js";
3
3
  import * as i from "path";
4
4
  import * as C from "fs";
5
5
  import h from "deepmerge";
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s } from "./startMcpServer-CQMiY_N3.js";
1
+ import { s } from "./startMcpServer-BwbVbpru.js";
2
2
  export {
3
3
  s as startMcpServer
4
4
  };
@@ -64,7 +64,7 @@ async function bt(t, r) {
64
64
  throw await e(), n;
65
65
  }
66
66
  }
67
- async function xt(t, r, s, o) {
67
+ async function St(t, r, s, o) {
68
68
  await q({
69
69
  logFilePath: s.logFilePath,
70
70
  message: "REQUEST",
@@ -73,7 +73,7 @@ async function xt(t, r, s, o) {
73
73
  let e = o ? G.get(o) : null;
74
74
  e || (e = await bt(s, o)), await e.handleRequest(t, r, t.body);
75
75
  }
76
- async function St(t, r, s) {
76
+ async function xt(t, r, s) {
77
77
  const o = s ? G.get(s) : null;
78
78
  if (!o) {
79
79
  r.status(400).json({ error: "No valid session found" });
@@ -85,7 +85,7 @@ function $t(t) {
85
85
  return async function(s, o) {
86
86
  try {
87
87
  const e = yt(s);
88
- s.method === "POST" ? await xt(s, o, t, e) : s.method === "GET" ? await St(s, o, e) : o.status(405).json({ error: "Method not allowed" });
88
+ s.method === "POST" ? await St(s, o, t, e) : s.method === "GET" ? await xt(s, o, e) : o.status(405).json({ error: "Method not allowed" });
89
89
  } catch (e) {
90
90
  console.error("Unhandled error in streamableHttpHandler", e), o.status(500).json({
91
91
  error: "Internal server error: " + (e instanceof Error ? e.message : "Unknown error")
@@ -95,7 +95,7 @@ function $t(t) {
95
95
  }
96
96
  const O = /* @__PURE__ */ new Map();
97
97
  let It = 0;
98
- const ie = 10, Mt = 1800 * 1e3, k = 2e3, Tt = 500, vt = 5e3;
98
+ const ie = 10, Mt = 1800 * 1e3, k = 1e4, Tt = 500, vt = 5e3;
99
99
  function Ct(t) {
100
100
  const { commandLine: r, commandLineRules: s } = t;
101
101
  let o = !1;
@@ -380,9 +380,9 @@ To use this command line, ask the user to modify the command line rules in the c
380
380
  ... [${f.output.length - k} characters trimmed] ...
381
381
  `, w = k - y.length;
382
382
  if (w > 0) {
383
- const x = Math.floor(w / 2);
384
- f.output = f.output.substring(0, x) + y + f.output.substring(
385
- f.output.length - (w - x)
383
+ const S = Math.floor(w / 2);
384
+ f.output = f.output.substring(0, S) + y + f.output.substring(
385
+ f.output.length - (w - S)
386
386
  );
387
387
  } else
388
388
  f.output = f.output.substring(0, k);
@@ -639,13 +639,13 @@ function De(t) {
639
639
  countDirs: 0,
640
640
  countLinks: 0
641
641
  };
642
- function w(b, S) {
643
- if (m(S.totalSize)) {
644
- const v = `${S.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${b}`;
642
+ function w(b, x) {
643
+ if (m(x.totalSize)) {
644
+ const v = `${x.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${b}`;
645
645
  c?.handleLog ? c.handleLog(v) : console.log(v);
646
646
  }
647
647
  }
648
- async function x(b, S, $, v) {
648
+ async function S(b, x, $, v) {
649
649
  return l ? await z({
650
650
  pool: n,
651
651
  func: async () => {
@@ -653,7 +653,7 @@ function De(t) {
653
653
  return await l({
654
654
  level: s,
655
655
  path: b,
656
- stat: S,
656
+ stat: x,
657
657
  itemStat: $,
658
658
  totalStat: y,
659
659
  abortSignal: p
@@ -667,13 +667,13 @@ function De(t) {
667
667
  abortSignal: p
668
668
  }) : !0;
669
669
  }
670
- async function M(b, S, $, v) {
670
+ async function M(b, x, $, v) {
671
671
  v || (v = b);
672
672
  const E = await z({
673
673
  pool: n,
674
674
  func: () => B.promises.lstat(b).catch(d),
675
675
  count: 1,
676
- priority: P(S, P(1, i)),
676
+ priority: P(x, P(1, i)),
677
677
  abortSignal: p
678
678
  });
679
679
  if (!E || !$ && E.isFile())
@@ -690,7 +690,7 @@ function De(t) {
690
690
  countLinks: 0
691
691
  };
692
692
  const L = P(
693
- S,
693
+ x,
694
694
  P(E.isDirectory() ? 2 : 3, i)
695
695
  );
696
696
  if (E.isSymbolicLink()) {
@@ -705,14 +705,14 @@ function De(t) {
705
705
  if (F) {
706
706
  const R = T.isAbsolute(F) ? F : T.resolve(T.dirname(v), F), U = await M(
707
707
  R,
708
- S,
708
+ x,
709
709
  $,
710
710
  v
711
711
  );
712
712
  U && (N = U);
713
713
  }
714
714
  }
715
- return ($ || N.countFiles + N.countDirs + N.countLinks >= 1) && (N.countLinks += 1, await x(
715
+ return ($ || N.countFiles + N.countDirs + N.countLinks >= 1) && (N.countLinks += 1, await S(
716
716
  v,
717
717
  E,
718
718
  N,
@@ -739,7 +739,7 @@ function De(t) {
739
739
  });
740
740
  }
741
741
  }
742
- return ($ || N.countFiles + N.countDirs + N.countLinks >= 1) && (E.isDirectory() ? N.countDirs += 1 : E.isFile() && (N.countFiles += 1), await x(
742
+ return ($ || N.countFiles + N.countDirs + N.countLinks >= 1) && (E.isDirectory() ? N.countDirs += 1 : E.isFile() && (N.countFiles += 1), await S(
743
743
  v,
744
744
  E,
745
745
  N,
@@ -747,7 +747,7 @@ function De(t) {
747
747
  ) && (ce(y, N), w(v, N))), N;
748
748
  }
749
749
  const I = [];
750
- for (let b = 0, S = r.length; b < S; b++) {
750
+ for (let b = 0, x = r.length; b < x; b++) {
751
751
  const $ = jt(r[b]), v = f ? f($) : !0;
752
752
  v !== !1 && I.push(M($, b, v));
753
753
  }
@@ -873,13 +873,13 @@ async function Qt(t) {
873
873
  type: d
874
874
  };
875
875
  if (t.result.dateModified && (y.dateModified = m), t.result.size && (y.size = g), t.result.countFiles && (y.countFiles = p), t.dateModified && m != null) {
876
- const [w, x] = t.dateModified;
877
- if (w != null && m < w || x != null && m > x)
876
+ const [w, S] = t.dateModified;
877
+ if (w != null && m < w || S != null && m > S)
878
878
  return !1;
879
879
  }
880
880
  if (t.totalSize && g != null) {
881
- const [w, x] = t.totalSize;
882
- if (w != null && g < w || x != null && g > x)
881
+ const [w, S] = t.totalSize;
882
+ if (w != null && g < w || S != null && g > S)
883
883
  return !1;
884
884
  }
885
885
  return d === "file" && (o.countFiles = (o.countFiles ?? 0) + 1), d === "file" && g != null && (o.size = (o.size ?? 0) + g), m != null && (o.dateModified == null || m > o.dateModified) && (o.dateModified = m), c && !t.result.dirs || l && !t.result.files || s.push(y), !0;
@@ -995,7 +995,7 @@ function Yt(t, r) {
995
995
  }
996
996
  return e;
997
997
  }
998
- const Vt = "3.0.7", Zt = {
998
+ const Vt = "3.0.8", Zt = {
999
999
  version: Vt
1000
1000
  }, ds = "Project Tools", fs = "project-tools", ms = Zt.version, hs = "d00f70240703039df14c76176a055bce6b5484d2b552ba2c89820f03b8e5e60d", he = 25e3;
1001
1001
  function pe(t) {
@@ -1143,7 +1143,7 @@ async function Xt(t, r) {
1143
1143
  value: $,
1144
1144
  valueType: "pattern",
1145
1145
  exclude: !1
1146
- })) : [{ value: "**", valueType: "pattern", exclude: !1 }], y = r.globsExclude || [], w = [...p, ...y], x = {
1146
+ })) : [{ value: "**", valueType: "pattern", exclude: !1 }], y = r.globsExclude || [], w = [...p, ...y], S = {
1147
1147
  files: e ?? !1,
1148
1148
  dirs: n ?? !1,
1149
1149
  dateModified: f.includes("dateModified") || m.includes("dateModified"),
@@ -1172,7 +1172,7 @@ async function Xt(t, r) {
1172
1172
  const b = await Qt({
1173
1173
  rootDir: g || null,
1174
1174
  globs: w,
1175
- result: x,
1175
+ result: S,
1176
1176
  dateModified: M,
1177
1177
  totalSize: I
1178
1178
  });
@@ -1339,37 +1339,37 @@ async function Pe(t, r, s) {
1339
1339
  try {
1340
1340
  try {
1341
1341
  await B.promises.access(d, B.constants.F_OK);
1342
- } catch (S) {
1343
- if (S.code === "ENOENT")
1342
+ } catch (x) {
1343
+ if (x.code === "ENOENT")
1344
1344
  return {
1345
1345
  error: `Directory does not exist: "${d}". Verify the path is correct and accessible. If using rootDir parameter, ensure it exists relative to the current working directory. Use fs-snapshot-query-create without rootDir to snapshot the current directory, or check parent directories first.`
1346
1346
  };
1347
- throw S;
1347
+ throw x;
1348
1348
  }
1349
- const m = o.extraFields ? o.extraFields.map((S) => S === "lastModified" ? "dateModified" : S) : [];
1349
+ const m = o.extraFields ? o.extraFields.map((x) => x === "lastModified" ? "dateModified" : x) : [];
1350
1350
  m.includes("name") || m.push("name"), m.sort(tr);
1351
- const g = n && n.length > 0 ? n.map((S) => ({
1352
- value: S,
1351
+ const g = n && n.length > 0 ? n.map((x) => ({
1352
+ value: x,
1353
1353
  valueType: "pattern",
1354
1354
  exclude: !1
1355
1355
  })) : [{ value: "**", valueType: "pattern", exclude: !1 }], p = r.globsExclude || [], y = [...g, ...p];
1356
- let w = null, x = null;
1356
+ let w = null, S = null;
1357
1357
  if (i || u)
1358
1358
  try {
1359
- const S = Date.now(), $ = u ? S - we(u) : null, v = i ? S - we(i) : null;
1359
+ const x = Date.now(), $ = u ? x - we(u) : null, v = i ? x - we(i) : null;
1360
1360
  w = [$, v];
1361
- } catch (S) {
1361
+ } catch (x) {
1362
1362
  return {
1363
- error: S instanceof Error ? S.message : "Unknown error parsing time ago filter"
1363
+ error: x instanceof Error ? x.message : "Unknown error parsing time ago filter"
1364
1364
  };
1365
1365
  }
1366
1366
  if (c || l)
1367
1367
  try {
1368
- const S = c ? ye(c) : null, $ = l ? ye(l) : null;
1369
- x = [S, $];
1370
- } catch (S) {
1368
+ const x = c ? ye(c) : null, $ = l ? ye(l) : null;
1369
+ S = [x, $];
1370
+ } catch (x) {
1371
1371
  return {
1372
- error: S instanceof Error ? S.message : "Unknown error parsing size filter"
1372
+ error: x instanceof Error ? x.message : "Unknown error parsing size filter"
1373
1373
  };
1374
1374
  }
1375
1375
  const M = a ? a.includes("file") : !0, I = a ? a.includes("dir") : !0, b = {
@@ -1379,7 +1379,7 @@ async function Pe(t, r, s) {
1379
1379
  matchFiles: M,
1380
1380
  matchDirs: I,
1381
1381
  dateModified: w,
1382
- totalSize: x,
1382
+ totalSize: S,
1383
1383
  fields: m
1384
1384
  };
1385
1385
  return f.fsSnapshotQueries.set(e, b), {
@@ -1513,18 +1513,18 @@ async function sr(t) {
1513
1513
  const m = W(l || "."), g = f ? "dir" : "file", p = f ? null : u.mtimeMs, y = u.size;
1514
1514
  let w = !0;
1515
1515
  if (d && !t.matchFiles && (w = !1), f && !t.matchDirs && (w = !1), w && d && t.dateModified && p != null) {
1516
- const [b, S] = t.dateModified;
1517
- (b != null && p < b || S != null && p > S) && (w = !1);
1516
+ const [b, x] = t.dateModified;
1517
+ (b != null && p < b || x != null && p > x) && (w = !1);
1518
1518
  }
1519
1519
  if (w && d && t.totalSize && y != null) {
1520
- const [b, S] = t.totalSize;
1521
- (b != null && y < b || S != null && y > S) && (w = !1);
1520
+ const [b, x] = t.totalSize;
1521
+ (b != null && y < b || x != null && y > x) && (w = !1);
1522
1522
  }
1523
1523
  if (f && !w) {
1524
1524
  if (!(c.countFiles && c.countFiles > 0)) return !1;
1525
1525
  } else if (!w)
1526
1526
  return !1;
1527
- const x = {
1527
+ const S = {
1528
1528
  path: m ?? ".",
1529
1529
  name: T.basename(i),
1530
1530
  type: g,
@@ -1534,7 +1534,7 @@ async function sr(t) {
1534
1534
  };
1535
1535
  if (m == null)
1536
1536
  return n.dateModified = p, n.size = y, n.isMatched = w, !0;
1537
- r.set(m, x);
1537
+ r.set(m, S);
1538
1538
  const M = W(T.dirname(m).replace(/\\/g, "/"));
1539
1539
  let I = s.get(M);
1540
1540
  return I || (I = [], s.set(M, I)), I.push(m), !0;
@@ -1567,7 +1567,7 @@ const or = [
1567
1567
  // max: 2,
1568
1568
  // },
1569
1569
  ];
1570
- function xe(t, r = or) {
1570
+ function Se(t, r = or) {
1571
1571
  const s = t.length;
1572
1572
  if (s === 0) return 0;
1573
1573
  const o = r.length;
@@ -1595,15 +1595,15 @@ function xe(t, r = or) {
1595
1595
  }
1596
1596
  function Ue(t) {
1597
1597
  let r = 0;
1598
- return r += xe(t.textOpen) + 1, t.textClose != null && (r += xe(t.textClose) + 1), t.indent && (r += 1), r;
1598
+ return r += Se(t.textOpen) + 1, t.textClose != null && (r += Se(t.textClose) + 1), t.indent && (r += 1), r;
1599
1599
  }
1600
- const Se = ["B", "KB", "MB", "GB", "TB"], $e = 1024;
1600
+ const xe = ["B", "KB", "MB", "GB", "TB"], $e = 1024;
1601
1601
  function nr(t) {
1602
1602
  if (t == null) return "-";
1603
1603
  let r = t ?? 0, s = 0;
1604
- for (; r >= $e && s < Se.length - 1; )
1604
+ for (; r >= $e && s < xe.length - 1; )
1605
1605
  r /= $e, s++;
1606
- return `${s === 0 ? r.toString() : r.toFixed(2)}${Se[s]}`;
1606
+ return `${s === 0 ? r.toString() : r.toFixed(2)}${xe[s]}`;
1607
1607
  }
1608
1608
  function ir(t) {
1609
1609
  const s = Date.now() - t;
@@ -1629,16 +1629,16 @@ function cr(t) {
1629
1629
  return function(o, e) {
1630
1630
  let n = "", a, i = 0;
1631
1631
  const u = e ? e.length : 0;
1632
- let c = 1, l, f = 0, d = 0, m = 0, g = 0, p = null, y, w, x;
1632
+ let c = 1, l, f = 0, d = 0, m = 0, g = 0, p = null, y, w, S;
1633
1633
  if (e)
1634
1634
  for (let I = 0; I < e.length; I++) {
1635
1635
  const b = e[I];
1636
1636
  i += b.countMatched, c += b.countTotal, f += b.tokens, d += b.tokensTotal, m += b.size, g += b.countFiles, b.dateModified != null && (p == null || b.dateModified > p) && (p = b.dateModified);
1637
1637
  }
1638
- o ? (y = o.type, w = o.name, x = o.path, a = o.isMatched, a && (i += 1), o.type === "file" ? (m = o.size || 0, g = 1, p = o.dateModified || null) : o.dateModified != null && (p == null || o.dateModified > p) && (p = o.dateModified)) : (y = "dir", w = "<root>", x = ".", a = !0);
1638
+ o ? (y = o.type, w = o.name, S = o.path, a = o.isMatched, a && (i += 1), o.type === "file" ? (m = o.size || 0, g = 1, p = o.dateModified || null) : o.dateModified != null && (p == null || o.dateModified > p) && (p = o.dateModified)) : (y = "dir", w = "<root>", S = ".", a = !0);
1639
1639
  for (let I = 0, b = r.length; I < b; I++) {
1640
- const S = r[I];
1641
- switch (I > 0 && (n += " "), S) {
1640
+ const x = r[I];
1641
+ switch (I > 0 && (n += " "), x) {
1642
1642
  case "dateModified":
1643
1643
  n += p ? ir(p) : "-";
1644
1644
  break;
@@ -1664,7 +1664,7 @@ function cr(t) {
1664
1664
  return l = Ue(M), d += l, {
1665
1665
  type: y,
1666
1666
  name: w,
1667
- path: x,
1667
+ path: S,
1668
1668
  isMatched: a,
1669
1669
  countMatched: i,
1670
1670
  countChilds: u,
@@ -1834,13 +1834,13 @@ function fr(t) {
1834
1834
  const y = p * i.tokens;
1835
1835
  if (o != null && l + m.countChilds + p > o || e != null && f + m.tokensChilds + y > e) {
1836
1836
  const w = [];
1837
- let x = null, M = 0;
1838
- for (let b = 0, S = g.length; b < S; b++) {
1837
+ let S = null, M = 0;
1838
+ for (let b = 0, x = g.length; b < x; b++) {
1839
1839
  const $ = g[b], v = M * i.tokens;
1840
- x != null && // Если общий лимит превышен, то не создаем новую группу, а продолжаем текущую. В случае достижения лимитов, последняя группа может содержать больше элементов, чем указано в лимитах группы, и это допустимо. Главное - дать в отчете полную картину.
1841
- !(o != null && l + 1 > o || e != null && f + i.tokens > e) && (n != null && x.countGrouped + 1 + M > n || a != null && x.tokensGrouped + $.tokens + v > a) && (w.push(x), l += 1, f += i.tokens, x = null, M = 0), x = i.add(x, $, b), $.countChilds > 0 && (M += 1);
1840
+ S != null && // Если общий лимит превышен, то не создаем новую группу, а продолжаем текущую. В случае достижения лимитов, последняя группа может содержать больше элементов, чем указано в лимитах группы, и это допустимо. Главное - дать в отчете полную картину.
1841
+ !(o != null && l + 1 > o || e != null && f + i.tokens > e) && (n != null && S.countGrouped + 1 + M > n || a != null && S.tokensGrouped + $.tokens + v > a) && (w.push(S), l += 1, f += i.tokens, S = null, M = 0), S = i.add(S, $, b), $.countChilds > 0 && (M += 1);
1842
1842
  }
1843
- x != null && (w.push(x), l += 1, f += i.tokens);
1843
+ S != null && (w.push(S), l += 1, f += i.tokens);
1844
1844
  const I = w.map((b) => ({
1845
1845
  text: i.getReportText(b)
1846
1846
  }));
@@ -1856,8 +1856,8 @@ function fr(t) {
1856
1856
  } else {
1857
1857
  l += m.countChilds, f += m.tokensChilds;
1858
1858
  const w = [];
1859
- for (let x = 0; x < g.length; x++) {
1860
- const M = g[x], I = {
1859
+ for (let S = 0; S < g.length; S++) {
1860
+ const M = g[S], I = {
1861
1861
  text: M.text
1862
1862
  };
1863
1863
  w.push(I);
@@ -2216,7 +2216,7 @@ const Ke = h.object({
2216
2216
  "Names of browsers to close. If not specified, closes all browsers"
2217
2217
  )
2218
2218
  });
2219
- async function xr(t, r, s) {
2219
+ async function Sr(t, r, s) {
2220
2220
  let o;
2221
2221
  try {
2222
2222
  o = Ke.parse(t);
@@ -2250,7 +2250,7 @@ async function xr(t, r, s) {
2250
2250
  ...i.length > 0 && { errors: i }
2251
2251
  };
2252
2252
  }
2253
- function Sr(t, r) {
2253
+ function xr(t, r) {
2254
2254
  t(
2255
2255
  "playwright-browser-close",
2256
2256
  {
@@ -2259,7 +2259,7 @@ function Sr(t, r) {
2259
2259
  inputSchema: Ke.shape
2260
2260
  },
2261
2261
  async (s, o) => {
2262
- const e = await xr(s, r, o);
2262
+ const e = await Sr(s, r, o);
2263
2263
  if (e.error != null)
2264
2264
  return `Method: playwright-browser-close(${JSON.stringify(s)})
2265
2265
  ❌ Error: ${e.error}`;
@@ -2560,15 +2560,15 @@ function Cr() {
2560
2560
  const { getId: u, getChilds: c, rootNodes: l, createSnapshotNode: f } = i, d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), p = r(
2561
2561
  c,
2562
2562
  l,
2563
- (w, x) => {
2564
- const M = f(w, x);
2563
+ (w, S) => {
2564
+ const M = f(w, S);
2565
2565
  if (w != null && M != null) {
2566
2566
  const I = u(w);
2567
2567
  d.set(I, M), m.set(M, I);
2568
2568
  }
2569
- return M != null && x != null && g.set(
2569
+ return M != null && S != null && g.set(
2570
2570
  m.get(M),
2571
- x.map((I) => m.get(I))
2571
+ S.map((I) => m.get(I))
2572
2572
  ), M;
2573
2573
  }
2574
2574
  ), y = f(null, p);
@@ -3190,10 +3190,10 @@ async function tt(t, r, s) {
3190
3190
  const w = window.__mcp_playwright_tool_tx4byhar35_createDomSnapshotTreeRawDom;
3191
3191
  if (!w)
3192
3192
  throw new Error("DOM snapshot global function not initialized");
3193
- const x = w(y);
3193
+ const S = w(y);
3194
3194
  return {
3195
- idToNode: Array.from(x.idToNode.entries()),
3196
- idToChildIds: Array.from(x.idToChildIds.entries())
3195
+ idToNode: Array.from(S.idToNode.entries()),
3196
+ idToChildIds: Array.from(S.idToChildIds.entries())
3197
3197
  };
3198
3198
  },
3199
3199
  l
@@ -3388,7 +3388,7 @@ ${e.report}`, n;
3388
3388
  );
3389
3389
  }
3390
3390
  function jr(t, r) {
3391
- r.browserCreate && wr(t, r), r.browserList && br(t, r), r.browserClose && Sr(t, r), r.contextCreate && $r(t, r), r.contextList && Mr(t, r), r.contextClose && vr(t, r), r.pageCreate && Nr(t, r), r.pageList && Dr(t, r), r.pageClose && Br(t, r), r.pageGoto && Rr(t, r), r.domSnapshotQueryCreate && Pr(t, r), r.domSnapshotCreate && Ur(t, r), r.domSnapshotBrowse && Gr(t, r), console.log("Playwright manager");
3391
+ r.browserCreate && wr(t, r), r.browserList && br(t, r), r.browserClose && xr(t, r), r.contextCreate && $r(t, r), r.contextList && Mr(t, r), r.contextClose && vr(t, r), r.pageCreate && Nr(t, r), r.pageList && Dr(t, r), r.pageClose && Br(t, r), r.pageGoto && Rr(t, r), r.domSnapshotQueryCreate && Pr(t, r), r.domSnapshotCreate && Ur(t, r), r.domSnapshotBrowse && Gr(t, r), console.log("Playwright manager");
3392
3392
  }
3393
3393
  function _r(t) {
3394
3394
  const { logFilePath: r } = t;
@@ -3445,16 +3445,18 @@ function Qr(t, r) {
3445
3445
  });
3446
3446
  }
3447
3447
  function Hr(t, r) {
3448
- const s = t.address().family, o = t.address().port;
3449
- let e = t.address().address;
3450
- e === "::" ? e = "localhost" : s === "IPv6" && (e = `[${e}]`);
3451
- const n = `http://${s === "IPv6" ? `[${e}]` : e}:${o}`;
3448
+ if (!t.address())
3449
+ throw new Error("Server address is not available. Check your DNS and host configuration.");
3450
+ const o = t.address().family, e = t.address().port;
3451
+ let n = t.address().address;
3452
+ n === "::" ? n = "localhost" : o === "IPv6" && (n = `[${n}]`);
3453
+ const a = `http://${o === "IPv6" ? `[${n}]` : n}:${e}`;
3452
3454
  return `Project Tools - MCP Server Started
3453
3455
 
3454
3456
  Server Name: ${r.name}
3455
3457
  Server Version: ${r.version}
3456
- Server URL: ${n}/mcp
3457
- SSE Endpoint: ${n}/sse
3458
+ Server URL: ${a}/mcp
3459
+ SSE Endpoint: ${a}/sse
3458
3460
 
3459
3461
  Log File: ${T.resolve(r.logFilePath)}`;
3460
3462
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flemist/mcp-project-tools",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "MCP project tools",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,6 +22,36 @@
22
22
  "stylelint --fix --allow-empty-input"
23
23
  ]
24
24
  },
25
+ "scripts": {
26
+ "========================= install =========================": "",
27
+ "prepare": "node .husky/install.mjs",
28
+ "preinstall": "npx only-allow pnpm",
29
+ "_prepublishOnly": "pnpm build && pnpm test:unit",
30
+ "publish:check": "pnpm pack",
31
+ "========================= deploy =========================": "",
32
+ "build": "vite build",
33
+ "build:portable": "vite build && shx cp static/** build && shx cp package.json build && cd build && pnpm install --prod --shamefully-hoist --node-linker=hoisted --ignore-scripts && cd ..",
34
+ "========================= start =========================": "",
35
+ "dev": "tsx src/cli.ts",
36
+ "preview": "node build",
37
+ "========================= lint =========================": "",
38
+ "audit": "pnpm audit --prod",
39
+ "lint:es": "eslint --config eslint.config.mjs .",
40
+ "lint:es:fix": "eslint --config eslint.config.mjs --fix .",
41
+ "lint": "run-p lint:es",
42
+ "lint:fix": "run-s lint:es:fix",
43
+ "lint-staged": "lint-staged",
44
+ "========================= test =========================": "",
45
+ "test": "run-s test:unit test:api test:e2e",
46
+ "test:e2e": "vitest --run --bail 3 .e2e.",
47
+ "test:api": "vitest --run --bail 3 .api.",
48
+ "test:unit": "vitest --run --bail 3 .test.",
49
+ "test:types": "tsc --noEmit",
50
+ "========================= dev =========================": "",
51
+ "kill-node": "taskkill /F /IM node.exe",
52
+ "kill-java": "taskkill /F /IM java.exe",
53
+ "kill-chrome": "taskkill /F /IM chrome.exe"
54
+ },
25
55
  "repository": {
26
56
  "type": "git",
27
57
  "url": "git+https://github.com/NikolayMakhonin/mcp-project.git"
@@ -80,32 +110,5 @@
80
110
  "tree-kill": "1.2.2",
81
111
  "zod": "3.25.74"
82
112
  },
83
- "scripts": {
84
- "========================= install =========================": "",
85
- "preinstall": "npx only-allow pnpm",
86
- "publish:check": "pnpm pack",
87
- "========================= deploy =========================": "",
88
- "build": "vite build",
89
- "build:portable": "vite build && shx cp static/** build && shx cp package.json build && cd build && pnpm install --prod --shamefully-hoist --node-linker=hoisted --ignore-scripts && cd ..",
90
- "========================= start =========================": "",
91
- "dev": "tsx src/cli.ts",
92
- "preview": "node build",
93
- "========================= lint =========================": "",
94
- "audit": "pnpm audit --prod",
95
- "lint:es": "eslint --config eslint.config.mjs .",
96
- "lint:es:fix": "eslint --config eslint.config.mjs --fix .",
97
- "lint": "run-p lint:es",
98
- "lint:fix": "run-s lint:es:fix",
99
- "lint-staged": "lint-staged",
100
- "========================= test =========================": "",
101
- "test": "run-s test:unit test:api test:e2e",
102
- "test:e2e": "vitest --run --bail 3 .e2e.",
103
- "test:api": "vitest --run --bail 3 .api.",
104
- "test:unit": "vitest --run --bail 3 .test.",
105
- "test:types": "tsc --noEmit",
106
- "========================= dev =========================": "",
107
- "kill-node": "taskkill /F /IM node.exe",
108
- "kill-java": "taskkill /F /IM java.exe",
109
- "kill-chrome": "taskkill /F /IM chrome.exe"
110
- }
111
- }
113
+ "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
114
+ }