@ledgerhq/device-management-kit 0.6.0 → 0.6.1

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 (426) hide show
  1. package/lib/cjs/package.json +8 -8
  2. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  3. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +2 -2
  4. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  6. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js +1 -1
  7. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  8. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  9. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  10. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js +2 -0
  11. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  12. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  13. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  14. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  15. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  16. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  17. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  18. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  19. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  20. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  21. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +2 -2
  22. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  23. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  24. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  25. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  26. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  27. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  28. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +2 -0
  29. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  30. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  31. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  32. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  33. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  34. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  35. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  36. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  37. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  38. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  39. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  40. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  41. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  42. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  43. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  44. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +1 -1
  45. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +3 -3
  46. package/lib/cjs/src/api/index.js +1 -1
  47. package/lib/cjs/src/api/index.js.map +3 -3
  48. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  49. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  50. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  51. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +2 -2
  52. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  53. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  54. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  55. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  56. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  57. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  58. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  59. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  60. package/lib/cjs/src/api/utils/Base64String.test.js +1 -1
  61. package/lib/cjs/src/api/utils/Base64String.test.js.map +2 -2
  62. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  63. package/lib/cjs/src/api/utils/HexaString.js.map +2 -2
  64. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  65. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  66. package/lib/cjs/src/di.js +1 -1
  67. package/lib/cjs/src/di.js.map +3 -3
  68. package/lib/cjs/src/di.stub.js +1 -1
  69. package/lib/cjs/src/di.stub.js.map +2 -2
  70. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  71. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  72. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  73. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  74. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  75. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  76. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  77. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  78. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js +1 -1
  79. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  80. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  81. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  82. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  83. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  84. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  85. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  86. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  87. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +2 -2
  88. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  89. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  90. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  91. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  92. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  93. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  94. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  95. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  96. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  97. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  98. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  99. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  100. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  101. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  102. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  103. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  104. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  105. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  106. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  107. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  108. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  109. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  110. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  111. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  112. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +1 -1
  113. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +3 -3
  114. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  115. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  116. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  117. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +2 -2
  118. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  119. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  120. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  121. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  122. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  123. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  124. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  125. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  126. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js +1 -1
  127. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  128. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  129. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  130. package/lib/cjs/src/internal/manager-api/model/Const.js +1 -1
  131. package/lib/cjs/src/internal/manager-api/model/Const.js.map +3 -3
  132. package/lib/cjs/src/internal/manager-api/model/Errors.js +1 -1
  133. package/lib/cjs/src/internal/manager-api/model/Errors.js.map +3 -3
  134. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  135. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  136. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  137. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +2 -2
  138. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  139. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +2 -2
  140. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  141. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  142. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  143. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  144. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js +2 -0
  145. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  146. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  147. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  148. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  149. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  150. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  151. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  152. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  153. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  154. package/lib/cjs/src/internal/secure-channel/model/Const.js +2 -0
  155. package/lib/cjs/src/internal/secure-channel/model/Const.js.map +7 -0
  156. package/lib/cjs/src/internal/secure-channel/model/Errors.js +2 -0
  157. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +7 -0
  158. package/lib/cjs/src/internal/{manager-api → secure-channel}/model/Params.js.map +1 -1
  159. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  160. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  161. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  162. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  163. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +2 -0
  164. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  165. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  166. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  167. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  168. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  169. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  170. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  171. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  172. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  173. package/lib/esm/package.json +8 -8
  174. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  175. package/lib/esm/src/api/DeviceManagementKit.test.js.map +2 -2
  176. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  177. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +2 -2
  178. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js +1 -1
  179. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  180. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  181. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  182. package/lib/esm/src/api/command/os/LoadCertificateCommand.js +2 -0
  183. package/lib/esm/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  184. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  185. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  186. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  187. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  188. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  189. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  190. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  191. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +2 -2
  192. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  193. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  194. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  195. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  196. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  197. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  198. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -0
  199. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  200. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  201. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  202. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  203. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  204. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  205. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  206. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  207. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  208. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  209. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  210. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  211. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  212. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  213. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +1 -1
  214. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +3 -3
  215. package/lib/esm/src/api/index.js +1 -1
  216. package/lib/esm/src/api/index.js.map +3 -3
  217. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  218. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  219. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  220. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +2 -2
  221. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  222. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  223. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  224. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  225. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  226. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  227. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  228. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  229. package/lib/esm/src/api/utils/Base64String.test.js +1 -1
  230. package/lib/esm/src/api/utils/Base64String.test.js.map +2 -2
  231. package/lib/esm/src/api/utils/HexaString.js +1 -1
  232. package/lib/esm/src/api/utils/HexaString.js.map +2 -2
  233. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  234. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  235. package/lib/esm/src/di.js +1 -1
  236. package/lib/esm/src/di.js.map +3 -3
  237. package/lib/esm/src/di.stub.js +1 -1
  238. package/lib/esm/src/di.stub.js.map +2 -2
  239. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  240. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  241. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  242. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  243. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  244. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  245. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  246. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  247. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js +1 -1
  248. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  249. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  250. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  251. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  252. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  253. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  254. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  255. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  256. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +2 -2
  257. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  258. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  259. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  260. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  261. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  262. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  263. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  264. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  265. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  266. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  267. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  268. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  269. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  270. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  271. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  272. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  273. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  274. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  275. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  276. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  277. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  278. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  279. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  280. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  281. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +1 -1
  282. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +3 -3
  283. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  284. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  285. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  286. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +2 -2
  287. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  288. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  289. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  290. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  291. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  292. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  293. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  294. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  295. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  296. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  297. package/lib/esm/src/internal/manager-api/model/Const.js +1 -1
  298. package/lib/esm/src/internal/manager-api/model/Const.js.map +3 -3
  299. package/lib/esm/src/internal/manager-api/model/Errors.js +1 -1
  300. package/lib/esm/src/internal/manager-api/model/Errors.js.map +3 -3
  301. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  302. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +2 -2
  303. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  304. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +2 -2
  305. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  306. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  307. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  308. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  309. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js +1 -0
  310. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  311. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  312. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  313. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  314. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  315. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  316. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  317. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  318. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  319. package/lib/esm/src/internal/secure-channel/model/Const.js +2 -0
  320. package/lib/esm/src/internal/secure-channel/model/Const.js.map +7 -0
  321. package/lib/esm/src/internal/secure-channel/model/Errors.js +2 -0
  322. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +7 -0
  323. package/lib/esm/src/internal/secure-channel/model/Params.js.map +7 -0
  324. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  325. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  326. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  327. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  328. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js +1 -0
  329. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  330. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  331. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  332. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  333. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  334. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  335. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  336. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  337. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  338. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts +25 -0
  339. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts.map +1 -0
  340. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts +2 -0
  341. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts.map +1 -0
  342. package/lib/types/src/api/device-action/DeviceAction.d.ts +5 -0
  343. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  344. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  345. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  346. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  347. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  348. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  349. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts +40 -0
  350. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -0
  351. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts +2 -0
  352. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts.map +1 -0
  353. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +19 -0
  354. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -0
  355. package/lib/types/src/api/index.d.ts +2 -0
  356. package/lib/types/src/api/index.d.ts.map +1 -1
  357. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts +1 -1
  358. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts.map +1 -1
  359. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts +1 -1
  360. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts.map +1 -1
  361. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts +7 -7
  362. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts.map +1 -1
  363. package/lib/types/src/api/utils/HexaString.d.ts +1 -1
  364. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  365. package/lib/types/src/di.d.ts.map +1 -1
  366. package/lib/types/src/di.stub.d.ts +1 -1
  367. package/lib/types/src/di.stub.d.ts.map +1 -1
  368. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts +1 -1
  369. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts.map +1 -1
  370. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts +3 -3
  371. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts.map +1 -1
  372. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +9 -5
  373. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  374. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +2 -1
  375. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  376. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts +3 -1
  377. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts.map +1 -1
  378. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts +5 -5
  379. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts.map +1 -1
  380. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +2 -11
  381. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  382. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +2 -46
  383. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  384. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +3 -9
  385. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  386. package/lib/types/src/internal/manager-api/model/Const.d.ts +0 -1
  387. package/lib/types/src/internal/manager-api/model/Const.d.ts.map +1 -1
  388. package/lib/types/src/internal/manager-api/model/Errors.d.ts +0 -6
  389. package/lib/types/src/internal/manager-api/model/Errors.d.ts.map +1 -1
  390. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +4 -0
  391. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  392. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  393. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts +18 -0
  394. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts.map +1 -0
  395. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts +2 -0
  396. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts.map +1 -0
  397. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts +52 -0
  398. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts.map +1 -0
  399. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts +10 -0
  400. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts.map +1 -0
  401. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts +9 -0
  402. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -0
  403. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts +2 -0
  404. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts.map +1 -0
  405. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts +6 -0
  406. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts.map +1 -0
  407. package/lib/types/src/internal/secure-channel/model/Const.d.ts +2 -0
  408. package/lib/types/src/internal/secure-channel/model/Const.d.ts.map +1 -0
  409. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +8 -0
  410. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -0
  411. package/lib/types/src/internal/secure-channel/model/Params.d.ts.map +1 -0
  412. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +20 -0
  413. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -0
  414. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts +2 -0
  415. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts.map +1 -0
  416. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +20 -0
  417. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -0
  418. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +6 -6
  419. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  420. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  421. package/package.json +9 -9
  422. package/lib/types/src/internal/manager-api/model/Params.d.ts.map +0 -1
  423. /package/lib/cjs/src/internal/{manager-api → secure-channel}/model/Params.js +0 -0
  424. /package/lib/esm/src/{internal/manager-api/model/Params.js.map → api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map} +0 -0
  425. /package/lib/esm/src/internal/{manager-api → secure-channel}/model/Params.js +0 -0
  426. /package/lib/types/src/internal/{manager-api → secure-channel}/model/Params.d.ts +0 -0
@@ -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 = jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\nconst info = jest.spyOn(console, \"info\").mockImplementation(jest.fn());\nconst debug = jest.spyOn(console, \"debug\").mockImplementation(jest.fn());\nconst error = jest.spyOn(console, \"error\").mockImplementation(jest.fn());\nconst log = jest.spyOn(console, \"log\").mockImplementation(jest.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 jest.restoreAllMocks();\n });\n\n describe(\"default level (LogLevel.DEBUG)\", () => {\n beforeEach(() => {\n jest.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 jest.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 jest.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 jest.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 jest.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,IAAAA,EAAyB,iDAGzBC,EAA8B,2BAE9B,MAAMC,EAAO,KAAK,MAAM,QAAS,MAAM,EAAE,mBAAmB,KAAK,GAAG,CAAC,EAC/DC,EAAO,KAAK,MAAM,QAAS,MAAM,EAAE,mBAAmB,KAAK,GAAG,CAAC,EAC/DC,EAAQ,KAAK,MAAM,QAAS,OAAO,EAAE,mBAAmB,KAAK,GAAG,CAAC,EACjEC,EAAQ,KAAK,MAAM,QAAS,O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I,gBAAc,WAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCA,EAAO,IAAI,WAAS,KAAME,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAI,WAAS,QAASE,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAI,WAAS,MAAOE,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAI,WAAS,MAAOE,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;\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,IAAAA,EAAyB,iDAGzBC,EAA8B,2BAE9B,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,mB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,IAAM,CAC9C,WAAW,IAAM,CACf,GAAG,cAAc,EACjBD,EAAS,IAAI,gBAAc,WAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCA,EAAO,IAAI,WAAS,KAAME,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAI,WAAS,QAASE,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAI,WAAS,MAAOE,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAI,WAAS,MAAOE,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_LogLevel", "import_ConsoleLogger", "warn", "info", "debug", "error", "log", "logger", "options", "message", "tag"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("../../device-model/model/DeviceModel.stub"),o=require("../../../internal/device-session/model/DeviceSession"),r=require("./WebLogsExporterLogger");describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=(0,r.getJSONStringifyReplacer)(),t=new Uint8Array([1,2,3]),c=e("key",t);expect(c).toEqual({hex:"0x010203",readableHex:"01 02 03",value:"1,2,3"})}),it("should return a function that replaces DeviceSession",()=>{const e=(0,i.deviceModelStubBuilder)(),t=(0,r.getJSONStringifyReplacer)(),c={deviceModel:(0,i.deviceModelStubBuilder)(),type:"USB",id:"mockedDeviceId",sendApdu:jest.fn(),transport:"USB"},n=new o.DeviceSession({connectedDevice:c,id:"mockedSessionId"},jest.fn(),{}),s=JSON.stringify(n,t),a=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;n.close(),expect(s).toEqual(a)}),it("should return a function that replaces circular references",()=>{const e={name:"Alice"};e.self=e;const t='{"name":"Alice","self":"[Circular]"}',c=JSON.stringify(e,(0,r.getJSONStringifyReplacer)());expect(c).toEqual(t)})});
1
+ "use strict";var i=require("../../device-model/model/DeviceModel.stub"),o=require("../../../internal/device-session/model/DeviceSession"),r=require("./WebLogsExporterLogger");describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=(0,r.getJSONStringifyReplacer)(),t=new Uint8Array([1,2,3]),c=e("key",t);expect(c).toEqual({hex:"0x010203",readableHex:"01 02 03",value:"1,2,3"})}),it("should return a function that replaces DeviceSession",()=>{const e=(0,i.deviceModelStubBuilder)(),t=(0,r.getJSONStringifyReplacer)(),c={deviceModel:(0,i.deviceModelStubBuilder)(),type:"USB",id:"mockedDeviceId",sendApdu:vi.fn(),transport:"USB"},n=new o.DeviceSession({connectedDevice:c,id:"mockedSessionId"},vi.fn(),{},{}),s=JSON.stringify(n,t),a=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;n.close(),expect(s).toEqual(a)}),it("should return a function that replaces circular references",()=>{const e={name:"Alice"};e.self=e;const t='{"name":"Alice","self":"[Circular]"}',c=JSON.stringify(e,(0,r.getJSONStringifyReplacer)());expect(c).toEqual(t)})});
2
2
  //# sourceMappingURL=WebLogsExporterLogger.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/WebLogsExporterLogger.test.ts"],
