@topolo/mcp 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4660,6 +4660,7 @@ async function resolveMcpCredential(environment, selector = process.env.TOPOLO_C
|
|
|
4660
4660
|
}
|
|
4661
4661
|
|
|
4662
4662
|
// src/index.ts
|
|
4663
|
+
import { realpathSync } from "fs";
|
|
4663
4664
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4664
4665
|
import { resolve } from "path";
|
|
4665
4666
|
function readStdioEnvironment() {
|
|
@@ -4748,7 +4749,14 @@ function terminateStdioMcp(error, dependencies = DEFAULT_DEPENDENCIES2) {
|
|
|
4748
4749
|
return dependencies.exit(1);
|
|
4749
4750
|
}
|
|
4750
4751
|
function isDirectExecution(moduleUrl, argvEntry) {
|
|
4751
|
-
|
|
4752
|
+
if (!argvEntry) {
|
|
4753
|
+
return false;
|
|
4754
|
+
}
|
|
4755
|
+
try {
|
|
4756
|
+
return realpathSync(fileURLToPath2(moduleUrl)) === realpathSync(resolve(argvEntry));
|
|
4757
|
+
} catch {
|
|
4758
|
+
return false;
|
|
4759
|
+
}
|
|
4752
4760
|
}
|
|
4753
4761
|
if (isDirectExecution(import.meta.url, process.argv[1])) {
|
|
4754
4762
|
void runStdioMcp().catch((error) => terminateStdioMcp(error));
|
package/package.json
CHANGED