@spfn/core 0.1.0-alpha.85 → 0.1.0-alpha.88

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.
@@ -130,7 +130,18 @@ function formatConsole(metadata, colorize = true) {
130
130
  }
131
131
  if (metadata.context && Object.keys(metadata.context).length > 0) {
132
132
  Object.entries(metadata.context).forEach(([key, value]) => {
133
- const valueStr = typeof value === "string" ? value : String(value);
133
+ let valueStr;
134
+ if (typeof value === "string") {
135
+ valueStr = value;
136
+ } else if (typeof value === "object" && value !== null) {
137
+ try {
138
+ valueStr = JSON.stringify(value);
139
+ } catch (error) {
140
+ valueStr = "[circular]";
141
+ }
142
+ } else {
143
+ valueStr = String(value);
144
+ }
134
145
  if (colorize) {
135
146
  parts.push(`${COLORS.dim}[${key}=${valueStr}]${COLORS.reset}`);
136
147
  } else {