@strkfarm/sdk 2.0.0-staging.5 → 2.0.0-staging.50

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
@@ -91,9 +91,10 @@ var colors = {
91
91
  debug: "white"
92
92
  };
93
93
  import_winston.default.addColors(colors);
94
+ var logLevel = (process.env.LOG_LEVEL || process.env.SDK_LOG_LEVEL || "debug").toLowerCase();
94
95
  var logger = import_winston.default.createLogger({
95
- level: "debug",
96
- // Set the minimum logging level
96
+ level: logLevel,
97
+ // Set the minimum logging level from environment variable
97
98
  format: import_winston.format.combine(
98
99
  import_winston.format.colorize({ all: true }),
99
100
  // Apply custom colors
@@ -101,11 +102,14 @@ var logger = import_winston.default.createLogger({
101
102
  // Add timestamp to log messages
102
103
  import_winston.format.printf(({ timestamp, level, message, ...meta }) => {
103
104
  let msg = `${timestamp} ${level}: ${message}`;
104
- if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
105
- for (const arg of meta[/* @__PURE__ */ Symbol.for("splat")]) {
106
- if (arg instanceof Error) {
107
- msg += `
105
+ if (meta && meta[Symbol.for("splat")]) {
106
+ const splat = meta[Symbol.for("splat")];
107
+ if (Array.isArray(splat)) {
108
+ for (const arg of splat) {
109
+ if (arg instanceof Error) {
110
+ msg += `
108
111
  ${arg.stack}`;
112
+ }
109
113
  }
110
114
  }
111
115
  }
package/dist/cli.mjs CHANGED
@@ -68,9 +68,10 @@ var colors = {
68
68
  debug: "white"
69
69
  };
70
70
  winston.addColors(colors);
71
+ var logLevel = (process.env.LOG_LEVEL || process.env.SDK_LOG_LEVEL || "debug").toLowerCase();
71
72
  var logger = winston.createLogger({
72
- level: "debug",
73
- // Set the minimum logging level
73
+ level: logLevel,
74
+ // Set the minimum logging level from environment variable
74
75
  format: format.combine(
75
76
  format.colorize({ all: true }),
76
77
  // Apply custom colors
@@ -78,11 +79,14 @@ var logger = winston.createLogger({
78
79
  // Add timestamp to log messages
79
80
  format.printf(({ timestamp, level, message, ...meta }) => {
80
81
  let msg = `${timestamp} ${level}: ${message}`;
81
- if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
82
- for (const arg of meta[/* @__PURE__ */ Symbol.for("splat")]) {
83
- if (arg instanceof Error) {
84
- msg += `
82
+ if (meta && meta[Symbol.for("splat")]) {
83
+ const splat = meta[Symbol.for("splat")];
84
+ if (Array.isArray(splat)) {
85
+ for (const arg of splat) {
86
+ if (arg instanceof Error) {
87
+ msg += `
85
88
  ${arg.stack}`;
89
+ }
86
90
  }
87
91
  }
88
92
  }