@alcyone-labs/arg-parser 2.4.0 → 2.4.2

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.
@@ -14,7 +14,7 @@ import { createMcpLogger as Vr } from "@alcyone-labs/simple-mcp-logger";
14
14
  import { Logger as Ld, createCliLogger as Bd, createMcpLogger as qd, logger as kd } from "@alcyone-labs/simple-mcp-logger";
15
15
  import ls from "node:process";
16
16
  import { randomUUID as ei } from "node:crypto";
17
- import { URL as hl } from "node:url";
17
+ import { URL as hl } from "url";
18
18
  const pl = "\x1B[0m", ml = "\x1B[1m", gl = "\x1B[2m", vl = "\x1B[4m", yl = "\x1B[30m", bl = "\x1B[31m", wl = "\x1B[32m", El = "\x1B[33m", Sl = "\x1B[34m", Pl = "\x1B[35m", cs = "\x1B[36m", _l = "\x1B[37m", us = "\x1B[90m";
19
19
  function xl() {
20
20
  if (typeof globalThis.window < "u" && typeof globalThis.document < "u")
@@ -3526,7 +3526,7 @@ oi = function(e, t) {
3526
3526
  Be.log("Transport options parsed:", JSON.stringify(a));
3527
3527
  const r = ye(this, he, ui).call(this);
3528
3528
  Be.log("Got MCP server config:", JSON.stringify(r));
3529
- const s = a.logPath || (r == null ? void 0 : r.logPath) || "./logs/mcp.log";
3529
+ const s = a.logPath || (r != null && r.log && typeof r.log == "object" ? r.log.logToFile : null) || (r == null ? void 0 : r.logPath) || "./logs/mcp.log";
3530
3530
  Be.log("Effective log path:", s);
3531
3531
  const o = Cr(s);
3532
3532
  Be.log("Resolved log path:", o);
@@ -3592,7 +3592,7 @@ oi = function(e, t) {
3592
3592
  }, /**
3593
3593
  * Resolve logger configuration for MCP serve with proper priority
3594
3594
  * @param mcpServerConfig MCP server configuration
3595
- * @param resolvedLogPath Resolved log path from CLI flags
3595
+ * @param resolvedLogPath Resolved log path from CLI flags and config priority
3596
3596
  * @returns Logger configuration object or string path
3597
3597
  */
3598
3598
  ci = function(e, t) {
@@ -3608,7 +3608,7 @@ ci = function(e, t) {
3608
3608
  // Default level for backward compatibility
3609
3609
  mcpMode: !0,
3610
3610
  ...e.log,
3611
- // Use CLI-resolved path if available, otherwise use config path
3611
+ // Use the resolved path which respects the proper priority order
3612
3612
  logToFile: t
3613
3613
  } : t;
3614
3614
  }, /**
@@ -4805,9 +4805,13 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
4805
4805
  skipHandlerExecution: !0,
4806
4806
  isMcp: !0
4807
4807
  }), A = (M == null ? void 0 : M.args) || M || {};
4808
- S.setParsedArgs(A), o.mcpError(`Lifecycle manager initialized with parsed args: ${Object.keys(A).join(", ")}`);
4808
+ S.setParsedArgs(A), o.mcpError(
4809
+ `Lifecycle manager initialized with parsed args: ${Object.keys(A).join(", ")}`
4810
+ );
4809
4811
  } catch (T) {
4810
- o.mcpError(`Warning: Could not parse arguments for lifecycle manager: ${T instanceof Error ? T.message : String(T)}`);
4812
+ o.mcpError(
4813
+ `Warning: Could not parse arguments for lifecycle manager: ${T instanceof Error ? T.message : String(T)}`
4814
+ );
4811
4815
  }
4812
4816
  const _ = u.connect.bind(u);
4813
4817
  u.connect = async (T) => {