@chriscode/devmux 1.2.0 → 1.3.1

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
@@ -1,32 +1,246 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- attachService,
4
3
  discoverFromTurbo,
5
- ensureService,
6
4
  formatDiscoveredConfig,
7
- getAllStatus,
8
5
  getAllWatcherStatuses,
9
- loadConfig,
10
- restartService,
11
6
  runWithServices,
12
7
  startAllWatchers,
13
8
  startWatcher,
14
- stopAllServices,
15
9
  stopAllWatchers,
16
- stopService,
17
10
  stopWatcher
18
- } from "./chunk-FVUGZCQ3.js";
11
+ } from "./chunk-6EU6ODXX.js";
19
12
  import {
20
13
  clearQueue,
21
14
  getPendingEvents
22
- } from "./chunk-JDD6USSA.js";
23
- import "./chunk-MLKGABMK.js";
15
+ } from "./chunk-32R7KDZB.js";
16
+ import {
17
+ attachService,
18
+ ensureService,
19
+ getAllStatus,
20
+ getProcessOnPort,
21
+ init_loader,
22
+ loadConfig,
23
+ loader_exports,
24
+ restartService,
25
+ stopAllServices,
26
+ stopService
27
+ } from "./chunk-ALENFKSX.js";
28
+ import {
29
+ __toCommonJS,
30
+ init_esm_shims
31
+ } from "./chunk-66UOCF5R.js";
24
32
 
25
33
  // src/cli.ts
34
+ init_esm_shims();
35
+ init_loader();
26
36
  import { defineCommand, runMain } from "citty";
27
37
  import { mkdirSync, existsSync, cpSync } from "fs";
28
38
  import { dirname, join } from "path";
29
39
  import { fileURLToPath } from "url";
