MCPcopy Index your code
hub / github.com/Waishnav/devspace / resolvePath

Method resolvePath

src/workspaces.ts:121–128  ·  view source on GitHub ↗
(workspace: Workspace, inputPath: string)

Source from the content-addressed store, hash-verified

119 }
120
121 resolvePath(workspace: Workspace, inputPath: string): string {
122 const absolutePath = resolveAllowedPath(inputPath, workspace.root, [workspace.root]);
123 if (!isPathInsideRoot(absolutePath, workspace.root)) {
124 throw new Error(`Path is outside workspace root: ${inputPath}`);
125 }
126
127 return absolutePath;
128 }
129
130 resolveReadPath(workspace: Workspace, inputPath: string): WorkspaceReadPath {
131 try {

Callers 4

resolveReadPathMethod · 0.95
workspaces.test.tsFile · 0.80
createMcpServerFunction · 0.80

Calls 2

resolveAllowedPathFunction · 0.85
isPathInsideRootFunction · 0.85

Tested by

no test coverage detected