@ledgerhq/device-management-kit 0.0.0-develop-20260126001121 → 0.0.0-develop-20260127115907

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.
Files changed (62) hide show
  1. package/lib/cjs/package.json +1 -1
  2. package/lib/cjs/src/api/index.js +1 -1
  3. package/lib/cjs/src/api/index.js.map +3 -3
  4. package/lib/cjs/src/api/logger-subscriber/model/LogSubscriberOptions.js +1 -1
  5. package/lib/cjs/src/api/logger-subscriber/model/LogSubscriberOptions.js.map +1 -1
  6. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js +1 -1
  7. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.js.map +2 -2
  8. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  9. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  10. package/lib/cjs/src/api/logger-subscriber/service/DefaultLogTagFormatter.js +2 -0
  11. package/lib/cjs/src/api/logger-subscriber/service/DefaultLogTagFormatter.js.map +7 -0
  12. package/lib/cjs/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.js +2 -0
  13. package/lib/cjs/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.js.map +7 -0
  14. package/lib/cjs/src/api/logger-subscriber/service/LogTagFormatter.js +2 -0
  15. package/lib/cjs/src/api/logger-subscriber/service/LogTagFormatter.js.map +7 -0
  16. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js +1 -1
  17. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js.map +3 -3
  18. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  19. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +3 -3
  20. package/lib/cjs/src/internal/logger-publisher/service/sanitiseData.js +2 -0
  21. package/lib/cjs/src/internal/logger-publisher/service/sanitiseData.js.map +7 -0
  22. package/lib/cjs/src/internal/logger-publisher/service/sanitiseData.test.js +2 -0
  23. package/lib/cjs/src/internal/logger-publisher/service/sanitiseData.test.js.map +7 -0
  24. package/lib/esm/package.json +1 -1
  25. package/lib/esm/src/api/index.js +1 -1
  26. package/lib/esm/src/api/index.js.map +3 -3
  27. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js +1 -1
  28. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.js.map +2 -2
  29. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  30. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  31. package/lib/esm/src/api/logger-subscriber/service/DefaultLogTagFormatter.js +2 -0
  32. package/lib/esm/src/api/logger-subscriber/service/DefaultLogTagFormatter.js.map +7 -0
  33. package/lib/esm/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.js +2 -0
  34. package/lib/esm/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.js.map +7 -0
  35. package/lib/esm/src/api/logger-subscriber/service/LogTagFormatter.js +1 -0
  36. package/lib/esm/src/api/logger-subscriber/service/LogTagFormatter.js.map +7 -0
  37. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js +1 -1
  38. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.js.map +3 -3
  39. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  40. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +3 -3
  41. package/lib/esm/src/internal/logger-publisher/service/sanitiseData.js +2 -0
  42. package/lib/esm/src/internal/logger-publisher/service/sanitiseData.js.map +7 -0
  43. package/lib/esm/src/internal/logger-publisher/service/sanitiseData.test.js +2 -0
  44. package/lib/esm/src/internal/logger-publisher/service/sanitiseData.test.js.map +7 -0
  45. package/lib/types/src/api/index.d.ts +2 -0
  46. package/lib/types/src/api/index.d.ts.map +1 -1
  47. package/lib/types/src/api/logger-subscriber/model/LogSubscriberOptions.d.ts +1 -0
  48. package/lib/types/src/api/logger-subscriber/model/LogSubscriberOptions.d.ts.map +1 -1
  49. package/lib/types/src/api/logger-subscriber/service/DefaultLogTagFormatter.d.ts +10 -0
  50. package/lib/types/src/api/logger-subscriber/service/DefaultLogTagFormatter.d.ts.map +1 -0
  51. package/lib/types/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.d.ts +2 -0
  52. package/lib/types/src/api/logger-subscriber/service/DefaultLogTagFormatter.test.d.ts.map +1 -0
  53. package/lib/types/src/api/logger-subscriber/service/LogTagFormatter.d.ts +9 -0
  54. package/lib/types/src/api/logger-subscriber/service/LogTagFormatter.d.ts.map +1 -0
  55. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.d.ts +5 -2
  56. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.d.ts.map +1 -1
  57. package/lib/types/src/internal/logger-publisher/service/sanitiseData.d.ts +6 -0
  58. package/lib/types/src/internal/logger-publisher/service/sanitiseData.d.ts.map +1 -0
  59. package/lib/types/src/internal/logger-publisher/service/sanitiseData.test.d.ts +2 -0
  60. package/lib/types/src/internal/logger-publisher/service/sanitiseData.test.d.ts.map +1 -0
  61. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  62. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/index.ts"],
4
- "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
- "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2CAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCACh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AS,8BAAAC,OAAkC,kCAC3C,WAAc,aACd,OAAS,YAAAC,OAAgB,wCACzB,OAAS,iBAAAC,OAAqB,+CAC9B,OAAS,yBAAAC,OAA6B,uDACtC,OAAS,mBAAAC,OAAuB,uCAChC,OACE,gCAAAC,OAEK,oDACP,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,yBAAAC,GAAuB,qBAAAC,OAAyB,sBACzD,OAAS,wBAAAC,GAAsB,kBAAAC,OAAsB,0BACrD,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
6
- "names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "AppAlreadyInstalledDAError", "DeviceLockedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "LogLevel", "ConsoleLogger", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
4
+ "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport {\n InvalidGetFirmwareMetadataResponseError,\n InvalidStatusWordError,\n} from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n UnknownDAError,\n UnsupportedFirmwareDAError,\n} from \"@api/device-action/os/Errors\";\nexport { GetDeviceMetadataDeviceAction } from \"@api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { InstallOrUpdateAppsDeviceAction } from \"@api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { OpenAppWithDependenciesDeviceAction } from \"@api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\nexport { GenuineCheckDeviceAction } from \"@api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction\";\nexport { InstallAppDeviceAction } from \"@api/secure-channel/device-action/InstallApp/InstallAppDeviceAction\";\nexport { ListInstalledAppsDeviceAction } from \"@api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction\";\nexport { UninstallAppDeviceAction } from \"@api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction\";\nexport { SecureChannelError } from \"@internal/secure-channel/model/Errors\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nexport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport {\n DeviceConnectionStateMachine,\n type DeviceConnectionStateMachineParams,\n} from \"@api/transport/model/DeviceConnectionStateMachine\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { formatApduReceivedLog, formatApduSentLog } from \"@api/utils/apduLogs\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
+ "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2CAAAC,EACA,0BAAAC,MACK,sBACP,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,0BAAAC,MAEK,yCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,MACK,6CACP,OAAS,2BAAAC,MAA+B,mDACxC,OAAS,6BAAAC,MAAiC,4EAC1C,OACE,8BAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,wBAAAC,GAC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teArrayBuilder", "ByteArrayParser", "InvalidGetFirmwareMetadataResponseError", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "AppAlreadyInstalledDAError", "DeviceLockedError", "OutOfMemoryDAError", "RefusedByUserDAError", "UnknownDAError", "UnsupportedFirmwareDAError", "GetDeviceMetadataDeviceAction", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "InstallOrUpdateAppsDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "OpenAppWithDependenciesDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "GenuineCheckDeviceAction", "InstallAppDeviceAction", "ListInstalledAppsDeviceAction", "UninstallAppDeviceAction", "SecureChannelError", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "LogLevel", "ConsoleLogger", "DefaultLogTagFormatter", "WebLogsExporterLogger", "ConnectedDevice", "DeviceConnectionStateMachine", "TransportConnectedDevice", "connectedDeviceStubBuilder", "formatApduReceivedLog", "formatApduSentLog", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{LogLevel as e}from"../../logger-subscriber/model/LogLevel";class g{maxLevel;constructor(t=e.Debug){this.maxLevel=t}log(t,a,r){const i=`[${r.tag}]`;switch(t){case e.Info:{this.maxLevel>=e.Info&&this.logWithData(i,console.info,a,r);break}case e.Warning:{this.maxLevel>=e.Warning&&this.logWithData(i,console.warn,a,r);break}case e.Debug:{this.maxLevel>=e.Debug&&this.logWithData(i,console.debug,a,r);break}case e.Error:{this.maxLevel>=e.Error&&this.logWithData(i,console.error,a,r);break}case e.Fatal:{this.maxLevel>=e.Fatal&&this.logWithData(i,console.error,a,r);break}default:this.logWithData(i,console.log,a,r)}}logWithData(t,a,r,i){i.data?a(t,r,i.data):a(t,r)}}export{g as ConsoleLogger};
1
+ import{LogLevel as e}from"../../logger-subscriber/model/LogLevel";class g{maxLevel;constructor(t=e.Debug){this.maxLevel=t}log(t,a,r){const i=r.tag;switch(t){case e.Info:{this.maxLevel>=e.Info&&this.logWithData(i,console.info,a,r);break}case e.Warning:{this.maxLevel>=e.Warning&&this.logWithData(i,console.warn,a,r);break}case e.Debug:{this.maxLevel>=e.Debug&&this.logWithData(i,console.debug,a,r);break}case e.Error:{this.maxLevel>=e.Error&&this.logWithData(i,console.error,a,r);break}case e.Fatal:{this.maxLevel>=e.Fatal&&this.logWithData(i,console.error,a,r);break}default:this.logWithData(i,console.log,a,r)}}logWithData(t,a,r,i){i.data?a(t,r,i.data):a(t,r)}}export{g as ConsoleLogger};
2
2
  //# sourceMappingURL=ConsoleLogger.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/ConsoleLogger.ts"],
