@mcp-use/cli 2.12.0 → 2.12.1
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/commands/deploy.d.ts.map +1 -1
- package/dist/index.cjs +33 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -14
- package/dist/index.js.map +1 -1
- package/dist/utils/api.d.ts +1 -0
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/project-link.d.ts +1 -0
- package/dist/utils/project-link.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAsKA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAsKA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqlBD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAmbzE"}
|
package/dist/index.cjs
CHANGED
|
@@ -3260,6 +3260,17 @@ async function prompt(question, defaultValue = "n") {
|
|
|
3260
3260
|
});
|
|
3261
3261
|
});
|
|
3262
3262
|
}
|
|
3263
|
+
function getMcpServerUrl(deployment) {
|
|
3264
|
+
if (deployment.customDomain) {
|
|
3265
|
+
return `https://${deployment.customDomain}/mcp`;
|
|
3266
|
+
} else if (deployment.serverSlug) {
|
|
3267
|
+
return `https://${deployment.serverSlug}.mcp-use.run/mcp`;
|
|
3268
|
+
} else if (deployment.serverId) {
|
|
3269
|
+
return `https://${deployment.serverId}.mcp-use.run/mcp`;
|
|
3270
|
+
} else {
|
|
3271
|
+
return `https://${deployment.domain}/mcp`;
|
|
3272
|
+
}
|
|
3273
|
+
}
|
|
3263
3274
|
async function displayDeploymentProgress(api, deployment) {
|
|
3264
3275
|
const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
3265
3276
|
let frameIndex = 0;
|
|
@@ -3343,21 +3354,12 @@ async function displayDeploymentProgress(api, deployment) {
|
|
|
3343
3354
|
lastDisplayedLogLength = finalDeployment.buildLogs.length;
|
|
3344
3355
|
}
|
|
3345
3356
|
if (finalDeployment.status === "running") {
|
|
3346
|
-
|
|
3357
|
+
const mcpServerUrl = getMcpServerUrl(finalDeployment);
|
|
3347
3358
|
let dashboardUrl = null;
|
|
3348
|
-
if (finalDeployment.
|
|
3349
|
-
mcpServerUrl = `https://${finalDeployment.customDomain}/mcp`;
|
|
3350
|
-
if (finalDeployment.serverSlug) {
|
|
3351
|
-
dashboardUrl = `https://mcp-use.com/cloud/servers/${finalDeployment.serverSlug}`;
|
|
3352
|
-
}
|
|
3353
|
-
} else if (finalDeployment.serverSlug) {
|
|
3354
|
-
mcpServerUrl = `https://${finalDeployment.serverSlug}.mcp-use.run/mcp`;
|
|
3359
|
+
if (finalDeployment.serverSlug) {
|
|
3355
3360
|
dashboardUrl = `https://mcp-use.com/cloud/servers/${finalDeployment.serverSlug}`;
|
|
3356
3361
|
} else if (finalDeployment.serverId) {
|
|
3357
|
-
mcpServerUrl = `https://${finalDeployment.serverId}.mcp-use.run/mcp`;
|
|
3358
3362
|
dashboardUrl = `https://mcp-use.com/cloud/servers/${finalDeployment.serverId}`;
|
|
3359
|
-
} else {
|
|
3360
|
-
mcpServerUrl = `https://${finalDeployment.domain}/mcp`;
|
|
3361
3363
|
}
|
|
3362
3364
|
const inspectorUrl = `https://inspector.mcp-use.com/inspector?autoConnect=${encodeURIComponent(
|
|
3363
3365
|
mcpServerUrl
|
|
@@ -3846,6 +3848,7 @@ async function deployCommand(options) {
|
|
|
3846
3848
|
process.exit(1);
|
|
3847
3849
|
}
|
|
3848
3850
|
const existingLink = !options.new ? await getProjectLink(cwd) : null;
|
|
3851
|
+
const serverId = existingLink?.serverId;
|
|
3849
3852
|
if (existingLink) {
|
|
3850
3853
|
try {
|
|
3851
3854
|
const existingDeployment = await api.getDeployment(
|
|
@@ -3855,7 +3858,7 @@ async function deployCommand(options) {
|
|
|
3855
3858
|
console.log(source_default.green(`\u2713 Found linked deployment`));
|
|
3856
3859
|
console.log(source_default.gray(` Redeploying to maintain the same URL...`));
|
|
3857
3860
|
console.log(
|
|
3858
|
-
source_default.cyan(` URL:
|
|
3861
|
+
source_default.cyan(` URL: ${getMcpServerUrl(existingDeployment)}
|
|
3859
3862
|
`)
|
|
3860
3863
|
);
|
|
3861
3864
|
const redeploymentConfig = {
|
|
@@ -3879,11 +3882,25 @@ async function deployCommand(options) {
|
|
|
3879
3882
|
await open_default(`https://${deployment2.domain}`);
|
|
3880
3883
|
}
|
|
3881
3884
|
return;
|
|
3885
|
+
} else {
|
|
3886
|
+
console.log(
|
|
3887
|
+
source_default.yellow(
|
|
3888
|
+
`\u26A0\uFE0F Linked deployment not found or failed, creating new one...`
|
|
3889
|
+
)
|
|
3890
|
+
);
|
|
3891
|
+
if (serverId) {
|
|
3892
|
+
console.log(
|
|
3893
|
+
source_default.gray(` Will reuse existing server: ${serverId}`)
|
|
3894
|
+
);
|
|
3895
|
+
}
|
|
3882
3896
|
}
|
|
3883
3897
|
} catch (error) {
|
|
3884
3898
|
console.log(
|
|
3885
3899
|
source_default.yellow(`\u26A0\uFE0F Linked deployment not found, creating new one...`)
|
|
3886
3900
|
);
|
|
3901
|
+
if (serverId) {
|
|
3902
|
+
console.log(source_default.gray(` Will reuse existing server: ${serverId}`));
|
|
3903
|
+
}
|
|
3887
3904
|
}
|
|
3888
3905
|
}
|
|
3889
3906
|
const deploymentRequest = {
|
|
@@ -3898,7 +3915,8 @@ async function deployCommand(options) {
|
|
|
3898
3915
|
startCommand,
|
|
3899
3916
|
env: Object.keys(envVars).length > 0 ? envVars : void 0
|
|
3900
3917
|
},
|
|
3901
|
-
healthCheckPath: "/healthz"
|
|
3918
|
+
healthCheckPath: "/healthz",
|
|
3919
|
+
serverId
|
|
3902
3920
|
};
|
|
3903
3921
|
console.log(source_default.gray("Creating deployment..."));
|
|
3904
3922
|
const deployment = await api.createDeployment(deploymentRequest);
|
|
@@ -3909,7 +3927,8 @@ async function deployCommand(options) {
|
|
|
3909
3927
|
deploymentId: deployment.id,
|
|
3910
3928
|
deploymentName: projectName,
|
|
3911
3929
|
deploymentUrl: deployment.domain,
|
|
3912
|
-
linkedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3930
|
+
linkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3931
|
+
serverId: deployment.serverId
|
|
3913
3932
|
});
|
|
3914
3933
|
console.log(
|
|
3915
3934
|
source_default.gray(` Linked to this project (stored in .mcp-use/project.json)`)
|