4
- "sourcesContent": ["import { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\n\nimport { getJSONStringifyReplacer } from \"./WebLogsExporterLogger\";\n\ndescribe(\"getJSONStringifyReplacer\", () => {\n it(\"should return a function that replaces Uint8Array correctly\", () => {\n const replacer = getJSONStringifyReplacer();\n const value = new Uint8Array([1, 2, 3]);\n const result = replacer(\"key\", value);\n expect(result).toEqual({\n hex: \"0x010203\",\n readableHex: \"01 02 03\",\n value: \"1,2,3\",\n });\n });\n\n it(\"should return a function that replaces DeviceSession\", () => {\n const stubDeviceModel = deviceModelStubBuilder();\n const replacer = getJSONStringifyReplacer();\n\n const connectedDevice: TransportConnectedDevice = {\n deviceModel: deviceModelStubBuilder(),\n type: \"USB\",\n id: \"mockedDeviceId\",\n sendApdu: jest.fn(),\n transport: \"USB\",\n };\n\n const value = new DeviceSession(\n {\n connectedDevice,\n id: \"mockedSessionId\",\n },\n jest.fn(),\n {} as ManagerApiService,\n );\n const result = JSON.stringify(value, replacer);\n const expected = `{\"id\":\"mockedSessionId\",\"connectedDevice\":{\"deviceModel\":${JSON.stringify(\n stubDeviceModel,\n )},\"type\":\"USB\",\"id\":\"mockedDeviceId\"}}`;\n value.close();\n expect(result).toEqual(expected);\n });\n\n it(\"should return a function that replaces circular references\", () => {\n interface CircularObject {\n name: string;\n self?: CircularObject;\n }\n\n const obj: CircularObject = { name: \"Alice\" };\n obj.self = obj;\n\n const expected = '{\"name\":\"Alice\",\"self\":\"[Circular]\"}';\n const result = JSON.stringify(obj, getJSONStringifyReplacer());\n expect(result).toEqual(expected);\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAAuC,oDAEvCC,EAA8B,wDAG9BC,EAAyC,mCAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,KAAW,4BAAyB,EACpCC,EAAQ,IAAI,WAAW,CAAC,EAAG,EAAG,CAAC,CAAC,EAChCC,EAASF,EAAS,MAAOC,CAAK,EACpC,OAAOC,CAAM,EAAE,QAAQ,CACrB,IAAK,WACL,YAAa,WACb,MAAO,OACT,CAAC,CACH,CAAC,EAED,GAAG,uDAAwD,IAAM,CAC/D,MAAMC,KAAkB,0BAAuB,EACzCH,KAAW,4BAAyB,EAEpCI,EAA4C,CAChD,eAAa,0BAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,KAAK,GAAG,EAClB,UAAW,KACb,EAEMH,EAAQ,IAAI,gBAChB,CACE,gBAAAG,EACA,GAAI,iBACN,EACA,KAAK,GAAG,EACR,CAAC,CACH,EACMF,EAAS,KAAK,UAAUD,EAAOD,CAAQ,EACvCK,EAAW,4DAA4D,KAAK,UAChFF,CACF,CAAC,wCACDF,EAAM,MAAM,EACZ,OAAOC,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,EAED,GAAG,6DAA8D,IAAM,CAMrE,MAAMC,EAAsB,CAAE,KAAM,OAAQ,EAC5CA,EAAI,KAAOA,EAEX,MAAMD,EAAW,uCACXH,EAAS,KAAK,UAAUI,KAAK,4BAAyB,CAAC,EAC7D,OAAOJ,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { type TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nimport { DeviceSession } from \"@internal/device-session/model/DeviceSession\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\n\nimport { getJSONStringifyReplacer } from \"./WebLogsExporterLogger\";\n\ndescribe(\"getJSONStringifyReplacer\", () => {\n it(\"should return a function that replaces Uint8Array correctly\", () => {\n const replacer = getJSONStringifyReplacer();\n const value = new Uint8Array([1, 2, 3]);\n const result = replacer(\"key\", value);\n expect(result).toEqual({\n hex: \"0x010203\",\n readableHex: \"01 02 03\",\n value: \"1,2,3\",\n });\n });\n\n it(\"should return a function that replaces DeviceSession\", () => {\n const stubDeviceModel = deviceModelStubBuilder();\n const replacer = getJSONStringifyReplacer();\n\n const connectedDevice: TransportConnectedDevice = {\n deviceModel: deviceModelStubBuilder(),\n type: \"USB\",\n id: \"mockedDeviceId\",\n sendApdu: vi.fn(),\n transport: \"USB\",\n };\n\n const value = new DeviceSession(\n {\n connectedDevice,\n id: \"mockedSessionId\",\n },\n vi.fn(),\n {} as ManagerApiService,\n {} as SecureChannelService,\n );\n const result = JSON.stringify(value, replacer);\n const expected = `{\"id\":\"mockedSessionId\",\"connectedDevice\":{\"deviceModel\":${JSON.stringify(\n stubDeviceModel,\n )},\"type\":\"USB\",\"id\":\"mockedDeviceId\"}}`;\n value.close();\n expect(result).toEqual(expected);\n });\n\n it(\"should return a function that replaces circular references\", () => {\n interface CircularObject {\n name: string;\n self?: CircularObject;\n }\n\n const obj: CircularObject = { name: \"Alice\" };\n obj.self = obj;\n\n const expected = '{\"name\":\"Alice\",\"self\":\"[Circular]\"}';\n const result = JSON.stringify(obj, getJSONStringifyReplacer());\n expect(result).toEqual(expected);\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAAuC,oDAEvCC,EAA8B,wDAI9BC,EAAyC,mCAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,KAAW,4BAAyB,EACpCC,EAAQ,IAAI,WAAW,CAAC,EAAG,EAAG,CAAC,CAAC,EAChCC,EAASF,EAAS,MAAOC,CAAK,EACpC,OAAOC,CAAM,EAAE,QAAQ,CACrB,IAAK,WACL,YAAa,WACb,MAAO,OACT,CAAC,CACH,CAAC,EAED,GAAG,uDAAwD,IAAM,CAC/D,MAAMC,KAAkB,0BAAuB,EACzCH,KAAW,4BAAyB,EAEpCI,EAA4C,CAChD,eAAa,0BAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,GAAG,GAAG,EAChB,UAAW,KACb,EAEMH,EAAQ,IAAI,gBAChB,CACE,gBAAAG,EACA,GAAI,iBACN,EACA,GAAG,GAAG,EACN,CAAC,EACD,CAAC,CACH,EACMF,EAAS,KAAK,UAAUD,EAAOD,CAAQ,EACvCK,EAAW,4DAA4D,KAAK,UAChFF,CACF,CAAC,wCACDF,EAAM,MAAM,EACZ,OAAOC,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,EAED,GAAG,6DAA8D,IAAM,CAMrE,MAAMC,EAAsB,CAAE,KAAM,OAAQ,EAC5CA,EAAI,KAAOA,EAEX,MAAMD,EAAW,uCACXH,EAAS,KAAK,UAAUI,KAAK,4BAAyB,CAAC,EAC7D,OAAOJ,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
6
  "names": ["import_DeviceModel", "import_DeviceSession", "import_WebLogsExporterLogger", "replacer", "value", "result", "stubDeviceModel", "connectedDevice", "expected", "obj"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var l=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(e,o)=>{for(var g in o)l(e,g,{get:o[g],enumerable:!0})},f=(e,o,g,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of t(o))!a.call(e,s)&&s!==g&&l(e,s,{get:()=>o[s],enumerable:!(n=r(o,s))||n.enumerable});return e};var j=e=>f(l({},"__esModule",{value:!0}),e);var x={};c(x,{ConsoleLogger:()=>p});module.exports=j(x);class p{log=jest.fn()}0&&(module.exports={ConsoleLogger});
1
+ "use strict";var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(e,o)=>{for(var l in o)s(e,l,{get:o[l],enumerable:!0})},i=(e,o,l,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let g of a(o))!c.call(e,g)&&g!==l&&s(e,g,{get:()=>o[g],enumerable:!(n=r(o,g))||n.enumerable});return e};var p=e=>i(s({},"__esModule",{value:!0}),e);var v={};f(v,{ConsoleLogger:()=>t});module.exports=p(v);class t{log=vi.fn()}0&&(module.exports={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/__mocks__/ConsoleLogger.ts"],
4
- "sourcesContent": ["export class ConsoleLogger {\n log = jest.fn();\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAAc,CACzB,IAAM,KAAK,GAAG,CAChB",
4
+ "sourcesContent": ["export class ConsoleLogger {\n log = vi.fn();\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAAc,CACzB,IAAM,GAAG,GAAG,CACd",
6
6
  "names": ["ConsoleLogger_exports", "__export", "ConsoleLogger", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var c in e)o(t,c,{get:e[c],enumerable:!0})},p=(t,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!i.call(t,n)&&n!==c&&o(t,n,{get:()=>e[n],enumerable:!(s=r(e,n))||s.enumerable});return t};var u=t=>p(o({},"__esModule",{value:!0}),t);var f={};m(f,{DeviceConnectionFactoryStub:()=>d});module.exports=u(f);class d{constructor(){}create=jest.fn().mockImplementation(()=>({sendApdu:jest.fn()}))}0&&(module.exports={DeviceConnectionFactoryStub});
1
+ "use strict";var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var m=(n,e)=>{for(var c in e)o(n,c,{get:e[c],enumerable:!0})},p=(n,e,c,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!s.call(n,t)&&t!==c&&o(n,t,{get:()=>e[t],enumerable:!(i=r(e,t))||i.enumerable});return n};var u=n=>p(o({},"__esModule",{value:!0}),n);var d={};m(d,{DeviceConnectionFactoryStub:()=>v});module.exports=u(d);class v{constructor(){}create=vi.fn().mockImplementation(()=>({sendApdu:vi.fn()}))}0&&(module.exports={DeviceConnectionFactoryStub});
2
2
  //# sourceMappingURL=DeviceConnectionFactory.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/transport/model/DeviceConnectionFactory.stub.ts"],
4
- "sourcesContent": ["export class DeviceConnectionFactoryStub {\n constructor() {}\n\n create = jest.fn().mockImplementation(() => ({\n sendApdu: jest.fn(),\n }));\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAA4B,CACvC,aAAc,CAAC,CAEf,OAAS,KAAK,GAAG,EAAE,mBAAmB,KAAO,CAC3C,SAAU,KAAK,GAAG,CACpB,EAAE,CACJ",
4
+ "sourcesContent": ["export class DeviceConnectionFactoryStub {\n constructor() {}\n\n create = vi.fn().mockImplementation(() => ({\n sendApdu: vi.fn(),\n }));\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iCAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,CAA4B,CACvC,aAAc,CAAC,CAEf,OAAS,GAAG,GAAG,EAAE,mBAAmB,KAAO,CACzC,SAAU,GAAG,GAAG,CAClB,EAAE,CACJ",
6
6
  "names": ["DeviceConnectionFactory_stub_exports", "__export", "DeviceConnectionFactoryStub", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var v=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!l.call(t,r)&&r!==o&&n(t,r,{get:()=>e[r],enumerable:!(i=u(e,r))||i.enumerable});return t};var f=t=>a(n({},"__esModule",{value:!0}),t);var D={};v(D,{connectedDeviceStubBuilder:()=>C});module.exports=f(D);var c=require("purify-ts"),d=require("../../device-model/model/DeviceModel.stub"),s=require("../../device-session/ApduResponse.stub"),p=require("./TransportConnectedDevice");function C(t={}){const e=(0,d.deviceModelStubBuilder)();return new p.TransportConnectedDevice({deviceModel:e,id:"42",type:"MOCK",transport:"USB",sendApdu:jest.fn(async()=>Promise.resolve((0,c.Right)((0,s.defaultApduResponseStubBuilder)()))),...t})}0&&(module.exports={connectedDeviceStubBuilder});
1
+ "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},a=(r,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!v.call(r,t)&&t!==o&&n(r,t,{get:()=>e[t],enumerable:!(i=u(e,t))||i.enumerable});return r};var f=r=>a(n({},"__esModule",{value:!0}),r);var D={};l(D,{connectedDeviceStubBuilder:()=>C});module.exports=f(D);var c=require("purify-ts"),d=require("../../device-model/model/DeviceModel.stub"),s=require("../../device-session/ApduResponse.stub"),p=require("./TransportConnectedDevice");function C(r={}){const e=(0,d.deviceModelStubBuilder)();return new p.TransportConnectedDevice({deviceModel:e,id:"42",type:"MOCK",transport:"USB",sendApdu:vi.fn(async()=>Promise.resolve((0,c.Right)((0,s.defaultApduResponseStubBuilder)()))),...r})}0&&(module.exports={connectedDeviceStubBuilder});
2
2
  //# sourceMappingURL=TransportConnectedDevice.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/transport/model/TransportConnectedDevice.stub.ts"],
4
- "sourcesContent": ["import { Right } from \"purify-ts\";\n\nimport { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { defaultApduResponseStubBuilder } from \"@api/device-session/ApduResponse.stub\";\n\nimport {\n type ConnectedDeviceConstructorArgs,\n TransportConnectedDevice,\n} from \"./TransportConnectedDevice\";\n\nexport function connectedDeviceStubBuilder(\n props: Partial<ConnectedDeviceConstructorArgs> = {},\n): TransportConnectedDevice {\n const deviceModel = deviceModelStubBuilder();\n return new TransportConnectedDevice({\n deviceModel,\n id: \"42\",\n type: \"MOCK\",\n transport: \"USB\",\n sendApdu: jest.fn(async () =>\n Promise.resolve(Right(defaultApduResponseStubBuilder())),\n ),\n ...props,\n });\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,qBAEtBC,EAAuC,oDACvCC,EAA+C,iDAE/CC,EAGO,sCAEA,SAASL,EACdM,EAAiD,CAAC,EACxB,CAC1B,MAAMC,KAAc,0BAAuB,EAC3C,OAAO,IAAI,2BAAyB,CAClC,YAAAA,EACA,GAAI,KACJ,KAAM,OACN,UAAW,MACX,SAAU,KAAK,GAAG,SAChB,QAAQ,WAAQ,YAAM,kCAA+B,CAAC,CAAC,CACzD,EACA,GAAGD,CACL,CAAC,CACH",
4
+ "sourcesContent": ["import { Right } from \"purify-ts\";\n\nimport { deviceModelStubBuilder } from \"@api/device-model/model/DeviceModel.stub\";\nimport { defaultApduResponseStubBuilder } from \"@api/device-session/ApduResponse.stub\";\n\nimport {\n type ConnectedDeviceConstructorArgs,\n TransportConnectedDevice,\n} from \"./TransportConnectedDevice\";\n\nexport function connectedDeviceStubBuilder(\n props: Partial<ConnectedDeviceConstructorArgs> = {},\n): TransportConnectedDevice {\n const deviceModel = deviceModelStubBuilder();\n return new TransportConnectedDevice({\n deviceModel,\n id: \"42\",\n type: \"MOCK\",\n transport: \"USB\",\n sendApdu: vi.fn(async () =>\n Promise.resolve(Right(defaultApduResponseStubBuilder())),\n ),\n ...props,\n });\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,qBAEtBC,EAAuC,oDACvCC,EAA+C,iDAE/CC,EAGO,sCAEA,SAASL,EACdM,EAAiD,CAAC,EACxB,CAC1B,MAAMC,KAAc,0BAAuB,EAC3C,OAAO,IAAI,2BAAyB,CAClC,YAAAA,EACA,GAAI,KACJ,KAAM,OACN,UAAW,MACX,SAAU,GAAG,GAAG,SACd,QAAQ,WAAQ,YAAM,kCAA+B,CAAC,CAAC,CACzD,EACA,GAAGD,CACL,CAAC,CACH",
6
6
  "names": ["TransportConnectedDevice_stub_exports", "__export", "connectedDeviceStubBuilder", "__toCommonJS", "import_purify_ts", "import_DeviceModel", "import_ApduResponse", "import_TransportConnectedDevice", "props", "deviceModel"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var s in t)o(e,s,{get:t[s],enumerable:!0})},j=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of c(t))!p.call(e,n)&&n!==s&&o(e,n,{get:()=>t[n],enumerable:!(r=i(t,n))||r.enumerable});return e};var a=e=>j(o({},"__esModule",{value:!0}),e);var T={};f(T,{TransportMock:()=>m});module.exports=a(T);class m{constructor(){}getIdentifier=jest.fn();isSupported=jest.fn();startDiscovering=jest.fn();stopDiscovering=jest.fn();listenToKnownDevices=jest.fn();connect=jest.fn();disconnect=jest.fn()}0&&(module.exports={TransportMock});
1
+ "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var v=(i,n)=>{for(var o in n)r(i,o,{get:n[o],enumerable:!0})},f=(i,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of c(n))!p.call(i,t)&&t!==o&&r(i,t,{get:()=>n[t],enumerable:!(e=s(n,t))||e.enumerable});return i};var a=i=>f(r({},"__esModule",{value:!0}),i);var T={};v(T,{TransportMock:()=>m});module.exports=a(T);class m{constructor(){}getIdentifier=vi.fn();isSupported=vi.fn();startDiscovering=vi.fn();stopDiscovering=vi.fn();listenToKnownDevices=vi.fn();connect=vi.fn();disconnect=vi.fn()}0&&(module.exports={TransportMock});
2
2
  //# sourceMappingURL=TransportMock.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/transport/model/__mocks__/TransportMock.ts"],
4
- "sourcesContent": ["import { type Transport } from \"@api/transport/model/Transport\";\n\nexport class TransportMock implements Transport {\n constructor() {}\n getIdentifier = jest.fn();\n isSupported = jest.fn();\n startDiscovering = jest.fn();\n stopDiscovering = jest.fn();\n listenToKnownDevices = jest.fn();\n connect = jest.fn();\n disconnect = jest.fn();\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAAmC,CAC9C,aAAc,CAAC,CACf,cAAgB,KAAK,GAAG,EACxB,YAAc,KAAK,GAAG,EACtB,iBAAmB,KAAK,GAAG,EAC3B,gBAAkB,KAAK,GAAG,EAC1B,qBAAuB,KAAK,GAAG,EAC/B,QAAU,KAAK,GAAG,EAClB,WAAa,KAAK,GAAG,CACvB",
4
+ "sourcesContent": ["import { type Transport } from \"@api/transport/model/Transport\";\n\nexport class TransportMock implements Transport {\n constructor() {}\n getIdentifier = vi.fn();\n isSupported = vi.fn();\n startDiscovering = vi.fn();\n stopDiscovering = vi.fn();\n listenToKnownDevices = vi.fn();\n connect = vi.fn();\n disconnect = vi.fn();\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAAmC,CAC9C,aAAc,CAAC,CACf,cAAgB,GAAG,GAAG,EACtB,YAAc,GAAG,GAAG,EACpB,iBAAmB,GAAG,GAAG,EACzB,gBAAkB,GAAG,GAAG,EACxB,qBAAuB,GAAG,GAAG,EAC7B,QAAU,GAAG,GAAG,EAChB,WAAa,GAAG,GAAG,CACrB",
6
6
  "names": ["TransportMock_exports", "__export", "TransportMock", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./Base64String");describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdG/zdGluZyBz+HI9");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI=");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdH==");expect(t).toBeTruthy()}),it("should return true for an empty string",()=>{const t=(0,e.isBase64String)("");expect(t).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const t=(0,e.isBase64String)("invalid base64 string");expect(t).toBeFalsy()}),it("should return false with 3 paddings",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzd===");expect(t).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI");expect(t).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{jest.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const t=(0,e.base64StringToBuffer)("");expect(t).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const t=(0,e.base64StringToBuffer)("invalid string");expect(t).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const t=(0,e.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(t).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))}),it("should convert a base64 string to a buffer using Buffer",()=>{jest.spyOn(global,"atob").mockImplementation(()=>{throw new Error("atob is not defined")});const t=(0,e.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(t).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))})})});
