@ledgerhq/device-management-kit 0.0.0-develop-20250106155104 → 0.0.0-develop-20250219001044

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 (464) hide show
  1. package/README.md +27 -31
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/package.json +11 -8
  4. package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
  5. package/lib/cjs/src/api/DeviceManagementKit.test.js.map +2 -2
  6. package/lib/cjs/src/api/DeviceManagementKitBuilder.js +1 -1
  7. package/lib/cjs/src/api/DeviceManagementKitBuilder.js.map +2 -2
  8. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js +1 -1
  9. package/lib/cjs/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  10. package/lib/cjs/src/api/DmkConfig.js +1 -1
  11. package/lib/cjs/src/api/DmkConfig.js.map +1 -1
  12. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  13. package/lib/cjs/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  14. package/lib/cjs/src/api/command/model/CommandResult.js.map +1 -1
  15. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js +2 -0
  16. package/lib/cjs/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  17. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  18. package/lib/cjs/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  19. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  20. package/lib/cjs/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  21. package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
  22. package/lib/cjs/src/api/command/utils/CommandUtils.js.map +2 -2
  23. package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
  24. package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
  25. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  26. package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  27. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  28. package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +2 -2
  29. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  30. package/lib/cjs/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  31. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  32. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  33. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  34. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  35. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +2 -0
  36. package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  37. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  38. package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  39. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  40. package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  41. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  42. package/lib/cjs/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  43. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  44. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +2 -2
  45. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  46. package/lib/cjs/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  47. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  48. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +2 -2
  49. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  50. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  51. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -1
  52. package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +1 -1
  53. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  54. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  55. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  56. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  57. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -1
  58. package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
  59. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  60. package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  61. package/lib/cjs/src/api/device-session/DeviceSessionState.js +1 -1
  62. package/lib/cjs/src/api/device-session/DeviceSessionState.js.map +2 -2
  63. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +1 -1
  64. package/lib/cjs/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +3 -3
  65. package/lib/cjs/src/api/index.js +1 -1
  66. package/lib/cjs/src/api/index.js.map +3 -3
  67. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  68. package/lib/cjs/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  69. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  70. package/lib/cjs/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +2 -2
  71. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  72. package/lib/cjs/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  73. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  74. package/lib/cjs/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  75. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  76. package/lib/cjs/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  77. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  78. package/lib/cjs/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  79. package/lib/cjs/src/api/types.js.map +1 -1
  80. package/lib/cjs/src/api/utils/Base64String.test.js +1 -1
  81. package/lib/cjs/src/api/utils/Base64String.test.js.map +2 -2
  82. package/lib/cjs/src/api/utils/HexaString.js +1 -1
  83. package/lib/cjs/src/api/utils/HexaString.js.map +2 -2
  84. package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
  85. package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
  86. package/lib/cjs/src/di.js +1 -1
  87. package/lib/cjs/src/di.js.map +3 -3
  88. package/lib/cjs/src/di.stub.js +1 -1
  89. package/lib/cjs/src/di.stub.js.map +2 -2
  90. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  91. package/lib/cjs/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  92. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  93. package/lib/cjs/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  94. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  95. package/lib/cjs/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  96. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  97. package/lib/cjs/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  98. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js +1 -1
  99. package/lib/cjs/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  100. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  101. package/lib/cjs/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  102. package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
  103. package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +3 -3
  104. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  105. package/lib/cjs/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  106. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  107. package/lib/cjs/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +2 -2
  108. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  109. package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  110. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  111. package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  112. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  113. package/lib/cjs/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  114. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  115. package/lib/cjs/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  116. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  117. package/lib/cjs/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  118. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
  119. package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  120. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  121. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  122. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  123. package/lib/cjs/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  124. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  125. package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  126. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  127. package/lib/cjs/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  128. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  129. package/lib/cjs/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  130. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  131. package/lib/cjs/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  132. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +1 -1
  133. package/lib/cjs/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +3 -3
  134. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  135. package/lib/cjs/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  136. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  137. package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +2 -2
  138. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  139. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  140. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  141. package/lib/cjs/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  142. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  143. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  144. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  145. package/lib/cjs/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  146. package/lib/cjs/src/internal/manager-api/data/ManagerApiDataSource.js.map +1 -1
  147. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  148. package/lib/cjs/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  149. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  150. package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  151. package/lib/cjs/src/internal/manager-api/model/Firmware.js +1 -1
  152. package/lib/cjs/src/internal/manager-api/model/Firmware.js.map +1 -1
  153. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  154. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.js.map +2 -2
  155. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  156. package/lib/cjs/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  157. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  158. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  159. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  160. package/lib/cjs/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  161. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js +2 -0
  162. package/lib/cjs/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  163. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  164. package/lib/cjs/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  165. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  166. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  167. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  168. package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  169. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  170. package/lib/cjs/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  171. package/lib/cjs/src/internal/secure-channel/model/Const.js +2 -0
  172. package/lib/cjs/src/internal/secure-channel/model/Const.js.map +7 -0
  173. package/lib/cjs/src/internal/secure-channel/model/Errors.js +2 -0
  174. package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +7 -0
  175. package/lib/cjs/src/internal/secure-channel/model/Params.js +2 -0
  176. package/lib/cjs/src/internal/secure-channel/model/Params.js.map +7 -0
  177. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  178. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  179. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  180. package/lib/cjs/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  181. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js +2 -0
  182. package/lib/cjs/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  183. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  184. package/lib/cjs/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  185. package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
  186. package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
  187. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  188. package/lib/cjs/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  189. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  190. package/lib/cjs/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  191. package/lib/esm/package.json +11 -8
  192. package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
  193. package/lib/esm/src/api/DeviceManagementKit.test.js.map +2 -2
  194. package/lib/esm/src/api/DeviceManagementKitBuilder.js +1 -1
  195. package/lib/esm/src/api/DeviceManagementKitBuilder.js.map +3 -3
  196. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js +1 -1
  197. package/lib/esm/src/api/DeviceManagementKitBuilder.test.js.map +2 -2
  198. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js +1 -1
  199. package/lib/esm/src/api/apdu/utils/ByteArrayParser.test.js.map +2 -2
  200. package/lib/esm/src/api/command/model/CommandResult.js.map +1 -1
  201. package/lib/esm/src/api/command/os/LoadCertificateCommand.js +2 -0
  202. package/lib/esm/src/api/command/os/LoadCertificateCommand.js.map +7 -0
  203. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js +2 -0
  204. package/lib/esm/src/api/command/os/LoadCertificateCommand.test.js.map +7 -0
  205. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js +1 -1
  206. package/lib/esm/src/api/command/use-case/SendCommandUseCase.test.js.map +3 -3
  207. package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
  208. package/lib/esm/src/api/command/utils/CommandUtils.js.map +2 -2
  209. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
  210. package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
  211. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
  212. package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +2 -2
  213. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js +1 -1
  214. package/lib/esm/src/api/device-action/__test-utils__/testDeviceActionStates.js.map +3 -3
  215. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +2 -0
  216. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +7 -0
  217. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +2 -0
  218. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +7 -0
  219. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js +1 -0
  220. package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +7 -0
  221. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
  222. package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +3 -3
  223. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js +1 -1
  224. package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.test.js.map +3 -3
  225. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js +1 -1
  226. package/lib/esm/src/api/device-action/os/ListApps/ListAppsDeviceAction.test.js.map +3 -3
  227. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js +1 -1
  228. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.js.map +2 -2
  229. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js +1 -1
  230. package/lib/esm/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.test.js.map +3 -3
  231. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
  232. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +2 -2
  233. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
  234. package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
  235. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
  236. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
  237. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
  238. package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +3 -3
  239. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
  240. package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +3 -3
  241. package/lib/esm/src/api/device-session/DeviceSessionState.js.map +2 -2
  242. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js +1 -1
  243. package/lib/esm/src/api/device-session/use-case/ToggleDeviceSessionRefresher.test.js.map +3 -3
  244. package/lib/esm/src/api/index.js +1 -1
  245. package/lib/esm/src/api/index.js.map +3 -3
  246. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js +1 -1
  247. package/lib/esm/src/api/logger-subscriber/service/ConsoleLogger.test.js.map +2 -2
  248. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js +1 -1
  249. package/lib/esm/src/api/logger-subscriber/service/WebLogsExporterLogger.test.js.map +2 -2
  250. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js +1 -1
  251. package/lib/esm/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.js.map +2 -2
  252. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js +1 -1
  253. package/lib/esm/src/api/transport/model/DeviceConnectionFactory.stub.js.map +2 -2
  254. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js +1 -1
  255. package/lib/esm/src/api/transport/model/TransportConnectedDevice.stub.js.map +2 -2
  256. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js +1 -1
  257. package/lib/esm/src/api/transport/model/__mocks__/TransportMock.js.map +2 -2
  258. package/lib/esm/src/api/utils/Base64String.test.js +1 -1
  259. package/lib/esm/src/api/utils/Base64String.test.js.map +2 -2
  260. package/lib/esm/src/api/utils/HexaString.js +1 -1
  261. package/lib/esm/src/api/utils/HexaString.js.map +2 -2
  262. package/lib/esm/src/api/utils/HexaString.test.js +1 -1
  263. package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
  264. package/lib/esm/src/di.js +1 -1
  265. package/lib/esm/src/di.js.map +3 -3
  266. package/lib/esm/src/di.stub.js +1 -1
  267. package/lib/esm/src/di.stub.js.map +2 -2
  268. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js +1 -1
  269. package/lib/esm/src/internal/config/data/LocalConfigDataSource.test.js.map +3 -3
  270. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js +1 -1
  271. package/lib/esm/src/internal/config/data/RemoteConfigDataSource.test.js.map +2 -2
  272. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js +1 -1
  273. package/lib/esm/src/internal/config/data/__mocks__/LocalConfigDataSource.js.map +2 -2
  274. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js +1 -1
  275. package/lib/esm/src/internal/config/data/__mocks__/RemoteConfigDataSource.js.map +2 -2
  276. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js +1 -1
  277. package/lib/esm/src/internal/config/service/DefaultConfigService.test.js.map +2 -2
  278. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js +1 -1
  279. package/lib/esm/src/internal/config/use-case/GetDmkVersionUseCase.test.js.map +2 -2
  280. package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
  281. package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +3 -3
  282. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js +1 -1
  283. package/lib/esm/src/internal/device-session/model/DeviceSession.stub.js.map +3 -3
  284. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js +1 -1
  285. package/lib/esm/src/internal/device-session/model/DeviceSessionRefresher.test.js.map +2 -2
  286. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js +1 -1
  287. package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.test.js.map +2 -2
  288. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
  289. package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
  290. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js +1 -1
  291. package/lib/esm/src/internal/device-session/service/DefaultDeviceSessionService.test.js.map +3 -3
  292. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js +1 -1
  293. package/lib/esm/src/internal/device-session/use-case/CloseSessionsUseCase.test.js.map +3 -3
  294. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js +1 -1
  295. package/lib/esm/src/internal/device-session/use-case/GetDeviceSessionStateUseCase.test.js.map +3 -3
  296. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
  297. package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +3 -3
  298. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js +1 -1
  299. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.js.map +3 -3
  300. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js +1 -1
  301. package/lib/esm/src/internal/discovery/use-case/ConnectUseCase.test.js.map +3 -3
  302. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
  303. package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +3 -3
  304. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js +1 -1
  305. package/lib/esm/src/internal/discovery/use-case/GetConnectedDeviceUseCase.test.js.map +3 -3
  306. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js +1 -1
  307. package/lib/esm/src/internal/discovery/use-case/ListConnectedDevicesUseCase.test.js.map +3 -3
  308. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js +1 -1
  309. package/lib/esm/src/internal/discovery/use-case/ListenToConnectedDeviceUseCase.test.js.map +3 -3
  310. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js +1 -1
  311. package/lib/esm/src/internal/discovery/use-case/ListenToKnownDevicesUseCase.test.js.map +3 -3
  312. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js +1 -1
  313. package/lib/esm/src/internal/discovery/use-case/StartDiscoveringUseCase.test.js.map +3 -3
  314. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
  315. package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +2 -2
  316. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js +1 -1
  317. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.js.map +2 -2
  318. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js +1 -1
  319. package/lib/esm/src/internal/logger-publisher/service/DefaultLoggerPublisherService.test.js.map +2 -2
  320. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js +1 -1
  321. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.js.map +3 -3
  322. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js +1 -1
  323. package/lib/esm/src/internal/manager-api/data/AxiosManagerApiDataSource.test.js.map +3 -3
  324. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js +1 -1
  325. package/lib/esm/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.js.map +2 -2
  326. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
  327. package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
  328. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js +1 -1
  329. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.js.map +2 -2
  330. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js +1 -1
  331. package/lib/esm/src/internal/manager-api/service/DefaultManagerApiService.test.js.map +3 -3
  332. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js +2 -0
  333. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.js.map +7 -0
  334. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js +2 -0
  335. package/lib/esm/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.js.map +7 -0
  336. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js +1 -0
  337. package/lib/esm/src/internal/secure-channel/data/SecureChannelDataSource.js.map +7 -0
  338. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js +2 -0
  339. package/lib/esm/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.js.map +7 -0
  340. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +2 -0
  341. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +7 -0
  342. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +2 -0
  343. package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +7 -0
  344. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js +2 -0
  345. package/lib/esm/src/internal/secure-channel/di/secureChannelTypes.js.map +7 -0
  346. package/lib/esm/src/internal/secure-channel/model/Const.js +2 -0
  347. package/lib/esm/src/internal/secure-channel/model/Const.js.map +7 -0
  348. package/lib/esm/src/internal/secure-channel/model/Errors.js +2 -0
  349. package/lib/esm/src/internal/secure-channel/model/Errors.js.map +7 -0
  350. package/lib/esm/src/internal/secure-channel/model/Params.js +1 -0
  351. package/lib/esm/src/internal/secure-channel/model/Params.js.map +7 -0
  352. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js +2 -0
  353. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.js.map +7 -0
  354. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js +2 -0
  355. package/lib/esm/src/internal/secure-channel/service/DefaultSecureChannelService.test.js.map +7 -0
  356. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js +1 -0
  357. package/lib/esm/src/internal/secure-channel/service/SecureChannelService.js.map +7 -0
  358. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js +1 -1
  359. package/lib/esm/src/internal/send/use-case/SendApduUseCase.test.js.map +3 -3
  360. package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
  361. package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
  362. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js +1 -1
  363. package/lib/esm/src/internal/transport/service/DefaultTransportService.test.js.map +2 -2
  364. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js +1 -1
  365. package/lib/esm/src/internal/transport/service/__mocks__/DefaultTransportService.js.map +2 -2
  366. package/lib/types/src/api/DeviceManagementKitBuilder.d.ts.map +1 -1
  367. package/lib/types/src/api/DmkConfig.d.ts +1 -0
  368. package/lib/types/src/api/DmkConfig.d.ts.map +1 -1
  369. package/lib/types/src/api/command/model/CommandResult.d.ts +1 -2
  370. package/lib/types/src/api/command/model/CommandResult.d.ts.map +1 -1
  371. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts +25 -0
  372. package/lib/types/src/api/command/os/LoadCertificateCommand.d.ts.map +1 -0
  373. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts +2 -0
  374. package/lib/types/src/api/command/os/LoadCertificateCommand.test.d.ts.map +1 -0
  375. package/lib/types/src/api/device-action/DeviceAction.d.ts +6 -1
  376. package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
  377. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts +2 -1
  378. package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
  379. package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
  380. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts +5 -2
  381. package/lib/types/src/api/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -1
  382. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts +40 -0
  383. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -0
  384. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts +2 -0
  385. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.d.ts.map +1 -0
  386. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +19 -0
  387. package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -0
  388. package/lib/types/src/api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction.d.ts.map +1 -1
  389. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
  390. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +1 -0
  391. package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
  392. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
  393. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -0
  394. package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
  395. package/lib/types/src/api/device-session/DeviceSessionState.d.ts +5 -0
  396. package/lib/types/src/api/device-session/DeviceSessionState.d.ts.map +1 -1
  397. package/lib/types/src/api/index.d.ts +3 -1
  398. package/lib/types/src/api/index.d.ts.map +1 -1
  399. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts +1 -1
  400. package/lib/types/src/api/logger-subscriber/service/__mocks__/ConsoleLogger.d.ts.map +1 -1
  401. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts +1 -1
  402. package/lib/types/src/api/transport/model/DeviceConnectionFactory.stub.d.ts.map +1 -1
  403. package/lib/types/src/api/transport/model/Errors.d.ts +26 -26
  404. package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
  405. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts +7 -7
  406. package/lib/types/src/api/transport/model/__mocks__/TransportMock.d.ts.map +1 -1
  407. package/lib/types/src/api/types.d.ts +1 -1
  408. package/lib/types/src/api/types.d.ts.map +1 -1
  409. package/lib/types/src/api/utils/HexaString.d.ts +1 -1
  410. package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
  411. package/lib/types/src/di.d.ts.map +1 -1
  412. package/lib/types/src/di.stub.d.ts +1 -1
  413. package/lib/types/src/di.stub.d.ts.map +1 -1
  414. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts +1 -1
  415. package/lib/types/src/internal/config/data/__mocks__/LocalConfigDataSource.d.ts.map +1 -1
  416. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts +3 -3
  417. package/lib/types/src/internal/config/data/__mocks__/RemoteConfigDataSource.d.ts.map +1 -1
  418. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts +9 -5
  419. package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
  420. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts +2 -1
  421. package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
  422. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts +3 -1
  423. package/lib/types/src/internal/discovery/use-case/ConnectUseCase.d.ts.map +1 -1
  424. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts +5 -5
  425. package/lib/types/src/internal/logger-publisher/service/DefaultLoggerPublisherService.stub.d.ts.map +1 -1
  426. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts +4 -3
  427. package/lib/types/src/internal/manager-api/data/AxiosManagerApiDataSource.d.ts.map +1 -1
  428. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts +24 -0
  429. package/lib/types/src/internal/manager-api/data/ManagerApiDataSource.d.ts.map +1 -1
  430. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts +3 -3
  431. package/lib/types/src/internal/manager-api/data/__mocks__/AxiosManagerApiDataSource.d.ts.map +1 -1
  432. package/lib/types/src/internal/manager-api/model/Firmware.d.ts +4 -0
  433. package/lib/types/src/internal/manager-api/model/Firmware.d.ts.map +1 -1
  434. package/lib/types/src/internal/manager-api/service/DefaultManagerApiService.d.ts.map +1 -1
  435. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts +18 -0
  436. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.d.ts.map +1 -0
  437. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts +2 -0
  438. package/lib/types/src/internal/secure-channel/data/DefaultSecureChannelDataSource.test.d.ts.map +1 -0
  439. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts +52 -0
  440. package/lib/types/src/internal/secure-channel/data/SecureChannelDataSource.d.ts.map +1 -0
  441. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts +10 -0
  442. package/lib/types/src/internal/secure-channel/data/__mocks__/DefaultSecureChannelDataSource.d.ts.map +1 -0
  443. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts +9 -0
  444. package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -0
  445. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts +2 -0
  446. package/lib/types/src/internal/secure-channel/di/secureChannelModule.test.d.ts.map +1 -0
  447. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts +6 -0
  448. package/lib/types/src/internal/secure-channel/di/secureChannelTypes.d.ts.map +1 -0
  449. package/lib/types/src/internal/secure-channel/model/Const.d.ts +2 -0
  450. package/lib/types/src/internal/secure-channel/model/Const.d.ts.map +1 -0
  451. package/lib/types/src/internal/secure-channel/model/Errors.d.ts +8 -0
  452. package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -0
  453. package/lib/types/src/internal/secure-channel/model/Params.d.ts +86 -0
  454. package/lib/types/src/internal/secure-channel/model/Params.d.ts.map +1 -0
  455. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts +21 -0
  456. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.d.ts.map +1 -0
  457. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts +2 -0
  458. package/lib/types/src/internal/secure-channel/service/DefaultSecureChannelService.test.d.ts.map +1 -0
  459. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts +21 -0
  460. package/lib/types/src/internal/secure-channel/service/SecureChannelService.d.ts.map +1 -0
  461. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts +6 -6
  462. package/lib/types/src/internal/transport/service/__mocks__/DefaultTransportService.d.ts.map +1 -1
  463. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  464. package/package.json +13 -10
