webmux 0.21.0 → 0.22.0

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.
@@ -11893,9 +11893,22 @@ async function apiPullMain(req) {
11893
11893
  const raw = await req.json().catch(() => ({}));
11894
11894
  const body = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
11895
11895
  const force = body.force === true;
11896
- const deps = { git, projectRoot: PROJECT_DIR, mainBranch: config.workspace.mainBranch };
11896
+ const repo = typeof body.repo === "string" ? body.repo : "";
11897
+ let projectRoot2 = PROJECT_DIR;
11898
+ if (repo) {
11899
+ const linkedRepo = config.integrations.github.linkedRepos.find((lr) => lr.alias === repo);
11900
+ if (!linkedRepo)
11901
+ return errorResponse(`Unknown linked repo: ${repo}`, 404);
11902
+ if (!linkedRepo.dir)
11903
+ return errorResponse(`Linked repo "${repo}" has no dir configured`, 400);
11904
+ projectRoot2 = resolve7(PROJECT_DIR, linkedRepo.dir);
11905
+ if (!projectRoot2.startsWith(PROJECT_DIR)) {
11906
+ return errorResponse("Invalid linked repo directory", 400);
11907
+ }
11908
+ }
11909
+ const deps = { git, projectRoot: projectRoot2, mainBranch: config.workspace.mainBranch };
11897
11910
  const result = force ? forcePullMainBranch(deps) : pullMainBranch(deps);
11898
- log.info(`[pull-main] ${force ? "force " : ""}pull: ${result.status}`);
11911
+ log.info(`[pull-main] ${repo || "main"} ${force ? "force " : ""}pull: ${result.status}`);
11899
11912
  return jsonResponse(result);
11900
11913
  }
11901
11914
  async function apiGetLinearIssues() {
package/bin/webmux.js CHANGED
@@ -12916,7 +12916,7 @@ import { fileURLToPath } from "url";
12916
12916
  // package.json
12917
12917
  var package_default = {
12918
12918
  name: "webmux",
12919
- version: "0.21.0",
12919
+ version: "0.22.0",
12920
12920
  description: "Web dashboard for workmux \u2014 browser UI with embedded terminals, PR monitoring, and CI integration",
12921
12921
  type: "module",
12922
12922
  repository: {