1
+ "use strict";var e=require("./Base64String");describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdG/zdGluZyBz+HI9");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI=");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdH==");expect(t).toBeTruthy()}),it("should return true for an empty string",()=>{const t=(0,e.isBase64String)("");expect(t).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const t=(0,e.isBase64String)("invalid base64 string");expect(t).toBeFalsy()}),it("should return false with 3 paddings",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzd===");expect(t).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const t=(0,e.isBase64String)("Zmlyc3QgdGVzdGluZyBzdHI");expect(t).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{vi.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const t=(0,e.base64StringToBuffer)("");expect(t).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const t=(0,e.base64StringToBuffer)("invalid string");expect(t).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const t=(0,e.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(t).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))}),it("should convert a base64 string to a buffer using Buffer",()=>{vi.spyOn(global,"atob").mockImplementation(()=>{throw new Error("atob is not defined")});const t=(0,e.base64StringToBuffer)("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(t).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))})})});
2
2
  //# sourceMappingURL=Base64String.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/api/utils/Base64String.test.ts"],
4
- "sourcesContent": ["import { base64StringToBuffer, isBase64String } from \"./Base64String\";\n\ndescribe(\"Base64String\", () => {\n describe(\"isBase64String function\", () => {\n it(\"should return true if the value is a valid base64 string\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdG/zdGluZyBz+HI9\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, one padding\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, two paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdH==\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true for an empty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false for an invalid base64 string\", () => {\n // GIVEN\n const value = \"invalid base64 string\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false with 3 paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzd===\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false on incomplete string (not multiple of 4)\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n\n describe(\"base64StringToBuffer function\", () => {\n beforeEach(() => {\n jest.resetAllMocks();\n });\n\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"invalid base64 string converted to null\", () => {\n // GIVEN\n const value = \"invalid string\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert a base64 string to a buffer using browser's atob\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n\n it(\"should convert a base64 string to a buffer using Buffer\", () => {\n // GIVEN\n jest.spyOn(global, \"atob\").mockImplementation(() => {\n throw new Error(\"atob is not defined\");\n });\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAAqD,0BAErD,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,I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IAAM,GAC5D,IAAM,IAAM,IAAM,IAAM,IAAM,GAChC,CAAC,CACH,CACF,CAAC,EAED,GAAG,0DAA2D,IAAM,CAElE,KAAK,MAAM,OAAQ,MAAM,EAAE,mBAAmB,IAAM,CAClD,MAAM,IAAI,MAAM,qBAAqB,CACvC,CAAC,EAID,MAAMA,KAAS,wBAHD,0BAG2B,EAGzC,OAAOA,CAAM,EAAE,cACb,WAAW,KAAK,CACd,IAAM,IAAM,IAAM,IAAM,IAAM,GAAM,IAAM,IAAM,IAAM,IAAM,GAC5D,IAAM,IAAM,IAAM,IAAM,IAAM,GAChC,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { base64StringToBuffer, isBase64String } from \"./Base64String\";\n\ndescribe(\"Base64String\", () => {\n describe(\"isBase64String function\", () => {\n it(\"should return true if the value is a valid base64 string\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdG/zdGluZyBz+HI9\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, one padding\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI=\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if the value is a valid base64 string, two paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdH==\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true for an empty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false for an invalid base64 string\", () => {\n // GIVEN\n const value = \"invalid base64 string\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false with 3 paddings\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzd===\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false on incomplete string (not multiple of 4)\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdGluZyBzdHI\";\n\n // WHEN\n const result = isBase64String(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n\n describe(\"base64StringToBuffer function\", () => {\n beforeEach(() => {\n vi.resetAllMocks();\n });\n\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"invalid base64 string converted to null\", () => {\n // GIVEN\n const value = \"invalid string\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert a base64 string to a buffer using browser's atob\", () => {\n // GIVEN\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n\n it(\"should convert a base64 string to a buffer using Buffer\", () => {\n // GIVEN\n vi.spyOn(global, \"atob\").mockImplementation(() => {\n throw new Error(\"atob is not defined\");\n });\n const value = \"Zmlyc3QgdGVzdCBzdHJpbmc=\";\n\n // WHEN\n const result = base64StringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n Uint8Array.from([\n 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20,\n 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,\n ]),\n );\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAAqD,0BAErD,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,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,IAAM,GAC5D,IAAM,IAAM,IAAM,IAAM,IAAM,GAChC,CAAC,CACH,CACF,CAAC,EAED,GAAG,0DAA2D,IAAM,CAElE,GAAG,MAAM,OAAQ,MAAM,EAAE,mBAAmB,IAAM,CAChD,MAAM,IAAI,MAAM,qBAAqB,CACvC,CAAC,EAID,MAAMA,KAAS,wBAHD,0BAG2B,EAGzC,OAAOA,CAAM,EAAE,cACb,WAAW,KAAK,CACd,IAAM,IAAM,IAAM,IAAM,IAAM,GAAM,IAAM,IAAM,IAAM,IAAM,GAC5D,IAAM,IAAM,IAAM,IAAM,IAAM,GAChC,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_Base64String", "result"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var e=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var f=(t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})},g=(t,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of o(r))!x.call(t,i)&&i!==n&&e(t,i,{get:()=>r[i],enumerable:!(s=a(r,i))||s.enumerable});return t};var p=t=>g(e({},"__esModule",{value:!0}),t);var c={};f(c,{bufferToHexaString:()=>A,hexaStringToBuffer:()=>y,isHexaString:()=>S});module.exports=p(c);const S=t=>/^0x[0-9a-fA-F]*$/.test(t),y=t=>{if(t.startsWith("0x")&&(t=t.slice(2)),t.length===0)return new Uint8Array;if(t.length%2!==0&&(t="0"+t),/^[0-9a-fA-F]*$/.test(t)===!1)return null;const r=t.match(/.{1,2}/g)?.map(n=>parseInt(n,16));return!r||r.some(isNaN)?null:new Uint8Array(r)},A=t=>`0x${Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}`;0&&(module.exports={bufferToHexaString,hexaStringToBuffer,isHexaString});
1
+ "use strict";var e=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var a=(t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})},g=(t,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of f(r))!x.call(t,i)&&i!==n&&e(t,i,{get:()=>r[i],enumerable:!(s=o(r,i))||s.enumerable});return t};var p=t=>g(e({},"__esModule",{value:!0}),t);var c={};a(c,{bufferToHexaString:()=>A,hexaStringToBuffer:()=>S,isHexaString:()=>y});module.exports=p(c);const y=t=>typeof t=="string"&&/^0x[0-9a-fA-F]*$/.test(t),S=t=>{if(t.startsWith("0x")&&(t=t.slice(2)),t.length===0)return new Uint8Array;if(t.length%2!==0&&(t="0"+t),/^[0-9a-fA-F]*$/.test(t)===!1)return null;const r=t.match(/.{1,2}/g)?.map(n=>parseInt(n,16));return!r||r.some(isNaN)?null:new Uint8Array(r)},A=t=>`0x${Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}`;0&&(module.exports={bufferToHexaString,hexaStringToBuffer,isHexaString});
2
2
  //# sourceMappingURL=HexaString.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/api/utils/HexaString.ts"],
