@agimon-ai/model-proxy-mcp 0.2.2 → 0.2.3
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/cli.mjs +10 -6
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -145,14 +145,18 @@ var HttpServerManager = class {
|
|
|
145
145
|
}
|
|
146
146
|
async resolveCliPath() {
|
|
147
147
|
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
148
|
-
const
|
|
149
|
-
if (await this.fileExists(
|
|
150
|
-
cliPath:
|
|
148
|
+
const sameDirCliPath = path.resolve(currentDir, "cli.mjs");
|
|
149
|
+
if (await this.fileExists(sameDirCliPath)) return {
|
|
150
|
+
cliPath: sameDirCliPath,
|
|
151
151
|
useLoader: false
|
|
152
152
|
};
|
|
153
|
-
const
|
|
154
|
-
if (await this.fileExists(
|
|
155
|
-
cliPath:
|
|
153
|
+
const parentDirCliPath = path.resolve(currentDir, "..", "cli.mjs");
|
|
154
|
+
if (await this.fileExists(parentDirCliPath)) return {
|
|
155
|
+
cliPath: parentDirCliPath,
|
|
156
|
+
useLoader: false
|
|
157
|
+
};
|
|
158
|
+
for (const relPath of [path.resolve(currentDir, "cli.ts"), path.resolve(currentDir, "..", "cli.ts")]) if (await this.fileExists(relPath)) return {
|
|
159
|
+
cliPath: relPath,
|
|
156
160
|
useLoader: true
|
|
157
161
|
};
|
|
158
162
|
const repoDistCliPath = path.join(this.repositoryPath, "packages", "mcp", "model-proxy-mcp", "dist", "cli.mjs");
|