Skip to content

Commit bdb5b89

Browse files
authored
chore: monorepo housekeeping (#157)
* chore: add --cache flag to fix:format prettier script * chore: add update-deps script * This is now a monorepo and does not publish a package from the root * chore: add Workers Builds to root README.md * chore: update test-and-check.yml to use package.json script for syncpack lint (for consistency) * chore: add fix:deps script to package.json This makes it more discoverable * chore: remove pnpx from wrangler deploy script This is redundant because turbo and pnpm already add the bundled wrangler command to $PATH * chore: remove publishConfig from typescript-config/package.json This did nothing. * chore: add --frozen-lockfile and --child-concurrency flags to pnpm install in CI * fix: pass through GITHUB_ACTIONS env var into check:lint This ensures eslint warnings cause CI to fail * fix: remove unused imports and variables Fixes eslint warnings
1 parent cf3771b commit bdb5b89

File tree

11 files changed

+30
-25
lines changed

11 files changed

+30
-25
lines changed

.changeset/lazy-trains-send.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@repo/tools': patch
3+
---
4+
5+
chore: remove pnpx from wrangler deploy script
6+
7+
This is redundant because turbo and pnpm already add the bundled wrangler command to $PATH

.changeset/ripe-hornets-count.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@repo/typescript-config': patch
3+
---
4+
5+
chore: remove publishConfig from typescript-config/package.json
6+
7+
This did nothing.

.github/workflows/evals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
du -h ./apps/sandbox-container/.dev.vars
3131
du -h ./apps/workers-bindings/.dev.vars
3232
- name: Install dependencies
33-
run: pnpm install
33+
run: pnpm install --frozen-lockfile --child-concurrency=10
3434
- name: Run evals
3535
run: pnpm eval:ci

.github/workflows/test-and-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
node-version: ${{ matrix.node-version }}
2121
cache: 'pnpm'
2222
- name: Install dependencies
23-
run: pnpm install
23+
run: pnpm install --frozen-lockfile --child-concurrency=10
2424
- name: Syncpack lint
25-
run: pnpm syncpack lint
25+
run: pnpm check:deps
2626
- name: Run linter
2727
run: pnpm check:turbo
2828
- name: Run linter (formatting)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ The following servers are included in this repository:
1010
| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------- |
1111
| [**Documentation server**](/apps/docs-vectorize) | Get up to date reference information on Cloudflare | `https://docs.mcp.cloudflare.com/sse` |
1212
| [**Workers Bindings server**](/apps/workers-bindings) | Build Workers applications with storage, AI, and compute primitives | `https://bindings.mcp.cloudflare.com/sse` |
13-
| [**Observability server**](/apps/workers-observability) | Debug and get insight into your application’s logs and analytics | `https://observability.mcp.cloudflare.com/sse` |
13+
| [**Workers Builds server**](/apps/workers-builds) | Get insights and manage your Cloudflare Workers Builds | `https://builds.mcp.cloudflare.com/sse` |
14+
| [**Observability server**](/apps/workers-observability) | Debug and get insight into your application's logs and analytics | `https://observability.mcp.cloudflare.com/sse` |
1415
| [**Radar server**](/apps/radar) | Get global Internet traffic insights, trends, URL scans, and other utilities | `https://radar.mcp.cloudflare.com/sse` |
1516
| [**Container server**](/apps/sandbox-container) | Spin up a sandbox development environment | `https://containers.mcp.cloudflare.com/sse` |
1617
| [**Browser rendering server**](/apps/browser-rendering) | Fetch web pages, convert them to markdown and take screenshots | `https://browser.mcp.cloudflare.com/sse` |

apps/dns-analytics/src/tools/dex-analytics.tools.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import { z } from 'zod'
22

33
import { getCloudflareClient } from '@repo/mcp-common/src/cloudflare-api'
4-
import { getEnv } from '@repo/mcp-common/src/env'
54

65
import type { AccountGetParams } from 'cloudflare/resources/accounts/accounts.mjs'
76
import type { ReportGetParams } from 'cloudflare/resources/dns/analytics.mjs'
87
import type { ZoneGetParams } from 'cloudflare/resources/dns/settings.mjs'
98
import type { DNSAnalyticsMCP } from '../dns-analytics.app'
10-
import type { Env } from '../dns-analytics.context'
11-
12-
const env = getEnv<Env>()
139

1410
function getStartDate(days: number) {
1511
const today = new Date()

package.json

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
{
22
"name": "@cloudflare/mcp-server-cloudflare",
33
"version": "1.0.0",
4-
"description": "MCP server for interacting with Cloudflare API",
4+
"description": "Monorepo for Cloudflare MCP servers",
55
"license": "Apache-2.0",
66
"author": "Cloudflare, Inc. (https://cloudflare.com)",
77
"homepage": "https://github.com/cloudflare/mcp-server-cloudflare",
88
"bugs": "https://github.com/cloudflare/mcp-server-cloudflare/issues",
99
"type": "module",
10-
"main": "dist/index.js",
11-
"module": "dist/index.js",
12-
"types": "dist/index.d.ts",
13-
"files": [
14-
"dist",
15-
"README.md"
16-
],
17-
"access": "public",
1810
"sideEffects": false,
1911
"scripts": {
2012
"changeset:new": "run-changeset-new",
21-
"check:deps": "pnpm exec syncpack lint",
13+
"check:deps": "syncpack lint",
2214
"check:format": "prettier . --check --cache --ignore-unknown",
2315
"check:turbo": "run-turbo check",
2416
"types": "run-turbo types",
2517
"test:ci": "run-vitest-ci",
2618
"test": "vitest run --passWithNoTests",
27-
"fix:format": "prettier . --write",
19+
"fix:format": "prettier . --write --cache --ignore-unknown",
20+
"fix:deps": "run-fix-deps",
2821
"test:watch": "vitest",
29-
"eval:ci": "run-turbo eval:ci"
22+
"eval:ci": "run-turbo eval:ci",
23+
"update-deps": "syncpack update"
3024
},
3125
"devDependencies": {
3226
"@changesets/cli": "2.28.1",

packages/mcp-common/src/tools/hyperdrive.tools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
HyperdriveListParamPerPageSchema,
1414
HyperdriveOriginDatabaseSchema,
1515
HyperdriveOriginHostSchema,
16-
HyperdriveOriginPasswordSchema,
1716
HyperdriveOriginPortSchema,
1817
HyperdriveOriginSchemeSchema,
1918
HyperdriveOriginUserSchema,

packages/tools/bin/run-wrangler-deploy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ VERSION=$(jq -r '.version' package.json)
66

77
# Deploy with wrangler using the extracted values as binding variables
88
echo "Deploying MCP server $NAME version $VERSION"
9-
pnpx wrangler deploy --var MCP_SERVER_NAME:"$NAME" --var MCP_SERVER_VERSION:"$VERSION" "$@"
9+
wrangler deploy \
10+
--var MCP_SERVER_NAME:"$NAME" \
11+
--var MCP_SERVER_VERSION:"$VERSION" \
12+
"$@"

packages/typescript-config/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"version": "0.2.4",
44
"private": true,
55
"sideEffects": false,
6-
"publishConfig": {
7-
"access": "public"
8-
},
96
"devDependencies": {
107
"@types/node": "22.14.1"
118
}

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"dependsOn": ["^check:types"]
1818
},
1919
"check:lint": {
20+
"env": ["GITHUB_ACTIONS"],
2021
"dependsOn": ["^check:lint"]
2122
},
2223
"eval:ci": {

0 commit comments

Comments
 (0)