4
- "sourcesContent": ["export type HexaString = `0x${string}`;\n\nexport const isHexaString = (value: string): value is HexaString => {\n return /^0x[0-9a-fA-F]*$/.test(value);\n};\n\nexport const hexaStringToBuffer = (value: string): Uint8Array | null => {\n if (value.startsWith(\"0x\")) {\n value = value.slice(2);\n }\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (value.length % 2 !== 0) {\n value = \"0\" + value;\n }\n if (/^[0-9a-fA-F]*$/.test(value) === false) {\n return null;\n }\n const bytes = value.match(/.{1,2}/g)?.map((byte) => parseInt(byte, 16));\n if (!bytes || bytes.some(isNaN)) {\n return null;\n }\n return new Uint8Array(bytes);\n};\n\nexport const bufferToHexaString = (value: Uint8Array): HexaString => {\n return `0x${Array.from(value, (byte) =>\n byte.toString(16).padStart(2, \"0\"),\n ).join(\"\")}`;\n};\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,uBAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAL,GAEO,MAAMI,EAAgBE,GACpB,mBAAmB,KAAKA,CAAK,EAGzBH,EAAsBG,GAAqC,CAItE,GAHIA,EAAM,WAAW,IAAI,IACvBA,EAAQA,EAAM,MAAM,CAAC,GAEnBA,EAAM,SAAW,EACnB,OAAO,IAAI,WAKb,GAHIA,EAAM,OAAS,IAAM,IACvBA,EAAQ,IAAMA,GAEZ,iBAAiB,KAAKA,CAAK,IAAM,GACnC,OAAO,KAET,MAAMC,EAAQD,EAAM,MAAM,SAAS,GAAG,IAAKE,GAAS,SAASA,EAAM,EAAE,CAAC,EACtE,MAAI,CAACD,GAASA,EAAM,KAAK,KAAK,EACrB,KAEF,IAAI,WAAWA,CAAK,CAC7B,EAEaL,EAAsBI,GAC1B,KAAK,MAAM,KAAKA,EAAQE,GAC7BA,EAAK,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CACnC,EAAE,KAAK,EAAE,CAAC",
4
+ "sourcesContent": ["export type HexaString = `0x${string}`;\n\nexport const isHexaString = (value: unknown): value is HexaString => {\n return typeof value === \"string\" && /^0x[0-9a-fA-F]*$/.test(value);\n};\n\nexport const hexaStringToBuffer = (value: string): Uint8Array | null => {\n if (value.startsWith(\"0x\")) {\n value = value.slice(2);\n }\n if (value.length === 0) {\n return new Uint8Array();\n }\n if (value.length % 2 !== 0) {\n value = \"0\" + value;\n }\n if (/^[0-9a-fA-F]*$/.test(value) === false) {\n return null;\n }\n const bytes = value.match(/.{1,2}/g)?.map((byte) => parseInt(byte, 16));\n if (!bytes || bytes.some(isNaN)) {\n return null;\n }\n return new Uint8Array(bytes);\n};\n\nexport const bufferToHexaString = (value: Uint8Array): HexaString => {\n return `0x${Array.from(value, (byte) =>\n byte.toString(16).padStart(2, \"0\"),\n ).join(\"\")}`;\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,EAAA,uBAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAL,GAEO,MAAMI,EAAgBE,GACpB,OAAOA,GAAU,UAAY,mBAAmB,KAAKA,CAAK,EAGtDH,EAAsBG,GAAqC,CAItE,GAHIA,EAAM,WAAW,IAAI,IACvBA,EAAQA,EAAM,MAAM,CAAC,GAEnBA,EAAM,SAAW,EACnB,OAAO,IAAI,WAKb,GAHIA,EAAM,OAAS,IAAM,IACvBA,EAAQ,IAAMA,GAEZ,iBAAiB,KAAKA,CAAK,IAAM,GACnC,OAAO,KAET,MAAMC,EAAQD,EAAM,MAAM,SAAS,GAAG,IAAKE,GAAS,SAASA,EAAM,EAAE,CAAC,EACtE,MAAI,CAACD,GAASA,EAAM,KAAK,KAAK,EACrB,KAEF,IAAI,WAAWA,CAAK,CAC7B,EAEaL,EAAsBI,GAC1B,KAAK,MAAM,KAAKA,EAAQE,GAC7BA,EAAK,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CACnC,EAAE,KAAK,EAAE,CAAC",
6
6
  "names": ["HexaString_exports", "__export", "bufferToHexaString", "hexaStringToBuffer", "isHexaString", "__toCommonJS", "value", "bytes", "byte"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./HexaString");describe("HexaString",()=>{describe("isHexaString function",()=>{it("should return true if the value is a valid hex string",()=>{const t=(0,e.isHexaString)("0x1234abc");expect(t).toBeTruthy()}),it("should return true if no data",()=>{const t=(0,e.isHexaString)("0x");expect(t).toBeTruthy()}),it("should return false if the value contain an invalid letter",()=>{const t=(0,e.isHexaString)("0x1234z");expect(t).toBeFalsy()}),it("should return false if the value does not start with 0x",()=>{const t=(0,e.isHexaString)("1234abc");expect(t).toBeFalsy()}),it("should return false for an epmty string",()=>{const t=(0,e.isHexaString)("");expect(t).toBeFalsy()})}),describe("hexaStringToBuffer function",()=>{it("should convert empty input to empty buffer",()=>{const t=(0,e.hexaStringToBuffer)("");expect(t).toStrictEqual(new Uint8Array)}),it("should fail on invalid string",()=>{const t=(0,e.hexaStringToBuffer)("bonjour");expect(t).toStrictEqual(null)}),it("should fail on invalid string with valid numbers",()=>{const t=(0,e.hexaStringToBuffer)("0x012n34");expect(t).toStrictEqual(null)}),it("should convert correct hexadecimal string",()=>{const t=(0,e.hexaStringToBuffer)("1a35669f0100");expect(t).toStrictEqual(new Uint8Array([26,53,102,159,1,0]))}),it("should support 0x prefix",()=>{const t=(0,e.hexaStringToBuffer)("0x1a35");expect(t).toStrictEqual(new Uint8Array([26,53]))}),it("should be case insensitive",()=>{const t=(0,e.hexaStringToBuffer)("0xcCDd");expect(t).toStrictEqual(new Uint8Array([204,221]))}),it("should pad with 0",()=>{const t=(0,e.hexaStringToBuffer)("0xa35");expect(t).toStrictEqual(new Uint8Array([10,53]))})}),describe("bufferToHexaString function",()=>{it("should convert a buffer into a hexa string",()=>{const u=Uint8Array.from([0,1,2,255,254]),t=(0,e.bufferToHexaString)(u);expect(t).toStrictEqual("0x000102fffe")})})});
1
+ "use strict";var e=require("./HexaString");describe("HexaString",()=>{describe("isHexaString function",()=>{it("should return true if the value is a valid hex string",()=>{const t=(0,e.isHexaString)("0x1234abc");expect(t).toBeTruthy()}),it("should return true if no data",()=>{const t=(0,e.isHexaString)("0x");expect(t).toBeTruthy()}),it("should return false if the value contain an invalid letter",()=>{const t=(0,e.isHexaString)("0x1234z");expect(t).toBeFalsy()}),it("should return false if the value does not start with 0x",()=>{const t=(0,e.isHexaString)("1234abc");expect(t).toBeFalsy()}),it("should return false for an epmty string",()=>{const t=(0,e.isHexaString)("");expect(t).toBeFalsy()}),it.each([123,[],{},null,void 0,!0])("should return false for invalid input %p",u=>{const t=(0,e.isHexaString)(u);expect(t).toBeFalsy()})}),describe("hexaStringToBuffer function",()=>{it("should convert empty input to empty buffer",()=>{const t=(0,e.hexaStringToBuffer)("");expect(t).toStrictEqual(new Uint8Array)}),it("should fail on invalid string",()=>{const t=(0,e.hexaStringToBuffer)("bonjour");expect(t).toStrictEqual(null)}),it("should fail on invalid string with valid numbers",()=>{const t=(0,e.hexaStringToBuffer)("0x012n34");expect(t).toStrictEqual(null)}),it("should convert correct hexadecimal string",()=>{const t=(0,e.hexaStringToBuffer)("1a35669f0100");expect(t).toStrictEqual(new Uint8Array([26,53,102,159,1,0]))}),it("should support 0x prefix",()=>{const t=(0,e.hexaStringToBuffer)("0x1a35");expect(t).toStrictEqual(new Uint8Array([26,53]))}),it("should be case insensitive",()=>{const t=(0,e.hexaStringToBuffer)("0xcCDd");expect(t).toStrictEqual(new Uint8Array([204,221]))}),it("should pad with 0",()=>{const t=(0,e.hexaStringToBuffer)("0xa35");expect(t).toStrictEqual(new Uint8Array([10,53]))})}),describe("bufferToHexaString function",()=>{it("should convert a buffer into a hexa string",()=>{const u=Uint8Array.from([0,1,2,255,254]),t=(0,e.bufferToHexaString)(u);expect(t).toStrictEqual("0x000102fffe")})})});
2
2
  //# sourceMappingURL=HexaString.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/api/utils/HexaString.test.ts"],
4
- "sourcesContent": ["import {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"./HexaString\";\n\ndescribe(\"HexaString\", () => {\n describe(\"isHexaString function\", () => {\n it(\"should return true if the value is a valid hex string\", () => {\n // GIVEN\n const value = \"0x1234abc\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if no data\", () => {\n // GIVEN\n const value = \"0x\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false if the value contain an invalid letter\", () => {\n // GIVEN\n const value = \"0x1234z\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false if the value does not start with 0x\", () => {\n // GIVEN\n const value = \"1234abc\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false for an epmty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n });\n\n describe(\"hexaStringToBuffer function\", () => {\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"should fail on invalid string\", () => {\n // GIVEN\n const value = \"bonjour\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should fail on invalid string with valid numbers\", () => {\n // GIVEN\n const value = \"0x012n34\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert correct hexadecimal string\", () => {\n // GIVEN\n const value = \"1a35669f0100\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n new Uint8Array([0x1a, 0x35, 0x66, 0x9f, 0x01, 0x00]),\n );\n });\n\n it(\"should support 0x prefix\", () => {\n // GIVEN\n const value = \"0x1a35\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0x1a, 0x35]));\n });\n\n it(\"should be case insensitive\", () => {\n // GIVEN\n const value = \"0xcCDd\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0xcc, 0xdd]));\n });\n\n it(\"should pad with 0\", () => {\n // GIVEN\n const value = \"0xa35\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0x0a, 0x35]));\n });\n });\n\n describe(\"bufferToHexaString function\", () => {\n it(\"should convert a buffer into a hexa string\", () => {\n // GIVEN\n const value = Uint8Array.from([0, 1, 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AM,CAAI,CAAC,CACrD,CACF,CAAC,EAED,GAAG,2BAA4B,IAAM,CAKnC,MAAMA,KAAS,sBAHD,QAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,GAAM,EAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,6BAA8B,IAAM,CAKrC,MAAMA,KAAS,sBAHD,QAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,IAAM,GAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,oBAAqB,IAAM,CAK5B,MAAMA,KAAS,sBAHD,OAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,GAAM,EAAI,CAAC,CAAC,CAC3D,CAAC,CACH,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,GAAG,6CAA8C,IAAM,CAErD,MAAMC,EAAQ,WAAW,KAAK,CAAC,EAAG,EAAG,EAAG,IAAM,GAAI,CAAC,EAG7CD,KAAS,sBAAmBC,CAAK,EAGvC,OAAOD,CAAM,EAAE,cAAc,cAAc,CAC7C,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"./HexaString\";\n\ndescribe(\"HexaString\", () => {\n describe(\"isHexaString function\", () => {\n it(\"should return true if the value is a valid hex string\", () => {\n // GIVEN\n const value = \"0x1234abc\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return true if no data\", () => {\n // GIVEN\n const value = \"0x\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeTruthy();\n });\n\n it(\"should return false if the value contain an invalid letter\", () => {\n // GIVEN\n const value = \"0x1234z\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false if the value does not start with 0x\", () => {\n // GIVEN\n const value = \"1234abc\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it(\"should return false for an epmty string\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n });\n\n it.each([123, [], {}, null, undefined, true])(\n \"should return false for invalid input %p\",\n (value) => {\n // WHEN\n const result = isHexaString(value);\n\n // THEN\n expect(result).toBeFalsy();\n },\n );\n });\n\n describe(\"hexaStringToBuffer function\", () => {\n it(\"should convert empty input to empty buffer\", () => {\n // GIVEN\n const value = \"\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array());\n });\n\n it(\"should fail on invalid string\", () => {\n // GIVEN\n const value = \"bonjour\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should fail on invalid string with valid numbers\", () => {\n // GIVEN\n const value = \"0x012n34\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(null);\n });\n\n it(\"should convert correct hexadecimal string\", () => {\n // GIVEN\n const value = \"1a35669f0100\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(\n new Uint8Array([0x1a, 0x35, 0x66, 0x9f, 0x01, 0x00]),\n );\n });\n\n it(\"should support 0x prefix\", () => {\n // GIVEN\n const value = \"0x1a35\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0x1a, 0x35]));\n });\n\n it(\"should be case insensitive\", () => {\n // GIVEN\n const value = \"0xcCDd\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0xcc, 0xdd]));\n });\n\n it(\"should pad with 0\", () => {\n // GIVEN\n const value = \"0xa35\";\n\n // WHEN\n const result = hexaStringToBuffer(value);\n\n // THEN\n expect(result).toStrictEqual(new Uint8Array([0x0a, 0x35]));\n });\n });\n\n describe(\"bufferToHexaString function\", () => {\n it(\"should convert a buffer into a hexa string\", () => {\n // GIVEN\n const value = Uint8Array.from([0, 1, 2, 0xff, 0xfe]);\n\n // WHEN\n const result = bufferToHexaString(value);\n\n // THEN\n expect(result).toStrictEqual(\"0x000102fffe\");\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAIO,wBAEP,SAAS,aAAc,IAAM,CAC3B,SAAS,wBAAyB,IAAM,CACtC,GAAG,wDAAyD,IAAM,CAKhE,MAAMC,KAAS,gBAHD,WAGmB,EAGjC,OAAOA,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,gCAAiC,IAAM,CAKxC,MAAMA,KAAS,gBAHD,IAGmB,EAGjC,OAAOA,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,6DAA8D,IAAM,CAKrE,MAAMA,KAAS,gBAHD,SAGmB,EAGjC,OAAOA,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0DAA2D,IAAM,CAKlE,MAAMA,KAAS,gBAHD,SAGmB,EAGjC,OAAOA,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,KAAS,gBAHD,EAGmB,EAGjC,OAAOA,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,KAAK,CAAC,IAAK,CAAC,EAAG,CAAC,EAAG,KAAM,OAAW,EAAI,CAAC,EAC1C,2CACCC,GAAU,CAET,MAAMD,KAAS,gBAAaC,CAAK,EAGjC,OAAOD,CAAM,EAAE,UAAU,CAC3B,CACF,CACF,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,GAAG,6CAA8C,IAAM,CAKrD,MAAMA,KAAS,sBAHD,EAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,UAAY,CAC/C,CAAC,EAED,GAAG,gCAAiC,IAAM,CAKxC,MAAMA,KAAS,sBAHD,SAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,mDAAoD,IAAM,CAK3D,MAAMA,KAAS,sBAHD,UAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,4CAA6C,IAAM,CAKpD,MAAMA,KAAS,sBAHD,cAGyB,EAGvC,OAAOA,CAAM,EAAE,cACb,IAAI,WAAW,CAAC,GAAM,GAAM,IAAM,IAAM,EAAM,CAAI,CAAC,CACrD,CACF,CAAC,EAED,GAAG,2BAA4B,IAAM,CAKnC,MAAMA,KAAS,sBAHD,QAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,GAAM,EAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,6BAA8B,IAAM,CAKrC,MAAMA,KAAS,sBAHD,QAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,IAAM,GAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,oBAAqB,IAAM,CAK5B,MAAMA,KAAS,sBAHD,OAGyB,EAGvC,OAAOA,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,GAAM,EAAI,CAAC,CAAC,CAC3D,CAAC,CACH,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,GAAG,6CAA8C,IAAM,CAErD,MAAMC,EAAQ,WAAW,KAAK,CAAC,EAAG,EAAG,EAAG,IAAM,GAAI,CAAC,EAG7CD,KAAS,sBAAmBC,CAAK,EAGvC,OAAOD,CAAM,EAAE,cAAc,cAAc,CAC7C,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_HexaString", "result", "value"]
7
7
  }
package/lib/cjs/src/di.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var S=(o,r)=>{for(var t in r)a(o,t,{get:r[t],enumerable:!0})},U=(o,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of _(r))!E.call(o,e)&&e!==t&&a(o,e,{get:()=>r[e],enumerable:!(i=A(r,e))||i.enumerable});return o};var C=o=>U(a({},"__esModule",{value:!0}),o);var k={};S(k,{makeContainer:()=>L});module.exports=C(k);var c=require("inversify"),p=require("./api/command/di/commandModule"),n=require("./api/device-action/di/deviceActionModule"),l=require("./internal/config/di/configModule"),f=require("./internal/device-model/di/deviceModelModule"),d=require("./internal/device-session/di/deviceSessionModule"),y=require("./internal/discovery/di/discoveryModule"),F=require("./internal/logger-publisher/di/loggerModule"),M=require("./internal/manager-api/di/managerApiModule"),m=require("./internal/manager-api/model/Const"),g=require("./internal/send/di/sendModule"),s=require("./internal/transport/di/transportModule");const L=({stub:o=!1,transports:r=[],loggers:t=[],config:i={mockUrl:m.DEFAULT_MOCK_SERVER_BASE_URL,managerApiUrl:m.DEFAULT_MANAGER_API_BASE_URL,webSocketUrl:m.DEFAULT_WEB_SOCKET_BASE_URL}})=>{const e=new c.Container;return e.load((0,l.configModuleFactory)({stub:o}),(0,f.deviceModelModuleFactory)({stub:o}),(0,s.transportModuleFactory)({stub:o,transports:r,config:i}),(0,M.managerApiModuleFactory)({stub:o,config:i}),(0,y.discoveryModuleFactory)({stub:o}),(0,F.loggerModuleFactory)({subscribers:t}),(0,d.deviceSessionModuleFactory)({stub:o}),(0,g.sendModuleFactory)({stub:o}),(0,p.commandModuleFactory)({stub:o}),(0,n.deviceActionModuleFactory)({stub:o})),e};0&&(module.exports={makeContainer});
1
+ "use strict";var a=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var U=(o,r)=>{for(var t in r)a(o,t,{get:r[t],enumerable:!0})},u=(o,r,t,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of S(r))!C.call(o,e)&&e!==t&&a(o,e,{get:()=>r[e],enumerable:!(m=E(r,e))||m.enumerable});return o};var L=o=>u(a({},"__esModule",{value:!0}),o);var v={};U(v,{makeContainer:()=>k});module.exports=L(v);var p=require("inversify"),c=require("./api/command/di/commandModule"),n=require("./api/device-action/di/deviceActionModule"),l=require("./internal/config/di/configModule"),f=require("./internal/device-model/di/deviceModelModule"),d=require("./internal/device-session/di/deviceSessionModule"),y=require("./internal/discovery/di/discoveryModule"),F=require("./internal/logger-publisher/di/loggerModule"),M=require("./internal/manager-api/di/managerApiModule"),i=require("./internal/manager-api/model/Const"),s=require("./internal/secure-channel/di/secureChannelModule"),g=require("./internal/secure-channel/model/Const"),A=require("./internal/send/di/sendModule"),_=require("./internal/transport/di/transportModule");const k=({stub:o=!1,transports:r=[],loggers:t=[],config:m={mockUrl:i.DEFAULT_MOCK_SERVER_BASE_URL,managerApiUrl:i.DEFAULT_MANAGER_API_BASE_URL,webSocketUrl:g.DEFAULT_WEB_SOCKET_BASE_URL}})=>{const e=new p.Container;return e.load((0,l.configModuleFactory)({stub:o}),(0,f.deviceModelModuleFactory)({stub:o}),(0,_.transportModuleFactory)({stub:o,transports:r,config:m}),(0,M.managerApiModuleFactory)({stub:o,config:m}),(0,s.secureChannelModuleFactory)({stub:o,config:m}),(0,y.discoveryModuleFactory)({stub:o}),(0,F.loggerModuleFactory)({subscribers:t}),(0,d.deviceSessionModuleFactory)({stub:o}),(0,A.sendModuleFactory)({stub:o}),(0,c.commandModuleFactory)({stub:o}),(0,n.deviceActionModuleFactory)({stub:o})),e};0&&(module.exports={makeContainer});
2
2
  //# sourceMappingURL=di.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/di.ts"],
