@mcp-use/cli 2.5.3 → 2.5.5

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/index.js CHANGED
@@ -1519,10 +1519,98 @@ export default PostHog;
1519
1519
  } catch (error) {
1520
1520
  }
1521
1521
  try {
1522
+ const buildNodeStubsPlugin = {
1523
+ name: "node-stubs-build",
1524
+ enforce: "pre",
1525
+ resolveId(id) {
1526
+ if (id === "posthog-node" || id.startsWith("posthog-node/")) {
1527
+ return "\0virtual:posthog-node-stub";
1528
+ }
1529
+ if (id === "path" || id === "node:path") {
1530
+ return "\0virtual:path-stub";
1531
+ }
1532
+ return null;
1533
+ },
1534
+ load(id) {
1535
+ if (id === "\0virtual:posthog-node-stub") {
1536
+ return `
1537
+ export class PostHog {
1538
+ constructor() {}
1539
+ capture() {}
1540
+ identify() {}
1541
+ alias() {}
1542
+ flush() { return Promise.resolve(); }
1543
+ shutdown() { return Promise.resolve(); }
1544
+ }
1545
+ export default PostHog;
1546
+ `;
1547
+ }
1548
+ if (id === "\0virtual:path-stub") {
1549
+ return `
1550
+ export function join(...paths) {
1551
+ return paths.filter(Boolean).join("/").replace(/\\/\\//g, "/").replace(/\\/$/, "");
1552
+ }
1553
+ export function resolve(...paths) {
1554
+ return join(...paths);
1555
+ }
1556
+ export function dirname(filepath) {
1557
+ const parts = filepath.split("/");
1558
+ parts.pop();
1559
+ return parts.join("/") || "/";
1560
+ }
1561
+ export function basename(filepath, ext) {
1562
+ const parts = filepath.split("/");
1563
+ let name = parts[parts.length - 1] || "";
1564
+ if (ext && name.endsWith(ext)) {
1565
+ name = name.slice(0, -ext.length);
1566
+ }
1567
+ return name;
1568
+ }
1569
+ export function extname(filepath) {
1570
+ const name = basename(filepath);
1571
+ const index = name.lastIndexOf(".");
1572
+ return index > 0 ? name.slice(index) : "";
1573
+ }
1574
+ export function normalize(filepath) {
1575
+ return filepath.replace(/\\/\\//g, "/");
1576
+ }
1577
+ export function isAbsolute(filepath) {
1578
+ return filepath.startsWith("/");
1579
+ }
1580
+ export const sep = "/";
1581
+ export const delimiter = ":";
1582
+ export const posix = {
1583
+ join,
1584
+ resolve,
1585
+ dirname,
1586
+ basename,
1587
+ extname,
1588
+ normalize,
1589
+ isAbsolute,
1590
+ sep,
1591
+ delimiter,
1592
+ };
1593
+ export default {
1594
+ join,
1595
+ resolve,
1596
+ dirname,
1597
+ basename,
1598
+ extname,
1599
+ normalize,
1600
+ isAbsolute,
1601
+ sep,
1602
+ delimiter,
1603
+ posix,
1604
+ };
1605
+ `;
1606
+ }
1607
+ return null;
1608
+ }
1609
+ };
1522
1610
  await build({
1523
1611
  root: tempDir,
1524
1612
  base: baseUrl,
1525
- plugins: [tailwindcss(), react()],
1613
+ plugins: [buildNodeStubsPlugin, tailwindcss(), react()],
1526
1614
  experimental: {
1527
1615
  renderBuiltUrl: (filename, { hostType }) => {
1528
1616
  if (["js", "css"].includes(hostType)) {
@@ -1539,11 +1627,18 @@ export default PostHog;
1539
1627
  "@": resourcesDir
1540
1628
  }
1541
1629
  },
1630
+ optimizeDeps: {
1631
+ // Exclude Node.js-only packages from browser bundling
1632
+ exclude: ["posthog-node"]
1633
+ },
1542
1634
  build: {
1543
1635
  outDir,
1544
1636
  emptyOutDir: true,
1545
1637
  rollupOptions: {
1546
- input: import_node_path3.default.join(tempDir, "index.html")
1638
+ input: import_node_path3.default.join(tempDir, "index.html"),
1639
+ external: (id) => {
1640
+ return false;
1641
+ }
1547
1642
  }
1548
1643
  }
1549
1644
  });
package/dist/index.mjs CHANGED
@@ -1498,10 +1498,98 @@ export default PostHog;
1498
1498
  } catch (error) {
1499
1499
  }
1500
1500
  try {
1501
+ const buildNodeStubsPlugin = {
1502
+ name: "node-stubs-build",
1503
+ enforce: "pre",
1504
+ resolveId(id) {
1505
+ if (id === "posthog-node" || id.startsWith("posthog-node/")) {
1506
+ return "\0virtual:posthog-node-stub";
1507
+ }
1508
+ if (id === "path" || id === "node:path") {
1509
+ return "\0virtual:path-stub";
1510
+ }
1511
+ return null;
1512
+ },
1513
+ load(id) {
1514
+ if (id === "\0virtual:posthog-node-stub") {
1515
+ return `
1516
+ export class PostHog {
1517
+ constructor() {}
1518
+ capture() {}
1519
+ identify() {}
1520
+ alias() {}
1521
+ flush() { return Promise.resolve(); }
1522
+ shutdown() { return Promise.resolve(); }
1523
+ }
1524
+ export default PostHog;
1525
+ `;
1526
+ }
1527
+ if (id === "\0virtual:path-stub") {
1528
+ return `
1529
+ export function join(...paths) {
1530
+ return paths.filter(Boolean).join("/").replace(/\\/\\//g, "/").replace(/\\/$/, "");
1531
+ }
1532
+ export function resolve(...paths) {
1533
+ return join(...paths);
1534
+ }
1535
+ export function dirname(filepath) {
1536
+ const parts = filepath.split("/");
1537
+ parts.pop();
1538
+ return parts.join("/") || "/";
1539
+ }
1540
+ export function basename(filepath, ext) {
1541
+ const parts = filepath.split("/");
1542
+ let name = parts[parts.length - 1] || "";
1543
+ if (ext && name.endsWith(ext)) {
1544
+ name = name.slice(0, -ext.length);
1545
+ }
1546
+ return name;
1547
+ }
1548
+ export function extname(filepath) {
1549
+ const name = basename(filepath);
1550
+ const index = name.lastIndexOf(".");
1551
+ return index > 0 ? name.slice(index) : "";
1552
+ }
1553
+ export function normalize(filepath) {
1554
+ return filepath.replace(/\\/\\//g, "/");
1555
+ }
1556
+ export function isAbsolute(filepath) {
1557
+ return filepath.startsWith("/");
1558
+ }
1559
+ export const sep = "/";
1560
+ export const delimiter = ":";
1561
+ export const posix = {
1562
+ join,
1563
+ resolve,
1564
+ dirname,
1565
+ basename,
1566
+ extname,
1567
+ normalize,
1568
+ isAbsolute,
1569
+ sep,
1570
+ delimiter,
1571
+ };
1572
+ export default {
1573
+ join,
1574
+ resolve,
1575
+ dirname,
1576
+ basename,
1577
+ extname,
1578
+ normalize,
1579
+ isAbsolute,
1580
+ sep,
1581
+ delimiter,
1582
+ posix,
1583
+ };
1584
+ `;
1585
+ }
1586
+ return null;
1587
+ }
1588
+ };
1501
1589
  await build({
1502
1590
  root: tempDir,
1503
1591
  base: baseUrl,
1504
- plugins: [tailwindcss(), react()],
1592
+ plugins: [buildNodeStubsPlugin, tailwindcss(), react()],
1505
1593
  experimental: {
1506
1594
  renderBuiltUrl: (filename, { hostType }) => {
1507
1595
  if (["js", "css"].includes(hostType)) {
@@ -1518,11 +1606,18 @@ export default PostHog;
1518
1606
  "@": resourcesDir
1519
1607
  }
1520
1608
  },
1609
+ optimizeDeps: {
1610
+ // Exclude Node.js-only packages from browser bundling
1611
+ exclude: ["posthog-node"]
1612
+ },
1521
1613
  build: {
1522
1614
  outDir,
1523
1615
  emptyOutDir: true,
1524
1616
  rollupOptions: {
1525
- input: path3.join(tempDir, "index.html")
1617
+ input: path3.join(tempDir, "index.html"),
1618
+ external: (id) => {
1619
+ return false;
1620
+ }
1526
1621
  }
1527
1622
  }
1528
1623
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-use/cli",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "description": "The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
5
5
  "author": "mcp-use, Inc.",
6
6
  "license": "MIT",
@@ -44,8 +44,8 @@
44
44
  "tsx": "^4.21.0",
45
45
  "vite": "^7.2.4",
46
46
  "ws": "^8.18.3",
47
- "@mcp-use/inspector": "0.12.3",
48
- "mcp-use": "1.10.3"
47
+ "@mcp-use/inspector": "0.12.5",
48
+ "mcp-use": "1.10.5"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^24.10.1",