fix: read prompt.md from src/ instead of dist/

This commit is contained in:
Tommy D. Rossi
2025-12-30 15:22:54 +01:00
parent e4e509d638
commit d88012324c
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.0.33
### Patch Changes
- **Fixed prompt.md not found error**: Read `prompt.md` from `src/` instead of `dist/`, fixing `ENOENT: no such file or directory` error when running the MCP
## 0.0.32
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "playwriter",
"description": "",
"version": "0.0.32",
"version": "0.0.33",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
+1 -1
View File
@@ -428,7 +428,7 @@ const server = new McpServer({
})
const promptContent =
fs.readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), 'prompt.md'), 'utf-8') +
fs.readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'src', 'prompt.md'), 'utf-8') +
`\n\nfor debugging internal playwriter errors, check playwriter relay server logs at: ${LOG_FILE_PATH}`
server.resource('debugger-api', 'https://playwriter.dev/resources/debugger-api.md', { mimeType: 'text/plain' }, async () => {