4
- "sourcesContent": ["import { Container } from \"inversify\";\n\n// Uncomment this line to enable the logger middleware\n// import { makeLoggerMiddleware } from \"inversify-logger-middleware\";\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n DEFAULT_WEB_SOCKET_BASE_URL,\n} from \"@internal/manager-api/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\n// Uncomment this line to enable the logger middleware\n// const logger = makeLoggerMiddleware();\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n // Uncomment this line to enable the logger middleware\n // container.applyMiddleware(logger);\n\n container.load(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,qBAI1BC,EAAqC,yCACrCC,EAA0C,oDAI1CC,EAAoC,4CACpCC,EAAyC,uDACzCC,EAA2C,2DAC3CC,EAAuC,kDACvCC,EAAoC,sDACpCC,EAAwC,qDACxCC,EAIO,6CACPC,EAAkC,wCAClCC,EAAuC,mDAYhC,MAAMb,EAAgB,CAAC,CAC5B,KAAAc,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAAS,+BACT,cAAe,+BACf,aAAc,6BAChB,CACF,IAAmC,CACjC,MAAMC,EAAY,IAAI,YAKtB,OAAAA,EAAU,QACR,uBAAoB,CAAE,KAAAJ,CAAK,CAAC,KAC5B,4BAAyB,CAAE,KAAAA,CAAK,CAAC,KACjC,0BAAuB,CAAE,KAAAA,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,KACnD,2BAAwB,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KACxC,0BAAuB,CAAE,KAAAH,CAAK,CAAC,KAC/B,uBAAoB,CAAE,YAAaE,CAAQ,CAAC,KAC5C,8BAA2B,CAAE,KAAAF,CAAK,CAAC,KACnC,qBAAkB,CAAE,KAAAA,CAAK,CAAC,KAC1B,wBAAqB,CAAE,KAAAA,CAAK,CAAC,KAC7B,6BAA0B,CAAE,KAAAA,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
- "names": ["di_exports", "__export", "makeContainer", "__toCommonJS", "import_inversify", "import_commandModule", "import_deviceActionModule", "import_configModule", "import_deviceModelModule", "import_deviceSessionModule", "import_discoveryModule", "import_loggerModule", "import_managerApiModule", "import_Const", "import_sendModule", "import_transportModule", "stub", "transports", "loggers", "config", "container"]
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\n// Uncomment this line to enable the logger middleware\n// import { makeLoggerMiddleware } from \"inversify-logger-middleware\";\nimport { commandModuleFactory } from \"@api/command/di/commandModule\";\nimport { deviceActionModuleFactory } from \"@api/device-action/di/deviceActionModule\";\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { configModuleFactory } from \"@internal/config/di/configModule\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { discoveryModuleFactory } from \"@internal/discovery/di/discoveryModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\nimport { managerApiModuleFactory } from \"@internal/manager-api/di/managerApiModule\";\nimport {\n DEFAULT_MANAGER_API_BASE_URL,\n DEFAULT_MOCK_SERVER_BASE_URL,\n} from \"@internal/manager-api/model/Const\";\nimport { secureChannelModuleFactory } from \"@internal/secure-channel/di/secureChannelModule\";\nimport { DEFAULT_WEB_SOCKET_BASE_URL } from \"@internal/secure-channel/model/Const\";\nimport { sendModuleFactory } from \"@internal/send/di/sendModule\";\nimport { transportModuleFactory } from \"@internal/transport//di/transportModule\";\n\n// Uncomment this line to enable the logger middleware\n// const logger = makeLoggerMiddleware();\n\nexport type MakeContainerProps = {\n stub: boolean;\n transports: TransportFactory[];\n loggers: LoggerSubscriberService[];\n config: DmkConfig;\n};\n\nexport const makeContainer = ({\n stub = false,\n transports = [],\n loggers = [],\n config = {\n mockUrl: DEFAULT_MOCK_SERVER_BASE_URL,\n managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n webSocketUrl: DEFAULT_WEB_SOCKET_BASE_URL,\n },\n}: Partial<MakeContainerProps>) => {\n const container = new Container();\n\n // Uncomment this line to enable the logger middleware\n // container.applyMiddleware(logger);\n\n container.load(\n configModuleFactory({ stub }),\n deviceModelModuleFactory({ stub }),\n transportModuleFactory({ stub, transports, config }),\n managerApiModuleFactory({ stub, config }),\n secureChannelModuleFactory({ stub, config }),\n discoveryModuleFactory({ stub }),\n loggerModuleFactory({ subscribers: loggers }),\n deviceSessionModuleFactory({ stub }),\n sendModuleFactory({ stub }),\n commandModuleFactory({ stub }),\n deviceActionModuleFactory({ stub }),\n // modules go here\n );\n\n return container;\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,qBAI1BC,EAAqC,yCACrCC,EAA0C,oDAI1CC,EAAoC,4CACpCC,EAAyC,uDACzCC,EAA2C,2DAC3CC,EAAuC,kDACvCC,EAAoC,sDACpCC,EAAwC,qDACxCC,EAGO,6CACPC,EAA2C,2DAC3CD,EAA4C,gDAC5CE,EAAkC,wCAClCC,EAAuC,mDAYhC,MAAMd,EAAgB,CAAC,CAC5B,KAAAe,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAAS,+BACT,cAAe,+BACf,aAAc,6BAChB,CACF,IAAmC,CACjC,MAAMC,EAAY,IAAI,YAKtB,OAAAA,EAAU,QACR,uBAAoB,CAAE,KAAAJ,CAAK,CAAC,KAC5B,4BAAyB,CAAE,KAAAA,CAAK,CAAC,KACjC,0BAAuB,CAAE,KAAAA,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,KACnD,2BAAwB,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KACxC,8BAA2B,CAAE,KAAAH,EAAM,OAAAG,CAAO,CAAC,KAC3C,0BAAuB,CAAE,KAAAH,CAAK,CAAC,KAC/B,uBAAoB,CAAE,YAAaE,CAAQ,CAAC,KAC5C,8BAA2B,CAAE,KAAAF,CAAK,CAAC,KACnC,qBAAkB,CAAE,KAAAA,CAAK,CAAC,KAC1B,wBAAqB,CAAE,KAAAA,CAAK,CAAC,KAC7B,6BAA0B,CAAE,KAAAA,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
+ "names": ["di_exports", "__export", "makeContainer", "__toCommonJS", "import_inversify", "import_commandModule", "import_deviceActionModule", "import_configModule", "import_deviceModelModule", "import_deviceSessionModule", "import_discoveryModule", "import_loggerModule", "import_managerApiModule", "import_Const", "import_secureChannelModule", "import_sendModule", "import_transportModule", "stub", "transports", "loggers", "config", "container"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var j=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var e=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(r,c)=>{for(var t in c)j(r,t,{get:c[t],enumerable:!0})},h=(r,c,t,f)=>{if(c&&typeof c=="object"||typeof c=="function")for(let o of e(c))!d.call(r,o)&&o!==t&&j(r,o,{get:()=>c[o],enumerable:!(f=n(c,o))||f.enumerable});return r};var k=r=>h(j({},"__esModule",{value:!0}),r),p=(r,c,t,f)=>{for(var o=f>1?void 0:f?n(c,t):c,l=r.length-1,m;l>=0;l--)(m=r[l])&&(o=(f?m(c,t,o):m(o))||o);return f&&o&&j(c,t,o),o};var q={};g(q,{StubUseCase:()=>i});module.exports=k(q);var x=require("inversify");let i=class{execute=jest.fn(()=>"stub")};i=p([(0,x.injectable)()],i);0&&(module.exports={StubUseCase});
1
+ "use strict";var m=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var e=(o,c)=>{for(var r in c)m(o,r,{get:c[r],enumerable:!0})},g=(o,c,r,f)=>{if(c&&typeof c=="object"||typeof c=="function")for(let i of v(c))!d.call(o,i)&&i!==r&&m(o,i,{get:()=>c[i],enumerable:!(f=t(c,i))||f.enumerable});return o};var h=o=>g(m({},"__esModule",{value:!0}),o),x=(o,c,r,f)=>{for(var i=f>1?void 0:f?t(c,r):c,n=o.length-1,p;n>=0;n--)(p=o[n])&&(i=(f?p(c,r,i):p(i))||i);return f&&i&&m(c,r,i),i};var k={};e(k,{StubUseCase:()=>l});module.exports=h(k);var j=require("inversify");let l=class{execute=vi.fn(()=>"stub")};l=x([(0,j.injectable)()],l);0&&(module.exports={StubUseCase});
2
2
  //# sourceMappingURL=di.stub.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/di.stub.ts"],
4
- "sourcesContent": ["import { injectable } from \"inversify\";\n\n@injectable()\nexport class StubUseCase {\n execute = jest.fn(() => \"stub\");\n}\n"],
5
- "mappings": "2iBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,qBAGpB,IAAMC,EAAN,KAAkB,CACvB,QAAU,KAAK,GAAG,IAAM,MAAM,CAChC,EAFaA,EAANC,EAAA,IADN,cAAW,GACCD",
4
+ "sourcesContent": ["import { injectable } from \"inversify\";\n\n@injectable()\nexport class StubUseCase {\n execute = vi.fn(() => \"stub\");\n}\n"],
5
+ "mappings": "2iBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,qBAGpB,IAAMC,EAAN,KAAkB,CACvB,QAAU,GAAG,GAAG,IAAM,MAAM,CAC9B,EAFaA,EAANC,EAAA,IADN,cAAW,GACCD",
6
6
  "names": ["di_stub_exports", "__export", "StubUseCase", "__toCommonJS", "import_inversify", "StubUseCase", "__decorateClass"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var p=Object.create;var u=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var E=(e,r,o,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of g(r))!h.call(e,t)&&t!==o&&u(e,t,{get:()=>r[t],enumerable:!(m=S(r,t))||m.enumerable});return e};var f=(e,r,o)=>(o=e!=null?p(v(e)):{},E(r||!e||!e.__esModule?u(o,"default",{value:e,enumerable:!0}):o,e));var n=require("purify-ts"),c=require("../../config/model/Errors"),d=f(require("../../../../package.json")),l=f(require("./LocalConfigDataSource"));const{FileLocalConfigDataSource:D}=l,i=jest.spyOn(l,"stubFsReadFile"),a=jest.spyOn(JSON,"parse");let s;describe("LocalConfigDataSource",()=>{describe("FileLocalConfigDataSource",()=>{beforeEach(()=>{i.mockClear(),a.mockClear(),s=new D}),afterAll(()=>{i.mockRestore(),a.mockRestore()}),it("should return an Either<never, Config>",()=>{i.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),a.mockReturnValue({name:"DeviceSDK",version:"0.0.0-spied.1"}),expect(s.getConfig()).toStrictEqual(n.Either.of({name:"DeviceSDK",version:"0.0.0-spied.1"}))}),it("should return an Either<ReadFileError, never> if readFileSync throws",()=>{const e=new Error("readFileSync error");i.mockImplementation(()=>{throw e}),expect(s.getConfig()).toEqual((0,n.Left)(new c.ReadFileError(e)))}),it("should return an Either<JSONParseError, never> if JSON.parse throws",()=>{const e=new Error("JSON.parse error");i.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),a.mockImplementation(()=>{throw e}),expect(s.getConfig()).toEqual((0,n.Left)(new c.JSONParseError(e)))})}),describe("stubFsReadFile",()=>{it("should return a stringified version of the version object",()=>{expect(l.stubFsReadFile()).toEqual(JSON.stringify({name:"@ledgerhq/device-management-kit",version:d.default.version}))})})});
