@mcpcloud/cli 0.20.0 → 0.20.1-next-20260906202728
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 +26 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5571,6 +5571,9 @@ function describeDeployed(deployed) {
|
|
|
5571
5571
|
return `${deployed.behindHead} commit${deployed.behindHead === 1 ? "" : "s"} behind HEAD`;
|
|
5572
5572
|
}
|
|
5573
5573
|
function describeWorkingTree(tree) {
|
|
5574
|
+
if (tree.hydrated === false) {
|
|
5575
|
+
return "not loaded yet — hydrates from the stored bundle on the next commit or sync";
|
|
5576
|
+
}
|
|
5574
5577
|
const parts = [];
|
|
5575
5578
|
if (tree.added > 0)
|
|
5576
5579
|
parts.push(`${tree.added} added`);
|
|
@@ -7344,6 +7347,17 @@ function reportDeployFailure(terminalEvent) {
|
|
|
7344
7347
|
printError(`Deploy failed: ${reason ?? terminalEvent.message}`);
|
|
7345
7348
|
return true;
|
|
7346
7349
|
}
|
|
7350
|
+
async function isOnlyDeployment(args) {
|
|
7351
|
+
try {
|
|
7352
|
+
const listing = await api.get(`/api/v1/server/deployments?organizationId=${encodeURIComponent(args.orgId)}&serverId=${encodeURIComponent(args.serverId)}&limit=2`);
|
|
7353
|
+
const rows = listing.deployments;
|
|
7354
|
+
if (!Array.isArray(rows) || rows.length === 0)
|
|
7355
|
+
return false;
|
|
7356
|
+
return rows.every((row) => row.id === args.deploymentId);
|
|
7357
|
+
} catch {
|
|
7358
|
+
return false;
|
|
7359
|
+
}
|
|
7360
|
+
}
|
|
7347
7361
|
async function refreshDeploymentRow(args) {
|
|
7348
7362
|
try {
|
|
7349
7363
|
const refreshed = await api.get(`/api/v1/server/deployments?organizationId=${encodeURIComponent(args.orgId)}&serverId=${encodeURIComponent(args.serverId)}&limit=5`);
|
|
@@ -7458,6 +7472,9 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7458
7472
|
"terminal at": formatDate(terminalEvent.timestamp)
|
|
7459
7473
|
} : {}
|
|
7460
7474
|
});
|
|
7475
|
+
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({ deploymentId: dep.deploymentId, orgId, serverId })) {
|
|
7476
|
+
printWarn("This first deployment is public — anyone with the URL can call it. Redeploy with --access-mode privateOrg or unlisted to require sign-in (recommended when the upstream API needs credentials).");
|
|
7477
|
+
}
|
|
7461
7478
|
if (!opts.wait && dep.status === "queued") {
|
|
7462
7479
|
printInfo(`Deploy is running in the background — follow with \`mcp deployments get ${dep.deploymentId}\` or rerun with --wait.`);
|
|
7463
7480
|
}
|
|
@@ -7666,6 +7683,9 @@ function registerServerLifecycleCommands(servers) {
|
|
|
7666
7683
|
"terminal at": formatDate(terminalEvent.timestamp)
|
|
7667
7684
|
} : {}
|
|
7668
7685
|
});
|
|
7686
|
+
if (!accessMode && dep.accessMode === "public" && await isOnlyDeployment({ deploymentId: dep.deploymentId, orgId, serverId })) {
|
|
7687
|
+
printWarn("This first deployment is public — anyone with the URL can call it. Redeploy with --access-mode privateOrg or unlisted to require sign-in (recommended when the upstream API needs credentials).");
|
|
7688
|
+
}
|
|
7669
7689
|
if (!opts.wait && dep.status === "queued") {
|
|
7670
7690
|
printInfo(`Deploy is running in the background — follow with \`mcp deployments get ${dep.deploymentId}\` or rerun with --wait.`);
|
|
7671
7691
|
}
|
|
@@ -8097,6 +8117,12 @@ function registerServerSpecCommands(servers) {
|
|
|
8097
8117
|
"api source": data.apiSource.id ?? "—",
|
|
8098
8118
|
project: projectId
|
|
8099
8119
|
});
|
|
8120
|
+
const warnings = Array.isArray(data.apiSource.warnings) ? data.apiSource.warnings.filter((warning) => typeof warning === "string") : [];
|
|
8121
|
+
for (const warning of warnings.slice(0, 10))
|
|
8122
|
+
printWarn(` ! ${warning}`);
|
|
8123
|
+
if (warnings.length > 10) {
|
|
8124
|
+
printWarn(` ! +${warnings.length - 10} more — \`mcp projects api-source ${data.apiSource.id ?? "<id>"}\` lists them all.`);
|
|
8125
|
+
}
|
|
8100
8126
|
printStep(`Next: \`mcp servers generate ${data.server.id} --out ./out\` or \`mcp servers deploy ${data.server.id} --wait\`.`);
|
|
8101
8127
|
}));
|
|
8102
8128
|
servers.command("generate <server>").description("Generate the server's TypeScript bundle (the exact code `deploy` ships) and optionally write it to disk — a dry-run for the codegen path. Wraps POST /api/v1/server/generate.").option("--org <organizationId>", "Organization ID").option("--project <project>", "Project (id or name; looked up from the server when omitted)").option("--out <dir>", "Write the generated files to this directory instead of just summarizing").option("--store", "Persist the bundle as the one `deploy` will ship. Required after editing prompts, resources or tool metadata: deploy reuses a server's existing bundle unchanged, so without this the change never reaches the deployed worker.").addHelpText("after", [
|
package/package.json
CHANGED