@eclipse-glsp/cli 2.7.0-next.21 → 2.7.0-next.22

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
@@ -15537,25 +15537,38 @@ var DEFAULT_TARGET_DIR = "examples/workflow-test";
15537
15537
  function generatePlaywrightEnvContent(options) {
15538
15538
  const { dir, discoveredRepos } = options;
15539
15539
  const lines = [];
15540
+ const hasServerNode = discoveredRepos.includes("glsp-server-node");
15541
+ const hasServerJava = discoveredRepos.includes("glsp-server");
15542
+ const hasClient = discoveredRepos.includes("glsp-client");
15540
15543
  lines.push("# Generated by: glsp repo playwright env");
15541
15544
  lines.push("# Regenerate this file after workspace changes.");
15542
15545
  lines.push("");
15546
+ lines.push("# General");
15547
+ lines.push("GLSP_SERVER_PORT=8081");
15548
+ lines.push("GLSP_SERVER_DEBUG=true");
15549
+ lines.push("GLSP_WEBSOCKET_PATH=workflow");
15550
+ if (hasServerNode) {
15551
+ lines.push("GLSP_SERVER_TYPE=node");
15552
+ lines.push("GLSP_SERVER_START_CMD=npx glsp repo server-node start");
15553
+ } else if (hasServerJava) {
15554
+ lines.push("GLSP_SERVER_TYPE=java");
15555
+ lines.push("GLSP_SERVER_START_CMD=npx glsp repo server-java start");
15556
+ } else {
15557
+ lines.push("GLSP_SERVER_TYPE=unknown");
15558
+ lines.push("# GLSP_SERVER_START_CMD=npx glsp repo server-node start");
15559
+ }
15560
+ lines.push("");
15543
15561
  lines.push("# Optional port overrides (uncomment to change defaults)");
15544
- lines.push("# GLSP_SERVER_PORT=8081");
15545
15562
  lines.push("# STANDALONE_PORT=8082");
15546
15563
  lines.push("# STANDALONE_BROWSER_PORT=8083");
15547
15564
  lines.push("# THEIA_PORT=3000");
15548
15565
  lines.push("");
15549
- const hasServerNode = discoveredRepos.includes("glsp-server-node");
15550
- const hasClient = discoveredRepos.includes("glsp-client");
15551
15566
  if (hasServerNode && hasClient) {
15552
15567
  lines.push("# Standalone Node (WebSocket)");
15553
- lines.push("GLSP_SERVER_START_CMD=glsp repo server-node start");
15554
- lines.push("STANDALONE_START_CMD=glsp repo client start --external-server --no-open");
15568
+ lines.push("STANDALONE_START_CMD=npx glsp repo client start --external-server --no-open");
15555
15569
  } else {
15556
15570
  lines.push("# Standalone Node (WebSocket) \u2014 missing repos, uncomment when available");
15557
- lines.push("# GLSP_SERVER_START_CMD=glsp repo server-node start");
15558
- lines.push("# STANDALONE_START_CMD=glsp repo client start --external-server --no-open");
15571
+ lines.push("# STANDALONE_START_CMD=npx glsp repo client start --external-server --no-open");
15559
15572
  }
15560
15573
  lines.push("");
15561
15574
  if (hasServerNode && hasClient) {
@@ -15563,23 +15576,23 @@ function generatePlaywrightEnvContent(options) {
15563
15576
  const bundleExists = fs20.existsSync(bundlePath);
15564
15577
  lines.push("# Standalone Browser (Web Worker)");
15565
15578
  if (bundleExists) {
15566
- lines.push(`STANDALONE_BROWSER_START_CMD=glsp repo client start --browser --external-server ${bundlePath} --no-open`);
15579
+ lines.push(`STANDALONE_BROWSER_START_CMD=npx glsp repo client start --browser --external-server ${bundlePath} --no-open`);
15567
15580
  } else {
15568
15581
  LOGGER.warn(`Browser bundle not found at ${bundlePath}. Build glsp-server-node first.`);
15569
- lines.push(`# STANDALONE_BROWSER_START_CMD=glsp repo client start --browser --external-server ${bundlePath} --no-open`);
15582
+ lines.push(`# STANDALONE_BROWSER_START_CMD=npx glsp repo client start --browser --external-server ${bundlePath} --no-open`);
15570
15583
  }
15571
15584
  } else {
15572
15585
  lines.push("# Standalone Browser (Web Worker) \u2014 missing repos, uncomment when available");
15573
- lines.push("# STANDALONE_BROWSER_START_CMD=glsp repo client start --browser --external-server <bundle-path> --no-open");
15586
+ lines.push("# STANDALONE_BROWSER_START_CMD=npx glsp repo client start --browser --external-server <bundle-path> --no-open");
15574
15587
  }
15575
15588
  lines.push("");
15576
15589
  const hasTheia = discoveredRepos.includes("glsp-theia-integration");
15577
15590
  if (hasTheia) {
15578
15591
  lines.push("# Theia");
15579
- lines.push("THEIA_START_CMD=glsp repo theia start");
15592
+ lines.push("THEIA_START_CMD=npx glsp repo theia start");
15580
15593
  } else {
15581
15594
  lines.push("# Theia \u2014 repo not found, uncomment when available");
15582
- lines.push("# THEIA_START_CMD=glsp repo theia start");
15595
+ lines.push("# THEIA_START_CMD=npx glsp repo theia start");
15583
15596
  }
15584
15597
  lines.push("");
15585
15598
  const hasVscode = discoveredRepos.includes("glsp-vscode-integration");
@@ -15598,28 +15611,10 @@ function generatePlaywrightEnvContent(options) {
15598
15611
  } else {
15599
15612
  lines.push("# VSCODE_VSIX_PATH=<path-to-vsix>");
15600
15613
  }
15601
- lines.push("");
15602
- lines.push("# VSCode Web Extension");
15603
- lines.push(`VSCODE_WEB_VSIX_ID=${WEB_VSIX_ID}`);
15604
- let webVsixPath;
15605
- try {
15606
- webVsixPath = discoverWebVsix(vscodeRepoDir);
15607
- } catch {
15608
- LOGGER.warn("Web extension VSIX file not found. Build and package the web extension first.");
15609
- }
15610
- if (webVsixPath) {
15611
- lines.push(`VSCODE_WEB_VSIX_PATH=${webVsixPath}`);
15612
- } else {
15613
- lines.push("# VSCODE_WEB_VSIX_PATH=<path-to-web-vsix>");
15614
- }
15615
15614
  } else {
15616
15615
  lines.push("# VSCode \u2014 repo not found, uncomment when available");
15617
15616
  lines.push(`# VSCODE_VSIX_ID=${VSIX_ID}`);
15618
15617
  lines.push("# VSCODE_VSIX_PATH=<path-to-vsix>");
15619
- lines.push("");
15620
- lines.push("# VSCode Web Extension \u2014 repo not found, uncomment when available");
15621
- lines.push(`# VSCODE_WEB_VSIX_ID=${WEB_VSIX_ID}`);
15622
- lines.push("# VSCODE_WEB_VSIX_PATH=<path-to-web-vsix>");
15623
15618
  }
15624
15619
  lines.push("");
15625
15620
  return lines.join("\n");
@@ -15826,6 +15821,12 @@ function createSubrepoCommand(repo) {
15826
15821
  cmd.addCommand(extraCmd);
15827
15822
  }
15828
15823
  }