40
+
41
+ // src/utils/diagnose.ts
42
+ init_esm_shims();
43
+ import { networkInterfaces } from "os";
44
+ function getAddressesToCheck() {
45
+ const addresses = ["127.0.0.1", "0.0.0.0", "::1"];
46
+ const interfaces = networkInterfaces();
47
+ for (const [name, addrs] of Object.entries(interfaces)) {
48
+ if (!addrs) continue;
49
+ for (const addr of addrs) {
50
+ if (addr.internal) continue;
51
+ if (addr.address.startsWith("fe80")) continue;
52
+ if (addr.address.startsWith("169.254")) continue;
53
+ if (!addresses.includes(addr.address)) {
54
+ addresses.push(addr.address);
55
+ }
56
+ }
57
+ }
58
+ return addresses;
59
+ }
60
+ async function checkPortStatus(port, address) {
61
+ const proc = await getProcessOnPort(port);
62
+ if (proc) {
63
+ return {
64
+ address,
65
+ status: "occupied",
66
+ process: { name: proc.name, pid: proc.pid, cmd: proc.cmd }
67
+ };
68
+ }
69
+ return { address, status: "free" };
70
+ }
71
+ function detectBlockerType(processName, cmd) {
72
+ const lowerName = processName.toLowerCase();
73
+ const lowerCmd = cmd?.toLowerCase() || "";
74
+ const vpnPatterns = [
75
+ { pattern: /tailscale/, name: "Tailscale" },
76
+ { pattern: /wireguard/, name: "WireGuard" },
77
+ { pattern: /openvpn/, name: "OpenVPN" },
78
+ { pattern: /anyconnect/, name: "Cisco AnyConnect" },
79
+ { pattern: /forticlient/, name: "FortiClient" },
80
+ { pattern: /globalprotect/, name: "GlobalProtect" },
81
+ { pattern: /netextender/, name: "NetExtender" },
82
+ { pattern: /warp/, name: "Cloudflare WARP" },
83
+ { pattern: /zerotier/, name: "ZeroTier" },
84
+ { pattern: /hamachi/, name: "LogMeIn Hamachi" },
85
+ { pattern: /nordvpn/, name: "NordVPN" },
86
+ { pattern: /expressvpn/, name: "ExpressVPN" },
87
+ { pattern: /protonvpn/, name: "ProtonVPN" },
88
+ { pattern: /surfshark/, name: "Surfshark" },
89
+ { pattern: /tunnelbear/, name: "TunnelBear" },
90
+ { pattern: /ipvanish/, name: "IPVanish" }
91
+ ];
92
+ for (const { pattern, name } of vpnPatterns) {
93
+ if (pattern.test(lowerName) || pattern.test(lowerCmd)) {
94
+ return { type: "vpn", name };
95
+ }
96
+ }
97
+ const dockerPatterns = [
98
+ { pattern: /docker/, name: "Docker" },
99
+ { pattern: /containerd/, name: "containerd" },
100
+ { pattern: /podman/, name: "Podman" },
101
+ { pattern: /nerdctl/, name: "nerdctl" }
102
+ ];
103
+ for (const { pattern, name } of dockerPatterns) {
104
+ if (pattern.test(lowerName) || pattern.test(lowerCmd)) {
105
+ return { type: "docker", name };
106
+ }
107
+ }
108
+ const systemPatterns = [
109
+ { pattern: /systemd/, name: "systemd" },
110
+ { pattern: /launchd/, name: "launchd" },
111
+ { pattern: /inetd/, name: "inetd" },
112
+ { pattern: /xinetd/, name: "xinetd" }
113
+ ];
114
+ for (const { pattern, name } of systemPatterns) {
115
+ if (pattern.test(lowerName) || pattern.test(lowerCmd)) {
116
+ return { type: "system", name };
117
+ }
118
+ }
119
+ return { type: "other", name: processName };
120
+ }
121
+ function generateSuggestion(blockerType, blockerName, port) {
122
+ switch (blockerType) {
123
+ case "vpn":
124
+ if (blockerName === "Tailscale") {
125
+ return `Tailscale may be proxying this port. Run:
126
+ tailscale serve status
127
+ tailscale serve reset # to clear all
128
+
129
+ Or check for Funnel:
130
+ tailscale funnel status`;
131
+ }
132
+ return `${blockerName} may be intercepting traffic on this port. Check ${blockerName} settings or temporarily disconnect to test.`;
133
+ case "docker":
134
+ return `A Docker container is using this port. Check running containers:
135
+ docker ps --format "table {{.Names}}\\t{{.Ports}}"
136
+
137
+ Stop the container or map it to a different port.`;
138
+ case "system":
139
+ return `A system service (${blockerName}) is listening on this port. You may need to:
140
+ sudo lsof -i :${port}
141
+ sudo systemctl stop <service> # if using systemd`;
142
+ default:
143
+ return `Process is occupying the port. To free it:
144
+ lsof -ti :${port} | xargs kill -9`;
145
+ }
146
+ }
147
+ async function diagnosePort(port, serviceName) {
148
+ const addresses = getAddressesToCheck();
149
+ const bindings = [];
150
+ for (const address of addresses) {
151
+ const binding = await checkPortStatus(port, address);
152
+ if (binding) {
153
+ bindings.push(binding);
154
+ }
155
+ }
156
+ const occupiedBindings = bindings.filter((b) => b.status === "occupied");
157
+ const isBlocked = occupiedBindings.length > 0;
158
+ let blockerType;
159
+ let blockerName;
160
+ let suggestion;
161
+ if (isBlocked && occupiedBindings.length > 0) {
162
+ for (const binding of occupiedBindings) {
163
+ if (binding.process) {
164
+ const detected = detectBlockerType(binding.process.name, binding.process.cmd);
165
+ if (detected) {
166
+ if (detected.type === "vpn") {
167
+ blockerType = detected.type;
168
+ blockerName = detected.name;
169
+ break;
170
+ } else if (!blockerType) {
171
+ blockerType = detected.type;
172
+ blockerName = detected.name;
173
+ }
174
+ }
175
+ }
176
+ }
177
+ if (!blockerName && occupiedBindings[0].process) {
178
+ blockerName = occupiedBindings[0].process.name;
179
+ blockerType = "other";
180
+ }
181
+ if (blockerType && blockerName) {
182
+ suggestion = generateSuggestion(blockerType, blockerName, port);
183
+ }
184
+ }
185
+ return {
186
+ port,
187
+ serviceName,
188
+ bindings,
189
+ summary: {
190
+ isBlocked,
191
+ blockerType,
192
+ blockerName,
193
+ suggestion
194
+ }
195
+ };
196
+ }
197
+ function formatDiagnosis(result) {
198
+ const lines = [];
199
+ lines.push(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`);
200
+ lines.push(` Port Diagnosis: ${result.serviceName}`);
201
+ lines.push(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`);
202
+ lines.push("");
203
+ lines.push(`Port ${result.port} status:`);
204
+ lines.push("");
205
+ for (const binding of result.bindings) {
206
+ const icon = binding.status === "free" ? "\u2705" : "\u274C";
207
+ const addressDisplay = binding.address.padEnd(20);
208
+ lines.push(` ${icon} ${addressDisplay} ${binding.status.toUpperCase()}`);
209
+ if (binding.process) {
210
+ lines.push(` \u2514\u2500 ${binding.process.name} (PID ${binding.process.pid})`);
211
+ if (binding.process.cmd) {
212
+ const shortCmd = binding.process.cmd.length > 60 ? binding.process.cmd.slice(0, 57) + "..." : binding.process.cmd;
213
+ lines.push(` ${shortCmd}`);
214
+ }
215
+ }
216
+ }
217
+ lines.push("");
218
+ if (result.summary.isBlocked) {
219
+ lines.push("\u26A0\uFE0F PORT IS BLOCKED");
220
+ if (result.summary.blockerName) {
221
+ lines.push(` Blocker: ${result.summary.blockerName}`);
222
+ }
223
+ lines.push("");
224
+ if (result.summary.suggestion) {
225
+ lines.push("Suggestion:");
226
+ for (const line of result.summary.suggestion.split("\n")) {
227
+ lines.push(` ${line}`);
228
+ }
229
+ }
230
+ } else {
231
+ lines.push("\u2705 Port is free on all interfaces");
232
+ }
233
+ lines.push("");
234
+ return lines.join("\n");
235
+ }
236
+
237
+ // src/cli.ts
238
+ if (process.platform === "win32" && !process.env.WSL_DISTRO_NAME) {
239
+ console.error("\u274C DevMux requires Windows Subsystem for Linux (WSL) on Windows");
240
+ console.error(" Install WSL: https://docs.microsoft.com/en-us/windows/wsl/install");
241
+ console.error(" Then run DevMux from within your WSL environment");
242
+ process.exit(1);
243
+ }
30
244
  var ensure = defineCommand({
31
245
  meta: { name: "ensure", description: "Ensure a service is running (idempotent)" },
32
246
  args: {
@@ -131,7 +345,8 @@ var run = defineCommand({
131
345
  meta: { name: "run", description: "Run a command with services, cleanup on exit" },
132
346
  args: {
133
347
  with: { type: "string", description: "Comma-separated services to ensure", required: true },
134
- "no-stop": { type: "boolean", description: "Don't stop services on exit" }
348
+ "no-stop": { type: "boolean", description: "Don't stop services on exit" },
349
+ "no-dashboard": { type: "boolean", description: "Skip auto-launching the dashboard" }
135
350
  },
136
351
  async run({ args }) {
137
352
  const config = loadConfig();
@@ -143,7 +358,8 @@ var run = defineCommand({
143
358
  }
144
359
  const exitCode = await runWithServices(config, command, {
145
360
  services,
146
- stopOnExit: !args["no-stop"]
361
+ stopOnExit: !args["no-stop"],
362
+ dashboard: args["no-dashboard"] ? false : void 0
147
363
  });
148
364
  process.exit(exitCode);
149
365
  }
@@ -188,6 +404,28 @@ var init = defineCommand({
188
404
  console.log("Save this as devmux.config.json in your project root.");
189
405
  }
190
406
  });
407
+ var diagnose = defineCommand({
408
+ meta: { name: "diagnose", description: "Diagnose port issues for a service" },
409
+ args: {
410
+ service: { type: "positional", description: "Service name", required: true },
411
+ json: { type: "boolean", description: "Output as JSON" }
412
+ },
413
+ async run({ args }) {
414
+ const config = loadConfig();
415
+ const { getResolvedPort } = (init_loader(), __toCommonJS(loader_exports));
416
+ const port = getResolvedPort(config, args.service);
417
+ if (port === void 0) {
418
+ console.error(`\u274C No port configured for service: ${args.service}`);
419
+ process.exit(1);
420
+ }
421
+ const result = await diagnosePort(port, args.service);
422
+ if (args.json) {
423
+ console.log(JSON.stringify(result, null, 2));
424
+ return;
425
+ }
426
+ console.log(formatDiagnosis(result));
427
+ }
428
+ });
191
429
  var installSkill = defineCommand({
192
430
  meta: { name: "install-skill", description: "Install DevMux skills to .claude/skills" },
193
431
  run() {
@@ -316,7 +554,7 @@ var telemetryStart = defineCommand({
316
554
  host: { type: "string", description: "Host to bind to (default: 0.0.0.0)" }
317
555
  },
318
556
  async run({ args }) {
319
- const { startServer } = await import("./server-manager-DO25DFFW.js");
557
+ const { startServer } = await import("./server-manager-6EZWZK56.js");
320
558
  startServer({
321
559
  port: args.port ? parseInt(args.port) : void 0,
322
560
  host: args.host
@@ -326,7 +564,7 @@ var telemetryStart = defineCommand({
326
564
  var telemetryStop = defineCommand({
327
565
  meta: { name: "stop", description: "Stop the telemetry server" },
328
566
  async run() {
329
- const { stopServer } = await import("./server-manager-DO25DFFW.js");
567
+ const { stopServer } = await import("./server-manager-6EZWZK56.js");
330
568
  stopServer();
331
569
  }
332
570
  });
@@ -336,7 +574,7 @@ var telemetryStatus = defineCommand({
336
574
  json: { type: "boolean", description: "Output as JSON" }
337
575
  },
338
576
  async run({ args }) {
339
- const { getServerStatus } = await import("./server-manager-DO25DFFW.js");
577
+ const { getServerStatus } = await import("./server-manager-6EZWZK56.js");
340
578
  const status2 = getServerStatus();
341
579
  if (args.json) {
342
580
  console.log(JSON.stringify(status2, null, 2));
@@ -359,6 +597,20 @@ var telemetry = defineCommand({
359
597
  status: telemetryStatus
360
598
  }
361
599
  });
600
+ var dashboard = defineCommand({
601
+ meta: { name: "dashboard", description: "Launch web dashboard for service monitoring (experimental)" },
602
+ args: {
603
+ port: { type: "string", description: "Port to listen on (default: 9000)" },
604
+ "no-open": { type: "boolean", description: "Don't open browser automatically" }
605
+ },
606
+ async run({ args }) {
607
+ const { startDashboard } = await import("./dashboard-3GHLOSV3.js");
608
+ startDashboard({
609
+ port: args.port ? parseInt(args.port) : void 0,
610
+ open: !args["no-open"]
611
+ });
612
+ }
613
+ });
362
614
  var main = defineCommand({
363
615
  meta: {
364
616
  name: "devmux",
@@ -375,8 +627,10 @@ var main = defineCommand({
375
627
  run,
376
628
  discover,
377
629
  init,
630
+ diagnose,
378
631
  watch,
379
632
  telemetry,
633
+ dashboard,
380
634
  "install-skill": installSkill
381
635
  }
382
636
  });
@@ -0,0 +1,8 @@
1
+ import {
2
+ startDashboard
3
+ } from "./chunk-T6I3CPOV.js";
4
+ import "./chunk-ALENFKSX.js";
5
+ import "./chunk-66UOCF5R.js";
6
+ export {
7
+ startDashboard
8
+ };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Server } from 'node:http';
2
+
1
3
  type HealthCheckType = {
2
4
  type: "port";
3
5
  port: number;
@@ -37,6 +39,8 @@ interface ServiceDefinition {
37
39
  dependsOn?: string[];
38
40
  port?: number;
39
41
  watch?: ServiceWatchConfig$1;
42
+ /** Show this service in the dashboard. Defaults to true for services with a port. */
43
+ dashboard?: boolean;
40
44
  }
41
45
  interface DevMuxConfig {
42
46
  version: 1;
@@ -45,6 +49,9 @@ interface DevMuxConfig {
45
49
  defaults?: {
46
50
  startupTimeoutSeconds?: number;
47
51
  remainOnExit?: boolean;
52
+ dashboard?: boolean | {
53
+ port?: number;
54
+ };
48
55
  };
49
56
  watch?: GlobalWatchConfig$1;
50
57
  services: Record<string, ServiceDefinition>;
@@ -82,11 +89,11 @@ declare function getAllStatus(config: ResolvedConfig): Promise<ServiceStatus[]>;
82
89
  declare function stopService(config: ResolvedConfig, serviceName: string, options?: {
83
90
  killPorts?: boolean;
84
91
  quiet?: boolean;
85
- }): void;
92
+ }): Promise<void>;
86
93
  declare function stopAllServices(config: ResolvedConfig, options?: {
87
94
  killPorts?: boolean;
88
95
  quiet?: boolean;
89
- }): void;
96
+ }): Promise<void>;
90
97
  declare function restartService(config: ResolvedConfig, serviceName: string, options?: {
91
98
  timeout?: number;
92
99
  killPorts?: boolean;
@@ -98,6 +105,7 @@ interface RunOptions {
98
105
  services: string[];
99
106
  stopOnExit?: boolean;
100
107
  quiet?: boolean;
108
+ dashboard?: boolean;
101
109
  }
102
110
  declare function runWithServices(config: ResolvedConfig, command: string[], options: RunOptions): Promise<number>;
103
111
 
@@ -241,35 +249,64 @@ declare function stopAllWatchers(config: ResolvedConfig, options?: {
241
249
  quiet?: boolean;
242
250
  }): void;
243
251
 
244
- declare const index_BUILTIN_PATTERN_SETS: typeof BUILTIN_PATTERN_SETS;
245
- type index_DedupeCache = DedupeCache;
246
- declare const index_DedupeCache: typeof DedupeCache;
247
- type index_ErrorPattern = ErrorPattern;
248
- type index_GlobalWatchConfig = GlobalWatchConfig;
249
- type index_PatternMatch = PatternMatch;
250
- type index_PatternSet = PatternSet;
251
- type index_ServiceWatchConfig = ServiceWatchConfig;
252
- type index_ServiceWatchState = ServiceWatchState;
253
- type index_TriggerEvent = TriggerEvent;
254
- type index_WatcherOptions = WatcherOptions;
255
- declare const index_clearQueue: typeof clearQueue;
256
- declare const index_computeContentHash: typeof computeContentHash;
257
- declare const index_createRingBuffer: typeof createRingBuffer;
258
- declare const index_ensureOutputDir: typeof ensureOutputDir;
259
- declare const index_getAllWatcherStatuses: typeof getAllWatcherStatuses;
260
- declare const index_getPendingEvents: typeof getPendingEvents;
261
- declare const index_getQueuePath: typeof getQueuePath;
262
- declare const index_getWatcherStatus: typeof getWatcherStatus;
263
- declare const index_isStackTraceLine: typeof isStackTraceLine;
264
- declare const index_matchPatterns: typeof matchPatterns;
265
- declare const index_readQueue: typeof readQueue;
266
- declare const index_resolvePatterns: typeof resolvePatterns;
267
- declare const index_startAllWatchers: typeof startAllWatchers;
268
- declare const index_stopAllWatchers: typeof stopAllWatchers;
269
- declare const index_updateEventStatus: typeof updateEventStatus;
270
- declare const index_writeEvent: typeof writeEvent;
252
+ declare const index$1_BUILTIN_PATTERN_SETS: typeof BUILTIN_PATTERN_SETS;
253
+ type index$1_DedupeCache = DedupeCache;
254
+ declare const index$1_DedupeCache: typeof DedupeCache;
255
+ type index$1_ErrorPattern = ErrorPattern;
256
+ type index$1_GlobalWatchConfig = GlobalWatchConfig;
257
+ type index$1_PatternMatch = PatternMatch;
258
+ type index$1_PatternSet = PatternSet;
259
+ type index$1_ServiceWatchConfig = ServiceWatchConfig;
260
+ type index$1_ServiceWatchState = ServiceWatchState;
261
+ type index$1_TriggerEvent = TriggerEvent;
262
+ type index$1_WatcherOptions = WatcherOptions;
263
+ declare const index$1_clearQueue: typeof clearQueue;
264
+ declare const index$1_computeContentHash: typeof computeContentHash;
265
+ declare const index$1_createRingBuffer: typeof createRingBuffer;
266
+ declare const index$1_ensureOutputDir: typeof ensureOutputDir;
267
+ declare const index$1_getAllWatcherStatuses: typeof getAllWatcherStatuses;
268
+ declare const index$1_getPendingEvents: typeof getPendingEvents;
269
+ declare const index$1_getQueuePath: typeof getQueuePath;
270
+ declare const index$1_getWatcherStatus: typeof getWatcherStatus;
271
+ declare const index$1_isStackTraceLine: typeof isStackTraceLine;
272
+ declare const index$1_matchPatterns: typeof matchPatterns;
273
+ declare const index$1_readQueue: typeof readQueue;
274
+ declare const index$1_resolvePatterns: typeof resolvePatterns;
275
+ declare const index$1_startAllWatchers: typeof startAllWatchers;
276
+ declare const index$1_stopAllWatchers: typeof stopAllWatchers;
277
+ declare const index$1_updateEventStatus: typeof updateEventStatus;
278
+ declare const index$1_writeEvent: typeof writeEvent;
279
+ declare namespace index$1 {
280
+ export { index$1_BUILTIN_PATTERN_SETS as BUILTIN_PATTERN_SETS, index$1_DedupeCache as DedupeCache, type index$1_ErrorPattern as ErrorPattern, type index$1_GlobalWatchConfig as GlobalWatchConfig, type index$1_PatternMatch as PatternMatch, type index$1_PatternSet as PatternSet, type index$1_ServiceWatchConfig as ServiceWatchConfig, type index$1_ServiceWatchState as ServiceWatchState, type index$1_TriggerEvent as TriggerEvent, type index$1_WatcherOptions as WatcherOptions, index$1_clearQueue as clearQueue, index$1_computeContentHash as computeContentHash, index$1_createRingBuffer as createRingBuffer, index$1_ensureOutputDir as ensureOutputDir, index$1_getAllWatcherStatuses as getAllWatcherStatuses, index$1_getPendingEvents as getPendingEvents, index$1_getQueuePath as getQueuePath, index$1_getWatcherStatus as getWatcherStatus, index$1_isStackTraceLine as isStackTraceLine, index$1_matchPatterns as matchPatterns, index$1_readQueue as readQueue, index$1_resolvePatterns as resolvePatterns, index$1_startAllWatchers as startAllWatchers, startWatcher as startServiceWatcher, startWatcher$1 as startWatcher, index$1_stopAllWatchers as stopAllWatchers, stopWatcher as stopServiceWatcher, index$1_updateEventStatus as updateEventStatus, index$1_writeEvent as writeEvent };
281
+ }
282
+
283
+ interface DashboardOptions {
284
+ port?: number;
285
+ open?: boolean;
286
+ }
287
+ declare function startDashboard(options?: DashboardOptions): Server;
288
+
289
+ interface DashboardService {
290
+ name: string;
291
+ healthy: boolean;
292
+ port?: number;
293
+ resolvedPort?: number;
294
+ hasHealthCheck: boolean;
295
+ }
296
+ interface DashboardData {
297
+ project: string;
298
+ instanceId: string;
299
+ configPath: string;
300
+ dashboardPort: number;
301
+ services: DashboardService[];
302
+ }
303
+
304
+ type index_DashboardData = DashboardData;
305
+ type index_DashboardOptions = DashboardOptions;
306
+ type index_DashboardService = DashboardService;
307
+ declare const index_startDashboard: typeof startDashboard;
271
308
  declare namespace index {
272
- export { index_BUILTIN_PATTERN_SETS as BUILTIN_PATTERN_SETS, index_DedupeCache as DedupeCache, type index_ErrorPattern as ErrorPattern, type index_GlobalWatchConfig as GlobalWatchConfig, type index_PatternMatch as PatternMatch, type index_PatternSet as PatternSet, type index_ServiceWatchConfig as ServiceWatchConfig, type index_ServiceWatchState as ServiceWatchState, type index_TriggerEvent as TriggerEvent, type index_WatcherOptions as WatcherOptions, index_clearQueue as clearQueue, index_computeContentHash as computeContentHash, index_createRingBuffer as createRingBuffer, index_ensureOutputDir as ensureOutputDir, index_getAllWatcherStatuses as getAllWatcherStatuses, index_getPendingEvents as getPendingEvents, index_getQueuePath as getQueuePath, index_getWatcherStatus as getWatcherStatus, index_isStackTraceLine as isStackTraceLine, index_matchPatterns as matchPatterns, index_readQueue as readQueue, index_resolvePatterns as resolvePatterns, index_startAllWatchers as startAllWatchers, startWatcher as startServiceWatcher, startWatcher$1 as startWatcher, index_stopAllWatchers as stopAllWatchers, stopWatcher as stopServiceWatcher, index_updateEventStatus as updateEventStatus, index_writeEvent as writeEvent };
309
+ export { type index_DashboardData as DashboardData, type index_DashboardOptions as DashboardOptions, type index_DashboardService as DashboardService, index_startDashboard as startDashboard };
273
310
  }
274
311
 
275
- export { type DevMuxConfig, type EnsureResult, type HealthCheckType, type ResolvedConfig, type RunOptions, type ServiceDefinition, type ServiceStatus, attachService, discoverFromTurbo, ensureService, formatDiscoveredConfig, getAllStatus, getServiceCwd, getSessionName, getStatus, checkers as health, loadConfig, restartService, runWithServices, stopAllServices, stopService, driver as tmux, index as watch };
312
+ export { type DevMuxConfig, type EnsureResult, type HealthCheckType, type ResolvedConfig, type RunOptions, type ServiceDefinition, type ServiceStatus, attachService, index as dashboard, discoverFromTurbo, ensureService, formatDiscoveredConfig, getAllStatus, getServiceCwd, getSessionName, getStatus, checkers as health, loadConfig, restartService, runWithServices, stopAllServices, stopService, driver as tmux, index$1 as watch };
package/dist/index.js CHANGED
@@ -1,25 +1,38 @@
1
+ import {
2
+ discoverFromTurbo,
3
+ formatDiscoveredConfig,
4
+ runWithServices,
5
+ watch_exports
6
+ } from "./chunk-6EU6ODXX.js";
7
+ import "./chunk-32R7KDZB.js";
8
+ import {
9
+ dashboard_exports
10
+ } from "./chunk-T6I3CPOV.js";
1
11
  import {
2
12
  attachService,
3
13
  checkers_exports,
4
- discoverFromTurbo,
5
14
  driver_exports,
6
15
  ensureService,
7
- formatDiscoveredConfig,
8
16
  getAllStatus,
9
17
  getServiceCwd,
10
18
  getSessionName,
11
19
  getStatus,
20
+ init_loader,
12
21
  loadConfig,
13
22
  restartService,
14
- runWithServices,
15
23
  stopAllServices,
16
- stopService,
17
- watch_exports
18
- } from "./chunk-FVUGZCQ3.js";
19
- import "./chunk-JDD6USSA.js";
20
- import "./chunk-MLKGABMK.js";
24
+ stopService
25
+ } from "./chunk-ALENFKSX.js";
26
+ import {
27
+ init_esm_shims
28
+ } from "./chunk-66UOCF5R.js";
29
+
30
+ // src/index.ts
31
+ init_esm_shims();
32
+ init_loader();
21
33
  export {
22
34
  attachService,
35
+ dashboard_exports as dashboard,
23
36
  discoverFromTurbo,
24
37
  ensureService,
25
38
  formatDiscoveredConfig,
@@ -1,8 +1,11 @@
1
- import "./chunk-MLKGABMK.js";
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-66UOCF5R.js";
2
4
 
3
5
  // src/telemetry/server-manager.ts
4
- import { spawn, execSync } from "child_process";
5
- import { existsSync, readFileSync, writeFileSync, unlinkSync } from "fs";
6
+ init_esm_shims();
7
+ import { spawn } from "child_process";
8
+ import { existsSync, readFileSync, writeFileSync, unlinkSync, mkdirSync } from "fs";
6
9
  import { join } from "path";
7
10
  var PID_FILE = join(process.env.HOME ?? "~", ".opencode", "telemetry-server.pid");
8
11
  var DEFAULT_PORT = 9876;
@@ -26,7 +29,7 @@ function getPid() {
26
29
  function savePid(pid) {
27
30
  const dir = join(process.env.HOME ?? "~", ".opencode");
28
31
  if (!existsSync(dir)) {
29
- execSync(`mkdir -p "${dir}"`);
32
+ mkdirSync(dir, { recursive: true });
30
33
  }
31
34
  writeFileSync(PID_FILE, String(pid));
32
35
  }
@@ -1,10 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startWatcher
4
- } from "../chunk-JDD6USSA.js";
5
- import "../chunk-MLKGABMK.js";
4
+ } from "../chunk-32R7KDZB.js";
5
+ import {
6
+ init_esm_shims
7
+ } from "../chunk-66UOCF5R.js";
6
8
 
7
9
  // src/watch/watcher-cli.ts
10
+ init_esm_shims();
8
11
  function parseArgs() {
9
12
  const args = process.argv.slice(2);
10
13
  const options2 = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chriscode/devmux",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "tmux-based service management for monorepos with human-agent shared awareness",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,11 @@
45
45
  "node": ">=18"
46
46
  },
47
47
  "dependencies": {
48
- "citty": "^0.1.6"
48
+ "citty": "^0.1.6",
49
+ "execa": "^9.6.1",
50
+ "fkill": "^10.0.3",
51
+ "pid-port": "^2.0.1",
52
+ "ps-list": "^9.0.0"
49
53
  },
50
54
  "devDependencies": {
51
55
  "@types/node": "^20.0.0",
@@ -1,9 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- export {
8
- __export
9
- };