4
- "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\n\nexport class ConsoleLogger implements LoggerSubscriberService {\n private readonly maxLevel: LogLevel;\n\n constructor(level: LogLevel = LogLevel.Debug) {\n this.maxLevel = level;\n }\n\n log(\n level: LogLevel | null,\n message: string,\n options: LogSubscriberOptions,\n ): void {\n const tag = `[${options.tag}]`;\n\n switch (level) {\n case LogLevel.Info: {\n if (this.maxLevel >= LogLevel.Info) {\n this.logWithData(tag, console.info, message, options);\n }\n break;\n }\n case LogLevel.Warning: {\n if (this.maxLevel >= LogLevel.Warning) {\n this.logWithData(tag, console.warn, message, options);\n }\n break;\n }\n case LogLevel.Debug: {\n if (this.maxLevel >= LogLevel.Debug) {\n this.logWithData(tag, console.debug, message, options);\n }\n break;\n }\n case LogLevel.Error: {\n if (this.maxLevel >= LogLevel.Error) {\n this.logWithData(tag, console.error, message, options);\n }\n break;\n }\n case LogLevel.Fatal: {\n if (this.maxLevel >= LogLevel.Fatal) {\n this.logWithData(tag, console.error, message, options);\n }\n break;\n }\n default:\n this.logWithData(tag, console.log, message, options);\n }\n }\n\n private logWithData(\n tag: string,\n logFunction: (...args: unknown[]) => void,\n message: string,\n options: LogSubscriberOptions,\n ): void {\n if (options.data) {\n logFunction(tag, message, options.data);\n } else {\n logFunction(tag, message);\n }\n }\n}\n"],
5
- "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAIlB,MAAMC,CAAiD,CAC3C,SAEjB,YAAYC,EAAkBF,EAAS,MAAO,CAC5C,KAAK,SAAWE,CAClB,CAEA,IACEA,EACAC,EACAC,EACM,CACN,MAAMC,EAAM,IAAID,EAAQ,GAAG,IAE3B,OAAQF,EAAO,CACb,KAAKF,EAAS,KAAM,CACd,KAAK,UAAYA,EAAS,MAC5B,KAAK,YAAYK,EAAK,QAAQ,KAAMF,EAASC,CAAO,EAEtD,KACF,CACA,KAAKJ,EAAS,QAAS,CACjB,KAAK,UAAYA,EAAS,SAC5B,KAAK,YAAYK,EAAK,QAAQ,KAAMF,EAASC,CAAO,EAEtD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,QACE,KAAK,YAAYC,EAAK,QAAQ,IAAKF,EAASC,CAAO,CACvD,CACF,CAEQ,YACNC,EACAC,EACAH,EACAC,EACM,CACFA,EAAQ,KACVE,EAAYD,EAAKF,EAASC,EAAQ,IAAI,EAEtCE,EAAYD,EAAKF,CAAO,CAE5B,CACF",
4
+ "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\n\nexport class ConsoleLogger implements LoggerSubscriberService {\n private readonly maxLevel: LogLevel;\n\n constructor(level: LogLevel = LogLevel.Debug) {\n this.maxLevel = level;\n }\n\n log(\n level: LogLevel | null,\n message: string,\n options: LogSubscriberOptions,\n ): void {\n const tag = options.tag;\n\n switch (level) {\n case LogLevel.Info: {\n if (this.maxLevel >= LogLevel.Info) {\n this.logWithData(tag, console.info, message, options);\n }\n break;\n }\n case LogLevel.Warning: {\n if (this.maxLevel >= LogLevel.Warning) {\n this.logWithData(tag, console.warn, message, options);\n }\n break;\n }\n case LogLevel.Debug: {\n if (this.maxLevel >= LogLevel.Debug) {\n this.logWithData(tag, console.debug, message, options);\n }\n break;\n }\n case LogLevel.Error: {\n if (this.maxLevel >= LogLevel.Error) {\n this.logWithData(tag, console.error, message, options);\n }\n break;\n }\n case LogLevel.Fatal: {\n if (this.maxLevel >= LogLevel.Fatal) {\n this.logWithData(tag, console.error, message, options);\n }\n break;\n }\n default:\n this.logWithData(tag, console.log, message, options);\n }\n }\n\n private logWithData(\n tag: string,\n logFunction: (...args: unknown[]) => void,\n message: string,\n options: LogSubscriberOptions,\n ): void {\n if (options.data) {\n logFunction(tag, message, options.data);\n } else {\n logFunction(tag, message);\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAIlB,MAAMC,CAAiD,CAC3C,SAEjB,YAAYC,EAAkBF,EAAS,MAAO,CAC5C,KAAK,SAAWE,CAClB,CAEA,IACEA,EACAC,EACAC,EACM,CACN,MAAMC,EAAMD,EAAQ,IAEpB,OAAQF,EAAO,CACb,KAAKF,EAAS,KAAM,CACd,KAAK,UAAYA,EAAS,MAC5B,KAAK,YAAYK,EAAK,QAAQ,KAAMF,EAASC,CAAO,EAEtD,KACF,CACA,KAAKJ,EAAS,QAAS,CACjB,KAAK,UAAYA,EAAS,SAC5B,KAAK,YAAYK,EAAK,QAAQ,KAAMF,EAASC,CAAO,EAEtD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,KAAKJ,EAAS,MAAO,CACf,KAAK,UAAYA,EAAS,OAC5B,KAAK,YAAYK,EAAK,QAAQ,MAAOF,EAASC,CAAO,EAEvD,KACF,CACA,QACE,KAAK,YAAYC,EAAK,QAAQ,IAAKF,EAASC,CAAO,CACvD,CACF,CAEQ,YACNC,EACAC,EACAH,EACAC,EACM,CACFA,EAAQ,KACVE,EAAYD,EAAKF,EAASC,EAAQ,IAAI,EAEtCE,EAAYD,EAAKF,CAAO,CAE5B,CACF",
6
6
  "names": ["LogLevel", "ConsoleLogger", "level", "message", "options", "tag", "logFunction"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as i}from"./ConsoleLogger";const d=vi.spyOn(console,"warn").mockImplementation(vi.fn()),n=vi.spyOn(console,"info").mockImplementation(vi.fn()),r=vi.spyOn(console,"debug").mockImplementation(vi.fn()),a=vi.spyOn(console,"error").mockImplementation(vi.fn()),s=vi.spyOn(console,"log").mockImplementation(vi.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"tag"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{vi.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
1
+ import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as i}from"./ConsoleLogger";const d=vi.spyOn(console,"warn").mockImplementation(vi.fn()),n=vi.spyOn(console,"info").mockImplementation(vi.fn()),r=vi.spyOn(console,"debug").mockImplementation(vi.fn()),a=vi.spyOn(console,"error").mockImplementation(vi.fn()),s=vi.spyOn(console,"log").mockImplementation(vi.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"[tag]"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{vi.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="[custom-tag]";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(g,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="[custom-tag]";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(g,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(e.tag,l,e.data)})})})});
2
2
  //# sourceMappingURL=ConsoleLogger.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/ConsoleLogger.test.ts"],
