2.24.1 (#453)
* 2.24.1 - Updated dependencies - MCP Server: better compatibility with Windows - MCP Server: allow using a custom root for better flexibility - Version Check: use package.json version instead of number of commits - Prettier: reformatted some files - Add SSH_AUTH_SOCK to dev passThroughEnv to solve SSH issues; handle execSync errors - Use GIT_SSH to fix SSH issues on Windows - Updated Stripe version - Updated application version from 2.24.0 to 2.24.1 in package.json. - Enhanced error handling in billing services to include error causes for better debugging.
This commit is contained in:
committed by
GitHub
parent
f3ac595d06
commit
ca585e09be
18
packages/mcp-server/src/resolve-root.ts
Normal file
18
packages/mcp-server/src/resolve-root.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { findWorkspaceRoot } from './tools/env/public-api';
|
||||
|
||||
export function resolveProjectRoot(argv: string[] = process.argv): string {
|
||||
// 1. CLI flag: --root /path
|
||||
const rootIdx = argv.indexOf('--root');
|
||||
|
||||
if (rootIdx !== -1 && argv[rootIdx + 1]) {
|
||||
return argv[rootIdx + 1];
|
||||
}
|
||||
|
||||
// 2. Env var
|
||||
if (process.env.MAKERKIT_PROJECT_ROOT) {
|
||||
return process.env.MAKERKIT_PROJECT_ROOT;
|
||||
}
|
||||
|
||||
// 3. Auto-discovery (traverse up from cwd looking for pnpm-workspace.yaml)
|
||||
return findWorkspaceRoot(process.cwd());
|
||||
}
|
||||
Reference in New Issue
Block a user