1
+ "use strict";var S=Object.create;var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var E=(e,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of g(r))!h.call(e,i)&&i!==o&&l(e,i,{get:()=>r[i],enumerable:!(c=d(r,i))||c.enumerable});return e};var f=(e,r,o)=>(o=e!=null?S(v(e)):{},E(r||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e));var t=require("purify-ts"),a=require("../../config/model/Errors"),p=f(require("../../../../package.json")),s=f(require("./LocalConfigDataSource"));const{FileLocalConfigDataSource:y}=s,u=vi.spyOn(s,"stubFsReadFile"),m=vi.spyOn(JSON,"parse"),D=vi.spyOn(JSON,"stringify");let n;describe("LocalConfigDataSource",()=>{describe("FileLocalConfigDataSource",()=>{beforeEach(()=>{vi.resetAllMocks(),n=new y}),afterAll(()=>{vi.resetAllMocks()}),it("should return an Either<never, Config>",()=>{u.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),m.mockReturnValue({name:"DeviceSDK",version:"0.0.0-spied.1"}),expect(n.getConfig()).toStrictEqual(t.Either.of({name:"DeviceSDK",version:"0.0.0-spied.1"}))}),it("should return an Either<ReadFileError, never> if readFileSync throws",()=>{const e=new Error("readFileSync error");D.mockImplementation(()=>{throw e}),expect(n.getConfig()).toEqual((0,t.Left)(new a.ReadFileError(e)))}),it("should return an Either<JSONParseError, never> if JSON.parse throws",()=>{const e=new Error("JSON.parse error");u.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),m.mockImplementation(()=>{throw e}),expect(n.getConfig()).toEqual((0,t.Left)(new a.JSONParseError(e)))})}),describe("stubFsReadFile",()=>{it("should return a stringified version of the version object",()=>{expect(s.stubFsReadFile()).toEqual(JSON.stringify({name:"@ledgerhq/device-management-kit",version:p.default.version}))})})});
2
2
  //# sourceMappingURL=LocalConfigDataSource.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/data/LocalConfigDataSource.test.ts"],
