@trops/dash-core 0.1.60 → 0.1.61

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.
@@ -5436,12 +5436,28 @@ const mcpController$2 = {
5436
5436
  );
5437
5437
  }
5438
5438
 
5439
+ // Merge static env vars from authCommand (e.g., AUTH_SERVER_PORT)
5440
+ if (authCommand.env) {
5441
+ Object.entries(authCommand.env).forEach(([key, value]) => {
5442
+ env[key] = value;
5443
+ });
5444
+ }
5445
+
5439
5446
  return new Promise((resolve) => {
5440
5447
  const proc = spawn(authCommand.command, authCommand.args || [], {
5441
5448
  env,
5442
5449
  stdio: ["ignore", "pipe", "pipe"],
5443
5450
  });
5444
5451
 
5452
+ let stdout = "";
5453
+ let stderr = "";
5454
+ proc.stdout.on("data", (data) => {
5455
+ stdout += data.toString();
5456
+ });
5457
+ proc.stderr.on("data", (data) => {
5458
+ stderr += data.toString();
5459
+ });
5460
+
5445
5461
  const timeout = setTimeout(() => {
5446
5462
  proc.kill();
5447
5463
  resolve({ error: true, message: "Auth timed out (120s)" });
@@ -5449,11 +5465,15 @@ const mcpController$2 = {
5449
5465
 
5450
5466
  proc.on("close", (code) => {
5451
5467
  clearTimeout(timeout);
5452
- resolve(
5453
- code === 0
5454
- ? { success: true }
5455
- : { error: true, message: `Auth exited with code ${code}` },
5456
- );
5468
+ if (code === 0) {
5469
+ resolve({ success: true });
5470
+ } else {
5471
+ const detail = stderr.trim() || stdout.trim() || "";
5472
+ resolve({
5473
+ error: true,
5474
+ message: `Auth exited with code ${code}${detail ? ": " + detail : ""}`,
5475
+ });
5476
+ }
5457
5477
  });
5458
5478
 
5459
5479
  proc.on("error", (err) => {