Commit 19a7d37
committed
Depending upon whether it is being invoked from the npm package @modelcontextprotocol/inspector or @modelcontextprotocol/inspector-cli the location of package.json will either be in ../ or ../../
* In cli/src/index.ts
- load package.json from the parent folder or parent's parent depending on file existence in parent.
- move the load of package.json into callMethod function, which is the only place it is used, and is closer to where it is referenced.1 parent 6e27b5d commit 19a7d37
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
0 commit comments