diff --git a/package.json b/package.json index b601bd3..a0a334e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "start": "dist/index.js", "start:check": "dist/index.js --check", "start:http": "TRANSPORT=http dist/index.js", - "dev": "npm run build:watch -- --onSuccess \"node dist/index.js\"", + "dev": "npm run build:watch", "dev:bg": "rimraf dev.log && npm run dev > dev.log 2>&1", "cli": "npm run build && npm start --", "inspect": "npx fastmcp inspect src/index.ts", diff --git a/src/pkg.ts b/src/pkg.ts index 352cb60..0dcb49f 100644 --- a/src/pkg.ts +++ b/src/pkg.ts @@ -1,8 +1,10 @@ import type { PackageJson } from 'types-package-json' +import { pathToFileURL } from 'url' import util from './util.js' const pkgPath = util.resolve('package.json', util.REPO) -const { default: pkg } = await import(pkgPath, { with: { type: 'json' } }) as { default: Partial } +const pkgUrl = pathToFileURL(pkgPath).href +const { default: pkg } = await import(pkgUrl, { with: { type: 'json' } }) as { default: Partial } export default { ...pkg,