starknet 10.7.5 → 10.7.6

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/index.mjs CHANGED
@@ -508,14 +508,16 @@ var Logger = class _Logger {
508
508
  }
509
509
  formatMessage(logMessage) {
510
510
  const { level, message, timestamp, data } = logMessage;
511
- let formattedMessage = `[${timestamp}] ${level}: ${message}`;
511
+ const sanitizedMessage = String(message).replace(/[\r\n]/g, "");
512
+ let formattedMessage = `[${timestamp}] ${level}: ${sanitizedMessage}`;
512
513
  if (data) {
513
514
  try {
514
515
  formattedMessage += `
515
516
  ${JSON.stringify(data, null, 2)}`;
516
517
  } catch (error) {
518
+ const sanitizedError = String(error).replace(/[\r\n]/g, "");
517
519
  formattedMessage += `
518
- [JSON.stringify Error/Circular]: ${error}`;
520
+ [JSON.stringify Error/Circular]: ${sanitizedError}`;
519
521
  }
520
522
  }
521
523
  return formattedMessage;