@eclipse-glsp/cli 2.7.0-next.19 → 2.7.0-next.20

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/cli.js CHANGED
@@ -15685,23 +15685,26 @@ var ClientStartCommand = baseCommand().name("start").description("Start the stan
15685
15685
  const script = cli.browser ? "start:browser" : "start";
15686
15686
  await execForeground(`yarn ${script}`, { cwd: repoDir, verbose: cli.verbose });
15687
15687
  });
15688
- var ServerStartCommand = baseCommand().name("start").description("Start the glsp-server Java GLSP server").option("-d, --dir <path>", "Target directory where repos are cloned").option("--socket", "Use socket connection instead of websocket", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
15688
+ var ServerStartCommand = baseCommand().name("start").description("Start the glsp-server Java GLSP server").option("-d, --dir <path>", "Target directory where repos are cloned").option("-p, --port <port>", "Port to start the server on").option("--socket", "Use socket connection instead of websocket", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
15689
15689
  const cli = thisCmd.opts();
15690
15690
  configureRepoEnv(cli);
15691
15691
  const dir = resolveWorkspaceDir(cli.dir);
15692
15692
  const repoDir = path23.resolve(dir, "glsp-server");
15693
15693
  const jarPath = discoverJar(repoDir);
15694
15694
  LOGGER.info(`Found JAR: ${jarPath}`);
15695
- const javaCmd = cli.socket ? `java -jar ${jarPath} --port=5007` : `java -jar ${jarPath} --websocket --port=8081`;
15695
+ const socketPort = cli.port ?? 5007;
15696
+ const wsPort = cli.port ?? 8081;
15697
+ const javaCmd = cli.socket ? `java -jar ${jarPath} --port=${socketPort}` : `java -jar ${jarPath} --websocket --port=${wsPort}`;
15696
15698
  await execForeground(javaCmd, { cwd: repoDir, verbose: cli.verbose });
15697
15699
  });
15698
- var ServerNodeStartCommand = baseCommand().name("start").description("Start the glsp-server-node GLSP server").option("-d, --dir <path>", "Target directory where repos are cloned").option("--socket", "Use socket connection instead of websocket", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
15700
+ var ServerNodeStartCommand = baseCommand().name("start").description("Start the glsp-server-node GLSP server").option("-d, --dir <path>", "Target directory where repos are cloned").option("-p, --port <port>", "Port to start the server on").option("--socket", "Use socket connection instead of websocket", false).option("-v, --verbose", "Verbose output", false).action(async (_cmdOptions, thisCmd) => {
15699
15701
  const cli = thisCmd.opts();
15700
15702
  configureRepoEnv(cli);
15701
15703
  const dir = resolveWorkspaceDir(cli.dir);
15702
15704
  const repoDir = path23.resolve(dir, "glsp-server-node");
15703
15705
  const yarnCmd = cli.socket ? "yarn start" : "yarn start:websocket";
15704
- await execForeground(yarnCmd, { cwd: repoDir, verbose: cli.verbose });
15706
+ const portArg = cli.port ? ` --port ${cli.port}` : "";
15707
+ await execForeground(`${yarnCmd}${portArg}`, { cwd: repoDir, verbose: cli.verbose });
15705
15708
  });
15706
15709
 
15707
15710
  // src/commands/repo/switch.ts