Skip to content

Commit 73b205d

Browse files
committed
pnpm fix ci, screenshot unique, transport validation, formatting
1 parent 763acaf commit 73b205d

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
- name: Install pnpm
15+
uses: pnpm/action-setup@v4
16+
with:
17+
version: 8
1418
- name: Use Node.js 22
1519
uses: actions/setup-node@v4
1620
with:
1721
node-version: '22'
1822
cache: 'pnpm'
19-
- name: Install pnpm
20-
uses: pnpm/action-setup@v4
21-
with:
22-
version: 8
2323
- name: Install dependencies
2424
run: pnpm install --frozen-lockfile
2525
- run: pnpm run build

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
with:
2020
version: 8
2121
- run: pnpm install --frozen-lockfile
22-
- run: pnpm run build
2322
- run: pnpm publish --provenance
2423
env:
2524
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Use pnpm for package management
22
engine-strict=true
33
auto-install-peers=true
4-
strict-peer-dependencies=false
4+
strict-peer-dependencies=false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"prettier:check": "prettier --check .",
2727
"prettier:fix": "prettier --write .",
2828
"clean": "rm -rf dist",
29-
"publish": "pnpm clean && pnpm build && npm publish"
29+
"prepublishOnly": "pnpm clean && pnpm build"
3030
},
3131
"lint-staged": {
3232
"*.{js,jsx,ts,tsx,json,css,scss,md}": [

pnpm-lock.yaml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tools/screenshot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ async function handleScreenshot(
3838
? `screenshot-${params.name}-${new Date()
3939
.toISOString()
4040
.replace(/:/g, "-")}`
41-
: `screenshot-${new Date().toISOString().replace(/:/g, "-")}`;
41+
: `screenshot-${new Date().toISOString().replace(/:/g, "-")}` +
42+
context.config.browserbaseProjectId;
4243
screenshots.set(name, screenshotBase64);
4344

4445
// Notify the client that the resources changed

src/transport.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ export function startHttpTransport(
9494
const sseSessions = new Map<string, SSEServerTransport>();
9595
const streamableSessions = new Map<string, StreamableHTTPServerTransport>();
9696
const httpServer = http.createServer(async (req, res) => {
97+
if (!req.url) {
98+
res.statusCode = 400;
99+
res.end("Bad request: missing URL");
100+
return;
101+
}
97102
const url = new URL(`http://localhost${req.url}`);
98103
if (url.pathname.startsWith("/mcp"))
99104
await handleStreamable(req, res, serverList, streamableSessions);

0 commit comments

Comments
 (0)