@@ -1,2 +1,2 @@
1
- import{Apdu as o}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as m}from"./apdu/utils/ApduBuilder";import{ApduParser as n}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as f}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as c}from"./apdu/utils/ByteArrayParser";import{InvalidStatusWordError as A}from"./command/Errors";import{CommandResultFactory as D,CommandResultStatus as v,isSuccessCommandResult as S}from"./command/model/CommandResult";import{CloseAppCommand as y}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as g}from"./command/os/GetAppAndVersionCommand";import{BatteryStatusType as E,GetBatteryStatusCommand as L}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as R}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as M}from"./command/os/ListAppsCommand";import{OpenAppCommand as I}from"./command/os/OpenAppCommand";import{isCommandErrorCode as h}from"./command/utils/CommandErrors";import{CommandUtils as V}from"./command/utils/CommandUtils";import{GlobalCommandError as _,GlobalCommandErrorHandler as H}from"./command/utils/GlobalCommandError";import{DeviceModel as k,DeviceModelId as w,LEDGER_VENDOR_ID as F}from"./device/DeviceModel";import{DeviceStatus as X}from"./device/DeviceStatus";import{DeviceActionStatus as N}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as j}from"./device-action/model/UserInteractionRequired";import{UnknownDAError as J}from"./device-action/os/Errors";import{GetDeviceStatusDeviceAction as Z}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as ee}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{ListAppsDeviceAction as oe}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as pe}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as ie}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{SendCommandInAppDeviceAction as se}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as fe}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as ce}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as Ae}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as De}from"./device-model/model/DeviceModel";import{ApduResponse as Se}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ce}from"./device-session/DeviceSessionState";import{defaultApduReceiverServiceStubBuilder as Be}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as Le}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as Re}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as Me}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as Ie}from"./DeviceManagementKitBuilder";import{DeviceExchangeError as he,UnknownDeviceExchangeError as Ue}from"./Error";import{LogLevel as Pe}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as He}from"./logger-subscriber/service/ConsoleLogger";import{WebLogsExporterLogger as ke}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as Fe}from"./transport/model/ConnectedDevice";export*from"./transport/model/Errors";import{TransportConnectedDevice as qe}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as Ye}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{base64StringToBuffer as Je,isBase64String as Qe}from"./utils/Base64String";import{bufferToHexaString as $e,hexaStringToBuffer as er,isHexaString as rr}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,o as Apdu,m as ApduBuilder,n as ApduParser,Se as ApduResponse,E as BatteryStatusType,Ae as BleDeviceInfos,f as ByteArrayBuilder,c as ByteArrayParser,y as CloseAppCommand,D as CommandResultFactory,v as CommandResultStatus,V as CommandUtils,Fe as ConnectedDevice,He as ConsoleLogger,N as DeviceActionStatus,he as DeviceExchangeError,Me as DeviceManagementKit,Ie as DeviceManagementKitBuilder,k as DeviceModel,w as DeviceModelId,Ce as DeviceSessionStateType,X as DeviceStatus,Re as FramerUtils,g as GetAppAndVersionCommand,L as GetBatteryStatusCommand,Z as GetDeviceStatusDeviceAction,R as GetOsVersionCommand,_ as GlobalCommandError,H as GlobalCommandErrorHandler,ee as GoToDashboardDeviceAction,A as InvalidStatusWordError,F as LEDGER_VENDOR_ID,M as ListAppsCommand,oe as ListAppsDeviceAction,pe as ListAppsWithMetadataDeviceAction,Pe as LogLevel,I as OpenAppCommand,ie as OpenAppDeviceAction,se as SendCommandInAppDeviceAction,ce as StaticDeviceModelDataSource,qe as TransportConnectedDevice,De as TransportDeviceModel,J as UnknownDAError,Ue as UnknownDeviceExchangeError,j as UserInteractionRequired,ke as WebLogsExporterLogger,fe as XStateDeviceAction,Je as base64StringToBuffer,$e as bufferToHexaString,Ye as connectedDeviceStubBuilder,Be as defaultApduReceiverServiceStubBuilder,Le as defaultApduSenderServiceStubBuilder,er as hexaStringToBuffer,Qe as isBase64String,h as isCommandErrorCode,rr as isHexaString,S as isSuccessCommandResult};
1
+ import{Apdu as o}from"./apdu/model/Apdu";import{APDU_MAX_PAYLOAD as p,ApduBuilder as m}from"./apdu/utils/ApduBuilder";import{ApduParser as a}from"./apdu/utils/ApduParser";export*from"./apdu/utils/AppBuilderError";import{ByteArrayBuilder as f}from"./apdu/utils/ByteArrayBuilder";import{ByteArrayParser as c}from"./apdu/utils/ByteArrayParser";import{InvalidStatusWordError as A}from"./command/Errors";import{CommandResultFactory as D,CommandResultStatus as S,isSuccessCommandResult as l}from"./command/model/CommandResult";import{CloseAppCommand as C}from"./command/os/CloseAppCommand";import{GetAppAndVersionCommand as g}from"./command/os/GetAppAndVersionCommand";import{BatteryStatusType as L,GetBatteryStatusCommand as G}from"./command/os/GetBatteryStatusCommand";import{GetOsVersionCommand as E}from"./command/os/GetOsVersionCommand";import{ListAppsCommand as M}from"./command/os/ListAppsCommand";import{LoadCertificateCommand as I}from"./command/os/LoadCertificateCommand";import{OpenAppCommand as U}from"./command/os/OpenAppCommand";import{isCommandErrorCode as h}from"./command/utils/CommandErrors";import{CommandUtils as _}from"./command/utils/CommandUtils";import{GlobalCommandError as W,GlobalCommandErrorHandler as k}from"./command/utils/GlobalCommandError";import{DeviceModel as K,DeviceModelId as X,LEDGER_VENDOR_ID as q}from"./device/DeviceModel";import{DeviceStatus as N}from"./device/DeviceStatus";import{DeviceActionStatus as j}from"./device-action/model/DeviceActionState";import{UserInteractionRequired as J}from"./device-action/model/UserInteractionRequired";import{CallTaskInAppDeviceAction as Z}from"./device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction";import{UnknownDAError as ee}from"./device-action/os/Errors";import{GetDeviceStatusDeviceAction as oe}from"./device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction";import{GoToDashboardDeviceAction as pe}from"./device-action/os/GoToDashboard/GoToDashboardDeviceAction";import{ListAppsDeviceAction as ie}from"./device-action/os/ListApps/ListAppsDeviceAction";import{ListAppsWithMetadataDeviceAction as ne}from"./device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction";import{OpenAppDeviceAction as fe}from"./device-action/os/OpenAppDeviceAction/OpenAppDeviceAction";import{SendCommandInAppDeviceAction as ce}from"./device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction";import{XStateDeviceAction as Ae}from"./device-action/xstate-utils/XStateDeviceAction";import{StaticDeviceModelDataSource as De}from"./device-model/data/StaticDeviceModelDataSource";import{BleDeviceInfos as le}from"./device-model/model/BleDeviceInfos";import{TransportDeviceModel as Ce}from"./device-model/model/DeviceModel";import{ApduResponse as ge}from"./device-session/ApduResponse";export*from"./device-session/data/FramerConst";import{DeviceSessionStateType as Ge}from"./device-session/DeviceSessionState";import{defaultApduReceiverServiceStubBuilder as Ee}from"./device-session/service/DefaultApduReceiverService.stub";import{defaultApduSenderServiceStubBuilder as Me}from"./device-session/service/DefaultApduSenderService.stub";import{FramerUtils as Ie}from"./device-session/utils/FramerUtils";import{DeviceManagementKit as Ue}from"./DeviceManagementKit";import{DeviceManagementKitBuilder as he}from"./DeviceManagementKitBuilder";export*from"./Error";import{LogLevel as He}from"./logger-subscriber/model/LogLevel";import{ConsoleLogger as ke}from"./logger-subscriber/service/ConsoleLogger";import{WebLogsExporterLogger as Ke}from"./logger-subscriber/service/WebLogsExporterLogger";import{ConnectedDevice as qe}from"./transport/model/ConnectedDevice";export*from"./transport/model/Errors";import{TransportConnectedDevice as Ye}from"./transport/model/TransportConnectedDevice";import{connectedDeviceStubBuilder as ze}from"./transport/model/TransportConnectedDevice.stub";export*from"./types";import{base64StringToBuffer as Ze,isBase64String as $e}from"./utils/Base64String";import{bufferToHexaString as rr,hexaStringToBuffer as or,isHexaString as tr}from"./utils/HexaString";export{p as APDU_MAX_PAYLOAD,o as Apdu,m as ApduBuilder,a as ApduParser,ge as ApduResponse,L as BatteryStatusType,le as BleDeviceInfos,f as ByteArrayBuilder,c as ByteArrayParser,Z as CallTaskInAppDeviceAction,C as CloseAppCommand,D as CommandResultFactory,S as CommandResultStatus,_ as CommandUtils,qe as ConnectedDevice,ke as ConsoleLogger,j as DeviceActionStatus,Ue as DeviceManagementKit,he as DeviceManagementKitBuilder,K as DeviceModel,X as DeviceModelId,Ge as DeviceSessionStateType,N as DeviceStatus,Ie as FramerUtils,g as GetAppAndVersionCommand,G as GetBatteryStatusCommand,oe as GetDeviceStatusDeviceAction,E as GetOsVersionCommand,W as GlobalCommandError,k as GlobalCommandErrorHandler,pe as GoToDashboardDeviceAction,A as InvalidStatusWordError,q as LEDGER_VENDOR_ID,M as ListAppsCommand,ie as ListAppsDeviceAction,ne as ListAppsWithMetadataDeviceAction,I as LoadCertificateCommand,He as LogLevel,U as OpenAppCommand,fe as OpenAppDeviceAction,ce as SendCommandInAppDeviceAction,De as StaticDeviceModelDataSource,Ye as TransportConnectedDevice,Ce as TransportDeviceModel,ee as UnknownDAError,J as UserInteractionRequired,Ke as WebLogsExporterLogger,Ae as XStateDeviceAction,Ze as base64StringToBuffer,rr as bufferToHexaString,ze as connectedDeviceStubBuilder,Ee as defaultApduReceiverServiceStubBuilder,Me as defaultApduSenderServiceStubBuilder,or as hexaStringToBuffer,$e as isBase64String,h as isCommandErrorCode,tr as isHexaString,l as isSuccessCommandResult};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/index.ts"],
4
- "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { UnknownDAError } from \"@api/device-action/os/Errors\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport { DeviceExchangeError, UnknownDeviceExchangeError } from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
- "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAAAC,MAAuB,kCAChC,OAAS,0BAAAC,MAA8B,sBACvC,OACE,wBAAAC,EACA,uBAAAC,EACA,0BAAAC,MACK,mCACP,OAAS,mBAAAC,MAAuB,kCAChC,OACE,2BAAAC,MAEK,0CACP,OACE,qBAAAC,EAEA,2BAAAC,MAEK,0CACP,OACE,uBAAAC,MAEK,sCACP,OAEE,mBAAAC,MAGK,kCACP,OAEE,kBAAAC,MACK,iCACP,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,gBAAAC,MAAoB,kCAC7B,OACE,sBAAAC,EACA,6BAAAC,MACK,wCACP,OACE,eAAAC,EACA,iBAAAC,EACA,oBAAAC,MACK,0BACP,OAAS,gBAAAC,MAAoB,2BAE7B,OAEE,sBAAAC,MACK,6CACP,OAAS,2BAAAC,MAA+B,mDACxC,OAAS,kBAAAC,MAAsB,+BAC/B,OAAS,+BAAAC,MAAmC,oEAC5C,OAAS,6BAAAC,OAAiC,gEAC1C,OAAS,wBAAAC,OAA4B,sDACrC,OAAS,oCAAAC,OAAwC,8EACjD,OAAS,uBAAAC,OAA2B,gEACpC,OAAS,gCAAAC,OAAoC,kFAC7C,OAEE,sBAAAC,OACK,qDACP,OAAS,+BAAAC,OAAmC,qDAC5C,OAAS,kBAAAC,OAAsB,yCAC/B,OAAS,wBAAAC,OAA4B,sCACrC,OAAS,gBAAAC,OAAoB,mCAC7B,WAAc,uCACd,OAEE,0BAAAC,OACK,yCAEP,OAAS,yCAAAC,OAA6C,8DACtD,OAAS,uCAAAC,OAA2C,4DACpD,OAAS,eAAAC,OAAmB,wCAC5B,OAAS,uBAAAC,OAA2B,2BACpC,OAAS,8BAAAC,OAAkC,kCAC3C,OAAS,uBAAAC,GAAqB,8BAAAC,OAAkC,aAChE,OAAS,YAAAC,OAAgB,wCACzB,OAAS,iBAAAC,OAAqB,+CAC9B,OAAS,yBAAAC,OAA6B,uDACtC,OAAS,mBAAAC,OAAuB,uCAChC,WAAc,8BACd,OAAS,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,wBAAAC,GAAsB,kBAAAC,OAAsB,0BACrD,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
6
- "names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "UnknownDAError", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "DeviceExchangeError", "UnknownDeviceExchangeError", "LogLevel", "ConsoleLogger", "WebLogsExporterLogger", "ConnectedDevice", "TransportConnectedDevice", "connectedDeviceStubBuilder", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
4
+ "sourcesContent": ["\"use strict\";\n\nexport { Apdu } from \"@api/apdu/model/Apdu\";\nexport { APDU_MAX_PAYLOAD, ApduBuilder } from \"@api/apdu/utils/ApduBuilder\";\nexport { ApduParser } from \"@api/apdu/utils/ApduParser\";\nexport * from \"@api/apdu/utils/AppBuilderError\";\nexport { ByteArrayBuilder } from \"@api/apdu/utils/ByteArrayBuilder\";\nexport { ByteArrayParser } from \"@api/apdu/utils/ByteArrayParser\";\nexport { InvalidStatusWordError } from \"@api/command/Errors\";\nexport {\n CommandResultFactory,\n CommandResultStatus,\n isSuccessCommandResult,\n} from \"@api/command/model/CommandResult\";\nexport { CloseAppCommand } from \"@api/command/os/CloseAppCommand\";\nexport {\n GetAppAndVersionCommand,\n type GetAppAndVersionResponse,\n} from \"@api/command/os/GetAppAndVersionCommand\";\nexport {\n BatteryStatusType,\n type GetBatteryStatusArgs,\n GetBatteryStatusCommand,\n type GetBatteryStatusResponse,\n} from \"@api/command/os/GetBatteryStatusCommand\";\nexport {\n GetOsVersionCommand,\n type GetOsVersionResponse,\n} from \"@api/command/os/GetOsVersionCommand\";\nexport {\n type ListAppsArgs,\n ListAppsCommand,\n type ListAppsErrorCodes,\n type ListAppsResponse,\n} from \"@api/command/os/ListAppsCommand\";\nexport {\n type LoadCertificateArgs,\n LoadCertificateCommand,\n type LoadCertificateErrorCodes,\n} from \"@api/command/os/LoadCertificateCommand\";\nexport {\n type OpenAppArgs,\n OpenAppCommand,\n} from \"@api/command/os/OpenAppCommand\";\nexport { isCommandErrorCode } from \"@api/command/utils/CommandErrors\";\nexport { CommandUtils } from \"@api/command/utils/CommandUtils\";\nexport {\n GlobalCommandError,\n GlobalCommandErrorHandler,\n} from \"@api/command/utils/GlobalCommandError\";\nexport {\n DeviceModel,\n DeviceModelId,\n LEDGER_VENDOR_ID,\n} from \"@api/device/DeviceModel\";\nexport { DeviceStatus } from \"@api/device/DeviceStatus\";\nexport { type InternalApi } from \"@api/device-action/DeviceAction\";\nexport {\n type DeviceActionState,\n DeviceActionStatus,\n} from \"@api/device-action/model/DeviceActionState\";\nexport { UserInteractionRequired } from \"@api/device-action/model/UserInteractionRequired\";\nexport { CallTaskInAppDeviceAction } from \"@api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction\";\nexport { UnknownDAError } from \"@api/device-action/os/Errors\";\nexport { GetDeviceStatusDeviceAction } from \"@api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction\";\nexport { GoToDashboardDeviceAction } from \"@api/device-action/os/GoToDashboard/GoToDashboardDeviceAction\";\nexport { ListAppsDeviceAction } from \"@api/device-action/os/ListApps/ListAppsDeviceAction\";\nexport { ListAppsWithMetadataDeviceAction } from \"@api/device-action/os/ListAppsWithMetadata/ListAppsWithMetadataDeviceAction\";\nexport { OpenAppDeviceAction } from \"@api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction\";\nexport { SendCommandInAppDeviceAction } from \"@api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction\";\nexport {\n type DeviceActionStateMachine,\n XStateDeviceAction,\n} from \"@api/device-action/xstate-utils/XStateDeviceAction\";\nexport { StaticDeviceModelDataSource } from \"@api/device-model/data/StaticDeviceModelDataSource\";\nexport { BleDeviceInfos } from \"@api/device-model/model/BleDeviceInfos\";\nexport { TransportDeviceModel } from \"@api/device-model/model/DeviceModel\";\nexport { ApduResponse } from \"@api/device-session/ApduResponse\";\nexport * from \"@api/device-session/data/FramerConst\";\nexport {\n type DeviceSessionState,\n DeviceSessionStateType,\n} from \"@api/device-session/DeviceSessionState\";\n// TODO: remove from exported\nexport { defaultApduReceiverServiceStubBuilder } from \"@api/device-session/service/DefaultApduReceiverService.stub\";\nexport { defaultApduSenderServiceStubBuilder } from \"@api/device-session/service/DefaultApduSenderService.stub\";\nexport { FramerUtils } from \"@api/device-session/utils/FramerUtils\";\nexport { DeviceManagementKit } from \"@api/DeviceManagementKit\";\nexport { DeviceManagementKitBuilder } from \"@api/DeviceManagementKitBuilder\";\nexport * from \"@api/Error\";\nexport { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nexport { ConsoleLogger } from \"@api/logger-subscriber/service/ConsoleLogger\";\nexport { WebLogsExporterLogger } from \"@api/logger-subscriber/service/WebLogsExporterLogger\";\nexport { ConnectedDevice } from \"@api/transport/model/ConnectedDevice\";\nexport * from \"@api/transport/model/Errors\";\nexport { TransportConnectedDevice } from \"@api/transport/model/TransportConnectedDevice\";\nexport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nexport * from \"@api/types\";\nexport { base64StringToBuffer, isBase64String } from \"@api/utils/Base64String\";\nexport {\n bufferToHexaString,\n hexaStringToBuffer,\n isHexaString,\n} from \"@api/utils/HexaString\";\n"],
5
+ "mappings": "AAEA,OAAS,QAAAA,MAAY,uBACrB,OAAS,oBAAAC,EAAkB,eAAAC,MAAmB,8BAC9C,OAAS,cAAAC,MAAkB,6BAC3B,WAAc,kCACd,OAAS,oBAAAC,MAAwB,mCACjC,OAAS,mBAA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S,4BAAAC,OAAgC,gDACzC,OAAS,8BAAAC,OAAkC,qDAC3C,WAAc,aACd,OAAS,wBAAAC,GAAsB,kBAAAC,OAAsB,0BACrD,OACE,sBAAAC,GACA,sBAAAC,GACA,gBAAAC,OACK",
6
+ "names": ["Apdu", "APDU_MAX_PAYLOAD", "ApduBuilder", "ApduParser", "ByteArrayBuilder", "ByteArrayParser", "InvalidStatusWordError", "CommandResultFactory", "CommandResultStatus", "isSuccessCommandResult", "CloseAppCommand", "GetAppAndVersionCommand", "BatteryStatusType", "GetBatteryStatusCommand", "GetOsVersionCommand", "ListAppsCommand", "LoadCertificateCommand", "OpenAppCommand", "isCommandErrorCode", "CommandUtils", "GlobalCommandError", "GlobalCommandErrorHandler", "DeviceModel", "DeviceModelId", "LEDGER_VENDOR_ID", "DeviceStatus", "DeviceActionStatus", "UserInteractionRequired", "CallTaskInAppDeviceAction", "UnknownDAError", "GetDeviceStatusDeviceAction", "GoToDashboardDeviceAction", "ListAppsDeviceAction", "ListAppsWithMetadataDeviceAction", "OpenAppDeviceAction", "SendCommandInAppDeviceAction", "XStateDeviceAction", "StaticDeviceModelDataSource", "BleDeviceInfos", "TransportDeviceModel", "ApduResponse", "DeviceSessionStateType", "defaultApduReceiverServiceStubBuilder", "defaultApduSenderServiceStubBuilder", "FramerUtils", "DeviceManagementKit", "DeviceManagementKitBuilder", "LogLevel", "ConsoleLogger", "WebLogsExporterLogger", "ConnectedDevice", "TransportConnectedDevice", "connectedDeviceStubBuilder", "base64StringToBuffer", "isBase64String", "bufferToHexaString", "hexaStringToBuffer", "isHexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as s}from"./ConsoleLogger";const d=jest.spyOn(console,"warn").mockImplementation(jest.fn()),n=jest.spyOn(console,"info").mockImplementation(jest.fn()),r=jest.spyOn(console,"debug").mockImplementation(jest.fn()),a=jest.spyOn(console,"error").mockImplementation(jest.fn()),i=jest.spyOn(console,"log").mockImplementation(jest.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"tag"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{jest.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(i).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{jest.clearAllMocks(),o=new s(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
1
+ import{LogLevel as t}from"../../logger-subscriber/model/LogLevel";import{ConsoleLogger as i}from"./ConsoleLogger";const d=vi.spyOn(console,"warn").mockImplementation(vi.fn()),n=vi.spyOn(console,"info").mockImplementation(vi.fn()),r=vi.spyOn(console,"debug").mockImplementation(vi.fn()),a=vi.spyOn(console,"error").mockImplementation(vi.fn()),s=vi.spyOn(console,"log").mockImplementation(vi.fn());let o;const e={data:{key:"value"},timestamp:1,tag:"tag"},l="message";describe("ConsoleLogger",()=>{afterAll(()=>{vi.restoreAllMocks()}),describe("default level (LogLevel.DEBUG)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Debug level",()=>{o.log(t.Debug,l,e),expect(r).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Info)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Info)}),describe("log",()=>{it("should log Info level",()=>{o.log(t.Info,l,e),expect(n).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Info level with a custom tag",()=>{const g="custom-tag";o.log(t.Info,l,{...e,tag:g}),expect(n).toHaveBeenCalledWith(`[${g}]`,l,e.data)}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Warning)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Warning)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should log Warn level",()=>{o.log(t.Warning,l,e),expect(d).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Error)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Error)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should default to Log level if none present",()=>{o.log(null,l,e),expect(s).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Error level",()=>{o.log(t.Error,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})}),describe("custom level (LogLevel.Fatal)",()=>{beforeEach(()=>{vi.clearAllMocks(),o=new i(t.Fatal)}),describe("log",()=>{it("should not log Info level",()=>{o.log(t.Info,l,e),expect(n).not.toHaveBeenCalled()}),it("should not log Warn level",()=>{o.log(t.Warning,l,e),expect(d).not.toHaveBeenCalled()}),it("should not log Debug level",()=>{o.log(t.Debug,l,e),expect(r).not.toHaveBeenCalled()}),it("should log Fatal level",()=>{o.log(t.Fatal,l,e),expect(a).toHaveBeenCalledWith(`[${e.tag}]`,l,e.data)})})})});
2
2
  //# sourceMappingURL=ConsoleLogger.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/api/logger-subscriber/service/ConsoleLogger.test.ts"],
