@mcp-use/cli 3.0.3-canary.0 → 3.1.0-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/deployments.d.ts.map +1 -1
- package/dist/index.cjs +26 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/commands/deployments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuiBpC,wBAAgB,wBAAwB,IAAI,OAAO,CAuDlD"}
|
package/dist/index.cjs
CHANGED
|
@@ -4210,7 +4210,27 @@ async function listDeploymentsCommand() {
|
|
|
4210
4210
|
process.exit(1);
|
|
4211
4211
|
}
|
|
4212
4212
|
const api = await McpUseAPI.create();
|
|
4213
|
-
const deployments = await
|
|
4213
|
+
const [deployments, authResult] = await Promise.all([
|
|
4214
|
+
api.listDeployments(),
|
|
4215
|
+
api.testAuth()
|
|
4216
|
+
]);
|
|
4217
|
+
const orgMap = new Map(authResult.orgs.map((o) => [o.id, o.name]));
|
|
4218
|
+
const uniqueServerIds = [
|
|
4219
|
+
...new Set(
|
|
4220
|
+
deployments.map((d) => d.serverId).filter((id) => id != null)
|
|
4221
|
+
)
|
|
4222
|
+
];
|
|
4223
|
+
const serverResults = await Promise.allSettled(
|
|
4224
|
+
uniqueServerIds.map((id) => api.getServer(id))
|
|
4225
|
+
);
|
|
4226
|
+
const serverOrgMap = /* @__PURE__ */ new Map();
|
|
4227
|
+
for (let i = 0; i < uniqueServerIds.length; i++) {
|
|
4228
|
+
const result = serverResults[i];
|
|
4229
|
+
if (result.status === "fulfilled") {
|
|
4230
|
+
const orgName = orgMap.get(result.value.organizationId) ?? result.value.organizationId.substring(0, 19);
|
|
4231
|
+
serverOrgMap.set(uniqueServerIds[i], orgName);
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4214
4234
|
const sortedDeployments = [...deployments].sort(
|
|
4215
4235
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
4216
4236
|
);
|
|
@@ -4230,19 +4250,21 @@ async function listDeploymentsCommand() {
|
|
|
4230
4250
|
);
|
|
4231
4251
|
console.log(
|
|
4232
4252
|
source_default.white.bold(
|
|
4233
|
-
`${"ID".padEnd(40)} ${"NAME".padEnd(25)} ${"STATUS".padEnd(12)} ${"MCP URL".padEnd(45)} ${"CREATED"}`
|
|
4253
|
+
`${"ID".padEnd(40)} ${"NAME".padEnd(25)} ${"ORG".padEnd(20)} ${"STATUS".padEnd(12)} ${"MCP URL".padEnd(45)} ${"CREATED"}`
|
|
4234
4254
|
)
|
|
4235
4255
|
);
|
|
4236
|
-
console.log(source_default.gray("\u2500".repeat(
|
|
4256
|
+
console.log(source_default.gray("\u2500".repeat(155)));
|
|
4237
4257
|
for (const deployment of sortedDeployments) {
|
|
4238
4258
|
const id = formatId(deployment.id).padEnd(40);
|
|
4239
4259
|
const name = deployment.name.substring(0, 24).padEnd(25);
|
|
4260
|
+
const orgName = deployment.serverId ? serverOrgMap.get(deployment.serverId) ?? "-" : "-";
|
|
4261
|
+
const org = orgName.substring(0, 19).padEnd(20);
|
|
4240
4262
|
const statusColor = getStatusColor(deployment.status);
|
|
4241
4263
|
const status = statusColor(deployment.status.padEnd(12));
|
|
4242
4264
|
const mcpUrl = (deployment.mcpUrl || "-").substring(0, 44).padEnd(45);
|
|
4243
4265
|
const created = formatRelativeTime(deployment.createdAt);
|
|
4244
4266
|
console.log(
|
|
4245
|
-
`${source_default.gray(id)} ${name} ${status} ${source_default.cyan(mcpUrl)} ${source_default.gray(created)}`
|
|
4267
|
+
`${source_default.gray(id)} ${name} ${source_default.magenta(org)} ${status} ${source_default.cyan(mcpUrl)} ${source_default.gray(created)}`
|
|
4246
4268
|
);
|
|
4247
4269
|
}
|
|
4248
4270
|
console.log();
|