From e2f7cd9488a370f3d1dadb1a6040f20e9fd1f7f6 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sun, 6 Sep 2026 21:33:22 -0700 Subject: [PATCH] Fix MCP CLI packaging and update React UI dependencies --- Dockerfile | 1 + package.json | 2 +- packages/mcp/bin/umami-mcp.js | 2 ++ packages/mcp/package.json | 4 +-- pnpm-lock.yaml | 49 ++++++++++++++++++----------------- pnpm-workspace.yaml | 1 + 6 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 packages/mcp/bin/umami-mcp.js diff --git a/Dockerfile b/Dockerfile index 49b628c18..4a8df4c54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ # Workspace packages (@umami/api-client, @umami/mcp) must be present for a frozen install. COPY packages/api-client/package.json ./packages/api-client/ COPY packages/mcp/package.json ./packages/mcp/ +COPY packages/mcp/bin ./packages/mcp/bin/ RUN npm install -g pnpm@${PNPM_VERSION} RUN printf 'strictDepBuilds: false\n' >> pnpm-workspace.yaml diff --git a/package.json b/package.json index 29741be8a..dc38b8e0e 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@tanstack/react-query": "^5.102.8", "@umami/api-client": "workspace:*", "@umami/mcp": "workspace:*", - "@umami/react-zen": "^0.251.0", + "@umami/react-zen": "^0.252.0", "bcryptjs": "^3.0.2", "chalk": "^5.6.2", "chart.js": "^4.5.1", diff --git a/packages/mcp/bin/umami-mcp.js b/packages/mcp/bin/umami-mcp.js new file mode 100644 index 000000000..7c3d1548c --- /dev/null +++ b/packages/mcp/bin/umami-mcp.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import '../dist/cli.js'; diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 75ed97597..67f08ece5 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -8,7 +8,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "bin": { - "umami-mcp": "./dist/cli.js" + "umami-mcp": "./bin/umami-mcp.js" }, "exports": { ".": { @@ -17,7 +17,7 @@ "require": "./dist/index.cjs" } }, - "files": ["dist", "README.md"], + "files": ["bin", "dist", "README.md"], "engines": { "node": ">=20" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab5ce3055..9c9a8bae3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: workspace:* version: link:packages/mcp '@umami/react-zen': - specifier: ^0.251.0 - version: 0.251.0(@date-fns/tz@1.5.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(date-fns@4.4.0)(immer@11.1.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.1.18)(use-sync-external-store@1.6.0(react@19.2.8)) + specifier: ^0.252.0 + version: 0.252.0(@date-fns/tz@1.5.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(date-fns@4.4.0)(immer@11.1.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.1.18)(use-sync-external-store@1.6.0(react@19.2.8)) bcryptjs: specifier: ^3.0.2 version: 3.0.3 @@ -481,8 +481,8 @@ packages: resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} engines: {node: '>=6.9.0'} - '@base-ui/react@1.7.0': - resolution: {integrity: sha512-j+8QjX44C32jrXD/qyEAGpFr70FRpGL2CY61mQd9nBPWN737CK0xxD1ceJ055rW4RtdvFDT1e7otzdlfxvsYug==} + '@base-ui/react@1.8.0': + resolution: {integrity: sha512-P0/1sxo6SBVZOklKMIedvTWqw2s2IQzi9x5bIVsXu980cuSOD4NeuRSs+/L7LZQfDkZP/uRZyGPyfFl/B1oH+Q==} engines: {node: '>=14.0.0'} peerDependencies: '@date-fns/tz': ^1.2.0 @@ -498,8 +498,8 @@ packages: date-fns: optional: true - '@base-ui/utils@0.3.2': - resolution: {integrity: sha512-oWy1aq/I2GmYjpl4PhEAhzflF8VPGKgZeq0xAWTbfD5KBWyxcN0ZP2+WHSUm/5Z6lVMBDLReLcoXwSYoRc/zNQ==} + '@base-ui/utils@0.4.0': + resolution: {integrity: sha512-bO9fz25kKtPf+aZVyfQrC0PDmJdmVni31W2hCS5/Owb+inwdIL3XU26pCPRPlt4LSxZrBgLwubXQXQlKaFEZzw==} peerDependencies: '@types/react': ^17 || ^18 || ^19 react: ^17 || ^18 || ^19 @@ -2997,8 +2997,8 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} - '@umami/react-zen@0.251.0': - resolution: {integrity: sha512-y9oLLBVjin+0mOFk6K4WqozlgAKf1L2K/oYjRmKBbq/E/xCYt2IJZl6L1wB2ioNA4VgBKyaEYuU+UHVBCp/nnQ==} + '@umami/react-zen@0.252.0': + resolution: {integrity: sha512-qYdtwsp7DztAqs122s0ARZcCq3JTwtn6ytHJxA+boktLywyWP74hiB3PHQ/F411wWb8vX958yHwv9TgJOIhCrw==} peerDependencies: react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 @@ -3333,10 +3333,6 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} - clsx@2.1.1: - resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} - engines: {node: '>=6'} - cluster-key-slot@1.1.2: resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==} engines: {node: '>=0.10.0'} @@ -3347,6 +3343,11 @@ packages: react: ^18 || ^19 || ^19.0.0-rc react-dom: ^18 || ^19 || ^19.0.0-rc + cn@0.2.6: + resolution: {integrity: sha512-+i4L0zUGgRcEnhsxueVrP7iBGxBx5iD0WOTYg1MwFEu2ZyCmH5Ov2V1cul2Ht5UchRQQgftCf4be/RxspuW6QQ==} + engines: {node: '>=20'} + hasBin: true + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -5197,8 +5198,8 @@ packages: '@types/react': optional: true - react-hook-form@7.86.0: - resolution: {integrity: sha512-4kbWJrh5jPZt1+YqVcXcGKffGcXV/XVbozknLh0Yjh0KhpoAkus21TAQhzRYqNwFkkObmnSvRlZZ3GT+ehoIrA==} + react-hook-form@7.87.0: + resolution: {integrity: sha512-zhFzWvLxNHH+8839OnZcUxgMZw88ah2jZWDWvKWgF3Tpbnd0vKL+dlcuU3nZVWESZQjd81EW8K+wU+cYfYAc0w==} engines: {node: '>=18.0.0'} peerDependencies: react: ^16.8.0 || ^17 || ^18 || ^19 @@ -6397,10 +6398,10 @@ snapshots: '@babel/helper-validator-identifier': 7.29.7 optional: true - '@base-ui/react@1.7.0(@date-fns/tz@1.5.0)(@types/react@19.2.18)(date-fns@4.4.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': + '@base-ui/react@1.8.0(@date-fns/tz@1.5.0)(@types/react@19.2.18)(date-fns@4.4.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: '@babel/runtime': 7.29.7 - '@base-ui/utils': 0.3.2(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + '@base-ui/utils': 0.4.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@floating-ui/react-dom': 2.1.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@floating-ui/utils': 0.2.12 react: 19.2.8 @@ -6411,7 +6412,7 @@ snapshots: '@types/react': 19.2.18 date-fns: 4.4.0 - '@base-ui/utils@0.3.2(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': + '@base-ui/utils@0.4.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: '@babel/runtime': 7.29.7 '@floating-ui/utils': 0.2.12 @@ -8476,18 +8477,18 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@umami/react-zen@0.251.0(@date-fns/tz@1.5.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(date-fns@4.4.0)(immer@11.1.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.1.18)(use-sync-external-store@1.6.0(react@19.2.8))': + '@umami/react-zen@0.252.0(@date-fns/tz@1.5.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(date-fns@4.4.0)(immer@11.1.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(tailwindcss@4.1.18)(use-sync-external-store@1.6.0(react@19.2.8))': dependencies: - '@base-ui/react': 1.7.0(@date-fns/tz@1.5.0)(@types/react@19.2.18)(date-fns@4.4.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + '@base-ui/react': 1.8.0(@date-fns/tz@1.5.0)(@types/react@19.2.18)(date-fns@4.4.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@react-spring/web': 9.7.5(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - clsx: 2.1.1 cmdk: 1.1.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + cn: 0.2.6 embla-carousel-react: 8.6.0(react@19.2.8) lucide-react: 0.555.0(react@19.2.8) react: 19.2.8 react-day-picker: 9.14.0(react@19.2.8) react-dom: 19.2.8(react@19.2.8) - react-hook-form: 7.86.0(react@19.2.8) + react-hook-form: 7.87.0(react@19.2.8) react-resizable-panels: 4.12.3(react-dom@19.2.8(react@19.2.8))(react@19.2.8) tailwind-merge: 3.6.0 tailwind-variants: 3.3.1(tailwind-merge@3.6.0)(tailwindcss@4.1.18) @@ -8859,8 +8860,6 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - clsx@2.1.1: {} - cluster-key-slot@1.1.2: {} cmdk@1.1.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8): @@ -8875,6 +8874,8 @@ snapshots: - '@types/react' - '@types/react-dom' + cn@0.2.6: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -10848,7 +10849,7 @@ snapshots: optionalDependencies: '@types/react': 19.2.18 - react-hook-form@7.86.0(react@19.2.8): + react-hook-form@7.87.0(react@19.2.8): dependencies: react: 19.2.8 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 162125ee7..19fe37cf1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,3 +12,4 @@ allowBuilds: sharp: false minimumReleaseAgeExclude: - '@umami/react-zen' + - cn@0.2.6