Skip to content

Commit 87af7c9

Browse files
committed
Merge main into feature branch
Combine mux-site additions with multiplexer web packages from main. Updated workspace dependencies in both index.ts and birmel.ts to include all new packages (mux-site, @mux/shared, @mux/client, @mux/frontend).
2 parents 377f61c + 4c861e1 commit 87af7c9

69 files changed

Lines changed: 6465 additions & 981 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dagger/src/birmel.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Directory, Container, Secret } from "@dagger.io/dagger";
22
import { dag } from "@dagger.io/dagger";
33

4-
const BUN_VERSION = "1.3.4";
4+
const BUN_VERSION = "1.3.5";
55
const PLAYWRIGHT_VERSION = "1.57.0";
66

77
/**
@@ -66,6 +66,23 @@ function installWorkspaceDeps(workspaceSource: Directory, useMounts: boolean): C
6666
.withMountedFile(
6767
"/workspace/packages/mux-site/package.json",
6868
workspaceSource.file("packages/mux-site/package.json"),
69+
)
70+
// Multiplexer web packages (in root workspaces)
71+
.withMountedFile(
72+
"/workspace/packages/multiplexer/web/package.json",
73+
workspaceSource.file("packages/multiplexer/web/package.json"),
74+
)
75+
.withMountedFile(
76+
"/workspace/packages/multiplexer/web/shared/package.json",
77+
workspaceSource.file("packages/multiplexer/web/shared/package.json"),
78+
)
79+
.withMountedFile(
80+
"/workspace/packages/multiplexer/web/client/package.json",
81+
workspaceSource.file("packages/multiplexer/web/client/package.json"),
82+
)
83+
.withMountedFile(
84+
"/workspace/packages/multiplexer/web/frontend/package.json",
85+
workspaceSource.file("packages/multiplexer/web/frontend/package.json"),
6986
);
7087
} else {
7188
container = container
@@ -87,6 +104,23 @@ function installWorkspaceDeps(workspaceSource: Directory, useMounts: boolean): C
87104
.withFile(
88105
"/workspace/packages/mux-site/package.json",
89106
workspaceSource.file("packages/mux-site/package.json"),
107+
)
108+
// Multiplexer web packages (in root workspaces)
109+
.withFile(
110+
"/workspace/packages/multiplexer/web/package.json",
111+
workspaceSource.file("packages/multiplexer/web/package.json"),
112+
)
113+
.withFile(
114+
"/workspace/packages/multiplexer/web/shared/package.json",
115+
workspaceSource.file("packages/multiplexer/web/shared/package.json"),
116+
)
117+
.withFile(
118+
"/workspace/packages/multiplexer/web/client/package.json",
119+
workspaceSource.file("packages/multiplexer/web/client/package.json"),
120+
)
121+
.withFile(
122+
"/workspace/packages/multiplexer/web/frontend/package.json",
123+
workspaceSource.file("packages/multiplexer/web/frontend/package.json"),
90124
);
91125
}
92126

.dagger/src/index.ts

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
const PACKAGES = ["eslint-config", "dagger-utils", "bun-decompile"] as const;
1111
const REPO_URL = "shepherdjerred/monorepo";
1212

13-
const BUN_VERSION = "1.3.4";
13+
const BUN_VERSION = "1.3.5";
1414
const PLAYWRIGHT_VERSION = "1.57.0";
1515
// Pin release-please version for reproducible builds
1616
const RELEASE_PLEASE_VERSION = "17.1.3";
@@ -73,7 +73,12 @@ function installWorkspaceDeps(source: Directory): Container {
7373
.withMountedFile("/workspace/packages/bun-decompile/package.json", source.file("packages/bun-decompile/package.json"))
7474
.withMountedFile("/workspace/packages/dagger-utils/package.json", source.file("packages/dagger-utils/package.json"))
7575
.withMountedFile("/workspace/packages/eslint-config/package.json", source.file("packages/eslint-config/package.json"))
76-
.withMountedFile("/workspace/packages/mux-site/package.json", source.file("packages/mux-site/package.json"));
76+
.withMountedFile("/workspace/packages/mux-site/package.json", source.file("packages/mux-site/package.json"))
77+
// Multiplexer web packages (in root workspaces)
78+
.withMountedFile("/workspace/packages/multiplexer/web/package.json", source.file("packages/multiplexer/web/package.json"))
79+
.withMountedFile("/workspace/packages/multiplexer/web/shared/package.json", source.file("packages/multiplexer/web/shared/package.json"))
80+
.withMountedFile("/workspace/packages/multiplexer/web/client/package.json", source.file("packages/multiplexer/web/client/package.json"))
81+
.withMountedFile("/workspace/packages/multiplexer/web/frontend/package.json", source.file("packages/multiplexer/web/frontend/package.json"));
7782

7883
// PHASE 2: Install dependencies (cached if lockfile + package.jsons unchanged)
7984
container = container.withExec(["bun", "install", "--frozen-lockfile"]);
@@ -85,7 +90,11 @@ function installWorkspaceDeps(source: Directory): Container {
8590
.withMountedDirectory("/workspace/packages/bun-decompile", source.directory("packages/bun-decompile"))
8691
.withMountedDirectory("/workspace/packages/dagger-utils", source.directory("packages/dagger-utils"))
8792
.withMountedDirectory("/workspace/packages/eslint-config", source.directory("packages/eslint-config"))
88-
.withMountedDirectory("/workspace/packages/mux-site", source.directory("packages/mux-site"));
93+
.withMountedDirectory("/workspace/packages/mux-site", source.directory("packages/mux-site"))
94+
// Multiplexer web packages
95+
.withMountedDirectory("/workspace/packages/multiplexer/web/shared", source.directory("packages/multiplexer/web/shared"))
96+
.withMountedDirectory("/workspace/packages/multiplexer/web/client", source.directory("packages/multiplexer/web/client"))
97+
.withMountedDirectory("/workspace/packages/multiplexer/web/frontend", source.directory("packages/multiplexer/web/frontend"));
8998

9099
// PHASE 4: Re-run bun install to recreate workspace node_modules symlinks
91100
// (Source mounts in Phase 3 replace the symlinks that Phase 2 created)
@@ -278,18 +287,28 @@ export class Monorepo {
278287
await container.sync();
279288
outputs.push("✓ Prisma setup");
280289

281-
// Run typecheck and build in PARALLEL
290+
// Build web packages in dependency order first
291+
// Bun's --filter runs packages in parallel, which breaks when packages depend on
292+
// each other's dist/ output for type declarations
293+
// IMPORTANT: Must update container after each step to preserve build output
294+
container = container.withExec(["bun", "run", "--filter", "@mux/shared", "build"]);
295+
await container.sync();
296+
container = container.withExec(["bun", "run", "--filter", "@mux/client", "build"]);
297+
await container.sync();
298+
container = container.withExec(["bun", "run", "--filter", "@mux/frontend", "build"]);
299+
await container.sync();
300+
301+
// Now build remaining packages (web packages already built, will be skipped or fast)
282302
// Note: Skip tests here - bun-decompile tests fail in CI (requires `bun build --compile`)
283-
// Individual package tests will run in the birmelCi() call below
284-
await Promise.all([
285-
container.withExec(["bun", "run", "typecheck"]).sync(),
286-
// Skip: container.withExec(["bun", "run", "test"]).sync(),
287-
container.withExec(["bun", "run", "build"]).sync(),
288-
]);
289-
outputs.push("✓ Typecheck");
290-
// outputs.push("✓ Test"); // Skipped - birmel tests run separately below
303+
container = container.withExec(["bun", "run", "build"]);
304+
await container.sync();
291305
outputs.push("✓ Build");
292306

307+
// Typecheck all packages
308+
container = container.withExec(["bun", "run", "typecheck"]);
309+
await container.sync();
310+
outputs.push("✓ Typecheck");
311+
293312
// Birmel CI, Multiplexer CI, and mux-site build in parallel
294313
const [birmelResult, muxResult, muxSiteResult] = await Promise.all([
295314
checkBirmel(source),

.lintstagedrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,11 @@ export default {
2626

2727
return commands;
2828
},
29+
"packages/multiplexer/**/*.rs": () => {
30+
return [
31+
"cd packages/multiplexer && cargo fmt --check",
32+
"cd packages/multiplexer && cargo clippy -- -D warnings",
33+
"cd packages/multiplexer && cargo test",
34+
];
35+
},
2936
};

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"packages/bun-decompile": "0.1.0",
23
"packages/dagger-utils": "0.5.0",
34
"packages/eslint-config": "0.2.0",
45
"packages/multiplexer": "0.1.0"

CLAUDE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,26 @@ bun run dev # Backend with watch
200200
bun run dev:frontend # Frontend dev server
201201
bun run dev:all # Both concurrently
202202
```
203+
204+
### multiplexer
205+
206+
Rust-based session multiplexer with web interface. Contains nested TypeScript workspaces:
207+
208+
```bash
209+
cd packages/multiplexer
210+
cargo build # Build Rust binary
211+
cargo test # Run Rust tests
212+
213+
# Web packages (nested workspace)
214+
cd web
215+
bun install # Install web dependencies
216+
bun run build # Build all web packages
217+
bun run test # Run web tests
218+
bun run lint # Lint web packages
219+
```
220+
221+
**Build Order**: The frontend must be built before the Rust binary (static files are embedded):
222+
1. `cd packages/multiplexer/web/frontend && bun run build`
223+
2. `cd packages/multiplexer && cargo build`
224+
225+
**Nested Workspace Exception**: The web packages (`packages/multiplexer/web/*`) use standalone ESLint configs instead of `@shepherdjerred/eslint-config` due to Bun workspace resolution limitations with deeply nested packages. These configs follow the same patterns and rules as the shared config.

0 commit comments

Comments
 (0)