15824
+ cmd.hook("preSubcommand", (_, subcommand) => {
15825
+ const parentDir = cmd.getOptionValue("dir");
15826
+ if (parentDir && !subcommand.getOptionValue("dir")) {
15827
+ subcommand.setOptionValue("dir", parentDir);
15828
+ }
15829
+ });
15829
15830
  const alias = SHORT_ALIASES[repo];
15830
15831
  if (alias) {
15831
15832
  cmd.alias(alias);
@@ -15955,7 +15956,13 @@ Run "glsp repo workspace init" first.`);
15955
15956
  var WorkspaceCommand = baseCommand().name("workspace").description("Manage VS Code workspace files for GLSP projects").addCommand(WorkspaceInitCommand).addCommand(WorkspaceOpenCommand);
15956
15957
 
15957
15958
  // src/commands/repo/repo.ts
15958
- var RepoCommand = baseCommand().name("repo").description("Multi-repository management for GLSP projects").addCommand(CloneCommand).addCommand(ForkCommand).addCommand(BuildCommand).addCommand(LinkCommand).addCommand(UnlinkCommand).addCommand(PwdCommand).addCommand(LogCommand).addCommand(WorkspaceCommand);
15959
+ var RepoCommand = baseCommand().name("repo").description("Multi-repository management for GLSP projects").option("-d, --dir <path>", "Target directory where repos are cloned (inherited by subcommands)").addCommand(CloneCommand).addCommand(ForkCommand).addCommand(BuildCommand).addCommand(LinkCommand).addCommand(UnlinkCommand).addCommand(PwdCommand).addCommand(LogCommand).addCommand(WorkspaceCommand);
15960
+ RepoCommand.hook("preSubcommand", (_, subcommand) => {
15961
+ const parentDir = RepoCommand.opts().dir;
15962
+ if (parentDir && !subcommand.getOptionValue("dir")) {
15963
+ subcommand.setOptionValue("dir", parentDir);
15964
+ }
15965
+ });
15959
15966
  for (const repo of GLSPRepo.choices) {
15960
15967
  RepoCommand.addCommand(createSubrepoCommand(repo));
15961
15968
  }