4
- "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = vi.spyOn(console, \"warn\").mockImplementation(vi.fn());\nconst info = vi.spyOn(console, \"info\").mockImplementation(vi.fn());\nconst debug = vi.spyOn(console, \"debug\").mockImplementation(vi.fn());\nconst error = vi.spyOn(console, \"error\").mockImplementation(vi.fn());\nconst log = vi.spyOn(console, \"log\").mockImplementation(vi.fn());\n\nlet logger: ConsoleLogger;\nconst options: LogSubscriberOptions = {\n data: { key: \"value\" },\n timestamp: 1,\n tag: \"tag\",\n};\nconst message = \"message\";\n\ndescribe(\"ConsoleLogger\", () => {\n afterAll(() => {\n vi.restoreAllMocks();\n });\n\n describe(\"default level (LogLevel.DEBUG)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger();\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Info)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Info);\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"custom-tag\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(`[${tag}]`, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Warning)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Warning);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Error)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Error);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n\n describe(\"custom level (LogLevel.Fatal)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Fatal);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(\n `[${options.tag}]`,\n message,\n options.data,\n );\n });\n });\n });\n});\n"],
5
- "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAGzB,OAAS,iBAAAC,MAAqB,kBAE9B,MAAMC,EAAO,GA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,CACF,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCD,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,GAAG,cAAc,EACjBD,EAAS,IAAIN,EAAcD,EAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = vi.spyOn(console, \"warn\").mockImplementation(vi.fn());\nconst info = vi.spyOn(console, \"info\").mockImplementation(vi.fn());\nconst debug = vi.spyOn(console, \"debug\").mockImplementation(vi.fn());\nconst error = vi.spyOn(console, \"error\").mockImplementation(vi.fn());\nconst log = vi.spyOn(console, \"log\").mockImplementation(vi.fn());\n\nlet logger: ConsoleLogger;\n// Tags are pre-formatted by the publisher before reaching subscribers\nconst options: LogSubscriberOptions = {\n data: { key: \"value\" },\n timestamp: 1,\n tag: \"[tag]\",\n};\nconst message = \"message\";\n\ndescribe(\"ConsoleLogger\", () => {\n afterAll(() => {\n vi.restoreAllMocks();\n });\n\n describe(\"default level (LogLevel.DEBUG)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger();\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"[custom-tag]\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(tag, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n });\n });\n\n describe(\"custom level (LogLevel.Info)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Info);\n });\n\n describe(\"log\", () => {\n it(\"should log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Info level with a custom tag\", () => {\n const tag = \"[custom-tag]\";\n logger.log(LogLevel.Info, message, { ...options, tag });\n expect(info).toHaveBeenCalledWith(tag, message, options.data);\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n });\n });\n\n describe(\"custom level (LogLevel.Warning)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Warning);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n });\n });\n\n describe(\"custom level (LogLevel.Error)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Error);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should default to Log level if none present\", () => {\n logger.log(null, message, options);\n expect(log).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Error level\", () => {\n logger.log(LogLevel.Error, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n });\n });\n\n describe(\"custom level (LogLevel.Fatal)\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n logger = new ConsoleLogger(LogLevel.Fatal);\n });\n\n describe(\"log\", () => {\n it(\"should not log Info level\", () => {\n logger.log(LogLevel.Info, message, options);\n expect(info).not.toHaveBeenCalled();\n });\n\n it(\"should not log Warn level\", () => {\n logger.log(LogLevel.Warning, message, options);\n expect(warn).not.toHaveBeenCalled();\n });\n\n it(\"should not log Debug level\", () => {\n logger.log(LogLevel.Debug, message, options);\n expect(debug).not.toHaveBeenCalled();\n });\n\n it(\"should log Fatal level\", () => {\n logger.log(LogLevel.Fatal, message, options);\n expect(error).toHaveBeenCalledWith(options.tag, message, options.data);\n });\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,MAAgB,wCAGzB,OAAS,iBAAAC,MAAqB,kBAE9B,MAAMC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,EAC3DC,EAAO,GAAG,MAAM,QAAS,MAAM,EAAE,mBAAmB,GAAG,GAAG,CAAC,EAC3DC,EAAQ,GAAG,MAAM,QAAS,OAAO,EAAE,mBAAmB,GAAG,GAAG,CA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ACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBAAqBG,EAAQ,IAAKC,EAASD,EAAQ,IAAI,CACvE,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["LogLevel", "ConsoleLogger", "warn", "info", "debug", "error", "log", "logger", "options", "message", "tag"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ class a{format(r){return Array.isArray(r)?r.map(o=>`[${o}]`).join(" "):`[${r}]`}}export{a as DefaultLogTagFormatter};
2
+ //# sourceMappingURL=DefaultLogTagFormatter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/api/logger-subscriber/service/DefaultLogTagFormatter.ts"],
4
+ "sourcesContent": ["import { type LogTag } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { type LogTagFormatter } from \"./LogTagFormatter\";\n\n/**\n * Default implementation of LogTagFormatter.\n * Formats tags as \"[tag1] [tag2] [tag3]\" for arrays, or \"[tag]\" for strings.\n */\nexport class DefaultLogTagFormatter implements LogTagFormatter {\n format(tag: LogTag): string {\n if (Array.isArray(tag)) {\n return tag.map((t) => `[${t}]`).join(\" \");\n }\n return `[${tag}]`;\n }\n}\n"],
5
+ "mappings": "AAQO,MAAMA,CAAkD,CAC7D,OAAOC,EAAqB,CAC1B,OAAI,MAAM,QAAQA,CAAG,EACZA,EAAI,IAAKC,GAAM,IAAIA,CAAC,GAAG,EAAE,KAAK,GAAG,EAEnC,IAAID,CAAG,GAChB,CACF",
6
+ "names": ["DefaultLogTagFormatter", "tag", "t"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{describe as r,expect as a,it as e}from"vitest";import{DefaultLogTagFormatter as o}from"./DefaultLogTagFormatter";r("DefaultLogTagFormatter",()=>{const t=new o;r("format",()=>{e("should format a single string tag with brackets",()=>{a(t.format("myTag")).toBe("[myTag]")}),e("should format an empty string tag with brackets",()=>{a(t.format("")).toBe("[]")}),e("should format a single element array with brackets",()=>{a(t.format(["myTag"])).toBe("[myTag]")}),e("should format multiple tags with brackets separated by spaces",()=>{a(t.format(["tag1","tag2","tag3"])).toBe("[tag1] [tag2] [tag3]")}),e("should format an empty array as empty string",()=>{a(t.format([])).toBe("")}),e("should handle tags with special characters",()=>{a(t.format(["SignerEth","ContextModule","loader"])).toBe("[SignerEth] [ContextModule] [loader]")})})});
2
+ //# sourceMappingURL=DefaultLogTagFormatter.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/api/logger-subscriber/service/DefaultLogTagFormatter.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from \"vitest\";\n\nimport { DefaultLogTagFormatter } from \"./DefaultLogTagFormatter\";\n\ndescribe(\"DefaultLogTagFormatter\", () => {\n const formatter = new DefaultLogTagFormatter();\n\n describe(\"format\", () => {\n it(\"should format a single string tag with brackets\", () => {\n expect(formatter.format(\"myTag\")).toBe(\"[myTag]\");\n });\n\n it(\"should format an empty string tag with brackets\", () => {\n expect(formatter.format(\"\")).toBe(\"[]\");\n });\n\n it(\"should format a single element array with brackets\", () => {\n expect(formatter.format([\"myTag\"])).toBe(\"[myTag]\");\n });\n\n it(\"should format multiple tags with brackets separated by spaces\", () => {\n expect(formatter.format([\"tag1\", \"tag2\", \"tag3\"])).toBe(\n \"[tag1] [tag2] [tag3]\",\n );\n });\n\n it(\"should format an empty array as empty string\", () => {\n expect(formatter.format([])).toBe(\"\");\n });\n\n it(\"should handle tags with special characters\", () => {\n expect(formatter.format([\"SignerEth\", \"ContextModule\", \"loader\"])).toBe(\n \"[SignerEth] [ContextModule] [loader]\",\n );\n });\n });\n});\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,EAAU,UAAAC,EAAQ,MAAAC,MAAU,SAErC,OAAS,0BAAAC,MAA8B,2BAEvCH,EAAS,yBAA0B,IAAM,CACvC,MAAMI,EAAY,IAAID,EAEtBH,EAAS,SAAU,IAAM,CACvBE,EAAG,kDAAmD,IAAM,CAC1DD,EAAOG,EAAU,OAAO,OAAO,CAAC,EAAE,KAAK,SAAS,CAClD,CAAC,EAEDF,EAAG,kDAAmD,IAAM,CAC1DD,EAAOG,EAAU,OAAO,EAAE,CAAC,EAAE,KAAK,IAAI,CACxC,CAAC,EAEDF,EAAG,qDAAsD,IAAM,CAC7DD,EAAOG,EAAU,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,CACpD,CAAC,EAEDF,EAAG,gEAAiE,IAAM,CACxED,EAAOG,EAAU,OAAO,CAAC,OAAQ,OAAQ,MAAM,CAAC,CAAC,EAAE,KACjD,sBACF,CACF,CAAC,EAEDF,EAAG,+CAAgD,IAAM,CACvDD,EAAOG,EAAU,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CACtC,CAAC,EAEDF,EAAG,6CAA8C,IAAM,CACrDD,EAAOG,EAAU,OAAO,CAAC,YAAa,gBAAiB,QAAQ,CAAC,CAAC,EAAE,KACjE,sCACF,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["describe", "expect", "it", "DefaultLogTagFormatter", "formatter"]
7
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=LogTagFormatter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,2 +1,2 @@
1
- var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=(b,r,i,s)=>{for(var o=s>1?void 0:s?m(r,i):r,t=b.length-1,n;t>=0;t--)(n=b[t])&&(o=(s?n(r,i,o):n(o))||o);return s&&o&&c(r,i,o),o};import{injectable as h}from"inversify";import{LogLevel as g}from"../../../api/logger-subscriber/model/LogLevel";let e=class{subscribers;tag;constructor(r,i){this.subscribers=r,this.tag=i}_log(r,i,s){this.subscribers.forEach(o=>{const t={timestamp:Date.now(),tag:this.tag,...s};o.log(r,i,t)})}info(r,i){this._log(g.Info,r,i)}warn(r,i){this._log(g.Warning,r,i)}debug(r,i){this._log(g.Debug,r,i)}error(r,i){this._log(g.Error,r,i)}};e=p([h()],e);export{e as DefaultLoggerPublisherService};
1
+ var L=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var n=(m,r,t,o)=>{for(var i=o>1?void 0:o?c(r,t):r,s=m.length-1,g;s>=0;s--)(g=m[s])&&(i=(o?g(r,t,i):g(i))||i);return o&&i&&L(r,t,i),i};import{injectable as h}from"inversify";import{LogLevel as e}from"../../../api/logger-subscriber/model/LogLevel";import{DefaultLogTagFormatter as u}from"../../../api/logger-subscriber/service/DefaultLogTagFormatter";import{sanitiseData as l}from"../../logger-publisher/service/sanitiseData";let a=class{subscribers;tag;tagFormatter;constructor(r,t,o=new u){this.subscribers=r,this.tag=t,this.tagFormatter=o}_log(r,t,o){const i=o?.data?l(o.data):void 0,s=o?.tag??this.tag,g=this.tagFormatter.format(s);this.subscribers.forEach(b=>{const p={timestamp:o?.timestamp??Date.now(),tag:g,data:i};b.log(r,t,p)})}info(r,t){this._log(e.Info,r,t)}warn(r,t){this._log(e.Warning,r,t)}debug(r,t){this._log(e.Debug,r,t)}error(r,t){this._log(e.Error,r,t)}};a=n([h()],a);export{a as DefaultLoggerPublisherService};
2
2
  //# sourceMappingURL=DefaultLoggerPublisherService.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/logger-publisher/service/DefaultLoggerPublisherService.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\nimport { LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { LogPublisherOptions } from \"@internal/logger-publisher/model/LogPublisherOptions\";\n\n@injectable()\nexport class DefaultLoggerPublisherService implements LoggerPublisherService {\n subscribers: LoggerSubscriberService[];\n tag: string;\n\n constructor(subscribers: LoggerSubscriberService[], tag: string) {\n this.subscribers = subscribers;\n this.tag = tag;\n }\n\n _log(level: LogLevel, message: string, options?: LogPublisherOptions): void {\n this.subscribers.forEach((subscriber) => {\n const subscriberOptions: LogSubscriberOptions = {\n timestamp: Date.now(),\n tag: this.tag,\n ...options,\n };\n subscriber.log(level, message, subscriberOptions);\n });\n }\n\n info(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Info, message, options);\n }\n\n warn(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Warning, message, options);\n }\n\n debug(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Debug, message, options);\n }\n\n error(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Error, message, options);\n }\n}\n"],
5
- "mappings": "wMAAA,OAAS,cAAAA,MAAkB,YAG3B,OAAS,YAAAC,MAAgB,wCAMlB,IAAMC,EAAN,KAAsE,CAC3E,YACA,IAEA,YAAYC,EAAwCC,EAAa,CAC/D,KAAK,YAAcD,EACnB,KAAK,IAAMC,CACb,CAEA,KAAKC,EAAiBC,EAAiBC,EAAqC,CAC1E,KAAK,YAAY,QAASC,GAAe,CACvC,MAAMC,EAA0C,CAC9C,UAAW,KAAK,IAAI,EACpB,IAAK,KAAK,IACV,GAAGF,CACL,EACAC,EAAW,IAAIH,EAAOC,EAASG,CAAiB,CAClD,CAAC,CACH,CAEA,KAAKH,EAAiBC,EAAqC,CACzD,KAAK,KAAKG,EAAS,KAAMJ,EAASC,CAAO,CAC3C,CAEA,KAAKD,EAAiBC,EAAqC,CACzD,KAAK,KAAKG,EAAS,QAASJ,EAASC,CAAO,CAC9C,CAEA,MAAMD,EAAiBC,EAAqC,CAC1D,KAAK,KAAKG,EAAS,MAAOJ,EAASC,CAAO,CAC5C,CAEA,MAAMD,EAAiBC,EAAqC,CAC1D,KAAK,KAAKG,EAAS,MAAOJ,EAASC,CAAO,CAC5C,CACF,EAnCaL,EAANS,EAAA,CADNC,EAAW,GACCV",
6
- "names": ["injectable", "LogLevel", "DefaultLoggerPublisherService", "subscribers", "tag", "level", "message", "options", "subscriber", "subscriberOptions", "LogLevel", "__decorateClass", "injectable"]
4
+ "sourcesContent": ["import { injectable } from \"inversify\";\n\nimport { LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport {\n type LogSubscriberOptions,\n type LogTag,\n} from \"@api/logger-subscriber/model/LogSubscriberOptions\";\nimport { DefaultLogTagFormatter } from \"@api/logger-subscriber/service/DefaultLogTagFormatter\";\nimport { LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type LogTagFormatter } from \"@api/logger-subscriber/service/LogTagFormatter\";\nimport { LogPublisherOptions } from \"@internal/logger-publisher/model/LogPublisherOptions\";\nimport { sanitiseData } from \"@internal/logger-publisher/service/sanitiseData\";\n\n@injectable()\nexport class DefaultLoggerPublisherService implements LoggerPublisherService {\n subscribers: LoggerSubscriberService[];\n tag: LogTag;\n private readonly tagFormatter: LogTagFormatter;\n\n constructor(\n subscribers: LoggerSubscriberService[],\n tag: LogTag,\n tagFormatter: LogTagFormatter = new DefaultLogTagFormatter(),\n ) {\n this.subscribers = subscribers;\n this.tag = tag;\n this.tagFormatter = tagFormatter;\n }\n\n _log(level: LogLevel, message: string, options?: LogPublisherOptions): void {\n const sanitisedData = options?.data\n ? sanitiseData(options.data)\n : undefined;\n\n // Format the tag from options if provided, otherwise use the instance tag\n const tagToFormat = options?.tag ?? this.tag;\n const formattedTag = this.tagFormatter.format(tagToFormat);\n\n this.subscribers.forEach((subscriber) => {\n const subscriberOptions: LogSubscriberOptions = {\n timestamp: options?.timestamp ?? Date.now(),\n tag: formattedTag,\n data: sanitisedData,\n };\n subscriber.log(level, message, subscriberOptions);\n });\n }\n\n info(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Info, message, options);\n }\n\n warn(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Warning, message, options);\n }\n\n debug(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Debug, message, options);\n }\n\n error(message: string, options?: LogPublisherOptions): void {\n this._log(LogLevel.Error, message, options);\n }\n}\n"],
5
+ "mappings": "wMAAA,OAAS,cAAAA,MAAkB,YAG3B,OAAS,YAAAC,MAAgB,wCAKzB,OAAS,0BAAAC,MAA8B,wDAIvC,OAAS,gBAAAC,MAAoB,kDAGtB,IAAMC,EAAN,KAAsE,CAC3E,YACA,IACiB,aAEjB,YACEC,EACAC,EACAC,EAAgC,IAAIC,EACpC,CACA,KAAK,YAAcH,EACnB,KAAK,IAAMC,EACX,KAAK,aAAeC,CACtB,CAEA,KAAKE,EAAiBC,EAAiBC,EAAqC,CAC1E,MAAMC,EAAgBD,GAAS,KAC3BE,EAAaF,EAAQ,IAAI,EACzB,OAGEG,EAAcH,GAAS,KAAO,KAAK,IACnCI,EAAe,KAAK,aAAa,OAAOD,CAAW,EAEzD,KAAK,YAAY,QAASE,GAAe,CACvC,MAAMC,EAA0C,CAC9C,UAAWN,GAAS,WAAa,KAAK,IAAI,EAC1C,IAAKI,EACL,KAAMH,CACR,EACAI,EAAW,IAAIP,EAAOC,EAASO,CAAiB,CAClD,CAAC,CACH,CAEA,KAAKP,EAAiBC,EAAqC,CACzD,KAAK,KAAKO,EAAS,KAAMR,EAASC,CAAO,CAC3C,CAEA,KAAKD,EAAiBC,EAAqC,CACzD,KAAK,KAAKO,EAAS,QAASR,EAASC,CAAO,CAC9C,CAEA,MAAMD,EAAiBC,EAAqC,CAC1D,KAAK,KAAKO,EAAS,MAAOR,EAASC,CAAO,CAC5C,CAEA,MAAMD,EAAiBC,EAAqC,CAC1D,KAAK,KAAKO,EAAS,MAAOR,EAASC,CAAO,CAC5C,CACF,EAjDaP,EAANe,EAAA,CADNC,EAAW,GACChB",
6
+ "names": ["injectable", "LogLevel", "DefaultLogTagFormatter", "sanitiseData", "DefaultLoggerPublisherService", "subscribers", "tag", "tagFormatter", "DefaultLogTagFormatter", "level", "message", "options", "sanitisedData", "sanitiseData", "tagToFormat", "formattedTag", "subscriber", "subscriberOptions", "LogLevel", "__decorateClass", "injectable"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{LogLevel as l}from"../../../api/logger-subscriber/model/LogLevel";import{ConsoleLogger as c}from"../../../api/logger-subscriber/service/ConsoleLogger";import{DefaultLoggerPublisherService as a}from"./DefaultLoggerPublisherService";vi.mock("@api/logger-subscriber/service/ConsoleLogger");vi.useFakeTimers().setSystemTime(new Date("2024-01-01"));let o,s;const e="message",n="logger-tag",t={data:{key:"value"}},r={tag:n,timestamp:Date.now(),...t};describe("LoggerPublisherService",()=>{beforeEach(()=>{vi.clearAllMocks(),s=new c,o=new a([s],n)}),it("should call subscriber.log with the correct log object",()=>{o.info(e,t),expect(s.log).toHaveBeenCalledWith(l.Info,e,r)}),it("should call subscriber.log with the correct log object when a tag is provided",()=>{const i="new-tag";o.info(e,{...t,tag:i}),expect(s.log).toHaveBeenCalledWith(l.Info,e,{...r,tag:i})}),it("should call subscriber.log with the correct log object when a timestamp is provided",()=>{o.info(e,{...t,timestamp:1}),expect(s.log).toHaveBeenCalledWith(l.Info,e,{...r,timestamp:1})}),it("should call _log with the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.info(e,t),expect(i).toHaveBeenCalledWith(l.Info,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.debug(e,t),expect(i).toHaveBeenCalledWith(l.Debug,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.warn(e,t),expect(i).toHaveBeenCalledWith(l.Warning,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.error(e,t),expect(i).toHaveBeenCalledWith(l.Error,e,t)})});
1
+ import{LogLevel as l}from"../../../api/logger-subscriber/model/LogLevel";import{ConsoleLogger as a}from"../../../api/logger-subscriber/service/ConsoleLogger";import{DefaultLoggerPublisherService as c}from"./DefaultLoggerPublisherService";vi.mock("@api/logger-subscriber/service/ConsoleLogger");vi.useFakeTimers().setSystemTime(new Date("2024-01-01"));let o,s;const e="message",r="logger-tag",g=`[${r}]`,t={data:{key:"value"}},n={tag:g,timestamp:Date.now(),...t};describe("LoggerPublisherService",()=>{beforeEach(()=>{vi.clearAllMocks(),s=new a,o=new c([s],r)}),it("should call subscriber.log with the correct log object",()=>{o.info(e,t),expect(s.log).toHaveBeenCalledWith(l.Info,e,n)}),it("should call subscriber.log with the correct log object when a tag is provided in options",()=>{const i="new-tag";o.info(e,{...t,tag:i}),expect(s.log).toHaveBeenCalledWith(l.Info,e,{...n,tag:`[${i}]`})}),it("should call subscriber.log with the correct log object when a timestamp is provided",()=>{o.info(e,{...t,timestamp:1}),expect(s.log).toHaveBeenCalledWith(l.Info,e,{...n,timestamp:1})}),it("should call _log with the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.info(e,t),expect(i).toHaveBeenCalledWith(l.Info,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.debug(e,t),expect(i).toHaveBeenCalledWith(l.Debug,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.warn(e,t),expect(i).toHaveBeenCalledWith(l.Warning,e,t)}),it("should have the correct LogLevel",()=>{const i=vi.spyOn(o,"_log").mockImplementation(vi.fn());o.error(e,t),expect(i).toHaveBeenCalledWith(l.Error,e,t)})});
2
2
  //# sourceMappingURL=DefaultLoggerPublisherService.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.ts"],
4
- "sourcesContent": ["import { type Mocked } from \"vitest\";\n\nimport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\n\nimport { DefaultLoggerPublisherService } from \"./DefaultLoggerPublisherService\";\n\nvi.mock(\"@api/logger-subscriber/service/ConsoleLogger\");\nvi.useFakeTimers().setSystemTime(new Date(\"2024-01-01\"));\n\nlet service: DefaultLoggerPublisherService;\nlet subscriber: Mocked<ConsoleLogger>;\nconst message = \"message\";\nconst tag = \"logger-tag\";\nconst options = { data: { key: \"value\" } };\nconst generatedOptions = { tag, timestamp: Date.now(), ...options };\n\ndescribe(\"LoggerPublisherService\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n subscriber = new ConsoleLogger() as Mocked<ConsoleLogger>;\n service = new DefaultLoggerPublisherService([subscriber], tag);\n });\n\n it(\"should call subscriber.log with the correct log object\", () => {\n service.info(message, options);\n expect(subscriber.log).toHaveBeenCalledWith(\n LogLevel.Info,\n message,\n generatedOptions,\n );\n });\n\n it(\"should call subscriber.log with the correct log object when a tag is provided\", () => {\n const newTag = \"new-tag\";\n service.info(message, { ...options, tag: newTag });\n expect(subscriber.log).toHaveBeenCalledWith(LogLevel.Info, message, {\n ...generatedOptions,\n tag: newTag,\n });\n });\n\n it(\"should call subscriber.log with the correct log object when a timestamp is provided\", () => {\n const newTimestamp = 1;\n service.info(message, { ...options, timestamp: newTimestamp });\n expect(subscriber.log).toHaveBeenCalledWith(LogLevel.Info, message, {\n ...generatedOptions,\n timestamp: newTimestamp,\n });\n });\n\n it(\"should call _log with the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.info(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Info, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.debug(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Debug, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.warn(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Warning, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.error(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Error, message, options);\n });\n});\n"],
5
- "mappings": "AAEA,OAAS,YAAAA,MAAgB,wCACzB,OAAS,iBAAAC,MAAqB,+CAE9B,OAAS,iCAAAC,MAAqC,kCAE9C,GAAG,KAAK,8CAA8C,EACtD,GAAG,cAAc,EAAE,cAAc,IAAI,KAAK,YAAY,CAAC,EAEvD,IAAIC,EACAC,EACJ,MAAMC,EAAU,UACVC,EAAM,aACNC,EAAU,CAAE,KAAM,CAAE,IAAK,OAAQ,CAAE,EACnCC,EAAmB,CAAE,IAAAF,EAAK,UAAW,KAAK,IAAI,EAAG,GAAGC,CAAQ,EAElE,SAAS,yBAA0B,IAAM,CACvC,WAAW,IAAM,CACf,GAAG,cAAc,EACjBH,EAAa,IAAIH,EACjBE,EAAU,IAAID,EAA8B,CAACE,CAAU,EAAGE,CAAG,CAC/D,CAAC,EAED,GAAG,yDAA0D,IAAM,CACjEH,EAAQ,KAAKE,EAASE,CAAO,EAC7B,OAA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MAAME,EAASE,CAAO,EAC9B,OAAOG,CAAG,EAAE,qBAAqBV,EAAS,MAAOK,EAASE,CAAO,CACnE,CAAC,CACH,CAAC",
6
- "names": ["LogLevel", "ConsoleLogger", "DefaultLoggerPublisherService", "service", "subscriber", "message", "tag", "options", "generatedOptions", "newTag", "spy"]
4
+ "sourcesContent": ["import { type Mocked } from \"vitest\";\n\nimport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\n\nimport { DefaultLoggerPublisherService } from \"./DefaultLoggerPublisherService\";\n\nvi.mock(\"@api/logger-subscriber/service/ConsoleLogger\");\nvi.useFakeTimers().setSystemTime(new Date(\"2024-01-01\"));\n\nlet service: DefaultLoggerPublisherService;\nlet subscriber: Mocked<ConsoleLogger>;\nconst message = \"message\";\nconst tag = \"logger-tag\";\nconst formattedTag = `[${tag}]`;\nconst options = { data: { key: \"value\" } };\nconst generatedOptions = {\n tag: formattedTag,\n timestamp: Date.now(),\n ...options,\n};\n\ndescribe(\"LoggerPublisherService\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n subscriber = new ConsoleLogger() as Mocked<ConsoleLogger>;\n service = new DefaultLoggerPublisherService([subscriber], tag);\n });\n\n it(\"should call subscriber.log with the correct log object\", () => {\n service.info(message, options);\n expect(subscriber.log).toHaveBeenCalledWith(\n LogLevel.Info,\n message,\n generatedOptions,\n );\n });\n\n it(\"should call subscriber.log with the correct log object when a tag is provided in options\", () => {\n const newTag = \"new-tag\";\n service.info(message, { ...options, tag: newTag });\n // Note: options.tag overrides and is formatted\n expect(subscriber.log).toHaveBeenCalledWith(LogLevel.Info, message, {\n ...generatedOptions,\n tag: `[${newTag}]`,\n });\n });\n\n it(\"should call subscriber.log with the correct log object when a timestamp is provided\", () => {\n const newTimestamp = 1;\n service.info(message, { ...options, timestamp: newTimestamp });\n expect(subscriber.log).toHaveBeenCalledWith(LogLevel.Info, message, {\n ...generatedOptions,\n timestamp: newTimestamp,\n });\n });\n\n it(\"should call _log with the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.info(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Info, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.debug(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Debug, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.warn(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Warning, message, options);\n });\n\n it(\"should have the correct LogLevel\", () => {\n const spy = vi.spyOn(service, \"_log\").mockImplementation(vi.fn());\n\n service.error(message, options);\n expect(spy).toHaveBeenCalledWith(LogLevel.Error, message, options);\n });\n});\n"],
5
+ "mappings": "AAEA,OAAS,YAAAA,MAAgB,wCACzB,OAAS,iBAAAC,MAAqB,+CAE9B,OAAS,iCAAAC,MAAqC,kCAE9C,GAAG,KAAK,8CAA8C,EACtD,GAAG,cAAc,EAAE,cAAc,IAAI,KAAK,YAAY,CAAC,EAEvD,IAAIC,EACAC,EACJ,MAAMC,EAAU,UACVC,EAAM,aACNC,EAAe,IAAID,CAAG,IACtBE,EAAU,CAAE,KAAM,CAAE,IAAK,OAAQ,CAAE,EACnCC,EAAmB,CACvB,IAAKF,EACL,UAAW,KAAK,IAAI,EACpB,GAAGC,CACL,EAEA,SAAS,yBAA0B,IAAM,CACvC,WAAW,IAAM,CACf,GAAG,cAAc,EACjBJ,EAAa,IAAIH,EACjBE,EAAU,IAAID,EAA8B,CAACE,CAAU,EAAGE,CAAG,CAC/D,CAAC,EAED,GAAG,yDAA0D,IAAM,CACjEH,EAAQ,KAAKE,EAASG,CAAO,EAC7B,OAAOJ,EAAW,GAAG,EAAE,qBACrBJ,EAAS,KACTK,EACAI,CACF,CACF,CAAC,EAED,GAAG,2FAA4F,IA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,CAAO,CACnE,CAAC,CACH,CAAC",
6
+ "names": ["LogLevel", "ConsoleLogger", "DefaultLoggerPublisherService", "service", "subscriber", "message", "tag", "formattedTag", "options", "generatedOptions", "newTag", "spy"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ function c(n,r){if(typeof n=="bigint")return n.toString();if(Array.isArray(n))return r.has(n)?"[Circular]":(r.add(n),n.map(t=>c(t,r)));if(n!==null&&typeof n=="object"){if(r.has(n))return"[Circular]";r.add(n);const t={};for(const[o,i]of Object.entries(n))t[o]=c(i,r);return t}return n}function e(n){const r=new WeakSet;r.add(n);const t={};for(const[o,i]of Object.entries(n))t[o]=c(i,r);return t}export{e as sanitiseData};
2
+ //# sourceMappingURL=sanitiseData.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/logger-publisher/service/sanitiseData.ts"],
4
+ "sourcesContent": ["function sanitiseValue(value: unknown, seen: WeakSet<object>): unknown {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n if (Array.isArray(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n return value.map((v) => sanitiseValue(v, seen));\n }\n if (value !== null && typeof value === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n const sanitised: Record<string, unknown> = {};\n for (const [key, val] of Object.entries(value)) {\n sanitised[key] = sanitiseValue(val, seen);\n }\n return sanitised;\n }\n return value;\n}\n\n/**\n * Recursively sanitises data for JSON serialisation by converting BigInt values\n * to strings and handling circular references.\n */\nexport function sanitiseData(\n data: Record<string, unknown>,\n): Record<string, unknown> {\n const seen = new WeakSet<object>();\n seen.add(data);\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(data)) {\n result[key] = sanitiseValue(value, seen);\n }\n return result;\n}\n"],
5
+ "mappings": "AAAA,SAASA,EAAcC,EAAgBC,EAAgC,CACrE,GAAI,OAAOD,GAAU,SACnB,OAAOA,EAAM,SAAS,EAExB,GAAI,MAAM,QAAQA,CAAK,EACrB,OAAIC,EAAK,IAAID,CAAK,EACT,cAETC,EAAK,IAAID,CAAK,EACPA,EAAM,IAAKE,GAAMH,EAAcG,EAAGD,CAAI,CAAC,GAEhD,GAAID,IAAU,MAAQ,OAAOA,GAAU,SAAU,CAC/C,GAAIC,EAAK,IAAID,CAAK,EAChB,MAAO,aAETC,EAAK,IAAID,CAAK,EACd,MAAMG,EAAqC,CAAC,EAC5C,SAAW,CAACC,EAAKC,CAAG,IAAK,OAAO,QAAQL,CAAK,EAC3CG,EAAUC,CAAG,EAAIL,EAAcM,EAAKJ,CAAI,EAE1C,OAAOE,CACT,CACA,OAAOH,CACT,CAMO,SAASM,EACdC,EACyB,CACzB,MAAMN,EAAO,IAAI,QACjBA,EAAK,IAAIM,CAAI,EACb,MAAMC,EAAkC,CAAC,EACzC,SAAW,CAACJ,EAAKJ,CAAK,IAAK,OAAO,QAAQO,CAAI,EAC5CC,EAAOJ,CAAG,EAAIL,EAAcC,EAAOC,CAAI,EAEzC,OAAOO,CACT",
6
+ "names": ["sanitiseValue", "value", "seen", "v", "sanitised", "key", "val", "sanitiseData", "data", "result"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{describe as o,expect as e,it as u}from"vitest";import{sanitiseData as s}from"./sanitiseData";o("sanitiseData",()=>{u("should convert BigInt values to strings",()=>{const n=s({value:123456789012345678901234567890n});e(n).toEqual({value:"123456789012345678901234567890"}),e(typeof n.value).toBe("string")}),u("should handle primitive values unchanged",()=>{const n=s({str:"hello",num:42,bool:!0,nil:null,undef:void 0});e(n).toEqual({str:"hello",num:42,bool:!0,nil:null,undef:void 0})}),u("should recursively sanitise arrays",()=>{const t={items:[BigInt(1),"text",BigInt(2)]},n=s(t);e(n).toEqual({items:["1","text","2"]})}),u("should recursively sanitise nested arrays",()=>{const t={nested:[[BigInt(1)],[BigInt(2),[BigInt(3)]]]},n=s(t);e(n).toEqual({nested:[["1"],["2",["3"]]]})}),u("should recursively sanitise objects",()=>{const n=s({amount:1000000000000000000n,name:"test",count:5});e(n).toEqual({amount:"1000000000000000000",name:"test",count:5})}),u("should recursively sanitise nested objects",()=>{const n=s({transaction:{value:100n,gasLimit:21000n,nested:{maxFeePerGas:50000000000n}},metadata:"info"});e(n).toEqual({transaction:{value:"100",gasLimit:"21000",nested:{maxFeePerGas:"50000000000"}},metadata:"info"})}),u("should handle mixed arrays and objects",()=>{const n=s({items:[{value:1n},{value:2n}],total:3n});e(n).toEqual({items:[{value:"1"},{value:"2"}],total:"3"})}),u("should handle empty objects and arrays",()=>{e(s({})).toEqual({}),e(s({arr:[]})).toEqual({arr:[]})}),u("should produce JSON-serialisable output",()=>{const n=s({bigValue:9007199254740991n,nested:{anotherBig:123n}});e(()=>JSON.stringify(n)).not.toThrow(),e(JSON.stringify(n)).toBe('{"bigValue":"9007199254740991","nested":{"anotherBig":"123"}}')}),u("should handle circular reference in object",()=>{const t={name:"test"};t.self=t;const n=s(t);e(n).toEqual({name:"test",self:"[Circular]"}),e(()=>JSON.stringify(n)).not.toThrow()}),u("should handle circular reference in nested object",()=>{const t={level1:{level2:{}}};t.level1.level2=t;const n=s(t);e(n).toEqual({level1:{level2:"[Circular]"}})}),u("should handle circular reference in array",()=>{const t=[1,2];t.push(t);const i=s({items:t});e(i).toEqual({items:[1,2,"[Circular]"]})}),u("should handle same object referenced multiple times (not circular)",()=>{const t={value:42n},i=s({a:t,b:t});e(i).toEqual({a:{value:"42"},b:"[Circular]"})}),u("should handle deeply nested circular reference",()=>{const t={a:{b:{c:{d:{}}}}};t.a.b.c=t;const n=s(t);e(n).toEqual({a:{b:{c:"[Circular]"}}}),e(()=>JSON.stringify(n)).not.toThrow()})});
2
+ //# sourceMappingURL=sanitiseData.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/internal/logger-publisher/service/sanitiseData.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from \"vitest\";\n\nimport { sanitiseData } from \"./sanitiseData\";\n\ndescribe(\"sanitiseData\", () => {\n it(\"should convert BigInt values to strings\", () => {\n const input = { value: BigInt(123456789012345678901234567890n) };\n const result = sanitiseData(input);\n expect(result).toEqual({ value: \"123456789012345678901234567890\" });\n expect(typeof result[\"value\"]).toBe(\"string\");\n });\n\n it(\"should handle primitive values unchanged\", () => {\n const input = {\n str: \"hello\",\n num: 42,\n bool: true,\n nil: null,\n undef: undefined,\n };\n const result = sanitiseData(input);\n expect(result).toEqual({\n str: \"hello\",\n num: 42,\n bool: true,\n nil: null,\n undef: undefined,\n });\n });\n\n it(\"should recursively sanitise arrays\", () => {\n const input = { items: [BigInt(1), \"text\", BigInt(2)] };\n const result = sanitiseData(input);\n expect(result).toEqual({ items: [\"1\", \"text\", \"2\"] });\n });\n\n it(\"should recursively sanitise nested arrays\", () => {\n const input = { nested: [[BigInt(1)], [BigInt(2), [BigInt(3)]]] };\n const result = sanitiseData(input);\n expect(result).toEqual({ nested: [[\"1\"], [\"2\", [\"3\"]]] });\n });\n\n it(\"should recursively sanitise objects\", () => {\n const input = {\n amount: BigInt(1000000000000000000n),\n name: \"test\",\n count: 5,\n };\n const result = sanitiseData(input);\n expect(result).toEqual({\n amount: \"1000000000000000000\",\n name: \"test\",\n count: 5,\n });\n });\n\n it(\"should recursively sanitise nested objects\", () => {\n const input = {\n transaction: {\n value: BigInt(100n),\n gasLimit: BigInt(21000n),\n nested: {\n maxFeePerGas: BigInt(50000000000n),\n },\n },\n metadata: \"info\",\n };\n const result = sanitiseData(input);\n expect(result).toEqual({\n transaction: {\n value: \"100\",\n gasLimit: \"21000\",\n nested: {\n maxFeePerGas: \"50000000000\",\n },\n },\n metadata: \"info\",\n });\n });\n\n it(\"should handle mixed arrays and objects\", () => {\n const input = {\n items: [{ value: BigInt(1n) }, { value: BigInt(2n) }],\n total: BigInt(3n),\n };\n const result = sanitiseData(input);\n expect(result).toEqual({\n items: [{ value: \"1\" }, { value: \"2\" }],\n total: \"3\",\n });\n });\n\n it(\"should handle empty objects and arrays\", () => {\n expect(sanitiseData({})).toEqual({});\n expect(sanitiseData({ arr: [] })).toEqual({ arr: [] });\n });\n\n it(\"should produce JSON-serialisable output\", () => {\n const input = {\n bigValue: BigInt(9007199254740991n),\n nested: {\n anotherBig: BigInt(123n),\n },\n };\n const result = sanitiseData(input);\n expect(() => JSON.stringify(result)).not.toThrow();\n expect(JSON.stringify(result)).toBe(\n '{\"bigValue\":\"9007199254740991\",\"nested\":{\"anotherBig\":\"123\"}}',\n );\n });\n\n it(\"should handle circular reference in object\", () => {\n const input: Record<string, unknown> = { name: \"test\" };\n input[\"self\"] = input;\n const result = sanitiseData(input);\n expect(result).toEqual({ name: \"test\", self: \"[Circular]\" });\n expect(() => JSON.stringify(result)).not.toThrow();\n });\n\n it(\"should handle circular reference in nested object\", () => {\n const input: Record<string, unknown> = {\n level1: {\n level2: {},\n },\n };\n (input[\"level1\"] as Record<string, unknown>)[\"level2\"] = input;\n const result = sanitiseData(input);\n expect(result).toEqual({\n level1: {\n level2: \"[Circular]\",\n },\n });\n });\n\n it(\"should handle circular reference in array\", () => {\n const arr: unknown[] = [1, 2];\n arr.push(arr);\n const input = { items: arr };\n const result = sanitiseData(input);\n expect(result).toEqual({ items: [1, 2, \"[Circular]\"] });\n });\n\n it(\"should handle same object referenced multiple times (not circular)\", () => {\n const shared = { value: BigInt(42n) };\n const input = { a: shared, b: shared };\n const result = sanitiseData(input);\n // Second reference to same object is detected as circular\n expect(result).toEqual({ a: { value: \"42\" }, b: \"[Circular]\" });\n });\n\n it(\"should handle deeply nested circular reference\", () => {\n const input: Record<string, unknown> = {\n a: {\n b: {\n c: {\n d: {},\n },\n },\n },\n };\n ((input[\"a\"] as Record<string, unknown>)[\"b\"] as Record<string, unknown>)[\n \"c\"\n ] = input;\n const result = sanitiseData(input);\n expect(result).toEqual({\n a: {\n b: {\n c: \"[Circular]\",\n },\n },\n });\n expect(() => JSON.stringify(result)).not.toThrow();\n });\n});\n"],
5
+ "mappings": "AAA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@@ export { DeviceManagementKitBuilder } from "./DeviceManagementKitBuilder";
52
52
  export * from "./Error";
53
53
  export { LogLevel } from "./logger-subscriber/model/LogLevel";
54
54
  export { ConsoleLogger } from "./logger-subscriber/service/ConsoleLogger";
55
+ export { DefaultLogTagFormatter } from "./logger-subscriber/service/DefaultLogTagFormatter";
56
+ export { type LogTagFormatter } from "./logger-subscriber/service/LogTagFormatter";
55
57
  export { WebLogsExporterLogger } from "./logger-subscriber/service/WebLogsExporterLogger";
56
58
  export { ConnectedDevice } from "./transport/model/ConnectedDevice";
57
59
  export { DeviceConnectionStateMachine, type DeviceConnectionStateMachineParams, } from "./transport/model/DeviceConnectionStateMachine";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EACL,uCAAuC,EACvC,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EACL,uBAAuB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,oBAAoB,GA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C,CAAC;AAC7E,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,4BAA4B,EAC5B,KAAK,kCAAkC,GACxC,MAAM,mDAAmD,CAAC;AAC3D,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAChG,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,GACb,MAAM,uBAAuB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export type LogSubscriberData = Record<string, unknown>;
2
+ export type LogTag = string | string[];
2
3
  export type LogSubscriberOptions = {
3
4
  readonly tag: string;
4
5
  readonly timestamp: number;
@@ -1 +1 @@
1
- {"version":3,"file":"LogSubscriberOptions.d.ts","sourceRoot":"","sources":["../../../../../../src/api/logger-subscriber/model/LogSubscriberOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"LogSubscriberOptions.d.ts","sourceRoot":"","sources":["../../../../../../src/api/logger-subscriber/model/LogSubscriberOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAGxD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG;IAEjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACnC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type LogTag } from "../../logger-subscriber/model/LogSubscriberOptions";
2
+ import { type LogTagFormatter } from "./LogTagFormatter";
3
+ /**
4
+ * Default implementation of LogTagFormatter.
5
+ * Formats tags as "[tag1] [tag2] [tag3]" for arrays, or "[tag]" for strings.
6
+ */
7
+ export declare class DefaultLogTagFormatter implements LogTagFormatter {
8
+ format(tag: LogTag): string;
9
+ }
10
+ //# sourceMappingURL=DefaultLogTagFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLogTagFormatter.d.ts","sourceRoot":"","sources":["../../../../../../src/api/logger-subscriber/service/DefaultLogTagFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mDAAmD,CAAC;AAEhF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC5D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAM5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DefaultLogTagFormatter.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLogTagFormatter.test.d.ts","sourceRoot":"","sources":["../../../../../../src/api/logger-subscriber/service/DefaultLogTagFormatter.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { type LogTag } from "../../logger-subscriber/model/LogSubscriberOptions";
2
+ /**
3
+ * Interface for formatting log tags.
4
+ * Allows different formatting strategies to be injected into subscribers.
5
+ */
6
+ export interface LogTagFormatter {
7
+ format(tag: LogTag): string;
8
+ }
9
+ //# sourceMappingURL=LogTagFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogTagFormatter.d.ts","sourceRoot":"","sources":["../../../../../../src/api/logger-subscriber/service/LogTagFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mDAAmD,CAAC;AAEhF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B"}
@@ -1,11 +1,14 @@
1
1
  import { LoggerPublisherService } from "../../../api/logger-publisher/service/LoggerPublisherService";
2
2
  import { LogLevel } from "../../../api/logger-subscriber/model/LogLevel";
3
+ import { type LogTag } from "../../../api/logger-subscriber/model/LogSubscriberOptions";
3
4
  import { LoggerSubscriberService } from "../../../api/logger-subscriber/service/LoggerSubscriberService";
5
+ import { type LogTagFormatter } from "../../../api/logger-subscriber/service/LogTagFormatter";
4
6
  import { LogPublisherOptions } from "../../logger-publisher/model/LogPublisherOptions";
5
7
  export declare class DefaultLoggerPublisherService implements LoggerPublisherService {
6
8
  subscribers: LoggerSubscriberService[];
7
- tag: string;
8
- constructor(subscribers: LoggerSubscriberService[], tag: string);
9
+ tag: LogTag;
10
+ private readonly tagFormatter;
11
+ constructor(subscribers: LoggerSubscriberService[], tag: LogTag, tagFormatter?: LogTagFormatter);
9
12
  _log(level: LogLevel, message: string, options?: LogPublisherOptions): void;
10
13
  info(message: string, options?: LogPublisherOptions): void;
11
14
  warn(message: string, options?: LogPublisherOptions): void;
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLoggerPublisherService.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/logger-publisher/service/DefaultLoggerPublisherService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAE3F,qBACa,6BAA8B,YAAW,sBAAsB;IAC1E,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;gBAEA,WAAW,EAAE,uBAAuB,EAAE,EAAE,GAAG,EAAE,MAAM;IAK/D,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAW3E,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI1D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI1D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI3D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;CAG5D"}
1
+ {"version":3,"file":"DefaultLoggerPublisherService.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/logger-publisher/service/DefaultLoggerPublisherService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAEL,KAAK,MAAM,EACZ,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAG3F,qBACa,6BAA8B,YAAW,sBAAsB;IAC1E,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAkB;gBAG7C,WAAW,EAAE,uBAAuB,EAAE,EACtC,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,eAA8C;IAO9D,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAmB3E,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI1D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI1D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAI3D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI;CAG5D"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Recursively sanitises data for JSON serialisation by converting BigInt values
3
+ * to strings and handling circular references.
4
+ */
5
+ export declare function sanitiseData(data: Record<string, unknown>): Record<string, unknown>;
6
+ //# sourceMappingURL=sanitiseData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitiseData.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/logger-publisher/service/sanitiseData.ts"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sanitiseData.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitiseData.test.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/logger-publisher/service/sanitiseData.test.ts"],"names":[],"mappings":""}