@mcp-use/cli 2.17.1-canary.0 → 2.18.0-canary.2

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.
@@ -6,6 +6,7 @@ interface DeployOptions {
6
6
  new?: boolean;
7
7
  env?: string[];
8
8
  envFile?: string;
9
+ rootDir?: string;
9
10
  }
10
11
  /**
11
12
  * Deploy command - deploys MCP server to Manufact cloud
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AA6KA,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;AAulBD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAibzE"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AA6KA,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;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAulBD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAyczE"}
package/dist/index.cjs CHANGED
@@ -3647,7 +3647,19 @@ async function deployCommand(options) {
3647
3647
  }
3648
3648
  }
3649
3649
  console.log(source_default.cyan.bold("\u{1F680} Deploying to Manufact cloud...\n"));
3650
- const isMcp = await isMcpProject(cwd);
3650
+ const projectDir = options.rootDir ? import_node_path5.default.resolve(cwd, options.rootDir) : cwd;
3651
+ if (options.rootDir) {
3652
+ try {
3653
+ await import_node_fs7.promises.access(projectDir);
3654
+ } catch {
3655
+ console.log(
3656
+ source_default.red(`\u2717 Root directory not found: ${options.rootDir}`)
3657
+ );
3658
+ process.exit(1);
3659
+ }
3660
+ console.log(source_default.gray(` Root dir: `) + source_default.cyan(options.rootDir));
3661
+ }
3662
+ const isMcp = await isMcpProject(projectDir);
3651
3663
  if (!isMcp) {
3652
3664
  console.log(
3653
3665
  source_default.yellow(
@@ -3740,17 +3752,22 @@ async function deployCommand(options) {
3740
3752
  console.log(source_default.gray("Deployment cancelled."));
3741
3753
  process.exit(0);
3742
3754
  }
3743
- const projectName = options.name || await getProjectName(cwd);
3744
- const runtime = options.runtime || await detectRuntime(cwd);
3755
+ const projectName = options.name || await getProjectName(projectDir);
3756
+ const runtime = options.runtime || await detectRuntime(projectDir);
3745
3757
  const port = options.port || 3e3;
3746
- const buildCommand = await detectBuildCommand(cwd);
3747
- const startCommand = await detectStartCommand(cwd);
3758
+ const buildCommand = await detectBuildCommand(projectDir);
3759
+ const startCommand = await detectStartCommand(projectDir);
3748
3760
  const envVars = await buildEnvVars(options);
3749
3761
  console.log();
3750
3762
  console.log(source_default.white("Deployment configuration:"));
3751
3763
  console.log(source_default.gray(` Name: `) + source_default.cyan(projectName));
3752
3764
  console.log(source_default.gray(` Runtime: `) + source_default.cyan(runtime));
3753
3765
  console.log(source_default.gray(` Port: `) + source_default.cyan(port));
3766
+ if (options.rootDir) {
3767
+ console.log(
3768
+ source_default.gray(` Root dir: `) + source_default.cyan(options.rootDir)
3769
+ );
3770
+ }
3754
3771
  if (buildCommand) {
3755
3772
  console.log(source_default.gray(` Build command: `) + source_default.cyan(buildCommand));
3756
3773
  }
@@ -3888,7 +3905,8 @@ async function deployCommand(options) {
3888
3905
  buildCommand,
3889
3906
  startCommand,
3890
3907
  ...options.port !== void 0 ? { port: options.port } : {},
3891
- env: Object.keys(envVars).length > 0 ? envVars : void 0
3908
+ env: Object.keys(envVars).length > 0 ? envVars : void 0,
3909
+ rootDir: options.rootDir || void 0
3892
3910
  };
3893
3911
  const deployment2 = await api.redeployDeployment(
3894
3912
  existingLink.deploymentId,
@@ -3932,6 +3950,7 @@ async function deployCommand(options) {
3932
3950
  type: "github",
3933
3951
  repo: `${gitInfo.owner}/${gitInfo.repo}`,
3934
3952
  branch: gitInfo.branch || "main",
3953
+ rootDir: options.rootDir || void 0,
3935
3954
  runtime,
3936
3955
  port,
3937
3956
  buildCommand,
@@ -6190,7 +6209,10 @@ program.command("deploy").description("Deploy MCP server from GitHub to Manufact
6190
6209
  ).option(
6191
6210
  "--env <key=value...>",
6192
6211
  "Environment variables (can be used multiple times)"
6193
- ).option("--env-file <path>", "Path to .env file with environment variables").action(async (options) => {
6212
+ ).option("--env-file <path>", "Path to .env file with environment variables").option(
6213
+ "--root-dir <path>",
6214
+ "Root directory within repo to deploy from (for monorepos)"
6215
+ ).action(async (options) => {
6194
6216
  await deployCommand({
6195
6217
  open: options.open,
6196
6218
  name: options.name,
@@ -6198,7 +6220,8 @@ program.command("deploy").description("Deploy MCP server from GitHub to Manufact
6198
6220
  runtime: options.runtime,
6199
6221
  new: options.new,
6200
6222
  env: options.env,
6201
- envFile: options.envFile
6223
+ envFile: options.envFile,
6224
+ rootDir: options.rootDir
6202
6225
  });
6203
6226
  });
6204
6227
  program.addCommand(createClientCommand());