@ledgerhq/device-management-kit 0.0.0-fix-rn-ble-20250502082216 → 0.0.0-fix-lns-20250901094837
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/cjs/package.json +22 -23
- package/lib/cjs/src/api/DeviceManagementKit.test.js +1 -1
- package/lib/cjs/src/api/DeviceManagementKit.test.js.map +2 -2
- package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
- package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
- package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
- package/lib/cjs/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
- package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js +1 -1
- package/lib/cjs/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
- package/lib/cjs/src/api/command/di/commandModule.js +1 -1
- package/lib/cjs/src/api/command/di/commandModule.js.map +3 -3
- package/lib/cjs/src/api/command/di/commandModule.test.js +1 -1
- package/lib/cjs/src/api/command/di/commandModule.test.js.map +2 -2
- package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
- package/lib/cjs/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
- package/lib/cjs/src/api/command/utils/CommandUtils.js +1 -1
- package/lib/cjs/src/api/command/utils/CommandUtils.js.map +2 -2
- package/lib/cjs/src/api/command/utils/CommandUtils.test.js +1 -1
- package/lib/cjs/src/api/command/utils/CommandUtils.test.js.map +2 -2
- package/lib/cjs/src/api/command/utils/GlobalCommandError.js +1 -1
- package/lib/cjs/src/api/command/utils/GlobalCommandError.js.map +2 -2
- package/lib/cjs/src/api/device/DeviceModel.js +1 -1
- package/lib/cjs/src/api/device/DeviceModel.js.map +2 -2
- package/lib/cjs/src/api/device-action/DeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/DeviceAction.js.map +1 -1
- package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
- package/lib/cjs/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
- package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
- package/lib/cjs/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
- package/lib/cjs/src/api/device-action/di/deviceActionModule.js +1 -1
- package/lib/cjs/src/api/device-action/di/deviceActionModule.js.map +3 -3
- package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js +1 -1
- package/lib/cjs/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
- package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js +1 -1
- package/lib/cjs/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
- package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.js.map +1 -1
- package/lib/cjs/src/api/device-action/os/Errors.js +1 -1
- package/lib/cjs/src/api/device-action/os/Errors.js.map +3 -3
- package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js +1 -1
- package/lib/cjs/src/api/device-action/os/GetDeviceMetadata/types.js.map +1 -1
- package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
- package/lib/cjs/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
- package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js +1 -1
- package/lib/cjs/src/api/device-action/os/GoToDashboard/types.js.map +1 -1
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js +2 -0
- package/lib/cjs/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppDeviceAction/types.js.map +1 -1
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js +2 -0
- package/lib/cjs/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js +1 -1
- package/lib/cjs/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.js.map +1 -1
- package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
- package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
- package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
- package/lib/cjs/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
- package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
- package/lib/cjs/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
- package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
- package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +2 -2
- package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
- package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
- package/lib/cjs/src/api/index.js +1 -1
- package/lib/cjs/src/api/index.js.map +3 -3
- package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/device-action/GenuineCheck/types.js.map +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/InstallApp/types.js.map +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js +1 -1
- package/lib/cjs/src/api/secure-channel/device-action/UninstallApp/types.js.map +1 -1
- package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
- package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
- package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
- package/lib/cjs/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
- package/lib/cjs/src/api/secure-channel/task/types.js +1 -1
- package/lib/cjs/src/api/secure-channel/task/types.js.map +2 -2
- package/lib/cjs/src/api/secure-channel/utils.js +1 -1
- package/lib/cjs/src/api/secure-channel/utils.js.map +3 -3
- package/lib/cjs/src/api/secure-channel/utils.test.js +1 -1
- package/lib/cjs/src/api/secure-channel/utils.test.js.map +3 -3
- package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
- package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
- package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
- package/lib/cjs/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
- package/lib/cjs/src/api/transport/model/Errors.js +1 -1
- package/lib/cjs/src/api/transport/model/Errors.js.map +3 -3
- package/lib/cjs/src/api/types.js +1 -1
- package/lib/cjs/src/api/types.js.map +1 -1
- package/lib/cjs/src/api/utils/AppName.js +2 -0
- package/lib/cjs/src/api/utils/AppName.js.map +7 -0
- package/lib/cjs/src/api/utils/AppName.test.js +2 -0
- package/lib/cjs/src/api/utils/AppName.test.js.map +7 -0
- package/lib/cjs/src/api/utils/HexaString.js +1 -1
- package/lib/cjs/src/api/utils/HexaString.js.map +3 -3
- package/lib/cjs/src/api/utils/HexaString.test.js +1 -1
- package/lib/cjs/src/api/utils/HexaString.test.js.map +2 -2
- package/lib/cjs/src/di.js +1 -1
- package/lib/cjs/src/di.js.map +2 -2
- package/lib/cjs/src/internal/config/di/configModule.js +1 -1
- package/lib/cjs/src/internal/config/di/configModule.js.map +3 -3
- package/lib/cjs/src/internal/config/di/configModule.test.js +1 -1
- package/lib/cjs/src/internal/config/di/configModule.test.js.map +2 -2
- package/lib/cjs/src/internal/device-model/di/deviceModelModule.js +1 -1
- package/lib/cjs/src/internal/device-model/di/deviceModelModule.js.map +3 -3
- package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js +1 -1
- package/lib/cjs/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
- package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js +1 -1
- package/lib/cjs/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
- package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
- package/lib/cjs/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
- package/lib/cjs/src/internal/device-session/model/DeviceSession.js +1 -1
- package/lib/cjs/src/internal/device-session/model/DeviceSession.js.map +2 -2
- package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
- package/lib/cjs/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
- package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
- package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
- package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
- package/lib/cjs/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
- package/lib/cjs/src/internal/discovery/di/discoveryModule.js +1 -1
- package/lib/cjs/src/internal/discovery/di/discoveryModule.js.map +3 -3
- package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js +1 -1
- package/lib/cjs/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
- package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
- package/lib/cjs/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
- package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
- package/lib/cjs/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
- package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js +1 -1
- package/lib/cjs/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
- package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
- package/lib/cjs/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
- package/lib/cjs/src/internal/manager-api/di/managerApiModule.js +1 -1
- package/lib/cjs/src/internal/manager-api/di/managerApiModule.js.map +3 -3
- package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js +1 -1
- package/lib/cjs/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
- package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js +1 -1
- package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
- package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
- package/lib/cjs/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
- package/lib/cjs/src/internal/secure-channel/model/Errors.js +1 -1
- package/lib/cjs/src/internal/secure-channel/model/Errors.js.map +3 -3
- package/lib/cjs/src/internal/send/di/sendModule.js +1 -1
- package/lib/cjs/src/internal/send/di/sendModule.js.map +3 -3
- package/lib/cjs/src/internal/send/di/sendModule.test.js +1 -1
- package/lib/cjs/src/internal/send/di/sendModule.test.js.map +2 -2
- package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js +1 -1
- package/lib/cjs/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
- package/lib/cjs/src/internal/transport/di/transportModule.js +1 -1
- package/lib/cjs/src/internal/transport/di/transportModule.js.map +3 -3
- package/lib/cjs/src/internal/transport/di/transportModule.test.js +1 -1
- package/lib/cjs/src/internal/transport/di/transportModule.test.js.map +2 -2
- package/lib/esm/package.json +22 -23
- package/lib/esm/src/api/DeviceManagementKit.test.js +1 -1
- package/lib/esm/src/api/DeviceManagementKit.test.js.map +2 -2
- package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js +1 -1
- package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.js.map +3 -3
- package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js +1 -1
- package/lib/esm/src/api/apdu/utils/ByteArrayBuilder.test.js.map +2 -2
- package/lib/esm/src/api/apdu/utils/ByteArrayParser.js +1 -1
- package/lib/esm/src/api/apdu/utils/ByteArrayParser.js.map +3 -3
- package/lib/esm/src/api/command/di/commandModule.js +1 -1
- package/lib/esm/src/api/command/di/commandModule.js.map +3 -3
- package/lib/esm/src/api/command/di/commandModule.test.js +1 -1
- package/lib/esm/src/api/command/di/commandModule.test.js.map +2 -2
- package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js +1 -1
- package/lib/esm/src/api/command/os/__mocks__/GetOsVersionCommand.js.map +2 -2
- package/lib/esm/src/api/command/utils/CommandUtils.js +1 -1
- package/lib/esm/src/api/command/utils/CommandUtils.js.map +3 -3
- package/lib/esm/src/api/command/utils/CommandUtils.test.js +1 -1
- package/lib/esm/src/api/command/utils/CommandUtils.test.js.map +2 -2
- package/lib/esm/src/api/command/utils/GlobalCommandError.js +1 -1
- package/lib/esm/src/api/command/utils/GlobalCommandError.js.map +2 -2
- package/lib/esm/src/api/device/DeviceModel.js +1 -1
- package/lib/esm/src/api/device/DeviceModel.js.map +2 -2
- package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js +1 -1
- package/lib/esm/src/api/device-action/__test-utils__/makeInternalApi.js.map +3 -3
- package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js +1 -1
- package/lib/esm/src/api/device-action/__test-utils__/setupTestMachine.js.map +3 -3
- package/lib/esm/src/api/device-action/di/deviceActionModule.js +1 -1
- package/lib/esm/src/api/device-action/di/deviceActionModule.js.map +3 -3
- package/lib/esm/src/api/device-action/di/deviceActionModule.test.js +1 -1
- package/lib/esm/src/api/device-action/di/deviceActionModule.test.js.map +2 -2
- package/lib/esm/src/api/device-action/model/UserInteractionRequired.js +1 -1
- package/lib/esm/src/api/device-action/model/UserInteractionRequired.js.map +2 -2
- package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js +1 -1
- package/lib/esm/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.test.js.map +2 -2
- package/lib/esm/src/api/device-action/os/Errors.js +1 -1
- package/lib/esm/src/api/device-action/os/Errors.js.map +3 -3
- package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js +1 -1
- package/lib/esm/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.test.js.map +2 -2
- package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.js.map +3 -3
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js +2 -0
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.js.map +7 -0
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js +2 -0
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.js.map +7 -0
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js +1 -0
- package/lib/esm/src/api/device-action/os/InstallOrUpdateApps/types.js.map +7 -0
- package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.js.map +3 -3
- package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js +1 -1
- package/lib/esm/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.test.js.map +3 -3
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js +2 -0
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.js.map +7 -0
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js +2 -0
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.js.map +7 -0
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js +1 -0
- package/lib/esm/src/api/device-action/os/OpenAppWithDependencies/types.js.map +7 -0
- package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js +1 -1
- package/lib/esm/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.test.js.map +2 -2
- package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js +2 -0
- package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.js.map +7 -0
- package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js +2 -0
- package/lib/esm/src/api/device-action/task/BuildAppsInstallPlanTask.test.js.map +7 -0
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +2 -0
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +7 -0
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +2 -0
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +7 -0
- package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js +1 -1
- package/lib/esm/src/api/device-action/xstate-utils/XStateDeviceAction.js.map +2 -2
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +2 -2
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +2 -2
- package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
- package/lib/esm/src/api/device-model/model/DeviceModel.js.map +2 -2
- package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
- package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
- package/lib/esm/src/api/index.js +1 -1
- package/lib/esm/src/api/index.js.map +3 -3
- package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js +1 -1
- package/lib/esm/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.js.map +2 -2
- package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js +1 -1
- package/lib/esm/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.js.map +2 -2
- package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js +1 -1
- package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.js.map +2 -2
- package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js +1 -1
- package/lib/esm/src/api/secure-channel/device-action/ListInstalledApps/types.js.map +2 -2
- package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js +1 -1
- package/lib/esm/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.js.map +2 -2
- package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js +1 -1
- package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.js.map +3 -3
- package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js +1 -1
- package/lib/esm/src/api/secure-channel/task/ConnectToSecureChannelTask.test.js.map +3 -3
- package/lib/esm/src/api/secure-channel/task/types.js +1 -1
- package/lib/esm/src/api/secure-channel/task/types.js.map +2 -2
- package/lib/esm/src/api/secure-channel/utils.js +1 -1
- package/lib/esm/src/api/secure-channel/utils.js.map +3 -3
- package/lib/esm/src/api/secure-channel/utils.test.js +1 -1
- package/lib/esm/src/api/secure-channel/utils.test.js.map +3 -3
- package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js +1 -1
- package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.js.map +3 -3
- package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js +2 -0
- package/lib/esm/src/api/transport/model/DeviceConnectionStateMachine.test.js.map +7 -0
- package/lib/esm/src/api/transport/model/Errors.js +1 -1
- package/lib/esm/src/api/transport/model/Errors.js.map +3 -3
- package/lib/esm/src/api/utils/AppName.js +2 -0
- package/lib/esm/src/api/utils/AppName.js.map +7 -0
- package/lib/esm/src/api/utils/AppName.test.js +2 -0
- package/lib/esm/src/api/utils/AppName.test.js.map +7 -0
- package/lib/esm/src/api/utils/HexaString.js +1 -1
- package/lib/esm/src/api/utils/HexaString.js.map +3 -3
- package/lib/esm/src/api/utils/HexaString.test.js +1 -1
- package/lib/esm/src/api/utils/HexaString.test.js.map +2 -2
- package/lib/esm/src/di.js +1 -1
- package/lib/esm/src/di.js.map +2 -2
- package/lib/esm/src/internal/config/di/configModule.js +1 -1
- package/lib/esm/src/internal/config/di/configModule.js.map +3 -3
- package/lib/esm/src/internal/config/di/configModule.test.js +1 -1
- package/lib/esm/src/internal/config/di/configModule.test.js.map +2 -2
- package/lib/esm/src/internal/device-model/di/deviceModelModule.js +1 -1
- package/lib/esm/src/internal/device-model/di/deviceModelModule.js.map +3 -3
- package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js +1 -1
- package/lib/esm/src/internal/device-model/di/deviceModelModule.test.js.map +2 -2
- package/lib/esm/src/internal/device-session/di/deviceSessionModule.js +1 -1
- package/lib/esm/src/internal/device-session/di/deviceSessionModule.js.map +3 -3
- package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js +1 -1
- package/lib/esm/src/internal/device-session/di/deviceSessionModule.test.js.map +2 -2
- package/lib/esm/src/internal/device-session/model/DeviceSession.js +1 -1
- package/lib/esm/src/internal/device-session/model/DeviceSession.js.map +2 -2
- package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js +1 -1
- package/lib/esm/src/internal/device-session/service/DefaultApduReceiverService.js.map +2 -2
- package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js +1 -1
- package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.js.map +2 -2
- package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js +1 -1
- package/lib/esm/src/internal/device-session/service/DefaultApduSenderService.test.js.map +2 -2
- package/lib/esm/src/internal/discovery/di/discoveryModule.js +1 -1
- package/lib/esm/src/internal/discovery/di/discoveryModule.js.map +3 -3
- package/lib/esm/src/internal/discovery/di/discoveryModule.test.js +1 -1
- package/lib/esm/src/internal/discovery/di/discoveryModule.test.js.map +2 -2
- package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js +1 -1
- package/lib/esm/src/internal/discovery/use-case/DisconnectUseCase.test.js.map +2 -2
- package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js +1 -1
- package/lib/esm/src/internal/discovery/use-case/StopDiscoveringUseCase.test.js.map +3 -3
- package/lib/esm/src/internal/logger-publisher/di/loggerModule.js +1 -1
- package/lib/esm/src/internal/logger-publisher/di/loggerModule.js.map +3 -3
- package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js +1 -1
- package/lib/esm/src/internal/logger-publisher/di/loggerModule.test.js.map +2 -2
- package/lib/esm/src/internal/manager-api/di/managerApiModule.js +1 -1
- package/lib/esm/src/internal/manager-api/di/managerApiModule.js.map +3 -3
- package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js +1 -1
- package/lib/esm/src/internal/manager-api/di/managerApiModule.test.js.map +2 -2
- package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js +1 -1
- package/lib/esm/src/internal/secure-channel/di/secureChannelModule.js.map +3 -3
- package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js +1 -1
- package/lib/esm/src/internal/secure-channel/di/secureChannelModule.test.js.map +2 -2
- package/lib/esm/src/internal/secure-channel/model/Errors.js +1 -1
- package/lib/esm/src/internal/secure-channel/model/Errors.js.map +3 -3
- package/lib/esm/src/internal/send/di/sendModule.js +1 -1
- package/lib/esm/src/internal/send/di/sendModule.js.map +3 -3
- package/lib/esm/src/internal/send/di/sendModule.test.js +1 -1
- package/lib/esm/src/internal/send/di/sendModule.test.js.map +2 -2
- package/lib/esm/src/internal/send/use-case/SendApduUseCase.js +1 -1
- package/lib/esm/src/internal/send/use-case/SendApduUseCase.js.map +3 -3
- package/lib/esm/src/internal/transport/di/transportModule.js +1 -1
- package/lib/esm/src/internal/transport/di/transportModule.js.map +3 -3
- package/lib/esm/src/internal/transport/di/transportModule.test.js +1 -1
- package/lib/esm/src/internal/transport/di/transportModule.test.js.map +2 -2
- package/lib/types/src/api/apdu/utils/ApduBuilder.d.ts.map +1 -1
- package/lib/types/src/api/apdu/utils/ApduParser.d.ts.map +1 -1
- package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts +66 -0
- package/lib/types/src/api/apdu/utils/ByteArrayBuilder.d.ts.map +1 -1
- package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts +1 -0
- package/lib/types/src/api/apdu/utils/ByteArrayParser.d.ts.map +1 -1
- package/lib/types/src/api/command/di/commandModule.d.ts.map +1 -1
- package/lib/types/src/api/command/os/__mocks__/GetOsVersionCommand.d.ts.map +1 -1
- package/lib/types/src/api/command/utils/CommandErrors.d.ts.map +1 -1
- package/lib/types/src/api/command/utils/CommandUtils.d.ts +3 -0
- package/lib/types/src/api/command/utils/CommandUtils.d.ts.map +1 -1
- package/lib/types/src/api/command/utils/GlobalCommandError.d.ts +1 -1
- package/lib/types/src/api/command/utils/GlobalCommandError.d.ts.map +1 -1
- package/lib/types/src/api/device/DeviceModel.d.ts +2 -1
- package/lib/types/src/api/device/DeviceModel.d.ts.map +1 -1
- package/lib/types/src/api/device-action/DeviceAction.d.ts +2 -0
- package/lib/types/src/api/device-action/DeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -1
- package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts +5 -0
- package/lib/types/src/api/device-action/__test-utils__/setupTestMachine.d.ts.map +1 -1
- package/lib/types/src/api/device-action/di/deviceActionModule.d.ts.map +1 -1
- package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts +1 -0
- package/lib/types/src/api/device-action/model/UserInteractionRequired.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts +1 -2
- package/lib/types/src/api/device-action/os/CallTaskInAppDeviceAction/CallTaskInAppDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/Errors.d.ts +20 -0
- package/lib/types/src/api/device-action/os/Errors.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/GetDeviceMetadata/GetDeviceMetadataDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts +7 -7
- package/lib/types/src/api/device-action/os/GetDeviceMetadata/types.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/GetDeviceStatus/GetDeviceStatusDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/GoToDashboard/GoToDashboardDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts +3 -4
- package/lib/types/src/api/device-action/os/GoToDashboard/types.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts +40 -0
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts +2 -0
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/InstallOrUpdateAppsDeviceAction.test.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts +65 -0
- package/lib/types/src/api/device-action/os/InstallOrUpdateApps/types.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/OpenAppDeviceAction/OpenAppDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts +0 -1
- package/lib/types/src/api/device-action/os/OpenAppDeviceAction/types.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts +15 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts +2 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/OpenAppWithDependenciesDeviceAction.test.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts +24 -0
- package/lib/types/src/api/device-action/os/OpenAppWithDependencies/types.d.ts.map +1 -0
- package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts +1 -2
- package/lib/types/src/api/device-action/os/SendCommandInAppDeviceAction/SendCommandInAppDeviceActionTypes.d.ts.map +1 -1
- package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts +30 -0
- package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.d.ts.map +1 -0
- package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts +2 -0
- package/lib/types/src/api/device-action/task/BuildAppsInstallPlanTask.test.d.ts.map +1 -0
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +21 -0
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -0
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts +2 -0
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.test.d.ts.map +1 -0
- package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts +1 -0
- package/lib/types/src/api/device-action/xstate-utils/XStateDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
- package/lib/types/src/api/device-model/model/DeviceModel.d.ts +2 -0
- package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
- package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
- package/lib/types/src/api/device-session/service/DefaultApduReceiverService.stub.d.ts.map +1 -1
- package/lib/types/src/api/device-session/service/DefaultApduSenderService.stub.d.ts.map +1 -1
- package/lib/types/src/api/index.d.ts +4 -1
- package/lib/types/src/api/index.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/GenuineCheck/GenuineCheckDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts +2 -1
- package/lib/types/src/api/secure-channel/device-action/GenuineCheck/types.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/InstallApp/InstallAppDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts +2 -1
- package/lib/types/src/api/secure-channel/device-action/InstallApp/types.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/ListInstalledAppsDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts +2 -1
- package/lib/types/src/api/secure-channel/device-action/ListInstalledApps/types.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/UninstallApp/UninstallAppDeviceAction.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts +2 -1
- package/lib/types/src/api/secure-channel/device-action/UninstallApp/types.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts +5 -2
- package/lib/types/src/api/secure-channel/task/ConnectToSecureChannelTask.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/task/types.d.ts +6 -1
- package/lib/types/src/api/secure-channel/task/types.d.ts.map +1 -1
- package/lib/types/src/api/secure-channel/utils.d.ts +0 -11
- package/lib/types/src/api/secure-channel/utils.d.ts.map +1 -1
- package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts +8 -7
- package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.d.ts.map +1 -1
- package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts +2 -0
- package/lib/types/src/api/transport/model/DeviceConnectionStateMachine.test.d.ts.map +1 -0
- package/lib/types/src/api/transport/model/Errors.d.ts +5 -0
- package/lib/types/src/api/transport/model/Errors.d.ts.map +1 -1
- package/lib/types/src/api/types.d.ts +3 -1
- package/lib/types/src/api/types.d.ts.map +1 -1
- package/lib/types/src/api/utils/AppName.d.ts +2 -0
- package/lib/types/src/api/utils/AppName.d.ts.map +1 -0
- package/lib/types/src/api/utils/AppName.test.d.ts +2 -0
- package/lib/types/src/api/utils/AppName.test.d.ts.map +1 -0
- package/lib/types/src/api/utils/HexaString.d.ts +4 -3
- package/lib/types/src/api/utils/HexaString.d.ts.map +1 -1
- package/lib/types/src/di.d.ts.map +1 -1
- package/lib/types/src/internal/config/di/configModule.d.ts.map +1 -1
- package/lib/types/src/internal/device-model/di/deviceModelModule.d.ts.map +1 -1
- package/lib/types/src/internal/device-session/di/deviceSessionModule.d.ts.map +1 -1
- package/lib/types/src/internal/device-session/model/DeviceSession.d.ts.map +1 -1
- package/lib/types/src/internal/device-session/model/DeviceSession.stub.d.ts.map +1 -1
- package/lib/types/src/internal/device-session/service/DefaultApduReceiverService.d.ts.map +1 -1
- package/lib/types/src/internal/device-session/utils/deviceSessionUtils.d.ts.map +1 -1
- package/lib/types/src/internal/discovery/di/discoveryModule.d.ts.map +1 -1
- package/lib/types/src/internal/logger-publisher/di/loggerModule.d.ts.map +1 -1
- package/lib/types/src/internal/manager-api/di/managerApiModule.d.ts.map +1 -1
- package/lib/types/src/internal/secure-channel/di/secureChannelModule.d.ts.map +1 -1
- package/lib/types/src/internal/secure-channel/model/Errors.d.ts +22 -2
- package/lib/types/src/internal/secure-channel/model/Errors.d.ts.map +1 -1
- package/lib/types/src/internal/send/di/sendModule.d.ts.map +1 -1
- package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts +5 -1
- package/lib/types/src/internal/send/use-case/SendApduUseCase.d.ts.map +1 -1
- package/lib/types/src/internal/transport/di/transportModule.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +18 -19
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/discovery/use-case/DisconnectUseCase.test.ts"],
|
4
|
-
"sourcesContent": ["import { Left, Maybe, Right } from \"purify-ts\";\n\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { DisconnectError } from \"@api/transport/model/Errors\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport type { DmkConfig, Transport } from \"@api/types\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { deviceSessionStubBuilder } from \"@internal/device-session/model/DeviceSession.stub\";\nimport { DeviceSessionNotFound } from \"@internal/device-session/model/Errors\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { type SecureChannelDataSource } from \"@internal/secure-channel/data/SecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\nimport { type TransportService } from \"@internal/transport/service/TransportService\";\n\nimport { DisconnectUseCase } from \"./DisconnectUseCase\";\n\nvi.mock(\"@internal/transport/service/DefaultTransportService\");\n\nlet sessionService: DefaultDeviceSessionService;\n// TODO test several transports\nlet transport: Transport;\nlet transports: Transport[] = [];\nconst loggerFactory = vi\n .fn()\n .mockReturnValue(\n new DefaultLoggerPublisherService([], \"DisconnectUseCaseTest\"),\n );\nlet transportService: TransportService;\nlet managerApi: ManagerApiService;\nlet managerApiDataSource: ManagerApiDataSource;\nlet secureChannelDataSource: SecureChannelDataSource;\nlet secureChannel: SecureChannelService;\n\nconst sessionId = \"sessionId\";\n\ndescribe(\"DisconnectUseCase\", () => {\n beforeAll(() => {\n transport = new TransportMock();\n transports = [transport];\n sessionService = new DefaultDeviceSessionService(loggerFactory);\n // @ts-expect-error mock\n transportService = new DefaultTransportService();\n vi.spyOn(transportService, \"getTransport\").mockReturnValue(\n Maybe.of(transport),\n );\n });\n\n it(\"should disconnect from a device\", async () => {\n // Given\n const connectedDevice = connectedDeviceStubBuilder();\n managerApiDataSource = new AxiosManagerApiDataSource({} as DmkConfig);\n managerApi = new DefaultManagerApiService(managerApiDataSource);\n secureChannelDataSource = new DefaultSecureChannelDataSource(\n {} as DmkConfig,\n );\n secureChannel = new DefaultSecureChannelService(secureChannelDataSource);\n const deviceSession = deviceSessionStubBuilder(\n {\n id: sessionId,\n connectedDevice,\n },\n loggerFactory,\n managerApi,\n secureChannel,\n DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n );\n vi.spyOn(sessionService, \"getDeviceSessionById\").mockImplementation(() =>\n Right(deviceSession),\n );\n vi.spyOn(deviceSession, \"close\");\n vi.spyOn(sessionService, \"removeDeviceSession\");\n vi.spyOn(transports[0]!, \"disconnect\").mockImplementation(() =>\n Promise.resolve(Right(
|
5
|
-
"mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,EAAO,SAAAC,MAAa,YAEnC,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,mBAAAC,MAAuB,8BAChC,OAAS,8BAAAC,MAAkC,qDAE3C,OAAS,4CAAAC,MAAgD,4DACzD,OAAS,4BAAAC,MAAgC,oDACzC,OAAS,yBAAAC,MAA6B,wCACtC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,iCAAAC,MAAqC,mEAC9C,OAAS,6BAAAC,MAAiC,uDAE1C,OAAS,4BAAAC,MAAgC,yDAEzC,OAAS,kCAAAC,MAAsC,+DAE/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,2BAAAC,MAA+B,sDAGxC,OAAS,qBAAAC,MAAyB,sBAElC,GAAG,KAAK,qDAAqD,EAE7D,IAAIC,EAEAC,EACAC,EAA0B,CAAC,EAC/B,MAAMC,EAAgB,GACnB,GAAG,EACH,gBACC,IAAIV,EAA8B,CAAC,EAAG,uBAAuB,CAC/D,EACF,IAAIW,EACAC,EACAC,EACAC,EACAC,EAEJ,MAAMC,EAAY,YAElB,SAAS,oBAAqB,IAAM,CAClC,UAAU,IAAM,CACdR,EAAY,IAAIf,EAChBgB,EAAa,CAACD,CAAS,EACvBD,EAAiB,IAAIR,EAA4BW,CAAa,EAE9DC,EAAmB,IAAIN,EACvB,GAAG,MAAMM,EAAkB,cAAc,EAAE,gBACzCpB,EAAM,GAAGiB,CAAS,CACpB,CACF,CAAC,EAED,GAAG,kCAAmC,SAAY,CAEhD,MAAMS,EAAkBtB,EAA2B,EACnDkB,EAAuB,IAAIZ,EAA0B,CAAC,CAAc,EACpEW,EAAa,IAAIV,EAAyBW,CAAoB,EAC9DC,EAA0B,IAAIX,EAC5B,CAAC,CACH,EACAY,EAAgB,IAAIX,EAA4BU,CAAuB,EACvE,MAAMI,EAAgBrB,EACpB,CACE,GAAImB,EACJ,gBAAAC,CACF,EACAP,EACAE,EACAG,EACAnB,CACF,EACA,GAAG,MAAMW,EAAgB,sBAAsB,EAAE,mBAAmB,IAClEf,EAAM0B,CAAa,CACrB,EACA,GAAG,MAAMA,EAAe,OAAO,EAC/B,GAAG,MAAMX,EAAgB,qBAAqB,EAC9C,GAAG,MAAME,EAAW,CAAC,EAAI,YAAY,EAAE,mBAAmB,IACxD,QAAQ,QAAQjB,EAAM,
|
4
|
+
"sourcesContent": ["import { Left, Maybe, Right } from \"purify-ts\";\n\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { DisconnectError } from \"@api/transport/model/Errors\";\nimport { connectedDeviceStubBuilder } from \"@api/transport/model/TransportConnectedDevice.stub\";\nimport type { DmkConfig, Transport } from \"@api/types\";\nimport { DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS } from \"@internal/device-session/data/DeviceSessionRefresherConst\";\nimport { deviceSessionStubBuilder } from \"@internal/device-session/model/DeviceSession.stub\";\nimport { DeviceSessionNotFound } from \"@internal/device-session/model/Errors\";\nimport { DefaultDeviceSessionService } from \"@internal/device-session/service/DefaultDeviceSessionService\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { type ManagerApiDataSource } from \"@internal/manager-api/data/ManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { type ManagerApiService } from \"@internal/manager-api/service/ManagerApiService\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { type SecureChannelDataSource } from \"@internal/secure-channel/data/SecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\nimport { type SecureChannelService } from \"@internal/secure-channel/service/SecureChannelService\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\nimport { type TransportService } from \"@internal/transport/service/TransportService\";\n\nimport { DisconnectUseCase } from \"./DisconnectUseCase\";\n\nvi.mock(\"@internal/transport/service/DefaultTransportService\");\n\nlet sessionService: DefaultDeviceSessionService;\n// TODO test several transports\nlet transport: Transport;\nlet transports: Transport[] = [];\nconst loggerFactory = vi\n .fn()\n .mockReturnValue(\n new DefaultLoggerPublisherService([], \"DisconnectUseCaseTest\"),\n );\nlet transportService: TransportService;\nlet managerApi: ManagerApiService;\nlet managerApiDataSource: ManagerApiDataSource;\nlet secureChannelDataSource: SecureChannelDataSource;\nlet secureChannel: SecureChannelService;\n\nconst sessionId = \"sessionId\";\n\ndescribe(\"DisconnectUseCase\", () => {\n beforeAll(() => {\n transport = new TransportMock();\n transports = [transport];\n sessionService = new DefaultDeviceSessionService(loggerFactory);\n // @ts-expect-error mock\n transportService = new DefaultTransportService();\n vi.spyOn(transportService, \"getTransport\").mockReturnValue(\n Maybe.of(transport),\n );\n });\n\n it(\"should disconnect from a device\", async () => {\n // Given\n const connectedDevice = connectedDeviceStubBuilder();\n managerApiDataSource = new AxiosManagerApiDataSource({} as DmkConfig);\n managerApi = new DefaultManagerApiService(managerApiDataSource);\n secureChannelDataSource = new DefaultSecureChannelDataSource(\n {} as DmkConfig,\n );\n secureChannel = new DefaultSecureChannelService(secureChannelDataSource);\n const deviceSession = deviceSessionStubBuilder(\n {\n id: sessionId,\n connectedDevice,\n },\n loggerFactory,\n managerApi,\n secureChannel,\n DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n );\n vi.spyOn(sessionService, \"getDeviceSessionById\").mockImplementation(() =>\n Right(deviceSession),\n );\n vi.spyOn(deviceSession, \"close\");\n vi.spyOn(sessionService, \"removeDeviceSession\");\n vi.spyOn(transports[0]!, \"disconnect\").mockImplementation(() =>\n Promise.resolve(Right(undefined)),\n );\n const disconnectUseCase = new DisconnectUseCase(\n transportService,\n sessionService,\n loggerFactory,\n );\n // When\n await disconnectUseCase.execute({ sessionId });\n\n // Then\n expect(deviceSession.close).toHaveBeenCalled();\n expect(sessionService.removeDeviceSession).toHaveBeenCalledWith(sessionId);\n expect(transports[0]!.disconnect).toHaveBeenCalledWith({\n connectedDevice,\n });\n });\n\n it(\"should throw an error when deviceSession not found\", async () => {\n // Given\n const disconnectUseCase = new DisconnectUseCase(\n transportService,\n sessionService,\n loggerFactory,\n );\n\n // When\n try {\n await disconnectUseCase.execute({ sessionId });\n } catch (e) {\n // Then\n expect(e).toStrictEqual(new DeviceSessionNotFound());\n }\n });\n\n it(\"should throw an error if usb hid disconnection fails\", async () => {\n // Given\n vi.spyOn(sessionService, \"getDeviceSessionById\").mockImplementation(() =>\n Right(\n deviceSessionStubBuilder(\n { id: sessionId },\n loggerFactory,\n managerApi,\n secureChannel,\n DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS,\n ),\n ),\n );\n\n vi.spyOn(transports[0]!, \"disconnect\").mockResolvedValue(\n Left(new DisconnectError()),\n );\n\n const disconnectUseCase = new DisconnectUseCase(\n transportService,\n sessionService,\n loggerFactory,\n );\n\n // When\n try {\n await disconnectUseCase.execute({ sessionId });\n } catch (e) {\n // Then\n expect(e).toStrictEqual(new DisconnectError());\n }\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,QAAAA,EAAM,SAAAC,EAAO,SAAAC,MAAa,YAEnC,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,mBAAAC,MAAuB,8BAChC,OAAS,8BAAAC,MAAkC,qDAE3C,OAAS,4CAAAC,MAAgD,4DACzD,OAAS,4BAAAC,MAAgC,oDACzC,OAAS,yBAAAC,MAA6B,wCACtC,OAAS,+BAAAC,MAAmC,+DAC5C,OAAS,iCAAAC,MAAqC,mEAC9C,OAAS,6BAAAC,MAAiC,uDAE1C,OAAS,4BAAAC,MAAgC,yDAEzC,OAAS,kCAAAC,MAAsC,+DAE/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,2BAAAC,MAA+B,sDAGxC,OAAS,qBAAAC,MAAyB,sBAElC,GAAG,KAAK,qDAAqD,EAE7D,IAAIC,EAEAC,EACAC,EAA0B,CAAC,EAC/B,MAAMC,EAAgB,GACnB,GAAG,EACH,gBACC,IAAIV,EAA8B,CAAC,EAAG,uBAAuB,CAC/D,EACF,IAAIW,EACAC,EACAC,EACAC,EACAC,EAEJ,MAAMC,EAAY,YAElB,SAAS,oBAAqB,IAAM,CAClC,UAAU,IAAM,CACdR,EAAY,IAAIf,EAChBgB,EAAa,CAACD,CAAS,EACvBD,EAAiB,IAAIR,EAA4BW,CAAa,EAE9DC,EAAmB,IAAIN,EACvB,GAAG,MAAMM,EAAkB,cAAc,EAAE,gBACzCpB,EAAM,GAAGiB,CAAS,CACpB,CACF,CAAC,EAED,GAAG,kCAAmC,SAAY,CAEhD,MAAMS,EAAkBtB,EAA2B,EACnDkB,EAAuB,IAAIZ,EAA0B,CAAC,CAAc,EACpEW,EAAa,IAAIV,EAAyBW,CAAoB,EAC9DC,EAA0B,IAAIX,EAC5B,CAAC,CACH,EACAY,EAAgB,IAAIX,EAA4BU,CAAuB,EACvE,MAAMI,EAAgBrB,EACpB,CACE,GAAImB,EACJ,gBAAAC,CACF,EACAP,EACAE,EACAG,EACAnB,CACF,EACA,GAAG,MAAMW,EAAgB,sBAAsB,EAAE,mBAAmB,IAClEf,EAAM0B,CAAa,CACrB,EACA,GAAG,MAAMA,EAAe,OAAO,EAC/B,GAAG,MAAMX,EAAgB,qBAAqB,EAC9C,GAAG,MAAME,EAAW,CAAC,EAAI,YAAY,EAAE,mBAAmB,IACxD,QAAQ,QAAQjB,EAAM,MAAS,CAAC,CAClC,EAOA,MAN0B,IAAIc,EAC5BK,EACAJ,EACAG,CACF,EAEwB,QAAQ,CAAE,UAAAM,CAAU,CAAC,EAG7C,OAAOE,EAAc,KAAK,EAAE,iBAAiB,EAC7C,OAAOX,EAAe,mBAAmB,EAAE,qBAAqBS,CAAS,EACzE,OAAOP,EAAW,CAAC,EAAG,UAAU,EAAE,qBAAqB,CACrD,gBAAAQ,CACF,CAAC,CACH,CAAC,EAED,GAAG,qDAAsD,SAAY,CAEnE,MAAME,EAAoB,IAAIb,EAC5BK,EACAJ,EACAG,CACF,EAGA,GAAI,CACF,MAAMS,EAAkB,QAAQ,CAAE,UAAAH,CAAU,CAAC,CAC/C,OAASI,EAAG,CAEV,OAAOA,CAAC,EAAE,cAAc,IAAItB,CAAuB,CACrD,CACF,CAAC,EAED,GAAG,uDAAwD,SAAY,CAErE,GAAG,MAAMS,EAAgB,sBAAsB,EAAE,mBAAmB,IAClEf,EACEK,EACE,CAAE,GAAImB,CAAU,EAChBN,EACAE,EACAG,EACAnB,CACF,CACF,CACF,EAEA,GAAG,MAAMa,EAAW,CAAC,EAAI,YAAY,EAAE,kBACrCnB,EAAK,IAAII,CAAiB,CAC5B,EAEA,MAAMyB,EAAoB,IAAIb,EAC5BK,EACAJ,EACAG,CACF,EAGA,GAAI,CACF,MAAMS,EAAkB,QAAQ,CAAE,UAAAH,CAAU,CAAC,CAC/C,OAASI,EAAG,CAEV,OAAOA,CAAC,EAAE,cAAc,IAAI1B,CAAiB,CAC/C,CACF,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Left", "Maybe", "Right", "TransportMock", "DisconnectError", "connectedDeviceStubBuilder", "DEVICE_SESSION_REFRESHER_DEFAULT_OPTIONS", "deviceSessionStubBuilder", "DeviceSessionNotFound", "DefaultDeviceSessionService", "DefaultLoggerPublisherService", "AxiosManagerApiDataSource", "DefaultManagerApiService", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "DefaultTransportService", "DisconnectUseCase", "sessionService", "transport", "transports", "loggerFactory", "transportService", "managerApi", "managerApiDataSource", "secureChannelDataSource", "secureChannel", "sessionId", "connectedDevice", "deviceSession", "disconnectUseCase", "e"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{TransportMock as s}from"../../../api/transport/model/__mocks__/TransportMock";import{DefaultTransportService as
|
1
|
+
import{TransportMock as s}from"../../../api/transport/model/__mocks__/TransportMock";import{DefaultTransportService as i}from"../../transport/service/DefaultTransportService";import{StopDiscoveringUseCase as a}from"./StopDiscoveringUseCase";vi.mock("@internal/transport/service/DefaultTransportService");let e,r,o,t,n;describe("StopDiscoveringUseCase",()=>{beforeEach(()=>{e=new s,r=new s,o=[e,r],n={debug:vi.fn()},t=new i(o)}),afterEach(()=>{vi.clearAllMocks()}),test("should call stop discovering",async()=>{vi.spyOn(e,"stopDiscovering").mockImplementation(vi.fn()),vi.spyOn(r,"stopDiscovering").mockImplementation(async()=>Promise.resolve(void 0)),vi.spyOn(t,"getAllTransports").mockReturnValue(o),await new a(t,vi.fn().mockImplementation(()=>n)).execute(),expect(e.stopDiscovering).toHaveBeenCalled(),expect(r.stopDiscovering).toHaveBeenCalled()})});
|
2
2
|
//# sourceMappingURL=StopDiscoveringUseCase.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/discovery/use-case/StopDiscoveringUseCase.test.ts"],
|
4
|
-
"sourcesContent": ["import { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { type Transport } from \"@api/types\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\nimport { type TransportService } from \"@internal/transport/service/TransportService\";\n\nimport { StopDiscoveringUseCase } from \"./StopDiscoveringUseCase\";\n\nvi.mock(\"@internal/transport/service/DefaultTransportService\");\n\n// TODO test several transports\nlet transport: Transport;\nlet transport2: Transport;\nlet transports: Transport[];\nlet transportService: TransportService;\n\ndescribe(\"StopDiscoveringUseCase\", () => {\n beforeEach(() => {\n transport = new TransportMock();\n transport2 = new TransportMock();\n transports = [transport, transport2];\n // @ts-expect-error mock\n transportService = new DefaultTransportService(transports);\n });\n\n afterEach(() => {\n vi.clearAllMocks();\n });\n\n test(\"should call stop discovering\", async () => {\n vi.spyOn(transport, \"stopDiscovering\").mockImplementation(vi.fn());\n vi.spyOn(transport2, \"stopDiscovering\").mockImplementation(async () =>\n Promise.resolve(undefined),\n );\n\n vi.spyOn(transportService, \"getAllTransports\").mockReturnValue(transports);\n\n const usecase = new StopDiscoveringUseCase(transportService
|
5
|
-
"mappings": "AAAA,OAAS,iBAAAA,MAAqB,+CAE9B,OAAS,2BAAAC,MAA+B,sDAGxC,OAAS,0BAAAC,MAA8B,2BAEvC,GAAG,KAAK,qDAAqD,EAG7D,IAAIC,EACAC,EACAC,EACAC,EAEJ,SAAS,yBAA0B,IAAM,CACvC,WAAW,IAAM,
|
6
|
-
"names": ["TransportMock", "DefaultTransportService", "StopDiscoveringUseCase", "transport", "transport2", "transports", "transportService"]
|
4
|
+
"sourcesContent": ["import { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { type LoggerPublisherService, type Transport } from \"@api/types\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\nimport { type TransportService } from \"@internal/transport/service/TransportService\";\n\nimport { StopDiscoveringUseCase } from \"./StopDiscoveringUseCase\";\n\nvi.mock(\"@internal/transport/service/DefaultTransportService\");\n\n// TODO test several transports\nlet transport: Transport;\nlet transport2: Transport;\nlet transports: Transport[];\nlet transportService: TransportService;\nlet logger: LoggerPublisherService;\n\ndescribe(\"StopDiscoveringUseCase\", () => {\n beforeEach(() => {\n transport = new TransportMock();\n transport2 = new TransportMock();\n transports = [transport, transport2];\n logger = {\n debug: vi.fn(),\n } as unknown as LoggerPublisherService;\n // @ts-expect-error mock\n transportService = new DefaultTransportService(transports);\n });\n\n afterEach(() => {\n vi.clearAllMocks();\n });\n\n test(\"should call stop discovering\", async () => {\n vi.spyOn(transport, \"stopDiscovering\").mockImplementation(vi.fn());\n vi.spyOn(transport2, \"stopDiscovering\").mockImplementation(async () =>\n Promise.resolve(undefined),\n );\n\n vi.spyOn(transportService, \"getAllTransports\").mockReturnValue(transports);\n\n const usecase = new StopDiscoveringUseCase(\n transportService,\n vi.fn().mockImplementation(() => logger),\n );\n\n await usecase.execute();\n\n expect(transport.stopDiscovering).toHaveBeenCalled();\n expect(transport2.stopDiscovering).toHaveBeenCalled();\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,iBAAAA,MAAqB,+CAE9B,OAAS,2BAAAC,MAA+B,sDAGxC,OAAS,0BAAAC,MAA8B,2BAEvC,GAAG,KAAK,qDAAqD,EAG7D,IAAIC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAAS,yBAA0B,IAAM,CACvC,WAAW,IAAM,CACfJ,EAAY,IAAIH,EAChBI,EAAa,IAAIJ,EACjBK,EAAa,CAACF,EAAWC,CAAU,EACnCG,EAAS,CACP,MAAO,GAAG,GAAG,CACf,EAEAD,EAAmB,IAAIL,EAAwBI,CAAU,CAC3D,CAAC,EAED,UAAU,IAAM,CACd,GAAG,cAAc,CACnB,CAAC,EAED,KAAK,+BAAgC,SAAY,CAC/C,GAAG,MAAMF,EAAW,iBAAiB,EAAE,mBAAmB,GAAG,GAAG,CAAC,EACjE,GAAG,MAAMC,EAAY,iBAAiB,EAAE,mBAAmB,SACzD,QAAQ,QAAQ,MAAS,CAC3B,EAEA,GAAG,MAAME,EAAkB,kBAAkB,EAAE,gBAAgBD,CAAU,EAOzE,MALgB,IAAIH,EAClBI,EACA,GAAG,GAAG,EAAE,mBAAmB,IAAMC,CAAM,CACzC,EAEc,QAAQ,EAEtB,OAAOJ,EAAU,eAAe,EAAE,iBAAiB,EACnD,OAAOC,EAAW,eAAe,EAAE,iBAAiB,CACtD,CAAC,CACH,CAAC",
|
6
|
+
"names": ["TransportMock", "DefaultTransportService", "StopDiscoveringUseCase", "transport", "transport2", "transports", "transportService", "logger"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ContainerModule as
|
1
|
+
import{ContainerModule as t}from"inversify";import{DefaultLoggerPublisherService as i}from"../../logger-publisher/service/DefaultLoggerPublisherService";import{loggerTypes as c}from"./loggerTypes";const u=({subscribers:r}={subscribers:[]})=>new t(({bind:e})=>{e(c.LoggerPublisherServiceFactory).toFactory(g=>o=>new i(r,o))});export{u as loggerModuleFactory};
|
2
2
|
//# sourceMappingURL=loggerModule.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/logger-publisher/di/loggerModule.ts"],
|
4
|
-
"sourcesContent": ["import { ContainerModule, type
|
5
|
-
"mappings": "AAAA,OAAS,mBAAAA,
|
6
|
-
"names": ["ContainerModule", "DefaultLoggerPublisherService", "loggerTypes", "loggerModuleFactory", "subscribers", "bind", "
|
4
|
+
"sourcesContent": ["import { ContainerModule, type Factory } from \"inversify\";\n\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { type LoggerSubscriberService } from \"@api/logger-subscriber/service/LoggerSubscriberService\";\nimport { DefaultLoggerPublisherService } from \"@internal/logger-publisher/service/DefaultLoggerPublisherService\";\n\nimport { loggerTypes } from \"./loggerTypes\";\n\ntype FactoryProps = {\n subscribers: LoggerSubscriberService[];\n};\n\nexport const loggerModuleFactory = (\n { subscribers }: FactoryProps = { subscribers: [] },\n) =>\n new ContainerModule(({ bind }) => {\n bind<Factory<LoggerPublisherService>>(\n loggerTypes.LoggerPublisherServiceFactory,\n ).toFactory((_context) => {\n return (tag: string) =>\n new DefaultLoggerPublisherService(subscribers, tag);\n });\n });\n"],
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAqC,YAI9C,OAAS,iCAAAC,MAAqC,mEAE9C,OAAS,eAAAC,MAAmB,gBAMrB,MAAMC,EAAsB,CACjC,CAAE,YAAAC,CAAY,EAAkB,CAAE,YAAa,CAAC,CAAE,IAElD,IAAIJ,EAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EACEH,EAAY,6BACd,EAAE,UAAWI,GACHC,GACN,IAAIN,EAA8BG,EAAaG,CAAG,CACrD,CACH,CAAC",
|
6
|
+
"names": ["ContainerModule", "DefaultLoggerPublisherService", "loggerTypes", "loggerModuleFactory", "subscribers", "bind", "_context", "tag"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{Container as r}from"inversify";import{loggerModuleFactory as t}from"./loggerModule";describe("loggerModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=t(),o=new r,o.
|
1
|
+
import{Container as r}from"inversify";import{loggerModuleFactory as t}from"./loggerModule";describe("loggerModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=t(),o=new r,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
|
2
2
|
//# sourceMappingURL=loggerModule.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/logger-publisher/di/loggerModule.test.ts"],
|
4
|
-
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { loggerModuleFactory } from \"./loggerModule\";\n\ndescribe(\"loggerModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof loggerModuleFactory>;\n beforeEach(() => {\n mod = loggerModuleFactory();\n container = new Container();\n container.
|
5
|
-
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,uBAAAC,MAA2B,iBAEpC,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAoB,EAC1BC,EAAY,IAAIF,EAChBE,EAAU,
|
4
|
+
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { loggerModuleFactory } from \"./loggerModule\";\n\ndescribe(\"loggerModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof loggerModuleFactory>;\n beforeEach(() => {\n mod = loggerModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,uBAAAC,MAA2B,iBAEpC,SAAS,sBAAuB,IAAM,CACpC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAoB,EAC1BC,EAAY,IAAIF,EAChBE,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Container", "loggerModuleFactory", "container", "mod"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ContainerModule as
|
1
|
+
import{ContainerModule as p}from"inversify";import{AxiosManagerApiDataSource as m}from"../../manager-api/data/AxiosManagerApiDataSource";import{DefaultManagerApiService as n}from"../../manager-api/service/DefaultManagerApiService";import{SetProviderUseCase as s}from"../../manager-api/use-case/SetProviderUseCase";import{StubUseCase as t}from"../../../../src/di.stub";import{managerApiTypes as o}from"./managerApiTypes";const C=({stub:a,config:i})=>new p(({bind:e,rebindSync:r})=>{e(o.DmkConfig).toConstantValue(i),e(o.ManagerApiDataSource).to(m).inSingletonScope(),e(o.ManagerApiService).to(n).inSingletonScope(),e(o.SetProviderUseCase).to(s),a&&(r(o.ManagerApiDataSource).to(t),r(o.ManagerApiService).to(t),r(o.SetProviderUseCase).to(t))});export{C as managerApiModuleFactory};
|
2
2
|
//# sourceMappingURL=managerApiModule.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/manager-api/di/managerApiModule.ts"],
|
4
|
-
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { SetProviderUseCase } from \"@internal/manager-api/use-case/SetProviderUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const managerApiModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule((bind,
|
5
|
-
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,sBAAAC,MAA0B,oDACnC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,mBAAAC,MAAuB,oBAOzB,MAAMC,EAA0B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACrD,IAAIR,EAAgB,
|
6
|
-
"names": ["ContainerModule", "AxiosManagerApiDataSource", "DefaultManagerApiService", "SetProviderUseCase", "StubUseCase", "managerApiTypes", "managerApiModuleFactory", "stub", "config", "bind", "
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { SetProviderUseCase } from \"@internal/manager-api/use-case/SetProviderUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const managerApiModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind(managerApiTypes.DmkConfig).toConstantValue(config);\n\n bind(managerApiTypes.ManagerApiDataSource)\n .to(AxiosManagerApiDataSource)\n .inSingletonScope();\n bind(managerApiTypes.ManagerApiService)\n .to(DefaultManagerApiService)\n .inSingletonScope();\n bind(managerApiTypes.SetProviderUseCase).to(SetProviderUseCase);\n\n if (stub) {\n rebindSync(managerApiTypes.ManagerApiDataSource).to(StubUseCase);\n rebindSync(managerApiTypes.ManagerApiService).to(StubUseCase);\n rebindSync(managerApiTypes.SetProviderUseCase).to(StubUseCase);\n }\n });\n"],
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,sBAAAC,MAA0B,oDACnC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,mBAAAC,MAAuB,oBAOzB,MAAMC,EAA0B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACrD,IAAIR,EAAgB,CAAC,CAAE,KAAAS,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EAAKJ,EAAgB,SAAS,EAAE,gBAAgBG,CAAM,EAEtDC,EAAKJ,EAAgB,oBAAoB,EACtC,GAAGJ,CAAyB,EAC5B,iBAAiB,EACpBQ,EAAKJ,EAAgB,iBAAiB,EACnC,GAAGH,CAAwB,EAC3B,iBAAiB,EACpBO,EAAKJ,EAAgB,kBAAkB,EAAE,GAAGF,CAAkB,EAE1DI,IACFG,EAAWL,EAAgB,oBAAoB,EAAE,GAAGD,CAAW,EAC/DM,EAAWL,EAAgB,iBAAiB,EAAE,GAAGD,CAAW,EAC5DM,EAAWL,EAAgB,kBAAkB,EAAE,GAAGD,CAAW,EAEjE,CAAC",
|
6
|
+
"names": ["ContainerModule", "AxiosManagerApiDataSource", "DefaultManagerApiService", "SetProviderUseCase", "StubUseCase", "managerApiTypes", "managerApiModuleFactory", "stub", "config", "bind", "rebindSync"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{Container as c}from"inversify";import{AxiosManagerApiDataSource as u}from"../../manager-api/data/AxiosManagerApiDataSource";import{DefaultManagerApiService as l}from"../../manager-api/service/DefaultManagerApiService";import{StubUseCase as i}from"../../../../src/di.stub";import{managerApiModuleFactory as p}from"./managerApiModule";import{managerApiTypes as r}from"./managerApiTypes";describe("managerApiModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=p({stub:!1,config:{managerApiUrl:"http://fake.url",mockUrl:"http://fake-mock.url",webSocketUrl:"http://fake-websocket.url"}}),e=new c,e.
|
1
|
+
import{Container as c}from"inversify";import{AxiosManagerApiDataSource as u}from"../../manager-api/data/AxiosManagerApiDataSource";import{DefaultManagerApiService as l}from"../../manager-api/service/DefaultManagerApiService";import{StubUseCase as i}from"../../../../src/di.stub";import{managerApiModuleFactory as p}from"./managerApiModule";import{managerApiTypes as r}from"./managerApiTypes";describe("managerApiModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=p({stub:!1,config:{managerApiUrl:"http://fake.url",mockUrl:"http://fake-mock.url",webSocketUrl:"http://fake-websocket.url"}}),e=new c,e.loadSync(t)}),it("should return the config module",()=>{expect(t).toBeDefined()}),it("should return none stubbed use cases",()=>{const o=e.get(r.ManagerApiDataSource);expect(o).toBeInstanceOf(u);const a=e.get(r.ManagerApiService);expect(a).toBeInstanceOf(l);const n=e.get(r.DmkConfig);expect(n).toEqual({managerApiUrl:"http://fake.url",mockUrl:"http://fake-mock.url",webSocketUrl:"http://fake-websocket.url"})})}),describe("Stubbed",()=>{let e,t;beforeEach(()=>{t=p({stub:!0,config:{managerApiUrl:"http://fake.url",mockUrl:"http://fake-mock.url",webSocketUrl:"http://fake-websocket.url"}}),e=new c,e.loadSync(t)}),it("should return the config module",()=>{expect(t).toBeDefined()}),it("should return stubbed use cases",()=>{const o=e.get(r.ManagerApiDataSource);expect(o).toBeInstanceOf(i);const a=e.get(r.ManagerApiService);expect(a).toBeInstanceOf(i);const n=e.get(r.DmkConfig);expect(n).toEqual({managerApiUrl:"http://fake.url",mockUrl:"http://fake-mock.url",webSocketUrl:"http://fake-websocket.url"})})})});
|
2
2
|
//# sourceMappingURL=managerApiModule.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/manager-api/di/managerApiModule.test.ts"],
|
4
|
-
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiModuleFactory } from \"./managerApiModule\";\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ndescribe(\"managerApiModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: false,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.
|
5
|
-
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,2BAAAC,MAA+B,qBACxC,OAAS,mBAAAC,MAAuB,oBAEhC,SAAS,0BAA2B,IAAM,CACxC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,
|
4
|
+
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { AxiosManagerApiDataSource } from \"@internal/manager-api/data/AxiosManagerApiDataSource\";\nimport { DefaultManagerApiService } from \"@internal/manager-api/service/DefaultManagerApiService\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { managerApiModuleFactory } from \"./managerApiModule\";\nimport { managerApiTypes } from \"./managerApiTypes\";\n\ndescribe(\"managerApiModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: false,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return none stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(AxiosManagerApiDataSource);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(DefaultManagerApiService);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n\n describe(\"Stubbed\", () => {\n let container: Container;\n let mod: ReturnType<typeof managerApiModuleFactory>;\n beforeEach(() => {\n mod = managerApiModuleFactory({\n stub: true,\n config: {\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return stubbed use cases\", () => {\n const managerApiDataSource = container.get(\n managerApiTypes.ManagerApiDataSource,\n );\n expect(managerApiDataSource).toBeInstanceOf(StubUseCase);\n\n const managerApiService = container.get(\n managerApiTypes.ManagerApiService,\n );\n expect(managerApiService).toBeInstanceOf(StubUseCase);\n\n const config = container.get(managerApiTypes.DmkConfig);\n expect(config).toEqual({\n managerApiUrl: \"http://fake.url\",\n mockUrl: \"http://fake-mock.url\",\n webSocketUrl: \"http://fake-websocket.url\",\n });\n });\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,6BAAAC,MAAiC,uDAC1C,OAAS,4BAAAC,MAAgC,yDACzC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,2BAAAC,MAA+B,qBACxC,OAAS,mBAAAC,MAAuB,oBAEhC,SAAS,0BAA2B,IAAM,CACxC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,uCAAwC,IAAM,CAC/C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeP,CAAyB,EAErE,MAAMQ,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeP,CAAwB,EAEjE,MAAMQ,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,EAED,SAAS,UAAW,IAAM,CACxB,IAAIJ,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMH,EAAwB,CAC5B,KAAM,GACN,OAAQ,CACN,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CACF,CAAC,EACDE,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,MAAMC,EAAuBF,EAAU,IACrCD,EAAgB,oBAClB,EACA,OAAOG,CAAoB,EAAE,eAAeL,CAAW,EAEvD,MAAMM,EAAoBH,EAAU,IAClCD,EAAgB,iBAClB,EACA,OAAOI,CAAiB,EAAE,eAAeN,CAAW,EAEpD,MAAMO,EAASJ,EAAU,IAAID,EAAgB,SAAS,EACtD,OAAOK,CAAM,EAAE,QAAQ,CACrB,cAAe,kBACf,QAAS,uBACT,aAAc,2BAChB,CAAC,CACH,CAAC,CACH,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Container", "AxiosManagerApiDataSource", "DefaultManagerApiService", "StubUseCase", "managerApiModuleFactory", "managerApiTypes", "container", "mod", "managerApiDataSource", "managerApiService", "config"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ContainerModule as
|
1
|
+
import{ContainerModule as n}from"inversify";import{DefaultSecureChannelDataSource as a}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as c}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelTypes as o}from"./secureChannelTypes";const i=({stub:r,config:t})=>new n(({bind:e})=>{e(o.DmkConfig).toConstantValue(t),e(o.SecureChannelDataSource).to(a),e(o.SecureChannelService).to(c)});export{i as secureChannelModuleFactory};
|
2
2
|
//# sourceMappingURL=secureChannelModule.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/secure-channel/di/secureChannelModule.ts"],
|
4
|
-
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const secureChannelModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule((bind
|
5
|
-
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,sBAAAC,MAA0B,uBAO5B,MAAMC,EAA6B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACxD,IAAIN,EAAgB,
|
6
|
-
"names": ["ContainerModule", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelTypes", "secureChannelModuleFactory", "stub", "config", "bind"
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ntype FactoryProps = {\n stub?: boolean;\n config: DmkConfig;\n};\n\nexport const secureChannelModuleFactory = ({ stub, config }: FactoryProps) =>\n new ContainerModule(({ bind }) => {\n bind(secureChannelTypes.DmkConfig).toConstantValue(config);\n\n bind(secureChannelTypes.SecureChannelDataSource).to(\n DefaultSecureChannelDataSource,\n );\n bind(secureChannelTypes.SecureChannelService).to(\n DefaultSecureChannelService,\n );\n\n if (stub) {\n /* empty */\n }\n });\n"],
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAGhC,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,sBAAAC,MAA0B,uBAO5B,MAAMC,EAA6B,CAAC,CAAE,KAAAC,EAAM,OAAAC,CAAO,IACxD,IAAIN,EAAgB,CAAC,CAAE,KAAAO,CAAK,IAAM,CAChCA,EAAKJ,EAAmB,SAAS,EAAE,gBAAgBG,CAAM,EAEzDC,EAAKJ,EAAmB,uBAAuB,EAAE,GAC/CF,CACF,EACAM,EAAKJ,EAAmB,oBAAoB,EAAE,GAC5CD,CACF,CAKF,CAAC",
|
6
|
+
"names": ["ContainerModule", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelTypes", "secureChannelModuleFactory", "stub", "config", "bind"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{Container as u}from"inversify";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as s}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelModuleFactory as f}from"./secureChannelModule";import{secureChannelTypes as o}from"./secureChannelTypes";describe("secureChannelModuleFactory default use case",()=>{const n={webSocketUrl:"http://fake-websocket.url"};let e,t;beforeEach(()=>{t=f({stub:!1,config:n}),e=new u,e.
|
1
|
+
import{Container as u}from"inversify";import{DefaultSecureChannelDataSource as l}from"../../secure-channel/data/DefaultSecureChannelDataSource";import{DefaultSecureChannelService as s}from"../../secure-channel/service/DefaultSecureChannelService";import{secureChannelModuleFactory as f}from"./secureChannelModule";import{secureChannelTypes as o}from"./secureChannelTypes";describe("secureChannelModuleFactory default use case",()=>{const n={webSocketUrl:"http://fake-websocket.url"};let e,t;beforeEach(()=>{t=f({stub:!1,config:n}),e=new u,e.loadSync(t)}),it("the secure channel module should be defined",()=>{expect(t).toBeDefined()}),it("should return default use cases instead of stub",()=>{const c=e.get(o.DmkConfig);expect(c).toEqual({webSocketUrl:"http://fake-websocket.url"});const r=e.get(o.SecureChannelDataSource);expect(r).toBeInstanceOf(l);const a=e.get(o.SecureChannelService);expect(a).toBeInstanceOf(s)})});
|
2
2
|
//# sourceMappingURL=secureChannelModule.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/secure-channel/di/secureChannelModule.test.ts"],
|
4
|
-
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/index\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelModuleFactory } from \"./secureChannelModule\";\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ndescribe(\"secureChannelModuleFactory default use case\", () => {\n const mockDmkConfig = {\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig;\n\n let container: Container;\n let mod: ReturnType<typeof secureChannelModuleFactory>;\n\n beforeEach(() => {\n mod = secureChannelModuleFactory({\n stub: false,\n config: mockDmkConfig,\n });\n container = new Container();\n container.
|
5
|
-
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,8BAAAC,MAAkC,wBAC3C,OAAS,sBAAAC,MAA0B,uBAEnC,SAAS,8CAA+C,IAAM,CAC5D,MAAMC,EAAgB,CACpB,aAAc,2BAChB,EAEA,IAAIC,EACAC,EAEJ,WAAW,IAAM,CACfA,EAAMJ,EAA2B,CAC/B,KAAM,GACN,OAAQE,CACV,CAAC,EACDC,EAAY,IAAIN,EAChBM,EAAU,
|
4
|
+
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/index\";\nimport { DefaultSecureChannelDataSource } from \"@internal/secure-channel/data/DefaultSecureChannelDataSource\";\nimport { DefaultSecureChannelService } from \"@internal/secure-channel/service/DefaultSecureChannelService\";\n\nimport { secureChannelModuleFactory } from \"./secureChannelModule\";\nimport { secureChannelTypes } from \"./secureChannelTypes\";\n\ndescribe(\"secureChannelModuleFactory default use case\", () => {\n const mockDmkConfig = {\n webSocketUrl: \"http://fake-websocket.url\",\n } as DmkConfig;\n\n let container: Container;\n let mod: ReturnType<typeof secureChannelModuleFactory>;\n\n beforeEach(() => {\n mod = secureChannelModuleFactory({\n stub: false,\n config: mockDmkConfig,\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"the secure channel module should be defined\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should return default use cases instead of stub\", () => {\n const config = container.get(secureChannelTypes.DmkConfig);\n expect(config).toEqual({\n webSocketUrl: \"http://fake-websocket.url\",\n });\n\n const secureChannelDataSource = container.get(\n secureChannelTypes.SecureChannelDataSource,\n );\n expect(secureChannelDataSource).toBeInstanceOf(\n DefaultSecureChannelDataSource,\n );\n\n const secureChannelService = container.get(\n secureChannelTypes.SecureChannelService,\n );\n expect(secureChannelService).toBeInstanceOf(DefaultSecureChannelService);\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,kCAAAC,MAAsC,+DAC/C,OAAS,+BAAAC,MAAmC,+DAE5C,OAAS,8BAAAC,MAAkC,wBAC3C,OAAS,sBAAAC,MAA0B,uBAEnC,SAAS,8CAA+C,IAAM,CAC5D,MAAMC,EAAgB,CACpB,aAAc,2BAChB,EAEA,IAAIC,EACAC,EAEJ,WAAW,IAAM,CACfA,EAAMJ,EAA2B,CAC/B,KAAM,GACN,OAAQE,CACV,CAAC,EACDC,EAAY,IAAIN,EAChBM,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,8CAA+C,IAAM,CACtD,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,kDAAmD,IAAM,CAC1D,MAAMC,EAASF,EAAU,IAAIF,EAAmB,SAAS,EACzD,OAAOI,CAAM,EAAE,QAAQ,CACrB,aAAc,2BAChB,CAAC,EAED,MAAMC,EAA0BH,EAAU,IACxCF,EAAmB,uBACrB,EACA,OAAOK,CAAuB,EAAE,eAC9BR,CACF,EAEA,MAAMS,EAAuBJ,EAAU,IACrCF,EAAmB,oBACrB,EACA,OAAOM,CAAoB,EAAE,eAAeR,CAA2B,CACzE,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Container", "DefaultSecureChannelDataSource", "DefaultSecureChannelService", "secureChannelModuleFactory", "secureChannelTypes", "mockDmkConfig", "container", "mod", "config", "secureChannelDataSource", "secureChannelService"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import{AppAlreadyInstalledDAError as s,DeviceLockedError as o,OutOfMemoryDAError as l,RefusedByUserDAError as n}from"../../../api/device-action/os/Errors";var a=(r=>(r[r.AppAlreadyInstalled=0]="AppAlreadyInstalled",r[r.DeviceLocked=1]="DeviceLocked",r[r.OutOfMemory=2]="OutOfMemory",r[r.RefusedByUser=3]="RefusedByUser",r[r.Unknown=4]="Unknown",r))(a||{});class i{constructor(e){this.error=e;this.originalError=e}_tag="WebSocketConnectionError";originalError}class E{constructor(e,c=4){this.error=e;this.errorType=c;this.originalError=e}_tag="SecureChannelError";originalError;mapDAErrors(){switch(this.errorType){case 1:return new o;case 3:return new n;default:return this}}mapInstallDAErrors(){switch(this.errorType){case 1:return new o;case 3:return new n;case 0:return new s;case 2:return new l;default:return this}}}export{E as SecureChannelError,a as SecureChannelErrorType,i as WebSocketConnectionError};
|
2
2
|
//# sourceMappingURL=Errors.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/secure-channel/model/Errors.ts"],
|
4
|
-
"sourcesContent": ["import { type DmkError } from \"@api/Error\";\n\nexport class WebSocketConnectionError implements DmkError {\n _tag = \"WebSocketConnectionError\";\n originalError?: unknown;\n\n constructor(public readonly error: unknown) {\n this.originalError = error;\n }\n}\n\nexport class SecureChannelError implements DmkError {\n _tag = \"SecureChannelError\";\n originalError?: unknown;\n\n constructor(public readonly error: unknown) {\n this.originalError = error;\n }\n}\n"],
|
5
|
-
"mappings": "
|
6
|
-
"names": ["WebSocketConnectionError", "error", "SecureChannelError"]
|
4
|
+
"sourcesContent": ["import {\n AppAlreadyInstalledDAError,\n DeviceLockedError,\n OutOfMemoryDAError,\n RefusedByUserDAError,\n} from \"@api/device-action/os/Errors\";\nimport type { DmkError } from \"@api/Error\";\n\nexport enum SecureChannelErrorType {\n AppAlreadyInstalled,\n DeviceLocked,\n OutOfMemory,\n RefusedByUser,\n Unknown,\n}\n\n/**\n * Errors that can possibly occur during a secure channel operation\n */\nexport type SecureChannelDAErrors =\n | SecureChannelError\n | DeviceLockedError\n | RefusedByUserDAError;\n\n/**\n * Errors that can possibly occur during a secure channel install operation\n * such as installApp or installFirmware\n */\nexport type SecureChannelInstallDAErrors =\n | SecureChannelError\n | AppAlreadyInstalledDAError\n | OutOfMemoryDAError\n | DeviceLockedError\n | RefusedByUserDAError;\n\nexport class WebSocketConnectionError implements DmkError {\n _tag = \"WebSocketConnectionError\";\n originalError?: unknown;\n\n constructor(public readonly error: unknown) {\n this.originalError = error;\n }\n}\n\nexport class SecureChannelError implements DmkError {\n _tag = \"SecureChannelError\";\n originalError?: unknown;\n\n constructor(\n public readonly error: unknown,\n public readonly errorType: SecureChannelErrorType = SecureChannelErrorType.Unknown,\n ) {\n this.originalError = error;\n }\n\n mapDAErrors(): SecureChannelDAErrors {\n switch (this.errorType) {\n case SecureChannelErrorType.DeviceLocked:\n return new DeviceLockedError();\n case SecureChannelErrorType.RefusedByUser:\n return new RefusedByUserDAError();\n default:\n return this;\n }\n }\n\n mapInstallDAErrors(): SecureChannelInstallDAErrors {\n switch (this.errorType) {\n case SecureChannelErrorType.DeviceLocked:\n return new DeviceLockedError();\n case SecureChannelErrorType.RefusedByUser:\n return new RefusedByUserDAError();\n case SecureChannelErrorType.AppAlreadyInstalled:\n return new AppAlreadyInstalledDAError();\n case SecureChannelErrorType.OutOfMemory:\n return new OutOfMemoryDAError();\n default:\n return this;\n }\n }\n}\n"],
|
5
|
+
"mappings": "AAAA,OACE,8BAAAA,EACA,qBAAAC,EACA,sBAAAC,EACA,wBAAAC,MACK,+BAGA,IAAKC,OACVA,IAAA,6CACAA,IAAA,+BACAA,IAAA,6BACAA,IAAA,iCACAA,IAAA,qBALUA,OAAA,IA2BL,MAAMC,CAA6C,CAIxD,YAA4BC,EAAgB,CAAhB,WAAAA,EAC1B,KAAK,cAAgBA,CACvB,CALA,KAAO,2BACP,aAKF,CAEO,MAAMC,CAAuC,CAIlD,YACkBD,EACAE,EAAoC,EACpD,CAFgB,WAAAF,EACA,eAAAE,EAEhB,KAAK,cAAgBF,CACvB,CARA,KAAO,qBACP,cASA,aAAqC,CACnC,OAAQ,KAAK,UAAW,CACtB,IAAK,GACH,OAAO,IAAIL,EACb,IAAK,GACH,OAAO,IAAIE,EACb,QACE,OAAO,IACX,CACF,CAEA,oBAAmD,CACjD,OAAQ,KAAK,UAAW,CACtB,IAAK,GACH,OAAO,IAAIF,EACb,IAAK,GACH,OAAO,IAAIE,EACb,IAAK,GACH,OAAO,IAAIH,EACb,IAAK,GACH,OAAO,IAAIE,EACb,QACE,OAAO,IACX,CACF,CACF",
|
6
|
+
"names": ["AppAlreadyInstalledDAError", "DeviceLockedError", "OutOfMemoryDAError", "RefusedByUserDAError", "SecureChannelErrorType", "WebSocketConnectionError", "error", "SecureChannelError", "errorType"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ContainerModule as
|
1
|
+
import{ContainerModule as t}from"inversify";import{SendApduUseCase as p}from"../../send/use-case/SendApduUseCase";import{StubUseCase as a}from"../../../../src/di.stub";import{sendTypes as e}from"./sendTypes";const f=({stub:o=!1})=>new t(({bind:s,rebindSync:r})=>{s(e.SendApduUseCase).to(p),o&&r(e.SendApduUseCase).to(a)});export{f as sendModuleFactory};
|
2
2
|
//# sourceMappingURL=sendModule.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/send/di/sendModule.ts"],
|
4
|
-
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { SendApduUseCase } from \"@internal/send/use-case/SendApduUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { sendTypes } from \"./sendTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const sendModuleFactory = ({ stub = false }: FactoryProps) =>\n new ContainerModule(
|
5
|
-
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,mBAAAC,MAAuB,0CAChC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,aAAAC,MAAiB,cAMnB,MAAMC,EAAoB,CAAC,CAAE,KAAAC,EAAO,EAAM,IAC/C,IAAIL,
|
6
|
-
"names": ["ContainerModule", "SendApduUseCase", "StubUseCase", "sendTypes", "sendModuleFactory", "stub", "bind", "
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { SendApduUseCase } from \"@internal/send/use-case/SendApduUseCase\";\nimport { StubUseCase } from \"@root/src/di.stub\";\n\nimport { sendTypes } from \"./sendTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n};\n\nexport const sendModuleFactory = ({ stub = false }: FactoryProps) =>\n new ContainerModule(({ bind, rebindSync }) => {\n bind(sendTypes.SendApduUseCase).to(SendApduUseCase);\n if (stub) {\n rebindSync(sendTypes.SendApduUseCase).to(StubUseCase);\n }\n });\n"],
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAEhC,OAAS,mBAAAC,MAAuB,0CAChC,OAAS,eAAAC,MAAmB,oBAE5B,OAAS,aAAAC,MAAiB,cAMnB,MAAMC,EAAoB,CAAC,CAAE,KAAAC,EAAO,EAAM,IAC/C,IAAIL,EAAgB,CAAC,CAAE,KAAAM,EAAM,WAAAC,CAAW,IAAM,CAC5CD,EAAKH,EAAU,eAAe,EAAE,GAAGF,CAAe,EAC9CI,GACFE,EAAWJ,EAAU,eAAe,EAAE,GAAGD,CAAW,CAExD,CAAC",
|
6
|
+
"names": ["ContainerModule", "SendApduUseCase", "StubUseCase", "sendTypes", "sendModuleFactory", "stub", "bind", "rebindSync"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{Container as t}from"inversify";import{sendModuleFactory as r}from"./sendModule";describe("sendModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=r({stub:!1}),o=new t,o.
|
1
|
+
import{Container as t}from"inversify";import{sendModuleFactory as r}from"./sendModule";describe("sendModuleFactory",()=>{describe("Default",()=>{let o,e;beforeEach(()=>{e=r({stub:!1}),o=new t,o.loadSync(e)}),it("should return the config module",()=>{expect(e).toBeDefined()})})});
|
2
2
|
//# sourceMappingURL=sendModule.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/send/di/sendModule.test.ts"],
|
4
|
-
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { sendModuleFactory } from \"./sendModule\";\n\ndescribe(\"sendModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof sendModuleFactory>;\n beforeEach(() => {\n mod = sendModuleFactory({ stub: false });\n container = new Container();\n container.
|
5
|
-
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,qBAAAC,MAAyB,eAElC,SAAS,oBAAqB,IAAM,CAClC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAkB,CAAE,KAAM,EAAM,CAAC,EACvCC,EAAY,IAAIF,EAChBE,EAAU,
|
4
|
+
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { sendModuleFactory } from \"./sendModule\";\n\ndescribe(\"sendModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof sendModuleFactory>;\n beforeEach(() => {\n mod = sendModuleFactory({ stub: false });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should return the config module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAE1B,OAAS,qBAAAC,MAAyB,eAElC,SAAS,oBAAqB,IAAM,CAClC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAkB,CAAE,KAAM,EAAM,CAAC,EACvCC,EAAY,IAAIF,EAChBE,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,kCAAmC,IAAM,CAC1C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Container", "sendModuleFactory", "container", "mod"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var S=(t,e,r,
|
1
|
+
var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var S=(t,e,r,s)=>{for(var i=s>1?void 0:s?d(e,r):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(s?o(e,r,i):o(i))||i);return s&&i&&a(e,r,i),i},v=(t,e)=>(r,s)=>e(r,s,t);import{inject as p,injectable as m}from"inversify";import{deviceSessionTypes as l}from"../../device-session/di/deviceSessionTypes";import{loggerTypes as h}from"../../logger-publisher/di/loggerTypes";let g=class{_sessionService;_logger;constructor(e,r){this._sessionService=e,this._logger=r("SendApduUseCase")}async execute({sessionId:e,apdu:r,abortTimeout:s,triggersDisconnection:i}){return this._sessionService.getDeviceSessionById(e).caseOf({Right:async o=>(await o.sendApdu(r,{abortTimeout:s,triggersDisconnection:i})).caseOf({Right:c=>c,Left:c=>{throw this._logger.error("Error sending APDU",{data:{sessionId:e,apdu:r,error:c}}),c}}),Left:o=>{throw this._logger.error("Error getting deviceSession",{data:{error:o}}),o}})}};g=S([m(),v(0,p(l.DeviceSessionService)),v(1,p(h.LoggerPublisherServiceFactory))],g);export{g as SendApduUseCase};
|
2
2
|
//# sourceMappingURL=SendApduUseCase.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/send/use-case/SendApduUseCase.ts"],
|
4
|
-
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { ApduResponse } from \"@api/device-session/ApduResponse\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DeviceSessionId } from \"@api/types\";\nimport { deviceSessionTypes } from \"@internal/device-session/di/deviceSessionTypes\";\nimport type { DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\n\n/**\n * The arguments for the SendApduUseCase.\n */\nexport type SendApduUseCaseArgs = {\n /**\n * Device session identifier from `DeviceManagementKit.connect`.\n */\n sessionId: DeviceSessionId;\n /**\n * Raw APDU to send to the device.\n */\n apdu: Uint8Array;\n /**\n * The time, in milliseconds, to wait before aborting an operation.\n */\n abortTimeout?: number;\n};\n\n/**\n * Sends an APDU to a connected device.\n */\n@injectable()\nexport class SendApduUseCase {\n private readonly _sessionService: DeviceSessionService;\n private readonly _logger: LoggerPublisherService;\n\n constructor(\n @inject(deviceSessionTypes.DeviceSessionService)\n sessionService: DeviceSessionService,\n @inject(loggerTypes.LoggerPublisherServiceFactory)\n loggerFactory: (tag: string) => LoggerPublisherService,\n ) {\n this._sessionService = sessionService;\n this._logger = loggerFactory(\"SendApduUseCase\");\n }\n\n async execute({\n sessionId,\n apdu,\n abortTimeout,\n }: SendApduUseCaseArgs): Promise<ApduResponse> {\n const deviceSessionOrError =\n this._sessionService.getDeviceSessionById(sessionId);\n\n return deviceSessionOrError.caseOf({\n // Case device session found\n Right: async (deviceSession) => {\n const response = await deviceSession.sendApdu(apdu, {
|
5
|
-
"mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAKnC,OAAS,sBAAAC,MAA0B,iDAEnC,OAAS,eAAAC,MAAmB,
|
6
|
-
"names": ["inject", "injectable", "deviceSessionTypes", "loggerTypes", "SendApduUseCase", "sessionService", "loggerFactory", "sessionId", "apdu", "abortTimeout", "deviceSession", "data", "error", "__decorateClass", "injectable", "__decorateParam", "inject", "deviceSessionTypes", "loggerTypes"]
|
4
|
+
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { ApduResponse } from \"@api/device-session/ApduResponse\";\nimport { type LoggerPublisherService } from \"@api/logger-publisher/service/LoggerPublisherService\";\nimport { DeviceSessionId } from \"@api/types\";\nimport { deviceSessionTypes } from \"@internal/device-session/di/deviceSessionTypes\";\nimport type { DeviceSessionService } from \"@internal/device-session/service/DeviceSessionService\";\nimport { loggerTypes } from \"@internal/logger-publisher/di/loggerTypes\";\n\n/**\n * The arguments for the SendApduUseCase.\n */\nexport type SendApduUseCaseArgs = {\n /**\n * Device session identifier from `DeviceManagementKit.connect`.\n */\n sessionId: DeviceSessionId;\n /**\n * Raw APDU to send to the device.\n */\n apdu: Uint8Array;\n /**\n * The time, in milliseconds, to wait before aborting an operation.\n */\n abortTimeout?: number;\n /**\n * Indicates if a device disconnection should be expected after sending the APDU.\n */\n triggersDisconnection?: boolean;\n};\n\n/**\n * Sends an APDU to a connected device.\n */\n@injectable()\nexport class SendApduUseCase {\n private readonly _sessionService: DeviceSessionService;\n private readonly _logger: LoggerPublisherService;\n\n constructor(\n @inject(deviceSessionTypes.DeviceSessionService)\n sessionService: DeviceSessionService,\n @inject(loggerTypes.LoggerPublisherServiceFactory)\n loggerFactory: (tag: string) => LoggerPublisherService,\n ) {\n this._sessionService = sessionService;\n this._logger = loggerFactory(\"SendApduUseCase\");\n }\n\n async execute({\n sessionId,\n apdu,\n abortTimeout,\n triggersDisconnection,\n }: SendApduUseCaseArgs): Promise<ApduResponse> {\n const deviceSessionOrError =\n this._sessionService.getDeviceSessionById(sessionId);\n\n return deviceSessionOrError.caseOf({\n // Case device session found\n Right: async (deviceSession) => {\n const response = await deviceSession.sendApdu(apdu, {\n abortTimeout,\n triggersDisconnection,\n });\n return response.caseOf({\n // Case APDU sent and response received successfully\n Right: (data) => data,\n // Case error sending or receiving APDU\n Left: (error) => {\n this._logger.error(\"Error sending APDU\", {\n data: { sessionId, apdu, error },\n });\n throw error;\n },\n });\n },\n // Case device session not found\n Left: (error) => {\n this._logger.error(\"Error getting deviceSession\", {\n data: { error },\n });\n throw error;\n },\n });\n }\n}\n"],
|
5
|
+
"mappings": "iOAAA,OAAS,UAAAA,EAAQ,cAAAC,MAAkB,YAKnC,OAAS,sBAAAC,MAA0B,iDAEnC,OAAS,eAAAC,MAAmB,4CA4BrB,IAAMC,EAAN,KAAsB,CACV,gBACA,QAEjB,YAEEC,EAEAC,EACA,CACA,KAAK,gBAAkBD,EACvB,KAAK,QAAUC,EAAc,iBAAiB,CAChD,CAEA,MAAM,QAAQ,CACZ,UAAAC,EACA,KAAAC,EACA,aAAAC,EACA,sBAAAC,CACF,EAA+C,CAI7C,OAFE,KAAK,gBAAgB,qBAAqBH,CAAS,EAEzB,OAAO,CAEjC,MAAO,MAAOI,IACK,MAAMA,EAAc,SAASH,EAAM,CAClD,aAAAC,EACA,sBAAAC,CACF,CAAC,GACe,OAAO,CAErB,MAAQE,GAASA,EAEjB,KAAOC,GAAU,CACf,WAAK,QAAQ,MAAM,qBAAsB,CACvC,KAAM,CAAE,UAAAN,EAAW,KAAAC,EAAM,MAAAK,CAAM,CACjC,CAAC,EACKA,CACR,CACF,CAAC,EAGH,KAAOA,GAAU,CACf,WAAK,QAAQ,MAAM,8BAA+B,CAChD,KAAM,CAAE,MAAAA,CAAM,CAChB,CAAC,EACKA,CACR,CACF,CAAC,CACH,CACF,EAnDaT,EAANU,EAAA,CADNC,EAAW,EAMPC,EAAA,EAAAC,EAAOC,EAAmB,oBAAoB,GAE9CF,EAAA,EAAAC,EAAOE,EAAY,6BAA6B,IAPxCf",
|
6
|
+
"names": ["inject", "injectable", "deviceSessionTypes", "loggerTypes", "SendApduUseCase", "sessionService", "loggerFactory", "sessionId", "apdu", "abortTimeout", "triggersDisconnection", "deviceSession", "data", "error", "__decorateClass", "injectable", "__decorateParam", "inject", "deviceSessionTypes", "loggerTypes"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{ContainerModule as p}from"inversify";import{DefaultTransportService as e}from"../../transport/service/DefaultTransportService";import{transportDiTypes as
|
1
|
+
import{ContainerModule as p}from"inversify";import{DefaultTransportService as e}from"../../transport/service/DefaultTransportService";import{transportDiTypes as t}from"./transportDiTypes";const f=({stub:r=!1,transports:a=[],config:n}={})=>new p(({bind:o})=>{o(t.TransportsInput).toConstantValue(a),o(t.TransportService).to(e).inSingletonScope(),o(t.DmkConfig).toConstantValue(n)});export{f as transportModuleFactory};
|
2
2
|
//# sourceMappingURL=transportModule.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/transport/di/transportModule.ts"],
|
4
|
-
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n transports: TransportFactory[];\n config: DmkConfig;\n};\n\nexport const transportModuleFactory = ({\n stub = false,\n transports = [],\n config,\n}: Partial<FactoryProps> = {}) =>\n new ContainerModule((bind
|
5
|
-
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAIhC,OAAS,2BAAAC,MAA+B,sDAExC,OAAS,oBAAAC,MAAwB,qBAQ1B,MAAMC,EAAyB,CAAC,CACrC,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,OAAAC,CACF,EAA2B,CAAC,IAC1B,IAAIN,EAAgB,
|
6
|
-
"names": ["ContainerModule", "DefaultTransportService", "transportDiTypes", "transportModuleFactory", "stub", "transports", "config", "bind"
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { type TransportFactory } from \"@api/transport/model/Transport\";\nimport { DefaultTransportService } from \"@internal/transport/service/DefaultTransportService\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\n\ntype FactoryProps = {\n stub: boolean;\n transports: TransportFactory[];\n config: DmkConfig;\n};\n\nexport const transportModuleFactory = ({\n stub = false,\n transports = [],\n config,\n}: Partial<FactoryProps> = {}) =>\n new ContainerModule(({ bind }) => {\n bind(transportDiTypes.TransportsInput).toConstantValue(transports);\n bind(transportDiTypes.TransportService)\n .to(DefaultTransportService)\n .inSingletonScope();\n\n bind(transportDiTypes.DmkConfig).toConstantValue(config);\n\n if (stub) {\n // TODO: Implement stub\n }\n });\n"],
|
5
|
+
"mappings": "AAAA,OAAS,mBAAAA,MAAuB,YAIhC,OAAS,2BAAAC,MAA+B,sDAExC,OAAS,oBAAAC,MAAwB,qBAQ1B,MAAMC,EAAyB,CAAC,CACrC,KAAAC,EAAO,GACP,WAAAC,EAAa,CAAC,EACd,OAAAC,CACF,EAA2B,CAAC,IAC1B,IAAIN,EAAgB,CAAC,CAAE,KAAAO,CAAK,IAAM,CAChCA,EAAKL,EAAiB,eAAe,EAAE,gBAAgBG,CAAU,EACjEE,EAAKL,EAAiB,gBAAgB,EACnC,GAAGD,CAAuB,EAC1B,iBAAiB,EAEpBM,EAAKL,EAAiB,SAAS,EAAE,gBAAgBI,CAAM,CAKzD,CAAC",
|
6
|
+
"names": ["ContainerModule", "DefaultTransportService", "transportDiTypes", "transportModuleFactory", "stub", "transports", "config", "bind"]
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{Container as o}from"inversify";import{TransportMock as a}from"../../../api/transport/model/__mocks__/TransportMock";import{deviceModelModuleFactory as l}from"../../device-model/di/deviceModelModule";import{deviceSessionModuleFactory as d}from"../../device-session/di/deviceSessionModule";import{loggerModuleFactory as u}from"../../logger-publisher/di/loggerModule";import{transportDiTypes as i}from"./transportDiTypes";import{transportModuleFactory as n}from"./transportModule";describe("transportModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=n(),e=new o,e.
|
1
|
+
import{Container as o}from"inversify";import{TransportMock as a}from"../../../api/transport/model/__mocks__/TransportMock";import{deviceModelModuleFactory as l}from"../../device-model/di/deviceModelModule";import{deviceSessionModuleFactory as d}from"../../device-session/di/deviceSessionModule";import{loggerModuleFactory as u}from"../../logger-publisher/di/loggerModule";import{transportDiTypes as i}from"./transportDiTypes";import{transportModuleFactory as n}from"./transportModule";describe("transportModuleFactory",()=>{describe("Default",()=>{let e,t;beforeEach(()=>{t=n(),e=new o,e.loadSync(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()}),it("should not bind the TransportService when transports is empty",()=>{try{e.get(i.TransportService)}catch(r){expect(r).toBeDefined()}})}),describe("With transports",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK");const s=u(),c=l({stub:!0}),p=d({stub:!0});t=n({transports:[()=>r],config:{managerApiUrl:"http://fake.url/api",mockUrl:"http://fake.url",webSocketUrl:"ws://fake.websocket.url",firmwareDistributionSalt:"salt"}}),e=new o,e.loadSync(s,c,p,t)}),it("should bind the TransportService",()=>{expect(e.get(i.TransportService)).toBeDefined()})}),describe("With stub",()=>{let e,t,r;beforeEach(()=>{r=new a,vi.spyOn(r,"getIdentifier").mockReturnValue("MOCK"),t=n({stub:!0,transports:[()=>r]}),e=new o,e.loadSync(t)}),it("should create the transport module",()=>{expect(t).toBeDefined()})})});
|
2
2
|
//# sourceMappingURL=transportModule.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../src/internal/transport/di/transportModule.test.ts"],
|
4
|
-
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\nimport { transportModuleFactory } from \"./transportModule\";\n\ndescribe(\"transportModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n beforeEach(() => {\n mod = transportModuleFactory();\n container = new Container();\n container.
|
5
|
-
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,uBAAAC,MAA2B,6CAEpC,OAAS,oBAAAC,MAAwB,qBACjC,OAAS,0BAAAC,MAA8B,oBAEvC,SAAS,yBAA0B,IAAM,CACvC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAuB,EAC7BC,EAAY,IAAIP,EAChBO,EAAU,
|
4
|
+
"sourcesContent": ["import { Container } from \"inversify\";\n\nimport { type DmkConfig } from \"@api/DmkConfig\";\nimport { TransportMock } from \"@api/transport/model/__mocks__/TransportMock\";\nimport { deviceModelModuleFactory } from \"@internal/device-model/di/deviceModelModule\";\nimport { deviceSessionModuleFactory } from \"@internal/device-session/di/deviceSessionModule\";\nimport { loggerModuleFactory } from \"@internal/logger-publisher/di/loggerModule\";\n\nimport { transportDiTypes } from \"./transportDiTypes\";\nimport { transportModuleFactory } from \"./transportModule\";\n\ndescribe(\"transportModuleFactory\", () => {\n describe(\"Default\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n beforeEach(() => {\n mod = transportModuleFactory();\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n\n it(\"should not bind the TransportService when transports is empty\", () => {\n try {\n container.get(transportDiTypes.TransportService);\n } catch (error) {\n expect(error).toBeDefined();\n }\n });\n });\n\n describe(\"With transports\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n const logger = loggerModuleFactory();\n const deviceModel = deviceModelModuleFactory({ stub: true });\n const deviceSession = deviceSessionModuleFactory({ stub: true });\n mod = transportModuleFactory({\n transports: [() => transport],\n config: {\n managerApiUrl: \"http://fake.url/api\",\n mockUrl: \"http://fake.url\",\n webSocketUrl: \"ws://fake.websocket.url\",\n firmwareDistributionSalt: \"salt\",\n } as DmkConfig,\n });\n container = new Container();\n container.loadSync(logger, deviceModel, deviceSession, mod);\n });\n\n it(\"should bind the TransportService\", () => {\n expect(container.get(transportDiTypes.TransportService)).toBeDefined();\n });\n });\n\n describe(\"With stub\", () => {\n let container: Container;\n let mod: ReturnType<typeof transportModuleFactory>;\n let transport: TransportMock;\n beforeEach(() => {\n transport = new TransportMock();\n vi.spyOn(transport, \"getIdentifier\").mockReturnValue(\"MOCK\");\n mod = transportModuleFactory({\n stub: true,\n transports: [() => transport],\n });\n container = new Container();\n container.loadSync(mod);\n });\n\n it(\"should create the transport module\", () => {\n expect(mod).toBeDefined();\n });\n });\n});\n"],
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,YAG1B,OAAS,iBAAAC,MAAqB,+CAC9B,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,8BAAAC,MAAkC,kDAC3C,OAAS,uBAAAC,MAA2B,6CAEpC,OAAS,oBAAAC,MAAwB,qBACjC,OAAS,0BAAAC,MAA8B,oBAEvC,SAAS,yBAA0B,IAAM,CACvC,SAAS,UAAW,IAAM,CACxB,IAAIC,EACAC,EACJ,WAAW,IAAM,CACfA,EAAMF,EAAuB,EAC7BC,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,EAED,GAAG,gEAAiE,IAAM,CACxE,GAAI,CACFD,EAAU,IAAIF,EAAiB,gBAAgB,CACjD,OAASI,EAAO,CACd,OAAOA,CAAK,EAAE,YAAY,CAC5B,CACF,CAAC,CACH,CAAC,EAED,SAAS,kBAAmB,IAAM,CAChC,IAAIF,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3D,MAAMC,EAASP,EAAoB,EAC7BQ,EAAcV,EAAyB,CAAE,KAAM,EAAK,CAAC,EACrDW,EAAgBV,EAA2B,CAAE,KAAM,EAAK,CAAC,EAC/DK,EAAMF,EAAuB,CAC3B,WAAY,CAAC,IAAMI,CAAS,EAC5B,OAAQ,CACN,cAAe,sBACf,QAAS,kBACT,aAAc,0BACd,yBAA0B,MAC5B,CACF,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,SAASI,EAAQC,EAAaC,EAAeL,CAAG,CAC5D,CAAC,EAED,GAAG,mCAAoC,IAAM,CAC3C,OAAOD,EAAU,IAAIF,EAAiB,gBAAgB,CAAC,EAAE,YAAY,CACvE,CAAC,CACH,CAAC,EAED,SAAS,YAAa,IAAM,CAC1B,IAAIE,EACAC,EACAE,EACJ,WAAW,IAAM,CACfA,EAAY,IAAIT,EAChB,GAAG,MAAMS,EAAW,eAAe,EAAE,gBAAgB,MAAM,EAC3DF,EAAMF,EAAuB,CAC3B,KAAM,GACN,WAAY,CAAC,IAAMI,CAAS,CAC9B,CAAC,EACDH,EAAY,IAAIP,EAChBO,EAAU,SAASC,CAAG,CACxB,CAAC,EAED,GAAG,qCAAsC,IAAM,CAC7C,OAAOA,CAAG,EAAE,YAAY,CAC1B,CAAC,CACH,CAAC,CACH,CAAC",
|
6
6
|
"names": ["Container", "TransportMock", "deviceModelModuleFactory", "deviceSessionModuleFactory", "loggerModuleFactory", "transportDiTypes", "transportModuleFactory", "container", "mod", "error", "transport", "logger", "deviceModel", "deviceSession"]
|
7
7
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ApduBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,eAAO,MAAM,aAAa,QAAuB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,IAAI,CAA4D;gBAE5D,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,eAAe;IAWjD;;;OAGG;IACH,KAAK,QAAO,IAAI,CACuD;IAEvE;;;;OAIG;IACH,iBAAiB,
|
1
|
+
{"version":3,"file":"ApduBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,eAAO,MAAM,aAAa,QAAuB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,IAAI,CAA4D;gBAE5D,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,eAAe;IAWjD;;;OAGG;IACH,KAAK,QAAO,IAAI,CACuD;IAEvE;;;;OAIG;IACH,iBAAiB,GAAI,OAAO,MAAM,KAAG,WAAW,CAG9C;IAEF;;;;OAIG;IACH,kBAAkB,GAAI,OAAO,MAAM,KAAG,WAAW,CAG/C;IAEF;;;;OAIG;IACH,kBAAkB,GAAI,OAAO,MAAM,KAAG,WAAW,CAG/C;IAEF;;;;OAIG;IACH,eAAe,GAAI,OAAO,UAAU,KAAG,WAAW,CAGhD;IAEF;;;;;OAKG;IACH,mBAAmB,GAAI,OAAO,MAAM,KAAG,WAAW,CAGhD;IAEF;;;;OAIG;IACH,oBAAoB,GAAI,OAAO,MAAM,KAAG,WAAW,CAGjD;IAEF;;;;;;OAMG;IACH,kBAAkB,GAAI,OAAO,MAAM,KAAG,WAAW,CAG/C;IAEF;;;;;;OAMG;IACH,oBAAoB,GAAI,OAAO,UAAU,KAAG,WAAW,CAGrD;IAEF;;;;;;OAMG;IACH,mBAAmB,GAAI,OAAO,MAAM,KAAG,WAAW,CAGhD;IAEF;;;OAGG;IACH,yBAAyB,QAAO,MAAM,CACE;IAExC;;;OAGG;IACH,SAAS,QAAO,eAAe,EAAE,CAA0B;CAC5D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ApduParser.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,QAAQ,EAAE,YAAY;IAIlC;;;;OAIG;IACH,iBAAiB,
|
1
|
+
{"version":3,"file":"ApduParser.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ApduParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,QAAQ,EAAE,YAAY;IAIlC;;;;OAIG;IACH,iBAAiB,GAAI,QAAQ,MAAM,KAAG,OAAO,CACL;IAExC;;;OAGG;IACH,eAAe,QAAO,MAAM,GAAG,SAAS,CAAkC;IAE1E;;;OAGG;IACH,gBAAgB,QAAO,MAAM,GAAG,SAAS,CAAmC;IAE5E;;;OAGG;IACH,gBAAgB,QAAO,MAAM,GAAG,SAAS,CAAmC;IAE5E;;;;OAIG;IACH,oBAAoB,GAAI,QAAQ,MAAM,KAAG,UAAU,GAAG,SAAS,CACpB;IAE3C;;;OAGG;IACH,qBAAqB,QAAO,UAAU,GAAG,SAAS,CACZ;IAEtC;;;OAGG;IACH,sBAAsB,QAAO,WAAW,GAAG,SAAS,CACb;IAEvC;;;;;OAKG;IACH,kBAAkB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM;IAC9D,kBAAkB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,UAAU;IAUjE;;;;OAIG;IACH,cAAc,GAAI,QAAQ,UAAU,KAAG,MAAM,CACT;IAEpC;;;OAGG;IACH,0BAA0B,QAAO,MAAM,CACI;CAC5C"}
|
@@ -151,6 +151,72 @@ export declare class ByteArrayBuilder {
|
|
151
151
|
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
152
152
|
*/
|
153
153
|
encodeInLVFromAscii: (value: string) => ByteArrayBuilder;
|
154
|
+
/**
|
155
|
+
* Add a Tag-Length-Value encoded ascii string to the data field if it has enough remaining space
|
156
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
157
|
+
* being the length of the data and the following bytes being the data itself
|
158
|
+
* @param tag: number - The tag to add to the data
|
159
|
+
* @param value: string - The value to add to the data
|
160
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
161
|
+
*/
|
162
|
+
encodeInTLVFromAscii: (tag: number, value: string) => ByteArrayBuilder;
|
163
|
+
/**
|
164
|
+
* Add a Tag-Length-Value encoded hexadecimal string to the data field if it has enough remaining space
|
165
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
166
|
+
* being the length of the data and the following bytes being the data itself
|
167
|
+
* @param tag: number - The tag to add to the data
|
168
|
+
* @param value: string - The value to add to the data
|
169
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
170
|
+
*/
|
171
|
+
encodeInTLVFromHexa: (tag: number, value: string) => ByteArrayBuilder;
|
172
|
+
/**
|
173
|
+
* Add a Tag-Length-Value encoded hexadecimal string to the data field if it has enough remaining space
|
174
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
175
|
+
* being the length of the data and the following bytes being the data itself
|
176
|
+
* @param tag: number - The tag to add to the data
|
177
|
+
* @param value: Uint8Array - The buffer to add to the data
|
178
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
179
|
+
*/
|
180
|
+
encodeInTLVFromBuffer: (tag: number, value: Uint8Array) => ByteArrayBuilder;
|
181
|
+
/**
|
182
|
+
* Add a Tag-Length-Value encoded uint8 to the data field if it has enough remaining space
|
183
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
184
|
+
* being the length of the data and the following bytes being the data itself
|
185
|
+
* @param tag: number - The tag to add to the data
|
186
|
+
* @param value: number - The number to add
|
187
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
188
|
+
*/
|
189
|
+
encodeInTLVFromUInt8: (tag: number, value: number) => ByteArrayBuilder;
|
190
|
+
/**
|
191
|
+
* Add a Tag-Length-Value encoded uint16 to the data field if it has enough remaining space
|
192
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
193
|
+
* being the length of the data and the following bytes being the data itself
|
194
|
+
* @param tag: number - The tag to add to the data
|
195
|
+
* @param value: number | bigint - The number to add
|
196
|
+
* @param bigEndian: boolean - Endianness used to encode the number
|
197
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
198
|
+
*/
|
199
|
+
encodeInTLVFromUInt16: (tag: number, value: number | bigint, bigEndian?: boolean) => ByteArrayBuilder;
|
200
|
+
/**
|
201
|
+
* Add a Tag-Length-Value encoded uint32 to the data field if it has enough remaining space
|
202
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
203
|
+
* being the length of the data and the following bytes being the data itself
|
204
|
+
* @param tag: number - The tag to add to the data
|
205
|
+
* @param value: number | bigint - The number to add
|
206
|
+
* @param bigEndian: boolean - Endianness used to encode the number
|
207
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
208
|
+
*/
|
209
|
+
encodeInTLVFromUInt32: (tag: number, value: number | bigint, bigEndian?: boolean) => ByteArrayBuilder;
|
210
|
+
/**
|
211
|
+
* Add a Tag-Length-Value encoded uint64 to the data field if it has enough remaining space
|
212
|
+
* Length-Value encoding is a way to encode data in a binary format with the first byte
|
213
|
+
* being the length of the data and the following bytes being the data itself
|
214
|
+
* @param tag: number - The tag to add to the data
|
215
|
+
* @param value: number | bigint - The number to add
|
216
|
+
* @param bigEndian: boolean - Endianness used to encode the number
|
217
|
+
* @returns {ByteArrayBuilder} - Returns the current instance of ByteArrayBuilder
|
218
|
+
*/
|
219
|
+
encodeInTLVFromUInt64: (tag: number, value: number | bigint, bigEndian?: boolean) => ByteArrayBuilder;
|
154
220
|
/**
|
155
221
|
* Returns the remaining payload length
|
156
222
|
* @returns {number}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ByteArrayBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ByteArrayBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAgB;IAIf,OAAO,CAAC,cAAc;IAHlC,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;gBAE5B,cAAc,GAAE,MAAwB;IAM5D;;;OAGG;IACH,KAAK,QAAO,UAAU,CAAc;IAEpC;;;;OAIG;IACH,QAAQ,QAAO,UAAU,GAAG,SAAS,CAEnC;IAEF;;;;OAIG;IACH,iBAAiB,
|
1
|
+
{"version":3,"file":"ByteArrayBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/api/apdu/utils/ByteArrayBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAgB;IAIf,OAAO,CAAC,cAAc;IAHlC,OAAO,CAAC,IAAI,CAAgC;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;gBAE5B,cAAc,GAAE,MAAwB;IAM5D;;;OAGG;IACH,KAAK,QAAO,UAAU,CAAc;IAEpC;;;;OAIG;IACH,QAAQ,QAAO,UAAU,GAAG,SAAS,CAEnC;IAEF;;;;OAIG;IACH,iBAAiB,GAAI,OAAO,MAAM,GAAG,MAAM,KAAG,gBAAgB,CAE5D;IAEF;;;;;OAKG;IACH,kBAAkB,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,kBAAkB,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,kBAAkB,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,mBAAmB,GACjB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,mBAAmB,GACjB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,iBAAiB,GACf,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,iBAAiB,GACf,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,iBAAiB,GACf,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,kBAAkB,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;;OAKG;IACH,kBAAkB,GAChB,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAEjB;IAEF;;;;OAIG;IACH,eAAe,GAAI,OAAO,UAAU,KAAG,gBAAgB,CAQrD;IAEF;;;;;OAKG;IACH,mBAAmB,GAAI,OAAO,MAAM,KAAG,gBAAgB,CAQrD;IAEF;;;;OAIG;IACH,oBAAoB,GAAI,OAAO,MAAM,KAAG,gBAAgB,CAItD;IAEF;;;;;;OAMG;IACH,kBAAkB,GAAI,OAAO,MAAM,KAAG,gBAAgB,CAgBpD;IAEF;;;;;;OAMG;IACH,oBAAoB,GAAI,OAAO,UAAU,KAAG,gBAAgB,CAS1D;IAEF;;;;;;OAMG;IACH,mBAAmB,GAAI,OAAO,MAAM,KAAG,gBAAgB,CASrD;IAEF;;;;;;;OAOG;IACH,oBAAoB,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,gBAAgB,CAGnE;IAEF;;;;;;;OAOG;IACH,mBAAmB,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,gBAAgB,CAGlE;IAEF;;;;;;;OAOG;IACH,qBAAqB,GACnB,KAAK,MAAM,EACX,OAAO,UAAU,KAChB,gBAAgB,CAGjB;IAEF;;;;;;;OAOG;IACH,oBAAoB,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,gBAAgB,CAInE;IAEF;;;;;;;;OAQG;IACH,qBAAqB,GACnB,KAAK,MAAM,EACX,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAIjB;IAEF;;;;;;;;OAQG;IACH,qBAAqB,GACnB,KAAK,MAAM,EACX,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAIjB;IAEF;;;;;;;;OAQG;IACH,qBAAqB,GACnB,KAAK,MAAM,EACX,OAAO,MAAM,GAAG,MAAM,EACtB,YAAW,OAAc,KACxB,gBAAgB,CAIjB;IAEF;;;OAGG;IACH,yBAAyB,QAAO,MAAM,CAEpC;IAEF;;;OAGG;IACH,SAAS,QAAO,eAAe,EAAE,CAAgB;IAEjD;;;OAGG;IACH,SAAS,QAAO,OAAO,CAA6B;IAMpD;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB,CAO9B;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IA6BvB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;CAuC9B"}
|