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.js CHANGED
@@ -693,14 +693,16 @@ var Logger = class _Logger {
693
693
  }
694
694
  formatMessage(logMessage) {
695
695
  const { level, message, timestamp, data } = logMessage;
696
- let formattedMessage = `[${timestamp}] ${level}: ${message}`;
696
+ const sanitizedMessage = String(message).replace(/[\r\n]/g, "");
697
+ let formattedMessage = `[${timestamp}] ${level}: ${sanitizedMessage}`;
697
698
  if (data) {
698
699
  try {
699
700
  formattedMessage += `
700
701
  ${JSON.stringify(data, null, 2)}`;
701
702
  } catch (error) {
703
+ const sanitizedError = String(error).replace(/[\r\n]/g, "");
702
704
  formattedMessage += `
703
- [JSON.stringify Error/Circular]: ${error}`;
705
+ [JSON.stringify Error/Circular]: ${sanitizedError}`;
704
706
  }
705
707
  }
706
708
  return formattedMessage;