4
- "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = 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,OAAS,YAAAA,MAAgB,wCAGzB,OAAS,iBAAAC,MAAqB,kBAE9B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AD,EAAQ,IACV,CACF,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCD,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,KAAK,cAAc,EACnBD,EAAS,IAAIN,EAAcD,EAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
4
+ "sourcesContent": ["import { LogLevel } from \"@api/logger-subscriber/model/LogLevel\";\nimport { type LogSubscriberOptions } from \"@api/logger-subscriber/model/LogSubscriberOptions\";\n\nimport { ConsoleLogger } from \"./ConsoleLogger\";\n\nconst warn = vi.spyOn(console, \"warn\").mockImplementation(vi.fn());\nconst info = vi.spyOn(console, \"info\").mockImplementation(vi.fn());\nconst debug = vi.spyOn(console, \"debug\").mockImplementation(vi.fn());\nconst error = vi.spyOn(console, \"error\").mockImplementation(vi.fn());\nconst log = vi.spyOn(console, \"log\").mockImplementation(vi.fn());\n\nlet logger: ConsoleLogger;\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 `[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G,yBAA0B,IAAM,CACjCD,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCD,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,GAAG,cAAc,EACjBD,EAAS,IAAIN,EAAcD,EAAS,KAAK,CAC3C,CAAC,EAED,SAAS,MAAO,IAAM,CACpB,GAAG,4BAA6B,IAAM,CACpCO,EAAO,IAAIP,EAAS,KAAMS,EAASD,CAAO,EAC1C,OAAOL,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,4BAA6B,IAAM,CACpCI,EAAO,IAAIP,EAAS,QAASS,EAASD,CAAO,EAC7C,OAAON,CAAI,EAAE,IAAI,iBAAiB,CACpC,CAAC,EAED,GAAG,6BAA8B,IAAM,CACrCK,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOJ,CAAK,EAAE,IAAI,iBAAiB,CACrC,CAAC,EAED,GAAG,yBAA0B,IAAM,CACjCG,EAAO,IAAIP,EAAS,MAAOS,EAASD,CAAO,EAC3C,OAAOH,CAAK,EAAE,qBACZ,IAAIG,EAAQ,GAAG,IACfC,EACAD,EAAQ,IACV,CACF,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["LogLevel", "ConsoleLogger", "warn", "info", "debug", "error", "log", "logger", "options", "message", "tag"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{deviceModelStubBuilder as n}from"../../device-model/model/DeviceModel.stub";import{DeviceSession as a}from"../../../internal/device-session/model/DeviceSession";import{getJSONStringifyReplacer as r}from"./WebLogsExporterLogger";describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=r(),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=n(),t=r(),c={deviceModel:n(),type:"USB",id:"mockedDeviceId",sendApdu:jest.fn(),transport:"USB"},i=new a({connectedDevice:c,id:"mockedSessionId"},jest.fn(),{}),o=JSON.stringify(i,t),s=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;i.close(),expect(o).toEqual(s)}),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,r());expect(c).toEqual(t)})});
1
+ import{deviceModelStubBuilder as n}from"../../device-model/model/DeviceModel.stub";import{DeviceSession as a}from"../../../internal/device-session/model/DeviceSession";import{getJSONStringifyReplacer as r}from"./WebLogsExporterLogger";describe("getJSONStringifyReplacer",()=>{it("should return a function that replaces Uint8Array correctly",()=>{const e=r(),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=n(),t=r(),c={deviceModel:n(),type:"USB",id:"mockedDeviceId",sendApdu:vi.fn(),transport:"USB"},i=new a({connectedDevice:c,id:"mockedSessionId"},vi.fn(),{},{}),o=JSON.stringify(i,t),s=`{"id":"mockedSessionId","connectedDevice":{"deviceModel":${JSON.stringify(e)},"type":"USB","id":"mockedDeviceId"}}`;i.close(),expect(o).toEqual(s)}),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,r());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,OAAS,0BAAAA,MAA8B,2CAEvC,OAAS,iBAAAC,MAAqB,+CAG9B,OAAS,4BAAAC,MAAgC,0BAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,EAAWD,EAAyB,EACpCE,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,EAAkBN,EAAuB,EACzCG,EAAWD,EAAyB,EAEpCK,EAA4C,CAChD,YAAaP,EAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,KAAK,GAAG,EAClB,UAAW,KACb,EAEMI,EAAQ,IAAIH,EAChB,CACE,gBAAAM,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,EAAKP,EAAyB,CAAC,EAC7D,OAAOG,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,OAAS,0BAAAA,MAA8B,2CAEvC,OAAS,iBAAAC,MAAqB,+CAI9B,OAAS,4BAAAC,MAAgC,0BAEzC,SAAS,2BAA4B,IAAM,CACzC,GAAG,8DAA+D,IAAM,CACtE,MAAMC,EAAWD,EAAyB,EACpCE,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,EAAkBN,EAAuB,EACzCG,EAAWD,EAAyB,EAEpCK,EAA4C,CAChD,YAAaP,EAAuB,EACpC,KAAM,MACN,GAAI,iBACJ,SAAU,GAAG,GAAG,EAChB,UAAW,KACb,EAEMI,EAAQ,IAAIH,EAChB,CACE,gBAAAM,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,EAAKP,EAAyB,CAAC,EAC7D,OAAOG,CAAM,EAAE,QAAQG,CAAQ,CACjC,CAAC,CACH,CAAC",
6
6
  "names": ["deviceModelStubBuilder", "DeviceSession", "getJSONStringifyReplacer", "replacer", "value", "result", "stubDeviceModel", "connectedDevice", "expected", "obj"]
7
7
  }
@@ -1,2 +1,2 @@
1
- class e{log=jest.fn()}export{e as ConsoleLogger};
1
+ class e{log=vi.fn()}export{e as ConsoleLogger};
2
2
  //# sourceMappingURL=ConsoleLogger.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/api/logger-subscriber/service/__mocks__/ConsoleLogger.ts"],
4
- "sourcesContent": ["export class ConsoleLogger {\n log = jest.fn();\n}\n"],
5
- "mappings": "AAAO,MAAMA,CAAc,CACzB,IAAM,KAAK,GAAG,CAChB",
4
+ "sourcesContent": ["export class ConsoleLogger {\n log = vi.fn();\n}\n"],
5
+ "mappings": "AAAO,MAAMA,CAAc,CACzB,IAAM,GAAG,GAAG,CACd",
6
6
  "names": ["ConsoleLogger"]
7
7
  }
