@mcp-use/cli 2.11.1 → 2.11.2-canary.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 +20 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/utils/api.d.ts +11 -1
- package/dist/utils/api.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;AA8kBD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
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;AA8kBD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAiazE"}
|
package/dist/index.cjs
CHANGED
|
@@ -1406,9 +1406,14 @@ var McpUseAPI = class _McpUseAPI {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Redeploy deployment
|
|
1409
|
+
*
|
|
1410
|
+
* @param deploymentId - The deployment ID to redeploy
|
|
1411
|
+
* @param configOrFilePath - Either a RedeploymentConfig object with updated settings,
|
|
1412
|
+
* or a file path string for source code upload
|
|
1409
1413
|
*/
|
|
1410
|
-
async redeployDeployment(deploymentId,
|
|
1411
|
-
if (
|
|
1414
|
+
async redeployDeployment(deploymentId, configOrFilePath) {
|
|
1415
|
+
if (typeof configOrFilePath === "string") {
|
|
1416
|
+
const filePath = configOrFilePath;
|
|
1412
1417
|
const { readFile: readFile3 } = await import("fs/promises");
|
|
1413
1418
|
const { basename } = await import("path");
|
|
1414
1419
|
const { stat } = await import("fs/promises");
|
|
@@ -1438,11 +1443,12 @@ var McpUseAPI = class _McpUseAPI {
|
|
|
1438
1443
|
throw new Error(`Redeploy failed: ${error}`);
|
|
1439
1444
|
}
|
|
1440
1445
|
return response.json();
|
|
1441
|
-
} else {
|
|
1442
|
-
return this.request(`/deployments/${deploymentId}/redeploy`, {
|
|
1443
|
-
method: "POST"
|
|
1444
|
-
});
|
|
1445
1446
|
}
|
|
1447
|
+
const config = configOrFilePath;
|
|
1448
|
+
return this.request(`/deployments/${deploymentId}/redeploy`, {
|
|
1449
|
+
method: "POST",
|
|
1450
|
+
body: config ? JSON.stringify(config) : void 0
|
|
1451
|
+
});
|
|
1446
1452
|
}
|
|
1447
1453
|
/**
|
|
1448
1454
|
* Get deployment logs
|
|
@@ -3851,8 +3857,15 @@ async function deployCommand(options) {
|
|
|
3851
3857
|
source_default.cyan(` URL: https://${existingDeployment.domain}/mcp
|
|
3852
3858
|
`)
|
|
3853
3859
|
);
|
|
3860
|
+
const redeploymentConfig = {
|
|
3861
|
+
buildCommand,
|
|
3862
|
+
startCommand,
|
|
3863
|
+
...options.port !== void 0 ? { port: options.port } : {},
|
|
3864
|
+
env: Object.keys(envVars).length > 0 ? envVars : void 0
|
|
3865
|
+
};
|
|
3854
3866
|
const deployment2 = await api.redeployDeployment(
|
|
3855
|
-
existingLink.deploymentId
|
|
3867
|
+
existingLink.deploymentId,
|
|
3868
|
+
redeploymentConfig
|
|
3856
3869
|
);
|
|
3857
3870
|
await saveProjectLink(cwd, {
|
|
3858
3871
|
...existingLink,
|