4
- "sourcesContent": ["import { Either, Left } from \"purify-ts\";\n\nimport { JSONParseError, ReadFileError } from \"@internal/config/model/Errors\";\nimport pkg from \"@root/package.json\";\n\nimport { type LocalConfigDataSource } from \"./ConfigDataSource\";\nimport * as LocalConfig from \"./LocalConfigDataSource\";\n\nconst { FileLocalConfigDataSource } = LocalConfig;\n\nconst readFileSyncSpy = jest.spyOn(LocalConfig, \"stubFsReadFile\");\nconst jsonParse = jest.spyOn(JSON, \"parse\");\n\nlet datasource: LocalConfigDataSource;\ndescribe(\"LocalConfigDataSource\", () => {\n describe(\"FileLocalConfigDataSource\", () => {\n beforeEach(() => {\n readFileSyncSpy.mockClear();\n jsonParse.mockClear();\n datasource = new FileLocalConfigDataSource();\n });\n\n afterAll(() => {\n readFileSyncSpy.mockRestore();\n jsonParse.mockRestore();\n });\n\n it(\"should return an Either<never, Config>\", () => {\n readFileSyncSpy.mockReturnValue(\n JSON.stringify({ name: \"DeviceSDK\", version: \"0.0.0-spied.1\" }),\n );\n\n jsonParse.mockReturnValue({\n name: \"DeviceSDK\",\n version: \"0.0.0-spied.1\",\n });\n\n expect(datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-spied.1\",\n }),\n );\n });\n\n it(\"should return an Either<ReadFileError, never> if readFileSync throws\", () => {\n const err = new Error(\"readFileSync error\");\n readFileSyncSpy.mockImplementation(() => {\n throw err;\n });\n\n expect(datasource.getConfig()).toEqual(Left(new ReadFileError(err)));\n });\n\n it(\"should return an Either<JSONParseError, never> if JSON.parse throws\", () => {\n const err = new Error(\"JSON.parse error\");\n readFileSyncSpy.mockReturnValue(\n JSON.stringify({ name: \"DeviceSDK\", version: \"0.0.0-spied.1\" }),\n );\n\n jsonParse.mockImplementation(() => {\n throw err;\n });\n\n expect(datasource.getConfig()).toEqual(Left(new JSONParseError(err)));\n });\n });\n\n describe(\"stubFsReadFile\", () => {\n it(\"should return a stringified version of the version object\", () => {\n expect(LocalConfig.stubFsReadFile()).toEqual(\n JSON.stringify({\n name: \"@ledgerhq/device-management-kit\",\n version: pkg.version,\n }),\n );\n });\n });\n});\n"],
5
- "mappings": "wdAAA,IAAAA,EAA6B,qBAE7BC,EAA8C,yCAC9CC,EAAgB,iCAGhBC,EAA6B,sCAE7B,KAAM,CAAE,0BAAAC,CAA0B,EAAID,EAEhCE,EAAkB,KAAK,MAAMF,EAAa,gBAAgB,EAC1DG,EAAY,KAAK,MAAM,KAAM,OA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ocalConfig", "FileLocalConfigDataSource", "readFileSyncSpy", "jsonParse", "datasource", "err", "pkg"]
4
+ "sourcesContent": ["import { Either, Left } from \"purify-ts\";\n\nimport { JSONParseError, ReadFileError } from \"@internal/config/model/Errors\";\nimport pkg from \"@root/package.json\";\n\nimport { type LocalConfigDataSource } from \"./ConfigDataSource\";\nimport * as LocalConfig from \"./LocalConfigDataSource\";\n\nconst { FileLocalConfigDataSource } = LocalConfig;\n\nconst readFileSyncSpy = vi.spyOn(LocalConfig, \"stubFsReadFile\");\nconst jsonParse = vi.spyOn(JSON, \"parse\");\nconst jsonStringify = vi.spyOn(JSON, \"stringify\");\n\nlet datasource: LocalConfigDataSource;\ndescribe(\"LocalConfigDataSource\", () => {\n describe(\"FileLocalConfigDataSource\", () => {\n beforeEach(() => {\n vi.resetAllMocks();\n datasource = new FileLocalConfigDataSource();\n });\n\n afterAll(() => {\n vi.resetAllMocks();\n });\n\n it(\"should return an Either<never, Config>\", () => {\n readFileSyncSpy.mockReturnValue(\n JSON.stringify({ name: \"DeviceSDK\", version: \"0.0.0-spied.1\" }),\n );\n\n jsonParse.mockReturnValue({\n name: \"DeviceSDK\",\n version: \"0.0.0-spied.1\",\n });\n\n expect(datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-spied.1\",\n }),\n );\n });\n\n it(\"should return an Either<ReadFileError, never> if readFileSync throws\", () => {\n const err = new Error(\"readFileSync error\");\n jsonStringify.mockImplementation(() => {\n throw err;\n });\n\n expect(datasource.getConfig()).toEqual(Left(new ReadFileError(err)));\n });\n\n it(\"should return an Either<JSONParseError, never> if JSON.parse throws\", () => {\n const err = new Error(\"JSON.parse error\");\n readFileSyncSpy.mockReturnValue(\n JSON.stringify({ name: \"DeviceSDK\", version: \"0.0.0-spied.1\" }),\n );\n\n jsonParse.mockImplementation(() => {\n throw err;\n });\n\n expect(datasource.getConfig()).toEqual(Left(new JSONParseError(err)));\n });\n });\n\n describe(\"stubFsReadFile\", () => {\n it(\"should return a stringified version of the version object\", () => {\n expect(LocalConfig.stubFsReadFile()).toEqual(\n JSON.stringify({\n name: \"@ledgerhq/device-management-kit\",\n version: pkg.version,\n }),\n );\n });\n });\n});\n"],
5
+ "mappings": "wdAAA,IAAAA,EAA6B,qBAE7BC,EAA8C,yCAC9CC,EAAgB,iCAGhBC,EAA6B,sCAE7B,KAAM,CAAE,0BAAAC,CAA0B,EAAID,EAEhCE,EAAkB,GAAG,MAAMF,EAAa,gBAAgB,EACxDG,EAAY,GAAG,MAAM,KAAM,OAAO,EAClCC,EAAgB,GAAG,MAAM,KAAM,WAAW,EAEhD,IAAIC,EACJ,SAAS,wBAAyB,IAAM,CACtC,SAAS,4BAA6B,IAAM,CAC1C,WAAW,IAAM,CACf,GAAG,cAAc,EACjBA,EAAa,IAAIJ,CACnB,CAAC,EAED,SAAS,IAAM,CACb,GAAG,cAAc,CACnB,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjDC,EAAgB,gBACd,KAAK,UAAU,CAAE,KAAM,YAAa,QAAS,eAAgB,CAAC,CAChE,EAEAC,EAAU,gBAAgB,CACxB,KAAM,YACN,QAAS,eACX,CAAC,EAED,OAAOE,EAAW,UAAU,CAAC,EAAE,cAC7B,SAAO,GAAG,CACR,KAAM,YACN,QAAS,eACX,CAAC,CACH,CACF,CAAC,EAED,GAAG,uEAAwE,IAAM,CAC/E,MAAMC,EAAM,IAAI,MAAM,oBAAoB,EAC1CF,EAAc,mBAAmB,IAAM,CACrC,MAAME,CACR,CAAC,EAED,OAAOD,EAAW,UAAU,CAAC,EAAE,WAAQ,QAAK,IAAI,gBAAcC,CAAG,CAAC,CAAC,CACrE,CAAC,EAED,GAAG,sEAAuE,IAAM,CAC9E,MAAMA,EAAM,IAAI,MAAM,kBAAkB,EACxCJ,EAAgB,gBACd,KAAK,UAAU,CAAE,KAAM,YAAa,QAAS,eAAgB,CAAC,CAChE,EAEAC,EAAU,mBAAmB,IAAM,CACjC,MAAMG,CACR,CAAC,EAED,OAAOD,EAAW,UAAU,CAAC,EAAE,WAAQ,QAAK,IAAI,iBAAeC,CAAG,CAAC,CAAC,CACtE,CAAC,CACH,CAAC,EAED,SAAS,iBAAkB,IAAM,CAC/B,GAAG,4DAA6D,IAAM,CACpE,OAAON,EAAY,eAAe,CAAC,EAAE,QACnC,KAAK,UAAU,CACb,KAAM,kCACN,QAAS,EAAAO,QAAI,OACf,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["import_purify_ts", "import_Errors", "import_package", "LocalConfig", "FileLocalConfigDataSource", "readFileSyncSpy", "jsonParse", "jsonStringify", "datasource", "err", "pkg"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("purify-ts"),o=require("../../config/model/Errors"),s=require("./RemoteConfigDataSource");let r;const t=jest.spyOn(s.RestRemoteConfigDataSource.prototype,"_callApi"),n=jest.spyOn(s.RestRemoteConfigDataSource.prototype,"_parseResponse");describe("RemoteRestConfigDataSource",()=>{describe("RestRemoteConfigDataSource",()=>{beforeEach(()=>{t.mockClear(),n.mockClear(),r=new s.RestRemoteConfigDataSource}),it("should return an Either<never, Config>",async()=>{t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockReturnValue(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"})),expect(await r.getConfig()).toStrictEqual(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))}),it("should return an Either<ApiCallError, never> if _callApi throws",async()=>{const a=new Error("_callApi error");t.mockResolvedValue((0,e.Left)(a)),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ApiCallError(a)))}),it("should return an Either<ApiCallError, never> if _callApi returns a non-ok response",async()=>{t.mockResolvedValue(e.Either.of({ok:!1,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ApiCallError(new Error("response not ok"))))}),it("should return an Either<JSONParseError, never> if deserializing json fails",async()=>{const a=new Error("deserializing json failure");t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve((0,e.Left)(a))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.JSONParseError))}),it("should return an Either<ParseResponseError, never> if _parseResponse throws",async()=>{t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockImplementation(()=>(0,e.Left)(new o.ParseResponseError)),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ParseResponseError))}),it("should return an Either<ParseResponseError, never> if `name` is missing in Dto",async()=>{n.mockRestore(),t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({version:"0.0.0-fake.1",yolo:"yolo"}))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ParseResponseError))}),describe("without private methods spy",()=>{beforeEach(()=>{t.mockRestore(),n.mockRestore()}),it("should return an Either<never, Config>",async()=>{expect(await r.getConfig()).toStrictEqual(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})})})});
1
+ "use strict";var e=require("purify-ts"),o=require("../../config/model/Errors"),i=require("./RemoteConfigDataSource");let r;const t=vi.spyOn(i.RestRemoteConfigDataSource.prototype,"_callApi"),n=vi.spyOn(i.RestRemoteConfigDataSource.prototype,"_parseResponse");describe("RemoteRestConfigDataSource",()=>{describe("RestRemoteConfigDataSource",()=>{beforeEach(()=>{t.mockClear(),n.mockClear(),r=new i.RestRemoteConfigDataSource}),it("should return an Either<never, Config>",async()=>{t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockReturnValue(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"})),expect(await r.getConfig()).toStrictEqual(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))}),it("should return an Either<ApiCallError, never> if _callApi throws",async()=>{const a=new Error("_callApi error");t.mockResolvedValue((0,e.Left)(a)),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ApiCallError(a)))}),it("should return an Either<ApiCallError, never> if _callApi returns a non-ok response",async()=>{t.mockResolvedValue(e.Either.of({ok:!1,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ApiCallError(new Error("response not ok"))))}),it("should return an Either<JSONParseError, never> if deserializing json fails",async()=>{const a=new Error("deserializing json failure");t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve((0,e.Left)(a))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.JSONParseError))}),it("should return an Either<ParseResponseError, never> if _parseResponse throws",async()=>{t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockImplementation(()=>(0,e.Left)(new o.ParseResponseError)),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ParseResponseError))}),it("should return an Either<ParseResponseError, never> if `name` is missing in Dto",async()=>{n.mockRestore(),t.mockResolvedValue(e.Either.of({ok:!0,json:()=>Promise.resolve(e.Either.of({version:"0.0.0-fake.1",yolo:"yolo"}))})),expect(await r.getConfig()).toStrictEqual((0,e.Left)(new o.ParseResponseError))}),describe("without private methods spy",()=>{beforeEach(()=>{t.mockRestore(),n.mockRestore()}),it("should return an Either<never, Config>",async()=>{expect(await r.getConfig()).toStrictEqual(e.Either.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})})})});
2
2
  //# sourceMappingURL=RemoteConfigDataSource.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/internal/config/data/RemoteConfigDataSource.test.ts"],
4
- "sourcesContent": ["import { Either, Left } from \"purify-ts\";\n\nimport {\n ApiCallError,\n JSONParseError,\n ParseResponseError,\n} from \"@internal/config/model/Errors\";\n\nimport { type RemoteConfigDataSource } from \"./ConfigDataSource\";\nimport { RestRemoteConfigDataSource } from \"./RemoteConfigDataSource\";\n\nlet datasource: RemoteConfigDataSource;\n\n// Necessary to use `any` on the prototype to be able to spy on private methods\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst callApiSpy = jest.spyOn(\n RestRemoteConfigDataSource.prototype as any,\n \"_callApi\",\n);\nconst parseResponseSpy = jest.spyOn(\n RestRemoteConfigDataSource.prototype as any,\n \"_parseResponse\",\n);\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\ndescribe(\"RemoteRestConfigDataSource\", () => {\n describe(\"RestRemoteConfigDataSource\", () => {\n beforeEach(() => {\n callApiSpy.mockClear();\n parseResponseSpy.mockClear();\n datasource = new RestRemoteConfigDataSource();\n });\n\n it(\"should return an Either<never, Config>\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n parseResponseSpy.mockReturnValue(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n });\n\n it(\"should return an Either<ApiCallError, never> if _callApi throws\", async () => {\n const err = new Error(\"_callApi error\");\n callApiSpy.mockResolvedValue(Left(err));\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ApiCallError(err)),\n );\n });\n\n it(\"should return an Either<ApiCallError, never> if _callApi returns a non-ok response\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: false,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ApiCallError(new Error(\"response not ok\"))),\n );\n });\n\n it(\"should return an Either<JSONParseError, never> if deserializing json fails\", async () => {\n const err = new Error(\"deserializing json failure\");\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () => Promise.resolve(Left(err)),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new JSONParseError()),\n );\n });\n\n it(\"should return an Either<ParseResponseError, never> if _parseResponse throws\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n parseResponseSpy.mockImplementation(() => {\n return Left(new ParseResponseError());\n });\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ParseResponseError()),\n );\n });\n\n it(\"should return an Either<ParseResponseError, never> if `name` is missing in Dto\", async () => {\n parseResponseSpy.mockRestore();\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({\n version: \"0.0.0-fake.1\",\n yolo: \"yolo\",\n }),\n ),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ParseResponseError()),\n );\n });\n\n describe(\"without private methods spy\", () => {\n beforeEach(() => {\n callApiSpy.mockRestore();\n parseResponseSpy.mockRestore();\n });\n\n it(\"should return an Either<never, Config>\", async () => {\n expect(await datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n });\n });\n });\n});\n"],
5
- "mappings": "aAAA,IAAAA,EAA6B,qBAE7BC,EAIO,yCAGPC,EAA2C,oCAE3C,IAAIC,EAIJ,MAAMC,EAAa,KAAK,MACtB,6BAA2B,UAC3B,UACF,EACMC,EAAmB,KAAK,MAC5B,6BAA2B,UAC3B,gBACF,EAGA,SAAS,6BAA8B,IAAM,CAC3C,SAAS,6BAA8B,IAAM,CAC3C,WAAW,IAAM,CACfD,EAAW,UAAU,EACrBC,EAAiB,UAA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QAAQ,QACN,SAAO,GAAG,CAAE,KAAM,YAAa,QAAS,cAAe,CAAC,CAC1D,CACJ,CAAC,CACH,EAEAC,EAAiB,mBAAmB,OAC3B,QAAK,IAAI,oBAAoB,CACrC,EAED,OAAO,MAAMF,EAAW,UAAU,CAAC,EAAE,iBACnC,QAAK,IAAI,oBAAoB,CAC/B,CACF,CAAC,EAED,GAAG,iFAAkF,SAAY,CAC/FE,EAAiB,YAAY,EAC7BD,EAAW,kBACT,SAAO,GAAG,CACR,GAAI,GACJ,KAAM,IACJ,QAAQ,QACN,SAAO,GAAG,CACR,QAAS,eACT,KAAM,MACR,CAAC,CACH,CACJ,CAAC,CACH,EAEA,OAAO,MAAMD,EAAW,UAAU,CAAC,EAAE,iBACnC,QAAK,IAAI,oBAAoB,CAC/B,CACF,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,WAAW,IAAM,CACfC,EAAW,YAAY,EACvBC,EAAiB,YAAY,CAC/B,CAAC,EAED,GAAG,yCAA0C,SAAY,CACvD,OAAO,MAAMF,EAAW,UAAU,CAAC,EAAE,cACnC,SAAO,GAAG,CACR,KAAM,YACN,QAAS,cACX,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { Either, Left } from \"purify-ts\";\n\nimport {\n ApiCallError,\n JSONParseError,\n ParseResponseError,\n} from \"@internal/config/model/Errors\";\n\nimport { type RemoteConfigDataSource } from \"./ConfigDataSource\";\nimport { RestRemoteConfigDataSource } from \"./RemoteConfigDataSource\";\n\nlet datasource: RemoteConfigDataSource;\n\n// Necessary to use `any` on the prototype to be able to spy on private methods\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst callApiSpy = vi.spyOn(\n RestRemoteConfigDataSource.prototype as any,\n \"_callApi\",\n);\nconst parseResponseSpy = vi.spyOn(\n RestRemoteConfigDataSource.prototype as any,\n \"_parseResponse\",\n);\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\ndescribe(\"RemoteRestConfigDataSource\", () => {\n describe(\"RestRemoteConfigDataSource\", () => {\n beforeEach(() => {\n callApiSpy.mockClear();\n parseResponseSpy.mockClear();\n datasource = new RestRemoteConfigDataSource();\n });\n\n it(\"should return an Either<never, Config>\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n parseResponseSpy.mockReturnValue(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n });\n\n it(\"should return an Either<ApiCallError, never> if _callApi throws\", async () => {\n const err = new Error(\"_callApi error\");\n callApiSpy.mockResolvedValue(Left(err));\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ApiCallError(err)),\n );\n });\n\n it(\"should return an Either<ApiCallError, never> if _callApi returns a non-ok response\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: false,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ApiCallError(new Error(\"response not ok\"))),\n );\n });\n\n it(\"should return an Either<JSONParseError, never> if deserializing json fails\", async () => {\n const err = new Error(\"deserializing json failure\");\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () => Promise.resolve(Left(err)),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new JSONParseError()),\n );\n });\n\n it(\"should return an Either<ParseResponseError, never> if _parseResponse throws\", async () => {\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({ name: \"DeviceSDK\", version: \"0.0.0-fake.1\" }),\n ),\n }),\n );\n\n parseResponseSpy.mockImplementation(() => {\n return Left(new ParseResponseError());\n });\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ParseResponseError()),\n );\n });\n\n it(\"should return an Either<ParseResponseError, never> if `name` is missing in Dto\", async () => {\n parseResponseSpy.mockRestore();\n callApiSpy.mockResolvedValue(\n Either.of({\n ok: true,\n json: () =>\n Promise.resolve(\n Either.of({\n version: \"0.0.0-fake.1\",\n yolo: \"yolo\",\n }),\n ),\n }),\n );\n\n expect(await datasource.getConfig()).toStrictEqual(\n Left(new ParseResponseError()),\n );\n });\n\n describe(\"without private methods spy\", () => {\n beforeEach(() => {\n callApiSpy.mockRestore();\n parseResponseSpy.mockRestore();\n });\n\n it(\"should return an Either<never, Config>\", async () => {\n expect(await datasource.getConfig()).toStrictEqual(\n Either.of({\n name: \"DeviceSDK\",\n version: \"0.0.0-fake.1\",\n }),\n );\n });\n });\n });\n});\n"],
5
+ "mappings": "aAAA,IAAAA,EAA6B,qBAE7BC,EAIO,yCAGPC,EAA2C,oCAE3C,IAAIC,EAIJ,MAAMC,EAAa,GAAG,MACpB,6BAA2B,UAC3B,UACF,EACMC,EAAmB,GAAG,MAC1B,6BAA2B,UAC3B,gBACF,EAGA,SAAS,6BAA8B,IAAM,CAC3C,SAAS,6BAA8B,IAAM,CAC3C,WAAW,IAAM,CACfD,EAAW,UAAU,EACrBC,EAAiB,UAAU,EAC3BF,EAAa,IAAI,4BACnB,CAAC,EAED,GAAG,yCAA0C,SAAY,CACvDC,EAAW,kBACT,SAAO,GAAG,CACR,GAAI,GACJ,KAAM,IACJ,QAAQ,QACN,SAAO,GAAG,CAAE,KAAM,YAAa,QAAS,cAAe,CAAC,CAC1D,CACJ,CAAC,CACH,EAEAC,EAAiB,gBACf,SAAO,GAAG,CACR,KAAM,YACN,QAAS,cACX,CAAC,CACH,EAEA,OAAO,MAAMF,EAAW,UAAU,CAAC,EAAE,cACnC,SAAO,GAAG,CACR,KAAM,YACN,QAAS,cACX,CAAC,CACH,CACF,CAAC,EAED,GAAG,kEAA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J,CAAC,CACH,EAEA,OAAO,MAAMD,EAAW,UAAU,CAAC,EAAE,iBACnC,QAAK,IAAI,oBAAoB,CAC/B,CACF,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,WAAW,IAAM,CACfC,EAAW,YAAY,EACvBC,EAAiB,YAAY,CAC/B,CAAC,EAED,GAAG,yCAA0C,SAAY,CACvD,OAAO,MAAMF,EAAW,UAAU,CAAC,EAAE,cACnC,SAAO,GAAG,CACR,KAAM,YACN,QAAS,cACX,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["import_purify_ts", "import_Errors", "import_RemoteConfigDataSource", "datasource", "callApiSpy", "parseResponseSpy", "err"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var r=(a,o)=>{for(var t in o)c(a,t,{get:o[t],enumerable:!0})},g=(a,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of l(o))!n.call(a,e)&&e!==t&&c(a,e,{get:()=>o[e],enumerable:!(i=f(o,e))||i.enumerable});return a};var m=a=>g(c({},"__esModule",{value:!0}),a);var s={};r(s,{FileLocalConfigDataSource:()=>p});module.exports=m(s);class p{getConfig=jest.fn()}0&&(module.exports={FileLocalConfigDataSource});
1
+ "use strict";var t=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var r=(a,o)=>{for(var i in o)t(a,i,{get:o[i],enumerable:!0})},g=(a,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of l(o))!n.call(a,e)&&e!==i&&t(a,e,{get:()=>o[e],enumerable:!(c=f(o,e))||c.enumerable});return a};var m=a=>g(t({},"__esModule",{value:!0}),a);var C={};r(C,{FileLocalConfigDataSource:()=>p});module.exports=m(C);class p{getConfig=vi.fn()}0&&(module.exports={FileLocalConfigDataSource});
2
2
  //# sourceMappingURL=LocalConfigDataSource.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/internal/config/data/__mocks__/LocalConfigDataSource.ts"],
4
- "sourcesContent": ["import { type LocalConfigDataSource } from \"@internal/config/data/ConfigDataSource\";\n\nexport class FileLocalConfigDataSource implements LocalConfigDataSource {\n getConfig = jest.fn();\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAA2D,CACtE,UAAY,KAAK,GAAG,CACtB",
4
+ "sourcesContent": ["import { type LocalConfigDataSource } from \"@internal/config/data/ConfigDataSource\";\n\nexport class FileLocalConfigDataSource implements LocalConfigDataSource {\n getConfig = vi.fn();\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAA2D,CACtE,UAAY,GAAG,GAAG,CACpB",
6
6
  "names": ["LocalConfigDataSource_exports", "__export", "FileLocalConfigDataSource", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var s in e)a(t,s,{get:e[s],enumerable:!0})},r=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!m.call(t,o)&&o!==s&&a(t,o,{get:()=>e[o],enumerable:!(n=f(e,o))||n.enumerable});return t};var c=t=>r(a({},"__esModule",{value:!0}),t);var R={};p(R,{RestRemoteConfigDataSource:()=>g});module.exports=c(R);class g{getConfig=jest.fn();_parseResponse=jest.fn();_callApi=jest.fn()}0&&(module.exports={RestRemoteConfigDataSource});
1
+ "use strict";var a=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var r=(o,e)=>{for(var i in e)a(o,i,{get:e[i],enumerable:!0})},s=(o,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!p.call(o,t)&&t!==i&&a(o,t,{get:()=>e[t],enumerable:!(n=f(e,t))||n.enumerable});return o};var c=o=>s(a({},"__esModule",{value:!0}),o);var R={};r(R,{RestRemoteConfigDataSource:()=>g});module.exports=c(R);class g{getConfig=vi.fn();_parseResponse=vi.fn();_callApi=vi.fn()}0&&(module.exports={RestRemoteConfigDataSource});
2
2
  //# sourceMappingURL=RemoteConfigDataSource.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/internal/config/data/__mocks__/RemoteConfigDataSource.ts"],
4
- "sourcesContent": ["import { type RemoteConfigDataSource } from \"@internal/config/data/ConfigDataSource\";\n\nexport class RestRemoteConfigDataSource implements RemoteConfigDataSource {\n getConfig = jest.fn();\n _parseResponse = jest.fn();\n _callApi = jest.fn();\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAA6D,CACxE,UAAY,KAAK,GAAG,EACpB,eAAiB,KAAK,GAAG,EACzB,SAAW,KAAK,GAAG,CACrB",
4
+ "sourcesContent": ["import { type RemoteConfigDataSource } from \"@internal/config/data/ConfigDataSource\";\n\nexport class RestRemoteConfigDataSource implements RemoteConfigDataSource {\n getConfig = vi.fn();\n _parseResponse = vi.fn();\n _callApi = vi.fn();\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAEO,MAAME,CAA6D,CACxE,UAAY,GAAG,GAAG,EAClB,eAAiB,GAAG,GAAG,EACvB,SAAW,GAAG,GAAG,CACnB",
6
6
  "names": ["RemoteConfigDataSource_exports", "__export", "RestRemoteConfigDataSource", "__toCommonJS"]
7
7
  }