@@ -1,2 +1,2 @@
1
- class t{constructor(){}create=jest.fn().mockImplementation(()=>({sendApdu:jest.fn()}))}export{t as DeviceConnectionFactoryStub};
1
+ class n{constructor(){}create=vi.fn().mockImplementation(()=>({sendApdu:vi.fn()}))}export{n as 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": "AAAO,MAAMA,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": "AAAO,MAAMA,CAA4B,CACvC,aAAc,CAAC,CAEf,OAAS,GAAG,GAAG,EAAE,mBAAmB,KAAO,CACzC,SAAU,GAAG,GAAG,CAClB,EAAE,CACJ",
6
6
  "names": ["DeviceConnectionFactoryStub"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Right as r}from"purify-ts";import{deviceModelStubBuilder as o}from"../../device-model/model/DeviceModel.stub";import{defaultApduResponseStubBuilder as n}from"../../device-session/ApduResponse.stub";import{TransportConnectedDevice as i}from"./TransportConnectedDevice";function u(e={}){const t=o();return new i({deviceModel:t,id:"42",type:"MOCK",transport:"USB",sendApdu:jest.fn(async()=>Promise.resolve(r(n()))),...e})}export{u as connectedDeviceStubBuilder};
1
+ import{Right as t}from"purify-ts";import{deviceModelStubBuilder as o}from"../../device-model/model/DeviceModel.stub";import{defaultApduResponseStubBuilder as n}from"../../device-session/ApduResponse.stub";import{TransportConnectedDevice as i}from"./TransportConnectedDevice";function u(e={}){const r=o();return new i({deviceModel:r,id:"42",type:"MOCK",transport:"USB",sendApdu:vi.fn(async()=>Promise.resolve(t(n()))),...e})}export{u as 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": "AAAA,OAAS,SAAAA,MAAa,YAEtB,OAAS,0BAAAC,MAA8B,2CACvC,OAAS,kCAAAC,MAAsC,wCAE/C,OAEE,4BAAAC,MACK,6BAEA,SAASC,EACdC,EAAiD,CAAC,EACxB,CAC1B,MAAMC,EAAcL,EAAuB,EAC3C,OAAO,IAAIE,EAAyB,CAClC,YAAAG,EACA,GAAI,KACJ,KAAM,OACN,UAAW,MACX,SAAU,KAAK,GAAG,SAChB,QAAQ,QAAQN,EAAME,EAA+B,CAAC,CAAC,CACzD,EACA,GAAGG,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": "AAAA,OAAS,SAAAA,MAAa,YAEtB,OAAS,0BAAAC,MAA8B,2CACvC,OAAS,kCAAAC,MAAsC,wCAE/C,OAEE,4BAAAC,MACK,6BAEA,SAASC,EACdC,EAAiD,CAAC,EACxB,CAC1B,MAAMC,EAAcL,EAAuB,EAC3C,OAAO,IAAIE,EAAyB,CAClC,YAAAG,EACA,GAAI,KACJ,KAAM,OACN,UAAW,MACX,SAAU,GAAG,GAAG,SACd,QAAQ,QAAQN,EAAME,EAA+B,CAAC,CAAC,CACzD,EACA,GAAGG,CACL,CAAC,CACH",
6
6
  "names": ["Right", "deviceModelStubBuilder", "defaultApduResponseStubBuilder", "TransportConnectedDevice", "connectedDeviceStubBuilder", "props", "deviceModel"]
7
7
  }
@@ -1,2 +1,2 @@
1
- class e{constructor(){}getIdentifier=jest.fn();isSupported=jest.fn();startDiscovering=jest.fn();stopDiscovering=jest.fn();listenToKnownDevices=jest.fn();connect=jest.fn();disconnect=jest.fn()}export{e as TransportMock};
1
+ class i{constructor(){}getIdentifier=vi.fn();isSupported=vi.fn();startDiscovering=vi.fn();stopDiscovering=vi.fn();listenToKnownDevices=vi.fn();connect=vi.fn();disconnect=vi.fn()}export{i as 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": "AAEO,MAAMA,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": "AAEO,MAAMA,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"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{base64StringToBuffer as l,isBase64String as s}from"./Base64String";describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const t=s("Zmlyc3QgdG/zdGluZyBz+HI9");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdHI=");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdH==");expect(t).toBeTruthy()}),it("should return true for an empty string",()=>{const t=s("");expect(t).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const t=s("invalid base64 string");expect(t).toBeFalsy()}),it("should return false with 3 paddings",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzd===");expect(t).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdHI");expect(t).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{jest.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const t=l("");expect(t).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const t=l("invalid string");expect(t).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const t=l("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=l("Zmlyc3QgdGVzdCBzdHJpbmc=");expect(t).toStrictEqual(Uint8Array.from([102,105,114,115,116,32,116,101,115,116,32,115,116,114,105,110,103]))})})});
1
+ import{base64StringToBuffer as l,isBase64String as s}from"./Base64String";describe("Base64String",()=>{describe("isBase64String function",()=>{it("should return true if the value is a valid base64 string",()=>{const t=s("Zmlyc3QgdG/zdGluZyBz+HI9");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, one padding",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdHI=");expect(t).toBeTruthy()}),it("should return true if the value is a valid base64 string, two paddings",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdH==");expect(t).toBeTruthy()}),it("should return true for an empty string",()=>{const t=s("");expect(t).toBeTruthy()}),it("should return false for an invalid base64 string",()=>{const t=s("invalid base64 string");expect(t).toBeFalsy()}),it("should return false with 3 paddings",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzd===");expect(t).toBeFalsy()}),it("should return false on incomplete string (not multiple of 4)",()=>{const t=s("Zmlyc3QgdGVzdGluZyBzdHI");expect(t).toBeFalsy()})}),describe("base64StringToBuffer function",()=>{beforeEach(()=>{vi.resetAllMocks()}),it("should convert empty input to empty buffer",()=>{const t=l("");expect(t).toStrictEqual(new Uint8Array)}),it("invalid base64 string converted to null",()=>{const t=l("invalid string");expect(t).toStrictEqual(null)}),it("should convert a base64 string to a buffer using browser's atob",()=>{const t=l("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=l("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,OAAS,wBAAAA,EAAsB,kBAAAC,MAAsB,iBAErD,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,IAAM,CACxC,GAAG,2DAA4D,IAAM,CAKnE,MAAMC,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,wEAAyE,IAAM,CAKhF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yEAA0E,IAAM,CAKjF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yCAA0C,IAAM,CAKjD,MAAMA,EAASD,EAHD,EAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,mDAAoD,IAAM,CAK3D,MAAMA,EAASD,EAHD,uBAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,sCAAuC,IAAM,CAK9C,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,+DAAgE,IAAM,CAKvE,MAAMA,EAASD,EAHD,yBAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,KAAK,cAAc,CACrB,CAAC,EAED,GAAG,6CAA8C,IAAM,CAKrD,MAAMA,EAASF,EAHD,EAG2B,EAGzC,OAAOE,CAAM,EAAE,cAAc,IAAI,UAAY,CAC/C,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,EAASF,EAHD,gBAG2B,EAGzC,OAAOE,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,kEAAmE,IAAM,CAK1E,MAAMA,EAASF,EAHD,0BAG2B,EAGzC,OAAOE,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,EAED,GAAG,0DAA2D,IAAM,CAElE,KAAK,MAAM,OAAQ,MAAM,EAAE,mBAAmB,IAAM,CAClD,MAAM,IAAI,MAAM,qBAAqB,CACvC,CAAC,EAID,MAAMA,EAASF,EAHD,0BAG2B,EAGzC,OAAOE,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,OAAS,wBAAAA,EAAsB,kBAAAC,MAAsB,iBAErD,SAAS,eAAgB,IAAM,CAC7B,SAAS,0BAA2B,IAAM,CACxC,GAAG,2DAA4D,IAAM,CAKnE,MAAMC,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,wEAAyE,IAAM,CAKhF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yEAA0E,IAAM,CAKjF,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,yCAA0C,IAAM,CAKjD,MAAMA,EAASD,EAHD,EAGqB,EAGnC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,mDAAoD,IAAM,CAK3D,MAAMA,EAASD,EAHD,uBAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,sCAAuC,IAAM,CAK9C,MAAMA,EAASD,EAHD,0BAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,+DAAgE,IAAM,CAKvE,MAAMA,EAASD,EAHD,yBAGqB,EAGnC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,CACH,CAAC,EAED,SAAS,gCAAiC,IAAM,CAC9C,WAAW,IAAM,CACf,GAAG,cAAc,CACnB,CAAC,EAED,GAAG,6CAA8C,IAAM,CAKrD,MAAMA,EAASF,EAHD,EAG2B,EAGzC,OAAOE,CAAM,EAAE,cAAc,IAAI,UAAY,CAC/C,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,EAASF,EAHD,gBAG2B,EAGzC,OAAOE,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,kEAAmE,IAAM,CAK1E,MAAMA,EAASF,EAHD,0BAG2B,EAGzC,OAAOE,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,EAED,GAAG,0DAA2D,IAAM,CAElE,GAAG,MAAM,OAAQ,MAAM,EAAE,mBAAmB,IAAM,CAChD,MAAM,IAAI,MAAM,qBAAqB,CACvC,CAAC,EAID,MAAMA,EAASF,EAHD,0BAG2B,EAGzC,OAAOE,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": ["base64StringToBuffer", "isBase64String", "result"]
7
7
  }
@@ -1,2 +1,2 @@
1
- const i=t=>/^0x[0-9a-fA-F]*$/.test(t),e=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)},s=t=>`0x${Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}`;export{s as bufferToHexaString,e as hexaStringToBuffer,i as isHexaString};
1
+ const i=t=>typeof t=="string"&&/^0x[0-9a-fA-F]*$/.test(t),e=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)},s=t=>`0x${Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}`;export{s as bufferToHexaString,e as hexaStringToBuffer,i as 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": "AAEO,MAAMA,EAAgBC,GACpB,mBAAmB,KAAKA,CAAK,EAGzBC,EAAsBD,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,MAAME,EAAQF,EAAM,MAAM,SAAS,GAAG,IAAKG,GAAS,SAASA,EAAM,EAAE,CAAC,EACtE,MAAI,CAACD,GAASA,EAAM,KAAK,KAAK,EACrB,KAEF,IAAI,WAAWA,CAAK,CAC7B,EAEaE,EAAsBJ,GAC1B,KAAK,MAAM,KAAKA,EAAQG,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": "AAEO,MAAMA,EAAgBC,GACpB,OAAOA,GAAU,UAAY,mBAAmB,KAAKA,CAAK,EAGtDC,EAAsBD,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,MAAME,EAAQF,EAAM,MAAM,SAAS,GAAG,IAAKG,GAAS,SAASA,EAAM,EAAE,CAAC,EACtE,MAAI,CAACD,GAASA,EAAM,KAAK,KAAK,EACrB,KAEF,IAAI,WAAWA,CAAK,CAC7B,EAEaE,EAAsBJ,GAC1B,KAAK,MAAM,KAAKA,EAAQG,GAC7BA,EAAK,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CACnC,EAAE,KAAK,EAAE,CAAC",
6
6
  "names": ["isHexaString", "value", "hexaStringToBuffer", "bytes", "byte", "bufferToHexaString"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{bufferToHexaString as a,hexaStringToBuffer as u,isHexaString as r}from"./HexaString";describe("HexaString",()=>{describe("isHexaString function",()=>{it("should return true if the value is a valid hex string",()=>{const t=r("0x1234abc");expect(t).toBeTruthy()}),it("should return true if no data",()=>{const t=r("0x");expect(t).toBeTruthy()}),it("should return false if the value contain an invalid letter",()=>{const t=r("0x1234z");expect(t).toBeFalsy()}),it("should return false if the value does not start with 0x",()=>{const t=r("1234abc");expect(t).toBeFalsy()}),it("should return false for an epmty string",()=>{const t=r("");expect(t).toBeFalsy()})}),describe("hexaStringToBuffer function",()=>{it("should convert empty input to empty buffer",()=>{const t=u("");expect(t).toStrictEqual(new Uint8Array)}),it("should fail on invalid string",()=>{const t=u("bonjour");expect(t).toStrictEqual(null)}),it("should fail on invalid string with valid numbers",()=>{const t=u("0x012n34");expect(t).toStrictEqual(null)}),it("should convert correct hexadecimal string",()=>{const t=u("1a35669f0100");expect(t).toStrictEqual(new Uint8Array([26,53,102,159,1,0]))}),it("should support 0x prefix",()=>{const t=u("0x1a35");expect(t).toStrictEqual(new Uint8Array([26,53]))}),it("should be case insensitive",()=>{const t=u("0xcCDd");expect(t).toStrictEqual(new Uint8Array([204,221]))}),it("should pad with 0",()=>{const t=u("0xa35");expect(t).toStrictEqual(new Uint8Array([10,53]))})}),describe("bufferToHexaString function",()=>{it("should convert a buffer into a hexa string",()=>{const e=Uint8Array.from([0,1,2,255,254]),t=a(e);expect(t).toStrictEqual("0x000102fffe")})})});
1
+ import{bufferToHexaString as r,hexaStringToBuffer as u,isHexaString as n}from"./HexaString";describe("HexaString",()=>{describe("isHexaString function",()=>{it("should return true if the value is a valid hex string",()=>{const t=n("0x1234abc");expect(t).toBeTruthy()}),it("should return true if no data",()=>{const t=n("0x");expect(t).toBeTruthy()}),it("should return false if the value contain an invalid letter",()=>{const t=n("0x1234z");expect(t).toBeFalsy()}),it("should return false if the value does not start with 0x",()=>{const t=n("1234abc");expect(t).toBeFalsy()}),it("should return false for an epmty string",()=>{const t=n("");expect(t).toBeFalsy()}),it.each([123,[],{},null,void 0,!0])("should return false for invalid input %p",e=>{const t=n(e);expect(t).toBeFalsy()})}),describe("hexaStringToBuffer function",()=>{it("should convert empty input to empty buffer",()=>{const t=u("");expect(t).toStrictEqual(new Uint8Array)}),it("should fail on invalid string",()=>{const t=u("bonjour");expect(t).toStrictEqual(null)}),it("should fail on invalid string with valid numbers",()=>{const t=u("0x012n34");expect(t).toStrictEqual(null)}),it("should convert correct hexadecimal string",()=>{const t=u("1a35669f0100");expect(t).toStrictEqual(new Uint8Array([26,53,102,159,1,0]))}),it("should support 0x prefix",()=>{const t=u("0x1a35");expect(t).toStrictEqual(new Uint8Array([26,53]))}),it("should be case insensitive",()=>{const t=u("0xcCDd");expect(t).toStrictEqual(new Uint8Array([204,221]))}),it("should pad with 0",()=>{const t=u("0xa35");expect(t).toStrictEqual(new Uint8Array([10,53]))})}),describe("bufferToHexaString function",()=>{it("should convert a buffer into a hexa string",()=>{const e=Uint8Array.from([0,1,2,255,254]),t=r(e);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, 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,OACE,sBAAAA,EACA,sBAAAC,EACA,gBAAAC,MACK,eAEP,SAAS,aAAc,IAAM,CAC3B,SAAS,wBAAyB,IAAM,CACtC,GAAG,wDAAyD,IAAM,CAKhE,MAAMC,EAASD,EAHD,WAGmB,EAGjC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,gCAAiC,IAAM,CAKxC,MAAMA,EAASD,EAHD,IAGmB,EAGjC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,6DAA8D,IAAM,CAKrE,MAAMA,EAASD,EAHD,SAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0DAA2D,IAAM,CAKlE,MAAMA,EAASD,EAHD,SAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,EAASD,EAHD,EAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,CACH,CAAC,EAED,SAAS,8BAA+B,IAAM,CAC5C,GAAG,6CAA8C,IAAM,CAKrD,MAAMA,EAASF,EAHD,EAGyB,EAGvC,OAAOE,CAAM,EAAE,cAAc,IAAI,UAAY,CAC/C,CAAC,EAED,GAAG,gCAAiC,IAAM,CAKxC,MAAMA,EAASF,EAHD,SAGyB,EAGvC,OAAOE,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,mDAAoD,IAAM,CAK3D,MAAMA,EAASF,EAHD,UAGyB,EAGvC,OAAOE,CAAM,EAAE,cAAc,IAAI,CACnC,CAAC,EAED,GAAG,4CAA6C,IAAM,CAKpD,MAAMA,EAASF,EAHD,cAGyB,EAGvC,OAAOE,CAAM,EAAE,cACb,IAAI,WAAW,CAAC,GAAM,GAAM,IAAM,IAAM,EAAM,CAAI,CAAC,CACrD,CACF,CAAC,EAED,GAAG,2BAA4B,IAAM,CAKnC,MAAMA,EAASF,EAHD,QAGyB,EAGvC,OAAOE,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,GAAM,EAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,6BAA8B,IAAM,CAKrC,MAAMA,EAASF,EAHD,QAGyB,EAGvC,OAAOE,CAAM,EAAE,cAAc,IAAI,WAAW,CAAC,IAAM,GAAI,CAAC,CAAC,CAC3D,CAAC,EAED,GAAG,oBAAqB,IAAM,CAK5B,MAAMA,EAASF,EAHD,OAGyB,EAGvC,OAAOE,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,EAASH,EAAmBI,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,OACE,sBAAAA,EACA,sBAAAC,EACA,gBAAAC,MACK,eAEP,SAAS,aAAc,IAAM,CAC3B,SAAS,wBAAyB,IAAM,CACtC,GAAG,wDAAyD,IAAM,CAKhE,MAAMC,EAASD,EAHD,WAGmB,EAGjC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,gCAAiC,IAAM,CAKxC,MAAMA,EAASD,EAHD,IAGmB,EAGjC,OAAOC,CAAM,EAAE,WAAW,CAC5B,CAAC,EAED,GAAG,6DAA8D,IAAM,CAKrE,MAAMA,EAASD,EAHD,SAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0DAA2D,IAAM,CAKlE,MAAMA,EAASD,EAHD,SAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,0CAA2C,IAAM,CAKlD,MAAMA,EAASD,EAHD,EAGmB,EAGjC,OAAOC,CAAM,EAAE,UAAU,CAC3B,CAAC,EAED,GAAG,KAAK,CAAC,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C,EAAG,EAAG,EAAG,IAAM,GAAI,CAAC,EAG7CD,EAASH,EAAmBI,CAAK,EAGvC,OAAOD,CAAM,EAAE,cAAc,cAAc,CAC7C,CAAC,CACH,CAAC,CACH,CAAC",
6
6
  "names": ["bufferToHexaString", "hexaStringToBuffer", "isHexaString", "result", "value"]
7
7
  }
package/lib/esm/src/di.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Container as i}from"inversify";import{commandModuleFactory as a}from"./api/command/di/commandModule";import{deviceActionModuleFactory as p}from"./api/device-action/di/deviceActionModule";import{configModuleFactory as c}from"./internal/config/di/configModule";import{deviceModelModuleFactory as n}from"./internal/device-model/di/deviceModelModule";import{deviceSessionModuleFactory as f}from"./internal/device-session/di/deviceSessionModule";import{discoveryModuleFactory as l}from"./internal/discovery/di/discoveryModule";import{loggerModuleFactory as d}from"./internal/logger-publisher/di/loggerModule";import{managerApiModuleFactory as y}from"./internal/manager-api/di/managerApiModule";import{DEFAULT_MANAGER_API_BASE_URL as M,DEFAULT_MOCK_SERVER_BASE_URL as F}from"./internal/manager-api/model/Const";import{sendModuleFactory as g}from"./internal/send/di/sendModule";import{transportModuleFactory as s}from"./internal/transport/di/transportModule";const P=({stub:o=!1,transports:t=[],loggers:m=[],config:r={managerApiUrl:M,mockUrl:F}})=>{const e=new i;return e.load(c({stub:o}),n({stub:o}),s({stub:o,transports:t,config:r}),y({stub:o,config:r}),l({stub:o}),d({subscribers:m}),f({stub:o}),g({stub:o}),a({stub:o}),p({stub:o})),e};export{P as makeContainer};
1
+ import{Container as i}from"inversify";import{commandModuleFactory as a}from"./api/command/di/commandModule";import{deviceActionModuleFactory as p}from"./api/device-action/di/deviceActionModule";import{configModuleFactory as c}from"./internal/config/di/configModule";import{deviceModelModuleFactory as n}from"./internal/device-model/di/deviceModelModule";import{deviceSessionModuleFactory as l}from"./internal/device-session/di/deviceSessionModule";import{discoveryModuleFactory as f}from"./internal/discovery/di/discoveryModule";import{loggerModuleFactory as d}from"./internal/logger-publisher/di/loggerModule";import{managerApiModuleFactory as y}from"./internal/manager-api/di/managerApiModule";import{DEFAULT_MANAGER_API_BASE_URL as F,DEFAULT_MOCK_SERVER_BASE_URL as M}from"./internal/manager-api/model/Const";import{secureChannelModuleFactory as s}from"./internal/secure-channel/di/secureChannelModule";import{DEFAULT_WEB_SOCKET_BASE_URL as g}from"./internal/secure-channel/model/Const";import{sendModuleFactory as A}from"./internal/send/di/sendModule";import{transportModuleFactory as _}from"./internal/transport/di/transportModule";const x=({stub:o=!1,transports:t=[],loggers:m=[],config:r={mockUrl:M,managerApiUrl:F,webSocketUrl:g}})=>{const e=new i;return e.load(c({stub:o}),n({stub:o}),_({stub:o,transports:t,config:r}),y({stub:o,config:r}),s({stub:o,config:r}),f({stub:o}),d({subscribers:m}),l({stub:o}),A({stub:o}),a({stub:o}),p({stub:o})),e};export{x as 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} 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 managerApiUrl: DEFAULT_MANAGER_API_BASE_URL,\n mockUrl: DEFAULT_MOCK_SERVER_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": "AAAA,OAAS,aAAAA,MAAiB,YAI1B,OAAS,wBAAAC,MAA4B,gCACrC,OAAS,6BAAAC,MAAiC,2CAI1C,OAAS,uBAAAC,MAA2B,mCACpC,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,0BAAAC,MAA8B,yCACvC,OAAS,uBAAAC,MAA2B,6CACpC,OAAS,2BAAAC,MAA+B,4CACxC,OACE,gCAAAC,EACA,gCAAAC,MACK,oCACP,OAAS,qBAAAC,MAAyB,+BAClC,OAAS,0BAAAC,MAA8B,0CAYhC,MAAMC,EAAgB,CAAC,CAC5B,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,cAAeR,EACf,QAASC,CACX,CACF,IAAmC,CACjC,MAAMQ,EAAY,IAAIlB,EAKtB,OAAAkB,EAAU,KACRf,EAAoB,CAAE,KAAAW,CAAK,CAAC,EAC5BV,EAAyB,CAAE,KAAAU,CAAK,CAAC,EACjCF,EAAuB,CAAE,KAAAE,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,EACnDT,EAAwB,CAAE,KAAAM,EAAM,OAAAG,CAAO,CAAC,EACxCX,EAAuB,CAAE,KAAAQ,CAAK,CAAC,EAC/BP,EAAoB,CAAE,YAAaS,CAAQ,CAAC,EAC5CX,EAA2B,CAAE,KAAAS,CAAK,CAAC,EACnCH,EAAkB,CAAE,KAAAG,CAAK,CAAC,EAC1Bb,EAAqB,CAAE,KAAAa,CAAK,CAAC,EAC7BZ,EAA0B,CAAE,KAAAY,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
- "names": ["Container", "commandModuleFactory", "deviceActionModuleFactory", "configModuleFactory", "deviceModelModuleFactory", "deviceSessionModuleFactory", "discoveryModuleFactory", "loggerModuleFactory", "managerApiModuleFactory", "DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "sendModuleFactory", "transportModuleFactory", "makeContainer", "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": "AAAA,OAAS,aAAAA,MAAiB,YAI1B,OAAS,wBAAAC,MAA4B,gCACrC,OAAS,6BAAAC,MAAiC,2CAI1C,OAAS,uBAAAC,MAA2B,mCACpC,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,0BAAAC,MAA8B,yCACvC,OAAS,uBAAAC,MAA2B,6CACpC,OAAS,2BAAAC,MAA+B,4CACxC,OACE,gCAAAC,EACA,gCAAAC,MACK,oCACP,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,+BAAAC,MAAmC,uCAC5C,OAAS,qBAAAC,MAAyB,+BAClC,OAAS,0BAAAC,MAA8B,0CAYhC,MAAMC,EAAgB,CAAC,CAC5B,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,QAAAC,EAAU,CAAC,EACX,OAAAC,EAAS,CACP,QAAST,EACT,cAAeD,EACf,aAAcG,CAChB,CACF,IAAmC,CACjC,MAAMQ,EAAY,IAAIpB,EAKtB,OAAAoB,EAAU,KACRjB,EAAoB,CAAE,KAAAa,CAAK,CAAC,EAC5BZ,EAAyB,CAAE,KAAAY,CAAK,CAAC,EACjCF,EAAuB,CAAE,KAAAE,EAAM,WAAAC,EAAY,OAAAE,CAAO,CAAC,EACnDX,EAAwB,CAAE,KAAAQ,EAAM,OAAAG,CAAO,CAAC,EACxCR,EAA2B,CAAE,KAAAK,EAAM,OAAAG,CAAO,CAAC,EAC3Cb,EAAuB,CAAE,KAAAU,CAAK,CAAC,EAC/BT,EAAoB,CAAE,YAAaW,CAAQ,CAAC,EAC5Cb,EAA2B,CAAE,KAAAW,CAAK,CAAC,EACnCH,EAAkB,CAAE,KAAAG,CAAK,CAAC,EAC1Bf,EAAqB,CAAE,KAAAe,CAAK,CAAC,EAC7Bd,EAA0B,CAAE,KAAAc,CAAK,CAAC,CAEpC,EAEOI,CACT",
6
+ "names": ["Container", "commandModuleFactory", "deviceActionModuleFactory", "configModuleFactory", "deviceModelModuleFactory", "deviceSessionModuleFactory", "discoveryModuleFactory", "loggerModuleFactory", "managerApiModuleFactory", "DEFAULT_MANAGER_API_BASE_URL", "DEFAULT_MOCK_SERVER_BASE_URL", "secureChannelModuleFactory", "DEFAULT_WEB_SOCKET_BASE_URL", "sendModuleFactory", "transportModuleFactory", "makeContainer", "stub", "transports", "loggers", "config", "container"]
7
7
  }
@@ -1,2 +1,2 @@
1
- var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=(f,o,i,r)=>{for(var c=r>1?void 0:r?p(o,i):o,j=f.length-1,l;j>=0;j--)(l=f[j])&&(c=(r?l(o,i,c):l(c))||c);return r&&c&&n(o,i,c),c};import{injectable as x}from"inversify";let t=class{execute=jest.fn(()=>"stub")};t=m([x()],t);export{t as StubUseCase};
1
+ var t=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var p=(f,i,l,o)=>{for(var c=o>1?void 0:o?x(i,l):i,m=f.length-1,n;m>=0;m--)(n=f[m])&&(c=(o?n(i,l,c):n(c))||c);return o&&c&&t(i,l,c),c};import{injectable as j}from"inversify";let r=class{execute=vi.fn(()=>"stub")};r=p([j()],r);export{r as 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": "wMAAA,OAAS,cAAAA,MAAkB,YAGpB,IAAMC,EAAN,KAAkB,CACvB,QAAU,KAAK,GAAG,IAAM,MAAM,CAChC,EAFaA,EAANC,EAAA,CADNC,EAAW,GACCF",
4
+ "sourcesContent": ["import { injectable } from \"inversify\";\n\n@injectable()\nexport class StubUseCase {\n execute = vi.fn(() => \"stub\");\n}\n"],
5
+ "mappings": "wMAAA,OAAS,cAAAA,MAAkB,YAGpB,IAAMC,EAAN,KAAkB,CACvB,QAAU,GAAG,GAAG,IAAM,MAAM,CAC9B,EAFaA,EAANC,EAAA,CADNC,EAAW,GACCF",
6
6
  "names": ["injectable", "StubUseCase", "__decorateClass", "injectable"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Either as a,Left as n}from"purify-ts";import{JSONParseError as s,ReadFileError as c}from"../../config/model/Errors";import l from"../../../../package.json";import*as i from"./LocalConfigDataSource";const{FileLocalConfigDataSource:m}=i,r=jest.spyOn(i,"stubFsReadFile"),o=jest.spyOn(JSON,"parse");let t;describe("LocalConfigDataSource",()=>{describe("FileLocalConfigDataSource",()=>{beforeEach(()=>{r.mockClear(),o.mockClear(),t=new m}),afterAll(()=>{r.mockRestore(),o.mockRestore()}),it("should return an Either<never, Config>",()=>{r.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),o.mockReturnValue({name:"DeviceSDK",version:"0.0.0-spied.1"}),expect(t.getConfig()).toStrictEqual(a.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");r.mockImplementation(()=>{throw e}),expect(t.getConfig()).toEqual(n(new c(e)))}),it("should return an Either<JSONParseError, never> if JSON.parse throws",()=>{const e=new Error("JSON.parse error");r.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),o.mockImplementation(()=>{throw e}),expect(t.getConfig()).toEqual(n(new s(e)))})}),describe("stubFsReadFile",()=>{it("should return a stringified version of the version object",()=>{expect(i.stubFsReadFile()).toEqual(JSON.stringify({name:"@ledgerhq/device-management-kit",version:l.version}))})})});
1
+ import{Either as a,Left as i}from"purify-ts";import{JSONParseError as s,ReadFileError as c}from"../../config/model/Errors";import l from"../../../../package.json";import*as o from"./LocalConfigDataSource";const{FileLocalConfigDataSource:f}=o,t=vi.spyOn(o,"stubFsReadFile"),n=vi.spyOn(JSON,"parse"),u=vi.spyOn(JSON,"stringify");let r;describe("LocalConfigDataSource",()=>{describe("FileLocalConfigDataSource",()=>{beforeEach(()=>{vi.resetAllMocks(),r=new f}),afterAll(()=>{vi.resetAllMocks()}),it("should return an Either<never, Config>",()=>{t.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),n.mockReturnValue({name:"DeviceSDK",version:"0.0.0-spied.1"}),expect(r.getConfig()).toStrictEqual(a.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");u.mockImplementation(()=>{throw e}),expect(r.getConfig()).toEqual(i(new c(e)))}),it("should return an Either<JSONParseError, never> if JSON.parse throws",()=>{const e=new Error("JSON.parse error");t.mockReturnValue(JSON.stringify({name:"DeviceSDK",version:"0.0.0-spied.1"})),n.mockImplementation(()=>{throw e}),expect(r.getConfig()).toEqual(i(new s(e)))})}),describe("stubFsReadFile",()=>{it("should return a stringified version of the version object",()=>{expect(o.stubFsReadFile()).toEqual(JSON.stringify({name:"@ledgerhq/device-management-kit",version:l.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": "AAAA,OAAS,UAAAA,EAAQ,QAAAC,MAAY,YAE7B,OAAS,kBAAAC,EAAgB,iBAAAC,MAAqB,gCAC9C,OAAOC,MAAS,qBAGhB,UAAYC,MAAiB,0BAE7B,KAAM,CAAE,0BAAAC,CAA0B,EAAID,EAEhCE,EAAkB,KAAK,MAAMF,EAAa,gBAAgB,EAC1DG,EAAY,KAAK,MAAM,KAAM,OAAO,EAE1C,IAAIC,EACJ,SAAS,wBAAyB,IAAM,CACtC,SAAS,4BAA6B,IAAM,CAC1C,WAAW,IAAM,CACfF,EAAgB,UAAU,EAC1BC,EAAU,UAAU,EACpBC,EAAa,IAAIH,CACnB,CAAC,EAED,SAAS,IAAM,CACbC,EAAgB,YAAY,EAC5BC,EAAU,YAAY,CACxB,CAAC,EAED,GAAG,yCAA0C,IAAM,CACjDD,EAAgB,gBACd,KAAK,UAAU,CAAE,KAAM,YAAa,QAAS,eAAgB,CAAC,CAChE,EAEAC,EAAU,gBAAgB,CACxB,KAAM,YACN,QAAS,eACX,CAAC,EAED,OAAOC,EAAW,UAAU,CAAC,EAAE,cAC7BT,EAAO,GAAG,CACR,KAAM,YACN,QAAS,eACX,CAAC,CACH,CACF,CAAC,EAED,GAAG,uEAAwE,IAAM,CAC/E,MAAMU,EAAM,IAAI,MAAM,oBAAoB,EAC1CH,EAAgB,mBAAmB,IAAM,CACvC,MAAMG,CACR,CAAC,EAED,OAAOD,EAAW,UAAU,CAAC,EAAE,QAAQR,EAAK,IAAIE,EAAcO,CAAG,CAAC,CAAC,CACrE,CAAC,EAED,GAAG,sEAAuE,IAAM,CAC9E,MAAMA,EAAM,IAAI,MAAM,kBAAkB,EACxCH,EAAgB,gBACd,KAAK,UAAU,CAAE,KAAM,YAAa,QAAS,eAAgB,CAAC,CAChE,EAEAC,EAAU,mBAAmB,IAAM,CACjC,MAAME,CACR,CAAC,EAED,OAAOD,EAAW,UAAU,CAAC,EAAE,QAAQR,EAAK,IAAIC,EAAeQ,CAAG,CAAC,CAAC,CACtE,CAAC,CACH,CAAC,EAED,SAAS,iBAAkB,IAAM,CAC/B,GAAG,4DAA6D,IAAM,CACpE,OAAOL,EAAY,eAAe,CAAC,EAAE,QACnC,KAAK,UAAU,CACb,KAAM,kCACN,QAASD,EAAI,OACf,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
- "names": ["Either", "Left", "JSONParseError", "ReadFileError", "pkg", "LocalConfig", "FileLocalConfigDataSource", "readFileSyncSpy", "jsonParse", "datasource", "err"]
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": "AAAA,OAAS,UAAAA,EAAQ,QAAAC,MAAY,YAE7B,OAAS,kBAAAC,EAAgB,iBAAAC,MAAqB,gCAC9C,OAAOC,MAAS,qBA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KAAK,UAAU,CACb,KAAM,kCACN,QAASD,EAAI,OACf,CAAC,CACH,CACF,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["Either", "Left", "JSONParseError", "ReadFileError", "pkg", "LocalConfig", "FileLocalConfigDataSource", "readFileSyncSpy", "jsonParse", "jsonStringify", "datasource", "err"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Either as e,Left as o}from"purify-ts";import{ApiCallError as c,JSONParseError as l,ParseResponseError as s}from"../../config/model/Errors";import{RestRemoteConfigDataSource as i}from"./RemoteConfigDataSource";let r;const t=jest.spyOn(i.prototype,"_callApi"),n=jest.spyOn(i.prototype,"_parseResponse");describe("RemoteRestConfigDataSource",()=>{describe("RestRemoteConfigDataSource",()=>{beforeEach(()=>{t.mockClear(),n.mockClear(),r=new i}),it("should return an Either<never, Config>",async()=>{t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockReturnValue(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"})),expect(await r.getConfig()).toStrictEqual(e.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(o(a)),expect(await r.getConfig()).toStrictEqual(o(new c(a)))}),it("should return an Either<ApiCallError, never> if _callApi returns a non-ok response",async()=>{t.mockResolvedValue(e.of({ok:!1,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),expect(await r.getConfig()).toStrictEqual(o(new c(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.of({ok:!0,json:()=>Promise.resolve(o(a))})),expect(await r.getConfig()).toStrictEqual(o(new l))}),it("should return an Either<ParseResponseError, never> if _parseResponse throws",async()=>{t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockImplementation(()=>o(new s)),expect(await r.getConfig()).toStrictEqual(o(new s))}),it("should return an Either<ParseResponseError, never> if `name` is missing in Dto",async()=>{n.mockRestore(),t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({version:"0.0.0-fake.1",yolo:"yolo"}))})),expect(await r.getConfig()).toStrictEqual(o(new s))}),describe("without private methods spy",()=>{beforeEach(()=>{t.mockRestore(),n.mockRestore()}),it("should return an Either<never, Config>",async()=>{expect(await r.getConfig()).toStrictEqual(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})})})});
1
+ import{Either as e,Left as o}from"purify-ts";import{ApiCallError as c,JSONParseError as l,ParseResponseError as i}from"../../config/model/Errors";import{RestRemoteConfigDataSource as s}from"./RemoteConfigDataSource";let r;const t=vi.spyOn(s.prototype,"_callApi"),n=vi.spyOn(s.prototype,"_parseResponse");describe("RemoteRestConfigDataSource",()=>{describe("RestRemoteConfigDataSource",()=>{beforeEach(()=>{t.mockClear(),n.mockClear(),r=new s}),it("should return an Either<never, Config>",async()=>{t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockReturnValue(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"})),expect(await r.getConfig()).toStrictEqual(e.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(o(a)),expect(await r.getConfig()).toStrictEqual(o(new c(a)))}),it("should return an Either<ApiCallError, never> if _callApi returns a non-ok response",async()=>{t.mockResolvedValue(e.of({ok:!1,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),expect(await r.getConfig()).toStrictEqual(o(new c(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.of({ok:!0,json:()=>Promise.resolve(o(a))})),expect(await r.getConfig()).toStrictEqual(o(new l))}),it("should return an Either<ParseResponseError, never> if _parseResponse throws",async()=>{t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})),n.mockImplementation(()=>o(new i)),expect(await r.getConfig()).toStrictEqual(o(new i))}),it("should return an Either<ParseResponseError, never> if `name` is missing in Dto",async()=>{n.mockRestore(),t.mockResolvedValue(e.of({ok:!0,json:()=>Promise.resolve(e.of({version:"0.0.0-fake.1",yolo:"yolo"}))})),expect(await r.getConfig()).toStrictEqual(o(new i))}),describe("without private methods spy",()=>{beforeEach(()=>{t.mockRestore(),n.mockRestore()}),it("should return an Either<never, Config>",async()=>{expect(await r.getConfig()).toStrictEqual(e.of({name:"DeviceSDK",version:"0.0.0-fake.1"}))})})})});
2
2
  //# sourceMappingURL=RemoteConfigDataSource.test.js.map